Regenerate gnulib files
[deliverable/binutils-gdb.git] / 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
73cc7272 1778enable_plugins
c971b7fa 1779enable_dependency_tracking
39be3c7e 1780enable_silent_rules
c971b7fa
PA
1781'
1782 ac_precious_vars='build_alias
1783host_alias
1784target_alias
1785CC
1786CFLAGS
1787LDFLAGS
1788LIBS
1789CPPFLAGS
1790CPP'
1791
1792
1793# Initialize some variables set by options.
1794ac_init_help=
1795ac_init_version=false
1796ac_unrecognized_opts=
1797ac_unrecognized_sep=
1798# The variables have the same names as the options, with
1799# dashes changed to underlines.
1800cache_file=/dev/null
1801exec_prefix=NONE
1802no_create=
1803no_recursion=
1804prefix=NONE
1805program_prefix=NONE
1806program_suffix=NONE
1807program_transform_name=s,x,x,
1808silent=
1809site=
1810srcdir=
1811verbose=
1812x_includes=NONE
1813x_libraries=NONE
1814
1815# Installation directory options.
1816# These are left unexpanded so users can "make install exec_prefix=/foo"
1817# and all the variables that are supposed to be based on exec_prefix
1818# by default will actually change.
1819# Use braces instead of parens because sh, perl, etc. also accept them.
1820# (The list follows the same order as the GNU Coding Standards.)
1821bindir='${exec_prefix}/bin'
1822sbindir='${exec_prefix}/sbin'
1823libexecdir='${exec_prefix}/libexec'
1824datarootdir='${prefix}/share'
1825datadir='${datarootdir}'
1826sysconfdir='${prefix}/etc'
1827sharedstatedir='${prefix}/com'
1828localstatedir='${prefix}/var'
1829includedir='${prefix}/include'
1830oldincludedir='/usr/include'
d0ac1c44 1831docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
c971b7fa
PA
1832infodir='${datarootdir}/info'
1833htmldir='${docdir}'
1834dvidir='${docdir}'
1835pdfdir='${docdir}'
1836psdir='${docdir}'
1837libdir='${exec_prefix}/lib'
1838localedir='${datarootdir}/locale'
1839mandir='${datarootdir}/man'
1840
1841ac_prev=
1842ac_dashdash=
1843for ac_option
1844do
1845 # If the previous option needs an argument, assign it.
1846 if test -n "$ac_prev"; then
1847 eval $ac_prev=\$ac_option
1848 ac_prev=
1849 continue
1850 fi
1851
1852 case $ac_option in
d0ac1c44
SM
1853 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1854 *=) ac_optarg= ;;
1855 *) ac_optarg=yes ;;
c971b7fa
PA
1856 esac
1857
1858 # Accept the important Cygnus configure options, so we can diagnose typos.
1859
1860 case $ac_dashdash$ac_option in
1861 --)
1862 ac_dashdash=yes ;;
1863
1864 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1865 ac_prev=bindir ;;
1866 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1867 bindir=$ac_optarg ;;
1868
1869 -build | --build | --buil | --bui | --bu)
1870 ac_prev=build_alias ;;
1871 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1872 build_alias=$ac_optarg ;;
1873
1874 -cache-file | --cache-file | --cache-fil | --cache-fi \
1875 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1876 ac_prev=cache_file ;;
1877 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1878 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1879 cache_file=$ac_optarg ;;
1880
1881 --config-cache | -C)
1882 cache_file=config.cache ;;
1883
1884 -datadir | --datadir | --datadi | --datad)
1885 ac_prev=datadir ;;
1886 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1887 datadir=$ac_optarg ;;
1888
1889 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1890 | --dataroo | --dataro | --datar)
1891 ac_prev=datarootdir ;;
1892 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1893 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1894 datarootdir=$ac_optarg ;;
1895
1896 -disable-* | --disable-*)
1897 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1898 # Reject names that are not valid shell variable names.
1899 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1900 as_fn_error $? "invalid feature name: $ac_useropt"
c971b7fa
PA
1901 ac_useropt_orig=$ac_useropt
1902 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1903 case $ac_user_opts in
1904 *"
1905"enable_$ac_useropt"
1906"*) ;;
1907 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1908 ac_unrecognized_sep=', ';;
1909 esac
1910 eval enable_$ac_useropt=no ;;
1911
1912 -docdir | --docdir | --docdi | --doc | --do)
1913 ac_prev=docdir ;;
1914 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1915 docdir=$ac_optarg ;;
1916
1917 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1918 ac_prev=dvidir ;;
1919 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1920 dvidir=$ac_optarg ;;
1921
1922 -enable-* | --enable-*)
1923 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1924 # Reject names that are not valid shell variable names.
1925 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1926 as_fn_error $? "invalid feature name: $ac_useropt"
c971b7fa
PA
1927 ac_useropt_orig=$ac_useropt
1928 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1929 case $ac_user_opts in
1930 *"
1931"enable_$ac_useropt"
1932"*) ;;
1933 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1934 ac_unrecognized_sep=', ';;
1935 esac
1936 eval enable_$ac_useropt=\$ac_optarg ;;
1937
1938 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1939 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1940 | --exec | --exe | --ex)
1941 ac_prev=exec_prefix ;;
1942 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1943 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1944 | --exec=* | --exe=* | --ex=*)
1945 exec_prefix=$ac_optarg ;;
1946
1947 -gas | --gas | --ga | --g)
1948 # Obsolete; use --with-gas.
1949 with_gas=yes ;;
1950
1951 -help | --help | --hel | --he | -h)
1952 ac_init_help=long ;;
1953 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1954 ac_init_help=recursive ;;
1955 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1956 ac_init_help=short ;;
1957
1958 -host | --host | --hos | --ho)
1959 ac_prev=host_alias ;;
1960 -host=* | --host=* | --hos=* | --ho=*)
1961 host_alias=$ac_optarg ;;
1962
1963 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1964 ac_prev=htmldir ;;
1965 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1966 | --ht=*)
1967 htmldir=$ac_optarg ;;
1968
1969 -includedir | --includedir | --includedi | --included | --include \
1970 | --includ | --inclu | --incl | --inc)
1971 ac_prev=includedir ;;
1972 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1973 | --includ=* | --inclu=* | --incl=* | --inc=*)
1974 includedir=$ac_optarg ;;
1975
1976 -infodir | --infodir | --infodi | --infod | --info | --inf)
1977 ac_prev=infodir ;;
1978 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1979 infodir=$ac_optarg ;;
1980
1981 -libdir | --libdir | --libdi | --libd)
1982 ac_prev=libdir ;;
1983 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1984 libdir=$ac_optarg ;;
1985
1986 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1987 | --libexe | --libex | --libe)
1988 ac_prev=libexecdir ;;
1989 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1990 | --libexe=* | --libex=* | --libe=*)
1991 libexecdir=$ac_optarg ;;
1992
1993 -localedir | --localedir | --localedi | --localed | --locale)
1994 ac_prev=localedir ;;
1995 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1996 localedir=$ac_optarg ;;
1997
1998 -localstatedir | --localstatedir | --localstatedi | --localstated \
1999 | --localstate | --localstat | --localsta | --localst | --locals)
2000 ac_prev=localstatedir ;;
2001 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2002 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2003 localstatedir=$ac_optarg ;;
2004
2005 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2006 ac_prev=mandir ;;
2007 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2008 mandir=$ac_optarg ;;
2009
2010 -nfp | --nfp | --nf)
2011 # Obsolete; use --without-fp.
2012 with_fp=no ;;
2013
2014 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2015 | --no-cr | --no-c | -n)
2016 no_create=yes ;;
2017
2018 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2019 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2020 no_recursion=yes ;;
2021
2022 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2023 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2024 | --oldin | --oldi | --old | --ol | --o)
2025 ac_prev=oldincludedir ;;
2026 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2027 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2028 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2029 oldincludedir=$ac_optarg ;;
2030
2031 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2032 ac_prev=prefix ;;
2033 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2034 prefix=$ac_optarg ;;
2035
2036 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2037 | --program-pre | --program-pr | --program-p)
2038 ac_prev=program_prefix ;;
2039 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2040 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2041 program_prefix=$ac_optarg ;;
2042
2043 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2044 | --program-suf | --program-su | --program-s)
2045 ac_prev=program_suffix ;;
2046 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2047 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2048 program_suffix=$ac_optarg ;;
2049
2050 -program-transform-name | --program-transform-name \
2051 | --program-transform-nam | --program-transform-na \
2052 | --program-transform-n | --program-transform- \
2053 | --program-transform | --program-transfor \
2054 | --program-transfo | --program-transf \
2055 | --program-trans | --program-tran \
2056 | --progr-tra | --program-tr | --program-t)
2057 ac_prev=program_transform_name ;;
2058 -program-transform-name=* | --program-transform-name=* \
2059 | --program-transform-nam=* | --program-transform-na=* \
2060 | --program-transform-n=* | --program-transform-=* \
2061 | --program-transform=* | --program-transfor=* \
2062 | --program-transfo=* | --program-transf=* \
2063 | --program-trans=* | --program-tran=* \
2064 | --progr-tra=* | --program-tr=* | --program-t=*)
2065 program_transform_name=$ac_optarg ;;
2066
2067 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2068 ac_prev=pdfdir ;;
2069 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2070 pdfdir=$ac_optarg ;;
2071
2072 -psdir | --psdir | --psdi | --psd | --ps)
2073 ac_prev=psdir ;;
2074 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2075 psdir=$ac_optarg ;;
2076
2077 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2078 | -silent | --silent | --silen | --sile | --sil)
2079 silent=yes ;;
2080
2081 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2082 ac_prev=sbindir ;;
2083 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2084 | --sbi=* | --sb=*)
2085 sbindir=$ac_optarg ;;
2086
2087 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2088 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2089 | --sharedst | --shareds | --shared | --share | --shar \
2090 | --sha | --sh)
2091 ac_prev=sharedstatedir ;;
2092 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2093 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2094 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2095 | --sha=* | --sh=*)
2096 sharedstatedir=$ac_optarg ;;
2097
2098 -site | --site | --sit)
2099 ac_prev=site ;;
2100 -site=* | --site=* | --sit=*)
2101 site=$ac_optarg ;;
2102
2103 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2104 ac_prev=srcdir ;;
2105 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2106 srcdir=$ac_optarg ;;
2107
2108 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2109 | --syscon | --sysco | --sysc | --sys | --sy)
2110 ac_prev=sysconfdir ;;
2111 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2112 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2113 sysconfdir=$ac_optarg ;;
2114
2115 -target | --target | --targe | --targ | --tar | --ta | --t)
2116 ac_prev=target_alias ;;
2117 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2118 target_alias=$ac_optarg ;;
2119
2120 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2121 verbose=yes ;;
2122
2123 -version | --version | --versio | --versi | --vers | -V)
2124 ac_init_version=: ;;
2125
2126 -with-* | --with-*)
2127 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2128 # Reject names that are not valid shell variable names.
2129 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 2130 as_fn_error $? "invalid package name: $ac_useropt"
c971b7fa
PA
2131 ac_useropt_orig=$ac_useropt
2132 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2133 case $ac_user_opts in
2134 *"
2135"with_$ac_useropt"
2136"*) ;;
2137 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2138 ac_unrecognized_sep=', ';;
2139 esac
2140 eval with_$ac_useropt=\$ac_optarg ;;
2141
2142 -without-* | --without-*)
2143 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2144 # Reject names that are not valid shell variable names.
2145 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 2146 as_fn_error $? "invalid package name: $ac_useropt"
c971b7fa
PA
2147 ac_useropt_orig=$ac_useropt
2148 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2149 case $ac_user_opts in
2150 *"
2151"with_$ac_useropt"
2152"*) ;;
2153 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2154 ac_unrecognized_sep=', ';;
2155 esac
2156 eval with_$ac_useropt=no ;;
2157
2158 --x)
2159 # Obsolete; use --with-x.
2160 with_x=yes ;;
2161
2162 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2163 | --x-incl | --x-inc | --x-in | --x-i)
2164 ac_prev=x_includes ;;
2165 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2166 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2167 x_includes=$ac_optarg ;;
2168
2169 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2170 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2171 ac_prev=x_libraries ;;
2172 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2173 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2174 x_libraries=$ac_optarg ;;
2175
d0ac1c44
SM
2176 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2177Try \`$0 --help' for more information"
c971b7fa
PA
2178 ;;
2179
2180 *=*)
2181 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2182 # Reject names that are not valid shell variable names.
2183 case $ac_envvar in #(
2184 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 2185 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
c971b7fa
PA
2186 esac
2187 eval $ac_envvar=\$ac_optarg
2188 export $ac_envvar ;;
2189
2190 *)
2191 # FIXME: should be removed in autoconf 3.0.
2192 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2193 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2194 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 2195 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c971b7fa
PA
2196 ;;
2197
2198 esac
2199done
2200
2201if test -n "$ac_prev"; then
2202 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 2203 as_fn_error $? "missing argument to $ac_option"
c971b7fa
PA
2204fi
2205
2206if test -n "$ac_unrecognized_opts"; then
2207 case $enable_option_checking in
2208 no) ;;
d0ac1c44 2209 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
c971b7fa
PA
2210 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2211 esac
2212fi
2213
2214# Check all directory arguments for consistency.
2215for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2216 datadir sysconfdir sharedstatedir localstatedir includedir \
2217 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2218 libdir localedir mandir
2219do
2220 eval ac_val=\$$ac_var
2221 # Remove trailing slashes.
2222 case $ac_val in
2223 */ )
2224 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2225 eval $ac_var=\$ac_val;;
2226 esac
2227 # Be sure to have absolute directory names.
2228 case $ac_val in
2229 [\\/$]* | ?:[\\/]* ) continue;;
2230 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2231 esac
d0ac1c44 2232 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c971b7fa
PA
2233done
2234
2235# There might be people who depend on the old broken behavior: `$host'
2236# used to hold the argument of --host etc.
2237# FIXME: To remove some day.
2238build=$build_alias
2239host=$host_alias
2240target=$target_alias
2241
2242# FIXME: To remove some day.
2243if test "x$host_alias" != x; then
2244 if test "x$build_alias" = x; then
2245 cross_compiling=maybe
c971b7fa
PA
2246 elif test "x$build_alias" != "x$host_alias"; then
2247 cross_compiling=yes
2248 fi
2249fi
2250
2251ac_tool_prefix=
2252test -n "$host_alias" && ac_tool_prefix=$host_alias-
2253
2254test "$silent" = yes && exec 6>/dev/null
2255
2256
2257ac_pwd=`pwd` && test -n "$ac_pwd" &&
2258ac_ls_di=`ls -di .` &&
2259ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 2260 as_fn_error $? "working directory cannot be determined"
c971b7fa 2261test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 2262 as_fn_error $? "pwd does not report name of working directory"
c971b7fa
PA
2263
2264
2265# Find the source files, if location was not specified.
2266if test -z "$srcdir"; then
2267 ac_srcdir_defaulted=yes
2268 # Try the directory containing this script, then the parent directory.
2269 ac_confdir=`$as_dirname -- "$as_myself" ||
2270$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2271 X"$as_myself" : 'X\(//\)[^/]' \| \
2272 X"$as_myself" : 'X\(//\)$' \| \
2273 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2274$as_echo X"$as_myself" |
2275 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2276 s//\1/
2277 q
2278 }
2279 /^X\(\/\/\)[^/].*/{
2280 s//\1/
2281 q
2282 }
2283 /^X\(\/\/\)$/{
2284 s//\1/
2285 q
2286 }
2287 /^X\(\/\).*/{
2288 s//\1/
2289 q
2290 }
2291 s/.*/./; q'`
2292 srcdir=$ac_confdir
2293 if test ! -r "$srcdir/$ac_unique_file"; then
2294 srcdir=..
2295 fi
2296else
2297 ac_srcdir_defaulted=no
2298fi
2299if test ! -r "$srcdir/$ac_unique_file"; then
2300 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 2301 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
c971b7fa
PA
2302fi
2303ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2304ac_abs_confdir=`(
d0ac1c44 2305 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
c971b7fa
PA
2306 pwd)`
2307# When building in place, set srcdir=.
2308if test "$ac_abs_confdir" = "$ac_pwd"; then
2309 srcdir=.
2310fi
2311# Remove unnecessary trailing slashes from srcdir.
2312# Double slashes in file names in object file debugging info
2313# mess up M-x gdb in Emacs.
2314case $srcdir in
2315*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2316esac
2317for ac_var in $ac_precious_vars; do
2318 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2319 eval ac_env_${ac_var}_value=\$${ac_var}
2320 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2321 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2322done
2323
2324#
2325# Report the --help message.
2326#
2327if test "$ac_init_help" = "long"; then
2328 # Omit some internal or obsolete options to make the list less imposing.
2329 # This message is too long to be a string in the A/UX 3.1 sh.
2330 cat <<_ACEOF
d0ac1c44 2331\`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
c971b7fa
PA
2332
2333Usage: $0 [OPTION]... [VAR=VALUE]...
2334
2335To assign environment variables (e.g., CC, CFLAGS...), specify them as
2336VAR=VALUE. See below for descriptions of some of the useful variables.
2337
2338Defaults for the options are specified in brackets.
2339
2340Configuration:
2341 -h, --help display this help and exit
2342 --help=short display options specific to this package
2343 --help=recursive display the short help of all the included packages
2344 -V, --version display version information and exit
d0ac1c44 2345 -q, --quiet, --silent do not print \`checking ...' messages
c971b7fa
PA
2346 --cache-file=FILE cache test results in FILE [disabled]
2347 -C, --config-cache alias for \`--cache-file=config.cache'
2348 -n, --no-create do not create output files
2349 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2350
2351Installation directories:
2352 --prefix=PREFIX install architecture-independent files in PREFIX
2353 [$ac_default_prefix]
2354 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2355 [PREFIX]
2356
2357By default, \`make install' will install all the files in
2358\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2359an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2360for instance \`--prefix=\$HOME'.
2361
2362For better control, use the options below.
2363
2364Fine tuning of the installation directories:
2365 --bindir=DIR user executables [EPREFIX/bin]
2366 --sbindir=DIR system admin executables [EPREFIX/sbin]
2367 --libexecdir=DIR program executables [EPREFIX/libexec]
2368 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2369 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2370 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2371 --libdir=DIR object code libraries [EPREFIX/lib]
2372 --includedir=DIR C header files [PREFIX/include]
2373 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2374 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2375 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2376 --infodir=DIR info documentation [DATAROOTDIR/info]
2377 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2378 --mandir=DIR man documentation [DATAROOTDIR/man]
d0ac1c44 2379 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
c971b7fa
PA
2380 --htmldir=DIR html documentation [DOCDIR]
2381 --dvidir=DIR dvi documentation [DOCDIR]
2382 --pdfdir=DIR pdf documentation [DOCDIR]
2383 --psdir=DIR ps documentation [DOCDIR]
2384_ACEOF
2385
2386 cat <<\_ACEOF
2387
2388Program names:
2389 --program-prefix=PREFIX prepend PREFIX to installed program names
2390 --program-suffix=SUFFIX append SUFFIX to installed program names
2391 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2392
2393System types:
2394 --build=BUILD configure for building on BUILD [guessed]
2395 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2396 --target=TARGET configure for building compilers for TARGET [HOST]
2397_ACEOF
2398fi
2399
2400if test -n "$ac_init_help"; then
d0ac1c44
SM
2401 case $ac_init_help in
2402 short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
2403 esac
c971b7fa
PA
2404 cat <<\_ACEOF
2405
2406Optional Features:
2407 --disable-option-checking ignore unrecognized --enable/--with options
2408 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2409 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
2410 --enable-maintainer-mode
2411 enable make rules and dependencies not useful (and
2412 sometimes confusing) to the casual installer
2196f55f 2413 --disable-largefile omit support for large files
73cc7272 2414 --enable-plugins Enable support for plugins
d0ac1c44
SM
2415 --enable-dependency-tracking
2416 do not reject slow dependency extractors
2417 --disable-dependency-tracking
2418 speeds up one-time build
2419 --enable-silent-rules less verbose build output (undo: "make V=1")
2420 --disable-silent-rules verbose build output (undo: "make V=0")
c971b7fa
PA
2421
2422Some influential environment variables:
2423 CC C compiler command
2424 CFLAGS C compiler flags
2425 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2426 nonstandard directory <lib dir>
2427 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 2428 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
c971b7fa
PA
2429 you have headers in a nonstandard directory <include dir>
2430 CPP C preprocessor
2431
2432Use these variables to override the choices made by `configure' or to help
2433it to find libraries and programs with nonstandard names/locations.
2434
2435Report bugs to the package provider.
2436_ACEOF
2437ac_status=$?
2438fi
2439
2440if test "$ac_init_help" = "recursive"; then
2441 # If there are subdirs, report their specific --help.
2442 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2443 test -d "$ac_dir" ||
2444 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2445 continue
2446 ac_builddir=.
2447
2448case "$ac_dir" in
2449.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2450*)
2451 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2452 # A ".." for each directory in $ac_dir_suffix.
2453 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2454 case $ac_top_builddir_sub in
2455 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2456 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2457 esac ;;
2458esac
2459ac_abs_top_builddir=$ac_pwd
2460ac_abs_builddir=$ac_pwd$ac_dir_suffix
2461# for backward compatibility:
2462ac_top_builddir=$ac_top_build_prefix
2463
2464case $srcdir in
2465 .) # We are building in place.
2466 ac_srcdir=.
2467 ac_top_srcdir=$ac_top_builddir_sub
2468 ac_abs_top_srcdir=$ac_pwd ;;
2469 [\\/]* | ?:[\\/]* ) # Absolute name.
2470 ac_srcdir=$srcdir$ac_dir_suffix;
2471 ac_top_srcdir=$srcdir
2472 ac_abs_top_srcdir=$srcdir ;;
2473 *) # Relative name.
2474 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2475 ac_top_srcdir=$ac_top_build_prefix$srcdir
2476 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2477esac
2478ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2479
2480 cd "$ac_dir" || { ac_status=$?; continue; }
2481 # Check for guested configure.
2482 if test -f "$ac_srcdir/configure.gnu"; then
2483 echo &&
2484 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2485 elif test -f "$ac_srcdir/configure"; then
2486 echo &&
2487 $SHELL "$ac_srcdir/configure" --help=recursive
2488 else
2489 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2490 fi || ac_status=$?
2491 cd "$ac_pwd" || { ac_status=$?; break; }
2492 done
2493fi
2494
2495test -n "$ac_init_help" && exit $ac_status
2496if $ac_init_version; then
2497 cat <<\_ACEOF
d0ac1c44
SM
2498libgnu configure UNUSED-VERSION
2499generated by GNU Autoconf 2.69
c971b7fa 2500
d0ac1c44 2501Copyright (C) 2012 Free Software Foundation, Inc.
c971b7fa
PA
2502This configure script is free software; the Free Software Foundation
2503gives unlimited permission to copy, distribute and modify it.
2504_ACEOF
2505 exit
2506fi
2507
2508## ------------------------ ##
2509## Autoconf initialization. ##
2510## ------------------------ ##
2511
2512# ac_fn_c_try_compile LINENO
2513# --------------------------
2514# Try to compile conftest.$ac_ext, and return whether this succeeded.
2515ac_fn_c_try_compile ()
2516{
2517 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2518 rm -f conftest.$ac_objext
2519 if { { ac_try="$ac_compile"
2520case "(($ac_try" in
2521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2522 *) ac_try_echo=$ac_try;;
2523esac
2524eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2525$as_echo "$ac_try_echo"; } >&5
2526 (eval "$ac_compile") 2>conftest.err
2527 ac_status=$?
2528 if test -s conftest.err; then
2529 grep -v '^ *+' conftest.err >conftest.er1
2530 cat conftest.er1 >&5
2531 mv -f conftest.er1 conftest.err
2532 fi
2533 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2534 test $ac_status = 0; } && {
2535 test -z "$ac_c_werror_flag" ||
2536 test ! -s conftest.err
2537 } && test -s conftest.$ac_objext; then :
2538 ac_retval=0
2539else
2540 $as_echo "$as_me: failed program was:" >&5
2541sed 's/^/| /' conftest.$ac_ext >&5
2542
2543 ac_retval=1
2544fi
d0ac1c44
SM
2545 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2546 as_fn_set_status $ac_retval
c971b7fa
PA
2547
2548} # ac_fn_c_try_compile
2549
2550# ac_fn_c_try_cpp LINENO
2551# ----------------------
2552# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2553ac_fn_c_try_cpp ()
2554{
2555 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2556 if { { ac_try="$ac_cpp conftest.$ac_ext"
2557case "(($ac_try" in
2558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2559 *) ac_try_echo=$ac_try;;
2560esac
2561eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2562$as_echo "$ac_try_echo"; } >&5
2563 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2564 ac_status=$?
2565 if test -s conftest.err; then
2566 grep -v '^ *+' conftest.err >conftest.er1
2567 cat conftest.er1 >&5
2568 mv -f conftest.er1 conftest.err
2569 fi
2570 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 2571 test $ac_status = 0; } > conftest.i && {
c971b7fa
PA
2572 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2573 test ! -s conftest.err
2574 }; then :
2575 ac_retval=0
2576else
2577 $as_echo "$as_me: failed program was:" >&5
2578sed 's/^/| /' conftest.$ac_ext >&5
2579
2580 ac_retval=1
2581fi
d0ac1c44
SM
2582 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2583 as_fn_set_status $ac_retval
c971b7fa
PA
2584
2585} # ac_fn_c_try_cpp
2586
2587# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2588# -------------------------------------------------------
2589# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2590# the include files in INCLUDES and setting the cache variable VAR
2591# accordingly.
2592ac_fn_c_check_header_mongrel ()
2593{
2594 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 2595 if eval \${$3+:} false; then :
c971b7fa
PA
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2597$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2598if eval \${$3+:} false; then :
c971b7fa
PA
2599 $as_echo_n "(cached) " >&6
2600fi
2601eval ac_res=\$$3
2602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2603$as_echo "$ac_res" >&6; }
2604else
2605 # Is the header compilable?
2606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2607$as_echo_n "checking $2 usability... " >&6; }
2608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2609/* end confdefs.h. */
2610$4
2611#include <$2>
2612_ACEOF
2613if ac_fn_c_try_compile "$LINENO"; then :
2614 ac_header_compiler=yes
2615else
2616 ac_header_compiler=no
2617fi
2618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2620$as_echo "$ac_header_compiler" >&6; }
2621
2622# Is the header present?
2623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2624$as_echo_n "checking $2 presence... " >&6; }
2625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2626/* end confdefs.h. */
2627#include <$2>
2628_ACEOF
2629if ac_fn_c_try_cpp "$LINENO"; then :
2630 ac_header_preproc=yes
2631else
2632 ac_header_preproc=no
2633fi
d0ac1c44 2634rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
2635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2636$as_echo "$ac_header_preproc" >&6; }
2637
2638# So? What about this header?
2639case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2640 yes:no: )
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2642$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2644$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2645 ;;
2646 no:yes:* )
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2648$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2650$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2652$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2654$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2656$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2657 ;;
2658esac
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2660$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2661if eval \${$3+:} false; then :
c971b7fa
PA
2662 $as_echo_n "(cached) " >&6
2663else
2664 eval "$3=\$ac_header_compiler"
2665fi
2666eval ac_res=\$$3
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2668$as_echo "$ac_res" >&6; }
2669fi
d0ac1c44 2670 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c971b7fa
PA
2671
2672} # ac_fn_c_check_header_mongrel
2673
2674# ac_fn_c_try_run LINENO
2675# ----------------------
2676# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2677# that executables *can* be run.
2678ac_fn_c_try_run ()
2679{
2680 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2681 if { { ac_try="$ac_link"
2682case "(($ac_try" in
2683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2684 *) ac_try_echo=$ac_try;;
2685esac
2686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2687$as_echo "$ac_try_echo"; } >&5
2688 (eval "$ac_link") 2>&5
2689 ac_status=$?
2690 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2691 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2692 { { case "(($ac_try" in
2693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2694 *) ac_try_echo=$ac_try;;
2695esac
2696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2697$as_echo "$ac_try_echo"; } >&5
2698 (eval "$ac_try") 2>&5
2699 ac_status=$?
2700 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2701 test $ac_status = 0; }; }; then :
2702 ac_retval=0
2703else
2704 $as_echo "$as_me: program exited with status $ac_status" >&5
2705 $as_echo "$as_me: failed program was:" >&5
2706sed 's/^/| /' conftest.$ac_ext >&5
2707
2708 ac_retval=$ac_status
2709fi
2710 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2711 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2712 as_fn_set_status $ac_retval
c971b7fa
PA
2713
2714} # ac_fn_c_try_run
2715
2716# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2717# -------------------------------------------------------
2718# Tests whether HEADER exists and can be compiled using the include files in
2719# INCLUDES, setting the cache variable VAR accordingly.
2720ac_fn_c_check_header_compile ()
2721{
2722 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2724$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2725if eval \${$3+:} false; then :
c971b7fa
PA
2726 $as_echo_n "(cached) " >&6
2727else
2728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2729/* end confdefs.h. */
2730$4
2731#include <$2>
2732_ACEOF
2733if ac_fn_c_try_compile "$LINENO"; then :
2734 eval "$3=yes"
2735else
2736 eval "$3=no"
2737fi
2738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2739fi
2740eval ac_res=\$$3
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2742$as_echo "$ac_res" >&6; }
d0ac1c44 2743 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c971b7fa
PA
2744
2745} # ac_fn_c_check_header_compile
2746
73cc7272
TT
2747# ac_fn_c_try_link LINENO
2748# -----------------------
2749# Try to link conftest.$ac_ext, and return whether this succeeded.
2750ac_fn_c_try_link ()
2751{
2752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2753 rm -f conftest.$ac_objext conftest$ac_exeext
2754 if { { ac_try="$ac_link"
2755case "(($ac_try" in
2756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2757 *) ac_try_echo=$ac_try;;
2758esac
2759eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2760$as_echo "$ac_try_echo"; } >&5
2761 (eval "$ac_link") 2>conftest.err
2762 ac_status=$?
2763 if test -s conftest.err; then
2764 grep -v '^ *+' conftest.err >conftest.er1
2765 cat conftest.er1 >&5
2766 mv -f conftest.er1 conftest.err
2767 fi
2768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2769 test $ac_status = 0; } && {
2770 test -z "$ac_c_werror_flag" ||
2771 test ! -s conftest.err
2772 } && test -s conftest$ac_exeext && {
2773 test "$cross_compiling" = yes ||
2774 test -x conftest$ac_exeext
2775 }; then :
2776 ac_retval=0
2777else
2778 $as_echo "$as_me: failed program was:" >&5
2779sed 's/^/| /' conftest.$ac_ext >&5
2780
2781 ac_retval=1
2782fi
2783 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2784 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2785 # interfere with the next link command; also delete a directory that is
2786 # left behind by Apple's compiler. We do this before executing the actions.
2787 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2788 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2789 as_fn_set_status $ac_retval
2790
2791} # ac_fn_c_try_link
2792
d0ac1c44
SM
2793# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2794# -------------------------------------------
2795# Tests whether TYPE exists after having included INCLUDES, setting cache
2796# variable VAR accordingly.
2797ac_fn_c_check_type ()
2798{
2799 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2801$as_echo_n "checking for $2... " >&6; }
2802if eval \${$3+:} false; then :
2803 $as_echo_n "(cached) " >&6
2804else
2805 eval "$3=no"
2806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2807/* end confdefs.h. */
2808$4
2809int
2810main ()
2811{
2812if (sizeof ($2))
2813 return 0;
2814 ;
2815 return 0;
2816}
2817_ACEOF
2818if ac_fn_c_try_compile "$LINENO"; then :
2819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2820/* end confdefs.h. */
2821$4
2822int
2823main ()
2824{
2825if (sizeof (($2)))
2826 return 0;
2827 ;
2828 return 0;
2829}
2830_ACEOF
2831if ac_fn_c_try_compile "$LINENO"; then :
2832
2833else
2834 eval "$3=yes"
2835fi
2836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2837fi
2838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2839fi
2840eval ac_res=\$$3
2841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2842$as_echo "$ac_res" >&6; }
2843 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2844
2845} # ac_fn_c_check_type
2846
8690e634
JK
2847# ac_fn_c_check_func LINENO FUNC VAR
2848# ----------------------------------
2849# Tests whether FUNC exists, setting the cache variable VAR accordingly
2850ac_fn_c_check_func ()
2851{
2852 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2854$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2855if eval \${$3+:} false; then :
8690e634
JK
2856 $as_echo_n "(cached) " >&6
2857else
2858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2859/* end confdefs.h. */
2860/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2861 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2862#define $2 innocuous_$2
2863
2864/* System header to define __stub macros and hopefully few prototypes,
2865 which can conflict with char $2 (); below.
2866 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2867 <limits.h> exists even on freestanding compilers. */
2868
2869#ifdef __STDC__
2870# include <limits.h>
2871#else
2872# include <assert.h>
2873#endif
2874
2875#undef $2
2876
2877/* Override any GCC internal prototype to avoid an error.
2878 Use char because int might match the return type of a GCC
2879 builtin and then its argument prototype would still apply. */
2880#ifdef __cplusplus
2881extern "C"
2882#endif
2883char $2 ();
2884/* The GNU C library defines this for functions which it implements
2885 to always fail with ENOSYS. Some functions are actually named
2886 something starting with __ and the normal name is an alias. */
2887#if defined __stub_$2 || defined __stub___$2
2888choke me
2889#endif
2890
2891int
2892main ()
2893{
2894return $2 ();
2895 ;
2896 return 0;
2897}
2898_ACEOF
2899if ac_fn_c_try_link "$LINENO"; then :
2900 eval "$3=yes"
2901else
2902 eval "$3=no"
2903fi
2904rm -f core conftest.err conftest.$ac_objext \
2905 conftest$ac_exeext conftest.$ac_ext
2906fi
2907eval ac_res=\$$3
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2909$as_echo "$ac_res" >&6; }
d0ac1c44 2910 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
8690e634
JK
2911
2912} # ac_fn_c_check_func
2913
d0ac1c44
SM
2914# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2915# ---------------------------------------------
2916# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2917# accordingly.
8986e351
TT
2918ac_fn_c_check_decl ()
2919{
2920 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44
SM
2921 as_decl_name=`echo $2|sed 's/ *(.*//'`
2922 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2924$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2925if eval \${$3+:} false; then :
8986e351
TT
2926 $as_echo_n "(cached) " >&6
2927else
2928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2929/* end confdefs.h. */
2930$4
2931int
2932main ()
2933{
d0ac1c44
SM
2934#ifndef $as_decl_name
2935#ifdef __cplusplus
2936 (void) $as_decl_use;
2937#else
2938 (void) $as_decl_name;
2939#endif
8986e351
TT
2940#endif
2941
2942 ;
2943 return 0;
2944}
2945_ACEOF
2946if ac_fn_c_try_compile "$LINENO"; then :
2947 eval "$3=yes"
2948else
2949 eval "$3=no"
2950fi
2951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2952fi
2953eval ac_res=\$$3
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2955$as_echo "$ac_res" >&6; }
d0ac1c44 2956 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
8986e351
TT
2957
2958} # ac_fn_c_check_decl
2959
c971b7fa
PA
2960# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2961# --------------------------------------------
2962# Tries to find the compile-time value of EXPR in a program that includes
2963# INCLUDES, setting VAR accordingly. Returns whether the value could be
2964# computed
2965ac_fn_c_compute_int ()
2966{
2967 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2968 if test "$cross_compiling" = yes; then
2969 # Depending upon the size, compute the lo and hi bounds.
2970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2971/* end confdefs.h. */
2972$4
2973int
2974main ()
2975{
2976static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2977test_array [0] = 0;
2978return test_array [0];
c971b7fa
PA
2979
2980 ;
2981 return 0;
2982}
2983_ACEOF
2984if ac_fn_c_try_compile "$LINENO"; then :
2985 ac_lo=0 ac_mid=0
2986 while :; do
2987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2988/* end confdefs.h. */
2989$4
2990int
2991main ()
2992{
2993static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2994test_array [0] = 0;
2995return test_array [0];
c971b7fa
PA
2996
2997 ;
2998 return 0;
2999}
3000_ACEOF
3001if ac_fn_c_try_compile "$LINENO"; then :
3002 ac_hi=$ac_mid; break
3003else
3004 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3005 if test $ac_lo -le $ac_mid; then
3006 ac_lo= ac_hi=
3007 break
3008 fi
3009 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3010fi
3011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3012 done
3013else
3014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3015/* end confdefs.h. */
3016$4
3017int
3018main ()
3019{
3020static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
3021test_array [0] = 0;
3022return test_array [0];
c971b7fa
PA
3023
3024 ;
3025 return 0;
3026}
3027_ACEOF
3028if ac_fn_c_try_compile "$LINENO"; then :
3029 ac_hi=-1 ac_mid=-1
3030 while :; do
3031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3032/* end confdefs.h. */
3033$4
3034int
3035main ()
3036{
3037static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
3038test_array [0] = 0;
3039return test_array [0];
c971b7fa
PA
3040
3041 ;
3042 return 0;
3043}
3044_ACEOF
3045if ac_fn_c_try_compile "$LINENO"; then :
3046 ac_lo=$ac_mid; break
3047else
3048 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3049 if test $ac_mid -le $ac_hi; then
3050 ac_lo= ac_hi=
3051 break
3052 fi
3053 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3054fi
3055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3056 done
3057else
3058 ac_lo= ac_hi=
3059fi
3060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3061fi
3062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3063# Binary search between lo and hi bounds.
3064while test "x$ac_lo" != "x$ac_hi"; do
3065 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3067/* end confdefs.h. */
3068$4
3069int
3070main ()
3071{
3072static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
3073test_array [0] = 0;
3074return test_array [0];
c971b7fa
PA
3075
3076 ;
3077 return 0;
3078}
3079_ACEOF
3080if ac_fn_c_try_compile "$LINENO"; then :
3081 ac_hi=$ac_mid
3082else
3083 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3084fi
3085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3086done
3087case $ac_lo in #((
3088?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3089'') ac_retval=1 ;;
3090esac
3091 else
3092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3093/* end confdefs.h. */
3094$4
3095static long int longval () { return $2; }
3096static unsigned long int ulongval () { return $2; }
3097#include <stdio.h>
3098#include <stdlib.h>
3099int
3100main ()
3101{
3102
3103 FILE *f = fopen ("conftest.val", "w");
3104 if (! f)
3105 return 1;
3106 if (($2) < 0)
3107 {
3108 long int i = longval ();
3109 if (i != ($2))
3110 return 1;
3111 fprintf (f, "%ld", i);
3112 }
3113 else
3114 {
3115 unsigned long int i = ulongval ();
3116 if (i != ($2))
3117 return 1;
3118 fprintf (f, "%lu", i);
3119 }
3120 /* Do not output a trailing newline, as this causes \r\n confusion
3121 on some platforms. */
3122 return ferror (f) || fclose (f) != 0;
3123
3124 ;
3125 return 0;
3126}
3127_ACEOF
3128if ac_fn_c_try_run "$LINENO"; then :
3129 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3130else
3131 ac_retval=1
3132fi
3133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3134 conftest.$ac_objext conftest.beam conftest.$ac_ext
3135rm -f conftest.val
3136
3137 fi
d0ac1c44
SM
3138 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3139 as_fn_set_status $ac_retval
c971b7fa
PA
3140
3141} # ac_fn_c_compute_int
725e2999
JB
3142
3143# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3144# ----------------------------------------------------
3145# Tries to find if the field MEMBER exists in type AGGR, after including
3146# INCLUDES, setting cache variable VAR accordingly.
3147ac_fn_c_check_member ()
3148{
3149 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3151$as_echo_n "checking for $2.$3... " >&6; }
3152if eval \${$4+:} false; then :
3153 $as_echo_n "(cached) " >&6
3154else
3155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3156/* end confdefs.h. */
3157$5
3158int
3159main ()
3160{
3161static $2 ac_aggr;
3162if (ac_aggr.$3)
3163return 0;
3164 ;
3165 return 0;
3166}
3167_ACEOF
3168if ac_fn_c_try_compile "$LINENO"; then :
3169 eval "$4=yes"
3170else
3171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3172/* end confdefs.h. */
3173$5
3174int
3175main ()
3176{
3177static $2 ac_aggr;
3178if (sizeof ac_aggr.$3)
3179return 0;
3180 ;
3181 return 0;
3182}
3183_ACEOF
3184if ac_fn_c_try_compile "$LINENO"; then :
3185 eval "$4=yes"
3186else
3187 eval "$4=no"
3188fi
3189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3190fi
3191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3192fi
3193eval ac_res=\$$4
3194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3195$as_echo "$ac_res" >&6; }
3196 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3197
3198} # ac_fn_c_check_member
c971b7fa
PA
3199cat >config.log <<_ACEOF
3200This file contains any messages produced by compilers while
3201running configure, to aid debugging if configure makes a mistake.
3202
d0ac1c44
SM
3203It was created by libgnu $as_me UNUSED-VERSION, which was
3204generated by GNU Autoconf 2.69. Invocation command line was
c971b7fa
PA
3205
3206 $ $0 $@
3207
3208_ACEOF
3209exec 5>>config.log
3210{
3211cat <<_ASUNAME
3212## --------- ##
3213## Platform. ##
3214## --------- ##
3215
3216hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3217uname -m = `(uname -m) 2>/dev/null || echo unknown`
3218uname -r = `(uname -r) 2>/dev/null || echo unknown`
3219uname -s = `(uname -s) 2>/dev/null || echo unknown`
3220uname -v = `(uname -v) 2>/dev/null || echo unknown`
3221
3222/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3223/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3224
3225/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3226/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3227/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3228/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3229/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3230/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3231/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3232
3233_ASUNAME
3234
3235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3236for as_dir in $PATH
3237do
3238 IFS=$as_save_IFS
3239 test -z "$as_dir" && as_dir=.
3240 $as_echo "PATH: $as_dir"
3241 done
3242IFS=$as_save_IFS
3243
3244} >&5
3245
3246cat >&5 <<_ACEOF
3247
3248
3249## ----------- ##
3250## Core tests. ##
3251## ----------- ##
3252
3253_ACEOF
3254
3255
3256# Keep a trace of the command line.
3257# Strip out --no-create and --no-recursion so they do not pile up.
3258# Strip out --silent because we don't want to record it for future runs.
3259# Also quote any args containing shell meta-characters.
3260# Make two passes to allow for proper duplicate-argument suppression.
3261ac_configure_args=
3262ac_configure_args0=
3263ac_configure_args1=
3264ac_must_keep_next=false
3265for ac_pass in 1 2
3266do
3267 for ac_arg
3268 do
3269 case $ac_arg in
3270 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3271 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3272 | -silent | --silent | --silen | --sile | --sil)
3273 continue ;;
3274 *\'*)
3275 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3276 esac
3277 case $ac_pass in
3278 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3279 2)
3280 as_fn_append ac_configure_args1 " '$ac_arg'"
3281 if test $ac_must_keep_next = true; then
3282 ac_must_keep_next=false # Got value, back to normal.
3283 else
3284 case $ac_arg in
3285 *=* | --config-cache | -C | -disable-* | --disable-* \
3286 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3287 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3288 | -with-* | --with-* | -without-* | --without-* | --x)
3289 case "$ac_configure_args0 " in
3290 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3291 esac
3292 ;;
3293 -* ) ac_must_keep_next=true ;;
3294 esac
3295 fi
3296 as_fn_append ac_configure_args " '$ac_arg'"
3297 ;;
3298 esac
3299 done
3300done
3301{ ac_configure_args0=; unset ac_configure_args0;}
3302{ ac_configure_args1=; unset ac_configure_args1;}
3303
3304# When interrupted or exit'd, cleanup temporary files, and complete
3305# config.log. We remove comments because anyway the quotes in there
3306# would cause problems or look ugly.
3307# WARNING: Use '\'' to represent an apostrophe within the trap.
3308# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3309trap 'exit_status=$?
3310 # Save into config.log some information that might help in debugging.
3311 {
3312 echo
3313
d0ac1c44 3314 $as_echo "## ---------------- ##
c971b7fa 3315## Cache variables. ##
d0ac1c44 3316## ---------------- ##"
c971b7fa
PA
3317 echo
3318 # The following way of writing the cache mishandles newlines in values,
3319(
3320 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3321 eval ac_val=\$$ac_var
3322 case $ac_val in #(
3323 *${as_nl}*)
3324 case $ac_var in #(
3325 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3326$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3327 esac
3328 case $ac_var in #(
3329 _ | IFS | as_nl) ;; #(
3330 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3331 *) { eval $ac_var=; unset $ac_var;} ;;
3332 esac ;;
3333 esac
3334 done
3335 (set) 2>&1 |
3336 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3337 *${as_nl}ac_space=\ *)
3338 sed -n \
3339 "s/'\''/'\''\\\\'\'''\''/g;
3340 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3341 ;; #(
3342 *)
3343 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3344 ;;
3345 esac |
3346 sort
3347)
3348 echo
3349
d0ac1c44 3350 $as_echo "## ----------------- ##
c971b7fa 3351## Output variables. ##
d0ac1c44 3352## ----------------- ##"
c971b7fa
PA
3353 echo
3354 for ac_var in $ac_subst_vars
3355 do
3356 eval ac_val=\$$ac_var
3357 case $ac_val in
3358 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3359 esac
3360 $as_echo "$ac_var='\''$ac_val'\''"
3361 done | sort
3362 echo
3363
3364 if test -n "$ac_subst_files"; then
d0ac1c44 3365 $as_echo "## ------------------- ##
c971b7fa 3366## File substitutions. ##
d0ac1c44 3367## ------------------- ##"
c971b7fa
PA
3368 echo
3369 for ac_var in $ac_subst_files
3370 do
3371 eval ac_val=\$$ac_var
3372 case $ac_val in
3373 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3374 esac
3375 $as_echo "$ac_var='\''$ac_val'\''"
3376 done | sort
3377 echo
3378 fi
3379
3380 if test -s confdefs.h; then
d0ac1c44 3381 $as_echo "## ----------- ##
c971b7fa 3382## confdefs.h. ##
d0ac1c44 3383## ----------- ##"
c971b7fa
PA
3384 echo
3385 cat confdefs.h
3386 echo
3387 fi
3388 test "$ac_signal" != 0 &&
3389 $as_echo "$as_me: caught signal $ac_signal"
3390 $as_echo "$as_me: exit $exit_status"
3391 } >&5
3392 rm -f core *.core core.conftest.* &&
3393 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3394 exit $exit_status
3395' 0
3396for ac_signal in 1 2 13 15; do
3397 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3398done
3399ac_signal=0
3400
3401# confdefs.h avoids OS command line length limits that DEFS can exceed.
3402rm -f -r conftest* confdefs.h
3403
3404$as_echo "/* confdefs.h */" > confdefs.h
3405
3406# Predefined preprocessor variables.
3407
3408cat >>confdefs.h <<_ACEOF
3409#define PACKAGE_NAME "$PACKAGE_NAME"
3410_ACEOF
3411
3412cat >>confdefs.h <<_ACEOF
3413#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3414_ACEOF
3415
3416cat >>confdefs.h <<_ACEOF
3417#define PACKAGE_VERSION "$PACKAGE_VERSION"
3418_ACEOF
3419
3420cat >>confdefs.h <<_ACEOF
3421#define PACKAGE_STRING "$PACKAGE_STRING"
3422_ACEOF
3423
3424cat >>confdefs.h <<_ACEOF
3425#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3426_ACEOF
3427
3428cat >>confdefs.h <<_ACEOF
3429#define PACKAGE_URL "$PACKAGE_URL"
3430_ACEOF
3431
3432
3433# Let the site file select an alternate cache file if it wants to.
3434# Prefer an explicitly selected file to automatically selected ones.
3435ac_site_file1=NONE
3436ac_site_file2=NONE
3437if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
3438 # We do not want a PATH search for config.site.
3439 case $CONFIG_SITE in #((
3440 -*) ac_site_file1=./$CONFIG_SITE;;
3441 */*) ac_site_file1=$CONFIG_SITE;;
3442 *) ac_site_file1=./$CONFIG_SITE;;
3443 esac
c971b7fa
PA
3444elif test "x$prefix" != xNONE; then
3445 ac_site_file1=$prefix/share/config.site
3446 ac_site_file2=$prefix/etc/config.site
3447else
3448 ac_site_file1=$ac_default_prefix/share/config.site
3449 ac_site_file2=$ac_default_prefix/etc/config.site
3450fi
3451for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3452do
3453 test "x$ac_site_file" = xNONE && continue
d0ac1c44 3454 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
c971b7fa
PA
3455 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3456$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3457 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
3458 . "$ac_site_file" \
3459 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3460$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3461as_fn_error $? "failed to load site script $ac_site_file
3462See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
3463 fi
3464done
3465
3466if test -r "$cache_file"; then
d0ac1c44
SM
3467 # Some versions of bash will fail to source /dev/null (special files
3468 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3469 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
c971b7fa
PA
3470 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3471$as_echo "$as_me: loading cache $cache_file" >&6;}
3472 case $cache_file in
3473 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3474 *) . "./$cache_file";;
3475 esac
3476 fi
3477else
3478 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3479$as_echo "$as_me: creating cache $cache_file" >&6;}
3480 >$cache_file
3481fi
3482
725e2999
JB
3483gl_header_list="$gl_header_list arpa/inet.h"
3484gl_header_list="$gl_header_list features.h"
472fa5ee
SM
3485gl_func_list="$gl_func_list canonicalize_file_name"
3486gl_func_list="$gl_func_list getcwd"
3487gl_func_list="$gl_func_list readlink"
3488gl_func_list="$gl_func_list realpath"
3489gl_header_list="$gl_header_list sys/param.h"
3490gl_header_list="$gl_header_list unistd.h"
3491gl_func_list="$gl_func_list _set_invalid_parameter_handler"
3492gl_header_list="$gl_header_list sys/socket.h"
3493gl_func_list="$gl_func_list fchdir"
3494gl_header_list="$gl_header_list dirent.h"
3495gl_func_list="$gl_func_list fcntl"
3496gl_func_list="$gl_func_list symlink"
3497gl_func_list="$gl_func_list fdopendir"
3498gl_func_list="$gl_func_list mempcpy"
3499gl_func_list="$gl_func_list btowc"
3500gl_func_list="$gl_func_list isblank"
3501gl_func_list="$gl_func_list iswctype"
3502gl_func_list="$gl_func_list mbsrtowcs"
3503gl_func_list="$gl_func_list wmemchr"
3504gl_func_list="$gl_func_list wmemcpy"
3505gl_func_list="$gl_func_list wmempcpy"
3506gl_header_list="$gl_header_list wctype.h"
8690e634 3507gl_fnmatch_required=GNU
472fa5ee
SM
3508gl_header_list="$gl_header_list sys/stat.h"
3509gl_func_list="$gl_func_list fstatat"
3510gl_func_list="$gl_func_list getdtablesize"
3511gl_func_list="$gl_func_list getlogin_r"
3512gl_func_list="$gl_func_list getprogname"
3513gl_func_list="$gl_func_list getexecname"
3514gl_header_list="$gl_header_list sys/time.h"
3515gl_func_list="$gl_func_list gettimeofday"
5e8754f9 3516gl_header_list="$gl_header_list sys/cdefs.h"
472fa5ee 3517gl_func_list="$gl_func_list getpwnam_r"
725e2999
JB
3518gl_header_list="$gl_header_list netdb.h"
3519gl_header_list="$gl_header_list netinet/in.h"
472fa5ee
SM
3520gl_header_list="$gl_header_list limits.h"
3521gl_header_list="$gl_header_list wchar.h"
3522gl_header_list="$gl_header_list stdint.h"
3523gl_header_list="$gl_header_list inttypes.h"
3524gl_func_list="$gl_func_list lstat"
3525gl_header_list="$gl_header_list math.h"
3526gl_func_list="$gl_func_list mbsinit"
3527gl_func_list="$gl_func_list mbrtowc"
3528gl_header_list="$gl_header_list sys/mman.h"
3529gl_func_list="$gl_func_list mprotect"
b3279b60 3530gl_func_list="$gl_func_list mkostemp"
472fa5ee
SM
3531gl_func_list="$gl_func_list openat"
3532gl_func_list="$gl_func_list link"
5e8754f9
SDJ
3533gl_func_list="$gl_func_list secure_getenv"
3534gl_func_list="$gl_func_list getuid"
3535gl_func_list="$gl_func_list geteuid"
3536gl_func_list="$gl_func_list getgid"
3537gl_func_list="$gl_func_list getegid"
472fa5ee
SM
3538gl_func_list="$gl_func_list setenv"
3539gl_func_list="$gl_func_list strdup"
725e2999 3540gl_header_list="$gl_header_list sys/uio.h"
472fa5ee 3541gl_func_list="$gl_func_list pipe"
472fa5ee 3542gl_func_list="$gl_func_list iswcntrl"
c971b7fa
PA
3543# Check that the precious variables saved in the cache have kept the same
3544# value.
3545ac_cache_corrupted=false
3546for ac_var in $ac_precious_vars; do
3547 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3548 eval ac_new_set=\$ac_env_${ac_var}_set
3549 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3550 eval ac_new_val=\$ac_env_${ac_var}_value
3551 case $ac_old_set,$ac_new_set in
3552 set,)
3553 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3554$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3555 ac_cache_corrupted=: ;;
3556 ,set)
3557 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3558$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3559 ac_cache_corrupted=: ;;
3560 ,);;
3561 *)
3562 if test "x$ac_old_val" != "x$ac_new_val"; then
3563 # differences in whitespace do not lead to failure.
3564 ac_old_val_w=`echo x $ac_old_val`
3565 ac_new_val_w=`echo x $ac_new_val`
3566 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3568$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3569 ac_cache_corrupted=:
3570 else
3571 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3572$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3573 eval $ac_var=\$ac_old_val
3574 fi
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3576$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3578$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3579 fi;;
3580 esac
3581 # Pass precious variables to config.status.
3582 if test "$ac_new_set" = set; then
3583 case $ac_new_val in
3584 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3585 *) ac_arg=$ac_var=$ac_new_val ;;
3586 esac
3587 case " $ac_configure_args " in
3588 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3589 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3590 esac
3591 fi
3592done
3593if $ac_cache_corrupted; then
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3597$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 3598 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
c971b7fa
PA
3599fi
3600## -------------------- ##
3601## Main body of script. ##
3602## -------------------- ##
3603
3604ac_ext=c
3605ac_cpp='$CPP $CPPFLAGS'
3606ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3607ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3608ac_compiler_gnu=$ac_cv_c_compiler_gnu
3609
3610
d0ac1c44 3611
73cc7272
TT
3612
3613
3614
c971b7fa
PA
3615ac_config_headers="$ac_config_headers config.h:config.in"
3616
3617
3618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3619$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3620 # Check whether --enable-maintainer-mode was given.
3621if test "${enable_maintainer_mode+set}" = set; then :
3622 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3623else
3624 USE_MAINTAINER_MODE=no
3625fi
3626
3627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3628$as_echo "$USE_MAINTAINER_MODE" >&6; }
3629 if test $USE_MAINTAINER_MODE = yes; then
3630 MAINTAINER_MODE_TRUE=
3631 MAINTAINER_MODE_FALSE='#'
3632else
3633 MAINTAINER_MODE_TRUE='#'
3634 MAINTAINER_MODE_FALSE=
3635fi
3636
3637 MAINT=$MAINTAINER_MODE_TRUE
3638
3639
3640
3641ac_ext=c
3642ac_cpp='$CPP $CPPFLAGS'
3643ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3644ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3645ac_compiler_gnu=$ac_cv_c_compiler_gnu
3646if test -n "$ac_tool_prefix"; then
3647 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3648set dummy ${ac_tool_prefix}gcc; ac_word=$2
3649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3650$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3651if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3652 $as_echo_n "(cached) " >&6
3653else
3654 if test -n "$CC"; then
3655 ac_cv_prog_CC="$CC" # Let the user override the test.
3656else
3657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3658for as_dir in $PATH
3659do
3660 IFS=$as_save_IFS
3661 test -z "$as_dir" && as_dir=.
3662 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3663 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3664 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3666 break 2
3667 fi
3668done
3669 done
3670IFS=$as_save_IFS
3671
3672fi
3673fi
3674CC=$ac_cv_prog_CC
3675if test -n "$CC"; then
3676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3677$as_echo "$CC" >&6; }
3678else
3679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3680$as_echo "no" >&6; }
3681fi
3682
3683
3684fi
3685if test -z "$ac_cv_prog_CC"; then
3686 ac_ct_CC=$CC
3687 # Extract the first word of "gcc", so it can be a program name with args.
3688set dummy gcc; ac_word=$2
3689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3690$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3691if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
3692 $as_echo_n "(cached) " >&6
3693else
3694 if test -n "$ac_ct_CC"; then
3695 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3696else
3697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3698for as_dir in $PATH
3699do
3700 IFS=$as_save_IFS
3701 test -z "$as_dir" && as_dir=.
3702 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3704 ac_cv_prog_ac_ct_CC="gcc"
3705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3706 break 2
3707 fi
3708done
3709 done
3710IFS=$as_save_IFS
3711
3712fi
3713fi
3714ac_ct_CC=$ac_cv_prog_ac_ct_CC
3715if test -n "$ac_ct_CC"; then
3716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3717$as_echo "$ac_ct_CC" >&6; }
3718else
3719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3720$as_echo "no" >&6; }
3721fi
3722
3723 if test "x$ac_ct_CC" = x; then
3724 CC=""
3725 else
3726 case $cross_compiling:$ac_tool_warned in
3727yes:)
3728{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3729$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3730ac_tool_warned=yes ;;
3731esac
3732 CC=$ac_ct_CC
3733 fi
3734else
3735 CC="$ac_cv_prog_CC"
3736fi
3737
3738if test -z "$CC"; then
3739 if test -n "$ac_tool_prefix"; then
3740 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3741set dummy ${ac_tool_prefix}cc; ac_word=$2
3742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3743$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3744if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3745 $as_echo_n "(cached) " >&6
3746else
3747 if test -n "$CC"; then
3748 ac_cv_prog_CC="$CC" # Let the user override the test.
3749else
3750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3751for as_dir in $PATH
3752do
3753 IFS=$as_save_IFS
3754 test -z "$as_dir" && as_dir=.
3755 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3757 ac_cv_prog_CC="${ac_tool_prefix}cc"
3758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3759 break 2
3760 fi
3761done
3762 done
3763IFS=$as_save_IFS
3764
3765fi
3766fi
3767CC=$ac_cv_prog_CC
3768if test -n "$CC"; then
3769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3770$as_echo "$CC" >&6; }
3771else
3772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3773$as_echo "no" >&6; }
3774fi
3775
3776
3777 fi
3778fi
3779if test -z "$CC"; then
3780 # Extract the first word of "cc", so it can be a program name with args.
3781set dummy cc; ac_word=$2
3782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3783$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3784if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3785 $as_echo_n "(cached) " >&6
3786else
3787 if test -n "$CC"; then
3788 ac_cv_prog_CC="$CC" # Let the user override the test.
3789else
3790 ac_prog_rejected=no
3791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3792for as_dir in $PATH
3793do
3794 IFS=$as_save_IFS
3795 test -z "$as_dir" && as_dir=.
3796 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3798 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3799 ac_prog_rejected=yes
3800 continue
3801 fi
3802 ac_cv_prog_CC="cc"
3803 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3804 break 2
3805 fi
3806done
3807 done
3808IFS=$as_save_IFS
3809
3810if test $ac_prog_rejected = yes; then
3811 # We found a bogon in the path, so make sure we never use it.
3812 set dummy $ac_cv_prog_CC
3813 shift
3814 if test $# != 0; then
3815 # We chose a different compiler from the bogus one.
3816 # However, it has the same basename, so the bogon will be chosen
3817 # first if we set CC to just the basename; use the full file name.
3818 shift
3819 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3820 fi
3821fi
3822fi
3823fi
3824CC=$ac_cv_prog_CC
3825if test -n "$CC"; then
3826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3827$as_echo "$CC" >&6; }
3828else
3829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3830$as_echo "no" >&6; }
3831fi
3832
3833
3834fi
3835if test -z "$CC"; then
3836 if test -n "$ac_tool_prefix"; then
3837 for ac_prog in cl.exe
3838 do
3839 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3840set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3842$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3843if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3844 $as_echo_n "(cached) " >&6
3845else
3846 if test -n "$CC"; then
3847 ac_cv_prog_CC="$CC" # Let the user override the test.
3848else
3849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3850for as_dir in $PATH
3851do
3852 IFS=$as_save_IFS
3853 test -z "$as_dir" && as_dir=.
3854 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3856 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3858 break 2
3859 fi
3860done
3861 done
3862IFS=$as_save_IFS
3863
3864fi
3865fi
3866CC=$ac_cv_prog_CC
3867if test -n "$CC"; then
3868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3869$as_echo "$CC" >&6; }
3870else
3871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3872$as_echo "no" >&6; }
3873fi
3874
3875
3876 test -n "$CC" && break
3877 done
3878fi
3879if test -z "$CC"; then
3880 ac_ct_CC=$CC
3881 for ac_prog in cl.exe
3882do
3883 # Extract the first word of "$ac_prog", so it can be a program name with args.
3884set dummy $ac_prog; ac_word=$2
3885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3886$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3887if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
3888 $as_echo_n "(cached) " >&6
3889else
3890 if test -n "$ac_ct_CC"; then
3891 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3892else
3893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3894for as_dir in $PATH
3895do
3896 IFS=$as_save_IFS
3897 test -z "$as_dir" && as_dir=.
3898 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3899 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3900 ac_cv_prog_ac_ct_CC="$ac_prog"
3901 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3902 break 2
3903 fi
3904done
3905 done
3906IFS=$as_save_IFS
3907
3908fi
3909fi
3910ac_ct_CC=$ac_cv_prog_ac_ct_CC
3911if test -n "$ac_ct_CC"; then
3912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3913$as_echo "$ac_ct_CC" >&6; }
3914else
3915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3916$as_echo "no" >&6; }
3917fi
3918
3919
3920 test -n "$ac_ct_CC" && break
3921done
3922
3923 if test "x$ac_ct_CC" = x; then
3924 CC=""
3925 else
3926 case $cross_compiling:$ac_tool_warned in
3927yes:)
3928{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3929$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3930ac_tool_warned=yes ;;
3931esac
3932 CC=$ac_ct_CC
3933 fi
3934fi
3935
3936fi
3937
3938
3939test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3940$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3941as_fn_error $? "no acceptable C compiler found in \$PATH
3942See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
3943
3944# Provide some information about the compiler.
3945$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3946set X $ac_compile
3947ac_compiler=$2
5e8754f9 3948for ac_option in --version -v -V -qversion; do
c971b7fa
PA
3949 { { ac_try="$ac_compiler $ac_option >&5"
3950case "(($ac_try" in
3951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3952 *) ac_try_echo=$ac_try;;
3953esac
3954eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3955$as_echo "$ac_try_echo"; } >&5
3956 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3957 ac_status=$?
3958 if test -s conftest.err; then
3959 sed '10a\
3960... rest of stderr output deleted ...
3961 10q' conftest.err >conftest.er1
3962 cat conftest.er1 >&5
c971b7fa 3963 fi
d0ac1c44 3964 rm -f conftest.er1 conftest.err
c971b7fa
PA
3965 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3966 test $ac_status = 0; }
3967done
3968
3969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3970/* end confdefs.h. */
d0ac1c44 3971
c971b7fa
PA
3972int
3973main ()
3974{
c971b7fa
PA
3975
3976 ;
3977 return 0;
3978}
3979_ACEOF
3980ac_clean_files_save=$ac_clean_files
d0ac1c44 3981ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
c971b7fa
PA
3982# Try to create an executable without -o first, disregard a.out.
3983# It will help us diagnose broken compilers, and finding out an intuition
3984# of exeext.
d0ac1c44
SM
3985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3986$as_echo_n "checking whether the C compiler works... " >&6; }
c971b7fa
PA
3987ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3988
3989# The possible output files:
3990ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3991
3992ac_rmfiles=
3993for ac_file in $ac_files
3994do
3995 case $ac_file in
3996 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3997 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3998 esac
3999done
4000rm -f $ac_rmfiles
4001
4002if { { ac_try="$ac_link_default"
4003case "(($ac_try" in
4004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4005 *) ac_try_echo=$ac_try;;
4006esac
4007eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4008$as_echo "$ac_try_echo"; } >&5
4009 (eval "$ac_link_default") 2>&5
4010 ac_status=$?
4011 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4012 test $ac_status = 0; }; then :
4013 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4014# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4015# in a Makefile. We should not override ac_cv_exeext if it was cached,
4016# so that the user can short-circuit this test for compilers unknown to
4017# Autoconf.
4018for ac_file in $ac_files ''
4019do
4020 test -f "$ac_file" || continue
4021 case $ac_file in
4022 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4023 ;;
4024 [ab].out )
4025 # We found the default executable, but exeext='' is most
4026 # certainly right.
4027 break;;
4028 *.* )
4029 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4030 then :; else
4031 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4032 fi
4033 # We set ac_cv_exeext here because the later test for it is not
4034 # safe: cross compilers may not add the suffix if given an `-o'
4035 # argument, so we may need to know it at that point already.
4036 # Even if this section looks crufty: it has the advantage of
4037 # actually working.
4038 break;;
4039 * )
4040 break;;
4041 esac
4042done
4043test "$ac_cv_exeext" = no && ac_cv_exeext=
4044
4045else
4046 ac_file=''
4047fi
c971b7fa 4048if test -z "$ac_file"; then :
d0ac1c44
SM
4049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4050$as_echo "no" >&6; }
4051$as_echo "$as_me: failed program was:" >&5
c971b7fa
PA
4052sed 's/^/| /' conftest.$ac_ext >&5
4053
4054{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4055$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4056as_fn_error 77 "C compiler cannot create executables
4057See \`config.log' for more details" "$LINENO" 5; }
4058else
4059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4060$as_echo "yes" >&6; }
c971b7fa 4061fi
d0ac1c44
SM
4062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4063$as_echo_n "checking for C compiler default output file name... " >&6; }
4064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4065$as_echo "$ac_file" >&6; }
c971b7fa
PA
4066ac_exeext=$ac_cv_exeext
4067
d0ac1c44 4068rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
c971b7fa 4069ac_clean_files=$ac_clean_files_save
c971b7fa
PA
4070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4071$as_echo_n "checking for suffix of executables... " >&6; }
4072if { { ac_try="$ac_link"
4073case "(($ac_try" in
4074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4075 *) ac_try_echo=$ac_try;;
4076esac
4077eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4078$as_echo "$ac_try_echo"; } >&5
4079 (eval "$ac_link") 2>&5
4080 ac_status=$?
4081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4082 test $ac_status = 0; }; then :
4083 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4084# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4085# work properly (i.e., refer to `conftest.exe'), while it won't with
4086# `rm'.
4087for ac_file in conftest.exe conftest conftest.*; do
4088 test -f "$ac_file" || continue
4089 case $ac_file in
4090 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4091 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4092 break;;
4093 * ) break;;
4094 esac
4095done
4096else
4097 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4098$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4099as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4100See \`config.log' for more details" "$LINENO" 5; }
c971b7fa 4101fi
d0ac1c44 4102rm -f conftest conftest$ac_cv_exeext
c971b7fa
PA
4103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4104$as_echo "$ac_cv_exeext" >&6; }
4105
4106rm -f conftest.$ac_ext
4107EXEEXT=$ac_cv_exeext
4108ac_exeext=$EXEEXT
d0ac1c44
SM
4109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4110/* end confdefs.h. */
4111#include <stdio.h>
4112int
4113main ()
4114{
4115FILE *f = fopen ("conftest.out", "w");
4116 return ferror (f) || fclose (f) != 0;
4117
4118 ;
4119 return 0;
4120}
4121_ACEOF
4122ac_clean_files="$ac_clean_files conftest.out"
4123# Check that the compiler produces executables we can run. If not, either
4124# the compiler is broken, or we cross compile.
4125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4126$as_echo_n "checking whether we are cross compiling... " >&6; }
4127if test "$cross_compiling" != yes; then
4128 { { ac_try="$ac_link"
4129case "(($ac_try" in
4130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4131 *) ac_try_echo=$ac_try;;
4132esac
4133eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4134$as_echo "$ac_try_echo"; } >&5
4135 (eval "$ac_link") 2>&5
4136 ac_status=$?
4137 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4138 test $ac_status = 0; }
4139 if { ac_try='./conftest$ac_cv_exeext'
4140 { { case "(($ac_try" in
4141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4142 *) ac_try_echo=$ac_try;;
4143esac
4144eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4145$as_echo "$ac_try_echo"; } >&5
4146 (eval "$ac_try") 2>&5
4147 ac_status=$?
4148 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4149 test $ac_status = 0; }; }; then
4150 cross_compiling=no
4151 else
4152 if test "$cross_compiling" = maybe; then
4153 cross_compiling=yes
4154 else
4155 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4156$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4157as_fn_error $? "cannot run C compiled programs.
4158If you meant to cross compile, use \`--host'.
4159See \`config.log' for more details" "$LINENO" 5; }
4160 fi
4161 fi
4162fi
4163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4164$as_echo "$cross_compiling" >&6; }
4165
4166rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4167ac_clean_files=$ac_clean_files_save
c971b7fa
PA
4168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4169$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 4170if ${ac_cv_objext+:} false; then :
c971b7fa
PA
4171 $as_echo_n "(cached) " >&6
4172else
4173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4174/* end confdefs.h. */
4175
4176int
4177main ()
4178{
4179
4180 ;
4181 return 0;
4182}
4183_ACEOF
4184rm -f conftest.o conftest.obj
4185if { { ac_try="$ac_compile"
4186case "(($ac_try" in
4187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4188 *) ac_try_echo=$ac_try;;
4189esac
4190eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4191$as_echo "$ac_try_echo"; } >&5
4192 (eval "$ac_compile") 2>&5
4193 ac_status=$?
4194 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4195 test $ac_status = 0; }; then :
4196 for ac_file in conftest.o conftest.obj conftest.*; do
4197 test -f "$ac_file" || continue;
4198 case $ac_file in
4199 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4200 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4201 break;;
4202 esac
4203done
4204else
4205 $as_echo "$as_me: failed program was:" >&5
4206sed 's/^/| /' conftest.$ac_ext >&5
4207
4208{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4209$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4210as_fn_error $? "cannot compute suffix of object files: cannot compile
4211See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
4212fi
4213rm -f conftest.$ac_cv_objext conftest.$ac_ext
4214fi
4215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4216$as_echo "$ac_cv_objext" >&6; }
4217OBJEXT=$ac_cv_objext
4218ac_objext=$OBJEXT
4219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4220$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 4221if ${ac_cv_c_compiler_gnu+:} false; then :
c971b7fa
PA
4222 $as_echo_n "(cached) " >&6
4223else
4224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4225/* end confdefs.h. */
4226
4227int
4228main ()
4229{
4230#ifndef __GNUC__
4231 choke me
4232#endif
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
4238if ac_fn_c_try_compile "$LINENO"; then :
4239 ac_compiler_gnu=yes
4240else
4241 ac_compiler_gnu=no
4242fi
4243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4244ac_cv_c_compiler_gnu=$ac_compiler_gnu
4245
4246fi
4247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4248$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4249if test $ac_compiler_gnu = yes; then
4250 GCC=yes
4251else
4252 GCC=
4253fi
4254ac_test_CFLAGS=${CFLAGS+set}
4255ac_save_CFLAGS=$CFLAGS
4256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4257$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 4258if ${ac_cv_prog_cc_g+:} false; then :
c971b7fa
PA
4259 $as_echo_n "(cached) " >&6
4260else
4261 ac_save_c_werror_flag=$ac_c_werror_flag
4262 ac_c_werror_flag=yes
4263 ac_cv_prog_cc_g=no
4264 CFLAGS="-g"
4265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4266/* end confdefs.h. */
4267
4268int
4269main ()
4270{
4271
4272 ;
4273 return 0;
4274}
4275_ACEOF
4276if ac_fn_c_try_compile "$LINENO"; then :
4277 ac_cv_prog_cc_g=yes
4278else
4279 CFLAGS=""
4280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4281/* end confdefs.h. */
4282
4283int
4284main ()
4285{
4286
4287 ;
4288 return 0;
4289}
4290_ACEOF
4291if ac_fn_c_try_compile "$LINENO"; then :
4292
4293else
4294 ac_c_werror_flag=$ac_save_c_werror_flag
4295 CFLAGS="-g"
4296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4297/* end confdefs.h. */
4298
4299int
4300main ()
4301{
4302
4303 ;
4304 return 0;
4305}
4306_ACEOF
4307if ac_fn_c_try_compile "$LINENO"; then :
4308 ac_cv_prog_cc_g=yes
4309fi
4310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4311fi
4312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4313fi
4314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4315 ac_c_werror_flag=$ac_save_c_werror_flag
4316fi
4317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4318$as_echo "$ac_cv_prog_cc_g" >&6; }
4319if test "$ac_test_CFLAGS" = set; then
4320 CFLAGS=$ac_save_CFLAGS
4321elif test $ac_cv_prog_cc_g = yes; then
4322 if test "$GCC" = yes; then
4323 CFLAGS="-g -O2"
4324 else
4325 CFLAGS="-g"
4326 fi
4327else
4328 if test "$GCC" = yes; then
4329 CFLAGS="-O2"
4330 else
4331 CFLAGS=
4332 fi
4333fi
5e8754f9
SDJ
4334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4335$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4336if ${ac_cv_prog_cc_c89+:} false; then :
c971b7fa
PA
4337 $as_echo_n "(cached) " >&6
4338else
5e8754f9 4339 ac_cv_prog_cc_c89=no
c971b7fa
PA
4340ac_save_CC=$CC
4341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4342/* end confdefs.h. */
4343#include <stdarg.h>
4344#include <stdio.h>
5e8754f9
SDJ
4345struct stat;
4346/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4347struct buf { int x; };
4348FILE * (*rcsopen) (struct buf *, struct stat *, int);
4349static char *e (p, i)
4350 char **p;
4351 int i;
7a6dbc2f 4352{
5e8754f9 4353 return p[i];
c971b7fa 4354}
5e8754f9 4355static char *f (char * (*g) (char **, int), char **p, ...)
7a6dbc2f 4356{
5e8754f9
SDJ
4357 char *s;
4358 va_list v;
4359 va_start (v,p);
4360 s = g (p, va_arg (v,int));
4361 va_end (v);
4362 return s;
7a6dbc2f 4363}
7a6dbc2f 4364
5e8754f9
SDJ
4365/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4366 function prototypes and stuff, but not '\xHH' hex character constants.
4367 These don't provoke an error unfortunately, instead are silently treated
4368 as 'x'. The following induces an error, until -std is added to get
4369 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4370 array size at least. It's necessary to write '\x00'==0 to get something
4371 that's true only with -std. */
4372int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7a6dbc2f 4373
5e8754f9
SDJ
4374/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4375 inside strings and character constants. */
4376#define FOO(x) 'x'
4377int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
c971b7fa 4378
5e8754f9
SDJ
4379int test (int i, double x);
4380struct s1 {int (*f) (int a);};
4381struct s2 {int (*f) (double a);};
4382int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4383int argc;
4384char **argv;
c971b7fa
PA
4385int
4386main ()
4387{
5e8754f9 4388return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
c971b7fa
PA
4389 ;
4390 return 0;
4391}
4392_ACEOF
5e8754f9
SDJ
4393for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4394 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c971b7fa
PA
4395do
4396 CC="$ac_save_CC $ac_arg"
4397 if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 4398 ac_cv_prog_cc_c89=$ac_arg
c971b7fa
PA
4399fi
4400rm -f core conftest.err conftest.$ac_objext
5e8754f9 4401 test "x$ac_cv_prog_cc_c89" != "xno" && break
c971b7fa
PA
4402done
4403rm -f conftest.$ac_ext
4404CC=$ac_save_CC
4405
4406fi
4407# AC_CACHE_VAL
5e8754f9 4408case "x$ac_cv_prog_cc_c89" in
c971b7fa
PA
4409 x)
4410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4411$as_echo "none needed" >&6; } ;;
4412 xno)
4413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4414$as_echo "unsupported" >&6; } ;;
4415 *)
5e8754f9
SDJ
4416 CC="$CC $ac_cv_prog_cc_c89"
4417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4418$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c971b7fa 4419esac
5e8754f9 4420if test "x$ac_cv_prog_cc_c89" != xno; then :
7a6dbc2f 4421
5e8754f9 4422fi
7a6dbc2f 4423
5e8754f9
SDJ
4424ac_ext=c
4425ac_cpp='$CPP $CPPFLAGS'
4426ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4427ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4428ac_compiler_gnu=$ac_cv_c_compiler_gnu
7a6dbc2f 4429
5e8754f9
SDJ
4430ac_aux_dir=
4431for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4432 if test -f "$ac_dir/install-sh"; then
4433 ac_aux_dir=$ac_dir
4434 ac_install_sh="$ac_aux_dir/install-sh -c"
4435 break
4436 elif test -f "$ac_dir/install.sh"; then
4437 ac_aux_dir=$ac_dir
4438 ac_install_sh="$ac_aux_dir/install.sh -c"
4439 break
4440 elif test -f "$ac_dir/shtool"; then
4441 ac_aux_dir=$ac_dir
4442 ac_install_sh="$ac_aux_dir/shtool install -c"
4443 break
4444 fi
4445done
4446if test -z "$ac_aux_dir"; then
4447 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4448fi
7a6dbc2f 4449
5e8754f9
SDJ
4450# These three variables are undocumented and unsupported,
4451# and are intended to be withdrawn in a future Autoconf release.
4452# They can cause serious problems if a builder's source tree is in a directory
4453# whose full name contains unusual characters.
4454ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4455ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4456ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
7a6dbc2f 4457
7a6dbc2f 4458
5e8754f9
SDJ
4459# Expand $ac_aux_dir to an absolute path.
4460am_aux_dir=`cd "$ac_aux_dir" && pwd`
7a6dbc2f 4461
5e8754f9
SDJ
4462ac_ext=c
4463ac_cpp='$CPP $CPPFLAGS'
4464ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4465ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4466ac_compiler_gnu=$ac_cv_c_compiler_gnu
4467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4468$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4469if ${am_cv_prog_cc_c_o+:} false; then :
d0ac1c44
SM
4470 $as_echo_n "(cached) " >&6
4471else
5e8754f9 4472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d0ac1c44
SM
4473/* end confdefs.h. */
4474
4475int
4476main ()
4477{
5e8754f9 4478
d0ac1c44
SM
4479 ;
4480 return 0;
4481}
4482_ACEOF
5e8754f9
SDJ
4483 # Make sure it works both with $CC and with simple cc.
4484 # Following AC_PROG_CC_C_O, we do the test twice because some
4485 # compilers refuse to overwrite an existing .o file with -o,
4486 # though they will create one.
4487 am_cv_prog_cc_c_o=yes
4488 for am_i in 1 2; do
4489 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4490 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4491 ac_status=$?
4492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4493 (exit $ac_status); } \
4494 && test -f conftest2.$ac_objext; then
4495 : OK
4496 else
4497 am_cv_prog_cc_c_o=no
4498 break
4499 fi
4500 done
4501 rm -f core conftest*
4502 unset am_i
4503fi
4504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4505$as_echo "$am_cv_prog_cc_c_o" >&6; }
4506if test "$am_cv_prog_cc_c_o" != yes; then
4507 # Losing compiler, so override with the script.
4508 # FIXME: It is wrong to rewrite CC.
4509 # But if we don't then we get into trouble of one sort or another.
4510 # A longer-term fix would be to have automake use am__CC in this case,
4511 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4512 CC="$am_aux_dir/compile $CC"
7a6dbc2f 4513fi
d0ac1c44
SM
4514ac_ext=c
4515ac_cpp='$CPP $CPPFLAGS'
4516ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4517ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4518ac_compiler_gnu=$ac_cv_c_compiler_gnu
4519
4520
5e8754f9 4521
c971b7fa
PA
4522ac_ext=c
4523ac_cpp='$CPP $CPPFLAGS'
4524ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4525ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4526ac_compiler_gnu=$ac_cv_c_compiler_gnu
4527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4528$as_echo_n "checking how to run the C preprocessor... " >&6; }
4529# On Suns, sometimes $CPP names a directory.
4530if test -n "$CPP" && test -d "$CPP"; then
4531 CPP=
4532fi
4533if test -z "$CPP"; then
d0ac1c44 4534 if ${ac_cv_prog_CPP+:} false; then :
c971b7fa
PA
4535 $as_echo_n "(cached) " >&6
4536else
4537 # Double quotes because CPP needs to be expanded
4538 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4539 do
4540 ac_preproc_ok=false
4541for ac_c_preproc_warn_flag in '' yes
4542do
4543 # Use a header file that comes with gcc, so configuring glibc
4544 # with a fresh cross-compiler works.
4545 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4546 # <limits.h> exists even on freestanding compilers.
4547 # On the NeXT, cc -E runs the code through the compiler's parser,
4548 # not just through cpp. "Syntax error" is here to catch this case.
4549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4550/* end confdefs.h. */
4551#ifdef __STDC__
4552# include <limits.h>
4553#else
4554# include <assert.h>
4555#endif
4556 Syntax error
4557_ACEOF
4558if ac_fn_c_try_cpp "$LINENO"; then :
4559
4560else
4561 # Broken: fails on valid input.
4562continue
4563fi
d0ac1c44 4564rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4565
4566 # OK, works on sane cases. Now check whether nonexistent headers
4567 # can be detected and how.
4568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4569/* end confdefs.h. */
4570#include <ac_nonexistent.h>
4571_ACEOF
4572if ac_fn_c_try_cpp "$LINENO"; then :
4573 # Broken: success on invalid input.
4574continue
4575else
4576 # Passes both tests.
4577ac_preproc_ok=:
4578break
4579fi
d0ac1c44 4580rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4581
4582done
4583# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4584rm -f conftest.i conftest.err conftest.$ac_ext
c971b7fa
PA
4585if $ac_preproc_ok; then :
4586 break
4587fi
4588
4589 done
4590 ac_cv_prog_CPP=$CPP
4591
4592fi
4593 CPP=$ac_cv_prog_CPP
4594else
4595 ac_cv_prog_CPP=$CPP
4596fi
4597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4598$as_echo "$CPP" >&6; }
4599ac_preproc_ok=false
4600for ac_c_preproc_warn_flag in '' yes
4601do
4602 # Use a header file that comes with gcc, so configuring glibc
4603 # with a fresh cross-compiler works.
4604 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4605 # <limits.h> exists even on freestanding compilers.
4606 # On the NeXT, cc -E runs the code through the compiler's parser,
4607 # not just through cpp. "Syntax error" is here to catch this case.
4608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4609/* end confdefs.h. */
4610#ifdef __STDC__
4611# include <limits.h>
4612#else
4613# include <assert.h>
4614#endif
4615 Syntax error
4616_ACEOF
4617if ac_fn_c_try_cpp "$LINENO"; then :
4618
4619else
4620 # Broken: fails on valid input.
4621continue
4622fi
d0ac1c44 4623rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4624
4625 # OK, works on sane cases. Now check whether nonexistent headers
4626 # can be detected and how.
4627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4628/* end confdefs.h. */
4629#include <ac_nonexistent.h>
4630_ACEOF
4631if ac_fn_c_try_cpp "$LINENO"; then :
4632 # Broken: success on invalid input.
4633continue
4634else
4635 # Passes both tests.
4636ac_preproc_ok=:
4637break
4638fi
d0ac1c44 4639rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4640
4641done
4642# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4643rm -f conftest.i conftest.err conftest.$ac_ext
c971b7fa
PA
4644if $ac_preproc_ok; then :
4645
4646else
4647 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4648$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4649as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4650See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
4651fi
4652
4653ac_ext=c
4654ac_cpp='$CPP $CPPFLAGS'
4655ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4656ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4657ac_compiler_gnu=$ac_cv_c_compiler_gnu
4658
4659
4660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4661$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4662if ${ac_cv_path_GREP+:} false; then :
c971b7fa
PA
4663 $as_echo_n "(cached) " >&6
4664else
4665 if test -z "$GREP"; then
4666 ac_path_GREP_found=false
4667 # Loop through the user's path and test for each of PROGNAME-LIST
4668 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4669for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4670do
4671 IFS=$as_save_IFS
4672 test -z "$as_dir" && as_dir=.
4673 for ac_prog in grep ggrep; do
4674 for ac_exec_ext in '' $ac_executable_extensions; do
4675 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4676 as_fn_executable_p "$ac_path_GREP" || continue
c971b7fa
PA
4677# Check for GNU ac_path_GREP and select it if it is found.
4678 # Check for GNU $ac_path_GREP
4679case `"$ac_path_GREP" --version 2>&1` in
4680*GNU*)
4681 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4682*)
4683 ac_count=0
4684 $as_echo_n 0123456789 >"conftest.in"
4685 while :
4686 do
4687 cat "conftest.in" "conftest.in" >"conftest.tmp"
4688 mv "conftest.tmp" "conftest.in"
4689 cp "conftest.in" "conftest.nl"
4690 $as_echo 'GREP' >> "conftest.nl"
4691 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4692 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4693 as_fn_arith $ac_count + 1 && ac_count=$as_val
4694 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4695 # Best one so far, save it but keep looking for a better one
4696 ac_cv_path_GREP="$ac_path_GREP"
4697 ac_path_GREP_max=$ac_count
4698 fi
4699 # 10*(2^10) chars as input seems more than enough
4700 test $ac_count -gt 10 && break
4701 done
4702 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4703esac
4704
4705 $ac_path_GREP_found && break 3
4706 done
4707 done
4708 done
4709IFS=$as_save_IFS
4710 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4711 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
c971b7fa
PA
4712 fi
4713else
4714 ac_cv_path_GREP=$GREP
4715fi
4716
4717fi
4718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4719$as_echo "$ac_cv_path_GREP" >&6; }
4720 GREP="$ac_cv_path_GREP"
4721
4722
4723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4724$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4725if ${ac_cv_path_EGREP+:} false; then :
c971b7fa
PA
4726 $as_echo_n "(cached) " >&6
4727else
4728 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4729 then ac_cv_path_EGREP="$GREP -E"
4730 else
4731 if test -z "$EGREP"; then
4732 ac_path_EGREP_found=false
4733 # Loop through the user's path and test for each of PROGNAME-LIST
4734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4735for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4736do
4737 IFS=$as_save_IFS
4738 test -z "$as_dir" && as_dir=.
4739 for ac_prog in egrep; do
4740 for ac_exec_ext in '' $ac_executable_extensions; do
4741 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4742 as_fn_executable_p "$ac_path_EGREP" || continue
c971b7fa
PA
4743# Check for GNU ac_path_EGREP and select it if it is found.
4744 # Check for GNU $ac_path_EGREP
4745case `"$ac_path_EGREP" --version 2>&1` in
4746*GNU*)
4747 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4748*)
4749 ac_count=0
4750 $as_echo_n 0123456789 >"conftest.in"
4751 while :
4752 do
4753 cat "conftest.in" "conftest.in" >"conftest.tmp"
4754 mv "conftest.tmp" "conftest.in"
4755 cp "conftest.in" "conftest.nl"
4756 $as_echo 'EGREP' >> "conftest.nl"
4757 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4758 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4759 as_fn_arith $ac_count + 1 && ac_count=$as_val
4760 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4761 # Best one so far, save it but keep looking for a better one
4762 ac_cv_path_EGREP="$ac_path_EGREP"
4763 ac_path_EGREP_max=$ac_count
4764 fi
4765 # 10*(2^10) chars as input seems more than enough
4766 test $ac_count -gt 10 && break
4767 done
4768 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4769esac
4770
4771 $ac_path_EGREP_found && break 3
4772 done
4773 done
4774 done
4775IFS=$as_save_IFS
4776 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4777 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
c971b7fa
PA
4778 fi
4779else
4780 ac_cv_path_EGREP=$EGREP
4781fi
4782
4783 fi
4784fi
4785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4786$as_echo "$ac_cv_path_EGREP" >&6; }
4787 EGREP="$ac_cv_path_EGREP"
4788
4789
4790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4791$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4792if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
4793 $as_echo_n "(cached) " >&6
4794else
4795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4796/* end confdefs.h. */
4797#include <stdlib.h>
4798#include <stdarg.h>
4799#include <string.h>
4800#include <float.h>
4801
4802int
4803main ()
4804{
4805
4806 ;
4807 return 0;
4808}
4809_ACEOF
4810if ac_fn_c_try_compile "$LINENO"; then :
4811 ac_cv_header_stdc=yes
4812else
4813 ac_cv_header_stdc=no
4814fi
4815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4816
4817if test $ac_cv_header_stdc = yes; then
4818 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4820/* end confdefs.h. */
4821#include <string.h>
4822
4823_ACEOF
4824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4825 $EGREP "memchr" >/dev/null 2>&1; then :
4826
4827else
4828 ac_cv_header_stdc=no
4829fi
4830rm -f conftest*
4831
4832fi
4833
4834if test $ac_cv_header_stdc = yes; then
4835 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4837/* end confdefs.h. */
4838#include <stdlib.h>
4839
4840_ACEOF
4841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4842 $EGREP "free" >/dev/null 2>&1; then :
4843
4844else
4845 ac_cv_header_stdc=no
4846fi
4847rm -f conftest*
4848
4849fi
4850
4851if test $ac_cv_header_stdc = yes; then
4852 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4853 if test "$cross_compiling" = yes; then :
4854 :
4855else
4856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4857/* end confdefs.h. */
4858#include <ctype.h>
4859#include <stdlib.h>
4860#if ((' ' & 0x0FF) == 0x020)
4861# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4862# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4863#else
4864# define ISLOWER(c) \
4865 (('a' <= (c) && (c) <= 'i') \
4866 || ('j' <= (c) && (c) <= 'r') \
4867 || ('s' <= (c) && (c) <= 'z'))
4868# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4869#endif
4870
4871#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4872int
4873main ()
4874{
4875 int i;
4876 for (i = 0; i < 256; i++)
4877 if (XOR (islower (i), ISLOWER (i))
4878 || toupper (i) != TOUPPER (i))
4879 return 2;
4880 return 0;
4881}
4882_ACEOF
4883if ac_fn_c_try_run "$LINENO"; then :
4884
4885else
4886 ac_cv_header_stdc=no
4887fi
4888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4889 conftest.$ac_objext conftest.beam conftest.$ac_ext
4890fi
4891
4892fi
4893fi
4894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4895$as_echo "$ac_cv_header_stdc" >&6; }
4896if test $ac_cv_header_stdc = yes; then
4897
4898$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4899
4900fi
4901
4902# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4903for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4904 inttypes.h stdint.h unistd.h
4905do :
4906 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4907ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4908"
d0ac1c44 4909if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c971b7fa
PA
4910 cat >>confdefs.h <<_ACEOF
4911#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4912_ACEOF
4913
4914fi
4915
4916done
4917
4918
4919
c971b7fa 4920 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4921if test "x$ac_cv_header_minix_config_h" = xyes; then :
c971b7fa
PA
4922 MINIX=yes
4923else
4924 MINIX=
4925fi
4926
4927
4928 if test "$MINIX" = yes; then
4929
4930$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4931
4932
4933$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4934
4935
4936$as_echo "#define _MINIX 1" >>confdefs.h
4937
c971b7fa 4938
4a626d0a 4939$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
c971b7fa 4940
4a626d0a 4941 fi
c971b7fa
PA
4942
4943
4944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4945$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4946if ${ac_cv_safe_to_define___extensions__+:} false; then :
c971b7fa
PA
4947 $as_echo_n "(cached) " >&6
4948else
4949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4950/* end confdefs.h. */
4951
4952# define __EXTENSIONS__ 1
4953 $ac_includes_default
4954int
4955main ()
4956{
4957
4958 ;
4959 return 0;
4960}
4961_ACEOF
4962if ac_fn_c_try_compile "$LINENO"; then :
4963 ac_cv_safe_to_define___extensions__=yes
4964else
4965 ac_cv_safe_to_define___extensions__=no
4966fi
4967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4968fi
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4970$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4971 test $ac_cv_safe_to_define___extensions__ = yes &&
4972 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4973
4974 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4975
4976 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4977
4978 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4979
4980 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4981
49e4877c
PA
4982 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4983
4984 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4985
4986 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4987
4988 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4989
4990 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4991
4992 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4993
4994 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4995
c971b7fa
PA
4996 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4997
4a626d0a
PA
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4999$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
d0ac1c44 5000if ${ac_cv_should_define__xopen_source+:} false; then :
4a626d0a
PA
5001 $as_echo_n "(cached) " >&6
5002else
5003 ac_cv_should_define__xopen_source=no
5004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5005/* end confdefs.h. */
5006
5007 #include <wchar.h>
5008 mbstate_t x;
5009int
5010main ()
5011{
5012
5013 ;
5014 return 0;
5015}
5016_ACEOF
5017if ac_fn_c_try_compile "$LINENO"; then :
5018
5019else
5020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5021/* end confdefs.h. */
5022
5023 #define _XOPEN_SOURCE 500
5024 #include <wchar.h>
5025 mbstate_t x;
5026int
5027main ()
5028{
5029
5030 ;
5031 return 0;
5032}
5033_ACEOF
5034if ac_fn_c_try_compile "$LINENO"; then :
5035 ac_cv_should_define__xopen_source=yes
5036fi
d0ac1c44
SM
5037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5038fi
5039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5040fi
5041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5042$as_echo "$ac_cv_should_define__xopen_source" >&6; }
5043 test $ac_cv_should_define__xopen_source = yes &&
5044 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5057$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5058if ${gl_cv_c_amsterdam_compiler+:} false; then :
5059 $as_echo_n "(cached) " >&6
5060else
5061
5062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5063/* end confdefs.h. */
5064
5065#ifdef __ACK__
5066Amsterdam
5067#endif
5068
5069_ACEOF
5070if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5071 $EGREP "Amsterdam" >/dev/null 2>&1; then :
5072 gl_cv_c_amsterdam_compiler=yes
5073else
5074 gl_cv_c_amsterdam_compiler=no
5075fi
5076rm -f conftest*
5077
5078
5079fi
5080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5081$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5082
5083 if test $gl_cv_c_amsterdam_compiler = yes; then
5084 if test -z "$AR"; then
5085 AR='cc -c.a'
5086 fi
5087 if test -z "$ARFLAGS"; then
5088 ARFLAGS='-o'
5089 fi
5090 else
5e8754f9
SDJ
5091 if test -n "$ac_tool_prefix"; then
5092 for ac_prog in ar lib "link -lib"
5093 do
5094 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5095set dummy $ac_tool_prefix$ac_prog; ac_word=$2
d0ac1c44
SM
5096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5097$as_echo_n "checking for $ac_word... " >&6; }
5098if ${ac_cv_prog_AR+:} false; then :
5099 $as_echo_n "(cached) " >&6
5100else
5101 if test -n "$AR"; then
5102 ac_cv_prog_AR="$AR" # Let the user override the test.
5103else
5104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5105for as_dir in $PATH
5106do
5107 IFS=$as_save_IFS
5108 test -z "$as_dir" && as_dir=.
5109 for ac_exec_ext in '' $ac_executable_extensions; do
5110 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5e8754f9 5111 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
d0ac1c44
SM
5112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5113 break 2
5114 fi
5115done
5116 done
5117IFS=$as_save_IFS
5118
5119fi
4a626d0a 5120fi
d0ac1c44
SM
5121AR=$ac_cv_prog_AR
5122if test -n "$AR"; then
5123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5124$as_echo "$AR" >&6; }
5125else
5126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5127$as_echo "no" >&6; }
4a626d0a 5128fi
c971b7fa 5129
49e4877c 5130
5e8754f9
SDJ
5131 test -n "$AR" && break
5132 done
d0ac1c44 5133fi
5e8754f9 5134if test -z "$AR"; then
d0ac1c44 5135 ac_ct_AR=$AR
5e8754f9
SDJ
5136 for ac_prog in ar lib "link -lib"
5137do
5138 # Extract the first word of "$ac_prog", so it can be a program name with args.
5139set dummy $ac_prog; ac_word=$2
d0ac1c44
SM
5140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5141$as_echo_n "checking for $ac_word... " >&6; }
5142if ${ac_cv_prog_ac_ct_AR+:} false; then :
5143 $as_echo_n "(cached) " >&6
5144else
5145 if test -n "$ac_ct_AR"; then
5146 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5147else
5148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5149for as_dir in $PATH
5150do
5151 IFS=$as_save_IFS
5152 test -z "$as_dir" && as_dir=.
5153 for ac_exec_ext in '' $ac_executable_extensions; do
5154 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5e8754f9 5155 ac_cv_prog_ac_ct_AR="$ac_prog"
d0ac1c44
SM
5156 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5157 break 2
5158 fi
5159done
5160 done
5161IFS=$as_save_IFS
49e4877c 5162
d0ac1c44
SM
5163fi
5164fi
5165ac_ct_AR=$ac_cv_prog_ac_ct_AR
5166if test -n "$ac_ct_AR"; then
5167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5168$as_echo "$ac_ct_AR" >&6; }
5169else
5170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5171$as_echo "no" >&6; }
5172fi
49e4877c 5173
5e8754f9
SDJ
5174
5175 test -n "$ac_ct_AR" && break
5176done
5177
d0ac1c44 5178 if test "x$ac_ct_AR" = x; then
5e8754f9 5179 AR="false"
d0ac1c44
SM
5180 else
5181 case $cross_compiling:$ac_tool_warned in
5182yes:)
5183{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5184$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5185ac_tool_warned=yes ;;
5186esac
5187 AR=$ac_ct_AR
5188 fi
d0ac1c44 5189fi
c971b7fa 5190
5e8754f9 5191: ${AR=ar}
c971b7fa 5192
5e8754f9
SDJ
5193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
5194$as_echo_n "checking the archiver ($AR) interface... " >&6; }
5195if ${am_cv_ar_interface+:} false; then :
c971b7fa
PA
5196 $as_echo_n "(cached) " >&6
5197else
5e8754f9
SDJ
5198 ac_ext=c
5199ac_cpp='$CPP $CPPFLAGS'
5200ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5201ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5202ac_compiler_gnu=$ac_cv_c_compiler_gnu
5203
5204 am_cv_ar_interface=ar
5205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5206/* end confdefs.h. */
5207int some_variable = 0;
5208_ACEOF
5209if ac_fn_c_try_compile "$LINENO"; then :
5210 am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
5211 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5212 (eval $am_ar_try) 2>&5
5213 ac_status=$?
5214 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5215 test $ac_status = 0; }
5216 if test "$ac_status" -eq 0; then
5217 am_cv_ar_interface=ar
5218 else
5219 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
5220 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5221 (eval $am_ar_try) 2>&5
5222 ac_status=$?
5223 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5224 test $ac_status = 0; }
5225 if test "$ac_status" -eq 0; then
5226 am_cv_ar_interface=lib
5227 else
5228 am_cv_ar_interface=unknown
5229 fi
5230 fi
5231 rm -f conftest.lib libconftest.a
5232
5233fi
5234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5235 ac_ext=c
5236ac_cpp='$CPP $CPPFLAGS'
5237ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5238ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5239ac_compiler_gnu=$ac_cv_c_compiler_gnu
5240
5241fi
5242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
5243$as_echo "$am_cv_ar_interface" >&6; }
5244
5245case $am_cv_ar_interface in
5246ar)
5247 ;;
5248lib)
5249 # Microsoft lib, so override with the ar-lib wrapper script.
5250 # FIXME: It is wrong to rewrite AR.
5251 # But if we don't then we get into trouble of one sort or another.
5252 # A longer-term fix would be to have automake use am__AR in this case,
5253 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
5254 # similar.
5255 AR="$am_aux_dir/ar-lib $AR"
5256 ;;
5257unknown)
5258 as_fn_error $? "could not determine $AR interface" "$LINENO" 5
5259 ;;
5260esac
5261
5262 fi
5263
5264 if test -n "$ac_tool_prefix"; then
5265 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5266set dummy ${ac_tool_prefix}ar; ac_word=$2
5267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5268$as_echo_n "checking for $ac_word... " >&6; }
5269if ${ac_cv_prog_AR+:} false; then :
5270 $as_echo_n "(cached) " >&6
5271else
5272 if test -n "$AR"; then
5273 ac_cv_prog_AR="$AR" # Let the user override the test.
5274else
5275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5276for as_dir in $PATH
5277do
5278 IFS=$as_save_IFS
5279 test -z "$as_dir" && as_dir=.
5280 for ac_exec_ext in '' $ac_executable_extensions; do
5281 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5282 ac_cv_prog_AR="${ac_tool_prefix}ar"
5283 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5284 break 2
5285 fi
5286done
5287 done
5288IFS=$as_save_IFS
5289
5290fi
5291fi
5292AR=$ac_cv_prog_AR
5293if test -n "$AR"; then
5294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5295$as_echo "$AR" >&6; }
5296else
5297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5298$as_echo "no" >&6; }
5299fi
5300
5301
5302fi
5303if test -z "$ac_cv_prog_AR"; then
5304 ac_ct_AR=$AR
5305 # Extract the first word of "ar", so it can be a program name with args.
5306set dummy ar; ac_word=$2
5307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5308$as_echo_n "checking for $ac_word... " >&6; }
5309if ${ac_cv_prog_ac_ct_AR+:} false; then :
5310 $as_echo_n "(cached) " >&6
5311else
5312 if test -n "$ac_ct_AR"; then
5313 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5314else
5315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5316for as_dir in $PATH
5317do
5318 IFS=$as_save_IFS
5319 test -z "$as_dir" && as_dir=.
5320 for ac_exec_ext in '' $ac_executable_extensions; do
5321 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5322 ac_cv_prog_ac_ct_AR="ar"
5323 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5324 break 2
5325 fi
5326done
5327 done
5328IFS=$as_save_IFS
5329
5330fi
5331fi
5332ac_ct_AR=$ac_cv_prog_ac_ct_AR
5333if test -n "$ac_ct_AR"; then
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5335$as_echo "$ac_ct_AR" >&6; }
5336else
5337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5338$as_echo "no" >&6; }
5339fi
5340
5341 if test "x$ac_ct_AR" = x; then
5342 AR="ar"
5343 else
5344 case $cross_compiling:$ac_tool_warned in
5345yes:)
5346{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5347$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5348ac_tool_warned=yes ;;
5349esac
5350 AR=$ac_ct_AR
5351 fi
5352else
5353 AR="$ac_cv_prog_AR"
5354fi
5355
5356 if test -z "$ARFLAGS"; then
5357 ARFLAGS='cr'
5358 fi
5359
c971b7fa 5360
5e8754f9
SDJ
5361
5362 if test -z "$RANLIB"; then
5363 if test $gl_cv_c_amsterdam_compiler = yes; then
5364 RANLIB=':'
5365 else
5366 if test -n "$ac_tool_prefix"; then
5367 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5368set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5370$as_echo_n "checking for $ac_word... " >&6; }
5371if ${ac_cv_prog_RANLIB+:} false; then :
5372 $as_echo_n "(cached) " >&6
5373else
5374 if test -n "$RANLIB"; then
5375 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5376else
5377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5378for as_dir in $PATH
5379do
5380 IFS=$as_save_IFS
5381 test -z "$as_dir" && as_dir=.
5382 for ac_exec_ext in '' $ac_executable_extensions; do
5383 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5384 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5385 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5386 break 2
5387 fi
5388done
5389 done
5390IFS=$as_save_IFS
5391
5392fi
5393fi
5394RANLIB=$ac_cv_prog_RANLIB
5395if test -n "$RANLIB"; then
5396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5397$as_echo "$RANLIB" >&6; }
5398else
5399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5400$as_echo "no" >&6; }
5401fi
c971b7fa
PA
5402
5403
5404fi
5405if test -z "$ac_cv_prog_RANLIB"; then
5406 ac_ct_RANLIB=$RANLIB
5407 # Extract the first word of "ranlib", so it can be a program name with args.
5408set dummy ranlib; ac_word=$2
5409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5410$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5411if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
5412 $as_echo_n "(cached) " >&6
5413else
5414 if test -n "$ac_ct_RANLIB"; then
5415 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5416else
5417as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5418for as_dir in $PATH
5419do
5420 IFS=$as_save_IFS
5421 test -z "$as_dir" && as_dir=.
5422 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5423 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5424 ac_cv_prog_ac_ct_RANLIB="ranlib"
5425 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5426 break 2
5427 fi
5428done
5429 done
5430IFS=$as_save_IFS
5431
5432fi
5433fi
5434ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5435if test -n "$ac_ct_RANLIB"; then
5436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5437$as_echo "$ac_ct_RANLIB" >&6; }
5438else
5439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5440$as_echo "no" >&6; }
5441fi
5442
5443 if test "x$ac_ct_RANLIB" = x; then
5444 RANLIB=":"
5445 else
5446 case $cross_compiling:$ac_tool_warned in
5447yes:)
5448{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5449$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5450ac_tool_warned=yes ;;
5451esac
5452 RANLIB=$ac_ct_RANLIB
5453 fi
5454else
5455 RANLIB="$ac_cv_prog_RANLIB"
5456fi
5457
5458 fi
5459 fi
5460
5461
4a626d0a
PA
5462# Make sure we can run config.sub.
5463$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 5464 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4a626d0a
PA
5465
5466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5467$as_echo_n "checking build system type... " >&6; }
d0ac1c44 5468if ${ac_cv_build+:} false; then :
4a626d0a
PA
5469 $as_echo_n "(cached) " >&6
5470else
5471 ac_build_alias=$build_alias
5472test "x$ac_build_alias" = x &&
5473 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5474test "x$ac_build_alias" = x &&
d0ac1c44 5475 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4a626d0a 5476ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 5477 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4a626d0a
PA
5478
5479fi
5480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5481$as_echo "$ac_cv_build" >&6; }
5482case $ac_cv_build in
5483*-*-*) ;;
d0ac1c44 5484*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4a626d0a
PA
5485esac
5486build=$ac_cv_build
5487ac_save_IFS=$IFS; IFS='-'
5488set x $ac_cv_build
5489shift
5490build_cpu=$1
5491build_vendor=$2
5492shift; shift
5493# Remember, the first character of IFS is used to create $*,
5494# except with old shells:
5495build_os=$*
5496IFS=$ac_save_IFS
5497case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5498
5499
5500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5501$as_echo_n "checking host system type... " >&6; }
d0ac1c44 5502if ${ac_cv_host+:} false; then :
4a626d0a
PA
5503 $as_echo_n "(cached) " >&6
5504else
5505 if test "x$host_alias" = x; then
5506 ac_cv_host=$ac_cv_build
5507else
5508 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 5509 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4a626d0a
PA
5510fi
5511
5512fi
5513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5514$as_echo "$ac_cv_host" >&6; }
5515case $ac_cv_host in
5516*-*-*) ;;
d0ac1c44 5517*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4a626d0a
PA
5518esac
5519host=$ac_cv_host
5520ac_save_IFS=$IFS; IFS='-'
5521set x $ac_cv_host
5522shift
5523host_cpu=$1
5524host_vendor=$2
5525shift; shift
5526# Remember, the first character of IFS is used to create $*,
5527# except with old shells:
5528host_os=$*
5529IFS=$ac_save_IFS
5530case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5531
5532
c971b7fa
PA
5533
5534
88b48903
WN
5535
5536 # IEEE behaviour is the default on all CPUs except Alpha and SH
5537 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5538 # and the GCC 4.1.2 manual).
5539 case "$host_cpu" in
5540 alpha*)
5541 # On Alpha systems, a compiler option provides the behaviour.
5542 # See the ieee(3) manual page, also available at
5e8754f9 5543 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
88b48903
WN
5544 if test -n "$GCC"; then
5545 # GCC has the option -mieee.
5546 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
5547 CPPFLAGS="$CPPFLAGS -mieee"
5548 else
5549 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
5550 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
5551 CPPFLAGS="$CPPFLAGS -ieee"
5552 fi
5553 ;;
5554 sh*)
5555 if test -n "$GCC"; then
5556 # GCC has the option -mieee.
5557 CPPFLAGS="$CPPFLAGS -mieee"
5558 fi
5559 ;;
5560 esac
5561
2196f55f
YQ
5562# Check whether --enable-largefile was given.
5563if test "${enable_largefile+set}" = set; then :
5564 enableval=$enable_largefile;
5565fi
5566
5567if test "$enable_largefile" != no; then
5568
5569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5570$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 5571if ${ac_cv_sys_largefile_CC+:} false; then :
2196f55f
YQ
5572 $as_echo_n "(cached) " >&6
5573else
5574 ac_cv_sys_largefile_CC=no
5575 if test "$GCC" != yes; then
5576 ac_save_CC=$CC
5577 while :; do
5578 # IRIX 6.2 and later do not support large files by default,
5579 # so use the C compiler's -n32 option if that helps.
5580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5581/* end confdefs.h. */
5582#include <sys/types.h>
5583 /* Check that off_t can represent 2**63 - 1 correctly.
5584 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5585 since some C++ compilers masquerading as C compilers
5586 incorrectly reject 9223372036854775807. */
5587#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5588 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5589 && LARGE_OFF_T % 2147483647 == 1)
5590 ? 1 : -1];
5591int
5592main ()
5593{
5594
5595 ;
5596 return 0;
5597}
5598_ACEOF
5599 if ac_fn_c_try_compile "$LINENO"; then :
5600 break
5601fi
5602rm -f core conftest.err conftest.$ac_objext
5603 CC="$CC -n32"
5604 if ac_fn_c_try_compile "$LINENO"; then :
5605 ac_cv_sys_largefile_CC=' -n32'; break
5606fi
5607rm -f core conftest.err conftest.$ac_objext
5608 break
5609 done
5610 CC=$ac_save_CC
5611 rm -f conftest.$ac_ext
5612 fi
5613fi
5614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5615$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5616 if test "$ac_cv_sys_largefile_CC" != no; then
5617 CC=$CC$ac_cv_sys_largefile_CC
5618 fi
5619
5620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5621$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 5622if ${ac_cv_sys_file_offset_bits+:} false; then :
2196f55f
YQ
5623 $as_echo_n "(cached) " >&6
5624else
5625 while :; do
5626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5627/* end confdefs.h. */
5628#include <sys/types.h>
5629 /* Check that off_t can represent 2**63 - 1 correctly.
5630 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5631 since some C++ compilers masquerading as C compilers
5632 incorrectly reject 9223372036854775807. */
5633#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5634 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5635 && LARGE_OFF_T % 2147483647 == 1)
5636 ? 1 : -1];
5637int
5638main ()
5639{
5640
5641 ;
5642 return 0;
5643}
5644_ACEOF
5645if ac_fn_c_try_compile "$LINENO"; then :
5646 ac_cv_sys_file_offset_bits=no; break
5647fi
5648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5650/* end confdefs.h. */
5651#define _FILE_OFFSET_BITS 64
5652#include <sys/types.h>
5653 /* Check that off_t can represent 2**63 - 1 correctly.
5654 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5655 since some C++ compilers masquerading as C compilers
5656 incorrectly reject 9223372036854775807. */
5657#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5658 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5659 && LARGE_OFF_T % 2147483647 == 1)
5660 ? 1 : -1];
5661int
5662main ()
5663{
5664
5665 ;
5666 return 0;
5667}
5668_ACEOF
5669if ac_fn_c_try_compile "$LINENO"; then :
5670 ac_cv_sys_file_offset_bits=64; break
5671fi
5672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5673 ac_cv_sys_file_offset_bits=unknown
5674 break
5675done
5676fi
5677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5678$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5679case $ac_cv_sys_file_offset_bits in #(
5680 no | unknown) ;;
5681 *)
5682cat >>confdefs.h <<_ACEOF
5683#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5684_ACEOF
5685;;
5686esac
5687rm -rf conftest*
5688 if test $ac_cv_sys_file_offset_bits = unknown; then
5689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5690$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 5691if ${ac_cv_sys_large_files+:} false; then :
2196f55f
YQ
5692 $as_echo_n "(cached) " >&6
5693else
5694 while :; do
5695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5696/* end confdefs.h. */
5697#include <sys/types.h>
5698 /* Check that off_t can represent 2**63 - 1 correctly.
5699 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5700 since some C++ compilers masquerading as C compilers
5701 incorrectly reject 9223372036854775807. */
5702#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5703 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5704 && LARGE_OFF_T % 2147483647 == 1)
5705 ? 1 : -1];
5706int
5707main ()
5708{
5709
5710 ;
5711 return 0;
5712}
5713_ACEOF
5714if ac_fn_c_try_compile "$LINENO"; then :
5715 ac_cv_sys_large_files=no; break
5716fi
5717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5719/* end confdefs.h. */
5720#define _LARGE_FILES 1
5721#include <sys/types.h>
5722 /* Check that off_t can represent 2**63 - 1 correctly.
5723 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5724 since some C++ compilers masquerading as C compilers
5725 incorrectly reject 9223372036854775807. */
5726#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5727 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5728 && LARGE_OFF_T % 2147483647 == 1)
5729 ? 1 : -1];
5730int
5731main ()
5732{
5733
5734 ;
5735 return 0;
5736}
5737_ACEOF
5738if ac_fn_c_try_compile "$LINENO"; then :
5739 ac_cv_sys_large_files=1; break
5740fi
5741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5742 ac_cv_sys_large_files=unknown
5743 break
5744done
5745fi
5746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5747$as_echo "$ac_cv_sys_large_files" >&6; }
5748case $ac_cv_sys_large_files in #(
5749 no | unknown) ;;
5750 *)
5751cat >>confdefs.h <<_ACEOF
5752#define _LARGE_FILES $ac_cv_sys_large_files
5753_ACEOF
5754;;
5755esac
5756rm -rf conftest*
5757 fi
5758
5759
4a626d0a
PA
5760$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
5761
2196f55f
YQ
5762fi
5763
88b48903
WN
5764
5765
49e4877c
PA
5766 # Pre-early section.
5767
5768
5769
4a626d0a 5770 # Code from module absolute-header:
8690e634
JK
5771 # Code from module alloca:
5772 # Code from module alloca-opt:
725e2999 5773 # Code from module arpa_inet:
6ec2e0f5
SDJ
5774 # Code from module assure:
5775 # Code from module at-internal:
98399780 5776 # Code from module canonicalize-lgpl:
6a29c58e 5777 # Code from module chdir:
6ec2e0f5
SDJ
5778 # Code from module chdir-long:
5779 # Code from module cloexec:
5780 # Code from module close:
5781 # Code from module closedir:
5e8754f9 5782 # Code from module configmake:
6ec2e0f5
SDJ
5783 # Code from module d-ino:
5784 # Code from module d-type:
e26b6bb0 5785 # Code from module dirent:
18848e28 5786 # Code from module dirfd:
6a29c58e 5787 # Code from module dirname-lgpl:
2196f55f 5788 # Code from module dosname:
6a29c58e 5789 # Code from module double-slash-root:
6ec2e0f5
SDJ
5790 # Code from module dup:
5791 # Code from module dup2:
3d99e817 5792 # Code from module environ:
18848e28 5793 # Code from module errno:
6ec2e0f5
SDJ
5794 # Code from module error:
5795 # Code from module exitfail:
c971b7fa 5796 # Code from module extensions:
a512b375 5797 # Code from module extern-inline:
6ec2e0f5
SDJ
5798 # Code from module fchdir:
5799 # Code from module fcntl:
5800 # Code from module fcntl-h:
5801 # Code from module fd-hook:
5802 # Code from module fdopendir:
5803 # Code from module filename:
5804 # Code from module filenamecat-lgpl:
49e4877c 5805 # Code from module flexmember:
88b48903 5806 # Code from module float:
8690e634
JK
5807 # Code from module fnmatch:
5808 # Code from module fnmatch-gnu:
88b48903
WN
5809 # Code from module fpieee:
5810
5811 # Code from module fpucw:
5812 # Code from module frexp:
5813 # Code from module frexpl:
6ec2e0f5
SDJ
5814 # Code from module fstat:
5815 # Code from module fstatat:
5816 # Code from module getcwd:
5817 # Code from module getcwd-lgpl:
5818 # Code from module getdtablesize:
5819 # Code from module getlogin_r:
5820 # Code from module getprogname:
5821 # Code from module gettext-h:
4a626d0a 5822 # Code from module gettimeofday:
6ec2e0f5 5823 # Code from module glob:
49e4877c 5824 # Code from module hard-locale:
c971b7fa 5825 # Code from module include_next:
725e2999 5826 # Code from module inet_ntop:
6ec2e0f5 5827 # Code from module intprops:
c971b7fa
PA
5828 # Code from module inttypes:
5829 # Code from module inttypes-incomplete:
88b48903
WN
5830 # Code from module isnand-nolibm:
5831 # Code from module isnanl-nolibm:
2196f55f
YQ
5832 # Code from module largefile:
5833
49e4877c 5834 # Code from module limits-h:
8690e634 5835 # Code from module localcharset:
f45c62c4 5836 # Code from module lstat:
6a29c58e 5837 # Code from module malloc-posix:
98399780 5838 # Code from module malloca:
88b48903 5839 # Code from module math:
8690e634
JK
5840 # Code from module mbrtowc:
5841 # Code from module mbsinit:
5842 # Code from module mbsrtowcs:
c971b7fa
PA
5843 # Code from module memchr:
5844 # Code from module memmem:
5845 # Code from module memmem-simple:
6ec2e0f5
SDJ
5846 # Code from module mempcpy:
5847 # Code from module memrchr:
8a99096f 5848 # Code from module mkdir:
e8d8cce6 5849 # Code from module mkdtemp:
b3279b60 5850 # Code from module mkostemp:
6ec2e0f5
SDJ
5851 # Code from module msvc-inval:
5852 # Code from module msvc-nothrow:
c971b7fa 5853 # Code from module multiarch:
725e2999 5854 # Code from module netinet_in:
98399780 5855 # Code from module nocrash:
6ec2e0f5
SDJ
5856 # Code from module open:
5857 # Code from module openat:
5858 # Code from module openat-die:
5859 # Code from module openat-h:
5860 # Code from module opendir:
38ec2207 5861 # Code from module pathmax:
8424cc97 5862 # Code from module rawmemchr:
6ec2e0f5 5863 # Code from module readdir:
2196f55f 5864 # Code from module readlink:
6ec2e0f5 5865 # Code from module realloc-posix:
6a29c58e 5866 # Code from module rename:
6ec2e0f5 5867 # Code from module rewinddir:
6a29c58e
YQ
5868 # Code from module rmdir:
5869 # Code from module same-inode:
6ec2e0f5 5870 # Code from module save-cwd:
5e8754f9 5871 # Code from module secure_getenv:
3d99e817 5872 # Code from module setenv:
0750520d 5873 # Code from module signal-h:
98399780 5874 # Code from module snippet/_Noreturn:
c971b7fa
PA
5875 # Code from module snippet/arg-nonnull:
5876 # Code from module snippet/c++defs:
5877 # Code from module snippet/warn-on-use:
725e2999 5878 # Code from module socklen:
8839a007 5879 # Code from module ssize_t:
2196f55f 5880 # Code from module stat:
725e2999 5881 # Code from module stdalign:
8690e634 5882 # Code from module stdbool:
c971b7fa
PA
5883 # Code from module stddef:
5884 # Code from module stdint:
6a29c58e 5885 # Code from module stdio:
98399780 5886 # Code from module stdlib:
8424cc97 5887 # Code from module strchrnul:
6ec2e0f5 5888 # Code from module strdup-posix:
8690e634 5889 # Code from module streq:
6ec2e0f5
SDJ
5890 # Code from module strerror:
5891 # Code from module strerror-override:
c971b7fa 5892 # Code from module string:
8690e634 5893 # Code from module strnlen1:
63ce7108
TT
5894 # Code from module strstr:
5895 # Code from module strstr-simple:
421693b0 5896 # Code from module strtok_r:
725e2999 5897 # Code from module sys_socket:
09607c9e 5898 # Code from module sys_stat:
4a626d0a 5899 # Code from module sys_time:
8839a007 5900 # Code from module sys_types:
725e2999 5901 # Code from module sys_uio:
2d8adcbd 5902 # Code from module tempname:
09607c9e 5903 # Code from module time:
8839a007 5904 # Code from module unistd:
6ec2e0f5 5905 # Code from module unistd-safer:
3d99e817 5906 # Code from module unsetenv:
c971b7fa 5907 # Code from module update-copyright:
8690e634
JK
5908 # Code from module verify:
5909 # Code from module wchar:
5910 # Code from module wctype-h:
c971b7fa 5911
5e8754f9
SDJ
5912ac_ext=c
5913ac_cpp='$CPP $CPPFLAGS'
5914ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5915ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5916ac_compiler_gnu=$ac_cv_c_compiler_gnu
5917if test -n "$ac_tool_prefix"; then
5918 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5919set dummy ${ac_tool_prefix}gcc; ac_word=$2
5920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5921$as_echo_n "checking for $ac_word... " >&6; }
5922if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
5923 $as_echo_n "(cached) " >&6
5924else
5e8754f9
SDJ
5925 if test -n "$CC"; then
5926 ac_cv_prog_CC="$CC" # Let the user override the test.
c971b7fa 5927else
5e8754f9
SDJ
5928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929for as_dir in $PATH
5930do
5931 IFS=$as_save_IFS
5932 test -z "$as_dir" && as_dir=.
5933 for ac_exec_ext in '' $ac_executable_extensions; do
5934 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5935 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5936 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5937 break 2
5938 fi
5939done
5940 done
5941IFS=$as_save_IFS
c971b7fa 5942
5e8754f9
SDJ
5943fi
5944fi
5945CC=$ac_cv_prog_CC
5946if test -n "$CC"; then
5947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5948$as_echo "$CC" >&6; }
7a6dbc2f 5949else
5e8754f9
SDJ
5950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5951$as_echo "no" >&6; }
5952fi
c971b7fa 5953
c971b7fa 5954
7a6dbc2f 5955fi
5e8754f9
SDJ
5956if test -z "$ac_cv_prog_CC"; then
5957 ac_ct_CC=$CC
5958 # Extract the first word of "gcc", so it can be a program name with args.
5959set dummy gcc; ac_word=$2
5960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5961$as_echo_n "checking for $ac_word... " >&6; }
5962if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
5963 $as_echo_n "(cached) " >&6
5964else
5e8754f9
SDJ
5965 if test -n "$ac_ct_CC"; then
5966 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
c971b7fa 5967else
5e8754f9
SDJ
5968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5969for as_dir in $PATH
5970do
5971 IFS=$as_save_IFS
5972 test -z "$as_dir" && as_dir=.
5973 for ac_exec_ext in '' $ac_executable_extensions; do
5974 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5975 ac_cv_prog_ac_ct_CC="gcc"
5976 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5977 break 2
5978 fi
5979done
5980 done
5981IFS=$as_save_IFS
5982
c971b7fa 5983fi
c971b7fa 5984fi
5e8754f9
SDJ
5985ac_ct_CC=$ac_cv_prog_ac_ct_CC
5986if test -n "$ac_ct_CC"; then
5987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5988$as_echo "$ac_ct_CC" >&6; }
5989else
5990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5991$as_echo "no" >&6; }
5992fi
7a6dbc2f 5993
5e8754f9
SDJ
5994 if test "x$ac_ct_CC" = x; then
5995 CC=""
5996 else
5997 case $cross_compiling:$ac_tool_warned in
5998yes:)
5999{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6000$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6001ac_tool_warned=yes ;;
6002esac
6003 CC=$ac_ct_CC
6004 fi
6005else
6006 CC="$ac_cv_prog_CC"
c971b7fa 6007fi
7a6dbc2f 6008
5e8754f9
SDJ
6009if test -z "$CC"; then
6010 if test -n "$ac_tool_prefix"; then
6011 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
6012set dummy ${ac_tool_prefix}cc; ac_word=$2
6013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6014$as_echo_n "checking for $ac_word... " >&6; }
6015if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
6016 $as_echo_n "(cached) " >&6
6017else
5e8754f9
SDJ
6018 if test -n "$CC"; then
6019 ac_cv_prog_CC="$CC" # Let the user override the test.
c971b7fa 6020else
5e8754f9
SDJ
6021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6022for as_dir in $PATH
6023do
6024 IFS=$as_save_IFS
6025 test -z "$as_dir" && as_dir=.
6026 for ac_exec_ext in '' $ac_executable_extensions; do
6027 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6028 ac_cv_prog_CC="${ac_tool_prefix}cc"
6029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6030 break 2
6031 fi
6032done
6033 done
6034IFS=$as_save_IFS
6035
7a6dbc2f 6036fi
7a6dbc2f 6037fi
5e8754f9
SDJ
6038CC=$ac_cv_prog_CC
6039if test -n "$CC"; then
6040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6041$as_echo "$CC" >&6; }
c971b7fa 6042else
5e8754f9
SDJ
6043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6044$as_echo "no" >&6; }
6045fi
7a6dbc2f
SDJ
6046
6047
5e8754f9
SDJ
6048 fi
6049fi
6050if test -z "$CC"; then
6051 # Extract the first word of "cc", so it can be a program name with args.
6052set dummy cc; ac_word=$2
6053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6054$as_echo_n "checking for $ac_word... " >&6; }
6055if ${ac_cv_prog_CC+:} false; then :
7a6dbc2f
SDJ
6056 $as_echo_n "(cached) " >&6
6057else
5e8754f9
SDJ
6058 if test -n "$CC"; then
6059 ac_cv_prog_CC="$CC" # Let the user override the test.
7a6dbc2f 6060else
5e8754f9
SDJ
6061 ac_prog_rejected=no
6062as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6063for as_dir in $PATH
6064do
6065 IFS=$as_save_IFS
6066 test -z "$as_dir" && as_dir=.
6067 for ac_exec_ext in '' $ac_executable_extensions; do
6068 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6069 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
6070 ac_prog_rejected=yes
6071 continue
6072 fi
6073 ac_cv_prog_CC="cc"
6074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6075 break 2
6076 fi
6077done
6078 done
6079IFS=$as_save_IFS
6080
6081if test $ac_prog_rejected = yes; then
6082 # We found a bogon in the path, so make sure we never use it.
6083 set dummy $ac_cv_prog_CC
6084 shift
6085 if test $# != 0; then
6086 # We chose a different compiler from the bogus one.
6087 # However, it has the same basename, so the bogon will be chosen
6088 # first if we set CC to just the basename; use the full file name.
6089 shift
6090 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
6091 fi
6092fi
6093fi
6094fi
6095CC=$ac_cv_prog_CC
6096if test -n "$CC"; then
6097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6098$as_echo "$CC" >&6; }
6099else
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6101$as_echo "no" >&6; }
c971b7fa 6102fi
7a6dbc2f 6103
7a6dbc2f 6104
c971b7fa 6105fi
5e8754f9
SDJ
6106if test -z "$CC"; then
6107 if test -n "$ac_tool_prefix"; then
6108 for ac_prog in cl.exe
6109 do
6110 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6111set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6113$as_echo_n "checking for $ac_word... " >&6; }
6114if ${ac_cv_prog_CC+:} false; then :
6115 $as_echo_n "(cached) " >&6
6116else
6117 if test -n "$CC"; then
6118 ac_cv_prog_CC="$CC" # Let the user override the test.
6119else
6120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6121for as_dir in $PATH
6122do
6123 IFS=$as_save_IFS
6124 test -z "$as_dir" && as_dir=.
6125 for ac_exec_ext in '' $ac_executable_extensions; do
6126 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6127 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6129 break 2
6130 fi
6131done
7a6dbc2f 6132 done
5e8754f9
SDJ
6133IFS=$as_save_IFS
6134
6135fi
6136fi
6137CC=$ac_cv_prog_CC
6138if test -n "$CC"; then
6139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6140$as_echo "$CC" >&6; }
6141else
6142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6143$as_echo "no" >&6; }
c971b7fa 6144fi
7a6dbc2f 6145
5e8754f9
SDJ
6146
6147 test -n "$CC" && break
6148 done
6149fi
6150if test -z "$CC"; then
6151 ac_ct_CC=$CC
6152 for ac_prog in cl.exe
6153do
6154 # Extract the first word of "$ac_prog", so it can be a program name with args.
6155set dummy $ac_prog; ac_word=$2
6156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6157$as_echo_n "checking for $ac_word... " >&6; }
6158if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
6159 $as_echo_n "(cached) " >&6
6160else
5e8754f9
SDJ
6161 if test -n "$ac_ct_CC"; then
6162 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6163else
6164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6165for as_dir in $PATH
6166do
6167 IFS=$as_save_IFS
6168 test -z "$as_dir" && as_dir=.
6169 for ac_exec_ext in '' $ac_executable_extensions; do
6170 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6171 ac_cv_prog_ac_ct_CC="$ac_prog"
6172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6173 break 2
6174 fi
6175done
6176 done
6177IFS=$as_save_IFS
6178
6179fi
6180fi
6181ac_ct_CC=$ac_cv_prog_ac_ct_CC
6182if test -n "$ac_ct_CC"; then
6183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6184$as_echo "$ac_ct_CC" >&6; }
6185else
6186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6187$as_echo "no" >&6; }
6188fi
6189
6190
6191 test -n "$ac_ct_CC" && break
6192done
6193
6194 if test "x$ac_ct_CC" = x; then
6195 CC=""
6196 else
6197 case $cross_compiling:$ac_tool_warned in
6198yes:)
6199{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6200$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6201ac_tool_warned=yes ;;
6202esac
6203 CC=$ac_ct_CC
6204 fi
6205fi
6206
6207fi
6208
6209
6210test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6211$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6212as_fn_error $? "no acceptable C compiler found in \$PATH
6213See \`config.log' for more details" "$LINENO" 5; }
6214
6215# Provide some information about the compiler.
6216$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
6217set X $ac_compile
6218ac_compiler=$2
6219for ac_option in --version -v -V -qversion; do
6220 { { ac_try="$ac_compiler $ac_option >&5"
6221case "(($ac_try" in
6222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6223 *) ac_try_echo=$ac_try;;
6224esac
6225eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6226$as_echo "$ac_try_echo"; } >&5
6227 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6228 ac_status=$?
6229 if test -s conftest.err; then
6230 sed '10a\
6231... rest of stderr output deleted ...
6232 10q' conftest.err >conftest.er1
6233 cat conftest.er1 >&5
6234 fi
6235 rm -f conftest.er1 conftest.err
6236 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6237 test $ac_status = 0; }
6238done
6239
6240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6241$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
6242if ${ac_cv_c_compiler_gnu+:} false; then :
6243 $as_echo_n "(cached) " >&6
7a6dbc2f
SDJ
6244else
6245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6246/* end confdefs.h. */
c971b7fa 6247
c971b7fa 6248int
5e8754f9 6249main ()
c971b7fa 6250{
5e8754f9
SDJ
6251#ifndef __GNUC__
6252 choke me
6253#endif
6254
6255 ;
6256 return 0;
c971b7fa
PA
6257}
6258_ACEOF
5e8754f9
SDJ
6259if ac_fn_c_try_compile "$LINENO"; then :
6260 ac_compiler_gnu=yes
7a6dbc2f 6261else
5e8754f9 6262 ac_compiler_gnu=no
c971b7fa 6263fi
5e8754f9
SDJ
6264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6265ac_cv_c_compiler_gnu=$ac_compiler_gnu
c971b7fa
PA
6266
6267fi
5e8754f9
SDJ
6268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6269$as_echo "$ac_cv_c_compiler_gnu" >&6; }
6270if test $ac_compiler_gnu = yes; then
6271 GCC=yes
6272else
6273 GCC=
d0ac1c44 6274fi
5e8754f9
SDJ
6275ac_test_CFLAGS=${CFLAGS+set}
6276ac_save_CFLAGS=$CFLAGS
6277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6278$as_echo_n "checking whether $CC accepts -g... " >&6; }
6279if ${ac_cv_prog_cc_g+:} false; then :
6280 $as_echo_n "(cached) " >&6
6281else
6282 ac_save_c_werror_flag=$ac_c_werror_flag
6283 ac_c_werror_flag=yes
6284 ac_cv_prog_cc_g=no
6285 CFLAGS="-g"
6286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6287/* end confdefs.h. */
d0ac1c44 6288
5e8754f9
SDJ
6289int
6290main ()
6291{
c971b7fa 6292
5e8754f9
SDJ
6293 ;
6294 return 0;
6295}
6296_ACEOF
6297if ac_fn_c_try_compile "$LINENO"; then :
6298 ac_cv_prog_cc_g=yes
6299else
6300 CFLAGS=""
6301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6302/* end confdefs.h. */
c971b7fa 6303
5e8754f9
SDJ
6304int
6305main ()
6306{
c971b7fa 6307
5e8754f9
SDJ
6308 ;
6309 return 0;
6310}
6311_ACEOF
6312if ac_fn_c_try_compile "$LINENO"; then :
c971b7fa 6313
5e8754f9
SDJ
6314else
6315 ac_c_werror_flag=$ac_save_c_werror_flag
6316 CFLAGS="-g"
6317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6318/* end confdefs.h. */
c971b7fa 6319
5e8754f9
SDJ
6320int
6321main ()
6322{
c971b7fa 6323
5e8754f9
SDJ
6324 ;
6325 return 0;
6326}
7a6dbc2f 6327_ACEOF
5e8754f9
SDJ
6328if ac_fn_c_try_compile "$LINENO"; then :
6329 ac_cv_prog_cc_g=yes
c971b7fa 6330fi
5e8754f9
SDJ
6331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6332fi
6333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6334fi
6335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6336 ac_c_werror_flag=$ac_save_c_werror_flag
6337fi
6338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6339$as_echo "$ac_cv_prog_cc_g" >&6; }
6340if test "$ac_test_CFLAGS" = set; then
6341 CFLAGS=$ac_save_CFLAGS
6342elif test $ac_cv_prog_cc_g = yes; then
6343 if test "$GCC" = yes; then
6344 CFLAGS="-g -O2"
6345 else
6346 CFLAGS="-g"
6347 fi
6348else
6349 if test "$GCC" = yes; then
6350 CFLAGS="-O2"
6351 else
6352 CFLAGS=
6353 fi
6354fi
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6356$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6357if ${ac_cv_prog_cc_c89+:} false; then :
6358 $as_echo_n "(cached) " >&6
6359else
6360 ac_cv_prog_cc_c89=no
6361ac_save_CC=$CC
6362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6363/* end confdefs.h. */
6364#include <stdarg.h>
6365#include <stdio.h>
6366struct stat;
6367/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6368struct buf { int x; };
6369FILE * (*rcsopen) (struct buf *, struct stat *, int);
6370static char *e (p, i)
6371 char **p;
6372 int i;
6373{
6374 return p[i];
6375}
6376static char *f (char * (*g) (char **, int), char **p, ...)
6377{
6378 char *s;
6379 va_list v;
6380 va_start (v,p);
6381 s = g (p, va_arg (v,int));
6382 va_end (v);
6383 return s;
6384}
c971b7fa 6385
5e8754f9
SDJ
6386/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6387 function prototypes and stuff, but not '\xHH' hex character constants.
6388 These don't provoke an error unfortunately, instead are silently treated
6389 as 'x'. The following induces an error, until -std is added to get
6390 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6391 array size at least. It's necessary to write '\x00'==0 to get something
6392 that's true only with -std. */
6393int osf4_cc_array ['\x00' == 0 ? 1 : -1];
c971b7fa 6394
5e8754f9
SDJ
6395/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6396 inside strings and character constants. */
6397#define FOO(x) 'x'
6398int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
c971b7fa 6399
5e8754f9
SDJ
6400int test (int i, double x);
6401struct s1 {int (*f) (int a);};
6402struct s2 {int (*f) (double a);};
6403int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6404int argc;
6405char **argv;
6406int
6407main ()
6408{
6409return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6410 ;
6411 return 0;
6412}
6413_ACEOF
6414for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6415 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6416do
6417 CC="$ac_save_CC $ac_arg"
6418 if ac_fn_c_try_compile "$LINENO"; then :
6419 ac_cv_prog_cc_c89=$ac_arg
6420fi
6421rm -f core conftest.err conftest.$ac_objext
6422 test "x$ac_cv_prog_cc_c89" != "xno" && break
6423done
6424rm -f conftest.$ac_ext
6425CC=$ac_save_CC
c971b7fa 6426
5e8754f9
SDJ
6427fi
6428# AC_CACHE_VAL
6429case "x$ac_cv_prog_cc_c89" in
6430 x)
6431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6432$as_echo "none needed" >&6; } ;;
6433 xno)
6434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6435$as_echo "unsupported" >&6; } ;;
6436 *)
6437 CC="$CC $ac_cv_prog_cc_c89"
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6439$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6440esac
6441if test "x$ac_cv_prog_cc_c89" != xno; then :
c971b7fa 6442
5e8754f9 6443fi
c971b7fa 6444
5e8754f9
SDJ
6445ac_ext=c
6446ac_cpp='$CPP $CPPFLAGS'
6447ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6448ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6449ac_compiler_gnu=$ac_cv_c_compiler_gnu
d0ac1c44 6450
5e8754f9
SDJ
6451ac_ext=c
6452ac_cpp='$CPP $CPPFLAGS'
6453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6455ac_compiler_gnu=$ac_cv_c_compiler_gnu
6456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6457$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
6458if ${am_cv_prog_cc_c_o+:} false; then :
6459 $as_echo_n "(cached) " >&6
6460else
6461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6462/* end confdefs.h. */
d0ac1c44 6463
5e8754f9
SDJ
6464int
6465main ()
6466{
d0ac1c44 6467
5e8754f9
SDJ
6468 ;
6469 return 0;
6470}
6471_ACEOF
6472 # Make sure it works both with $CC and with simple cc.
6473 # Following AC_PROG_CC_C_O, we do the test twice because some
6474 # compilers refuse to overwrite an existing .o file with -o,
6475 # though they will create one.
6476 am_cv_prog_cc_c_o=yes
6477 for am_i in 1 2; do
6478 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6479 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6480 ac_status=$?
6481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6482 (exit $ac_status); } \
6483 && test -f conftest2.$ac_objext; then
6484 : OK
6485 else
6486 am_cv_prog_cc_c_o=no
6487 break
6488 fi
6489 done
6490 rm -f core conftest*
6491 unset am_i
6492fi
6493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6494$as_echo "$am_cv_prog_cc_c_o" >&6; }
6495if test "$am_cv_prog_cc_c_o" != yes; then
6496 # Losing compiler, so override with the script.
6497 # FIXME: It is wrong to rewrite CC.
6498 # But if we don't then we get into trouble of one sort or another.
6499 # A longer-term fix would be to have automake use am__CC in this case,
6500 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6501 CC="$am_aux_dir/compile $CC"
6502fi
6503ac_ext=c
6504ac_cpp='$CPP $CPPFLAGS'
6505ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6506ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6507ac_compiler_gnu=$ac_cv_c_compiler_gnu
d0ac1c44 6508
7a6dbc2f 6509
5e8754f9 6510am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
7a6dbc2f
SDJ
6511
6512
5e8754f9
SDJ
6513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6514$as_echo_n "checking target system type... " >&6; }
6515if ${ac_cv_target+:} false; then :
c971b7fa
PA
6516 $as_echo_n "(cached) " >&6
6517else
5e8754f9
SDJ
6518 if test "x$target_alias" = x; then
6519 ac_cv_target=$ac_cv_host
6520else
6521 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6522 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
c971b7fa 6523fi
c971b7fa 6524
5e8754f9
SDJ
6525fi
6526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6527$as_echo "$ac_cv_target" >&6; }
6528case $ac_cv_target in
6529*-*-*) ;;
6530*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6531esac
6532target=$ac_cv_target
6533ac_save_IFS=$IFS; IFS='-'
6534set x $ac_cv_target
6535shift
6536target_cpu=$1
6537target_vendor=$2
6538shift; shift
6539# Remember, the first character of IFS is used to create $*,
6540# except with old shells:
6541target_os=$*
6542IFS=$ac_save_IFS
6543case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
c971b7fa
PA
6544
6545
5e8754f9
SDJ
6546# The aliases save the names the user supplied, while $host etc.
6547# will get canonicalized.
6548test -n "$target_alias" &&
6549 test "$program_prefix$program_suffix$program_transform_name" = \
6550 NONENONEs,x,x, &&
6551 program_prefix=${target_alias}-
7a6dbc2f 6552
73cc7272
TT
6553# The tests for host and target for $enable_largefile require
6554# canonical names.
6555
6556
6557
6558# As the $enable_largefile decision depends on --enable-plugins we must set it
6559# even in directories otherwise not depending on the $plugins option.
6560
6561
6562 maybe_plugins=no
6563 for ac_header in dlfcn.h
6564do :
6565 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
6566"
6567if test "x$ac_cv_header_dlfcn_h" = xyes; then :
6568 cat >>confdefs.h <<_ACEOF
6569#define HAVE_DLFCN_H 1
6570_ACEOF
6571 maybe_plugins=yes
6572fi
6573
6574done
6575
6576 for ac_header in windows.h
6577do :
6578 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
6579"
6580if test "x$ac_cv_header_windows_h" = xyes; then :
6581 cat >>confdefs.h <<_ACEOF
6582#define HAVE_WINDOWS_H 1
6583_ACEOF
6584 maybe_plugins=yes
6585fi
6586
6587done
6588
6589
6590 # Check whether --enable-plugins was given.
6591if test "${enable_plugins+set}" = set; then :
6592 enableval=$enable_plugins; case "${enableval}" in
6593 no) plugins=no ;;
6594 *) plugins=yes
6595 if test "$maybe_plugins" != "yes" ; then
6596 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
6597 fi ;;
6598 esac
6599else
6600 plugins=$maybe_plugins
6601
6602fi
6603
6604 if test "$plugins" = "yes"; then
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
6606$as_echo_n "checking for library containing dlsym... " >&6; }
6607if ${ac_cv_search_dlsym+:} false; then :
6608 $as_echo_n "(cached) " >&6
6609else
6610 ac_func_search_save_LIBS=$LIBS
6611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6612/* end confdefs.h. */
6613
6614/* Override any GCC internal prototype to avoid an error.
6615 Use char because int might match the return type of a GCC
6616 builtin and then its argument prototype would still apply. */
6617#ifdef __cplusplus
6618extern "C"
6619#endif
6620char dlsym ();
6621int
6622main ()
6623{
6624return dlsym ();
6625 ;
6626 return 0;
6627}
6628_ACEOF
6629for ac_lib in '' dl; do
6630 if test -z "$ac_lib"; then
6631 ac_res="none required"
6632 else
6633 ac_res=-l$ac_lib
6634 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6635 fi
6636 if ac_fn_c_try_link "$LINENO"; then :
6637 ac_cv_search_dlsym=$ac_res
6638fi
6639rm -f core conftest.err conftest.$ac_objext \
6640 conftest$ac_exeext
6641 if ${ac_cv_search_dlsym+:} false; then :
6642 break
6643fi
6644done
6645if ${ac_cv_search_dlsym+:} false; then :
6646
6647else
6648 ac_cv_search_dlsym=no
6649fi
6650rm conftest.$ac_ext
6651LIBS=$ac_func_search_save_LIBS
6652fi
6653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
6654$as_echo "$ac_cv_search_dlsym" >&6; }
6655ac_res=$ac_cv_search_dlsym
6656if test "$ac_res" != no; then :
6657 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6658
6659fi
6660
6661 fi
6662
6663
6664case "${host}" in
6665 sparc-*-solaris*|i[3-7]86-*-solaris*)
6666 # On native 32bit sparc and ia32 solaris, large-file and procfs support
6667 # are mutually exclusive; and without procfs support, the bfd/ elf module
6668 # cannot provide certain routines such as elfcore_write_prpsinfo
6669 # or elfcore_write_prstatus. So unless the user explicitly requested
6670 # large-file support through the --enable-largefile switch, disable
6671 # large-file support in favor of procfs support.
6672 test "${target}" = "${host}" -a "x$plugins" = xno \
6673 && : ${enable_largefile="no"}
6674 ;;
6675esac
6676
6677# Check whether --enable-largefile was given.
6678if test "${enable_largefile+set}" = set; then :
6679 enableval=$enable_largefile;
6680fi
6681
6682if test "$enable_largefile" != no; then
6683
6684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6685$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6686if ${ac_cv_sys_largefile_CC+:} false; then :
6687 $as_echo_n "(cached) " >&6
6688else
6689 ac_cv_sys_largefile_CC=no
6690 if test "$GCC" != yes; then
6691 ac_save_CC=$CC
6692 while :; do
6693 # IRIX 6.2 and later do not support large files by default,
6694 # so use the C compiler's -n32 option if that helps.
6695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6696/* end confdefs.h. */
6697#include <sys/types.h>
6698 /* Check that off_t can represent 2**63 - 1 correctly.
6699 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6700 since some C++ compilers masquerading as C compilers
6701 incorrectly reject 9223372036854775807. */
6702#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6703 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6704 && LARGE_OFF_T % 2147483647 == 1)
6705 ? 1 : -1];
6706int
6707main ()
6708{
6709
6710 ;
6711 return 0;
6712}
6713_ACEOF
6714 if ac_fn_c_try_compile "$LINENO"; then :
6715 break
6716fi
6717rm -f core conftest.err conftest.$ac_objext
6718 CC="$CC -n32"
6719 if ac_fn_c_try_compile "$LINENO"; then :
6720 ac_cv_sys_largefile_CC=' -n32'; break
6721fi
6722rm -f core conftest.err conftest.$ac_objext
6723 break
6724 done
6725 CC=$ac_save_CC
6726 rm -f conftest.$ac_ext
6727 fi
6728fi
6729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6730$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6731 if test "$ac_cv_sys_largefile_CC" != no; then
6732 CC=$CC$ac_cv_sys_largefile_CC
6733 fi
6734
6735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6736$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6737if ${ac_cv_sys_file_offset_bits+:} false; then :
6738 $as_echo_n "(cached) " >&6
6739else
6740 while :; do
6741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6742/* end confdefs.h. */
6743#include <sys/types.h>
6744 /* Check that off_t can represent 2**63 - 1 correctly.
6745 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6746 since some C++ compilers masquerading as C compilers
6747 incorrectly reject 9223372036854775807. */
6748#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6749 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6750 && LARGE_OFF_T % 2147483647 == 1)
6751 ? 1 : -1];
6752int
6753main ()
6754{
6755
6756 ;
6757 return 0;
6758}
6759_ACEOF
6760if ac_fn_c_try_compile "$LINENO"; then :
6761 ac_cv_sys_file_offset_bits=no; break
6762fi
6763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6765/* end confdefs.h. */
6766#define _FILE_OFFSET_BITS 64
6767#include <sys/types.h>
6768 /* Check that off_t can represent 2**63 - 1 correctly.
6769 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6770 since some C++ compilers masquerading as C compilers
6771 incorrectly reject 9223372036854775807. */
6772#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6773 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6774 && LARGE_OFF_T % 2147483647 == 1)
6775 ? 1 : -1];
6776int
6777main ()
6778{
6779
6780 ;
6781 return 0;
6782}
6783_ACEOF
6784if ac_fn_c_try_compile "$LINENO"; then :
6785 ac_cv_sys_file_offset_bits=64; break
6786fi
6787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6788 ac_cv_sys_file_offset_bits=unknown
6789 break
6790done
6791fi
6792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6793$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6794case $ac_cv_sys_file_offset_bits in #(
6795 no | unknown) ;;
6796 *)
6797cat >>confdefs.h <<_ACEOF
6798#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6799_ACEOF
6800;;
6801esac
6802rm -rf conftest*
6803 if test $ac_cv_sys_file_offset_bits = unknown; then
6804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6805$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6806if ${ac_cv_sys_large_files+:} false; then :
6807 $as_echo_n "(cached) " >&6
6808else
6809 while :; do
6810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6811/* end confdefs.h. */
6812#include <sys/types.h>
6813 /* Check that off_t can represent 2**63 - 1 correctly.
6814 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6815 since some C++ compilers masquerading as C compilers
6816 incorrectly reject 9223372036854775807. */
6817#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6818 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6819 && LARGE_OFF_T % 2147483647 == 1)
6820 ? 1 : -1];
6821int
6822main ()
6823{
6824
6825 ;
6826 return 0;
6827}
6828_ACEOF
6829if ac_fn_c_try_compile "$LINENO"; then :
6830 ac_cv_sys_large_files=no; break
6831fi
6832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6834/* end confdefs.h. */
6835#define _LARGE_FILES 1
6836#include <sys/types.h>
6837 /* Check that off_t can represent 2**63 - 1 correctly.
6838 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6839 since some C++ compilers masquerading as C compilers
6840 incorrectly reject 9223372036854775807. */
6841#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6842 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6843 && LARGE_OFF_T % 2147483647 == 1)
6844 ? 1 : -1];
6845int
6846main ()
6847{
6848
6849 ;
6850 return 0;
6851}
6852_ACEOF
6853if ac_fn_c_try_compile "$LINENO"; then :
6854 ac_cv_sys_large_files=1; break
6855fi
6856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6857 ac_cv_sys_large_files=unknown
6858 break
6859done
6860fi
6861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6862$as_echo "$ac_cv_sys_large_files" >&6; }
6863case $ac_cv_sys_large_files in #(
6864 no | unknown) ;;
6865 *)
6866cat >>confdefs.h <<_ACEOF
6867#define _LARGE_FILES $ac_cv_sys_large_files
6868_ACEOF
6869;;
6870esac
6871rm -rf conftest*
6872 fi
6873
6874
6875$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6876
6877fi
6878
6879
6880
6881ac_aux_dir=
6882for ac_dir in .. "$srcdir"/..; do
6883 if test -f "$ac_dir/install-sh"; then
6884 ac_aux_dir=$ac_dir
6885 ac_install_sh="$ac_aux_dir/install-sh -c"
6886 break
6887 elif test -f "$ac_dir/install.sh"; then
6888 ac_aux_dir=$ac_dir
6889 ac_install_sh="$ac_aux_dir/install.sh -c"
6890 break
6891 elif test -f "$ac_dir/shtool"; then
6892 ac_aux_dir=$ac_dir
6893 ac_install_sh="$ac_aux_dir/shtool install -c"
6894 break
6895 fi
6896done
6897if test -z "$ac_aux_dir"; then
6898 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
6899fi
6900
6901# These three variables are undocumented and unsupported,
6902# and are intended to be withdrawn in a future Autoconf release.
6903# They can cause serious problems if a builder's source tree is in a directory
6904# whose full name contains unusual characters.
6905ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6906ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6907ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6908
6909
6910
7a6dbc2f
SDJ
6911
6912
6913
6914
6915
6916
5e8754f9
SDJ
6917 LIBC_FATAL_STDERR_=1
6918 export LIBC_FATAL_STDERR_
7a6dbc2f 6919
5e8754f9
SDJ
6920ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6921if test "x$ac_cv_type_size_t" = xyes; then :
7a6dbc2f 6922
5e8754f9 6923else
7a6dbc2f 6924
5e8754f9
SDJ
6925cat >>confdefs.h <<_ACEOF
6926#define size_t unsigned int
6927_ACEOF
7a6dbc2f 6928
5e8754f9 6929fi
7a6dbc2f 6930
5e8754f9
SDJ
6931# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6932# for constant arguments. Useless!
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6934$as_echo_n "checking for working alloca.h... " >&6; }
6935if ${ac_cv_working_alloca_h+:} false; then :
c971b7fa 6936 $as_echo_n "(cached) " >&6
7a6dbc2f 6937else
5e8754f9
SDJ
6938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6939/* end confdefs.h. */
6940#include <alloca.h>
6941int
6942main ()
6943{
6944char *p = (char *) alloca (2 * sizeof (int));
6945 if (p) return 0;
6946 ;
6947 return 0;
6948}
6949_ACEOF
6950if ac_fn_c_try_link "$LINENO"; then :
6951 ac_cv_working_alloca_h=yes
6952else
6953 ac_cv_working_alloca_h=no
6954fi
6955rm -f core conftest.err conftest.$ac_objext \
6956 conftest$ac_exeext conftest.$ac_ext
6957fi
6958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6959$as_echo "$ac_cv_working_alloca_h" >&6; }
6960if test $ac_cv_working_alloca_h = yes; then
7a6dbc2f 6961
5e8754f9
SDJ
6962$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6963
6964fi
7a6dbc2f 6965
5e8754f9
SDJ
6966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6967$as_echo_n "checking for alloca... " >&6; }
6968if ${ac_cv_func_alloca_works+:} false; then :
6969 $as_echo_n "(cached) " >&6
c971b7fa
PA
6970else
6971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6972/* end confdefs.h. */
5e8754f9
SDJ
6973#ifdef __GNUC__
6974# define alloca __builtin_alloca
6975#else
6976# ifdef _MSC_VER
6977# include <malloc.h>
6978# define alloca _alloca
6979# else
6980# ifdef HAVE_ALLOCA_H
6981# include <alloca.h>
6982# else
6983# ifdef _AIX
6984 #pragma alloca
6985# else
6986# ifndef alloca /* predefined by HP cc +Olibcalls */
6987void *alloca (size_t);
6988# endif
6989# endif
6990# endif
6991# endif
6992#endif
7a6dbc2f 6993
5e8754f9
SDJ
6994int
6995main ()
7a6dbc2f 6996{
5e8754f9
SDJ
6997char *p = (char *) alloca (1);
6998 if (p) return 0;
6999 ;
7000 return 0;
7a6dbc2f 7001}
c971b7fa 7002_ACEOF
5e8754f9
SDJ
7003if ac_fn_c_try_link "$LINENO"; then :
7004 ac_cv_func_alloca_works=yes
c971b7fa 7005else
5e8754f9 7006 ac_cv_func_alloca_works=no
7a6dbc2f 7007fi
5e8754f9
SDJ
7008rm -f core conftest.err conftest.$ac_objext \
7009 conftest$ac_exeext conftest.$ac_ext
c0fc7f8b 7010fi
5e8754f9
SDJ
7011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7012$as_echo "$ac_cv_func_alloca_works" >&6; }
98399780 7013
5e8754f9 7014if test $ac_cv_func_alloca_works = yes; then
98399780 7015
5e8754f9 7016$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
472fa5ee 7017
5e8754f9
SDJ
7018else
7019 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7020# that cause trouble. Some versions do not even contain alloca or
7021# contain a buggy version. If you still want to use their alloca,
7022# use ar to extract alloca.o from them instead of compiling alloca.c.
472fa5ee
SM
7023
7024
7025
7026
7027
5e8754f9 7028ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
472fa5ee 7029
5e8754f9 7030$as_echo "#define C_ALLOCA 1" >>confdefs.h
472fa5ee
SM
7031
7032
5e8754f9
SDJ
7033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7034$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7035if ${ac_cv_os_cray+:} false; then :
7036 $as_echo_n "(cached) " >&6
7037else
7038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7039/* end confdefs.h. */
7040#if defined CRAY && ! defined CRAY2
7041webecray
7042#else
7043wenotbecray
7044#endif
472fa5ee 7045
5e8754f9
SDJ
7046_ACEOF
7047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7048 $EGREP "webecray" >/dev/null 2>&1; then :
7049 ac_cv_os_cray=yes
7050else
7051 ac_cv_os_cray=no
7052fi
7053rm -f conftest*
472fa5ee 7054
5e8754f9
SDJ
7055fi
7056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7057$as_echo "$ac_cv_os_cray" >&6; }
7058if test $ac_cv_os_cray = yes; then
7059 for ac_func in _getb67 GETB67 getb67; do
7060 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7061ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7062if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
472fa5ee 7063
5e8754f9
SDJ
7064cat >>confdefs.h <<_ACEOF
7065#define CRAY_STACKSEG_END $ac_func
7066_ACEOF
472fa5ee 7067
5e8754f9
SDJ
7068 break
7069fi
472fa5ee 7070
5e8754f9
SDJ
7071 done
7072fi
472fa5ee 7073
5e8754f9
SDJ
7074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7075$as_echo_n "checking stack direction for C alloca... " >&6; }
7076if ${ac_cv_c_stack_direction+:} false; then :
7077 $as_echo_n "(cached) " >&6
7078else
7079 if test "$cross_compiling" = yes; then :
7080 ac_cv_c_stack_direction=0
7081else
7082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7083/* end confdefs.h. */
7084$ac_includes_default
7085int
7086find_stack_direction (int *addr, int depth)
7087{
7088 int dir, dummy = 0;
7089 if (! addr)
7090 addr = &dummy;
7091 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7092 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7093 return dir + dummy;
7094}
472fa5ee 7095
5e8754f9
SDJ
7096int
7097main (int argc, char **argv)
7098{
7099 return find_stack_direction (0, argc + !argv + 20) < 0;
7100}
7101_ACEOF
7102if ac_fn_c_try_run "$LINENO"; then :
7103 ac_cv_c_stack_direction=1
7104else
7105 ac_cv_c_stack_direction=-1
7106fi
7107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7108 conftest.$ac_objext conftest.beam conftest.$ac_ext
7109fi
472fa5ee 7110
5e8754f9
SDJ
7111fi
7112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7113$as_echo "$ac_cv_c_stack_direction" >&6; }
7114cat >>confdefs.h <<_ACEOF
7115#define STACK_DIRECTION $ac_cv_c_stack_direction
7116_ACEOF
472fa5ee 7117
98399780 7118
5e8754f9 7119fi
98399780
YQ
7120
7121
725e2999
JB
7122 GNULIB_INET_NTOP=0;
7123 GNULIB_INET_PTON=0;
7124 HAVE_DECL_INET_NTOP=1;
7125 HAVE_DECL_INET_PTON=1;
7126 REPLACE_INET_NTOP=0;
7127 REPLACE_INET_PTON=0;
7128
7129
7130
7131
7132
7133 for ac_header in $gl_header_list
7134do :
7135 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7136ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7137if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7138 cat >>confdefs.h <<_ACEOF
7139#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7140_ACEOF
7141
7142fi
7143
7144done
7145
7146
7147
7148
7149
7150
7151
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7153$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7154if ${gl_cv_have_include_next+:} false; then :
7155 $as_echo_n "(cached) " >&6
7156else
7157 rm -rf conftestd1a conftestd1b conftestd2
7158 mkdir conftestd1a conftestd1b conftestd2
7159 cat <<EOF > conftestd1a/conftest.h
7160#define DEFINED_IN_CONFTESTD1
7161#include_next <conftest.h>
7162#ifdef DEFINED_IN_CONFTESTD2
7163int foo;
7164#else
7165#error "include_next doesn't work"
7166#endif
7167EOF
7168 cat <<EOF > conftestd1b/conftest.h
7169#define DEFINED_IN_CONFTESTD1
7170#include <stdio.h>
7171#include_next <conftest.h>
7172#ifdef DEFINED_IN_CONFTESTD2
7173int foo;
7174#else
7175#error "include_next doesn't work"
7176#endif
7177EOF
7178 cat <<EOF > conftestd2/conftest.h
7179#ifndef DEFINED_IN_CONFTESTD1
7180#error "include_next test doesn't work"
7181#endif
7182#define DEFINED_IN_CONFTESTD2
7183EOF
7184 gl_save_CPPFLAGS="$CPPFLAGS"
7185 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7187/* end confdefs.h. */
7188#include <conftest.h>
7189_ACEOF
7190if ac_fn_c_try_compile "$LINENO"; then :
7191 gl_cv_have_include_next=yes
7192else
7193 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7195/* end confdefs.h. */
7196#include <conftest.h>
7197_ACEOF
7198if ac_fn_c_try_compile "$LINENO"; then :
7199 gl_cv_have_include_next=buggy
7200else
7201 gl_cv_have_include_next=no
7202fi
7203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7204
7205fi
7206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7207 CPPFLAGS="$gl_save_CPPFLAGS"
7208 rm -rf conftestd1a conftestd1b conftestd2
7209
7210fi
7211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7212$as_echo "$gl_cv_have_include_next" >&6; }
7213 PRAGMA_SYSTEM_HEADER=
7214 if test $gl_cv_have_include_next = yes; then
7215 INCLUDE_NEXT=include_next
7216 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7217 if test -n "$GCC"; then
7218 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7219 fi
7220 else
7221 if test $gl_cv_have_include_next = buggy; then
7222 INCLUDE_NEXT=include
7223 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7224 else
7225 INCLUDE_NEXT=include
7226 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7227 fi
7228 fi
7229
7230
7231
7232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7233$as_echo_n "checking whether system header files limit the line length... " >&6; }
7234if ${gl_cv_pragma_columns+:} false; then :
7235 $as_echo_n "(cached) " >&6
7236else
7237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7238/* end confdefs.h. */
7239
7240#ifdef __TANDEM
7241choke me
7242#endif
7243
7244_ACEOF
7245if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7246 $EGREP "choke me" >/dev/null 2>&1; then :
7247 gl_cv_pragma_columns=yes
7248else
7249 gl_cv_pragma_columns=no
7250fi
7251rm -f conftest*
7252
7253
7254fi
7255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7256$as_echo "$gl_cv_pragma_columns" >&6; }
7257 if test $gl_cv_pragma_columns = yes; then
7258 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7259 else
7260 PRAGMA_COLUMNS=
7261 fi
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271 :
7272
7273
7274
7275
7276
7277 if test $ac_cv_header_features_h = yes; then
7278 HAVE_FEATURES_H=1
7279 else
7280 HAVE_FEATURES_H=0
7281 fi
7282
7283
7284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7285$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7286if test -z "$MKDIR_P"; then
7287 if ${ac_cv_path_mkdir+:} false; then :
7288 $as_echo_n "(cached) " >&6
7289else
7290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7291for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7292do
7293 IFS=$as_save_IFS
7294 test -z "$as_dir" && as_dir=.
7295 for ac_prog in mkdir gmkdir; do
7296 for ac_exec_ext in '' $ac_executable_extensions; do
7297 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7298 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7299 'mkdir (GNU coreutils) '* | \
7300 'mkdir (coreutils) '* | \
7301 'mkdir (fileutils) '4.1*)
7302 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7303 break 3;;
7304 esac
7305 done
7306 done
7307 done
7308IFS=$as_save_IFS
7309
7310fi
7311
7312 test -d ./--version && rmdir ./--version
7313 if test "${ac_cv_path_mkdir+set}" = set; then
7314 MKDIR_P="$ac_cv_path_mkdir -p"
7315 else
7316 # As a last resort, use the slow shell script. Don't cache a
7317 # value for MKDIR_P within a source directory, because that will
7318 # break other packages using the cache if that directory is
7319 # removed, or if the value is a relative name.
7320 MKDIR_P="$ac_install_sh -d"
7321 fi
7322fi
7323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7324$as_echo "$MKDIR_P" >&6; }
7325
7326
5e8754f9
SDJ
7327 GNULIB__EXIT=0;
7328 GNULIB_ATOLL=0;
7329 GNULIB_CALLOC_POSIX=0;
7330 GNULIB_CANONICALIZE_FILE_NAME=0;
7331 GNULIB_GETLOADAVG=0;
7332 GNULIB_GETSUBOPT=0;
7333 GNULIB_GRANTPT=0;
7334 GNULIB_MALLOC_POSIX=0;
7335 GNULIB_MBTOWC=0;
7336 GNULIB_MKDTEMP=0;
7337 GNULIB_MKOSTEMP=0;
7338 GNULIB_MKOSTEMPS=0;
7339 GNULIB_MKSTEMP=0;
7340 GNULIB_MKSTEMPS=0;
7341 GNULIB_POSIX_OPENPT=0;
7342 GNULIB_PTSNAME=0;
7343 GNULIB_PTSNAME_R=0;
7344 GNULIB_PUTENV=0;
7345 GNULIB_QSORT_R=0;
7346 GNULIB_RANDOM=0;
7347 GNULIB_RANDOM_R=0;
7348 GNULIB_REALLOC_POSIX=0;
7349 GNULIB_REALPATH=0;
7350 GNULIB_RPMATCH=0;
7351 GNULIB_SECURE_GETENV=0;
7352 GNULIB_SETENV=0;
7353 GNULIB_STRTOD=0;
7354 GNULIB_STRTOLL=0;
7355 GNULIB_STRTOULL=0;
7356 GNULIB_SYSTEM_POSIX=0;
7357 GNULIB_UNLOCKPT=0;
7358 GNULIB_UNSETENV=0;
7359 GNULIB_WCTOMB=0;
7360 HAVE__EXIT=1;
7361 HAVE_ATOLL=1;
7362 HAVE_CANONICALIZE_FILE_NAME=1;
7363 HAVE_DECL_GETLOADAVG=1;
7364 HAVE_GETSUBOPT=1;
7365 HAVE_GRANTPT=1;
7366 HAVE_MKDTEMP=1;
7367 HAVE_MKOSTEMP=1;
7368 HAVE_MKOSTEMPS=1;
7369 HAVE_MKSTEMP=1;
7370 HAVE_MKSTEMPS=1;
7371 HAVE_POSIX_OPENPT=1;
7372 HAVE_PTSNAME=1;
7373 HAVE_PTSNAME_R=1;
7374 HAVE_QSORT_R=1;
7375 HAVE_RANDOM=1;
7376 HAVE_RANDOM_H=1;
7377 HAVE_RANDOM_R=1;
7378 HAVE_REALPATH=1;
7379 HAVE_RPMATCH=1;
7380 HAVE_SECURE_GETENV=1;
7381 HAVE_SETENV=1;
7382 HAVE_DECL_SETENV=1;
7383 HAVE_STRTOD=1;
7384 HAVE_STRTOLL=1;
7385 HAVE_STRTOULL=1;
7386 HAVE_STRUCT_RANDOM_DATA=1;
7387 HAVE_SYS_LOADAVG_H=0;
7388 HAVE_UNLOCKPT=1;
7389 HAVE_DECL_UNSETENV=1;
7390 REPLACE_CALLOC=0;
7391 REPLACE_CANONICALIZE_FILE_NAME=0;
7392 REPLACE_MALLOC=0;
7393 REPLACE_MBTOWC=0;
7394 REPLACE_MKSTEMP=0;
7395 REPLACE_PTSNAME=0;
7396 REPLACE_PTSNAME_R=0;
7397 REPLACE_PUTENV=0;
7398 REPLACE_QSORT_R=0;
7399 REPLACE_RANDOM_R=0;
7400 REPLACE_REALLOC=0;
7401 REPLACE_REALPATH=0;
7402 REPLACE_SETENV=0;
7403 REPLACE_STRTOD=0;
7404 REPLACE_UNSETENV=0;
7405 REPLACE_WCTOMB=0;
6ec2e0f5
SDJ
7406
7407
7408
7409
472fa5ee 7410
5e8754f9
SDJ
7411 for ac_func in $gl_func_list
7412do :
7413 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7414ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7415if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7416 cat >>confdefs.h <<_ACEOF
7417#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7418_ACEOF
472fa5ee 7419
5e8754f9
SDJ
7420fi
7421done
472fa5ee
SM
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
472fa5ee
SM
7436
7437
7438
5e8754f9
SDJ
7439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7440$as_echo_n "checking whether // is distinct from /... " >&6; }
7441if ${gl_cv_double_slash_root+:} false; then :
7442 $as_echo_n "(cached) " >&6
7443else
7444 if test x"$cross_compiling" = xyes ; then
7445 # When cross-compiling, there is no way to tell whether // is special
7446 # short of a list of hosts. However, the only known hosts to date
7447 # that have a distinct // are Apollo DomainOS (too old to port to),
7448 # Cygwin, and z/OS. If anyone knows of another system for which // has
7449 # special semantics and is distinct from /, please report it to
7450 # <bug-gnulib@gnu.org>.
7451 case $host in
7452 *-cygwin | i370-ibm-openedition)
7453 gl_cv_double_slash_root=yes ;;
7454 *)
7455 # Be optimistic and assume that / and // are the same when we
7456 # don't know.
7457 gl_cv_double_slash_root='unknown, assuming no' ;;
7458 esac
7459 else
7460 set x `ls -di / // 2>/dev/null`
7461 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7462 gl_cv_double_slash_root=no
7463 else
7464 gl_cv_double_slash_root=yes
7465 fi
7466 fi
7467fi
7468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7469$as_echo "$gl_cv_double_slash_root" >&6; }
7470 if test "$gl_cv_double_slash_root" = yes; then
6ec2e0f5 7471
5e8754f9 7472$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6ec2e0f5 7473
5e8754f9 7474 fi
6ec2e0f5 7475
6ec2e0f5 7476
6ec2e0f5
SDJ
7477
7478
7479
7480
7481
7482
5e8754f9 7483 :
6ec2e0f5 7484
472fa5ee
SM
7485
7486
7487
7488
5e8754f9
SDJ
7489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
7490$as_echo_n "checking whether realpath works... " >&6; }
7491if ${gl_cv_func_realpath_works+:} false; then :
7492 $as_echo_n "(cached) " >&6
7493else
472fa5ee 7494
5e8754f9
SDJ
7495 touch conftest.a
7496 mkdir conftest.d
7497 if test "$cross_compiling" = yes; then :
7498 case "$host_os" in
7499 # Guess yes on glibc systems.
7500 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
7501 # If we don't know, assume the worst.
7502 *) gl_cv_func_realpath_works="guessing no" ;;
7503 esac
472fa5ee 7504
5e8754f9
SDJ
7505else
7506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7507/* end confdefs.h. */
e26b6bb0
TT
7508
7509
7510
5e8754f9
SDJ
7511#include <stdlib.h>
7512#if defined __MACH__ && defined __APPLE__
7513/* Avoid a crash on Mac OS X. */
7514#include <mach/mach.h>
7515#include <mach/mach_error.h>
7516#include <mach/thread_status.h>
7517#include <mach/exception.h>
7518#include <mach/task.h>
7519#include <pthread.h>
7520/* The exception port on which our thread listens. */
7521static mach_port_t our_exception_port;
7522/* The main function of the thread listening for exceptions of type
7523 EXC_BAD_ACCESS. */
7524static void *
7525mach_exception_thread (void *arg)
7526{
7527 /* Buffer for a message to be received. */
7528 struct {
7529 mach_msg_header_t head;
7530 mach_msg_body_t msgh_body;
7531 char data[1024];
7532 } msg;
7533 mach_msg_return_t retval;
7534 /* Wait for a message on the exception port. */
7535 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
7536 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
7537 if (retval != MACH_MSG_SUCCESS)
7538 abort ();
7539 exit (1);
7540}
7541static void
7542nocrash_init (void)
7543{
7544 mach_port_t self = mach_task_self ();
7545 /* Allocate a port on which the thread shall listen for exceptions. */
7546 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
7547 == KERN_SUCCESS) {
7548 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
7549 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
7550 MACH_MSG_TYPE_MAKE_SEND)
7551 == KERN_SUCCESS) {
7552 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
7553 for us. */
7554 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
7555 /* Create the thread listening on the exception port. */
7556 pthread_attr_t attr;
7557 pthread_t thread;
7558 if (pthread_attr_init (&attr) == 0
7559 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
7560 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
7561 pthread_attr_destroy (&attr);
7562 /* Replace the exception port info for these exceptions with our own.
7563 Note that we replace the exception port for the entire task, not only
7564 for a particular thread. This has the effect that when our exception
7565 port gets the message, the thread specific exception port has already
7566 been asked, and we don't need to bother about it.
7567 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
7568 task_set_exception_ports (self, mask, our_exception_port,
7569 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
7570 }
7571 }
7572 }
7573}
7574#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7575/* Avoid a crash on native Windows. */
7576#define WIN32_LEAN_AND_MEAN
7577#include <windows.h>
7578#include <winerror.h>
7579static LONG WINAPI
7580exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
7581{
7582 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
7583 {
7584 case EXCEPTION_ACCESS_VIOLATION:
7585 case EXCEPTION_IN_PAGE_ERROR:
7586 case EXCEPTION_STACK_OVERFLOW:
7587 case EXCEPTION_GUARD_PAGE:
7588 case EXCEPTION_PRIV_INSTRUCTION:
7589 case EXCEPTION_ILLEGAL_INSTRUCTION:
7590 case EXCEPTION_DATATYPE_MISALIGNMENT:
7591 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
7592 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
7593 exit (1);
7594 }
7595 return EXCEPTION_CONTINUE_SEARCH;
7596}
7597static void
7598nocrash_init (void)
7599{
7600 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
7601}
e26b6bb0 7602#else
5e8754f9
SDJ
7603/* Avoid a crash on POSIX systems. */
7604#include <signal.h>
7605#include <unistd.h>
7606/* A POSIX signal handler. */
7607static void
7608exception_handler (int sig)
7609{
7610 _exit (1);
7611}
7612static void
7613nocrash_init (void)
7614{
7615#ifdef SIGSEGV
7616 signal (SIGSEGV, exception_handler);
88b48903 7617#endif
5e8754f9
SDJ
7618#ifdef SIGBUS
7619 signal (SIGBUS, exception_handler);
88b48903 7620#endif
5e8754f9 7621}
88b48903 7622#endif
88b48903 7623
5e8754f9
SDJ
7624 #include <stdlib.h>
7625 #include <string.h>
88b48903 7626
5e8754f9
SDJ
7627int
7628main ()
7629{
88b48903 7630
5e8754f9
SDJ
7631 int result = 0;
7632 {
7633 char *name = realpath ("conftest.a", NULL);
7634 if (!(name && *name == '/'))
7635 result |= 1;
7636 free (name);
7637 }
7638 {
7639 char *name = realpath ("conftest.b/../conftest.a", NULL);
7640 if (name != NULL)
7641 result |= 2;
7642 free (name);
7643 }
7644 {
7645 char *name = realpath ("conftest.a/", NULL);
7646 if (name != NULL)
7647 result |= 4;
7648 free (name);
7649 }
7650 {
7651 char *name1 = realpath (".", NULL);
7652 char *name2 = realpath ("conftest.d//./..", NULL);
7653 if (! name1 || ! name2 || strcmp (name1, name2))
7654 result |= 8;
7655 free (name1);
7656 free (name2);
7657 }
7658 return result;
88b48903 7659
5e8754f9
SDJ
7660 ;
7661 return 0;
7662}
88b48903
WN
7663
7664_ACEOF
5e8754f9
SDJ
7665if ac_fn_c_try_run "$LINENO"; then :
7666 gl_cv_func_realpath_works=yes
88b48903 7667else
5e8754f9
SDJ
7668 gl_cv_func_realpath_works=no
7669fi
7670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7671 conftest.$ac_objext conftest.beam conftest.$ac_ext
88b48903 7672fi
88b48903 7673
5e8754f9 7674 rm -rf conftest.a conftest.d
88b48903
WN
7675
7676fi
5e8754f9
SDJ
7677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
7678$as_echo "$gl_cv_func_realpath_works" >&6; }
7679 case "$gl_cv_func_realpath_works" in
7680 *yes)
88b48903 7681
5e8754f9 7682$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
88b48903 7683
5e8754f9
SDJ
7684 ;;
7685 esac
88b48903
WN
7686
7687
e26b6bb0 7688
e26b6bb0 7689
3d99e817 7690
472fa5ee
SM
7691
7692
7693
7694
5e8754f9 7695 :
472fa5ee
SM
7696
7697
3d99e817 7698
3d99e817 7699
3d99e817 7700
3d99e817 7701
3d99e817 7702
3d99e817
AK
7703
7704
3d99e817
AK
7705
7706
7707
18848e28 7708
18848e28 7709
5e8754f9 7710 :
18848e28 7711
18848e28
GF
7712
7713
18848e28
GF
7714
7715
7716
7717
5e8754f9
SDJ
7718 GNULIB_CHDIR=0;
7719 GNULIB_CHOWN=0;
7720 GNULIB_CLOSE=0;
7721 GNULIB_DUP=0;
7722 GNULIB_DUP2=0;
7723 GNULIB_DUP3=0;
7724 GNULIB_ENVIRON=0;
7725 GNULIB_EUIDACCESS=0;
7726 GNULIB_FACCESSAT=0;
7727 GNULIB_FCHDIR=0;
7728 GNULIB_FCHOWNAT=0;
7729 GNULIB_FDATASYNC=0;
7730 GNULIB_FSYNC=0;
7731 GNULIB_FTRUNCATE=0;
7732 GNULIB_GETCWD=0;
7733 GNULIB_GETDOMAINNAME=0;
7734 GNULIB_GETDTABLESIZE=0;
7735 GNULIB_GETGROUPS=0;
7736 GNULIB_GETHOSTNAME=0;
7737 GNULIB_GETLOGIN=0;
7738 GNULIB_GETLOGIN_R=0;
7739 GNULIB_GETPAGESIZE=0;
7740 GNULIB_GETUSERSHELL=0;
7741 GNULIB_GROUP_MEMBER=0;
7742 GNULIB_ISATTY=0;
7743 GNULIB_LCHOWN=0;
7744 GNULIB_LINK=0;
7745 GNULIB_LINKAT=0;
7746 GNULIB_LSEEK=0;
7747 GNULIB_PIPE=0;
7748 GNULIB_PIPE2=0;
7749 GNULIB_PREAD=0;
7750 GNULIB_PWRITE=0;
7751 GNULIB_READ=0;
7752 GNULIB_READLINK=0;
7753 GNULIB_READLINKAT=0;
7754 GNULIB_RMDIR=0;
7755 GNULIB_SETHOSTNAME=0;
7756 GNULIB_SLEEP=0;
7757 GNULIB_SYMLINK=0;
7758 GNULIB_SYMLINKAT=0;
7759 GNULIB_TTYNAME_R=0;
7760 GNULIB_UNISTD_H_NONBLOCKING=0;
7761 GNULIB_UNISTD_H_SIGPIPE=0;
7762 GNULIB_UNLINK=0;
7763 GNULIB_UNLINKAT=0;
7764 GNULIB_USLEEP=0;
7765 GNULIB_WRITE=0;
7766 HAVE_CHOWN=1;
7767 HAVE_DUP2=1;
7768 HAVE_DUP3=1;
7769 HAVE_EUIDACCESS=1;
7770 HAVE_FACCESSAT=1;
7771 HAVE_FCHDIR=1;
7772 HAVE_FCHOWNAT=1;
7773 HAVE_FDATASYNC=1;
7774 HAVE_FSYNC=1;
7775 HAVE_FTRUNCATE=1;
7776 HAVE_GETDTABLESIZE=1;
7777 HAVE_GETGROUPS=1;
7778 HAVE_GETHOSTNAME=1;
7779 HAVE_GETLOGIN=1;
7780 HAVE_GETPAGESIZE=1;
7781 HAVE_GROUP_MEMBER=1;
7782 HAVE_LCHOWN=1;
7783 HAVE_LINK=1;
7784 HAVE_LINKAT=1;
7785 HAVE_PIPE=1;
7786 HAVE_PIPE2=1;
7787 HAVE_PREAD=1;
7788 HAVE_PWRITE=1;
7789 HAVE_READLINK=1;
7790 HAVE_READLINKAT=1;
7791 HAVE_SETHOSTNAME=1;
7792 HAVE_SLEEP=1;
7793 HAVE_SYMLINK=1;
7794 HAVE_SYMLINKAT=1;
7795 HAVE_UNLINKAT=1;
7796 HAVE_USLEEP=1;
7797 HAVE_DECL_ENVIRON=1;
7798 HAVE_DECL_FCHDIR=1;
7799 HAVE_DECL_FDATASYNC=1;
7800 HAVE_DECL_GETDOMAINNAME=1;
7801 HAVE_DECL_GETLOGIN_R=1;
7802 HAVE_DECL_GETPAGESIZE=1;
7803 HAVE_DECL_GETUSERSHELL=1;
7804 HAVE_DECL_SETHOSTNAME=1;
7805 HAVE_DECL_TTYNAME_R=1;
7806 HAVE_OS_H=0;
7807 HAVE_SYS_PARAM_H=0;
7808 REPLACE_CHOWN=0;
7809 REPLACE_CLOSE=0;
7810 REPLACE_DUP=0;
7811 REPLACE_DUP2=0;
7812 REPLACE_FCHOWNAT=0;
7813 REPLACE_FTRUNCATE=0;
7814 REPLACE_GETCWD=0;
7815 REPLACE_GETDOMAINNAME=0;
7816 REPLACE_GETDTABLESIZE=0;
7817 REPLACE_GETLOGIN_R=0;
7818 REPLACE_GETGROUPS=0;
7819 REPLACE_GETPAGESIZE=0;
7820 REPLACE_ISATTY=0;
7821 REPLACE_LCHOWN=0;
7822 REPLACE_LINK=0;
7823 REPLACE_LINKAT=0;
7824 REPLACE_LSEEK=0;
7825 REPLACE_PREAD=0;
7826 REPLACE_PWRITE=0;
7827 REPLACE_READ=0;
7828 REPLACE_READLINK=0;
7829 REPLACE_READLINKAT=0;
7830 REPLACE_RMDIR=0;
7831 REPLACE_SLEEP=0;
7832 REPLACE_SYMLINK=0;
7833 REPLACE_SYMLINKAT=0;
7834 REPLACE_TTYNAME_R=0;
7835 REPLACE_UNLINK=0;
7836 REPLACE_UNLINKAT=0;
7837 REPLACE_USLEEP=0;
7838 REPLACE_WRITE=0;
7839 UNISTD_H_HAVE_WINSOCK2_H=0;
7840 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
18848e28
GF
7841
7842
7843
7844
18848e28 7845
4a626d0a
PA
7846
7847
18848e28 7848
4a626d0a 7849
5e8754f9 7850 :
4a626d0a 7851
4a626d0a
PA
7852
7853
18848e28 7854
18848e28
GF
7855
7856
7857
7858
18848e28 7859
18848e28
GF
7860
7861
18848e28 7862
18848e28 7863
18848e28 7864
18848e28 7865
18848e28 7866
5e8754f9 7867 :
18848e28 7868
18848e28 7869
18848e28 7870
18848e28 7871
18848e28 7872
5e8754f9
SDJ
7873 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7874 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
18848e28 7875
5e8754f9 7876$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
18848e28 7877
5e8754f9
SDJ
7878 else
7879 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
18848e28
GF
7880 fi
7881
7882
18848e28 7883
18848e28 7884
18848e28 7885
18848e28 7886
18848e28 7887
18848e28 7888
18848e28 7889
18848e28 7890
18848e28 7891
18848e28 7892
18848e28 7893
5e8754f9
SDJ
7894 GNULIB_OPENDIR=0;
7895 GNULIB_READDIR=0;
7896 GNULIB_REWINDDIR=0;
7897 GNULIB_CLOSEDIR=0;
7898 GNULIB_DIRFD=0;
7899 GNULIB_FDOPENDIR=0;
7900 GNULIB_SCANDIR=0;
7901 GNULIB_ALPHASORT=0;
7902 HAVE_OPENDIR=1;
7903 HAVE_READDIR=1;
7904 HAVE_REWINDDIR=1;
7905 HAVE_CLOSEDIR=1;
7906 HAVE_DECL_DIRFD=1;
7907 HAVE_DECL_FDOPENDIR=1;
7908 HAVE_FDOPENDIR=1;
7909 HAVE_SCANDIR=1;
7910 HAVE_ALPHASORT=1;
7911 REPLACE_OPENDIR=0;
7912 REPLACE_CLOSEDIR=0;
7913 REPLACE_DIRFD=0;
7914 REPLACE_FDOPENDIR=0;
18848e28 7915
18848e28
GF
7916
7917
63ce7108
TT
7918
7919
7920
7921
7922
7923
7924
7925
5e8754f9 7926 :
63ce7108 7927
472fa5ee
SM
7928
7929
7930
7931
7932
472fa5ee 7933
5e8754f9
SDJ
7934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
7935$as_echo_n "checking if environ is properly declared... " >&6; }
7936 if ${gt_cv_var_environ_declaration+:} false; then :
7937 $as_echo_n "(cached) " >&6
7938else
472fa5ee 7939
5e8754f9
SDJ
7940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7941/* end confdefs.h. */
7942#if HAVE_UNISTD_H
7943 #include <unistd.h>
7944 #endif
7945 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
7946 #include <stdlib.h>
472fa5ee 7947
5e8754f9
SDJ
7948 extern struct { int foo; } environ;
7949int
7950main ()
7951{
7952environ.foo = 1;
7953 ;
7954 return 0;
7955}
7956_ACEOF
7957if ac_fn_c_try_compile "$LINENO"; then :
7958 gt_cv_var_environ_declaration=no
7959else
7960 gt_cv_var_environ_declaration=yes
7961fi
7962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7963fi
472fa5ee 7964
5e8754f9
SDJ
7965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
7966$as_echo "$gt_cv_var_environ_declaration" >&6; }
7967 if test $gt_cv_var_environ_declaration = yes; then
472fa5ee 7968
5e8754f9 7969$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
472fa5ee 7970
5e8754f9 7971 fi
472fa5ee
SM
7972
7973
5e8754f9
SDJ
7974 if test $gt_cv_var_environ_declaration != yes; then
7975 HAVE_DECL_ENVIRON=0
7976 fi
472fa5ee
SM
7977
7978
7979
5e8754f9
SDJ
7980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7981$as_echo_n "checking for complete errno.h... " >&6; }
7982if ${gl_cv_header_errno_h_complete+:} false; then :
6ec2e0f5
SDJ
7983 $as_echo_n "(cached) " >&6
7984else
7a6dbc2f 7985
5e8754f9 7986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 7987/* end confdefs.h. */
63ce7108 7988
5e8754f9
SDJ
7989#include <errno.h>
7990#if !defined ETXTBSY
7991booboo
7992#endif
7993#if !defined ENOMSG
7994booboo
7995#endif
7996#if !defined EIDRM
7997booboo
7998#endif
7999#if !defined ENOLINK
8000booboo
8001#endif
8002#if !defined EPROTO
8003booboo
8004#endif
8005#if !defined EMULTIHOP
8006booboo
8007#endif
8008#if !defined EBADMSG
8009booboo
8010#endif
8011#if !defined EOVERFLOW
8012booboo
8013#endif
8014#if !defined ENOTSUP
8015booboo
8016#endif
8017#if !defined ENETRESET
8018booboo
8019#endif
8020#if !defined ECONNABORTED
8021booboo
8022#endif
8023#if !defined ESTALE
8024booboo
8025#endif
8026#if !defined EDQUOT
8027booboo
8028#endif
8029#if !defined ECANCELED
8030booboo
8031#endif
8032#if !defined EOWNERDEAD
8033booboo
8034#endif
8035#if !defined ENOTRECOVERABLE
8036booboo
8037#endif
8038#if !defined EILSEQ
8039booboo
8040#endif
6ec2e0f5 8041
6ec2e0f5 8042_ACEOF
5e8754f9
SDJ
8043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8044 $EGREP "booboo" >/dev/null 2>&1; then :
8045 gl_cv_header_errno_h_complete=no
6ec2e0f5 8046else
5e8754f9 8047 gl_cv_header_errno_h_complete=yes
6ec2e0f5 8048fi
5e8754f9 8049rm -f conftest*
6ec2e0f5 8050
6ec2e0f5
SDJ
8051
8052fi
5e8754f9
SDJ
8053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8054$as_echo "$gl_cv_header_errno_h_complete" >&6; }
8055 if test $gl_cv_header_errno_h_complete = yes; then
8056 ERRNO_H=''
8057 else
472fa5ee
SM
8058
8059
8060
8061
8062
8063
8064
8065
7a6dbc2f 8066 if test $gl_cv_have_include_next = yes; then
5e8754f9 8067 gl_cv_next_errno_h='<'errno.h'>'
7a6dbc2f 8068 else
5e8754f9
SDJ
8069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8070$as_echo_n "checking absolute name of <errno.h>... " >&6; }
8071if ${gl_cv_next_errno_h+:} false; then :
7a6dbc2f
SDJ
8072 $as_echo_n "(cached) " >&6
8073else
472fa5ee 8074
472fa5ee
SM
8075
8076
7a6dbc2f
SDJ
8077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8078/* end confdefs.h. */
5e8754f9 8079#include <errno.h>
7a6dbc2f
SDJ
8080_ACEOF
8081 case "$host_os" in
8082 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8083 *) gl_absname_cpp="$ac_cpp" ;;
8084 esac
472fa5ee 8085
7a6dbc2f
SDJ
8086 case "$host_os" in
8087 mingw*)
8088 gl_dirsep_regex='[/\\]'
8089 ;;
8090 *)
8091 gl_dirsep_regex='\/'
8092 ;;
8093 esac
8094 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5e8754f9 8095 gl_header_literal_regex=`echo 'errno.h' \
7a6dbc2f
SDJ
8096 | sed -e "$gl_make_literal_regex_sed"`
8097 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8098 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8099 s|^/[^/]|//&|
8100 p
8101 q
8102 }'
8103
5e8754f9 8104 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7a6dbc2f
SDJ
8105 sed -n "$gl_absolute_header_sed"`
8106
5e8754f9
SDJ
8107 gl_header=$gl_cv_absolute_errno_h
8108 gl_cv_next_errno_h='"'$gl_header'"'
7a6dbc2f
SDJ
8109
8110
8111fi
5e8754f9
SDJ
8112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8113$as_echo "$gl_cv_next_errno_h" >&6; }
7a6dbc2f 8114 fi
5e8754f9 8115 NEXT_ERRNO_H=$gl_cv_next_errno_h
7a6dbc2f
SDJ
8116
8117 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8118 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5e8754f9 8119 gl_next_as_first_directive='<'errno.h'>'
7a6dbc2f
SDJ
8120 else
8121 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5e8754f9 8122 gl_next_as_first_directive=$gl_cv_next_errno_h
7a6dbc2f 8123 fi
5e8754f9 8124 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7a6dbc2f
SDJ
8125
8126
8127
8128
5e8754f9 8129 ERRNO_H='errno.h'
7a6dbc2f
SDJ
8130 fi
8131
5e8754f9
SDJ
8132 if test -n "$ERRNO_H"; then
8133 GL_GENERATE_ERRNO_H_TRUE=
8134 GL_GENERATE_ERRNO_H_FALSE='#'
7a6dbc2f 8135else
5e8754f9
SDJ
8136 GL_GENERATE_ERRNO_H_TRUE='#'
8137 GL_GENERATE_ERRNO_H_FALSE=
7a6dbc2f
SDJ
8138fi
8139
8140
5e8754f9
SDJ
8141 if test -n "$ERRNO_H"; then
8142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8143$as_echo_n "checking for EMULTIHOP value... " >&6; }
8144if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
8145 $as_echo_n "(cached) " >&6
8146else
7a6dbc2f 8147
5e8754f9
SDJ
8148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8149/* end confdefs.h. */
7a6dbc2f 8150
5e8754f9
SDJ
8151#include <errno.h>
8152#ifdef EMULTIHOP
8153yes
8154#endif
7a6dbc2f 8155
7a6dbc2f 8156_ACEOF
5e8754f9
SDJ
8157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8158 $EGREP "yes" >/dev/null 2>&1; then :
8159 gl_cv_header_errno_h_EMULTIHOP=yes
7a6dbc2f 8160else
5e8754f9 8161 gl_cv_header_errno_h_EMULTIHOP=no
7a6dbc2f 8162fi
5e8754f9 8163rm -f conftest*
7a6dbc2f 8164
5e8754f9
SDJ
8165 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8167/* end confdefs.h. */
7a6dbc2f 8168
5e8754f9
SDJ
8169#define _XOPEN_SOURCE_EXTENDED 1
8170#include <errno.h>
8171#ifdef EMULTIHOP
8172yes
8173#endif
7a6dbc2f 8174
5e8754f9
SDJ
8175_ACEOF
8176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8177 $EGREP "yes" >/dev/null 2>&1; then :
8178 gl_cv_header_errno_h_EMULTIHOP=hidden
8179fi
8180rm -f conftest*
7a6dbc2f 8181
5e8754f9
SDJ
8182 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8183 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
8184#define _XOPEN_SOURCE_EXTENDED 1
8185#include <errno.h>
8186/* The following two lines are a workaround against an autoconf-2.52 bug. */
8187#include <stdio.h>
8188#include <stdlib.h>
8189"; then :
7a6dbc2f 8190
5e8754f9 8191fi
7a6dbc2f 8192
5e8754f9
SDJ
8193 fi
8194 fi
7a6dbc2f 8195
5e8754f9
SDJ
8196fi
8197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8198$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8199 case $gl_cv_header_errno_h_EMULTIHOP in
8200 yes | no)
8201 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8202 ;;
8203 *)
8204 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8205 ;;
8206 esac
7a6dbc2f
SDJ
8207
8208
5e8754f9 8209 fi
7a6dbc2f
SDJ
8210
8211
5e8754f9
SDJ
8212 if test -n "$ERRNO_H"; then
8213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8214$as_echo_n "checking for ENOLINK value... " >&6; }
8215if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
8216 $as_echo_n "(cached) " >&6
8217else
7a6dbc2f 8218
5e8754f9
SDJ
8219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8220/* end confdefs.h. */
7a6dbc2f 8221
5e8754f9
SDJ
8222#include <errno.h>
8223#ifdef ENOLINK
8224yes
8225#endif
7a6dbc2f 8226
5e8754f9
SDJ
8227_ACEOF
8228if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8229 $EGREP "yes" >/dev/null 2>&1; then :
8230 gl_cv_header_errno_h_ENOLINK=yes
8231else
8232 gl_cv_header_errno_h_ENOLINK=no
8233fi
8234rm -f conftest*
7a6dbc2f 8235
5e8754f9
SDJ
8236 if test $gl_cv_header_errno_h_ENOLINK = no; then
8237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8238/* end confdefs.h. */
7a6dbc2f 8239
5e8754f9
SDJ
8240#define _XOPEN_SOURCE_EXTENDED 1
8241#include <errno.h>
8242#ifdef ENOLINK
8243yes
8244#endif
7a6dbc2f 8245
5e8754f9
SDJ
8246_ACEOF
8247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8248 $EGREP "yes" >/dev/null 2>&1; then :
8249 gl_cv_header_errno_h_ENOLINK=hidden
8250fi
8251rm -f conftest*
7a6dbc2f 8252
5e8754f9
SDJ
8253 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8254 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
8255#define _XOPEN_SOURCE_EXTENDED 1
8256#include <errno.h>
8257/* The following two lines are a workaround against an autoconf-2.52 bug. */
8258#include <stdio.h>
8259#include <stdlib.h>
8260"; then :
7a6dbc2f 8261
5e8754f9 8262fi
7a6dbc2f 8263
5e8754f9
SDJ
8264 fi
8265 fi
7a6dbc2f 8266
5e8754f9
SDJ
8267fi
8268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8269$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
8270 case $gl_cv_header_errno_h_ENOLINK in
8271 yes | no)
8272 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8273 ;;
8274 *)
8275 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8276 ;;
8277 esac
7a6dbc2f
SDJ
8278
8279
5e8754f9 8280 fi
7a6dbc2f
SDJ
8281
8282
5e8754f9
SDJ
8283 if test -n "$ERRNO_H"; then
8284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8285$as_echo_n "checking for EOVERFLOW value... " >&6; }
8286if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
8287 $as_echo_n "(cached) " >&6
8288else
7a6dbc2f 8289
5e8754f9
SDJ
8290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8291/* end confdefs.h. */
7a6dbc2f 8292
5e8754f9
SDJ
8293#include <errno.h>
8294#ifdef EOVERFLOW
8295yes
8296#endif
7a6dbc2f 8297
5e8754f9
SDJ
8298_ACEOF
8299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8300 $EGREP "yes" >/dev/null 2>&1; then :
8301 gl_cv_header_errno_h_EOVERFLOW=yes
8302else
8303 gl_cv_header_errno_h_EOVERFLOW=no
8304fi
8305rm -f conftest*
7a6dbc2f 8306
5e8754f9
SDJ
8307 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8309/* end confdefs.h. */
7a6dbc2f 8310
5e8754f9
SDJ
8311#define _XOPEN_SOURCE_EXTENDED 1
8312#include <errno.h>
8313#ifdef EOVERFLOW
8314yes
8315#endif
7a6dbc2f 8316
5e8754f9
SDJ
8317_ACEOF
8318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8319 $EGREP "yes" >/dev/null 2>&1; then :
8320 gl_cv_header_errno_h_EOVERFLOW=hidden
8321fi
8322rm -f conftest*
7a6dbc2f 8323
5e8754f9
SDJ
8324 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8325 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
8326#define _XOPEN_SOURCE_EXTENDED 1
8327#include <errno.h>
8328/* The following two lines are a workaround against an autoconf-2.52 bug. */
8329#include <stdio.h>
8330#include <stdlib.h>
8331"; then :
7a6dbc2f 8332
5e8754f9 8333fi
7a6dbc2f 8334
5e8754f9
SDJ
8335 fi
8336 fi
7a6dbc2f 8337
5e8754f9
SDJ
8338fi
8339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8340$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8341 case $gl_cv_header_errno_h_EOVERFLOW in
8342 yes | no)
8343 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8344 ;;
8345 *)
8346 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8347 ;;
8348 esac
7a6dbc2f
SDJ
8349
8350
5e8754f9 8351 fi
7a6dbc2f
SDJ
8352
8353
5e8754f9
SDJ
8354ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8355if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8356 ac_have_decl=1
8357else
8358 ac_have_decl=0
8359fi
7a6dbc2f 8360
5e8754f9
SDJ
8361cat >>confdefs.h <<_ACEOF
8362#define HAVE_DECL_STRERROR_R $ac_have_decl
8363_ACEOF
7a6dbc2f 8364
5e8754f9
SDJ
8365for ac_func in strerror_r
8366do :
8367 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8368if test "x$ac_cv_func_strerror_r" = xyes; then :
8369 cat >>confdefs.h <<_ACEOF
8370#define HAVE_STRERROR_R 1
8371_ACEOF
7a6dbc2f 8372
5e8754f9
SDJ
8373fi
8374done
7a6dbc2f 8375
5e8754f9
SDJ
8376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8377$as_echo_n "checking whether strerror_r returns char *... " >&6; }
8378if ${ac_cv_func_strerror_r_char_p+:} false; then :
8379 $as_echo_n "(cached) " >&6
8380else
7a6dbc2f 8381
5e8754f9
SDJ
8382 ac_cv_func_strerror_r_char_p=no
8383 if test $ac_cv_have_decl_strerror_r = yes; then
8384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8385/* end confdefs.h. */
8386$ac_includes_default
8387int
8388main ()
8389{
7a6dbc2f 8390
5e8754f9
SDJ
8391 char buf[100];
8392 char x = *strerror_r (0, buf, sizeof buf);
8393 char *p = strerror_r (0, buf, sizeof buf);
8394 return !p || x;
7a6dbc2f 8395
7a6dbc2f
SDJ
8396 ;
8397 return 0;
8398}
8399_ACEOF
5e8754f9
SDJ
8400if ac_fn_c_try_compile "$LINENO"; then :
8401 ac_cv_func_strerror_r_char_p=yes
7a6dbc2f 8402fi
5e8754f9
SDJ
8403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8404 else
8405 # strerror_r is not declared. Choose between
8406 # systems that have relatively inaccessible declarations for the
8407 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
8408 # former has a strerror_r that returns char*, while the latter
8409 # has a strerror_r that returns `int'.
8410 # This test should segfault on the DEC system.
8411 if test "$cross_compiling" = yes; then :
8412 :
7a6dbc2f 8413else
5e8754f9 8414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7a6dbc2f 8415/* end confdefs.h. */
5e8754f9
SDJ
8416$ac_includes_default
8417 extern char *strerror_r ();
7a6dbc2f
SDJ
8418int
8419main ()
8420{
5e8754f9
SDJ
8421char buf[100];
8422 char x = *strerror_r (0, buf, sizeof buf);
8423 return ! isalpha (x);
7a6dbc2f
SDJ
8424 ;
8425 return 0;
8426}
8427_ACEOF
5e8754f9
SDJ
8428if ac_fn_c_try_run "$LINENO"; then :
8429 ac_cv_func_strerror_r_char_p=yes
7a6dbc2f 8430fi
5e8754f9
SDJ
8431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8432 conftest.$ac_objext conftest.beam conftest.$ac_ext
7a6dbc2f 8433fi
5e8754f9 8434
7a6dbc2f 8435 fi
7a6dbc2f 8436
5e8754f9
SDJ
8437fi
8438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8439$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
8440if test $ac_cv_func_strerror_r_char_p = yes; then
7a6dbc2f 8441
5e8754f9 8442$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
7a6dbc2f 8443
5e8754f9 8444fi
7a6dbc2f
SDJ
8445
8446
73cc7272
TT
8447 XGETTEXT_EXTRA_OPTIONS=
8448
8449
7a6dbc2f
SDJ
8450
8451
8452
5e8754f9
SDJ
8453 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8454if test "x$ac_cv_have_decl_fchdir" = xyes; then :
8455 ac_have_decl=1
7a6dbc2f 8456else
5e8754f9
SDJ
8457 ac_have_decl=0
8458fi
7a6dbc2f 8459
5e8754f9
SDJ
8460cat >>confdefs.h <<_ACEOF
8461#define HAVE_DECL_FCHDIR $ac_have_decl
8462_ACEOF
7a6dbc2f 8463
7a6dbc2f 8464
7a6dbc2f 8465
5e8754f9
SDJ
8466 GNULIB_FCNTL=0;
8467 GNULIB_NONBLOCKING=0;
8468 GNULIB_OPEN=0;
8469 GNULIB_OPENAT=0;
8470 HAVE_FCNTL=1;
8471 HAVE_OPENAT=1;
8472 REPLACE_FCNTL=0;
8473 REPLACE_OPEN=0;
8474 REPLACE_OPENAT=0;
7a6dbc2f 8475
7a6dbc2f 8476
7a6dbc2f
SDJ
8477
8478
7a6dbc2f 8479
7a6dbc2f 8480
7a6dbc2f 8481
7a6dbc2f
SDJ
8482
8483
8484
7a6dbc2f 8485
7a6dbc2f 8486
7a6dbc2f 8487
7a6dbc2f 8488
7a6dbc2f 8489
5e8754f9 8490 :
7a6dbc2f
SDJ
8491
8492
8493
8494
8495
8496
5e8754f9 8497 :
7a6dbc2f 8498
7a6dbc2f 8499
7a6dbc2f
SDJ
8500
8501
7a6dbc2f 8502
5e8754f9
SDJ
8503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8504$as_echo_n "checking for working fcntl.h... " >&6; }
8505if ${gl_cv_header_working_fcntl_h+:} false; then :
88b48903
WN
8506 $as_echo_n "(cached) " >&6
8507else
5e8754f9
SDJ
8508 if test "$cross_compiling" = yes; then :
8509 gl_cv_header_working_fcntl_h=cross-compiling
8510else
8511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903 8512/* end confdefs.h. */
5e8754f9
SDJ
8513#include <sys/types.h>
8514 #include <sys/stat.h>
8515 #if HAVE_UNISTD_H
8516 # include <unistd.h>
8517 #else /* on Windows with MSVC */
8518 # include <io.h>
8519 # include <stdlib.h>
8520 # defined sleep(n) _sleep ((n) * 1000)
8521 #endif
8522 #include <fcntl.h>
8523 #ifndef O_NOATIME
8524 #define O_NOATIME 0
8525 #endif
8526 #ifndef O_NOFOLLOW
8527 #define O_NOFOLLOW 0
8528 #endif
8529 static int const constants[] =
8530 {
8531 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8532 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8533 };
8534
8535int
88b48903
WN
8536main ()
8537{
5e8754f9
SDJ
8538
8539 int result = !constants;
8540 #if HAVE_SYMLINK
8541 {
8542 static char const sym[] = "conftest.sym";
8543 if (symlink ("/dev/null", sym) != 0)
8544 result |= 2;
8545 else
8546 {
8547 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8548 if (fd >= 0)
8549 {
8550 close (fd);
8551 result |= 4;
8552 }
8553 }
8554 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8555 result |= 2;
8556 else
8557 {
8558 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8559 if (fd >= 0)
8560 {
8561 close (fd);
8562 result |= 4;
8563 }
8564 }
8565 unlink (sym);
8566 }
8567 #endif
8568 {
8569 static char const file[] = "confdefs.h";
8570 int fd = open (file, O_RDONLY | O_NOATIME);
8571 if (fd < 0)
8572 result |= 8;
8573 else
8574 {
8575 struct stat st0;
8576 if (fstat (fd, &st0) != 0)
8577 result |= 16;
8578 else
8579 {
8580 char c;
8581 sleep (1);
8582 if (read (fd, &c, 1) != 1)
8583 result |= 24;
8584 else
8585 {
8586 if (close (fd) != 0)
8587 result |= 32;
8588 else
8589 {
8590 struct stat st1;
8591 if (stat (file, &st1) != 0)
8592 result |= 40;
8593 else
8594 if (st0.st_atime != st1.st_atime)
8595 result |= 64;
8596 }
8597 }
8598 }
8599 }
8600 }
8601 return result;
88b48903
WN
8602 ;
8603 return 0;
8604}
8605_ACEOF
5e8754f9
SDJ
8606if ac_fn_c_try_run "$LINENO"; then :
8607 gl_cv_header_working_fcntl_h=yes
88b48903 8608else
5e8754f9
SDJ
8609 case $? in #(
8610 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8611 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8612 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8613 *) gl_cv_header_working_fcntl_h='no';;
8614 esac
88b48903 8615fi
5e8754f9
SDJ
8616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8617 conftest.$ac_objext conftest.beam conftest.$ac_ext
8618fi
8619
8620fi
8621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8622$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
8623
8624 case $gl_cv_header_working_fcntl_h in #(
8625 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8626 *) ac_val=1;;
8627 esac
8628
8629cat >>confdefs.h <<_ACEOF
8630#define HAVE_WORKING_O_NOATIME $ac_val
8631_ACEOF
8632
8633
8634 case $gl_cv_header_working_fcntl_h in #(
8635 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8636 *) ac_val=1;;
8637 esac
8638
8639cat >>confdefs.h <<_ACEOF
8640#define HAVE_WORKING_O_NOFOLLOW $ac_val
8641_ACEOF
8642
8643
8644ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8645if test "x$ac_cv_type_pid_t" = xyes; then :
8646
8647else
8648
8649cat >>confdefs.h <<_ACEOF
8650#define pid_t int
8651_ACEOF
8652
8653fi
8654
8655ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8656if test "x$ac_cv_type_mode_t" = xyes; then :
8657
8658else
8659
8660cat >>confdefs.h <<_ACEOF
8661#define mode_t int
8662_ACEOF
8663
8664fi
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
8679$as_echo_n "checking for mbstate_t... " >&6; }
8680if ${ac_cv_type_mbstate_t+:} false; then :
8681 $as_echo_n "(cached) " >&6
8682else
8683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8684/* end confdefs.h. */
8685$ac_includes_default
8686/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8687 <wchar.h>.
8688 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8689 included before <wchar.h>. */
8690#include <stddef.h>
8691#include <stdio.h>
8692#include <time.h>
8693#include <wchar.h>
8694int
8695main ()
8696{
8697mbstate_t x; return sizeof x;
8698 ;
8699 return 0;
8700}
8701_ACEOF
8702if ac_fn_c_try_compile "$LINENO"; then :
8703 ac_cv_type_mbstate_t=yes
8704else
8705 ac_cv_type_mbstate_t=no
8706fi
8707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8708fi
8709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
8710$as_echo "$ac_cv_type_mbstate_t" >&6; }
8711 if test $ac_cv_type_mbstate_t = yes; then
8712
8713$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
8714
8715 else
8716
8717$as_echo "#define mbstate_t int" >>confdefs.h
8718
8719 fi
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762 GNULIB_ACOSF=0;
8763 GNULIB_ACOSL=0;
8764 GNULIB_ASINF=0;
8765 GNULIB_ASINL=0;
8766 GNULIB_ATANF=0;
8767 GNULIB_ATANL=0;
8768 GNULIB_ATAN2F=0;
8769 GNULIB_CBRT=0;
8770 GNULIB_CBRTF=0;
8771 GNULIB_CBRTL=0;
8772 GNULIB_CEIL=0;
8773 GNULIB_CEILF=0;
8774 GNULIB_CEILL=0;
8775 GNULIB_COPYSIGN=0;
8776 GNULIB_COPYSIGNF=0;
8777 GNULIB_COPYSIGNL=0;
8778 GNULIB_COSF=0;
8779 GNULIB_COSL=0;
8780 GNULIB_COSHF=0;
8781 GNULIB_EXPF=0;
8782 GNULIB_EXPL=0;
8783 GNULIB_EXP2=0;
8784 GNULIB_EXP2F=0;
8785 GNULIB_EXP2L=0;
8786 GNULIB_EXPM1=0;
8787 GNULIB_EXPM1F=0;
8788 GNULIB_EXPM1L=0;
8789 GNULIB_FABSF=0;
8790 GNULIB_FABSL=0;
8791 GNULIB_FLOOR=0;
8792 GNULIB_FLOORF=0;
8793 GNULIB_FLOORL=0;
8794 GNULIB_FMA=0;
8795 GNULIB_FMAF=0;
8796 GNULIB_FMAL=0;
8797 GNULIB_FMOD=0;
8798 GNULIB_FMODF=0;
8799 GNULIB_FMODL=0;
8800 GNULIB_FREXPF=0;
8801 GNULIB_FREXP=0;
8802 GNULIB_FREXPL=0;
8803 GNULIB_HYPOT=0;
8804 GNULIB_HYPOTF=0;
8805 GNULIB_HYPOTL=0;
8806 GNULIB_ILOGB=0;
8807 GNULIB_ILOGBF=0;
8808 GNULIB_ILOGBL=0;
8809 GNULIB_ISFINITE=0;
8810 GNULIB_ISINF=0;
8811 GNULIB_ISNAN=0;
8812 GNULIB_ISNANF=0;
8813 GNULIB_ISNAND=0;
8814 GNULIB_ISNANL=0;
8815 GNULIB_LDEXPF=0;
8816 GNULIB_LDEXPL=0;
8817 GNULIB_LOG=0;
8818 GNULIB_LOGF=0;
8819 GNULIB_LOGL=0;
8820 GNULIB_LOG10=0;
8821 GNULIB_LOG10F=0;
8822 GNULIB_LOG10L=0;
8823 GNULIB_LOG1P=0;
8824 GNULIB_LOG1PF=0;
8825 GNULIB_LOG1PL=0;
8826 GNULIB_LOG2=0;
8827 GNULIB_LOG2F=0;
8828 GNULIB_LOG2L=0;
8829 GNULIB_LOGB=0;
8830 GNULIB_LOGBF=0;
8831 GNULIB_LOGBL=0;
8832 GNULIB_MODF=0;
8833 GNULIB_MODFF=0;
8834 GNULIB_MODFL=0;
8835 GNULIB_POWF=0;
8836 GNULIB_REMAINDER=0;
8837 GNULIB_REMAINDERF=0;
8838 GNULIB_REMAINDERL=0;
8839 GNULIB_RINT=0;
8840 GNULIB_RINTF=0;
8841 GNULIB_RINTL=0;
8842 GNULIB_ROUND=0;
8843 GNULIB_ROUNDF=0;
8844 GNULIB_ROUNDL=0;
8845 GNULIB_SIGNBIT=0;
8846 GNULIB_SINF=0;
8847 GNULIB_SINL=0;
8848 GNULIB_SINHF=0;
8849 GNULIB_SQRTF=0;
8850 GNULIB_SQRTL=0;
8851 GNULIB_TANF=0;
8852 GNULIB_TANL=0;
8853 GNULIB_TANHF=0;
8854 GNULIB_TRUNC=0;
8855 GNULIB_TRUNCF=0;
8856 GNULIB_TRUNCL=0;
8857 HAVE_ACOSF=1;
8858 HAVE_ACOSL=1;
8859 HAVE_ASINF=1;
8860 HAVE_ASINL=1;
8861 HAVE_ATANF=1;
8862 HAVE_ATANL=1;
8863 HAVE_ATAN2F=1;
8864 HAVE_CBRT=1;
8865 HAVE_CBRTF=1;
8866 HAVE_CBRTL=1;
8867 HAVE_COPYSIGN=1;
8868 HAVE_COPYSIGNL=1;
8869 HAVE_COSF=1;
8870 HAVE_COSL=1;
8871 HAVE_COSHF=1;
8872 HAVE_EXPF=1;
8873 HAVE_EXPL=1;
8874 HAVE_EXPM1=1;
8875 HAVE_EXPM1F=1;
8876 HAVE_FABSF=1;
8877 HAVE_FABSL=1;
8878 HAVE_FMA=1;
8879 HAVE_FMAF=1;
8880 HAVE_FMAL=1;
8881 HAVE_FMODF=1;
8882 HAVE_FMODL=1;
8883 HAVE_FREXPF=1;
8884 HAVE_HYPOTF=1;
8885 HAVE_HYPOTL=1;
8886 HAVE_ILOGB=1;
8887 HAVE_ILOGBF=1;
8888 HAVE_ILOGBL=1;
8889 HAVE_ISNANF=1;
8890 HAVE_ISNAND=1;
8891 HAVE_ISNANL=1;
8892 HAVE_LDEXPF=1;
8893 HAVE_LOGF=1;
8894 HAVE_LOGL=1;
8895 HAVE_LOG10F=1;
8896 HAVE_LOG10L=1;
8897 HAVE_LOG1P=1;
8898 HAVE_LOG1PF=1;
8899 HAVE_LOG1PL=1;
8900 HAVE_LOGBF=1;
8901 HAVE_LOGBL=1;
8902 HAVE_MODFF=1;
8903 HAVE_MODFL=1;
8904 HAVE_POWF=1;
8905 HAVE_REMAINDER=1;
8906 HAVE_REMAINDERF=1;
8907 HAVE_RINT=1;
8908 HAVE_RINTL=1;
8909 HAVE_SINF=1;
8910 HAVE_SINL=1;
8911 HAVE_SINHF=1;
8912 HAVE_SQRTF=1;
8913 HAVE_SQRTL=1;
8914 HAVE_TANF=1;
8915 HAVE_TANL=1;
8916 HAVE_TANHF=1;
8917 HAVE_DECL_ACOSL=1;
8918 HAVE_DECL_ASINL=1;
8919 HAVE_DECL_ATANL=1;
8920 HAVE_DECL_CBRTF=1;
8921 HAVE_DECL_CBRTL=1;
8922 HAVE_DECL_CEILF=1;
8923 HAVE_DECL_CEILL=1;
8924 HAVE_DECL_COPYSIGNF=1;
8925 HAVE_DECL_COSL=1;
8926 HAVE_DECL_EXPL=1;
8927 HAVE_DECL_EXP2=1;
8928 HAVE_DECL_EXP2F=1;
8929 HAVE_DECL_EXP2L=1;
8930 HAVE_DECL_EXPM1L=1;
8931 HAVE_DECL_FLOORF=1;
8932 HAVE_DECL_FLOORL=1;
8933 HAVE_DECL_FREXPL=1;
8934 HAVE_DECL_LDEXPL=1;
8935 HAVE_DECL_LOGL=1;
8936 HAVE_DECL_LOG10L=1;
8937 HAVE_DECL_LOG2=1;
8938 HAVE_DECL_LOG2F=1;
8939 HAVE_DECL_LOG2L=1;
8940 HAVE_DECL_LOGB=1;
8941 HAVE_DECL_REMAINDER=1;
8942 HAVE_DECL_REMAINDERL=1;
8943 HAVE_DECL_RINTF=1;
8944 HAVE_DECL_ROUND=1;
8945 HAVE_DECL_ROUNDF=1;
8946 HAVE_DECL_ROUNDL=1;
8947 HAVE_DECL_SINL=1;
8948 HAVE_DECL_SQRTL=1;
8949 HAVE_DECL_TANL=1;
8950 HAVE_DECL_TRUNC=1;
8951 HAVE_DECL_TRUNCF=1;
8952 HAVE_DECL_TRUNCL=1;
8953 REPLACE_CBRTF=0;
8954 REPLACE_CBRTL=0;
8955 REPLACE_CEIL=0;
8956 REPLACE_CEILF=0;
8957 REPLACE_CEILL=0;
8958 REPLACE_EXPM1=0;
8959 REPLACE_EXPM1F=0;
8960 REPLACE_EXP2=0;
8961 REPLACE_EXP2L=0;
8962 REPLACE_FABSL=0;
8963 REPLACE_FLOOR=0;
8964 REPLACE_FLOORF=0;
8965 REPLACE_FLOORL=0;
8966 REPLACE_FMA=0;
8967 REPLACE_FMAF=0;
8968 REPLACE_FMAL=0;
8969 REPLACE_FMOD=0;
8970 REPLACE_FMODF=0;
8971 REPLACE_FMODL=0;
8972 REPLACE_FREXPF=0;
8973 REPLACE_FREXP=0;
8974 REPLACE_FREXPL=0;
8975 REPLACE_HUGE_VAL=0;
8976 REPLACE_HYPOT=0;
8977 REPLACE_HYPOTF=0;
8978 REPLACE_HYPOTL=0;
8979 REPLACE_ILOGB=0;
8980 REPLACE_ILOGBF=0;
8981 REPLACE_ISFINITE=0;
8982 REPLACE_ISINF=0;
8983 REPLACE_ISNAN=0;
8984 REPLACE_LDEXPL=0;
8985 REPLACE_LOG=0;
8986 REPLACE_LOGF=0;
8987 REPLACE_LOGL=0;
8988 REPLACE_LOG10=0;
8989 REPLACE_LOG10F=0;
8990 REPLACE_LOG10L=0;
8991 REPLACE_LOG1P=0;
8992 REPLACE_LOG1PF=0;
8993 REPLACE_LOG1PL=0;
8994 REPLACE_LOG2=0;
8995 REPLACE_LOG2F=0;
8996 REPLACE_LOG2L=0;
8997 REPLACE_LOGB=0;
8998 REPLACE_LOGBF=0;
8999 REPLACE_LOGBL=0;
9000 REPLACE_MODF=0;
9001 REPLACE_MODFF=0;
9002 REPLACE_MODFL=0;
9003 REPLACE_NAN=0;
9004 REPLACE_REMAINDER=0;
9005 REPLACE_REMAINDERF=0;
9006 REPLACE_REMAINDERL=0;
9007 REPLACE_ROUND=0;
9008 REPLACE_ROUNDF=0;
9009 REPLACE_ROUNDL=0;
9010 REPLACE_SIGNBIT=0;
9011 REPLACE_SIGNBIT_USING_GCC=0;
9012 REPLACE_SQRTL=0;
9013 REPLACE_TRUNC=0;
9014 REPLACE_TRUNCF=0;
9015 REPLACE_TRUNCL=0;
88b48903 9016
472fa5ee 9017
5e8754f9
SDJ
9018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
9019$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
9020if ${gl_cv_func_frexp_no_libm+:} false; then :
7a6dbc2f 9021 $as_echo_n "(cached) " >&6
4a626d0a 9022else
88b48903 9023
5e8754f9 9024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7a6dbc2f
SDJ
9025/* end confdefs.h. */
9026#include <math.h>
5e8754f9 9027 double x;
7a6dbc2f
SDJ
9028int
9029main ()
9030{
5e8754f9 9031int e; return frexp (x, &e) > 0;
7a6dbc2f
SDJ
9032 ;
9033 return 0;
9034}
4a626d0a 9035_ACEOF
7a6dbc2f 9036if ac_fn_c_try_link "$LINENO"; then :
5e8754f9 9037 gl_cv_func_frexp_no_libm=yes
7a6dbc2f 9038else
5e8754f9 9039 gl_cv_func_frexp_no_libm=no
7a6dbc2f
SDJ
9040fi
9041rm -f core conftest.err conftest.$ac_objext \
9042 conftest$ac_exeext conftest.$ac_ext
88b48903 9043
7a6dbc2f 9044fi
5e8754f9
SDJ
9045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
9046$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
88b48903 9047
472fa5ee 9048
5e8754f9
SDJ
9049 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
9050if test "x$ac_cv_have_decl_alarm" = xyes; then :
9051 ac_have_decl=1
7a6dbc2f 9052else
5e8754f9
SDJ
9053 ac_have_decl=0
9054fi
7a6dbc2f 9055
5e8754f9
SDJ
9056cat >>confdefs.h <<_ACEOF
9057#define HAVE_DECL_ALARM $ac_have_decl
9058_ACEOF
7a6dbc2f 9059
7a6dbc2f 9060
5e8754f9
SDJ
9061
9062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9063$as_echo_n "checking whether long double and double are the same... " >&6; }
9064if ${gl_cv_long_double_equals_double+:} false; then :
9065 $as_echo_n "(cached) " >&6
88b48903
WN
9066else
9067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9068/* end confdefs.h. */
9069#include <float.h>
5e8754f9
SDJ
9070int
9071main ()
88b48903 9072{
5e8754f9
SDJ
9073typedef int check[sizeof (long double) == sizeof (double)
9074 && LDBL_MANT_DIG == DBL_MANT_DIG
9075 && LDBL_MAX_EXP == DBL_MAX_EXP
9076 && LDBL_MIN_EXP == DBL_MIN_EXP
9077 ? 1 : -1];
9078
9079 ;
9080 return 0;
88b48903
WN
9081}
9082_ACEOF
5e8754f9
SDJ
9083if ac_fn_c_try_compile "$LINENO"; then :
9084 gl_cv_long_double_equals_double=yes
88b48903 9085else
5e8754f9 9086 gl_cv_long_double_equals_double=no
88b48903 9087fi
5e8754f9 9088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
88b48903
WN
9089
9090fi
5e8754f9
SDJ
9091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9092$as_echo "$gl_cv_long_double_equals_double" >&6; }
9093 if test $gl_cv_long_double_equals_double = yes; then
7a6dbc2f 9094
5e8754f9 9095$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
7a6dbc2f 9096
5e8754f9
SDJ
9097 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9098 else
9099 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
88b48903
WN
9100 fi
9101
9102
4a626d0a 9103
6ec2e0f5
SDJ
9104 GNULIB_FCHMODAT=0;
9105 GNULIB_FSTAT=0;
9106 GNULIB_FSTATAT=0;
9107 GNULIB_FUTIMENS=0;
9108 GNULIB_LCHMOD=0;
9109 GNULIB_LSTAT=0;
9110 GNULIB_MKDIRAT=0;
9111 GNULIB_MKFIFO=0;
9112 GNULIB_MKFIFOAT=0;
9113 GNULIB_MKNOD=0;
9114 GNULIB_MKNODAT=0;
9115 GNULIB_STAT=0;
9116 GNULIB_UTIMENSAT=0;
9117 HAVE_FCHMODAT=1;
9118 HAVE_FSTATAT=1;
9119 HAVE_FUTIMENS=1;
9120 HAVE_LCHMOD=1;
9121 HAVE_LSTAT=1;
9122 HAVE_MKDIRAT=1;
9123 HAVE_MKFIFO=1;
9124 HAVE_MKFIFOAT=1;
9125 HAVE_MKNOD=1;
9126 HAVE_MKNODAT=1;
9127 HAVE_UTIMENSAT=1;
9128 REPLACE_FSTAT=0;
9129 REPLACE_FSTATAT=0;
9130 REPLACE_FUTIMENS=0;
9131 REPLACE_LSTAT=0;
9132 REPLACE_MKDIR=0;
9133 REPLACE_MKFIFO=0;
9134 REPLACE_MKNOD=0;
9135 REPLACE_STAT=0;
9136 REPLACE_UTIMENSAT=0;
9137
9138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
9139$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
d0ac1c44 9140if ${ac_cv_header_stat_broken+:} false; then :
6ec2e0f5
SDJ
9141 $as_echo_n "(cached) " >&6
9142else
9143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9144/* end confdefs.h. */
9145#include <sys/types.h>
9146#include <sys/stat.h>
9147
9148#if defined S_ISBLK && defined S_IFDIR
9149extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
9150#endif
9151
9152#if defined S_ISBLK && defined S_IFCHR
9153extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
9154#endif
9155
9156#if defined S_ISLNK && defined S_IFREG
9157extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
9158#endif
9159
9160#if defined S_ISSOCK && defined S_IFREG
9161extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
9162#endif
4a626d0a 9163
4a626d0a
PA
9164_ACEOF
9165if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
9166 ac_cv_header_stat_broken=no
9167else
9168 ac_cv_header_stat_broken=yes
4a626d0a
PA
9169fi
9170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9171fi
9172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
9173$as_echo "$ac_cv_header_stat_broken" >&6; }
9174if test $ac_cv_header_stat_broken = yes; then
9175
9176$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
4a626d0a
PA
9177
9178fi
4a626d0a 9179
4a626d0a
PA
9180
9181
4a626d0a
PA
9182
9183
472fa5ee
SM
9184
9185
9186
6ec2e0f5
SDJ
9187 case "$host_os" in
9188 mingw*)
9189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
9190$as_echo_n "checking for 64-bit off_t... " >&6; }
d0ac1c44 9191if ${gl_cv_type_off_t_64+:} false; then :
6ec2e0f5
SDJ
9192 $as_echo_n "(cached) " >&6
9193else
9194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9195/* end confdefs.h. */
9196#include <sys/types.h>
9197 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
9198
9199int
9200main ()
9201{
9202
9203 ;
9204 return 0;
9205}
9206_ACEOF
9207if ac_fn_c_try_compile "$LINENO"; then :
9208 gl_cv_type_off_t_64=yes
9209else
9210 gl_cv_type_off_t_64=no
9211fi
9212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4a626d0a 9213
6ec2e0f5
SDJ
9214fi
9215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
9216$as_echo "$gl_cv_type_off_t_64" >&6; }
9217 if test $gl_cv_type_off_t_64 = no; then
9218 WINDOWS_64_BIT_OFF_T=1
9219 else
7a6dbc2f
SDJ
9220 WINDOWS_64_BIT_OFF_T=0
9221 fi
5e8754f9 9222 WINDOWS_64_BIT_ST_SIZE=1
6ec2e0f5
SDJ
9223 ;;
9224 *)
9225 WINDOWS_64_BIT_OFF_T=0
9226 WINDOWS_64_BIT_ST_SIZE=0
9227 ;;
9228 esac
4a626d0a
PA
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
472fa5ee
SM
9241 :
9242
9243
9244
9245
9246
4a626d0a
PA
9247
9248
9249
9250 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9251 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a 9252 else
6ec2e0f5
SDJ
9253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
9254$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 9255if ${gl_cv_next_sys_stat_h+:} false; then :
4a626d0a
PA
9256 $as_echo_n "(cached) " >&6
9257else
9258
6ec2e0f5 9259 if test $ac_cv_header_sys_stat_h = yes; then
4a626d0a
PA
9260
9261
9262
9263
9264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9265/* end confdefs.h. */
6ec2e0f5 9266#include <sys/stat.h>
4a626d0a
PA
9267_ACEOF
9268 case "$host_os" in
9269 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9270 *) gl_absname_cpp="$ac_cpp" ;;
9271 esac
9272
9273 case "$host_os" in
9274 mingw*)
9275 gl_dirsep_regex='[/\\]'
9276 ;;
9277 *)
9278 gl_dirsep_regex='\/'
9279 ;;
9280 esac
9281 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9282 gl_header_literal_regex=`echo 'sys/stat.h' \
4a626d0a
PA
9283 | sed -e "$gl_make_literal_regex_sed"`
9284 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9285 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9286 s|^/[^/]|//&|
9287 p
9288 q
9289 }'
9290
6ec2e0f5 9291 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
9292 sed -n "$gl_absolute_header_sed"`
9293
6ec2e0f5
SDJ
9294 gl_header=$gl_cv_absolute_sys_stat_h
9295 gl_cv_next_sys_stat_h='"'$gl_header'"'
4a626d0a 9296 else
6ec2e0f5 9297 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a
PA
9298 fi
9299
9300
9301fi
6ec2e0f5
SDJ
9302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
9303$as_echo "$gl_cv_next_sys_stat_h" >&6; }
4a626d0a 9304 fi
6ec2e0f5 9305 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
4a626d0a
PA
9306
9307 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9308 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 9309 gl_next_as_first_directive='<'sys/stat.h'>'
4a626d0a
PA
9310 else
9311 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 9312 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
4a626d0a 9313 fi
6ec2e0f5 9314 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
4a626d0a
PA
9315
9316
9317
9318
9319
4a626d0a
PA
9320
9321
9322
9323
9324
4a626d0a 9325
5e8754f9 9326 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
4a626d0a 9327
5e8754f9 9328$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
4a626d0a 9329
5e8754f9 9330 fi
4a626d0a 9331
6ec2e0f5
SDJ
9332 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
9333 #include <sys/stat.h>
9334"
d0ac1c44 9335if test "x$ac_cv_type_nlink_t" = xyes; then :
6ec2e0f5
SDJ
9336
9337else
4a626d0a 9338
6ec2e0f5
SDJ
9339$as_echo "#define nlink_t int" >>confdefs.h
9340
9341fi
9342
9343
9344
5e8754f9
SDJ
9345 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
9346 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9348$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9349if eval \${$as_gl_Symbol+:} false; then :
9350 $as_echo_n "(cached) " >&6
9351else
9352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9353/* end confdefs.h. */
9354#include <sys/stat.h>
9355
9356int
9357main ()
9358{
9359#undef $gl_func
9360 (void) $gl_func;
9361 ;
9362 return 0;
9363}
9364_ACEOF
9365if ac_fn_c_try_compile "$LINENO"; then :
9366 eval "$as_gl_Symbol=yes"
9367else
9368 eval "$as_gl_Symbol=no"
9369fi
9370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9371fi
9372eval ac_res=\$$as_gl_Symbol
9373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9374$as_echo "$ac_res" >&6; }
9375 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9376 cat >>confdefs.h <<_ACEOF
9377#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9378_ACEOF
4a626d0a 9379
5e8754f9
SDJ
9380 eval ac_cv_have_decl_$gl_func=yes
9381fi
9382 done
6ec2e0f5
SDJ
9383
9384
9385
5e8754f9 9386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
6ec2e0f5 9387$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
d0ac1c44 9388if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
4a626d0a
PA
9389 $as_echo_n "(cached) " >&6
9390else
6ec2e0f5
SDJ
9391 rm -f conftest.sym conftest.file
9392 echo >conftest.file
9393 if test "$cross_compiling" = yes; then :
9394 case "$host_os" in
5e8754f9 9395 *-gnu*)
6ec2e0f5
SDJ
9396 # Guess yes on glibc systems.
9397 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9398 *)
9399 # If we don't know, assume the worst.
9400 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
9401 esac
4a626d0a 9402
6ec2e0f5
SDJ
9403else
9404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9405/* end confdefs.h. */
9406$ac_includes_default
4a626d0a
PA
9407int
9408main ()
9409{
6ec2e0f5
SDJ
9410struct stat sbuf;
9411 if (symlink ("conftest.file", "conftest.sym") != 0)
9412 return 1;
9413 /* Linux will dereference the symlink and fail, as required by
9414 POSIX. That is better in the sense that it means we will not
9415 have to compile and use the lstat wrapper. */
9416 return lstat ("conftest.sym/", &sbuf) == 0;
4a626d0a
PA
9417
9418 ;
9419 return 0;
9420}
9421_ACEOF
6ec2e0f5
SDJ
9422if ac_fn_c_try_run "$LINENO"; then :
9423 gl_cv_func_lstat_dereferences_slashed_symlink=yes
4a626d0a 9424else
6ec2e0f5
SDJ
9425 gl_cv_func_lstat_dereferences_slashed_symlink=no
9426fi
9427rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9428 conftest.$ac_objext conftest.beam conftest.$ac_ext
4a626d0a 9429fi
6ec2e0f5
SDJ
9430
9431 rm -f conftest.sym conftest.file
4a626d0a
PA
9432
9433fi
6ec2e0f5
SDJ
9434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9435$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9436 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
9437 *yes)
4a626d0a 9438
6ec2e0f5
SDJ
9439cat >>confdefs.h <<_ACEOF
9440#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9441_ACEOF
4a626d0a 9442
6ec2e0f5
SDJ
9443 ;;
9444 esac
9445
9446
9447
9448
9449
472fa5ee
SM
9450
9451
9452
9453 :
9454
9455
9456
9457
9458
6ec2e0f5
SDJ
9459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
9460$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
d0ac1c44 9461if ${gl_cv_func_getcwd_null+:} false; then :
4a626d0a 9462 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
9463else
9464 if test "$cross_compiling" = yes; then :
9465 case "$host_os" in
5e8754f9
SDJ
9466 # Guess yes on glibc systems.
9467 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
9468 # Guess yes on Cygwin.
9469 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
9470 # If we don't know, assume the worst.
9471 *) gl_cv_func_getcwd_null="guessing no";;
6ec2e0f5
SDJ
9472 esac
9473
4a626d0a
PA
9474else
9475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9476/* end confdefs.h. */
9477
6ec2e0f5
SDJ
9478# include <stdlib.h>
9479# if HAVE_UNISTD_H
9480# include <unistd.h>
9481# else /* on Windows with MSVC */
9482# include <direct.h>
9483# endif
9484# ifndef getcwd
9485 char *getcwd ();
9486# endif
9487
9488int
9489main ()
9490{
9491
5e8754f9 9492#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
9493/* mingw cwd does not start with '/', but getcwd does allocate.
9494 However, mingw fails to honor non-zero size. */
9495#else
9496 if (chdir ("/") != 0)
9497 return 1;
9498 else
9499 {
9500 char *f = getcwd (NULL, 0);
9501 if (! f)
9502 return 2;
9503 if (f[0] != '/')
5e8754f9 9504 return 3;
6ec2e0f5 9505 if (f[1] != '\0')
5e8754f9 9506 return 4;
6ec2e0f5
SDJ
9507 free (f);
9508 return 0;
9509 }
4a626d0a 9510#endif
4a626d0a 9511
6ec2e0f5
SDJ
9512 ;
9513 return 0;
9514}
9515_ACEOF
9516if ac_fn_c_try_run "$LINENO"; then :
9517 gl_cv_func_getcwd_null=yes
9518else
9519 gl_cv_func_getcwd_null=no
9520fi
9521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9522 conftest.$ac_objext conftest.beam conftest.$ac_ext
9523fi
9524
9525fi
9526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
9527$as_echo "$gl_cv_func_getcwd_null" >&6; }
9528
9529
9530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
9531$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
d0ac1c44 9532if ${gl_cv_func_getcwd_posix_signature+:} false; then :
6ec2e0f5
SDJ
9533 $as_echo_n "(cached) " >&6
9534else
9535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9536/* end confdefs.h. */
9537#include <unistd.h>
4a626d0a
PA
9538int
9539main ()
9540{
6ec2e0f5
SDJ
9541extern
9542 #ifdef __cplusplus
9543 "C"
9544 #endif
9545 char *getcwd (char *, size_t);
9546
4a626d0a
PA
9547 ;
9548 return 0;
9549}
6ec2e0f5 9550
4a626d0a
PA
9551_ACEOF
9552if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9553 gl_cv_func_getcwd_posix_signature=yes
4a626d0a 9554else
6ec2e0f5 9555 gl_cv_func_getcwd_posix_signature=no
4a626d0a
PA
9556fi
9557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 9558
4a626d0a 9559fi
6ec2e0f5
SDJ
9560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
9561$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
9562
472fa5ee
SM
9563
9564 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
d0ac1c44 9565if test "x$ac_cv_have_decl_getcwd" = xyes; then :
6ec2e0f5
SDJ
9566 ac_have_decl=1
9567else
9568 ac_have_decl=0
9569fi
9570
9571cat >>confdefs.h <<_ACEOF
9572#define HAVE_DECL_GETCWD $ac_have_decl
4a626d0a
PA
9573_ACEOF
9574
6ec2e0f5
SDJ
9575
9576
472fa5ee
SM
9577
9578
9579
9580
9581
9582 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
d0ac1c44 9583if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
6ec2e0f5
SDJ
9584 ac_have_decl=1
9585else
9586 ac_have_decl=0
4a626d0a 9587fi
4a626d0a 9588
6ec2e0f5
SDJ
9589cat >>confdefs.h <<_ACEOF
9590#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
9591_ACEOF
9592
472fa5ee
SM
9593
9594
9595 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
d0ac1c44 9596if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
6ec2e0f5
SDJ
9597 ac_have_decl=1
9598else
9599 ac_have_decl=0
9600fi
9601
9602cat >>confdefs.h <<_ACEOF
9603#define HAVE_DECL_GETLOGIN_R $ac_have_decl
9604_ACEOF
9605
9606
9607
472fa5ee
SM
9608
9609
9610
9611
9612
9613 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
d0ac1c44 9614if test "x$ac_cv_have_decl_getlogin" = xyes; then :
6ec2e0f5
SDJ
9615 ac_have_decl=1
9616else
9617 ac_have_decl=0
9618fi
9619
9620cat >>confdefs.h <<_ACEOF
9621#define HAVE_DECL_GETLOGIN $ac_have_decl
9622_ACEOF
9623
9624
9625
9626
7a6dbc2f
SDJ
9627
9628
6ec2e0f5 9629
472fa5ee
SM
9630
9631
9632
9633
9634
6ec2e0f5
SDJ
9635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
9636$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
d0ac1c44 9637if ${ac_cv_c_restrict+:} false; then :
6ec2e0f5
SDJ
9638 $as_echo_n "(cached) " >&6
9639else
9640 ac_cv_c_restrict=no
9641 # The order here caters to the fact that C++ does not require restrict.
9642 for ac_kw in __restrict __restrict__ _Restrict restrict; do
9643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9644/* end confdefs.h. */
9645typedef int *int_ptr;
5e8754f9
SDJ
9646 int foo (int_ptr $ac_kw ip) { return ip[0]; }
9647 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
9648 int bar (int ip[$ac_kw]) { return ip[0]; }
6ec2e0f5
SDJ
9649
9650int
9651main ()
9652{
9653int s[1];
5e8754f9
SDJ
9654 int *$ac_kw t = s;
9655 t[0] = 0;
9656 return foo (t) + bar (t);
6ec2e0f5
SDJ
9657
9658 ;
9659 return 0;
9660}
9661_ACEOF
9662if ac_fn_c_try_compile "$LINENO"; then :
9663 ac_cv_c_restrict=$ac_kw
9664fi
9665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9666 test "$ac_cv_c_restrict" != no && break
9667 done
9668
9669fi
9670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
9671$as_echo "$ac_cv_c_restrict" >&6; }
9672
9673 case $ac_cv_c_restrict in
9674 restrict) ;;
9675 no) $as_echo "#define restrict /**/" >>confdefs.h
9676 ;;
9677 *) cat >>confdefs.h <<_ACEOF
9678#define restrict $ac_cv_c_restrict
9679_ACEOF
9680 ;;
9681 esac
4a626d0a
PA
9682
9683
5e8754f9
SDJ
9684 GNULIB_GETTIMEOFDAY=0;
9685 HAVE_GETTIMEOFDAY=1;
9686 HAVE_STRUCT_TIMEVAL=1;
9687 HAVE_SYS_TIME_H=1;
9688 HAVE_TIMEZONE_T=0;
9689 REPLACE_GETTIMEOFDAY=0;
9690 REPLACE_STRUCT_TIMEVAL=0;
9691
9692
4a626d0a
PA
9693
9694
88b48903 9695
49e4877c
PA
9696
9697
9698
9699
9700
472fa5ee
SM
9701 :
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713 :
9714
9715
49e4877c
PA
9716
9717
9718
9719
9720
9721
9722 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9723 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c 9724 else
6ec2e0f5
SDJ
9725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
9726$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
d0ac1c44 9727if ${gl_cv_next_sys_time_h+:} false; then :
49e4877c
PA
9728 $as_echo_n "(cached) " >&6
9729else
9730
6ec2e0f5 9731 if test $ac_cv_header_sys_time_h = yes; then
49e4877c
PA
9732
9733
9734
9735
9736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9737/* end confdefs.h. */
6ec2e0f5 9738#include <sys/time.h>
49e4877c
PA
9739_ACEOF
9740 case "$host_os" in
9741 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9742 *) gl_absname_cpp="$ac_cpp" ;;
9743 esac
9744
9745 case "$host_os" in
9746 mingw*)
9747 gl_dirsep_regex='[/\\]'
9748 ;;
9749 *)
9750 gl_dirsep_regex='\/'
9751 ;;
9752 esac
9753 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9754 gl_header_literal_regex=`echo 'sys/time.h' \
49e4877c
PA
9755 | sed -e "$gl_make_literal_regex_sed"`
9756 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9757 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9758 s|^/[^/]|//&|
9759 p
9760 q
9761 }'
9762
6ec2e0f5 9763 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
49e4877c
PA
9764 sed -n "$gl_absolute_header_sed"`
9765
6ec2e0f5
SDJ
9766 gl_header=$gl_cv_absolute_sys_time_h
9767 gl_cv_next_sys_time_h='"'$gl_header'"'
49e4877c 9768 else
6ec2e0f5 9769 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c
PA
9770 fi
9771
9772
9773fi
6ec2e0f5
SDJ
9774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
9775$as_echo "$gl_cv_next_sys_time_h" >&6; }
49e4877c 9776 fi
6ec2e0f5 9777 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
49e4877c
PA
9778
9779 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9780 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 9781 gl_next_as_first_directive='<'sys/time.h'>'
49e4877c
PA
9782 else
9783 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 9784 gl_next_as_first_directive=$gl_cv_next_sys_time_h
49e4877c 9785 fi
6ec2e0f5 9786 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
49e4877c
PA
9787
9788
9789
9790
9791
6ec2e0f5
SDJ
9792 if test $ac_cv_header_sys_time_h != yes; then
9793 HAVE_SYS_TIME_H=0
9794 fi
9795
9796
9797
9798
9799
472fa5ee
SM
9800 :
9801
9802
9803
9804
9805
6ec2e0f5
SDJ
9806 if test $ac_cv_header_sys_socket_h != yes; then
9807 for ac_header in winsock2.h
9808do :
9809 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 9810if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
9811 cat >>confdefs.h <<_ACEOF
9812#define HAVE_WINSOCK2_H 1
9813_ACEOF
9814
9815fi
9816
9817done
9818
9819 fi
9820 if test "$ac_cv_header_winsock2_h" = yes; then
9821 HAVE_WINSOCK2_H=1
9822 UNISTD_H_HAVE_WINSOCK2_H=1
9823 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9824 else
9825 HAVE_WINSOCK2_H=0
9826 fi
9827
9828
9829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
9830$as_echo_n "checking for struct timeval... " >&6; }
d0ac1c44 9831if ${gl_cv_sys_struct_timeval+:} false; then :
6ec2e0f5
SDJ
9832 $as_echo_n "(cached) " >&6
9833else
9834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9835/* end confdefs.h. */
9836#if HAVE_SYS_TIME_H
9837 #include <sys/time.h>
9838 #endif
9839 #include <time.h>
9840 #if HAVE_WINSOCK2_H
9841 # include <winsock2.h>
9842 #endif
9843
49e4877c
PA
9844int
9845main ()
9846{
6ec2e0f5 9847static struct timeval x; x.tv_sec = x.tv_usec;
49e4877c
PA
9848 ;
9849 return 0;
9850}
9851_ACEOF
9852if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9853 gl_cv_sys_struct_timeval=yes
49e4877c 9854else
6ec2e0f5 9855 gl_cv_sys_struct_timeval=no
49e4877c
PA
9856fi
9857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49e4877c 9858
49e4877c 9859fi
6ec2e0f5
SDJ
9860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
9861$as_echo "$gl_cv_sys_struct_timeval" >&6; }
9862 if test $gl_cv_sys_struct_timeval != yes; then
9863 HAVE_STRUCT_TIMEVAL=0
9864 else
9865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
9866$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
d0ac1c44 9867if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
8690e634
JK
9868 $as_echo_n "(cached) " >&6
9869else
6ec2e0f5 9870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9871/* end confdefs.h. */
6ec2e0f5
SDJ
9872#if HAVE_SYS_TIME_H
9873 #include <sys/time.h>
9874 #endif
9875 #include <time.h>
9876 #if HAVE_WINSOCK2_H
9877 # include <winsock2.h>
9878 #endif
8690e634 9879
8690e634
JK
9880int
9881main ()
9882{
6ec2e0f5
SDJ
9883static struct timeval x;
9884 typedef int verify_tv_sec_type[
9885 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
9886 ];
9887
8690e634
JK
9888 ;
9889 return 0;
9890}
8690e634 9891_ACEOF
6ec2e0f5
SDJ
9892if ac_fn_c_try_compile "$LINENO"; then :
9893 gl_cv_sys_struct_timeval_tv_sec=yes
8690e634 9894else
6ec2e0f5 9895 gl_cv_sys_struct_timeval_tv_sec=no
8690e634 9896fi
6ec2e0f5 9897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9898
6ec2e0f5 9899fi
725e2999
JB
9900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
9901$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
9902 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
9903 REPLACE_STRUCT_TIMEVAL=1
9904 fi
9905 fi
9906
9907
9908 for gl_func in gettimeofday; do
9909 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9911$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9912if eval \${$as_gl_Symbol+:} false; then :
9913 $as_echo_n "(cached) " >&6
9914else
9915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9916/* end confdefs.h. */
9917
9918#if HAVE_SYS_TIME_H
9919# include <sys/time.h>
9920#endif
9921#include <time.h>
9922
9923int
9924main ()
9925{
9926#undef $gl_func
9927 (void) $gl_func;
9928 ;
9929 return 0;
9930}
9931_ACEOF
9932if ac_fn_c_try_compile "$LINENO"; then :
9933 eval "$as_gl_Symbol=yes"
9934else
9935 eval "$as_gl_Symbol=no"
9936fi
9937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9938fi
9939eval ac_res=\$$as_gl_Symbol
9940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9941$as_echo "$ac_res" >&6; }
9942 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9943 cat >>confdefs.h <<_ACEOF
9944#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9945_ACEOF
9946
9947 eval ac_cv_have_decl_$gl_func=yes
9948fi
9949 done
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976 GNULIB_SOCKET=0;
9977 GNULIB_CONNECT=0;
9978 GNULIB_ACCEPT=0;
9979 GNULIB_BIND=0;
9980 GNULIB_GETPEERNAME=0;
9981 GNULIB_GETSOCKNAME=0;
9982 GNULIB_GETSOCKOPT=0;
9983 GNULIB_LISTEN=0;
9984 GNULIB_RECV=0;
9985 GNULIB_SEND=0;
9986 GNULIB_RECVFROM=0;
9987 GNULIB_SENDTO=0;
9988 GNULIB_SETSOCKOPT=0;
9989 GNULIB_SHUTDOWN=0;
9990 GNULIB_ACCEPT4=0;
9991 HAVE_STRUCT_SOCKADDR_STORAGE=1;
9992 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
9993
9994 HAVE_SA_FAMILY_T=1;
9995 HAVE_ACCEPT4=1;
9996
9997
9998 :
9999
10000
10001
10002
10003
10004 if test $ac_cv_header_sys_socket_h = no; then
10005 for ac_header in ws2tcpip.h
10006do :
10007 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
10008if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
10009 cat >>confdefs.h <<_ACEOF
10010#define HAVE_WS2TCPIP_H 1
10011_ACEOF
10012
10013fi
10014
10015done
10016
10017 fi
10018
10019
10020
10021
10022
10023 case "$host_os" in
10024 osf*)
10025
10026$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
10027
10028 ;;
10029 esac
10030
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
10032$as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
10033if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
10034 $as_echo_n "(cached) " >&6
10035else
10036
10037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10038/* end confdefs.h. */
10039#include <sys/socket.h>
10040int
10041main ()
10042{
10043
10044 ;
10045 return 0;
10046}
10047_ACEOF
10048if ac_fn_c_try_compile "$LINENO"; then :
10049 gl_cv_header_sys_socket_h_selfcontained=yes
10050else
10051 gl_cv_header_sys_socket_h_selfcontained=no
10052fi
10053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10054
10055fi
10056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
10057$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
10058 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
10059 for ac_func in shutdown
10060do :
10061 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
10062if test "x$ac_cv_func_shutdown" = xyes; then :
10063 cat >>confdefs.h <<_ACEOF
10064#define HAVE_SHUTDOWN 1
10065_ACEOF
10066
10067fi
10068done
10069
10070 if test $ac_cv_func_shutdown = yes; then
10071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
10072$as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
10073if ${gl_cv_header_sys_socket_h_shut+:} false; then :
10074 $as_echo_n "(cached) " >&6
10075else
10076
10077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10078/* end confdefs.h. */
10079#include <sys/socket.h>
10080int
10081main ()
10082{
10083int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
10084 ;
10085 return 0;
10086}
10087_ACEOF
10088if ac_fn_c_try_compile "$LINENO"; then :
10089 gl_cv_header_sys_socket_h_shut=yes
10090else
10091 gl_cv_header_sys_socket_h_shut=no
10092fi
10093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10094
10095fi
10096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
10097$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
10098 if test $gl_cv_header_sys_socket_h_shut = no; then
10099 SYS_SOCKET_H='sys/socket.h'
10100 fi
10101 fi
10102 fi
10103 # We need to check for ws2tcpip.h now.
10104
10105
10106
10107
10108
10109
10110
10111
10112 :
10113
10114
10115
10116
10117
10118
10119
10120
10121 if test $gl_cv_have_include_next = yes; then
10122 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
10123 else
10124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
10125$as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
10126if ${gl_cv_next_sys_socket_h+:} false; then :
10127 $as_echo_n "(cached) " >&6
10128else
10129
10130 if test $ac_cv_header_sys_socket_h = yes; then
10131
10132
10133
10134
10135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10136/* end confdefs.h. */
10137#include <sys/socket.h>
10138_ACEOF
10139 case "$host_os" in
10140 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10141 *) gl_absname_cpp="$ac_cpp" ;;
10142 esac
10143
10144 case "$host_os" in
10145 mingw*)
10146 gl_dirsep_regex='[/\\]'
10147 ;;
10148 *)
10149 gl_dirsep_regex='\/'
10150 ;;
10151 esac
10152 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10153 gl_header_literal_regex=`echo 'sys/socket.h' \
10154 | sed -e "$gl_make_literal_regex_sed"`
10155 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10156 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10157 s|^/[^/]|//&|
10158 p
10159 q
10160 }'
10161
10162 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10163 sed -n "$gl_absolute_header_sed"`
10164
10165 gl_header=$gl_cv_absolute_sys_socket_h
10166 gl_cv_next_sys_socket_h='"'$gl_header'"'
10167 else
10168 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
10169 fi
10170
10171
10172fi
10173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
10174$as_echo "$gl_cv_next_sys_socket_h" >&6; }
10175 fi
10176 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
10177
10178 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10179 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10180 gl_next_as_first_directive='<'sys/socket.h'>'
10181 else
10182 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10183 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
10184 fi
10185 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
10186
10187
10188
10189
10190 if test $ac_cv_header_sys_socket_h = yes; then
10191 HAVE_SYS_SOCKET_H=1
10192 HAVE_WS2TCPIP_H=0
10193 else
10194 HAVE_SYS_SOCKET_H=0
10195 if test $ac_cv_header_ws2tcpip_h = yes; then
10196 HAVE_WS2TCPIP_H=1
10197 else
10198 HAVE_WS2TCPIP_H=0
10199 fi
10200 fi
10201
10202
10203
10204 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
10205 /* sys/types.h is not needed according to POSIX, but the
10206 sys/socket.h in i386-unknown-freebsd4.10 and
10207 powerpc-apple-darwin5.5 required it. */
10208#include <sys/types.h>
10209#ifdef HAVE_SYS_SOCKET_H
10210#include <sys/socket.h>
10211#endif
10212#ifdef HAVE_WS2TCPIP_H
10213#include <ws2tcpip.h>
10214#endif
10215
10216"
10217if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10218
10219cat >>confdefs.h <<_ACEOF
10220#define HAVE_STRUCT_SOCKADDR_STORAGE 1
10221_ACEOF
10222
10223
10224fi
10225ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
10226 /* sys/types.h is not needed according to POSIX, but the
10227 sys/socket.h in i386-unknown-freebsd4.10 and
10228 powerpc-apple-darwin5.5 required it. */
10229#include <sys/types.h>
10230#ifdef HAVE_SYS_SOCKET_H
10231#include <sys/socket.h>
10232#endif
10233#ifdef HAVE_WS2TCPIP_H
10234#include <ws2tcpip.h>
10235#endif
10236
10237"
10238if test "x$ac_cv_type_sa_family_t" = xyes; then :
10239
10240cat >>confdefs.h <<_ACEOF
10241#define HAVE_SA_FAMILY_T 1
10242_ACEOF
10243
10244
10245fi
10246
10247 if test $ac_cv_type_struct_sockaddr_storage = no; then
10248 HAVE_STRUCT_SOCKADDR_STORAGE=0
10249 fi
10250 if test $ac_cv_type_sa_family_t = no; then
10251 HAVE_SA_FAMILY_T=0
10252 fi
10253 if test $ac_cv_type_struct_sockaddr_storage != no; then
10254 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10255 #ifdef HAVE_SYS_SOCKET_H
10256 #include <sys/socket.h>
10257 #endif
10258 #ifdef HAVE_WS2TCPIP_H
10259 #include <ws2tcpip.h>
10260 #endif
10261
10262"
10263if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10264
10265cat >>confdefs.h <<_ACEOF
10266#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10267_ACEOF
10268
10269
10270else
10271 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
10272fi
10273
10274 fi
10275 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
10276 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
10277 SYS_SOCKET_H='sys/socket.h'
10278 fi
10279
10280
10281
10282
10283 :
10284
10285
10286
10287
10288
10289 if test $ac_cv_header_sys_socket_h != yes; then
10290 for ac_header in winsock2.h
10291do :
10292 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
10293if test "x$ac_cv_header_winsock2_h" = xyes; then :
10294 cat >>confdefs.h <<_ACEOF
10295#define HAVE_WINSOCK2_H 1
10296_ACEOF
10297
10298fi
10299
10300done
10301
10302 fi
10303 if test "$ac_cv_header_winsock2_h" = yes; then
10304 HAVE_WINSOCK2_H=1
10305 UNISTD_H_HAVE_WINSOCK2_H=1
10306 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
10307 else
10308 HAVE_WINSOCK2_H=0
8690e634
JK
10309 fi
10310
10311
725e2999
JB
10312
10313
10314 for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do
5e8754f9
SDJ
10315 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10317$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10318if eval \${$as_gl_Symbol+:} false; then :
8690e634 10319 $as_echo_n "(cached) " >&6
8690e634
JK
10320else
10321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10322/* end confdefs.h. */
7a6dbc2f 10323
725e2999
JB
10324/* Some systems require prerequisite headers. */
10325#include <sys/types.h>
10326#include <sys/socket.h>
8690e634 10327
5e8754f9
SDJ
10328int
10329main ()
10330{
10331#undef $gl_func
10332 (void) $gl_func;
10333 ;
10334 return 0;
10335}
10336_ACEOF
10337if ac_fn_c_try_compile "$LINENO"; then :
10338 eval "$as_gl_Symbol=yes"
7a6dbc2f 10339else
5e8754f9
SDJ
10340 eval "$as_gl_Symbol=no"
10341fi
10342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 10343fi
5e8754f9
SDJ
10344eval ac_res=\$$as_gl_Symbol
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10346$as_echo "$ac_res" >&6; }
10347 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
10348 cat >>confdefs.h <<_ACEOF
10349#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10350_ACEOF
7a6dbc2f 10351
5e8754f9
SDJ
10352 eval ac_cv_have_decl_$gl_func=yes
10353fi
10354 done
8690e634 10355
8690e634 10356
8690e634
JK
10357
10358
10359
10360
10361
10362
88b48903 10363
8690e634 10364
725e2999
JB
10365 :
10366
10367
10368
8690e634 10369
8690e634
JK
10370
10371
725e2999
JB
10372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
10373$as_echo_n "checking for IPv4 sockets... " >&6; }
10374 if ${gl_cv_socket_ipv4+:} false; then :
10375 $as_echo_n "(cached) " >&6
10376else
10377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10378/* end confdefs.h. */
10379#include <sys/types.h>
10380#ifdef HAVE_SYS_SOCKET_H
10381#include <sys/socket.h>
10382#endif
10383#ifdef HAVE_NETINET_IN_H
10384#include <netinet/in.h>
10385#endif
10386#ifdef HAVE_WINSOCK2_H
10387#include <winsock2.h>
10388#endif
10389int
10390main ()
10391{
10392int x = AF_INET; struct in_addr y; struct sockaddr_in z;
10393 if (&x && &y && &z) return 0;
10394 ;
10395 return 0;
10396}
10397_ACEOF
10398if ac_fn_c_try_compile "$LINENO"; then :
10399 gl_cv_socket_ipv4=yes
10400else
10401 gl_cv_socket_ipv4=no
10402fi
10403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10404fi
10405
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
10407$as_echo "$gl_cv_socket_ipv4" >&6; }
10408 if test $gl_cv_socket_ipv4 = yes; then
8690e634 10409
725e2999 10410$as_echo "#define HAVE_IPV4 1" >>confdefs.h
8690e634 10411
725e2999 10412 fi
8690e634 10413
725e2999
JB
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
10415$as_echo_n "checking for IPv6 sockets... " >&6; }
10416 if ${gl_cv_socket_ipv6+:} false; then :
10417 $as_echo_n "(cached) " >&6
10418else
10419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10420/* end confdefs.h. */
10421#include <sys/types.h>
10422#ifdef HAVE_SYS_SOCKET_H
10423#include <sys/socket.h>
10424#endif
10425#ifdef HAVE_NETINET_IN_H
10426#include <netinet/in.h>
10427#endif
10428#ifdef HAVE_WINSOCK2_H
10429#include <winsock2.h>
10430#endif
10431#ifdef HAVE_WS2TCPIP_H
10432#include <ws2tcpip.h>
10433#endif
10434int
10435main ()
10436{
10437int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
10438 if (&x && &y && &z) return 0;
10439 ;
10440 return 0;
10441}
10442_ACEOF
10443if ac_fn_c_try_compile "$LINENO"; then :
10444 gl_cv_socket_ipv6=yes
10445else
10446 gl_cv_socket_ipv6=no
10447fi
10448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10449fi
49e4877c 10450
725e2999
JB
10451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
10452$as_echo "$gl_cv_socket_ipv6" >&6; }
10453 if test $gl_cv_socket_ipv6 = yes; then
49e4877c 10454
725e2999 10455$as_echo "#define HAVE_IPV6 1" >>confdefs.h
8690e634 10456
725e2999 10457 fi
8690e634 10458
472fa5ee
SM
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471 :
10472
10473
10474
10475
10476
8690e634
JK
10477
10478
10479
10480 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 10481 gl_cv_next_limits_h='<'limits.h'>'
8690e634 10482 else
6ec2e0f5
SDJ
10483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
10484$as_echo_n "checking absolute name of <limits.h>... " >&6; }
d0ac1c44 10485if ${gl_cv_next_limits_h+:} false; then :
8690e634
JK
10486 $as_echo_n "(cached) " >&6
10487else
10488
6ec2e0f5 10489 if test $ac_cv_header_limits_h = yes; then
8690e634
JK
10490
10491
4a626d0a
PA
10492
10493
10494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 10495/* end confdefs.h. */
6ec2e0f5 10496#include <limits.h>
8690e634 10497_ACEOF
4a626d0a
PA
10498 case "$host_os" in
10499 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10500 *) gl_absname_cpp="$ac_cpp" ;;
10501 esac
10502
10503 case "$host_os" in
10504 mingw*)
10505 gl_dirsep_regex='[/\\]'
10506 ;;
10507 *)
10508 gl_dirsep_regex='\/'
10509 ;;
10510 esac
10511 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 10512 gl_header_literal_regex=`echo 'limits.h' \
4a626d0a
PA
10513 | sed -e "$gl_make_literal_regex_sed"`
10514 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10515 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10516 s|^/[^/]|//&|
10517 p
10518 q
10519 }'
10520
6ec2e0f5 10521 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
10522 sed -n "$gl_absolute_header_sed"`
10523
6ec2e0f5
SDJ
10524 gl_header=$gl_cv_absolute_limits_h
10525 gl_cv_next_limits_h='"'$gl_header'"'
8690e634 10526 else
6ec2e0f5 10527 gl_cv_next_limits_h='<'limits.h'>'
8690e634
JK
10528 fi
10529
5e8754f9 10530
7a6dbc2f 10531fi
5e8754f9
SDJ
10532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
10533$as_echo "$gl_cv_next_limits_h" >&6; }
10534 fi
10535 NEXT_LIMITS_H=$gl_cv_next_limits_h
10536
10537 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10538 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10539 gl_next_as_first_directive='<'limits.h'>'
10540 else
10541 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10542 gl_next_as_first_directive=$gl_cv_next_limits_h
10543 fi
10544 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
7a6dbc2f 10545
7a6dbc2f
SDJ
10546
10547
5e8754f9
SDJ
10548
10549
10550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
10551$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
10552if ${gl_cv_header_limits_width+:} false; then :
6ec2e0f5
SDJ
10553 $as_echo_n "(cached) " >&6
10554else
10555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10556/* end confdefs.h. */
5e8754f9
SDJ
10557#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
10558 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
10559 #endif
10560 #include <limits.h>
10561 int ullw = ULLONG_WIDTH;
6ec2e0f5
SDJ
10562int
10563main ()
10564{
10565
10566 ;
10567 return 0;
10568}
10569_ACEOF
10570if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 10571 gl_cv_header_limits_width=yes
6ec2e0f5 10572else
5e8754f9 10573 gl_cv_header_limits_width=no
6ec2e0f5
SDJ
10574fi
10575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10576fi
5e8754f9
SDJ
10577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
10578$as_echo "$gl_cv_header_limits_width" >&6; }
10579 if test "$gl_cv_header_limits_width" = yes; then
10580 LIMITS_H=
8690e634 10581 else
5e8754f9 10582 LIMITS_H=limits.h
8690e634
JK
10583 fi
10584
5e8754f9
SDJ
10585 if test -n "$LIMITS_H"; then
10586 GL_GENERATE_LIMITS_H_TRUE=
10587 GL_GENERATE_LIMITS_H_FALSE='#'
10588else
10589 GL_GENERATE_LIMITS_H_TRUE='#'
10590 GL_GENERATE_LIMITS_H_FALSE=
10591fi
10592
8690e634 10593
6ec2e0f5
SDJ
10594
10595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10596$as_echo_n "checking for unsigned long long int... " >&6; }
d0ac1c44 10597if ${ac_cv_type_unsigned_long_long_int+:} false; then :
8690e634
JK
10598 $as_echo_n "(cached) " >&6
10599else
6ec2e0f5
SDJ
10600 ac_cv_type_unsigned_long_long_int=yes
10601 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8690e634
JK
10602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10603/* end confdefs.h. */
10604
6ec2e0f5
SDJ
10605 /* For now, do not test the preprocessor; as of 2007 there are too many
10606 implementations with broken preprocessors. Perhaps this can
10607 be revisited in 2012. In the meantime, code should not expect
10608 #if to work with literals wider than 32 bits. */
10609 /* Test literals. */
10610 long long int ll = 9223372036854775807ll;
10611 long long int nll = -9223372036854775807LL;
10612 unsigned long long int ull = 18446744073709551615ULL;
10613 /* Test constant expressions. */
10614 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10615 ? 1 : -1)];
10616 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10617 ? 1 : -1)];
10618 int i = 63;
10619int
10620main ()
10621{
10622/* Test availability of runtime routines for shift and division. */
10623 long long int llmax = 9223372036854775807ll;
10624 unsigned long long int ullmax = 18446744073709551615ull;
10625 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10626 | (llmax / ll) | (llmax % ll)
10627 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10628 | (ullmax / ull) | (ullmax % ull));
10629 ;
10630 return 0;
10631}
8690e634 10632
6ec2e0f5
SDJ
10633_ACEOF
10634if ac_fn_c_try_link "$LINENO"; then :
8690e634 10635
6ec2e0f5
SDJ
10636else
10637 ac_cv_type_unsigned_long_long_int=no
10638fi
10639rm -f core conftest.err conftest.$ac_objext \
10640 conftest$ac_exeext conftest.$ac_ext
10641 fi
10642fi
10643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10644$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10645 if test $ac_cv_type_unsigned_long_long_int = yes; then
8690e634 10646
6ec2e0f5 10647$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8690e634 10648
6ec2e0f5 10649 fi
8690e634 10650
8690e634 10651
8690e634 10652
6ec2e0f5
SDJ
10653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10654$as_echo_n "checking for long long int... " >&6; }
d0ac1c44 10655if ${ac_cv_type_long_long_int+:} false; then :
6ec2e0f5
SDJ
10656 $as_echo_n "(cached) " >&6
10657else
10658 ac_cv_type_long_long_int=yes
10659 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10660 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10661 if test $ac_cv_type_long_long_int = yes; then
10662 if test "$cross_compiling" = yes; then :
10663 :
8690e634
JK
10664else
10665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10666/* end confdefs.h. */
6ec2e0f5
SDJ
10667#include <limits.h>
10668 #ifndef LLONG_MAX
10669 # define HALF \
10670 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10671 # define LLONG_MAX (HALF - 1 + HALF)
10672 #endif
8690e634
JK
10673int
10674main ()
10675{
6ec2e0f5
SDJ
10676long long int n = 1;
10677 int i;
10678 for (i = 0; ; i++)
10679 {
10680 long long int m = n << i;
10681 if (m >> i != n)
10682 return 1;
10683 if (LLONG_MAX / 2 < m)
10684 break;
10685 }
10686 return 0;
8690e634
JK
10687 ;
10688 return 0;
10689}
10690_ACEOF
10691if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5
SDJ
10692
10693else
10694 ac_cv_type_long_long_int=no
8690e634
JK
10695fi
10696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10697 conftest.$ac_objext conftest.beam conftest.$ac_ext
10698fi
10699
6ec2e0f5
SDJ
10700 fi
10701 fi
8690e634 10702fi
6ec2e0f5
SDJ
10703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10704$as_echo "$ac_cv_type_long_long_int" >&6; }
10705 if test $ac_cv_type_long_long_int = yes; then
49e4877c 10706
6ec2e0f5 10707$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
49e4877c 10708
6ec2e0f5 10709 fi
49e4877c 10710
49e4877c
PA
10711
10712
49e4877c
PA
10713
10714
49e4877c 10715
472fa5ee
SM
10716
10717
10718
10719
10720
10721
6ec2e0f5
SDJ
10722 gl_cv_c_multiarch=no
10723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10724/* end confdefs.h. */
10725#ifndef __APPLE_CC__
10726 not a universal capable compiler
10727 #endif
10728 typedef int dummy;
49e4877c 10729
49e4877c
PA
10730_ACEOF
10731if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
10732
10733 arch=
10734 prev=
10735 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10736 if test -n "$prev"; then
10737 case $word in
10738 i?86 | x86_64 | ppc | ppc64)
10739 if test -z "$arch" || test "$arch" = "$word"; then
10740 arch="$word"
10741 else
10742 gl_cv_c_multiarch=yes
10743 fi
10744 ;;
10745 esac
10746 prev=
10747 else
10748 if test "x$word" = "x-arch"; then
10749 prev=arch
10750 fi
10751 fi
10752 done
10753
49e4877c
PA
10754fi
10755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
10756 if test $gl_cv_c_multiarch = yes; then
10757 APPLE_UNIVERSAL_BUILD=1
10758 else
10759 APPLE_UNIVERSAL_BUILD=0
10760 fi
49e4877c 10761
49e4877c 10762
49e4877c
PA
10763
10764
49e4877c 10765
49e4877c 10766
49e4877c 10767
6ec2e0f5
SDJ
10768 if test $ac_cv_type_long_long_int = yes; then
10769 HAVE_LONG_LONG_INT=1
10770 else
10771 HAVE_LONG_LONG_INT=0
10772 fi
49e4877c 10773
49e4877c 10774
6ec2e0f5
SDJ
10775 if test $ac_cv_type_unsigned_long_long_int = yes; then
10776 HAVE_UNSIGNED_LONG_LONG_INT=1
8690e634 10777 else
6ec2e0f5
SDJ
10778 HAVE_UNSIGNED_LONG_LONG_INT=0
10779 fi
8690e634 10780
8690e634 10781
8690e634 10782
472fa5ee
SM
10783 :
10784
10785
10786
10787
10788
6ec2e0f5
SDJ
10789 if test $ac_cv_header_wchar_h = yes; then
10790 HAVE_WCHAR_H=1
10791 else
10792 HAVE_WCHAR_H=0
10793 fi
8690e634
JK
10794
10795
6ec2e0f5
SDJ
10796 if test $ac_cv_header_inttypes_h = yes; then
10797 HAVE_INTTYPES_H=1
10798 else
10799 HAVE_INTTYPES_H=0
10800 fi
8690e634
JK
10801
10802
6ec2e0f5
SDJ
10803 if test $ac_cv_header_sys_types_h = yes; then
10804 HAVE_SYS_TYPES_H=1
10805 else
10806 HAVE_SYS_TYPES_H=0
10807 fi
8690e634 10808
8690e634 10809
8690e634 10810
8690e634 10811
8690e634 10812
8690e634
JK
10813
10814
8690e634 10815
472fa5ee
SM
10816 :
10817
10818
10819
10820
10821
8690e634 10822
6ec2e0f5
SDJ
10823
10824
10825 if test $gl_cv_have_include_next = yes; then
10826 gl_cv_next_stdint_h='<'stdint.h'>'
10827 else
10828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
10829$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
d0ac1c44 10830if ${gl_cv_next_stdint_h+:} false; then :
8690e634
JK
10831 $as_echo_n "(cached) " >&6
10832else
8690e634 10833
6ec2e0f5 10834 if test $ac_cv_header_stdint_h = yes; then
8690e634 10835
8690e634 10836
8690e634 10837
6ec2e0f5
SDJ
10838
10839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10840/* end confdefs.h. */
10841#include <stdint.h>
8690e634 10842_ACEOF
6ec2e0f5
SDJ
10843 case "$host_os" in
10844 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10845 *) gl_absname_cpp="$ac_cpp" ;;
10846 esac
8690e634 10847
6ec2e0f5
SDJ
10848 case "$host_os" in
10849 mingw*)
10850 gl_dirsep_regex='[/\\]'
10851 ;;
10852 *)
10853 gl_dirsep_regex='\/'
10854 ;;
10855 esac
10856 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10857 gl_header_literal_regex=`echo 'stdint.h' \
10858 | sed -e "$gl_make_literal_regex_sed"`
10859 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10860 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10861 s|^/[^/]|//&|
10862 p
10863 q
10864 }'
10865
10866 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10867 sed -n "$gl_absolute_header_sed"`
10868
10869 gl_header=$gl_cv_absolute_stdint_h
10870 gl_cv_next_stdint_h='"'$gl_header'"'
10871 else
10872 gl_cv_next_stdint_h='<'stdint.h'>'
10873 fi
10874
10875
10876fi
10877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
10878$as_echo "$gl_cv_next_stdint_h" >&6; }
10879 fi
10880 NEXT_STDINT_H=$gl_cv_next_stdint_h
10881
10882 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10883 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10884 gl_next_as_first_directive='<'stdint.h'>'
10885 else
10886 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10887 gl_next_as_first_directive=$gl_cv_next_stdint_h
10888 fi
10889 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
8690e634
JK
10890
10891
10892
10893
6ec2e0f5
SDJ
10894 if test $ac_cv_header_stdint_h = yes; then
10895 HAVE_STDINT_H=1
10896 else
10897 HAVE_STDINT_H=0
10898 fi
10899
10900
10901 if test $ac_cv_header_stdint_h = yes; then
10902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
10903$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
d0ac1c44 10904if ${gl_cv_header_working_stdint_h+:} false; then :
8690e634
JK
10905 $as_echo_n "(cached) " >&6
10906else
6ec2e0f5
SDJ
10907 gl_cv_header_working_stdint_h=no
10908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
10909/* end confdefs.h. */
10910
6ec2e0f5
SDJ
10911
10912#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10913#define __STDC_CONSTANT_MACROS 1
10914#define __STDC_LIMIT_MACROS 1
10915#include <stdint.h>
10916/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
10917#if !(defined WCHAR_MIN && defined WCHAR_MAX)
10918#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
10919#endif
10920
10921
8690e634
JK
10922 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10923 included before <wchar.h>. */
10924 #include <stddef.h>
10925 #include <signal.h>
10926 #if HAVE_WCHAR_H
10927 # include <stdio.h>
10928 # include <time.h>
10929 # include <wchar.h>
10930 #endif
10931
8690e634 10932
6ec2e0f5
SDJ
10933#ifdef INT8_MAX
10934int8_t a1 = INT8_MAX;
10935int8_t a1min = INT8_MIN;
10936#endif
10937#ifdef INT16_MAX
10938int16_t a2 = INT16_MAX;
10939int16_t a2min = INT16_MIN;
10940#endif
10941#ifdef INT32_MAX
10942int32_t a3 = INT32_MAX;
10943int32_t a3min = INT32_MIN;
10944#endif
10945#ifdef INT64_MAX
10946int64_t a4 = INT64_MAX;
10947int64_t a4min = INT64_MIN;
10948#endif
10949#ifdef UINT8_MAX
10950uint8_t b1 = UINT8_MAX;
10951#else
10952typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
10953#endif
10954#ifdef UINT16_MAX
10955uint16_t b2 = UINT16_MAX;
10956#endif
10957#ifdef UINT32_MAX
10958uint32_t b3 = UINT32_MAX;
10959#endif
10960#ifdef UINT64_MAX
10961uint64_t b4 = UINT64_MAX;
10962#endif
10963int_least8_t c1 = INT8_C (0x7f);
10964int_least8_t c1max = INT_LEAST8_MAX;
10965int_least8_t c1min = INT_LEAST8_MIN;
10966int_least16_t c2 = INT16_C (0x7fff);
10967int_least16_t c2max = INT_LEAST16_MAX;
10968int_least16_t c2min = INT_LEAST16_MIN;
10969int_least32_t c3 = INT32_C (0x7fffffff);
10970int_least32_t c3max = INT_LEAST32_MAX;
10971int_least32_t c3min = INT_LEAST32_MIN;
10972int_least64_t c4 = INT64_C (0x7fffffffffffffff);
10973int_least64_t c4max = INT_LEAST64_MAX;
10974int_least64_t c4min = INT_LEAST64_MIN;
10975uint_least8_t d1 = UINT8_C (0xff);
10976uint_least8_t d1max = UINT_LEAST8_MAX;
10977uint_least16_t d2 = UINT16_C (0xffff);
10978uint_least16_t d2max = UINT_LEAST16_MAX;
10979uint_least32_t d3 = UINT32_C (0xffffffff);
10980uint_least32_t d3max = UINT_LEAST32_MAX;
10981uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
10982uint_least64_t d4max = UINT_LEAST64_MAX;
10983int_fast8_t e1 = INT_FAST8_MAX;
10984int_fast8_t e1min = INT_FAST8_MIN;
10985int_fast16_t e2 = INT_FAST16_MAX;
10986int_fast16_t e2min = INT_FAST16_MIN;
10987int_fast32_t e3 = INT_FAST32_MAX;
10988int_fast32_t e3min = INT_FAST32_MIN;
10989int_fast64_t e4 = INT_FAST64_MAX;
10990int_fast64_t e4min = INT_FAST64_MIN;
10991uint_fast8_t f1 = UINT_FAST8_MAX;
10992uint_fast16_t f2 = UINT_FAST16_MAX;
10993uint_fast32_t f3 = UINT_FAST32_MAX;
10994uint_fast64_t f4 = UINT_FAST64_MAX;
10995#ifdef INTPTR_MAX
10996intptr_t g = INTPTR_MAX;
10997intptr_t gmin = INTPTR_MIN;
10998#endif
10999#ifdef UINTPTR_MAX
11000uintptr_t h = UINTPTR_MAX;
11001#endif
11002intmax_t i = INTMAX_MAX;
11003uintmax_t j = UINTMAX_MAX;
8690e634 11004
6ec2e0f5
SDJ
11005/* Check that SIZE_MAX has the correct type, if possible. */
11006#if 201112 <= __STDC_VERSION__
11007int k = _Generic (SIZE_MAX, size_t: 0);
11008#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
11009 || (0x5110 <= __SUNPRO_C && !__STDC__))
11010extern size_t k;
11011extern __typeof__ (SIZE_MAX) k;
11012#endif
8690e634 11013
6ec2e0f5
SDJ
11014#include <limits.h> /* for CHAR_BIT */
11015#define TYPE_MINIMUM(t) \
11016 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
11017#define TYPE_MAXIMUM(t) \
11018 ((t) ((t) 0 < (t) -1 \
11019 ? (t) -1 \
11020 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
11021struct s {
11022 int check_PTRDIFF:
11023 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
11024 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
11025 ? 1 : -1;
11026 /* Detect bug in FreeBSD 6.0 / ia64. */
11027 int check_SIG_ATOMIC:
11028 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
11029 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
11030 ? 1 : -1;
11031 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
11032 int check_WCHAR:
11033 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
11034 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
11035 ? 1 : -1;
11036 /* Detect bug in mingw. */
11037 int check_WINT:
11038 WINT_MIN == TYPE_MINIMUM (wint_t)
11039 && WINT_MAX == TYPE_MAXIMUM (wint_t)
11040 ? 1 : -1;
8690e634 11041
6ec2e0f5
SDJ
11042 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
11043 int check_UINT8_C:
11044 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
11045 int check_UINT16_C:
11046 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
8690e634 11047
6ec2e0f5
SDJ
11048 /* Detect bugs in OpenBSD 3.9 stdint.h. */
11049#ifdef UINT8_MAX
11050 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
11051#endif
11052#ifdef UINT16_MAX
11053 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
11054#endif
11055#ifdef UINT32_MAX
11056 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
11057#endif
11058#ifdef UINT64_MAX
11059 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
11060#endif
11061 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
11062 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
11063 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
11064 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
11065 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
11066 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
11067 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
11068 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
11069 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
11070 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
11071 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
11072};
8690e634 11073
8690e634
JK
11074int
11075main ()
11076{
11077
11078 ;
11079 return 0;
11080}
11081_ACEOF
11082if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11083 if test "$cross_compiling" = yes; then :
5e8754f9 11084 gl_cv_header_working_stdint_h=yes
8690e634 11085
6ec2e0f5
SDJ
11086else
11087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11088/* end confdefs.h. */
8690e634 11089
8690e634 11090
6ec2e0f5
SDJ
11091#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
11092#define __STDC_CONSTANT_MACROS 1
11093#define __STDC_LIMIT_MACROS 1
11094#include <stdint.h>
8690e634 11095
8690e634
JK
11096
11097 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11098 included before <wchar.h>. */
11099 #include <stddef.h>
11100 #include <signal.h>
11101 #if HAVE_WCHAR_H
11102 # include <stdio.h>
11103 # include <time.h>
11104 # include <wchar.h>
11105 #endif
11106
8690e634 11107
6ec2e0f5
SDJ
11108#include <stdio.h>
11109#include <string.h>
11110#define MVAL(macro) MVAL1(macro)
11111#define MVAL1(expression) #expression
11112static const char *macro_values[] =
11113 {
11114#ifdef INT8_MAX
11115 MVAL (INT8_MAX),
11116#endif
11117#ifdef INT16_MAX
11118 MVAL (INT16_MAX),
11119#endif
11120#ifdef INT32_MAX
11121 MVAL (INT32_MAX),
11122#endif
11123#ifdef INT64_MAX
11124 MVAL (INT64_MAX),
11125#endif
11126#ifdef UINT8_MAX
11127 MVAL (UINT8_MAX),
11128#endif
11129#ifdef UINT16_MAX
11130 MVAL (UINT16_MAX),
11131#endif
11132#ifdef UINT32_MAX
11133 MVAL (UINT32_MAX),
11134#endif
11135#ifdef UINT64_MAX
11136 MVAL (UINT64_MAX),
11137#endif
11138 NULL
11139 };
11140
11141int
11142main ()
11143{
11144
11145 const char **mv;
11146 for (mv = macro_values; *mv != NULL; mv++)
11147 {
11148 const char *value = *mv;
11149 /* Test whether it looks like a cast expression. */
11150 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
11151 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
11152 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
11153 || strncmp (value, "((int)"/*)*/, 6) == 0
11154 || strncmp (value, "((signed short)"/*)*/, 15) == 0
11155 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
11156 return mv - macro_values + 1;
11157 }
11158 return 0;
11159
11160 ;
8690e634
JK
11161 return 0;
11162}
11163_ACEOF
6ec2e0f5
SDJ
11164if ac_fn_c_try_run "$LINENO"; then :
11165 gl_cv_header_working_stdint_h=yes
8690e634 11166fi
6ec2e0f5
SDJ
11167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11168 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 11169fi
8690e634
JK
11170
11171
6ec2e0f5
SDJ
11172fi
11173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 11174
6ec2e0f5
SDJ
11175fi
11176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
11177$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8690e634
JK
11178 fi
11179
6ec2e0f5
SDJ
11180 HAVE_C99_STDINT_H=0
11181 HAVE_SYS_BITYPES_H=0
11182 HAVE_SYS_INTTYPES_H=0
11183 STDINT_H=stdint.h
5e8754f9
SDJ
11184 if test "$gl_cv_header_working_stdint_h" = yes; then
11185 HAVE_C99_STDINT_H=1
11186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
6ec2e0f5 11187$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
d0ac1c44 11188if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
6ec2e0f5 11189 $as_echo_n "(cached) " >&6
49e4877c 11190else
6ec2e0f5 11191 gl_cv_header_stdint_predates_cxx11_h=yes
5e8754f9 11192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 11193/* end confdefs.h. */
49e4877c
PA
11194
11195
6ec2e0f5
SDJ
11196#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
11197#include <stdint.h>
49e4877c
PA
11198
11199
6ec2e0f5
SDJ
11200 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11201 included before <wchar.h>. */
11202 #include <stddef.h>
11203 #include <signal.h>
11204 #if HAVE_WCHAR_H
11205 # include <stdio.h>
11206 # include <time.h>
11207 # include <wchar.h>
11208 #endif
49e4877c 11209
8690e634 11210
6ec2e0f5
SDJ
11211intmax_t im = INTMAX_MAX;
11212int32_t i32 = INT32_C (0x7fffffff);
8690e634 11213
6ec2e0f5
SDJ
11214int
11215main ()
11216{
8690e634 11217
6ec2e0f5
SDJ
11218 ;
11219 return 0;
11220}
11221_ACEOF
11222if ac_fn_c_try_compile "$LINENO"; then :
11223 gl_cv_header_stdint_predates_cxx11_h=no
11224fi
11225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11226fi
11227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
11228$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
8690e634 11229
5e8754f9 11230 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
8690e634 11231
6ec2e0f5 11232$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
8690e634
JK
11233
11234
6ec2e0f5 11235$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
8690e634 11236
5e8754f9
SDJ
11237 fi
11238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
6ec2e0f5 11239$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
d0ac1c44 11240if ${gl_cv_header_stdint_width+:} false; then :
6ec2e0f5
SDJ
11241 $as_echo_n "(cached) " >&6
11242else
11243 gl_cv_header_stdint_width=no
5e8754f9 11244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 11245/* end confdefs.h. */
8690e634 11246
5e8754f9
SDJ
11247 /* Work if build is not clean. */
11248 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
11249 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
11250 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
11251 #endif
11252 #include <stdint.h>
8690e634 11253
6ec2e0f5
SDJ
11254 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11255 included before <wchar.h>. */
11256 #include <stddef.h>
11257 #include <signal.h>
11258 #if HAVE_WCHAR_H
11259 # include <stdio.h>
11260 # include <time.h>
11261 # include <wchar.h>
11262 #endif
8690e634 11263
5e8754f9 11264 int iw = UINTMAX_WIDTH;
8690e634 11265
6ec2e0f5
SDJ
11266int
11267main ()
11268{
8690e634 11269
6ec2e0f5
SDJ
11270 ;
11271 return 0;
11272}
11273_ACEOF
11274if ac_fn_c_try_compile "$LINENO"; then :
11275 gl_cv_header_stdint_width=yes
11276fi
11277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11278fi
11279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
11280$as_echo "$gl_cv_header_stdint_width" >&6; }
5e8754f9
SDJ
11281 if test "$gl_cv_header_stdint_width" = yes; then
11282 STDINT_H=
11283 fi
11284 else
11285 for ac_header in sys/inttypes.h sys/bitypes.h
6ec2e0f5
SDJ
11286do :
11287 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11288ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 11289if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6ec2e0f5
SDJ
11290 cat >>confdefs.h <<_ACEOF
11291#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11292_ACEOF
8690e634 11293
6ec2e0f5 11294fi
8690e634 11295
6ec2e0f5 11296done
8690e634 11297
5e8754f9
SDJ
11298 if test $ac_cv_header_sys_inttypes_h = yes; then
11299 HAVE_SYS_INTTYPES_H=1
11300 fi
11301 if test $ac_cv_header_sys_bitypes_h = yes; then
11302 HAVE_SYS_BITYPES_H=1
11303 fi
8690e634
JK
11304
11305
6ec2e0f5 11306 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634
JK
11307
11308
6ec2e0f5
SDJ
11309 for gltype in ptrdiff_t size_t ; do
11310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11311$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 11312if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
8690e634
JK
11313 $as_echo_n "(cached) " >&6
11314else
6ec2e0f5
SDJ
11315 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11316 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11317 included before <wchar.h>. */
11318 #include <stddef.h>
11319 #include <signal.h>
11320 #if HAVE_WCHAR_H
11321 # include <stdio.h>
11322 # include <time.h>
11323 # include <wchar.h>
11324 #endif
8690e634 11325
6ec2e0f5 11326#include <limits.h>"; then :
4a626d0a 11327
6ec2e0f5
SDJ
11328else
11329 result=unknown
11330fi
4a626d0a 11331
6ec2e0f5 11332 eval gl_cv_bitsizeof_${gltype}=\$result
4a626d0a 11333
6ec2e0f5
SDJ
11334fi
11335eval ac_res=\$gl_cv_bitsizeof_${gltype}
11336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11337$as_echo "$ac_res" >&6; }
11338 eval result=\$gl_cv_bitsizeof_${gltype}
11339 if test $result = unknown; then
11340 result=0
11341 fi
11342 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11343 cat >>confdefs.h <<_ACEOF
11344#define BITSIZEOF_${GLTYPE} $result
11345_ACEOF
4a626d0a 11346
6ec2e0f5
SDJ
11347 eval BITSIZEOF_${GLTYPE}=\$result
11348 done
4a626d0a 11349
8690e634 11350
6ec2e0f5 11351 fi
8690e634 11352
8690e634 11353
6ec2e0f5
SDJ
11354 for gltype in sig_atomic_t wchar_t wint_t ; do
11355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11356$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 11357if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
6ec2e0f5
SDJ
11358 $as_echo_n "(cached) " >&6
11359else
11360 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11361 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11362 included before <wchar.h>. */
11363 #include <stddef.h>
11364 #include <signal.h>
11365 #if HAVE_WCHAR_H
11366 # include <stdio.h>
11367 # include <time.h>
11368 # include <wchar.h>
11369 #endif
8690e634 11370
6ec2e0f5
SDJ
11371#include <limits.h>"; then :
11372
11373else
11374 result=unknown
11375fi
8690e634 11376
6ec2e0f5 11377 eval gl_cv_bitsizeof_${gltype}=\$result
8690e634 11378
6ec2e0f5
SDJ
11379fi
11380eval ac_res=\$gl_cv_bitsizeof_${gltype}
11381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11382$as_echo "$ac_res" >&6; }
11383 eval result=\$gl_cv_bitsizeof_${gltype}
11384 if test $result = unknown; then
11385 result=0
11386 fi
11387 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11388 cat >>confdefs.h <<_ACEOF
11389#define BITSIZEOF_${GLTYPE} $result
11390_ACEOF
8690e634 11391
6ec2e0f5
SDJ
11392 eval BITSIZEOF_${GLTYPE}=\$result
11393 done
8690e634
JK
11394
11395
11396
11397
6ec2e0f5
SDJ
11398 for gltype in sig_atomic_t wchar_t wint_t ; do
11399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
11400$as_echo_n "checking whether $gltype is signed... " >&6; }
d0ac1c44 11401if eval \${gl_cv_type_${gltype}_signed+:} false; then :
8690e634
JK
11402 $as_echo_n "(cached) " >&6
11403else
11404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11405/* end confdefs.h. */
8690e634 11406
6ec2e0f5
SDJ
11407 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11408 included before <wchar.h>. */
11409 #include <stddef.h>
11410 #include <signal.h>
11411 #if HAVE_WCHAR_H
11412 # include <stdio.h>
11413 # include <time.h>
11414 # include <wchar.h>
11415 #endif
11416
11417 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8690e634
JK
11418int
11419main ()
11420{
6ec2e0f5 11421
8690e634
JK
11422 ;
11423 return 0;
11424}
11425_ACEOF
11426if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11427 result=yes
8690e634 11428else
6ec2e0f5 11429 result=no
8690e634
JK
11430fi
11431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11432 eval gl_cv_type_${gltype}_signed=\$result
11433
8690e634 11434fi
6ec2e0f5 11435eval ac_res=\$gl_cv_type_${gltype}_signed
8690e634
JK
11436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11437$as_echo "$ac_res" >&6; }
6ec2e0f5
SDJ
11438 eval result=\$gl_cv_type_${gltype}_signed
11439 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11440 if test "$result" = yes; then
11441 cat >>confdefs.h <<_ACEOF
11442#define HAVE_SIGNED_${GLTYPE} 1
8690e634
JK
11443_ACEOF
11444
6ec2e0f5
SDJ
11445 eval HAVE_SIGNED_${GLTYPE}=1
11446 else
11447 eval HAVE_SIGNED_${GLTYPE}=0
11448 fi
11449 done
8690e634 11450
8690e634 11451
6ec2e0f5
SDJ
11452 gl_cv_type_ptrdiff_t_signed=yes
11453 gl_cv_type_size_t_signed=no
11454 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634 11455
8690e634 11456
6ec2e0f5
SDJ
11457 for gltype in ptrdiff_t size_t ; do
11458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11459$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 11460if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
11461 $as_echo_n "(cached) " >&6
11462else
6ec2e0f5
SDJ
11463 eval gl_cv_type_${gltype}_suffix=no
11464 eval result=\$gl_cv_type_${gltype}_signed
11465 if test "$result" = yes; then
11466 glsufu=
11467 else
11468 glsufu=u
11469 fi
11470 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11471 case $glsuf in
11472 '') gltype1='int';;
11473 l) gltype1='long int';;
11474 ll) gltype1='long long int';;
11475 i64) gltype1='__int64';;
11476 u) gltype1='unsigned int';;
11477 ul) gltype1='unsigned long int';;
11478 ull) gltype1='unsigned long long int';;
11479 ui64)gltype1='unsigned __int64';;
11480 esac
11481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
11482/* end confdefs.h. */
11483
6ec2e0f5
SDJ
11484 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11485 included before <wchar.h>. */
11486 #include <stddef.h>
11487 #include <signal.h>
11488 #if HAVE_WCHAR_H
11489 # include <stdio.h>
11490 # include <time.h>
11491 # include <wchar.h>
11492 #endif
8690e634 11493
6ec2e0f5
SDJ
11494 extern $gltype foo;
11495 extern $gltype1 foo;
8690e634
JK
11496int
11497main ()
11498{
11499
11500 ;
11501 return 0;
11502}
11503_ACEOF
11504if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11505 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634
JK
11506fi
11507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11508 eval result=\$gl_cv_type_${gltype}_suffix
11509 test "$result" != no && break
11510 done
8690e634 11511fi
6ec2e0f5
SDJ
11512eval ac_res=\$gl_cv_type_${gltype}_suffix
11513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11514$as_echo "$ac_res" >&6; }
11515 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11516 eval result=\$gl_cv_type_${gltype}_suffix
11517 test "$result" = no && result=
11518 eval ${GLTYPE}_SUFFIX=\$result
11519 cat >>confdefs.h <<_ACEOF
11520#define ${GLTYPE}_SUFFIX $result
8690e634
JK
11521_ACEOF
11522
6ec2e0f5 11523 done
8690e634
JK
11524
11525
6ec2e0f5 11526 fi
8690e634 11527
6ec2e0f5
SDJ
11528
11529 for gltype in sig_atomic_t wchar_t wint_t ; do
11530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11531$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 11532if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
11533 $as_echo_n "(cached) " >&6
11534else
6ec2e0f5
SDJ
11535 eval gl_cv_type_${gltype}_suffix=no
11536 eval result=\$gl_cv_type_${gltype}_signed
11537 if test "$result" = yes; then
11538 glsufu=
11539 else
11540 glsufu=u
11541 fi
11542 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11543 case $glsuf in
11544 '') gltype1='int';;
11545 l) gltype1='long int';;
11546 ll) gltype1='long long int';;
11547 i64) gltype1='__int64';;
11548 u) gltype1='unsigned int';;
11549 ul) gltype1='unsigned long int';;
11550 ull) gltype1='unsigned long long int';;
11551 ui64)gltype1='unsigned __int64';;
11552 esac
11553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 11554/* end confdefs.h. */
88b48903 11555
6ec2e0f5
SDJ
11556 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11557 included before <wchar.h>. */
11558 #include <stddef.h>
11559 #include <signal.h>
11560 #if HAVE_WCHAR_H
11561 # include <stdio.h>
11562 # include <time.h>
11563 # include <wchar.h>
11564 #endif
88b48903 11565
6ec2e0f5
SDJ
11566 extern $gltype foo;
11567 extern $gltype1 foo;
88b48903
WN
11568int
11569main ()
11570{
88b48903
WN
11571
11572 ;
11573 return 0;
11574}
11575_ACEOF
11576if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11577 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634 11578fi
88b48903 11579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11580 eval result=\$gl_cv_type_${gltype}_suffix
11581 test "$result" != no && break
11582 done
8690e634 11583fi
6ec2e0f5
SDJ
11584eval ac_res=\$gl_cv_type_${gltype}_suffix
11585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11586$as_echo "$ac_res" >&6; }
11587 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11588 eval result=\$gl_cv_type_${gltype}_suffix
11589 test "$result" = no && result=
11590 eval ${GLTYPE}_SUFFIX=\$result
11591 cat >>confdefs.h <<_ACEOF
11592#define ${GLTYPE}_SUFFIX $result
88b48903 11593_ACEOF
8690e634 11594
6ec2e0f5 11595 done
8690e634
JK
11596
11597
11598
5e8754f9 11599 if test $BITSIZEOF_WINT_T -lt 32; then
6ec2e0f5
SDJ
11600 BITSIZEOF_WINT_T=32
11601 fi
8690e634 11602
5e8754f9 11603 fi
7a6dbc2f 11604
5e8754f9
SDJ
11605 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
11606 LIMITS_H=limits.h
6ec2e0f5
SDJ
11607 if test -n "$LIMITS_H"; then
11608 GL_GENERATE_LIMITS_H_TRUE=
11609 GL_GENERATE_LIMITS_H_FALSE='#'
88b48903 11610else
6ec2e0f5
SDJ
11611 GL_GENERATE_LIMITS_H_TRUE='#'
11612 GL_GENERATE_LIMITS_H_FALSE=
88b48903 11613fi
8690e634
JK
11614
11615
11616
11617
11618
6ec2e0f5
SDJ
11619
11620 if test -n "$STDINT_H"; then
11621 GL_GENERATE_STDINT_H_TRUE=
11622 GL_GENERATE_STDINT_H_FALSE='#'
11623else
11624 GL_GENERATE_STDINT_H_TRUE='#'
11625 GL_GENERATE_STDINT_H_FALSE=
88b48903 11626fi
8690e634 11627
8690e634
JK
11628
11629
11630
6ec2e0f5 11631
472fa5ee
SM
11632
11633
11634
6ec2e0f5
SDJ
11635 GNULIB_IMAXABS=0;
11636 GNULIB_IMAXDIV=0;
11637 GNULIB_STRTOIMAX=0;
11638 GNULIB_STRTOUMAX=0;
11639 HAVE_DECL_IMAXABS=1;
11640 HAVE_DECL_IMAXDIV=1;
11641 HAVE_DECL_STRTOIMAX=1;
11642 HAVE_DECL_STRTOUMAX=1;
11643 REPLACE_STRTOIMAX=0;
11644 REPLACE_STRTOUMAX=0;
11645 INT32_MAX_LT_INTMAX_MAX=1;
11646 INT64_MAX_EQ_LONG_MAX='defined _LP64';
11647 PRI_MACROS_BROKEN=0;
11648 PRIPTR_PREFIX=__PRIPTR_PREFIX;
11649 UINT32_MAX_LT_UINTMAX_MAX=1;
11650 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
11651
11652
11653
11654
472fa5ee
SM
11655 :
11656
11657
11658
11659
11660
11661
11662
6ec2e0f5
SDJ
11663
11664
11665
11666
11667
11668
472fa5ee
SM
11669 :
11670
11671
11672
6ec2e0f5
SDJ
11673
11674
11675
11676
11677
11678 if test $gl_cv_have_include_next = yes; then
11679 gl_cv_next_inttypes_h='<'inttypes.h'>'
11680 else
11681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
11682$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
d0ac1c44 11683if ${gl_cv_next_inttypes_h+:} false; then :
6ec2e0f5 11684 $as_echo_n "(cached) " >&6
88b48903 11685else
8690e634 11686
6ec2e0f5 11687 if test $ac_cv_header_inttypes_h = yes; then
8690e634
JK
11688
11689
8690e634
JK
11690
11691
6ec2e0f5
SDJ
11692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11693/* end confdefs.h. */
11694#include <inttypes.h>
88b48903 11695_ACEOF
6ec2e0f5
SDJ
11696 case "$host_os" in
11697 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11698 *) gl_absname_cpp="$ac_cpp" ;;
11699 esac
8690e634 11700
6ec2e0f5
SDJ
11701 case "$host_os" in
11702 mingw*)
11703 gl_dirsep_regex='[/\\]'
11704 ;;
11705 *)
11706 gl_dirsep_regex='\/'
88b48903
WN
11707 ;;
11708 esac
6ec2e0f5
SDJ
11709 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11710 gl_header_literal_regex=`echo 'inttypes.h' \
11711 | sed -e "$gl_make_literal_regex_sed"`
11712 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11713 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11714 s|^/[^/]|//&|
11715 p
11716 q
11717 }'
8690e634 11718
6ec2e0f5
SDJ
11719 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11720 sed -n "$gl_absolute_header_sed"`
8690e634 11721
6ec2e0f5
SDJ
11722 gl_header=$gl_cv_absolute_inttypes_h
11723 gl_cv_next_inttypes_h='"'$gl_header'"'
11724 else
11725 gl_cv_next_inttypes_h='<'inttypes.h'>'
11726 fi
88b48903 11727
88b48903 11728
88b48903 11729fi
6ec2e0f5
SDJ
11730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
11731$as_echo "$gl_cv_next_inttypes_h" >&6; }
11732 fi
11733 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
88b48903 11734
6ec2e0f5
SDJ
11735 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11736 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11737 gl_next_as_first_directive='<'inttypes.h'>'
11738 else
11739 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11740 gl_next_as_first_directive=$gl_cv_next_inttypes_h
11741 fi
11742 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
88b48903 11743
6ec2e0f5
SDJ
11744
11745
11746
11747
11748
11749
11750
5e8754f9
SDJ
11751 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
11752 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11754$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11755if eval \${$as_gl_Symbol+:} false; then :
11756 $as_echo_n "(cached) " >&6
11757else
11758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11759/* end confdefs.h. */
11760#include <inttypes.h>
11761
11762int
11763main ()
11764{
11765#undef $gl_func
11766 (void) $gl_func;
11767 ;
11768 return 0;
11769}
11770_ACEOF
11771if ac_fn_c_try_compile "$LINENO"; then :
11772 eval "$as_gl_Symbol=yes"
11773else
11774 eval "$as_gl_Symbol=no"
11775fi
11776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11777fi
11778eval ac_res=\$$as_gl_Symbol
11779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11780$as_echo "$ac_res" >&6; }
11781 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11782 cat >>confdefs.h <<_ACEOF
11783#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11784_ACEOF
6ec2e0f5 11785
5e8754f9
SDJ
11786 eval ac_cv_have_decl_$gl_func=yes
11787fi
11788 done
6ec2e0f5
SDJ
11789
11790
11791
11792 for ac_header in inttypes.h
11793do :
11794 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
d0ac1c44 11795if test "x$ac_cv_header_inttypes_h" = xyes; then :
6ec2e0f5
SDJ
11796 cat >>confdefs.h <<_ACEOF
11797#define HAVE_INTTYPES_H 1
11798_ACEOF
11799
11800fi
11801
11802done
11803
11804 if test $ac_cv_header_inttypes_h = yes; then
11805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
11806$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
d0ac1c44 11807if ${gt_cv_inttypes_pri_broken+:} false; then :
6ec2e0f5
SDJ
11808 $as_echo_n "(cached) " >&6
11809else
11810
11811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11812/* end confdefs.h. */
11813
11814#include <inttypes.h>
11815#ifdef PRId32
11816char *p = PRId32;
11817#endif
11818
11819int
11820main ()
11821{
11822
11823 ;
11824 return 0;
11825}
11826_ACEOF
11827if ac_fn_c_try_compile "$LINENO"; then :
11828 gt_cv_inttypes_pri_broken=no
11829else
11830 gt_cv_inttypes_pri_broken=yes
11831fi
11832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11833
11834fi
11835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
11836$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
11837 fi
11838 if test "$gt_cv_inttypes_pri_broken" = yes; then
11839
11840cat >>confdefs.h <<_ACEOF
11841#define PRI_MACROS_BROKEN 1
11842_ACEOF
11843
11844 PRI_MACROS_BROKEN=1
11845 else
11846 PRI_MACROS_BROKEN=0
11847 fi
11848
11849
11850
11851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
11852$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
d0ac1c44 11853if ${gl_cv_cc_double_expbit0+:} false; then :
6ec2e0f5
SDJ
11854 $as_echo_n "(cached) " >&6
11855else
11856
11857 if test "$cross_compiling" = yes; then :
11858
11859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11860/* end confdefs.h. */
11861
11862#if defined arm || defined __arm || defined __arm__
11863 mixed_endianness
11864#endif
11865
11866_ACEOF
11867if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11868 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
11869 gl_cv_cc_double_expbit0="unknown"
11870else
11871
11872 :
d0ac1c44 11873if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
11874 $as_echo_n "(cached) " >&6
11875else
11876 ac_cv_c_bigendian=unknown
11877 # See if we're dealing with a universal compiler.
11878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11879/* end confdefs.h. */
11880#ifndef __APPLE_CC__
11881 not a universal capable compiler
11882 #endif
11883 typedef int dummy;
11884
11885_ACEOF
11886if ac_fn_c_try_compile "$LINENO"; then :
11887
11888 # Check for potential -arch flags. It is not universal unless
11889 # there are at least two -arch flags with different values.
11890 ac_arch=
11891 ac_prev=
11892 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11893 if test -n "$ac_prev"; then
11894 case $ac_word in
11895 i?86 | x86_64 | ppc | ppc64)
11896 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11897 ac_arch=$ac_word
11898 else
11899 ac_cv_c_bigendian=universal
11900 break
11901 fi
11902 ;;
11903 esac
11904 ac_prev=
11905 elif test "x$ac_word" = "x-arch"; then
11906 ac_prev=arch
11907 fi
11908 done
11909fi
11910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11911 if test $ac_cv_c_bigendian = unknown; then
11912 # See if sys/param.h defines the BYTE_ORDER macro.
11913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11914/* end confdefs.h. */
11915#include <sys/types.h>
11916 #include <sys/param.h>
11917
11918int
11919main ()
11920{
11921#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11922 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11923 && LITTLE_ENDIAN)
11924 bogus endian macros
11925 #endif
11926
11927 ;
11928 return 0;
11929}
11930_ACEOF
11931if ac_fn_c_try_compile "$LINENO"; then :
11932 # It does; now see whether it defined to BIG_ENDIAN or not.
11933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11934/* end confdefs.h. */
11935#include <sys/types.h>
11936 #include <sys/param.h>
11937
11938int
11939main ()
11940{
11941#if BYTE_ORDER != BIG_ENDIAN
11942 not big endian
11943 #endif
11944
11945 ;
11946 return 0;
11947}
11948_ACEOF
11949if ac_fn_c_try_compile "$LINENO"; then :
11950 ac_cv_c_bigendian=yes
11951else
11952 ac_cv_c_bigendian=no
11953fi
11954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11955fi
11956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11957 fi
11958 if test $ac_cv_c_bigendian = unknown; then
11959 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11961/* end confdefs.h. */
11962#include <limits.h>
11963
11964int
88b48903
WN
11965main ()
11966{
11967#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11968 bogus endian macros
11969 #endif
11970
11971 ;
11972 return 0;
11973}
11974_ACEOF
11975if ac_fn_c_try_compile "$LINENO"; then :
11976 # It does; now see whether it defined to _BIG_ENDIAN or not.
11977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11978/* end confdefs.h. */
11979#include <limits.h>
11980
11981int
11982main ()
11983{
11984#ifndef _BIG_ENDIAN
11985 not big endian
11986 #endif
11987
11988 ;
11989 return 0;
11990}
11991_ACEOF
11992if ac_fn_c_try_compile "$LINENO"; then :
11993 ac_cv_c_bigendian=yes
11994else
11995 ac_cv_c_bigendian=no
11996fi
11997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11998fi
11999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12000 fi
12001 if test $ac_cv_c_bigendian = unknown; then
12002 # Compile a test program.
12003 if test "$cross_compiling" = yes; then :
12004 # Try to guess by grepping values from an object file.
12005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12006/* end confdefs.h. */
12007short int ascii_mm[] =
12008 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12009 short int ascii_ii[] =
12010 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12011 int use_ascii (int i) {
12012 return ascii_mm[i] + ascii_ii[i];
12013 }
12014 short int ebcdic_ii[] =
12015 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12016 short int ebcdic_mm[] =
12017 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12018 int use_ebcdic (int i) {
12019 return ebcdic_mm[i] + ebcdic_ii[i];
12020 }
12021 extern int foo;
12022
12023int
12024main ()
12025{
12026return use_ascii (foo) == use_ebcdic (foo);
12027 ;
12028 return 0;
12029}
12030_ACEOF
12031if ac_fn_c_try_compile "$LINENO"; then :
12032 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12033 ac_cv_c_bigendian=yes
12034 fi
12035 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12036 if test "$ac_cv_c_bigendian" = unknown; then
12037 ac_cv_c_bigendian=no
12038 else
12039 # finding both strings is unlikely to happen, but who knows?
12040 ac_cv_c_bigendian=unknown
12041 fi
12042 fi
12043fi
12044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12045else
12046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12047/* end confdefs.h. */
12048$ac_includes_default
12049int
12050main ()
12051{
12052
12053 /* Are we little or big endian? From Harbison&Steele. */
12054 union
12055 {
12056 long int l;
12057 char c[sizeof (long int)];
12058 } u;
12059 u.l = 1;
12060 return u.c[sizeof (long int) - 1] == 1;
12061
12062 ;
12063 return 0;
12064}
12065_ACEOF
12066if ac_fn_c_try_run "$LINENO"; then :
12067 ac_cv_c_bigendian=no
12068else
12069 ac_cv_c_bigendian=yes
12070fi
12071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12072 conftest.$ac_objext conftest.beam conftest.$ac_ext
12073fi
12074
12075 fi
12076fi
6ec2e0f5 12077:
88b48903
WN
12078 case $ac_cv_c_bigendian in #(
12079 yes)
6ec2e0f5 12080 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
88b48903 12081 no)
6ec2e0f5 12082 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
88b48903
WN
12083 universal)
12084
12085$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12086
12087 ;; #(
12088 *)
6ec2e0f5 12089 gl_cv_cc_double_expbit0="unknown" ;;
88b48903
WN
12090 esac
12091
12092
6ec2e0f5
SDJ
12093fi
12094rm -f conftest*
88b48903 12095
2196f55f 12096
2196f55f
YQ
12097else
12098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12099/* end confdefs.h. */
2196f55f 12100
6ec2e0f5
SDJ
12101#include <float.h>
12102#include <stddef.h>
12103#include <stdio.h>
12104#include <string.h>
12105#define NWORDS \
12106 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
12107typedef union { double value; unsigned int word[NWORDS]; } memory_double;
12108static unsigned int ored_words[NWORDS];
12109static unsigned int anded_words[NWORDS];
12110static void add_to_ored_words (double x)
2196f55f 12111{
6ec2e0f5
SDJ
12112 memory_double m;
12113 size_t i;
12114 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
12115 memset (&m, 0, sizeof (memory_double));
12116 m.value = x;
12117 for (i = 0; i < NWORDS; i++)
12118 {
12119 ored_words[i] |= m.word[i];
12120 anded_words[i] &= m.word[i];
12121 }
2196f55f 12122}
6ec2e0f5 12123int main ()
88b48903 12124{
6ec2e0f5
SDJ
12125 size_t j;
12126 FILE *fp = fopen ("conftest.out", "w");
12127 if (fp == NULL)
12128 return 1;
12129 for (j = 0; j < NWORDS; j++)
12130 anded_words[j] = ~ (unsigned int) 0;
12131 add_to_ored_words (0.25);
12132 add_to_ored_words (0.5);
12133 add_to_ored_words (1.0);
12134 add_to_ored_words (2.0);
12135 add_to_ored_words (4.0);
12136 /* Remove bits that are common (e.g. if representation of the first mantissa
12137 bit is explicit). */
12138 for (j = 0; j < NWORDS; j++)
12139 ored_words[j] &= ~anded_words[j];
12140 /* Now find the nonzero word. */
12141 for (j = 0; j < NWORDS; j++)
12142 if (ored_words[j] != 0)
12143 break;
12144 if (j < NWORDS)
12145 {
12146 size_t i;
12147 for (i = j + 1; i < NWORDS; i++)
12148 if (ored_words[i] != 0)
12149 {
12150 fprintf (fp, "unknown");
12151 return (fclose (fp) != 0);
12152 }
12153 for (i = 0; ; i++)
12154 if ((ored_words[j] >> i) & 1)
12155 {
12156 fprintf (fp, "word %d bit %d", (int) j, (int) i);
12157 return (fclose (fp) != 0);
12158 }
12159 }
12160 fprintf (fp, "unknown");
12161 return (fclose (fp) != 0);
88b48903 12162}
6ec2e0f5 12163
88b48903 12164_ACEOF
6ec2e0f5
SDJ
12165if ac_fn_c_try_run "$LINENO"; then :
12166 gl_cv_cc_double_expbit0=`cat conftest.out`
88b48903 12167else
6ec2e0f5 12168 gl_cv_cc_double_expbit0="unknown"
88b48903 12169fi
6ec2e0f5
SDJ
12170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12171 conftest.$ac_objext conftest.beam conftest.$ac_ext
12172fi
12173
12174 rm -f conftest.out
88b48903
WN
12175
12176fi
6ec2e0f5
SDJ
12177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
12178$as_echo "$gl_cv_cc_double_expbit0" >&6; }
12179 case "$gl_cv_cc_double_expbit0" in
12180 word*bit*)
12181 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
12182 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
88b48903 12183
6ec2e0f5
SDJ
12184cat >>confdefs.h <<_ACEOF
12185#define DBL_EXPBIT0_WORD $word
12186_ACEOF
88b48903 12187
88b48903 12188
6ec2e0f5
SDJ
12189cat >>confdefs.h <<_ACEOF
12190#define DBL_EXPBIT0_BIT $bit
12191_ACEOF
88b48903 12192
6ec2e0f5
SDJ
12193 ;;
12194 esac
88b48903
WN
12195
12196
6ec2e0f5
SDJ
12197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12198$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12199if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
12200 $as_echo_n "(cached) " >&6
12201else
12202 ac_cv_c_bigendian=unknown
12203 # See if we're dealing with a universal compiler.
12204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12205/* end confdefs.h. */
12206#ifndef __APPLE_CC__
12207 not a universal capable compiler
12208 #endif
12209 typedef int dummy;
88b48903 12210
6ec2e0f5
SDJ
12211_ACEOF
12212if ac_fn_c_try_compile "$LINENO"; then :
88b48903 12213
6ec2e0f5
SDJ
12214 # Check for potential -arch flags. It is not universal unless
12215 # there are at least two -arch flags with different values.
12216 ac_arch=
12217 ac_prev=
12218 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12219 if test -n "$ac_prev"; then
12220 case $ac_word in
12221 i?86 | x86_64 | ppc | ppc64)
12222 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12223 ac_arch=$ac_word
12224 else
12225 ac_cv_c_bigendian=universal
12226 break
12227 fi
12228 ;;
12229 esac
12230 ac_prev=
12231 elif test "x$ac_word" = "x-arch"; then
12232 ac_prev=arch
12233 fi
12234 done
12235fi
12236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12237 if test $ac_cv_c_bigendian = unknown; then
12238 # See if sys/param.h defines the BYTE_ORDER macro.
12239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12240/* end confdefs.h. */
12241#include <sys/types.h>
12242 #include <sys/param.h>
88b48903 12243
6ec2e0f5
SDJ
12244int
12245main ()
12246{
12247#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12248 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12249 && LITTLE_ENDIAN)
12250 bogus endian macros
12251 #endif
88b48903 12252
6ec2e0f5
SDJ
12253 ;
12254 return 0;
12255}
12256_ACEOF
12257if ac_fn_c_try_compile "$LINENO"; then :
12258 # It does; now see whether it defined to BIG_ENDIAN or not.
12259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903
WN
12260/* end confdefs.h. */
12261#include <sys/types.h>
6ec2e0f5 12262 #include <sys/param.h>
8690e634
JK
12263
12264int
12265main ()
12266{
6ec2e0f5
SDJ
12267#if BYTE_ORDER != BIG_ENDIAN
12268 not big endian
12269 #endif
8690e634 12270
8690e634
JK
12271 ;
12272 return 0;
12273}
12274_ACEOF
6ec2e0f5
SDJ
12275if ac_fn_c_try_compile "$LINENO"; then :
12276 ac_cv_c_bigendian=yes
8690e634 12277else
6ec2e0f5 12278 ac_cv_c_bigendian=no
8690e634 12279fi
6ec2e0f5 12280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 12281fi
6ec2e0f5
SDJ
12282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12283 fi
12284 if test $ac_cv_c_bigendian = unknown; then
12285 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12287/* end confdefs.h. */
12288#include <limits.h>
12289
12290int
12291main ()
12292{
12293#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12294 bogus endian macros
12295 #endif
12296
12297 ;
12298 return 0;
12299}
12300_ACEOF
12301if ac_fn_c_try_compile "$LINENO"; then :
12302 # It does; now see whether it defined to _BIG_ENDIAN or not.
12303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12304/* end confdefs.h. */
12305#include <limits.h>
8690e634 12306
6ec2e0f5
SDJ
12307int
12308main ()
12309{
12310#ifndef _BIG_ENDIAN
12311 not big endian
12312 #endif
12313
12314 ;
12315 return 0;
12316}
12317_ACEOF
12318if ac_fn_c_try_compile "$LINENO"; then :
12319 ac_cv_c_bigendian=yes
12320else
12321 ac_cv_c_bigendian=no
8690e634 12322fi
6ec2e0f5
SDJ
12323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12324fi
12325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12326 fi
12327 if test $ac_cv_c_bigendian = unknown; then
12328 # Compile a test program.
12329 if test "$cross_compiling" = yes; then :
12330 # Try to guess by grepping values from an object file.
12331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12332/* end confdefs.h. */
12333short int ascii_mm[] =
12334 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12335 short int ascii_ii[] =
12336 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12337 int use_ascii (int i) {
12338 return ascii_mm[i] + ascii_ii[i];
12339 }
12340 short int ebcdic_ii[] =
12341 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12342 short int ebcdic_mm[] =
12343 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12344 int use_ebcdic (int i) {
12345 return ebcdic_mm[i] + ebcdic_ii[i];
12346 }
12347 extern int foo;
8690e634 12348
6ec2e0f5
SDJ
12349int
12350main ()
12351{
12352return use_ascii (foo) == use_ebcdic (foo);
12353 ;
12354 return 0;
12355}
12356_ACEOF
12357if ac_fn_c_try_compile "$LINENO"; then :
12358 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12359 ac_cv_c_bigendian=yes
12360 fi
12361 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12362 if test "$ac_cv_c_bigendian" = unknown; then
12363 ac_cv_c_bigendian=no
12364 else
12365 # finding both strings is unlikely to happen, but who knows?
12366 ac_cv_c_bigendian=unknown
12367 fi
12368 fi
12369fi
12370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12371else
12372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12373/* end confdefs.h. */
12374$ac_includes_default
12375int
12376main ()
12377{
8690e634 12378
6ec2e0f5
SDJ
12379 /* Are we little or big endian? From Harbison&Steele. */
12380 union
12381 {
12382 long int l;
12383 char c[sizeof (long int)];
12384 } u;
12385 u.l = 1;
12386 return u.c[sizeof (long int) - 1] == 1;
12387
12388 ;
12389 return 0;
12390}
8690e634 12391_ACEOF
6ec2e0f5
SDJ
12392if ac_fn_c_try_run "$LINENO"; then :
12393 ac_cv_c_bigendian=no
12394else
12395 ac_cv_c_bigendian=yes
12396fi
12397rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12398 conftest.$ac_objext conftest.beam conftest.$ac_ext
12399fi
12400
12401 fi
12402fi
12403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12404$as_echo "$ac_cv_c_bigendian" >&6; }
12405 case $ac_cv_c_bigendian in #(
12406 yes)
12407 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12408;; #(
12409 no)
12410 ;; #(
12411 universal)
8690e634 12412
6ec2e0f5 12413$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8690e634 12414
6ec2e0f5
SDJ
12415 ;; #(
12416 *)
d0ac1c44 12417 as_fn_error $? "unknown endianness
6ec2e0f5
SDJ
12418 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12419 esac
8690e634 12420
6ec2e0f5
SDJ
12421
12422
12423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12424$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 12425if ${am_cv_langinfo_codeset+:} false; then :
6ec2e0f5
SDJ
12426 $as_echo_n "(cached) " >&6
12427else
12428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12429/* end confdefs.h. */
12430#include <langinfo.h>
12431int
12432main ()
12433{
12434char* cs = nl_langinfo(CODESET); return !cs;
12435 ;
12436 return 0;
12437}
8690e634 12438_ACEOF
6ec2e0f5
SDJ
12439if ac_fn_c_try_link "$LINENO"; then :
12440 am_cv_langinfo_codeset=yes
12441else
12442 am_cv_langinfo_codeset=no
12443fi
12444rm -f core conftest.err conftest.$ac_objext \
12445 conftest$ac_exeext conftest.$ac_ext
12446
12447fi
12448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12449$as_echo "$am_cv_langinfo_codeset" >&6; }
12450 if test $am_cv_langinfo_codeset = yes; then
12451
12452$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8690e634 12453
6ec2e0f5 12454 fi
8690e634 12455
472fa5ee 12456
5e8754f9
SDJ
12457 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
12458if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
12459 ac_have_decl=1
12460else
12461 ac_have_decl=0
12462fi
12463
12464cat >>confdefs.h <<_ACEOF
12465#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
12466_ACEOF
12467
12468
12469
12470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
12471$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
12472if ${ac_cv_gnu_library_2_1+:} false; then :
12473 $as_echo_n "(cached) " >&6
12474else
12475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12476/* end confdefs.h. */
12477
12478#include <features.h>
12479#ifdef __GNU_LIBRARY__
12480 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
12481 Lucky GNU user
12482 #endif
12483#endif
12484#ifdef __UCLIBC__
12485 Lucky user
12486#endif
12487
12488_ACEOF
12489if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12490 $EGREP "Lucky" >/dev/null 2>&1; then :
12491 ac_cv_gnu_library_2_1=yes
12492else
12493 ac_cv_gnu_library_2_1=no
12494fi
12495rm -f conftest*
12496
12497
12498
12499fi
12500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
12501$as_echo "$ac_cv_gnu_library_2_1" >&6; }
12502
12503 GLIBC21="$ac_cv_gnu_library_2_1"
12504
12505
12506
f45c62c4
YQ
12507
12508
472fa5ee
SM
12509
12510
12511
6ec2e0f5
SDJ
12512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
12513$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
d0ac1c44 12514if ${gl_cv_func_malloc_posix+:} false; then :
f45c62c4
YQ
12515 $as_echo_n "(cached) " >&6
12516else
f45c62c4 12517
6ec2e0f5 12518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f45c62c4 12519/* end confdefs.h. */
6ec2e0f5 12520
f45c62c4
YQ
12521int
12522main ()
12523{
5e8754f9 12524#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
12525 choke me
12526 #endif
f45c62c4
YQ
12527
12528 ;
12529 return 0;
12530}
12531_ACEOF
6ec2e0f5
SDJ
12532if ac_fn_c_try_compile "$LINENO"; then :
12533 gl_cv_func_malloc_posix=yes
f45c62c4 12534else
6ec2e0f5 12535 gl_cv_func_malloc_posix=no
f45c62c4 12536fi
6ec2e0f5 12537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6a29c58e
YQ
12538
12539fi
12540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
12541$as_echo "$gl_cv_func_malloc_posix" >&6; }
12542
12543
12544
12545 for ac_header in stdlib.h
98399780
YQ
12546do :
12547 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
d0ac1c44 12548if test "x$ac_cv_header_stdlib_h" = xyes; then :
98399780
YQ
12549 cat >>confdefs.h <<_ACEOF
12550#define HAVE_STDLIB_H 1
12551_ACEOF
12552
12553fi
12554
12555done
12556
6a29c58e 12557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
98399780 12558$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
d0ac1c44 12559if ${ac_cv_func_malloc_0_nonnull+:} false; then :
98399780
YQ
12560 $as_echo_n "(cached) " >&6
12561else
12562 if test "$cross_compiling" = yes; then :
6a29c58e
YQ
12563 case "$host_os" in
12564 # Guess yes on platforms where we know the result.
5e8754f9 12565 *-gnu* | freebsd* | netbsd* | openbsd* \
6a29c58e
YQ
12566 | hpux* | solaris* | cygwin* | mingw*)
12567 ac_cv_func_malloc_0_nonnull=yes ;;
12568 # If we don't know, assume the worst.
12569 *) ac_cv_func_malloc_0_nonnull=no ;;
12570 esac
12571
98399780
YQ
12572else
12573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12574/* end confdefs.h. */
12575#if defined STDC_HEADERS || defined HAVE_STDLIB_H
6a29c58e
YQ
12576 # include <stdlib.h>
12577 #else
12578 char *malloc ();
12579 #endif
98399780
YQ
12580
12581int
12582main ()
12583{
49e4877c
PA
12584char *p = malloc (0);
12585 int result = !p;
12586 free (p);
12587 return result;
98399780
YQ
12588 ;
12589 return 0;
12590}
6a29c58e 12591
98399780
YQ
12592_ACEOF
12593if ac_fn_c_try_run "$LINENO"; then :
12594 ac_cv_func_malloc_0_nonnull=yes
12595else
12596 ac_cv_func_malloc_0_nonnull=no
12597fi
12598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12599 conftest.$ac_objext conftest.beam conftest.$ac_ext
12600fi
12601
6a29c58e 12602
98399780
YQ
12603fi
12604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
12605$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6a29c58e 12606 if test $ac_cv_func_malloc_0_nonnull = yes; then :
98399780
YQ
12607 gl_cv_func_malloc_0_nonnull=1
12608else
12609 gl_cv_func_malloc_0_nonnull=0
12610fi
12611
12612
12613cat >>confdefs.h <<_ACEOF
12614#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
12615_ACEOF
12616
12617
12618
88b48903
WN
12619
12620
472fa5ee
SM
12621
12622
12623
8690e634
JK
12624 GNULIB_BTOWC=0;
12625 GNULIB_WCTOB=0;
12626 GNULIB_MBSINIT=0;
12627 GNULIB_MBRTOWC=0;
12628 GNULIB_MBRLEN=0;
12629 GNULIB_MBSRTOWCS=0;
12630 GNULIB_MBSNRTOWCS=0;
12631 GNULIB_WCRTOMB=0;
12632 GNULIB_WCSRTOMBS=0;
12633 GNULIB_WCSNRTOMBS=0;
12634 GNULIB_WCWIDTH=0;
12635 GNULIB_WMEMCHR=0;
12636 GNULIB_WMEMCMP=0;
12637 GNULIB_WMEMCPY=0;
12638 GNULIB_WMEMMOVE=0;
12639 GNULIB_WMEMSET=0;
12640 GNULIB_WCSLEN=0;
12641 GNULIB_WCSNLEN=0;
12642 GNULIB_WCSCPY=0;
12643 GNULIB_WCPCPY=0;
12644 GNULIB_WCSNCPY=0;
12645 GNULIB_WCPNCPY=0;
12646 GNULIB_WCSCAT=0;
12647 GNULIB_WCSNCAT=0;
12648 GNULIB_WCSCMP=0;
12649 GNULIB_WCSNCMP=0;
12650 GNULIB_WCSCASECMP=0;
12651 GNULIB_WCSNCASECMP=0;
12652 GNULIB_WCSCOLL=0;
12653 GNULIB_WCSXFRM=0;
12654 GNULIB_WCSDUP=0;
12655 GNULIB_WCSCHR=0;
12656 GNULIB_WCSRCHR=0;
12657 GNULIB_WCSCSPN=0;
12658 GNULIB_WCSSPN=0;
12659 GNULIB_WCSPBRK=0;
12660 GNULIB_WCSSTR=0;
12661 GNULIB_WCSTOK=0;
12662 GNULIB_WCSWIDTH=0;
12663 HAVE_BTOWC=1;
12664 HAVE_MBSINIT=1;
12665 HAVE_MBRTOWC=1;
12666 HAVE_MBRLEN=1;
12667 HAVE_MBSRTOWCS=1;
12668 HAVE_MBSNRTOWCS=1;
12669 HAVE_WCRTOMB=1;
12670 HAVE_WCSRTOMBS=1;
12671 HAVE_WCSNRTOMBS=1;
12672 HAVE_WMEMCHR=1;
12673 HAVE_WMEMCMP=1;
12674 HAVE_WMEMCPY=1;
12675 HAVE_WMEMMOVE=1;
12676 HAVE_WMEMSET=1;
12677 HAVE_WCSLEN=1;
12678 HAVE_WCSNLEN=1;
12679 HAVE_WCSCPY=1;
12680 HAVE_WCPCPY=1;
12681 HAVE_WCSNCPY=1;
12682 HAVE_WCPNCPY=1;
12683 HAVE_WCSCAT=1;
12684 HAVE_WCSNCAT=1;
12685 HAVE_WCSCMP=1;
12686 HAVE_WCSNCMP=1;
12687 HAVE_WCSCASECMP=1;
12688 HAVE_WCSNCASECMP=1;
12689 HAVE_WCSCOLL=1;
12690 HAVE_WCSXFRM=1;
12691 HAVE_WCSDUP=1;
12692 HAVE_WCSCHR=1;
12693 HAVE_WCSRCHR=1;
12694 HAVE_WCSCSPN=1;
12695 HAVE_WCSSPN=1;
12696 HAVE_WCSPBRK=1;
12697 HAVE_WCSSTR=1;
12698 HAVE_WCSTOK=1;
12699 HAVE_WCSWIDTH=1;
12700 HAVE_DECL_WCTOB=1;
12701 HAVE_DECL_WCWIDTH=1;
12702 REPLACE_MBSTATE_T=0;
12703 REPLACE_BTOWC=0;
12704 REPLACE_WCTOB=0;
12705 REPLACE_MBSINIT=0;
12706 REPLACE_MBRTOWC=0;
12707 REPLACE_MBRLEN=0;
12708 REPLACE_MBSRTOWCS=0;
12709 REPLACE_MBSNRTOWCS=0;
12710 REPLACE_WCRTOMB=0;
12711 REPLACE_WCSRTOMBS=0;
12712 REPLACE_WCSNRTOMBS=0;
12713 REPLACE_WCWIDTH=0;
12714 REPLACE_WCSWIDTH=0;
12715
12716
12717
12718
12719
12720
12721
12722
472fa5ee
SM
12723
12724
12725
12726
12727
12728
8690e634
JK
12729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
12730$as_echo_n "checking for a traditional japanese locale... " >&6; }
d0ac1c44 12731if ${gt_cv_locale_ja+:} false; then :
8690e634
JK
12732 $as_echo_n "(cached) " >&6
12733else
12734
12735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12736/* end confdefs.h. */
12737
12738#include <locale.h>
12739#include <time.h>
12740#if HAVE_LANGINFO_CODESET
12741# include <langinfo.h>
12742#endif
12743#include <stdlib.h>
12744#include <string.h>
12745struct tm t;
12746char buf[16];
12747int main ()
12748{
5e8754f9 12749 const char *p;
8690e634 12750 /* Check whether the given locale name is recognized by the system. */
5e8754f9 12751#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
12752 /* On native Windows, setlocale(category, "") looks at the system settings,
12753 not at the environment variables. Also, when an encoding suffix such
12754 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12755 category of the locale to "C". */
12756 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12757 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12758 return 1;
5e8754f9 12759#else
8690e634 12760 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 12761#endif
8690e634
JK
12762 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12763 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12764 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12765 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12766 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12767 some unit tests fail.
12768 On MirBSD 10, when an unsupported locale is specified, setlocale()
12769 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 12770#if HAVE_LANGINFO_CODESET
8690e634
JK
12771 {
12772 const char *cs = nl_langinfo (CODESET);
12773 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12774 || strcmp (cs, "UTF-8") == 0)
12775 return 1;
12776 }
5e8754f9
SDJ
12777#endif
12778#ifdef __CYGWIN__
8690e634
JK
12779 /* On Cygwin, avoid locale names without encoding suffix, because the
12780 locale_charset() function relies on the encoding suffix. Note that
12781 LC_ALL is set on the command line. */
12782 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 12783#endif
8690e634
JK
12784 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
12785 on Cygwin 1.5.x. */
12786 if (MB_CUR_MAX == 1)
12787 return 1;
12788 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
12789 This excludes the UTF-8 encoding (except on MirBSD). */
5e8754f9
SDJ
12790 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12791 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
12792 for (p = buf; *p != '\0'; p++)
12793 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
12794 return 1;
8690e634
JK
12795 return 0;
12796}
12797
12798_ACEOF
12799 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12800 (eval $ac_link) 2>&5
12801 ac_status=$?
12802 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12803 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12804 case "$host_os" in
12805 # Handle native Windows specially, because there setlocale() interprets
12806 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12807 # "fr" or "fra" as "French" or "French_France.1252",
12808 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12809 # "ja" as "Japanese" or "Japanese_Japan.932",
12810 # and similar.
12811 mingw*)
12812 # Note that on native Windows, the Japanese locale is
12813 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
12814 # cannot use it here.
12815 gt_cv_locale_ja=none
12816 ;;
12817 *)
12818 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12819 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12820 # configure script would override the LC_ALL setting. Likewise for
12821 # LC_CTYPE, which is also set at the beginning of the configure script.
12822 # Test for the AIX locale name.
12823 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12824 gt_cv_locale_ja=ja_JP
12825 else
12826 # Test for the locale name with explicit encoding suffix.
12827 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12828 gt_cv_locale_ja=ja_JP.EUC-JP
12829 else
12830 # Test for the HP-UX, OSF/1, NetBSD locale name.
12831 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12832 gt_cv_locale_ja=ja_JP.eucJP
12833 else
12834 # Test for the IRIX, FreeBSD locale name.
12835 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12836 gt_cv_locale_ja=ja_JP.EUC
12837 else
12838 # Test for the Solaris 7 locale name.
12839 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12840 gt_cv_locale_ja=ja
12841 else
12842 # Special test for NetBSD 1.6.
12843 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
12844 gt_cv_locale_ja=ja_JP.eucJP
12845 else
12846 # None found.
12847 gt_cv_locale_ja=none
12848 fi
12849 fi
12850 fi
12851 fi
12852 fi
12853 fi
12854 ;;
12855 esac
12856 fi
12857 rm -fr conftest*
12858
12859fi
12860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
12861$as_echo "$gt_cv_locale_ja" >&6; }
12862 LOCALE_JA=$gt_cv_locale_ja
12863
12864
12865
12866
12867
12868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
12869$as_echo_n "checking for a transitional chinese locale... " >&6; }
d0ac1c44 12870if ${gt_cv_locale_zh_CN+:} false; then :
8690e634
JK
12871 $as_echo_n "(cached) " >&6
12872else
12873
12874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12875/* end confdefs.h. */
12876
12877#include <locale.h>
12878#include <stdlib.h>
12879#include <time.h>
12880#if HAVE_LANGINFO_CODESET
12881# include <langinfo.h>
12882#endif
12883#include <stdlib.h>
12884#include <string.h>
12885struct tm t;
12886char buf[16];
12887int main ()
12888{
5e8754f9 12889 const char *p;
8690e634 12890 /* Check whether the given locale name is recognized by the system. */
5e8754f9 12891#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
12892 /* On native Windows, setlocale(category, "") looks at the system settings,
12893 not at the environment variables. Also, when an encoding suffix such
12894 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12895 category of the locale to "C". */
12896 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12897 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12898 return 1;
5e8754f9 12899#else
8690e634 12900 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 12901#endif
8690e634
JK
12902 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12903 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12904 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12905 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12906 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12907 some unit tests fail.
12908 On MirBSD 10, when an unsupported locale is specified, setlocale()
12909 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 12910#if HAVE_LANGINFO_CODESET
8690e634
JK
12911 {
12912 const char *cs = nl_langinfo (CODESET);
12913 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12914 || strcmp (cs, "UTF-8") == 0)
12915 return 1;
12916 }
5e8754f9
SDJ
12917#endif
12918#ifdef __CYGWIN__
8690e634
JK
12919 /* On Cygwin, avoid locale names without encoding suffix, because the
12920 locale_charset() function relies on the encoding suffix. Note that
12921 LC_ALL is set on the command line. */
12922 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 12923#endif
8690e634
JK
12924 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
12925 This excludes the UTF-8 encoding (except on MirBSD). */
5e8754f9
SDJ
12926 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12927 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
12928 for (p = buf; *p != '\0'; p++)
12929 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
12930 return 1;
8690e634
JK
12931 /* Check whether a typical GB18030 multibyte sequence is recognized as a
12932 single wide character. This excludes the GB2312 and GBK encodings. */
12933 if (mblen ("\203\062\332\066", 5) != 4)
12934 return 1;
12935 return 0;
12936}
12937
12938_ACEOF
12939 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12940 (eval $ac_link) 2>&5
12941 ac_status=$?
12942 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12943 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12944 case "$host_os" in
12945 # Handle native Windows specially, because there setlocale() interprets
12946 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12947 # "fr" or "fra" as "French" or "French_France.1252",
12948 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12949 # "ja" as "Japanese" or "Japanese_Japan.932",
12950 # and similar.
12951 mingw*)
12952 # Test for the hypothetical native Windows locale name.
12953 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12954 gt_cv_locale_zh_CN=Chinese_China.54936
12955 else
12956 # None found.
12957 gt_cv_locale_zh_CN=none
12958 fi
12959 ;;
12960 solaris2.8)
12961 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
12962 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
12963 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
12964 gt_cv_locale_zh_CN=none
12965 ;;
12966 *)
12967 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12968 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12969 # configure script would override the LC_ALL setting. Likewise for
12970 # LC_CTYPE, which is also set at the beginning of the configure script.
12971 # Test for the locale name without encoding suffix.
12972 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12973 gt_cv_locale_zh_CN=zh_CN
12974 else
12975 # Test for the locale name with explicit encoding suffix.
12976 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12977 gt_cv_locale_zh_CN=zh_CN.GB18030
12978 else
12979 # None found.
12980 gt_cv_locale_zh_CN=none
12981 fi
12982 fi
12983 ;;
12984 esac
12985 else
12986 # If there was a link error, due to mblen(), the system is so old that
12987 # it certainly doesn't have a chinese locale.
12988 gt_cv_locale_zh_CN=none
12989 fi
12990 rm -fr conftest*
12991
12992fi
12993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
12994$as_echo "$gt_cv_locale_zh_CN" >&6; }
12995 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
12996
12997
12998
12999
13000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
13001$as_echo_n "checking for a french Unicode locale... " >&6; }
d0ac1c44 13002if ${gt_cv_locale_fr_utf8+:} false; then :
8690e634
JK
13003 $as_echo_n "(cached) " >&6
13004else
13005
13006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13007/* end confdefs.h. */
13008
13009#include <locale.h>
13010#include <time.h>
13011#if HAVE_LANGINFO_CODESET
13012# include <langinfo.h>
13013#endif
13014#include <stdlib.h>
13015#include <string.h>
13016struct tm t;
13017char buf[16];
13018int main () {
13019 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
13020 imitates locale dependent behaviour by looking at the environment
13021 variables, and all locales use the UTF-8 encoding. */
13022#if !(defined __BEOS__ || defined __HAIKU__)
13023 /* Check whether the given locale name is recognized by the system. */
5e8754f9 13024# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
13025 /* On native Windows, setlocale(category, "") looks at the system settings,
13026 not at the environment variables. Also, when an encoding suffix such
13027 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
13028 category of the locale to "C". */
13029 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
13030 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
13031 return 1;
13032# else
13033 if (setlocale (LC_ALL, "") == NULL) return 1;
13034# endif
13035 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
13036 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
13037 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
13038 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
13039 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
13040 some unit tests fail. */
13041# if HAVE_LANGINFO_CODESET
13042 {
13043 const char *cs = nl_langinfo (CODESET);
13044 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
13045 return 1;
13046 }
13047# endif
13048# ifdef __CYGWIN__
13049 /* On Cygwin, avoid locale names without encoding suffix, because the
13050 locale_charset() function relies on the encoding suffix. Note that
13051 LC_ALL is set on the command line. */
13052 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
13053# endif
13054 /* Check whether in the abbreviation of the second month, the second
13055 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
13056 two bytes long, with UTF-8 encoding. */
13057 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
13058 if (strftime (buf, sizeof (buf), "%b", &t) < 4
13059 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
13060 return 1;
13061#endif
13062#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
13063 /* Check whether the decimal separator is a comma.
13064 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
13065 are nl_langinfo(RADIXCHAR) are both ".". */
13066 if (localeconv () ->decimal_point[0] != ',') return 1;
13067#endif
13068 return 0;
13069}
13070
13071_ACEOF
13072 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13073 (eval $ac_link) 2>&5
13074 ac_status=$?
13075 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13076 test $ac_status = 0; } && test -s conftest$ac_exeext; then
13077 case "$host_os" in
13078 # Handle native Windows specially, because there setlocale() interprets
13079 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
13080 # "fr" or "fra" as "French" or "French_France.1252",
13081 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
13082 # "ja" as "Japanese" or "Japanese_Japan.932",
13083 # and similar.
13084 mingw*)
13085 # Test for the hypothetical native Windows locale name.
13086 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13087 gt_cv_locale_fr_utf8=French_France.65001
13088 else
13089 # None found.
13090 gt_cv_locale_fr_utf8=none
13091 fi
13092 ;;
13093 *)
13094 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
13095 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
13096 # configure script would override the LC_ALL setting. Likewise for
13097 # LC_CTYPE, which is also set at the beginning of the configure script.
13098 # Test for the usual locale name.
13099 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13100 gt_cv_locale_fr_utf8=fr_FR
13101 else
13102 # Test for the locale name with explicit encoding suffix.
13103 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13104 gt_cv_locale_fr_utf8=fr_FR.UTF-8
13105 else
13106 # Test for the Solaris 7 locale name.
13107 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13108 gt_cv_locale_fr_utf8=fr.UTF-8
13109 else
13110 # None found.
13111 gt_cv_locale_fr_utf8=none
13112 fi
13113 fi
13114 fi
13115 ;;
13116 esac
13117 fi
13118 rm -fr conftest*
13119
13120fi
13121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
13122$as_echo "$gt_cv_locale_fr_utf8" >&6; }
13123 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
13124
13125
13126
13127
13128
13129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
13130$as_echo_n "checking for a traditional french locale... " >&6; }
d0ac1c44 13131if ${gt_cv_locale_fr+:} false; then :
8690e634
JK
13132 $as_echo_n "(cached) " >&6
13133else
13134
13135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13136/* end confdefs.h. */
13137
13138#include <locale.h>
13139#include <time.h>
13140#if HAVE_LANGINFO_CODESET
13141# include <langinfo.h>
13142#endif
13143#include <stdlib.h>
13144#include <string.h>
13145struct tm t;
13146char buf[16];
13147int main () {
13148 /* Check whether the given locale name is recognized by the system. */
5e8754f9 13149#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
13150 /* On native Windows, setlocale(category, "") looks at the system settings,
13151 not at the environment variables. Also, when an encoding suffix such
13152 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
13153 category of the locale to "C". */
13154 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
13155 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
13156 return 1;
5e8754f9 13157#else
8690e634 13158 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 13159#endif
8690e634
JK
13160 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
13161 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
13162 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
13163 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
13164 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
13165 some unit tests fail.
13166 On MirBSD 10, when an unsupported locale is specified, setlocale()
13167 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 13168#if HAVE_LANGINFO_CODESET
8690e634
JK
13169 {
13170 const char *cs = nl_langinfo (CODESET);
13171 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
13172 || strcmp (cs, "UTF-8") == 0)
13173 return 1;
13174 }
5e8754f9
SDJ
13175#endif
13176#ifdef __CYGWIN__
8690e634
JK
13177 /* On Cygwin, avoid locale names without encoding suffix, because the
13178 locale_charset() function relies on the encoding suffix. Note that
13179 LC_ALL is set on the command line. */
13180 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 13181#endif
8690e634
JK
13182 /* Check whether in the abbreviation of the second month, the second
13183 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
13184 one byte long. This excludes the UTF-8 encoding. */
13185 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
13186 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
5e8754f9 13187#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8690e634
JK
13188 /* Check whether the decimal separator is a comma.
13189 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
13190 are nl_langinfo(RADIXCHAR) are both ".". */
13191 if (localeconv () ->decimal_point[0] != ',') return 1;
7a6dbc2f 13192#endif
5e8754f9 13193 return 0;
8690e634
JK
13194}
13195
13196_ACEOF
13197 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13198 (eval $ac_link) 2>&5
13199 ac_status=$?
13200 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13201 test $ac_status = 0; } && test -s conftest$ac_exeext; then
13202 case "$host_os" in
13203 # Handle native Windows specially, because there setlocale() interprets
13204 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
13205 # "fr" or "fra" as "French" or "French_France.1252",
13206 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
13207 # "ja" as "Japanese" or "Japanese_Japan.932",
13208 # and similar.
13209 mingw*)
13210 # Test for the native Windows locale name.
13211 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13212 gt_cv_locale_fr=French_France.1252
13213 else
13214 # None found.
13215 gt_cv_locale_fr=none
13216 fi
13217 ;;
13218 *)
13219 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
13220 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
13221 # configure script would override the LC_ALL setting. Likewise for
13222 # LC_CTYPE, which is also set at the beginning of the configure script.
13223 # Test for the usual locale name.
13224 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13225 gt_cv_locale_fr=fr_FR
13226 else
13227 # Test for the locale name with explicit encoding suffix.
13228 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13229 gt_cv_locale_fr=fr_FR.ISO-8859-1
13230 else
13231 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
13232 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13233 gt_cv_locale_fr=fr_FR.ISO8859-1
13234 else
13235 # Test for the HP-UX locale name.
13236 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13237 gt_cv_locale_fr=fr_FR.iso88591
13238 else
13239 # Test for the Solaris 7 locale name.
13240 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13241 gt_cv_locale_fr=fr
13242 else
13243 # None found.
13244 gt_cv_locale_fr=none
13245 fi
13246 fi
13247 fi
13248 fi
13249 fi
13250 ;;
13251 esac
13252 fi
13253 rm -fr conftest*
13254
13255fi
6ec2e0f5
SDJ
13256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
13257$as_echo "$gt_cv_locale_fr" >&6; }
13258 LOCALE_FR=$gt_cv_locale_fr
13259
13260
13261
13262
13263
13264
13265
472fa5ee
SM
13266
13267
13268
13269
13270
13271
13272 GNULIB_FFSL=0;
13273 GNULIB_FFSLL=0;
6ec2e0f5
SDJ
13274 GNULIB_MEMCHR=0;
13275 GNULIB_MEMMEM=0;
13276 GNULIB_MEMPCPY=0;
13277 GNULIB_MEMRCHR=0;
13278 GNULIB_RAWMEMCHR=0;
13279 GNULIB_STPCPY=0;
13280 GNULIB_STPNCPY=0;
13281 GNULIB_STRCHRNUL=0;
13282 GNULIB_STRDUP=0;
13283 GNULIB_STRNCAT=0;
13284 GNULIB_STRNDUP=0;
13285 GNULIB_STRNLEN=0;
13286 GNULIB_STRPBRK=0;
13287 GNULIB_STRSEP=0;
13288 GNULIB_STRSTR=0;
13289 GNULIB_STRCASESTR=0;
13290 GNULIB_STRTOK_R=0;
13291 GNULIB_MBSLEN=0;
13292 GNULIB_MBSNLEN=0;
13293 GNULIB_MBSCHR=0;
13294 GNULIB_MBSRCHR=0;
13295 GNULIB_MBSSTR=0;
13296 GNULIB_MBSCASECMP=0;
13297 GNULIB_MBSNCASECMP=0;
13298 GNULIB_MBSPCASECMP=0;
13299 GNULIB_MBSCASESTR=0;
13300 GNULIB_MBSCSPN=0;
13301 GNULIB_MBSPBRK=0;
13302 GNULIB_MBSSPN=0;
13303 GNULIB_MBSSEP=0;
13304 GNULIB_MBSTOK_R=0;
13305 GNULIB_STRERROR=0;
13306 GNULIB_STRERROR_R=0;
13307 GNULIB_STRSIGNAL=0;
13308 GNULIB_STRVERSCMP=0;
13309 HAVE_MBSLEN=0;
5e8754f9 13310 HAVE_FFSL=1;
6ec2e0f5
SDJ
13311 HAVE_FFSLL=1;
13312 HAVE_MEMCHR=1;
13313 HAVE_DECL_MEMMEM=1;
13314 HAVE_MEMPCPY=1;
13315 HAVE_DECL_MEMRCHR=1;
13316 HAVE_RAWMEMCHR=1;
13317 HAVE_STPCPY=1;
13318 HAVE_STPNCPY=1;
13319 HAVE_STRCHRNUL=1;
13320 HAVE_DECL_STRDUP=1;
13321 HAVE_DECL_STRNDUP=1;
13322 HAVE_DECL_STRNLEN=1;
13323 HAVE_STRPBRK=1;
13324 HAVE_STRSEP=1;
13325 HAVE_STRCASESTR=1;
13326 HAVE_DECL_STRTOK_R=1;
13327 HAVE_DECL_STRERROR_R=1;
13328 HAVE_DECL_STRSIGNAL=1;
13329 HAVE_STRVERSCMP=1;
13330 REPLACE_MEMCHR=0;
13331 REPLACE_MEMMEM=0;
13332 REPLACE_STPNCPY=0;
13333 REPLACE_STRDUP=0;
13334 REPLACE_STRSTR=0;
13335 REPLACE_STRCASESTR=0;
5e8754f9 13336 REPLACE_STRCHRNUL=0;
6ec2e0f5
SDJ
13337 REPLACE_STRERROR=0;
13338 REPLACE_STRERROR_R=0;
5e8754f9
SDJ
13339 REPLACE_STRNCAT=0;
13340 REPLACE_STRNDUP=0;
13341 REPLACE_STRNLEN=0;
6ec2e0f5 13342 REPLACE_STRSIGNAL=0;
5e8754f9 13343 REPLACE_STRTOK_R=0;
6ec2e0f5
SDJ
13344 UNDEFINE_STRTOK_R=0;
13345
13346
13347
13348
13349
13350 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
13351 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
13352 # irrelevant for anonymous mappings.
13353 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
d0ac1c44 13354if test "x$ac_cv_func_mmap" = xyes; then :
6ec2e0f5
SDJ
13355 gl_have_mmap=yes
13356else
13357 gl_have_mmap=no
13358fi
13359
13360
13361 # Try to allow MAP_ANONYMOUS.
13362 gl_have_mmap_anonymous=no
13363 if test $gl_have_mmap = yes; then
13364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
13365$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
13366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13367/* end confdefs.h. */
13368
13369#include <sys/mman.h>
13370#ifdef MAP_ANONYMOUS
13371 I cannot identify this map
13372#endif
13373
13374_ACEOF
13375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13376 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
13377 gl_have_mmap_anonymous=yes
13378fi
13379rm -f conftest*
13380
13381 if test $gl_have_mmap_anonymous != yes; then
13382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13383/* end confdefs.h. */
13384
13385#include <sys/mman.h>
13386#ifdef MAP_ANON
13387 I cannot identify this map
13388#endif
13389
13390_ACEOF
13391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13392 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
13393
13394$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
13395
13396 gl_have_mmap_anonymous=yes
13397fi
13398rm -f conftest*
13399
13400 fi
13401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
13402$as_echo "$gl_have_mmap_anonymous" >&6; }
13403 if test $gl_have_mmap_anonymous = yes; then
13404
13405$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
13406
13407 fi
13408 fi
13409
13410
472fa5ee
SM
13411 :
13412
13413
13414
13415
13416
13417
13418 :
13419
13420
13421
13422
6ec2e0f5
SDJ
13423
13424
13425
13426
13427 if test $HAVE_MEMCHR = 1; then
13428 # Detect platform-specific bugs in some versions of glibc:
13429 # memchr should not dereference anything with length 0
5e8754f9 13430 # http://bugzilla.redhat.com/499689
6ec2e0f5 13431 # memchr should not dereference overestimated length after a match
5e8754f9
SDJ
13432 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
13433 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
6ec2e0f5
SDJ
13434 # Assume that memchr works on platforms that lack mprotect.
13435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
13436$as_echo_n "checking whether memchr works... " >&6; }
d0ac1c44 13437if ${gl_cv_func_memchr_works+:} false; then :
6ec2e0f5
SDJ
13438 $as_echo_n "(cached) " >&6
13439else
13440 if test "$cross_compiling" = yes; then :
5e8754f9 13441 gl_cv_func_memchr_works="guessing no"
6ec2e0f5
SDJ
13442else
13443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13444/* end confdefs.h. */
13445
13446#include <string.h>
13447#if HAVE_SYS_MMAN_H
13448# include <fcntl.h>
13449# include <unistd.h>
13450# include <sys/types.h>
13451# include <sys/mman.h>
13452# ifndef MAP_FILE
13453# define MAP_FILE 0
13454# endif
13455#endif
13456
13457int
13458main ()
13459{
13460
13461 int result = 0;
13462 char *fence = NULL;
13463#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
13464# if HAVE_MAP_ANONYMOUS
13465 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
13466 const int fd = -1;
13467# else /* !HAVE_MAP_ANONYMOUS */
13468 const int flags = MAP_FILE | MAP_PRIVATE;
13469 int fd = open ("/dev/zero", O_RDONLY, 0666);
13470 if (fd >= 0)
13471# endif
13472 {
13473 int pagesize = getpagesize ();
13474 char *two_pages =
13475 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
13476 flags, fd, 0);
13477 if (two_pages != (char *)(-1)
13478 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
13479 fence = two_pages + pagesize;
13480 }
13481#endif
13482 if (fence)
13483 {
13484 if (memchr (fence, 0, 0))
13485 result |= 1;
13486 strcpy (fence - 9, "12345678");
13487 if (memchr (fence - 9, 0, 79) != fence - 1)
13488 result |= 2;
13489 if (memchr (fence - 1, 0, 3) != fence - 1)
13490 result |= 4;
13491 }
13492 return result;
13493
13494 ;
13495 return 0;
13496}
13497_ACEOF
13498if ac_fn_c_try_run "$LINENO"; then :
13499 gl_cv_func_memchr_works=yes
13500else
13501 gl_cv_func_memchr_works=no
13502fi
13503rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13504 conftest.$ac_objext conftest.beam conftest.$ac_ext
13505fi
13506
13507fi
13508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
13509$as_echo "$gl_cv_func_memchr_works" >&6; }
5e8754f9
SDJ
13510 if test "$gl_cv_func_memchr_works" != yes; then
13511 REPLACE_MEMCHR=1
13512 fi
6ec2e0f5
SDJ
13513 fi
13514
472fa5ee
SM
13515
13516 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
d0ac1c44 13517if test "x$ac_cv_have_decl_memmem" = xyes; then :
6ec2e0f5
SDJ
13518 ac_have_decl=1
13519else
13520 ac_have_decl=0
13521fi
13522
13523cat >>confdefs.h <<_ACEOF
13524#define HAVE_DECL_MEMMEM $ac_have_decl
13525_ACEOF
13526
13527
13528
13529
13530
472fa5ee 13531
6ec2e0f5
SDJ
13532 for ac_func in memmem
13533do :
13534 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 13535if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
13536 cat >>confdefs.h <<_ACEOF
13537#define HAVE_MEMMEM 1
13538_ACEOF
13539
13540fi
13541done
13542
13543 if test $ac_cv_func_memmem = yes; then
13544 HAVE_MEMMEM=1
13545 else
13546 HAVE_MEMMEM=0
13547 fi
13548
472fa5ee
SM
13549 :
13550
13551
13552
13553
13554
6ec2e0f5
SDJ
13555 if test $ac_cv_have_decl_memmem = no; then
13556 HAVE_DECL_MEMMEM=0
13557 else
13558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
13559$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 13560if ${gl_cv_func_memmem_works_always+:} false; then :
6ec2e0f5
SDJ
13561 $as_echo_n "(cached) " >&6
13562else
13563 if test "$cross_compiling" = yes; then :
13564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13565/* end confdefs.h. */
13566
13567#ifdef __GNU_LIBRARY__
13568 #include <features.h>
13569 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
13570 || __GLIBC_MINOR__ > 12)) \
13571 || (__GLIBC__ > 2)) \
13572 || defined __UCLIBC__
13573 Lucky user
13574 #endif
13575#elif defined __CYGWIN__
13576 #include <cygwin/version.h>
13577 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
13578 Lucky user
13579 #endif
13580#else
13581 Lucky user
13582#endif
13583
13584_ACEOF
13585if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13586 $EGREP "Lucky user" >/dev/null 2>&1; then :
13587 gl_cv_func_memmem_works_always="guessing yes"
13588else
13589 gl_cv_func_memmem_works_always="guessing no"
13590fi
13591rm -f conftest*
13592
13593
13594else
13595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13596/* end confdefs.h. */
13597
13598#include <string.h> /* for memmem */
13599#define P "_EF_BF_BD"
13600#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
13601#define NEEDLE P P P P P
13602
13603int
13604main ()
13605{
13606
13607 int result = 0;
13608 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
13609 result |= 1;
13610 /* Check for empty needle behavior. */
13611 {
13612 const char *haystack = "AAA";
13613 if (memmem (haystack, 3, NULL, 0) != haystack)
13614 result |= 2;
13615 }
13616 return result;
13617
13618 ;
13619 return 0;
13620}
13621_ACEOF
13622if ac_fn_c_try_run "$LINENO"; then :
13623 gl_cv_func_memmem_works_always=yes
13624else
13625 gl_cv_func_memmem_works_always=no
13626fi
13627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13628 conftest.$ac_objext conftest.beam conftest.$ac_ext
13629fi
13630
13631
13632fi
13633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
13634$as_echo "$gl_cv_func_memmem_works_always" >&6; }
13635 case "$gl_cv_func_memmem_works_always" in
13636 *yes) ;;
13637 *)
13638 REPLACE_MEMMEM=1
13639 ;;
13640 esac
13641 fi
13642 :
13643
472fa5ee
SM
13644
13645 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
d0ac1c44 13646if test "x$ac_cv_have_decl_memrchr" = xyes; then :
6ec2e0f5
SDJ
13647 ac_have_decl=1
13648else
13649 ac_have_decl=0
13650fi
13651
13652cat >>confdefs.h <<_ACEOF
13653#define HAVE_DECL_MEMRCHR $ac_have_decl
13654_ACEOF
13655
13656
13657
13658
13659
13660
2d8adcbd
MM
13661
13662
472fa5ee
SM
13663
13664
13665
13666
6ec2e0f5
SDJ
13667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
13668$as_echo_n "checking for promoted mode_t type... " >&6; }
d0ac1c44 13669if ${gl_cv_promoted_mode_t+:} false; then :
6ec2e0f5
SDJ
13670 $as_echo_n "(cached) " >&6
13671else
13672
13673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13674/* end confdefs.h. */
13675#include <sys/types.h>
13676int
13677main ()
13678{
13679typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
13680 ;
13681 return 0;
13682}
13683_ACEOF
13684if ac_fn_c_try_compile "$LINENO"; then :
13685 gl_cv_promoted_mode_t='int'
13686else
13687 gl_cv_promoted_mode_t='mode_t'
13688fi
13689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13690
13691fi
13692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
13693$as_echo "$gl_cv_promoted_mode_t" >&6; }
13694
13695cat >>confdefs.h <<_ACEOF
13696#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
13697_ACEOF
13698
13699
13700
13701
13702
472fa5ee
SM
13703
13704
13705
6ec2e0f5
SDJ
13706 GNULIB_DPRINTF=0;
13707 GNULIB_FCLOSE=0;
13708 GNULIB_FDOPEN=0;
13709 GNULIB_FFLUSH=0;
13710 GNULIB_FGETC=0;
13711 GNULIB_FGETS=0;
13712 GNULIB_FOPEN=0;
13713 GNULIB_FPRINTF=0;
13714 GNULIB_FPRINTF_POSIX=0;
13715 GNULIB_FPURGE=0;
13716 GNULIB_FPUTC=0;
13717 GNULIB_FPUTS=0;
13718 GNULIB_FREAD=0;
13719 GNULIB_FREOPEN=0;
13720 GNULIB_FSCANF=0;
13721 GNULIB_FSEEK=0;
13722 GNULIB_FSEEKO=0;
13723 GNULIB_FTELL=0;
13724 GNULIB_FTELLO=0;
13725 GNULIB_FWRITE=0;
13726 GNULIB_GETC=0;
13727 GNULIB_GETCHAR=0;
13728 GNULIB_GETDELIM=0;
13729 GNULIB_GETLINE=0;
13730 GNULIB_OBSTACK_PRINTF=0;
13731 GNULIB_OBSTACK_PRINTF_POSIX=0;
13732 GNULIB_PCLOSE=0;
13733 GNULIB_PERROR=0;
13734 GNULIB_POPEN=0;
13735 GNULIB_PRINTF=0;
13736 GNULIB_PRINTF_POSIX=0;
13737 GNULIB_PUTC=0;
13738 GNULIB_PUTCHAR=0;
13739 GNULIB_PUTS=0;
13740 GNULIB_REMOVE=0;
13741 GNULIB_RENAME=0;
13742 GNULIB_RENAMEAT=0;
13743 GNULIB_SCANF=0;
13744 GNULIB_SNPRINTF=0;
13745 GNULIB_SPRINTF_POSIX=0;
13746 GNULIB_STDIO_H_NONBLOCKING=0;
13747 GNULIB_STDIO_H_SIGPIPE=0;
13748 GNULIB_TMPFILE=0;
13749 GNULIB_VASPRINTF=0;
13750 GNULIB_VFSCANF=0;
13751 GNULIB_VSCANF=0;
13752 GNULIB_VDPRINTF=0;
13753 GNULIB_VFPRINTF=0;
13754 GNULIB_VFPRINTF_POSIX=0;
13755 GNULIB_VPRINTF=0;
13756 GNULIB_VPRINTF_POSIX=0;
13757 GNULIB_VSNPRINTF=0;
13758 GNULIB_VSPRINTF_POSIX=0;
13759 HAVE_DECL_FPURGE=1;
13760 HAVE_DECL_FSEEKO=1;
13761 HAVE_DECL_FTELLO=1;
13762 HAVE_DECL_GETDELIM=1;
13763 HAVE_DECL_GETLINE=1;
13764 HAVE_DECL_OBSTACK_PRINTF=1;
13765 HAVE_DECL_SNPRINTF=1;
13766 HAVE_DECL_VSNPRINTF=1;
13767 HAVE_DPRINTF=1;
13768 HAVE_FSEEKO=1;
13769 HAVE_FTELLO=1;
13770 HAVE_PCLOSE=1;
13771 HAVE_POPEN=1;
13772 HAVE_RENAMEAT=1;
13773 HAVE_VASPRINTF=1;
13774 HAVE_VDPRINTF=1;
13775 REPLACE_DPRINTF=0;
13776 REPLACE_FCLOSE=0;
13777 REPLACE_FDOPEN=0;
13778 REPLACE_FFLUSH=0;
13779 REPLACE_FOPEN=0;
13780 REPLACE_FPRINTF=0;
13781 REPLACE_FPURGE=0;
13782 REPLACE_FREOPEN=0;
13783 REPLACE_FSEEK=0;
13784 REPLACE_FSEEKO=0;
13785 REPLACE_FTELL=0;
13786 REPLACE_FTELLO=0;
13787 REPLACE_GETDELIM=0;
13788 REPLACE_GETLINE=0;
13789 REPLACE_OBSTACK_PRINTF=0;
13790 REPLACE_PERROR=0;
13791 REPLACE_POPEN=0;
13792 REPLACE_PRINTF=0;
13793 REPLACE_REMOVE=0;
13794 REPLACE_RENAME=0;
13795 REPLACE_RENAMEAT=0;
13796 REPLACE_SNPRINTF=0;
13797 REPLACE_SPRINTF=0;
13798 REPLACE_STDIO_READ_FUNCS=0;
13799 REPLACE_STDIO_WRITE_FUNCS=0;
13800 REPLACE_TMPFILE=0;
13801 REPLACE_VASPRINTF=0;
13802 REPLACE_VDPRINTF=0;
13803 REPLACE_VFPRINTF=0;
13804 REPLACE_VPRINTF=0;
13805 REPLACE_VSNPRINTF=0;
13806 REPLACE_VSPRINTF=0;
13807
13808
13809
2d8adcbd
MM
13810
13811
13812
13813
5e8754f9
SDJ
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
472fa5ee 13839 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
d0ac1c44 13840if test "x$ac_cv_have_decl_setenv" = xyes; then :
6ec2e0f5
SDJ
13841 ac_have_decl=1
13842else
13843 ac_have_decl=0
13844fi
13845
13846cat >>confdefs.h <<_ACEOF
13847#define HAVE_DECL_SETENV $ac_have_decl
13848_ACEOF
13849
13850
13851
13852
13853
13854
472fa5ee
SM
13855
13856
13857
13858
13859 :
13860
13861
13862
13863
13864
6ec2e0f5
SDJ
13865 if test $ac_cv_have_decl_setenv = no; then
13866 HAVE_DECL_SETENV=0
13867 fi
13868
472fa5ee
SM
13869 :
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879 :
13880
6ec2e0f5
SDJ
13881
13882
13883
13884
13885 for ac_header in search.h
13886do :
13887 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
d0ac1c44 13888if test "x$ac_cv_header_search_h" = xyes; then :
6ec2e0f5
SDJ
13889 cat >>confdefs.h <<_ACEOF
13890#define HAVE_SEARCH_H 1
13891_ACEOF
13892
13893fi
13894
13895done
13896
13897 for ac_func in tsearch
13898do :
13899 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
d0ac1c44 13900if test "x$ac_cv_func_tsearch" = xyes; then :
6ec2e0f5
SDJ
13901 cat >>confdefs.h <<_ACEOF
13902#define HAVE_TSEARCH 1
13903_ACEOF
13904
13905fi
13906done
13907
13908
13909
13910
13911 GNULIB_PTHREAD_SIGMASK=0;
13912 GNULIB_RAISE=0;
13913 GNULIB_SIGNAL_H_SIGPIPE=0;
13914 GNULIB_SIGPROCMASK=0;
13915 GNULIB_SIGACTION=0;
13916 HAVE_POSIX_SIGNALBLOCKING=1;
13917 HAVE_PTHREAD_SIGMASK=1;
13918 HAVE_RAISE=1;
13919 HAVE_SIGSET_T=1;
13920 HAVE_SIGINFO_T=1;
13921 HAVE_SIGACTION=1;
13922 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
13923
13924 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
13925
13926 HAVE_SIGHANDLER_T=1;
13927 REPLACE_PTHREAD_SIGMASK=0;
13928 REPLACE_RAISE=0;
13929
13930
13931 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
13932 #include <signal.h>
13933 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
13934 #include <sys/types.h>
13935
13936"
d0ac1c44 13937if test "x$ac_cv_type_sigset_t" = xyes; then :
6ec2e0f5
SDJ
13938
13939cat >>confdefs.h <<_ACEOF
13940#define HAVE_SIGSET_T 1
13941_ACEOF
13942
13943gl_cv_type_sigset_t=yes
13944else
13945 gl_cv_type_sigset_t=no
13946fi
13947
13948 if test $gl_cv_type_sigset_t != yes; then
13949 HAVE_SIGSET_T=0
13950 fi
13951
13952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
13953$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
d0ac1c44 13954if ${ac_cv_type_uid_t+:} false; then :
6ec2e0f5
SDJ
13955 $as_echo_n "(cached) " >&6
13956else
13957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13958/* end confdefs.h. */
13959#include <sys/types.h>
13960
13961_ACEOF
13962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13963 $EGREP "uid_t" >/dev/null 2>&1; then :
13964 ac_cv_type_uid_t=yes
13965else
13966 ac_cv_type_uid_t=no
13967fi
13968rm -f conftest*
13969
13970fi
13971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
13972$as_echo "$ac_cv_type_uid_t" >&6; }
13973if test $ac_cv_type_uid_t = no; then
13974
13975$as_echo "#define uid_t int" >>confdefs.h
13976
13977
13978$as_echo "#define gid_t int" >>confdefs.h
13979
13980fi
13981
13982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13983$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
d0ac1c44 13984if ${ac_cv_header_stdbool_h+:} false; then :
6ec2e0f5
SDJ
13985 $as_echo_n "(cached) " >&6
13986else
13987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13988/* end confdefs.h. */
13989
13990 #include <stdbool.h>
13991
13992 #ifdef __cplusplus
13993 typedef bool Bool;
13994 #else
13995 typedef _Bool Bool;
13996 #ifndef bool
13997 "error: bool is not defined"
13998 #endif
13999 #ifndef false
14000 "error: false is not defined"
14001 #endif
14002 #if false
14003 "error: false is not 0"
14004 #endif
14005 #ifndef true
14006 "error: true is not defined"
14007 #endif
14008 #if true != 1
14009 "error: true is not 1"
14010 #endif
14011 #endif
14012
14013 #ifndef __bool_true_false_are_defined
14014 "error: __bool_true_false_are_defined is not defined"
14015 #endif
14016
14017 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
14018
14019 char a[true == 1 ? 1 : -1];
14020 char b[false == 0 ? 1 : -1];
14021 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
14022 char d[(bool) 0.5 == true ? 1 : -1];
14023 /* See body of main program for 'e'. */
14024 char f[(Bool) 0.0 == false ? 1 : -1];
14025 char g[true];
14026 char h[sizeof (Bool)];
14027 char i[sizeof s.t];
14028 enum { j = false, k = true, l = false * true, m = true * 256 };
14029 /* The following fails for
14030 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
14031 Bool n[m];
14032 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
14033 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
14034 /* Catch a bug in an HP-UX C compiler. See
5e8754f9
SDJ
14035 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
14036 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
6ec2e0f5
SDJ
14037 */
14038 Bool q = true;
14039 Bool *pq = &q;
14040 bool *qq = &q;
14041
14042int
14043main ()
14044{
14045
14046 bool e = &s;
14047 *pq |= q; *pq |= ! q;
14048 *qq |= q; *qq |= ! q;
14049 /* Refer to every declared value, to avoid compiler optimizations. */
14050 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
14051 + !m + !n + !o + !p + !q + !pq + !qq);
14052
14053 ;
14054 return 0;
14055}
14056_ACEOF
14057if ac_fn_c_try_compile "$LINENO"; then :
14058 ac_cv_header_stdbool_h=yes
14059else
14060 ac_cv_header_stdbool_h=no
14061fi
14062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14063fi
14064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
14065$as_echo "$ac_cv_header_stdbool_h" >&6; }
14066 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
d0ac1c44 14067if test "x$ac_cv_type__Bool" = xyes; then :
6ec2e0f5
SDJ
14068
14069cat >>confdefs.h <<_ACEOF
14070#define HAVE__BOOL 1
14071_ACEOF
14072
14073
14074fi
14075
14076
14077
14078 REPLACE_NULL=0;
14079 HAVE_MAX_ALIGN_T=1;
14080 HAVE_WCHAR_T=1;
14081
14082
14083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
14084$as_echo_n "checking for wchar_t... " >&6; }
d0ac1c44 14085if ${gt_cv_c_wchar_t+:} false; then :
6ec2e0f5
SDJ
14086 $as_echo_n "(cached) " >&6
14087else
14088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14089/* end confdefs.h. */
14090#include <stddef.h>
14091 wchar_t foo = (wchar_t)'\0';
14092int
14093main ()
14094{
14095
14096 ;
14097 return 0;
14098}
14099_ACEOF
14100if ac_fn_c_try_compile "$LINENO"; then :
14101 gt_cv_c_wchar_t=yes
14102else
14103 gt_cv_c_wchar_t=no
14104fi
14105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14106fi
14107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
14108$as_echo "$gt_cv_c_wchar_t" >&6; }
14109 if test $gt_cv_c_wchar_t = yes; then
14110
14111$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
14112
14113 fi
14114
14115
14116
472fa5ee
SM
14117
14118
14119
14120
14121 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
d0ac1c44 14122if test "x$ac_cv_have_decl_strdup" = xyes; then :
6ec2e0f5
SDJ
14123 ac_have_decl=1
14124else
14125 ac_have_decl=0
14126fi
14127
14128cat >>confdefs.h <<_ACEOF
14129#define HAVE_DECL_STRDUP $ac_have_decl
14130_ACEOF
14131
14132
472fa5ee 14133
6ec2e0f5
SDJ
14134 REPLACE_STRERROR_0=0
14135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
14136$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
d0ac1c44 14137if ${gl_cv_func_strerror_0_works+:} false; then :
6ec2e0f5
SDJ
14138 $as_echo_n "(cached) " >&6
14139else
14140 if test "$cross_compiling" = yes; then :
14141 case "$host_os" in
5e8754f9
SDJ
14142 # Guess yes on glibc systems.
14143 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
14144 # If we don't know, assume the worst.
14145 *) gl_cv_func_strerror_0_works="guessing no" ;;
6ec2e0f5
SDJ
14146 esac
14147
14148else
14149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14150/* end confdefs.h. */
14151#include <string.h>
14152 #include <errno.h>
14153
14154int
14155main ()
14156{
14157int result = 0;
14158 char *str;
14159 errno = 0;
14160 str = strerror (0);
14161 if (!*str) result |= 1;
14162 if (errno) result |= 2;
14163 if (strstr (str, "nknown") || strstr (str, "ndefined"))
14164 result |= 4;
14165 return result;
14166 ;
14167 return 0;
14168}
14169_ACEOF
14170if ac_fn_c_try_run "$LINENO"; then :
14171 gl_cv_func_strerror_0_works=yes
14172else
14173 gl_cv_func_strerror_0_works=no
14174fi
14175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14176 conftest.$ac_objext conftest.beam conftest.$ac_ext
14177fi
14178
14179
14180fi
14181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
14182$as_echo "$gl_cv_func_strerror_0_works" >&6; }
14183 case "$gl_cv_func_strerror_0_works" in
14184 *yes) ;;
14185 *)
14186 REPLACE_STRERROR_0=1
14187
14188$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
14189
14190 ;;
14191 esac
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204 if test $gl_cv_have_include_next = yes; then
14205 gl_cv_next_string_h='<'string.h'>'
14206 else
14207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
14208$as_echo_n "checking absolute name of <string.h>... " >&6; }
d0ac1c44 14209if ${gl_cv_next_string_h+:} false; then :
6ec2e0f5
SDJ
14210 $as_echo_n "(cached) " >&6
14211else
14212
14213
14214
14215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14216/* end confdefs.h. */
14217#include <string.h>
14218_ACEOF
14219 case "$host_os" in
14220 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14221 *) gl_absname_cpp="$ac_cpp" ;;
14222 esac
14223
14224 case "$host_os" in
14225 mingw*)
14226 gl_dirsep_regex='[/\\]'
14227 ;;
14228 *)
14229 gl_dirsep_regex='\/'
14230 ;;
14231 esac
14232 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14233 gl_header_literal_regex=`echo 'string.h' \
14234 | sed -e "$gl_make_literal_regex_sed"`
14235 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14236 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14237 s|^/[^/]|//&|
14238 p
14239 q
14240 }'
14241
14242 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14243 sed -n "$gl_absolute_header_sed"`
14244
14245 gl_header=$gl_cv_absolute_string_h
14246 gl_cv_next_string_h='"'$gl_header'"'
14247
14248
14249fi
14250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
14251$as_echo "$gl_cv_next_string_h" >&6; }
14252 fi
14253 NEXT_STRING_H=$gl_cv_next_string_h
14254
14255 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14256 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14257 gl_next_as_first_directive='<'string.h'>'
14258 else
14259 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14260 gl_next_as_first_directive=$gl_cv_next_string_h
14261 fi
14262 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
14263
14264
14265
14266
14267
14268
5e8754f9
SDJ
14269 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
14270 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14272$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
14273if eval \${$as_gl_Symbol+:} false; then :
14274 $as_echo_n "(cached) " >&6
14275else
14276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14277/* end confdefs.h. */
14278#include <string.h>
14279
14280int
14281main ()
14282{
14283#undef $gl_func
14284 (void) $gl_func;
14285 ;
14286 return 0;
14287}
14288_ACEOF
14289if ac_fn_c_try_compile "$LINENO"; then :
14290 eval "$as_gl_Symbol=yes"
14291else
14292 eval "$as_gl_Symbol=no"
14293fi
14294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14295fi
14296eval ac_res=\$$as_gl_Symbol
14297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14298$as_echo "$ac_res" >&6; }
14299 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
14300 cat >>confdefs.h <<_ACEOF
14301#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14302_ACEOF
6ec2e0f5 14303
5e8754f9
SDJ
14304 eval ac_cv_have_decl_$gl_func=yes
14305fi
14306 done
6ec2e0f5
SDJ
14307
14308
14309
14310
14311
5e8754f9 14312 if test "$gl_cv_func_memchr_works" != yes; then
6ec2e0f5
SDJ
14313 REPLACE_STRSTR=1
14314 else
14315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
14316$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 14317if ${gl_cv_func_strstr_works_always+:} false; then :
6ec2e0f5
SDJ
14318 $as_echo_n "(cached) " >&6
14319else
14320 if test "$cross_compiling" = yes; then :
14321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14322/* end confdefs.h. */
14323
14324#ifdef __GNU_LIBRARY__
14325 #include <features.h>
14326 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
14327 || defined __UCLIBC__
14328 Lucky user
14329 #endif
14330#elif defined __CYGWIN__
14331 #include <cygwin/version.h>
14332 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
14333 Lucky user
14334 #endif
14335#else
14336 Lucky user
14337#endif
14338
14339_ACEOF
14340if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14341 $EGREP "Lucky user" >/dev/null 2>&1; then :
14342 gl_cv_func_strstr_works_always="guessing yes"
14343else
14344 gl_cv_func_strstr_works_always="guessing no"
14345fi
14346rm -f conftest*
14347
14348
14349else
14350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14351/* end confdefs.h. */
14352
14353#include <string.h> /* for strstr */
14354#define P "_EF_BF_BD"
14355#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
14356#define NEEDLE P P P P P
14357
14358int
14359main ()
14360{
14361return !!strstr (HAYSTACK, NEEDLE);
14362
14363 ;
14364 return 0;
14365}
14366_ACEOF
14367if ac_fn_c_try_run "$LINENO"; then :
14368 gl_cv_func_strstr_works_always=yes
14369else
14370 gl_cv_func_strstr_works_always=no
14371fi
14372rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14373 conftest.$ac_objext conftest.beam conftest.$ac_ext
14374fi
14375
14376
14377fi
14378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
14379$as_echo "$gl_cv_func_strstr_works_always" >&6; }
14380 case "$gl_cv_func_strstr_works_always" in
14381 *yes) ;;
14382 *)
14383 REPLACE_STRSTR=1
14384 ;;
14385 esac
14386 fi
14387
472fa5ee
SM
14388
14389 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
d0ac1c44 14390if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
6ec2e0f5
SDJ
14391 ac_have_decl=1
14392else
14393 ac_have_decl=0
14394fi
14395
14396cat >>confdefs.h <<_ACEOF
14397#define HAVE_DECL_STRTOK_R $ac_have_decl
14398_ACEOF
14399
472fa5ee 14400
6ec2e0f5
SDJ
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419 if test $gl_cv_have_include_next = yes; then
14420 gl_cv_next_sys_types_h='<'sys/types.h'>'
14421 else
14422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
14423$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
d0ac1c44 14424if ${gl_cv_next_sys_types_h+:} false; then :
6ec2e0f5
SDJ
14425 $as_echo_n "(cached) " >&6
14426else
14427
14428
14429
14430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14431/* end confdefs.h. */
14432#include <sys/types.h>
14433_ACEOF
14434 case "$host_os" in
14435 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14436 *) gl_absname_cpp="$ac_cpp" ;;
14437 esac
14438
14439 case "$host_os" in
14440 mingw*)
14441 gl_dirsep_regex='[/\\]'
14442 ;;
14443 *)
14444 gl_dirsep_regex='\/'
14445 ;;
14446 esac
14447 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14448 gl_header_literal_regex=`echo 'sys/types.h' \
14449 | sed -e "$gl_make_literal_regex_sed"`
14450 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14451 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14452 s|^/[^/]|//&|
14453 p
14454 q
14455 }'
14456
14457 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14458 sed -n "$gl_absolute_header_sed"`
14459
14460 gl_header=$gl_cv_absolute_sys_types_h
14461 gl_cv_next_sys_types_h='"'$gl_header'"'
14462
14463
14464fi
14465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
14466$as_echo "$gl_cv_next_sys_types_h" >&6; }
14467 fi
14468 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
14469
14470 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14471 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14472 gl_next_as_first_directive='<'sys/types.h'>'
14473 else
14474 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14475 gl_next_as_first_directive=$gl_cv_next_sys_types_h
14476 fi
14477 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
725e2999
JB
14490
14491
14492
14493
14494
14495
14496
5e8754f9
SDJ
14497 GNULIB_MKTIME=0;
14498 GNULIB_NANOSLEEP=0;
14499 GNULIB_STRPTIME=0;
14500 GNULIB_TIMEGM=0;
14501 GNULIB_TIME_R=0;
14502 GNULIB_TIME_RZ=0;
14503 HAVE_DECL_LOCALTIME_R=1;
14504 HAVE_NANOSLEEP=1;
14505 HAVE_STRPTIME=1;
14506 HAVE_TIMEGM=1;
14507 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
14508 REPLACE_MKTIME=GNULIB_PORTCHECK;
14509 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
14510 REPLACE_TIMEGM=GNULIB_PORTCHECK;
6ec2e0f5 14511
5e8754f9
SDJ
14512 : ${GNULIB_GETTIMEOFDAY=0};
14513 REPLACE_GMTIME=0;
14514 REPLACE_LOCALTIME=0;
6ec2e0f5
SDJ
14515
14516
14517
472fa5ee
SM
14518 :
14519
14520
14521
14522
14523
6ec2e0f5
SDJ
14524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
14525$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
d0ac1c44 14526if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
6ec2e0f5
SDJ
14527 $as_echo_n "(cached) " >&6
14528else
14529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14530/* end confdefs.h. */
14531#include <time.h>
14532
14533int
14534main ()
14535{
14536static struct timespec x; x.tv_sec = x.tv_nsec;
14537 ;
14538 return 0;
14539}
14540_ACEOF
14541if ac_fn_c_try_compile "$LINENO"; then :
14542 gl_cv_sys_struct_timespec_in_time_h=yes
14543else
14544 gl_cv_sys_struct_timespec_in_time_h=no
14545fi
14546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14547fi
14548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
14549$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
14550
14551 TIME_H_DEFINES_STRUCT_TIMESPEC=0
14552 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
14553 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
14554 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
14555 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
14556 TIME_H_DEFINES_STRUCT_TIMESPEC=1
14557 else
14558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
14559$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
d0ac1c44 14560if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
6ec2e0f5
SDJ
14561 $as_echo_n "(cached) " >&6
14562else
14563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14564/* end confdefs.h. */
14565#include <sys/time.h>
14566
14567int
14568main ()
14569{
14570static struct timespec x; x.tv_sec = x.tv_nsec;
14571 ;
14572 return 0;
14573}
14574_ACEOF
14575if ac_fn_c_try_compile "$LINENO"; then :
14576 gl_cv_sys_struct_timespec_in_sys_time_h=yes
14577else
14578 gl_cv_sys_struct_timespec_in_sys_time_h=no
14579fi
14580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14581fi
14582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
14583$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
14584 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
14585 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
14586 else
14587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
14588$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
d0ac1c44 14589if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
6ec2e0f5
SDJ
14590 $as_echo_n "(cached) " >&6
14591else
14592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14593/* end confdefs.h. */
14594#include <pthread.h>
14595
14596int
14597main ()
14598{
14599static struct timespec x; x.tv_sec = x.tv_nsec;
14600 ;
14601 return 0;
14602}
14603_ACEOF
14604if ac_fn_c_try_compile "$LINENO"; then :
14605 gl_cv_sys_struct_timespec_in_pthread_h=yes
14606else
14607 gl_cv_sys_struct_timespec_in_pthread_h=no
14608fi
14609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14610fi
14611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
14612$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
14613 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
14614 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
14615 else
14616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
14617$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
d0ac1c44 14618if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
6ec2e0f5
SDJ
14619 $as_echo_n "(cached) " >&6
14620else
14621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14622/* end confdefs.h. */
14623#include <unistd.h>
14624
14625int
14626main ()
14627{
14628static struct timespec x; x.tv_sec = x.tv_nsec;
14629 ;
14630 return 0;
14631}
14632_ACEOF
14633if ac_fn_c_try_compile "$LINENO"; then :
14634 gl_cv_sys_struct_timespec_in_unistd_h=yes
14635else
14636 gl_cv_sys_struct_timespec_in_unistd_h=no
14637fi
14638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14639fi
14640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
14641$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
14642 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
14643 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
14644 fi
14645 fi
14646 fi
14647 fi
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664 if test $gl_cv_have_include_next = yes; then
14665 gl_cv_next_time_h='<'time.h'>'
14666 else
14667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
14668$as_echo_n "checking absolute name of <time.h>... " >&6; }
d0ac1c44 14669if ${gl_cv_next_time_h+:} false; then :
6ec2e0f5
SDJ
14670 $as_echo_n "(cached) " >&6
14671else
14672
14673
14674
14675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14676/* end confdefs.h. */
14677#include <time.h>
14678_ACEOF
14679 case "$host_os" in
14680 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14681 *) gl_absname_cpp="$ac_cpp" ;;
14682 esac
14683
14684 case "$host_os" in
14685 mingw*)
14686 gl_dirsep_regex='[/\\]'
14687 ;;
14688 *)
14689 gl_dirsep_regex='\/'
14690 ;;
14691 esac
14692 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14693 gl_header_literal_regex=`echo 'time.h' \
14694 | sed -e "$gl_make_literal_regex_sed"`
14695 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14696 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14697 s|^/[^/]|//&|
14698 p
14699 q
14700 }'
14701
14702 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14703 sed -n "$gl_absolute_header_sed"`
14704
14705 gl_header=$gl_cv_absolute_time_h
14706 gl_cv_next_time_h='"'$gl_header'"'
14707
14708
14709fi
14710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
14711$as_echo "$gl_cv_next_time_h" >&6; }
14712 fi
14713 NEXT_TIME_H=$gl_cv_next_time_h
14714
14715 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14716 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14717 gl_next_as_first_directive='<'time.h'>'
14718 else
14719 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14720 gl_next_as_first_directive=$gl_cv_next_time_h
14721 fi
14722 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
14723
14724
14725
14726
14727
14728
14729
14730
472fa5ee
SM
14731
14732
14733
14734
14735 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
d0ac1c44 14736if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
6ec2e0f5
SDJ
14737 ac_have_decl=1
14738else
14739 ac_have_decl=0
14740fi
14741
14742cat >>confdefs.h <<_ACEOF
14743#define HAVE_DECL_UNSETENV $ac_have_decl
14744_ACEOF
14745
14746
472fa5ee 14747
6ec2e0f5
SDJ
14748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
14749$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
d0ac1c44 14750if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
6ec2e0f5
SDJ
14751 $as_echo_n "(cached) " >&6
14752else
14753 gl_cv_header_wchar_h_correct_inline=yes
14754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14755/* end confdefs.h. */
14756
14757 #define wcstod renamed_wcstod
14758/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14759 <wchar.h>.
14760 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14761 included before <wchar.h>. */
14762#include <stddef.h>
14763#include <stdio.h>
14764#include <time.h>
14765#include <wchar.h>
14766extern int zero (void);
14767int main () { return zero(); }
14768
14769_ACEOF
14770 save_ac_compile="$ac_compile"
14771 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
5e8754f9 14772 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6ec2e0f5
SDJ
14773 (eval $ac_compile) 2>&5
14774 ac_status=$?
14775 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14776 test $ac_status = 0; }; then
14777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14778/* end confdefs.h. */
14779
14780 #define wcstod renamed_wcstod
14781/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14782 <wchar.h>.
14783 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14784 included before <wchar.h>. */
14785#include <stddef.h>
14786#include <stdio.h>
14787#include <time.h>
14788#include <wchar.h>
14789int zero (void) { return 0; }
14790
14791_ACEOF
14792 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
5e8754f9 14793 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6ec2e0f5
SDJ
14794 (eval $ac_compile) 2>&5
14795 ac_status=$?
14796 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14797 test $ac_status = 0; }; then
14798 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
14799 :
14800 else
14801 gl_cv_header_wchar_h_correct_inline=no
14802 fi
14803 fi
14804 fi
14805 ac_compile="$save_ac_compile"
5e8754f9 14806 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
6ec2e0f5
SDJ
14807
14808fi
14809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
14810$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
14811 if test $gl_cv_header_wchar_h_correct_inline = no; then
d0ac1c44 14812 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
6ec2e0f5
SDJ
14813This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
14814C99 mode. You have four options:
14815 - Add the flag -fgnu89-inline to CC and reconfigure, or
14816 - Fix your include files, using parts of
5e8754f9 14817 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
6ec2e0f5
SDJ
14818 - Use a gcc version older than 4.3, or
14819 - Don't use the flags -std=c99 or -std=gnu99.
14820Configuration aborted." "$LINENO" 5
14821 fi
14822
14823
5e8754f9
SDJ
14824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
14825$as_echo_n "checking for wint_t... " >&6; }
14826if ${gt_cv_c_wint_t+:} false; then :
14827 $as_echo_n "(cached) " >&6
14828else
14829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14830/* end confdefs.h. */
6ec2e0f5 14831
5e8754f9
SDJ
14832/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14833 <wchar.h>.
14834 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
14835 before <wchar.h>. */
14836#include <stddef.h>
14837#include <stdio.h>
14838#include <time.h>
14839#include <wchar.h>
14840 wint_t foo = (wchar_t)'\0';
14841int
14842main ()
14843{
6ec2e0f5 14844
5e8754f9
SDJ
14845 ;
14846 return 0;
14847}
14848_ACEOF
14849if ac_fn_c_try_compile "$LINENO"; then :
14850 gt_cv_c_wint_t=yes
14851else
14852 gt_cv_c_wint_t=no
14853fi
14854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14855fi
14856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
14857$as_echo "$gt_cv_c_wint_t" >&6; }
14858 if test $gt_cv_c_wint_t = yes; then
6ec2e0f5 14859
5e8754f9 14860$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
6ec2e0f5
SDJ
14861
14862 fi
14863
14864
14865 GNULIB_ISWBLANK=0;
14866 GNULIB_WCTYPE=0;
14867 GNULIB_ISWCTYPE=0;
14868 GNULIB_WCTRANS=0;
14869 GNULIB_TOWCTRANS=0;
14870 HAVE_ISWBLANK=1;
14871 HAVE_WCTYPE_T=1;
14872 HAVE_WCTRANS_T=1;
14873 REPLACE_ISWBLANK=0;
14874
14875
14876
14877
472fa5ee
SM
14878
14879
14880
725e2999
JB
14881 if false; then
14882 GL_COND_LIBTOOL_TRUE=
14883 GL_COND_LIBTOOL_FALSE='#'
14884else
14885 GL_COND_LIBTOOL_TRUE='#'
14886 GL_COND_LIBTOOL_FALSE=
14887fi
14888
14889 gl_cond_libtool=false
14890 gl_libdeps=
14891 gl_ltlibdeps=
14892 gl_m4_base='import/m4'
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902 gl_source_base='import'
14903
14904
14905 if test $ac_cv_func_alloca_works = no; then
14906 :
14907 fi
14908
14909 # Define an additional variable used in the Makefile substitution.
14910 if test $ac_cv_working_alloca_h = yes; then
14911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
14912$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
14913if ${gl_cv_rpl_alloca+:} false; then :
14914 $as_echo_n "(cached) " >&6
14915else
14916
14917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14918/* end confdefs.h. */
14919
14920#if defined __GNUC__ || defined _AIX || defined _MSC_VER
14921 Need own alloca
14922#endif
14923
14924_ACEOF
14925if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14926 $EGREP "Need own alloca" >/dev/null 2>&1; then :
14927 gl_cv_rpl_alloca=yes
14928else
14929 gl_cv_rpl_alloca=no
14930fi
14931rm -f conftest*
14932
14933
14934fi
14935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
14936$as_echo "$gl_cv_rpl_alloca" >&6; }
14937 if test $gl_cv_rpl_alloca = yes; then
14938
14939$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
14940
14941 ALLOCA_H=alloca.h
14942 else
14943 ALLOCA_H=
14944 fi
14945 else
14946 ALLOCA_H=alloca.h
14947 fi
14948
14949 if test -n "$ALLOCA_H"; then
14950 GL_GENERATE_ALLOCA_H_TRUE=
14951 GL_GENERATE_ALLOCA_H_FALSE='#'
14952else
14953 GL_GENERATE_ALLOCA_H_TRUE='#'
14954 GL_GENERATE_ALLOCA_H_FALSE=
14955fi
14956
14957
14958
14959
14960
14961
14962 :
14963
14964
14965
14966
14967
14968 if test $ac_cv_header_arpa_inet_h = yes; then
14969 HAVE_ARPA_INET_H=1
14970 else
14971 HAVE_ARPA_INET_H=0
14972 fi
14973
14974
14975
14976
14977
14978
14979
14980 :
14981
14982
14983
14984
14985
14986
14987
14988
14989 if test $gl_cv_have_include_next = yes; then
14990 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
14991 else
14992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
14993$as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
14994if ${gl_cv_next_arpa_inet_h+:} false; then :
14995 $as_echo_n "(cached) " >&6
14996else
14997
14998 if test $ac_cv_header_arpa_inet_h = yes; then
14999
15000
15001
15002
15003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15004/* end confdefs.h. */
15005#include <arpa/inet.h>
15006_ACEOF
15007 case "$host_os" in
15008 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15009 *) gl_absname_cpp="$ac_cpp" ;;
15010 esac
15011
15012 case "$host_os" in
15013 mingw*)
15014 gl_dirsep_regex='[/\\]'
15015 ;;
15016 *)
15017 gl_dirsep_regex='\/'
15018 ;;
15019 esac
15020 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15021 gl_header_literal_regex=`echo 'arpa/inet.h' \
15022 | sed -e "$gl_make_literal_regex_sed"`
15023 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15024 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15025 s|^/[^/]|//&|
15026 p
15027 q
15028 }'
6ec2e0f5 15029
725e2999
JB
15030 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15031 sed -n "$gl_absolute_header_sed"`
6ec2e0f5 15032
725e2999
JB
15033 gl_header=$gl_cv_absolute_arpa_inet_h
15034 gl_cv_next_arpa_inet_h='"'$gl_header'"'
15035 else
15036 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
15037 fi
6ec2e0f5
SDJ
15038
15039
725e2999
JB
15040fi
15041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
15042$as_echo "$gl_cv_next_arpa_inet_h" >&6; }
15043 fi
15044 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
6ec2e0f5 15045
725e2999
JB
15046 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15047 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15048 gl_next_as_first_directive='<'arpa/inet.h'>'
15049 else
15050 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15051 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
15052 fi
15053 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
6ec2e0f5
SDJ
15054
15055
15056
15057
15058
6ec2e0f5
SDJ
15059
15060
6ec2e0f5 15061
725e2999
JB
15062 for gl_func in inet_ntop inet_pton; do
15063 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15065$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15066if eval \${$as_gl_Symbol+:} false; then :
6ec2e0f5
SDJ
15067 $as_echo_n "(cached) " >&6
15068else
725e2999 15069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5
SDJ
15070/* end confdefs.h. */
15071
725e2999
JB
15072/* On some systems, this header is not self-consistent. */
15073#if !(defined __GLIBC__ || defined __UCLIBC__)
15074# include <sys/socket.h>
6ec2e0f5 15075#endif
725e2999
JB
15076#ifdef __TANDEM
15077# include <netdb.h>
15078#endif
15079#include <arpa/inet.h>
6ec2e0f5 15080
725e2999
JB
15081int
15082main ()
15083{
15084#undef $gl_func
15085 (void) $gl_func;
15086 ;
15087 return 0;
15088}
6ec2e0f5 15089_ACEOF
725e2999
JB
15090if ac_fn_c_try_compile "$LINENO"; then :
15091 eval "$as_gl_Symbol=yes"
6ec2e0f5 15092else
725e2999 15093 eval "$as_gl_Symbol=no"
6ec2e0f5 15094fi
725e2999 15095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 15096fi
725e2999
JB
15097eval ac_res=\$$as_gl_Symbol
15098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15099$as_echo "$ac_res" >&6; }
15100 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15101 cat >>confdefs.h <<_ACEOF
15102#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15103_ACEOF
6ec2e0f5 15104
725e2999 15105 eval ac_cv_have_decl_$gl_func=yes
6ec2e0f5 15106fi
725e2999
JB
15107 done
15108
6ec2e0f5
SDJ
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
15120
15121
15122
15123
15124 if test $ac_cv_func_canonicalize_file_name = no; then
15125 HAVE_CANONICALIZE_FILE_NAME=0
15126 if test $ac_cv_func_realpath = no; then
15127 HAVE_REALPATH=0
15128 else
15129 case "$gl_cv_func_realpath_works" in
5e8754f9
SDJ
15130 *yes) ;;
15131 *) REPLACE_REALPATH=1 ;;
6ec2e0f5
SDJ
15132 esac
15133 fi
15134 else
15135 case "$gl_cv_func_realpath_works" in
15136 *yes)
15137 ;;
15138 *)
15139 REPLACE_CANONICALIZE_FILE_NAME=1
15140 REPLACE_REALPATH=1
15141 ;;
15142 esac
15143 fi
15144
15145 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
15146
15147
15148
15149
15150
15151
15152
15153
15154 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
15155
15156 fi
15157
15158
15159cat >>confdefs.h <<_ACEOF
15160#define GNULIB_CANONICALIZE_LGPL 1
15161_ACEOF
15162
15163
15164
15165
15166
15167
15168
15169 GNULIB_CANONICALIZE_FILE_NAME=1
15170
15171
15172
15173
15174
15175$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
15176
15177
15178
15179
15180
15181
15182
15183
15184 GNULIB_REALPATH=1
15185
15186
15187
15188
15189
15190$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
15191
15192
15193
15194
15195
15196
15197
15198
15199 GNULIB_CHDIR=1
15200
15201
15202
15203
15204
15205$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
15206
15207
15208
15209
15210
15211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
15212$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
d0ac1c44 15213if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
6ec2e0f5
SDJ
15214 $as_echo_n "(cached) " >&6
15215else
15216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15217/* end confdefs.h. */
15218
15219/* Arrange to define PATH_MAX, like "pathmax.h" does. */
15220#if HAVE_UNISTD_H
15221# include <unistd.h>
15222#endif
15223#include <limits.h>
15224#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
15225# include <sys/param.h>
15226#endif
15227#if !defined PATH_MAX && defined MAXPATHLEN
15228# define PATH_MAX MAXPATHLEN
15229#endif
15230#ifdef __hpux
15231# undef PATH_MAX
15232# define PATH_MAX 1024
15233#endif
5e8754f9 15234#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
15235# undef PATH_MAX
15236# define PATH_MAX 260
15237#endif
15238
15239#ifdef PATH_MAX
15240have_arbitrary_file_name_length_limit
15241#endif
15242_ACEOF
15243if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15244 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
15245 gl_cv_have_arbitrary_file_name_length_limit=yes
15246else
15247 gl_cv_have_arbitrary_file_name_length_limit=no
15248fi
15249rm -f conftest*
15250
15251fi
15252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
15253$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
15254
15255 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
15256
15257
15258
15259
15260
15261
15262
15263
15264 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
15265
15266 :
15267 fi
15268
15269
15270$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
15271
15272
15273
15274
15275
5e8754f9
SDJ
15276 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
15277 REPLACE_CLOSE=1
15278 fi
6ec2e0f5
SDJ
15279
15280
15281
15282
15283
472fa5ee
SM
15284 :
15285
15286
15287
15288
15289
6ec2e0f5
SDJ
15290 if test $ac_cv_header_sys_socket_h != yes; then
15291 for ac_header in winsock2.h
15292do :
15293 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 15294if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
15295 cat >>confdefs.h <<_ACEOF
15296#define HAVE_WINSOCK2_H 1
15297_ACEOF
15298
15299fi
15300
15301done
15302
15303 fi
15304 if test "$ac_cv_header_winsock2_h" = yes; then
15305 HAVE_WINSOCK2_H=1
15306 UNISTD_H_HAVE_WINSOCK2_H=1
15307 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
15308 else
15309 HAVE_WINSOCK2_H=0
15310 fi
15311
15312
15313 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
15314 REPLACE_CLOSE=1
15315 fi
15316
15317
15318 if test $REPLACE_CLOSE = 0; then
15319
15320
15321
472fa5ee
SM
15322 :
15323
15324
15325
15326
15327
6ec2e0f5
SDJ
15328 if test $ac_cv_func_fchdir = no; then
15329 HAVE_FCHDIR=0
15330 fi
15331
15332 if test $HAVE_FCHDIR = 0; then
15333 REPLACE_CLOSE=1
15334 fi
15335 fi
15336
15337
15338 if test $REPLACE_CLOSE = 1; then
15339
15340
15341
15342
15343
15344
15345
15346
15347 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
15348
15349 fi
15350
15351
15352
15353
15354
15355 GNULIB_CLOSE=1
15356
15357
15358
15359
15360
15361$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
15362
15363
15364
15365
15366
15367
15368 for ac_func in closedir
15369do :
15370 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
d0ac1c44 15371if test "x$ac_cv_func_closedir" = xyes; then :
6ec2e0f5
SDJ
15372 cat >>confdefs.h <<_ACEOF
15373#define HAVE_CLOSEDIR 1
15374_ACEOF
15375
15376fi
15377done
15378
15379 if test $ac_cv_func_closedir = no; then
15380 HAVE_CLOSEDIR=0
15381 fi
15382
15383
15384
15385
472fa5ee
SM
15386 :
15387
15388
15389
15390
15391
6ec2e0f5
SDJ
15392 if test $ac_cv_func_fchdir = no; then
15393 HAVE_FCHDIR=0
15394 fi
15395
15396 if test $HAVE_FCHDIR = 0; then
15397 if test $HAVE_CLOSEDIR = 1; then
15398 REPLACE_CLOSEDIR=1
15399 fi
15400 fi
15401
15402 case $host_os,$HAVE_CLOSEDIR in
15403 os2*,1)
15404 REPLACE_CLOSEDIR=1;;
15405 esac
15406
15407 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
15408
15409
15410
15411
15412
15413
15414
15415
15416 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
15417
15418 fi
15419
15420
15421
15422
15423
15424 GNULIB_CLOSEDIR=1
15425
15426
15427
15428
15429
15430$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
15431
15432
15433
5e8754f9
SDJ
15434
15435 if test "x$datarootdir" = x; then
15436 datarootdir='${datadir}'
15437
15438 fi
15439 if test "x$docdir" = x; then
15440 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
15441
15442 fi
15443 if test "x$htmldir" = x; then
15444 htmldir='${docdir}'
15445
15446 fi
15447 if test "x$dvidir" = x; then
15448 dvidir='${docdir}'
15449
15450 fi
15451 if test "x$pdfdir" = x; then
15452 pdfdir='${docdir}'
15453
15454 fi
15455 if test "x$psdir" = x; then
15456 psdir='${docdir}'
15457
15458 fi
15459 if test "x$lispdir" = x; then
15460 lispdir='${datarootdir}/emacs/site-lisp'
15461
15462 fi
15463 if test "x$localedir" = x; then
15464 localedir='${datarootdir}/locale'
15465
15466 fi
15467 if test "x$runstatedir" = x; then
15468 runstatedir='${localstatedir}/run'
15469
15470 fi
15471
15472 pkglibexecdir='${libexecdir}/${PACKAGE}'
15473
15474
6ec2e0f5
SDJ
15475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
15476$as_echo_n "checking for d_ino member in directory struct... " >&6; }
d0ac1c44 15477if ${gl_cv_struct_dirent_d_ino+:} false; then :
6ec2e0f5
SDJ
15478 $as_echo_n "(cached) " >&6
15479else
15480 if test "$cross_compiling" = yes; then :
15481 case "$host_os" in
15482 # Guess yes on glibc systems with Linux kernel.
15483 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
15484 # If we don't know, assume the worst.
15485 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
15486 esac
15487
15488else
15489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15490/* end confdefs.h. */
15491#include <sys/types.h>
15492 #include <sys/stat.h>
15493 #include <dirent.h>
15494
15495int
15496main ()
15497{
15498DIR *dp = opendir (".");
15499 struct dirent *e;
15500 struct stat st;
15501 if (! dp)
15502 return 1;
15503 e = readdir (dp);
15504 if (! e)
5e8754f9 15505 return 2;
6ec2e0f5 15506 if (lstat (e->d_name, &st) != 0)
5e8754f9 15507 return 3;
6ec2e0f5 15508 if (e->d_ino != st.st_ino)
5e8754f9 15509 return 4;
6ec2e0f5
SDJ
15510 closedir (dp);
15511 return 0;
15512
15513 ;
15514 return 0;
15515}
15516_ACEOF
15517if ac_fn_c_try_run "$LINENO"; then :
15518 gl_cv_struct_dirent_d_ino=yes
15519else
15520 gl_cv_struct_dirent_d_ino=no
15521fi
15522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15523 conftest.$ac_objext conftest.beam conftest.$ac_ext
15524fi
15525
15526fi
15527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
15528$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
15529 case "$gl_cv_struct_dirent_d_ino" in
15530 *yes)
15531
15532$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
15533
15534 ;;
15535 esac
15536
15537
15538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
15539$as_echo_n "checking for d_type member in directory struct... " >&6; }
d0ac1c44 15540if ${gl_cv_struct_dirent_d_type+:} false; then :
6ec2e0f5
SDJ
15541 $as_echo_n "(cached) " >&6
15542else
15543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15544/* end confdefs.h. */
15545
15546#include <sys/types.h>
15547#include <dirent.h>
15548
15549int
15550main ()
15551{
15552struct dirent dp; dp.d_type = 0;
15553 ;
15554 return 0;
15555}
15556_ACEOF
15557if ac_fn_c_try_link "$LINENO"; then :
15558 gl_cv_struct_dirent_d_type=yes
15559else
15560 gl_cv_struct_dirent_d_type=no
15561fi
15562rm -f core conftest.err conftest.$ac_objext \
15563 conftest$ac_exeext conftest.$ac_ext
15564
15565
15566fi
15567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
15568$as_echo "$gl_cv_struct_dirent_d_type" >&6; }
15569 if test $gl_cv_struct_dirent_d_type = yes; then
15570
15571$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
15572
15573 fi
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
472fa5ee
SM
15585 :
15586
15587
15588
15589
15590
6ec2e0f5
SDJ
15591
15592
15593
15594 if test $gl_cv_have_include_next = yes; then
15595 gl_cv_next_dirent_h='<'dirent.h'>'
15596 else
15597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
15598$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
d0ac1c44 15599if ${gl_cv_next_dirent_h+:} false; then :
6ec2e0f5
SDJ
15600 $as_echo_n "(cached) " >&6
15601else
15602
15603 if test $ac_cv_header_dirent_h = yes; then
15604
15605
15606
15607
15608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15609/* end confdefs.h. */
15610#include <dirent.h>
15611_ACEOF
15612 case "$host_os" in
15613 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15614 *) gl_absname_cpp="$ac_cpp" ;;
15615 esac
15616
15617 case "$host_os" in
15618 mingw*)
15619 gl_dirsep_regex='[/\\]'
15620 ;;
15621 *)
15622 gl_dirsep_regex='\/'
15623 ;;
15624 esac
15625 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15626 gl_header_literal_regex=`echo 'dirent.h' \
15627 | sed -e "$gl_make_literal_regex_sed"`
15628 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15629 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15630 s|^/[^/]|//&|
15631 p
15632 q
15633 }'
15634
15635 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15636 sed -n "$gl_absolute_header_sed"`
15637
15638 gl_header=$gl_cv_absolute_dirent_h
15639 gl_cv_next_dirent_h='"'$gl_header'"'
15640 else
15641 gl_cv_next_dirent_h='<'dirent.h'>'
15642 fi
15643
15644
15645fi
15646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
15647$as_echo "$gl_cv_next_dirent_h" >&6; }
15648 fi
15649 NEXT_DIRENT_H=$gl_cv_next_dirent_h
15650
15651 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15652 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15653 gl_next_as_first_directive='<'dirent.h'>'
15654 else
15655 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15656 gl_next_as_first_directive=$gl_cv_next_dirent_h
15657 fi
15658 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
15659
15660
15661
15662
15663 if test $ac_cv_header_dirent_h = yes; then
15664 HAVE_DIRENT_H=1
15665 else
15666 HAVE_DIRENT_H=0
15667 fi
15668
15669
15670
5e8754f9
SDJ
15671 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
15672 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15674$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15675if eval \${$as_gl_Symbol+:} false; then :
15676 $as_echo_n "(cached) " >&6
15677else
15678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15679/* end confdefs.h. */
15680#include <dirent.h>
15681
15682int
15683main ()
15684{
15685#undef $gl_func
15686 (void) $gl_func;
15687 ;
15688 return 0;
15689}
15690_ACEOF
15691if ac_fn_c_try_compile "$LINENO"; then :
15692 eval "$as_gl_Symbol=yes"
15693else
15694 eval "$as_gl_Symbol=no"
15695fi
15696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15697fi
15698eval ac_res=\$$as_gl_Symbol
15699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15700$as_echo "$ac_res" >&6; }
15701 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15702 cat >>confdefs.h <<_ACEOF
15703#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15704_ACEOF
6ec2e0f5 15705
5e8754f9
SDJ
15706 eval ac_cv_have_decl_$gl_func=yes
15707fi
15708 done
6ec2e0f5
SDJ
15709
15710
15711
15712
15713
15714
15715
15716 for ac_func in dirfd
15717do :
15718 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
d0ac1c44 15719if test "x$ac_cv_func_dirfd" = xyes; then :
6ec2e0f5
SDJ
15720 cat >>confdefs.h <<_ACEOF
15721#define HAVE_DIRFD 1
15722_ACEOF
15723
15724fi
15725done
15726
15727 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
15728 #include <dirent.h>
15729"
d0ac1c44 15730if test "x$ac_cv_have_decl_dirfd" = xyes; then :
6ec2e0f5
SDJ
15731 ac_have_decl=1
15732else
15733 ac_have_decl=0
15734fi
15735
15736cat >>confdefs.h <<_ACEOF
15737#define HAVE_DECL_DIRFD $ac_have_decl
15738_ACEOF
15739
15740 if test $ac_cv_have_decl_dirfd = no; then
15741 HAVE_DECL_DIRFD=0
15742 fi
15743
15744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
15745$as_echo_n "checking whether dirfd is a macro... " >&6; }
d0ac1c44 15746if ${gl_cv_func_dirfd_macro+:} false; then :
6ec2e0f5
SDJ
15747 $as_echo_n "(cached) " >&6
15748else
15749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15750/* end confdefs.h. */
15751
15752#include <sys/types.h>
15753#include <dirent.h>
15754#ifdef dirfd
15755 dirent_header_defines_dirfd
15756#endif
15757_ACEOF
15758if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15759 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
15760 gl_cv_func_dirfd_macro=yes
15761else
15762 gl_cv_func_dirfd_macro=no
15763fi
15764rm -f conftest*
15765
15766fi
15767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
15768$as_echo "$gl_cv_func_dirfd_macro" >&6; }
15769
15770 # Use the replacement if we have no function or macro with that name,
15771 # or if OS/2 kLIBC whose dirfd() does not work.
15772 # Replace only if the system declares dirfd already.
15773 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
15774 no,no,*,yes | *,*,os2*,yes)
15775 REPLACE_DIRFD=1
15776
15777$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
15778;;
15779 esac
15780
15781 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
15782 || test $REPLACE_DIRFD = 1; then
15783
15784
15785
15786
15787
15788
15789
15790
15791 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
15792
15793
15794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
15795$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
d0ac1c44 15796if ${gl_cv_sys_dir_fd_member_name+:} false; then :
6ec2e0f5
SDJ
15797 $as_echo_n "(cached) " >&6
15798else
15799
15800 dirfd_save_CFLAGS=$CFLAGS
15801 for ac_expr in d_fd dd_fd; do
15802
15803 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
15804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15805/* end confdefs.h. */
15806
15807 #include <sys/types.h>
15808 #include <dirent.h>
15809int
15810main ()
15811{
15812DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
15813 ;
15814 return 0;
15815}
15816_ACEOF
15817if ac_fn_c_try_compile "$LINENO"; then :
15818 dir_fd_found=yes
15819
15820fi
15821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15822 CFLAGS=$dirfd_save_CFLAGS
15823 test "$dir_fd_found" = yes && break
15824 done
15825 test "$dir_fd_found" = yes || ac_expr=no_such_member
15826
15827 gl_cv_sys_dir_fd_member_name=$ac_expr
15828
15829
15830fi
15831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
15832$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
15833 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
15834
15835cat >>confdefs.h <<_ACEOF
15836#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
15837_ACEOF
15838
15839 fi
15840
15841
15842 fi
15843
15844
15845
15846
15847
15848 GNULIB_DIRFD=1
15849
15850
15851
15852
15853
15854$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
15865$as_echo_n "checking whether // is distinct from /... " >&6; }
d0ac1c44 15866if ${gl_cv_double_slash_root+:} false; then :
6ec2e0f5
SDJ
15867 $as_echo_n "(cached) " >&6
15868else
15869 if test x"$cross_compiling" = xyes ; then
15870 # When cross-compiling, there is no way to tell whether // is special
15871 # short of a list of hosts. However, the only known hosts to date
15872 # that have a distinct // are Apollo DomainOS (too old to port to),
15873 # Cygwin, and z/OS. If anyone knows of another system for which // has
15874 # special semantics and is distinct from /, please report it to
15875 # <bug-gnulib@gnu.org>.
15876 case $host in
15877 *-cygwin | i370-ibm-openedition)
15878 gl_cv_double_slash_root=yes ;;
15879 *)
15880 # Be optimistic and assume that / and // are the same when we
15881 # don't know.
15882 gl_cv_double_slash_root='unknown, assuming no' ;;
15883 esac
15884 else
15885 set x `ls -di / // 2>/dev/null`
15886 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
15887 gl_cv_double_slash_root=no
15888 else
15889 gl_cv_double_slash_root=yes
15890 fi
15891 fi
15892fi
15893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
15894$as_echo "$gl_cv_double_slash_root" >&6; }
15895 if test "$gl_cv_double_slash_root" = yes; then
8690e634 15896
6ec2e0f5 15897$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8690e634 15898
6ec2e0f5 15899 fi
8690e634
JK
15900
15901
15902
15903
5e8754f9
SDJ
15904 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
15905 REPLACE_DUP=1
15906 fi
8690e634 15907
8690e634
JK
15908
15909
15910
472fa5ee
SM
15911 :
15912
15913
15914
15915
15916
6ec2e0f5
SDJ
15917 if test $ac_cv_func_fchdir = no; then
15918 HAVE_FCHDIR=0
15919 fi
8690e634 15920
6ec2e0f5
SDJ
15921 if test $HAVE_FCHDIR = 0; then
15922 REPLACE_DUP=1
15923 fi
8690e634 15924
6ec2e0f5
SDJ
15925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
15926$as_echo_n "checking whether dup works... " >&6; }
d0ac1c44 15927if ${gl_cv_func_dup_works+:} false; then :
6ec2e0f5 15928 $as_echo_n "(cached) " >&6
8690e634 15929else
6ec2e0f5 15930 if test "$cross_compiling" = yes; then :
5e8754f9 15931 gl_cv_func_dup_works='guessing yes'
6ec2e0f5
SDJ
15932else
15933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 15934/* end confdefs.h. */
6ec2e0f5
SDJ
15935#include <unistd.h>
15936 #include <fcntl.h>
15937 #include <errno.h>
15938int
15939main ()
15940{
15941/* On OS/2 kLIBC, dup does not work on a directory fd. */
15942 int fd = open (".", O_RDONLY);
15943 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
8690e634 15944
6ec2e0f5
SDJ
15945 ;
15946 return 0;
15947}
8690e634
JK
15948
15949_ACEOF
6ec2e0f5
SDJ
15950if ac_fn_c_try_run "$LINENO"; then :
15951 gl_cv_func_dup_works=yes
15952else
15953 gl_cv_func_dup_works=no
15954fi
15955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15956 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 15957fi
8690e634 15958
8690e634 15959
6ec2e0f5
SDJ
15960fi
15961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
15962$as_echo "$gl_cv_func_dup_works" >&6; }
15963 case "$gl_cv_func_dup_works" in
15964 *yes) ;;
15965 *)
15966 REPLACE_DUP=1
15967 ;;
15968 esac
8690e634 15969
6ec2e0f5 15970 if test $REPLACE_DUP = 1; then
8690e634 15971
8690e634 15972
8690e634 15973
8690e634 15974
8690e634 15975
6ec2e0f5
SDJ
15976
15977
15978
15979 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
15980
15981 :
8690e634
JK
15982 fi
15983
15984
8690e634
JK
15985
15986
15987
6ec2e0f5 15988 GNULIB_DUP=1
8690e634 15989
6ec2e0f5
SDJ
15990
15991
15992
15993
15994$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
15995
15996
15997
15998
15999
16000
16001
16002
16003$as_echo "#define HAVE_DUP2 1" >>confdefs.h
16004
16005
16006 if test $HAVE_DUP2 = 1; then
16007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
16008$as_echo_n "checking whether dup2 works... " >&6; }
d0ac1c44 16009if ${gl_cv_func_dup2_works+:} false; then :
8690e634
JK
16010 $as_echo_n "(cached) " >&6
16011else
16012 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
16013 case "$host_os" in
16014 mingw*) # on this platform, dup2 always returns 0 for success
16015 gl_cv_func_dup2_works="guessing no" ;;
16016 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
16017 gl_cv_func_dup2_works="guessing no" ;;
16018 aix* | freebsd*)
16019 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
16020 # not EBADF.
16021 gl_cv_func_dup2_works="guessing no" ;;
16022 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
16023 gl_cv_func_dup2_works="guessing no" ;;
16024 *-android*) # implemented using dup3(), which fails if oldfd == newfd
16025 gl_cv_func_dup2_works="guessing no" ;;
16026 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
16027 gl_cv_func_dup2_works="guessing no" ;;
16028 *) gl_cv_func_dup2_works="guessing yes" ;;
16029 esac
8690e634
JK
16030else
16031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16032/* end confdefs.h. */
16033
6ec2e0f5
SDJ
16034 #include <errno.h>
16035 #include <fcntl.h>
16036 #include <limits.h>
16037 #include <sys/resource.h>
16038 #include <unistd.h>
16039 #ifndef RLIM_SAVED_CUR
16040 # define RLIM_SAVED_CUR RLIM_INFINITY
16041 #endif
16042 #ifndef RLIM_SAVED_MAX
16043 # define RLIM_SAVED_MAX RLIM_INFINITY
16044 #endif
8690e634
JK
16045
16046int
16047main ()
16048{
6ec2e0f5
SDJ
16049int result = 0;
16050 int bad_fd = INT_MAX;
16051 struct rlimit rlim;
16052 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
16053 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
16054 && rlim.rlim_cur != RLIM_INFINITY
16055 && rlim.rlim_cur != RLIM_SAVED_MAX
16056 && rlim.rlim_cur != RLIM_SAVED_CUR)
16057 bad_fd = rlim.rlim_cur;
16058 #ifdef FD_CLOEXEC
16059 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
16060 result |= 1;
16061 #endif
16062 if (dup2 (1, 1) != 1)
16063 result |= 2;
16064 #ifdef FD_CLOEXEC
16065 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
16066 result |= 4;
16067 #endif
16068 close (0);
16069 if (dup2 (0, 0) != -1)
16070 result |= 8;
16071 /* Many gnulib modules require POSIX conformance of EBADF. */
16072 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
16073 result |= 16;
16074 /* Flush out some cygwin core dumps. */
16075 if (dup2 (2, -1) != -1 || errno != EBADF)
16076 result |= 32;
16077 dup2 (2, 255);
16078 dup2 (2, 256);
16079 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
16080 {
16081 int fd = open (".", O_RDONLY);
16082 if (fd == -1)
16083 result |= 64;
16084 else if (dup2 (fd, fd + 1) == -1)
16085 result |= 128;
16086
16087 close (fd);
16088 }
16089 return result;
8690e634
JK
16090 ;
16091 return 0;
16092}
6ec2e0f5 16093
8690e634
JK
16094_ACEOF
16095if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16096 gl_cv_func_dup2_works=yes
8690e634 16097else
6ec2e0f5 16098 gl_cv_func_dup2_works=no
8690e634
JK
16099fi
16100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16101 conftest.$ac_objext conftest.beam conftest.$ac_ext
16102fi
16103
6ec2e0f5
SDJ
16104
16105fi
16106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
16107$as_echo "$gl_cv_func_dup2_works" >&6; }
16108 case "$gl_cv_func_dup2_works" in
16109 *yes) ;;
16110 *)
16111 REPLACE_DUP2=1
16112 for ac_func in setdtablesize
16113do :
16114 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
d0ac1c44 16115if test "x$ac_cv_func_setdtablesize" = xyes; then :
6ec2e0f5
SDJ
16116 cat >>confdefs.h <<_ACEOF
16117#define HAVE_SETDTABLESIZE 1
16118_ACEOF
16119
16120fi
16121done
16122
16123 ;;
16124 esac
16125 fi
16126
16127
16128
16129
472fa5ee
SM
16130 :
16131
16132
16133
16134
16135
6ec2e0f5
SDJ
16136 if test $ac_cv_func_fchdir = no; then
16137 HAVE_FCHDIR=0
8690e634
JK
16138 fi
16139
6ec2e0f5
SDJ
16140 if test $HAVE_FCHDIR = 0; then
16141 if test $HAVE_DUP2 = 1; then
16142 REPLACE_DUP2=1
16143 fi
16144 fi
8690e634 16145
8690e634 16146
6ec2e0f5 16147 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
8690e634
JK
16148
16149
16150
16151
8690e634 16152
8690e634 16153
6ec2e0f5
SDJ
16154
16155
16156 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
16157
16158
8690e634
JK
16159 fi
16160
8690e634 16161
8690e634 16162
8690e634
JK
16163
16164
6ec2e0f5
SDJ
16165 GNULIB_DUP2=1
16166
16167
16168
16169
16170
16171$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181 GNULIB_ENVIRON=1
16182
16183
16184
16185
16186
16187$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
16188
16189
16190
16191
16192
16193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
16194$as_echo_n "checking for error_at_line... " >&6; }
d0ac1c44 16195if ${ac_cv_lib_error_at_line+:} false; then :
6ec2e0f5 16196 $as_echo_n "(cached) " >&6
8690e634
JK
16197else
16198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16199/* end confdefs.h. */
6ec2e0f5 16200#include <error.h>
8690e634
JK
16201int
16202main ()
16203{
6ec2e0f5 16204error_at_line (0, 0, "", 0, "an error occurred");
8690e634
JK
16205 ;
16206 return 0;
16207}
16208_ACEOF
6ec2e0f5
SDJ
16209if ac_fn_c_try_link "$LINENO"; then :
16210 ac_cv_lib_error_at_line=yes
8690e634 16211else
6ec2e0f5 16212 ac_cv_lib_error_at_line=no
8690e634 16213fi
6ec2e0f5
SDJ
16214rm -f core conftest.err conftest.$ac_objext \
16215 conftest$ac_exeext conftest.$ac_ext
8690e634 16216fi
6ec2e0f5
SDJ
16217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
16218$as_echo "$ac_cv_lib_error_at_line" >&6; }
16219
16220 if test $ac_cv_lib_error_at_line = no; then
16221
16222
16223
16224
16225
16226
16227
16228
16229 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
16230
8690e634
JK
16231
16232
8690e634
JK
16233 :
16234
6ec2e0f5 16235 fi
6a29c58e 16236
6a29c58e 16237
73cc7272
TT
16238 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
16239
16240
16241
16242 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
16243
16244
d0ac1c44
SM
16245
16246
16247
d0ac1c44
SM
16248
16249
472fa5ee 16250 :
6a29c58e
YQ
16251
16252
3d99e817 16253
6ec2e0f5
SDJ
16254
16255
16256 if test $ac_cv_have_decl_fchdir = no; then
16257 HAVE_DECL_FCHDIR=0
16258 fi
16259
16260
16261 if test $HAVE_FCHDIR = 0; then
16262
16263
3d99e817
AK
16264
16265
16266
16267
16268
16269
6ec2e0f5 16270 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
3d99e817 16271
6ec2e0f5 16272 :
3d99e817 16273
6ec2e0f5 16274$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
3d99e817 16275
6ec2e0f5
SDJ
16276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
16277$as_echo_n "checking whether open can visit directories... " >&6; }
d0ac1c44 16278if ${gl_cv_func_open_directory_works+:} false; then :
6ec2e0f5
SDJ
16279 $as_echo_n "(cached) " >&6
16280else
16281 if test "$cross_compiling" = yes; then :
16282 case "$host_os" in
5e8754f9
SDJ
16283 # Guess yes on glibc systems.
16284 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
16285 # If we don't know, assume the worst.
16286 *) gl_cv_func_open_directory_works="guessing no" ;;
6ec2e0f5 16287 esac
3d99e817 16288
6ec2e0f5
SDJ
16289else
16290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16291/* end confdefs.h. */
16292#include <fcntl.h>
3d99e817 16293
6ec2e0f5
SDJ
16294int
16295main ()
16296{
16297return open(".", O_RDONLY) < 0;
16298 ;
16299 return 0;
16300}
3d99e817 16301_ACEOF
6ec2e0f5
SDJ
16302if ac_fn_c_try_run "$LINENO"; then :
16303 gl_cv_func_open_directory_works=yes
16304else
16305 gl_cv_func_open_directory_works=no
16306fi
16307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16308 conftest.$ac_objext conftest.beam conftest.$ac_ext
16309fi
3d99e817
AK
16310
16311fi
6ec2e0f5
SDJ
16312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
16313$as_echo "$gl_cv_func_open_directory_works" >&6; }
16314 case "$gl_cv_func_open_directory_works" in
16315 *yes) ;;
16316 *)
3d99e817 16317
6ec2e0f5 16318$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
3d99e817 16319
6ec2e0f5
SDJ
16320 ;;
16321 esac
16322 fi
3d99e817 16323
3d99e817
AK
16324
16325
16326
0750520d 16327
0750520d 16328
6ec2e0f5 16329 GNULIB_FCHDIR=1
0750520d 16330
0750520d
PA
16331
16332
0750520d 16333
0750520d 16334
6ec2e0f5 16335$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
0750520d 16336
0750520d 16337
0750520d 16338
0750520d 16339
0750520d 16340
0750520d 16341
0750520d 16342
6ec2e0f5 16343
472fa5ee
SM
16344 :
16345
16346
16347
16348
16349
6ec2e0f5
SDJ
16350 if test $ac_cv_func_fcntl = no; then
16351
16352
16353
472fa5ee
SM
16354 :
16355
16356
16357
16358
16359
6ec2e0f5
SDJ
16360 if test $ac_cv_func_fcntl = no; then
16361 HAVE_FCNTL=0
16362 else
16363 REPLACE_FCNTL=1
16364 fi
16365
16366 else
16367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
16368$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
d0ac1c44 16369if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
0750520d 16370 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
16371else
16372 if test "$cross_compiling" = yes; then :
16373 case $host_os in
16374 aix* | cygwin* | haiku*)
16375 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
16376 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
16377 esac
0750520d
PA
16378else
16379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16380/* end confdefs.h. */
6ec2e0f5
SDJ
16381#include <errno.h>
16382 #include <fcntl.h>
16383 #include <limits.h>
16384 #include <sys/resource.h>
16385 #include <unistd.h>
16386 #ifndef RLIM_SAVED_CUR
16387 # define RLIM_SAVED_CUR RLIM_INFINITY
16388 #endif
16389 #ifndef RLIM_SAVED_MAX
16390 # define RLIM_SAVED_MAX RLIM_INFINITY
16391 #endif
0750520d 16392
6ec2e0f5
SDJ
16393int
16394main ()
16395{
16396int result = 0;
16397 int bad_fd = INT_MAX;
16398 struct rlimit rlim;
16399 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
16400 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
16401 && rlim.rlim_cur != RLIM_INFINITY
16402 && rlim.rlim_cur != RLIM_SAVED_MAX
16403 && rlim.rlim_cur != RLIM_SAVED_CUR)
16404 bad_fd = rlim.rlim_cur;
16405 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
16406 if (errno != EINVAL) result |= 2;
16407 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
16408 if (errno != EINVAL) result |= 8;
16409 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
16410 {
16411 int fd;
16412 fd = open (".", O_RDONLY);
16413 if (fd == -1)
16414 result |= 16;
16415 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
16416 result |= 32;
16417
16418 close (fd);
16419 }
16420 return result;
16421 ;
16422 return 0;
16423}
0750520d 16424_ACEOF
6ec2e0f5
SDJ
16425if ac_fn_c_try_run "$LINENO"; then :
16426 gl_cv_func_fcntl_f_dupfd_works=yes
0750520d 16427else
6ec2e0f5
SDJ
16428 gl_cv_func_fcntl_f_dupfd_works=no
16429fi
16430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16431 conftest.$ac_objext conftest.beam conftest.$ac_ext
0750520d 16432fi
0750520d
PA
16433
16434fi
6ec2e0f5
SDJ
16435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
16436$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
16437 case $gl_cv_func_fcntl_f_dupfd_works in
16438 *yes) ;;
16439 *)
0750520d 16440
0750520d 16441
472fa5ee
SM
16442 :
16443
16444
16445
16446
16447
6ec2e0f5
SDJ
16448 if test $ac_cv_func_fcntl = no; then
16449 HAVE_FCNTL=0
16450 else
16451 REPLACE_FCNTL=1
16452 fi
0750520d 16453
0750520d 16454
6ec2e0f5
SDJ
16455$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
16456 ;;
16457 esac
0750520d 16458
6ec2e0f5
SDJ
16459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
16460$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
d0ac1c44 16461if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
8690e634
JK
16462 $as_echo_n "(cached) " >&6
16463else
16464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16465/* end confdefs.h. */
16466
6ec2e0f5
SDJ
16467#include <fcntl.h>
16468#ifndef F_DUPFD_CLOEXEC
16469choke me
16470#endif
49e4877c 16471
6ec2e0f5
SDJ
16472int
16473main ()
16474{
8690e634 16475
6ec2e0f5
SDJ
16476 ;
16477 return 0;
16478}
16479_ACEOF
16480if ac_fn_c_try_compile "$LINENO"; then :
16481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16482/* end confdefs.h. */
8690e634 16483
6ec2e0f5
SDJ
16484#ifdef __linux__
16485/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
16486 it to support the semantics on older kernels that failed with EINVAL. */
16487choke me
16488#endif
8690e634
JK
16489
16490int
16491main ()
16492{
16493
8690e634
JK
16494 ;
16495 return 0;
16496}
16497_ACEOF
16498if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 16499 gl_cv_func_fcntl_f_dupfd_cloexec=yes
8690e634 16500else
6ec2e0f5 16501 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
8690e634
JK
16502fi
16503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
16504else
16505 gl_cv_func_fcntl_f_dupfd_cloexec=no
8690e634 16506fi
6ec2e0f5
SDJ
16507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16508fi
16509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
16510$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
16511 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
16512
16513
16514
472fa5ee
SM
16515 :
16516
16517
16518
16519
16520
6ec2e0f5
SDJ
16521 if test $ac_cv_func_fcntl = no; then
16522 HAVE_FCNTL=0
16523 else
16524 REPLACE_FCNTL=1
16525 fi
16526
16527 fi
16528 fi
16529
16530
16531
16532
472fa5ee
SM
16533 :
16534
16535
16536
16537
16538
6ec2e0f5
SDJ
16539 if test $ac_cv_func_fchdir = no; then
16540 HAVE_FCHDIR=0
16541 fi
16542
16543 if test $HAVE_FCHDIR = 0; then
16544
16545
16546
472fa5ee
SM
16547 :
16548
16549
16550
16551
16552
6ec2e0f5
SDJ
16553 if test $ac_cv_func_fcntl = no; then
16554 HAVE_FCNTL=0
16555 else
16556 REPLACE_FCNTL=1
16557 fi
16558
16559 fi
16560
16561
16562 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
16563
16564
16565
16566
16567
16568
16569
16570
16571 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
16572
16573 fi
8690e634 16574
8690e634
JK
16575
16576
8690e634
JK
16577
16578
6ec2e0f5 16579 GNULIB_FCNTL=1
8690e634 16580
8690e634
JK
16581
16582
8690e634 16583
8690e634 16584
6ec2e0f5
SDJ
16585$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
16586
8690e634 16587
8690e634 16588
63ce7108
TT
16589
16590
16591
16592
8690e634
JK
16593
16594
16595
16596
16597
16598
16599
16600 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 16601 gl_cv_next_fcntl_h='<'fcntl.h'>'
8690e634 16602 else
6ec2e0f5
SDJ
16603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
16604$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
d0ac1c44 16605if ${gl_cv_next_fcntl_h+:} false; then :
8690e634
JK
16606 $as_echo_n "(cached) " >&6
16607else
16608
4a626d0a
PA
16609
16610
16611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 16612/* end confdefs.h. */
6ec2e0f5 16613#include <fcntl.h>
8690e634 16614_ACEOF
4a626d0a
PA
16615 case "$host_os" in
16616 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16617 *) gl_absname_cpp="$ac_cpp" ;;
16618 esac
16619
16620 case "$host_os" in
16621 mingw*)
16622 gl_dirsep_regex='[/\\]'
16623 ;;
16624 *)
16625 gl_dirsep_regex='\/'
16626 ;;
16627 esac
16628 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 16629 gl_header_literal_regex=`echo 'fcntl.h' \
4a626d0a
PA
16630 | sed -e "$gl_make_literal_regex_sed"`
16631 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16632 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16633 s|^/[^/]|//&|
16634 p
16635 q
16636 }'
8690e634 16637
6ec2e0f5 16638 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 16639 sed -n "$gl_absolute_header_sed"`
c971b7fa 16640
6ec2e0f5
SDJ
16641 gl_header=$gl_cv_absolute_fcntl_h
16642 gl_cv_next_fcntl_h='"'$gl_header'"'
8690e634
JK
16643
16644
16645fi
6ec2e0f5
SDJ
16646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
16647$as_echo "$gl_cv_next_fcntl_h" >&6; }
8690e634 16648 fi
6ec2e0f5 16649 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
8690e634
JK
16650
16651 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16652 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 16653 gl_next_as_first_directive='<'fcntl.h'>'
8690e634
JK
16654 else
16655 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 16656 gl_next_as_first_directive=$gl_cv_next_fcntl_h
8690e634 16657 fi
6ec2e0f5 16658 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
8690e634
JK
16659
16660
16661
16662
16663
16664
6ec2e0f5
SDJ
16665
16666
16667
16668
5e8754f9
SDJ
16669 for gl_func in fcntl openat; do
16670 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16672$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16673if eval \${$as_gl_Symbol+:} false; then :
16674 $as_echo_n "(cached) " >&6
16675else
16676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16677/* end confdefs.h. */
16678#include <fcntl.h>
8690e634 16679
5e8754f9
SDJ
16680int
16681main ()
16682{
16683#undef $gl_func
16684 (void) $gl_func;
16685 ;
16686 return 0;
16687}
16688_ACEOF
16689if ac_fn_c_try_compile "$LINENO"; then :
16690 eval "$as_gl_Symbol=yes"
16691else
16692 eval "$as_gl_Symbol=no"
16693fi
16694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16695fi
16696eval ac_res=\$$as_gl_Symbol
16697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16698$as_echo "$ac_res" >&6; }
16699 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
16700 cat >>confdefs.h <<_ACEOF
16701#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7a6dbc2f 16702_ACEOF
8690e634 16703
5e8754f9
SDJ
16704 eval ac_cv_have_decl_$gl_func=yes
16705fi
16706 done
16707
8690e634
JK
16708
16709
8839a007 16710
63ce7108 16711
63ce7108 16712
63ce7108 16713
6ec2e0f5
SDJ
16714 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
16715#include <dirent.h>
16716
16717"
d0ac1c44 16718if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
6ec2e0f5
SDJ
16719 ac_have_decl=1
16720else
16721 ac_have_decl=0
16722fi
16723
16724cat >>confdefs.h <<_ACEOF
16725#define HAVE_DECL_FDOPENDIR $ac_have_decl
63ce7108 16726_ACEOF
6ec2e0f5
SDJ
16727if test $ac_have_decl = 1; then :
16728
63ce7108 16729else
6ec2e0f5 16730 HAVE_DECL_FDOPENDIR=0
63ce7108 16731fi
63ce7108
TT
16732
16733
472fa5ee
SM
16734 :
16735
16736
16737
16738
16739
6ec2e0f5
SDJ
16740 if test $ac_cv_func_fdopendir = no; then
16741 HAVE_FDOPENDIR=0
16742 else
16743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
16744$as_echo_n "checking whether fdopendir works... " >&6; }
d0ac1c44 16745if ${gl_cv_func_fdopendir_works+:} false; then :
6ec2e0f5
SDJ
16746 $as_echo_n "(cached) " >&6
16747else
16748 if test "$cross_compiling" = yes; then :
16749 case "$host_os" in
16750 # Guess yes on glibc systems.
16751 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
16752 # If we don't know, assume the worst.
16753 *) gl_cv_func_fdopendir_works="guessing no" ;;
16754 esac
16755
63ce7108
TT
16756else
16757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16758/* end confdefs.h. */
16759
6ec2e0f5
SDJ
16760#include <dirent.h>
16761#include <fcntl.h>
16762#include <unistd.h>
16763#if !HAVE_DECL_FDOPENDIR
16764extern
16765# ifdef __cplusplus
16766"C"
16767# endif
16768DIR *fdopendir (int);
16769#endif
63ce7108
TT
16770
16771int
16772main ()
16773{
6ec2e0f5
SDJ
16774int result = 0;
16775 int fd = open ("conftest.c", O_RDONLY);
16776 if (fd < 0) result |= 1;
16777 if (fdopendir (fd)) result |= 2;
16778 if (close (fd)) result |= 4;
16779 return result;
63ce7108
TT
16780 ;
16781 return 0;
16782}
16783_ACEOF
16784if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16785 gl_cv_func_fdopendir_works=yes
63ce7108 16786else
6ec2e0f5 16787 gl_cv_func_fdopendir_works=no
63ce7108
TT
16788fi
16789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16790 conftest.$ac_objext conftest.beam conftest.$ac_ext
16791fi
16792
63ce7108 16793fi
6ec2e0f5
SDJ
16794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
16795$as_echo "$gl_cv_func_fdopendir_works" >&6; }
16796 case "$gl_cv_func_fdopendir_works" in
63ce7108
TT
16797 *yes) ;;
16798 *)
6ec2e0f5 16799 REPLACE_FDOPENDIR=1
63ce7108
TT
16800 ;;
16801 esac
16802 fi
16803
6ec2e0f5 16804 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
09607c9e
TT
16805
16806
16807
4a626d0a
PA
16808
16809
16810
16811
16812
6ec2e0f5 16813 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
4a626d0a 16814
6ec2e0f5 16815 fi
4a626d0a
PA
16816
16817
16818
4a626d0a 16819
4a626d0a 16820
6ec2e0f5 16821 GNULIB_FDOPENDIR=1
4a626d0a
PA
16822
16823
16824
16825
16826
6ec2e0f5 16827$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
4a626d0a
PA
16828
16829
16830
16831
16832
6ec2e0f5
SDJ
16833cat >>confdefs.h <<_ACEOF
16834#define GNULIB_FDOPENDIR 1
16835_ACEOF
4a626d0a 16836
09607c9e 16837
09607c9e
TT
16838
16839
472fa5ee
SM
16840 :
16841
16842
16843
16844
16845
09607c9e 16846
6ec2e0f5
SDJ
16847
16848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
16849$as_echo_n "checking for flexible array member... " >&6; }
d0ac1c44 16850if ${ac_cv_c_flexmember+:} false; then :
09607c9e
TT
16851 $as_echo_n "(cached) " >&6
16852else
16853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16854/* end confdefs.h. */
6ec2e0f5
SDJ
16855#include <stdlib.h>
16856 #include <stdio.h>
16857 #include <stddef.h>
5e8754f9 16858 struct s { int n; double d[]; };
09607c9e
TT
16859int
16860main ()
16861{
6ec2e0f5
SDJ
16862int m = getchar ();
16863 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
16864 nbytes += sizeof (struct s) - 1;
16865 nbytes -= nbytes % sizeof (struct s);
16866 struct s *p = malloc (nbytes);
16867 p->d[0] = 0.0;
16868 return p->d != (double *) NULL;
09607c9e
TT
16869 ;
16870 return 0;
16871}
16872_ACEOF
16873if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 16874 ac_cv_c_flexmember=yes
09607c9e 16875else
6ec2e0f5 16876 ac_cv_c_flexmember=no
09607c9e
TT
16877fi
16878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16879fi
6ec2e0f5
SDJ
16880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
16881$as_echo "$ac_cv_c_flexmember" >&6; }
16882 if test $ac_cv_c_flexmember = yes; then
16883
16884$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
09607c9e 16885
09607c9e 16886 else
6ec2e0f5 16887 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
09607c9e 16888
6ec2e0f5
SDJ
16889 fi
16890
16891
16892
16893
16894 FLOAT_H=
16895 REPLACE_FLOAT_LDBL=0
16896 case "$host_os" in
16897 aix* | beos* | openbsd* | mirbsd* | irix*)
16898 FLOAT_H=float.h
16899 ;;
5e8754f9 16900 freebsd*)
6ec2e0f5
SDJ
16901 case "$host_cpu" in
16902 i[34567]86 )
16903 FLOAT_H=float.h
16904 ;;
16905 x86_64 )
16906 # On x86_64 systems, the C compiler may still be generating
16907 # 32-bit code.
16908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16909/* end confdefs.h. */
16910#if defined __LP64__ || defined __x86_64__ || defined __amd64__
5e8754f9
SDJ
16911 yes
16912 #endif
09607c9e 16913_ACEOF
5e8754f9
SDJ
16914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16915 $EGREP "yes" >/dev/null 2>&1; then :
6ec2e0f5 16916
09607c9e 16917else
6ec2e0f5 16918 FLOAT_H=float.h
09607c9e 16919fi
5e8754f9
SDJ
16920rm -f conftest*
16921
6ec2e0f5
SDJ
16922 ;;
16923 esac
16924 ;;
16925 linux*)
16926 case "$host_cpu" in
16927 powerpc*)
16928 FLOAT_H=float.h
16929 ;;
16930 esac
16931 ;;
16932 esac
16933 case "$host_os" in
5e8754f9 16934 aix* | freebsd* | linux*)
6ec2e0f5
SDJ
16935 if test -n "$FLOAT_H"; then
16936 REPLACE_FLOAT_LDBL=1
16937 fi
16938 ;;
16939 esac
16940
16941 REPLACE_ITOLD=0
16942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
16943$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
d0ac1c44 16944if ${gl_cv_func_itold_works+:} false; then :
09607c9e
TT
16945 $as_echo_n "(cached) " >&6
16946else
09607c9e 16947
6ec2e0f5
SDJ
16948 if test "$cross_compiling" = yes; then :
16949 case "$host" in
16950 sparc*-*-linux*)
16951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16952/* end confdefs.h. */
16953#if defined __LP64__ || defined __arch64__
5e8754f9
SDJ
16954 yes
16955 #endif
09607c9e 16956_ACEOF
5e8754f9
SDJ
16957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16958 $EGREP "yes" >/dev/null 2>&1; then :
6ec2e0f5 16959 gl_cv_func_itold_works="guessing no"
09607c9e 16960else
6ec2e0f5 16961 gl_cv_func_itold_works="guessing yes"
09607c9e 16962fi
5e8754f9
SDJ
16963rm -f conftest*
16964
6ec2e0f5 16965 ;;
5e8754f9 16966 *) gl_cv_func_itold_works="guessing yes" ;;
6ec2e0f5
SDJ
16967 esac
16968
4a626d0a
PA
16969else
16970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16971/* end confdefs.h. */
4a626d0a 16972
6ec2e0f5
SDJ
16973int i = -1;
16974volatile long double ld;
16975int main ()
4a626d0a 16976{
6ec2e0f5
SDJ
16977 ld += i * 1.0L;
16978 if (ld > 0)
16979 return 1;
4a626d0a
PA
16980 return 0;
16981}
16982_ACEOF
6ec2e0f5
SDJ
16983if ac_fn_c_try_run "$LINENO"; then :
16984 gl_cv_func_itold_works=yes
4a626d0a 16985else
6ec2e0f5
SDJ
16986 gl_cv_func_itold_works=no
16987fi
16988rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16989 conftest.$ac_objext conftest.beam conftest.$ac_ext
16990fi
09607c9e
TT
16991
16992
6ec2e0f5
SDJ
16993fi
16994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
16995$as_echo "$gl_cv_func_itold_works" >&6; }
16996 case "$gl_cv_func_itold_works" in
16997 *no)
16998 REPLACE_ITOLD=1
16999 FLOAT_H=float.h
17000 ;;
17001 esac
09607c9e 17002
6ec2e0f5 17003 if test -n "$FLOAT_H"; then
09607c9e
TT
17004
17005
17006
17007
17008
17009
17010
4a626d0a 17011
09607c9e 17012 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 17013 gl_cv_next_float_h='<'float.h'>'
09607c9e 17014 else
6ec2e0f5
SDJ
17015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
17016$as_echo_n "checking absolute name of <float.h>... " >&6; }
d0ac1c44 17017if ${gl_cv_next_float_h+:} false; then :
09607c9e
TT
17018 $as_echo_n "(cached) " >&6
17019else
17020
4a626d0a
PA
17021
17022
17023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e 17024/* end confdefs.h. */
6ec2e0f5 17025#include <float.h>
09607c9e 17026_ACEOF
4a626d0a
PA
17027 case "$host_os" in
17028 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17029 *) gl_absname_cpp="$ac_cpp" ;;
17030 esac
17031
17032 case "$host_os" in
17033 mingw*)
17034 gl_dirsep_regex='[/\\]'
17035 ;;
17036 *)
17037 gl_dirsep_regex='\/'
17038 ;;
17039 esac
17040 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 17041 gl_header_literal_regex=`echo 'float.h' \
4a626d0a
PA
17042 | sed -e "$gl_make_literal_regex_sed"`
17043 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17044 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17045 s|^/[^/]|//&|
17046 p
17047 q
17048 }'
09607c9e 17049
6ec2e0f5 17050 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 17051 sed -n "$gl_absolute_header_sed"`
09607c9e 17052
6ec2e0f5
SDJ
17053 gl_header=$gl_cv_absolute_float_h
17054 gl_cv_next_float_h='"'$gl_header'"'
09607c9e
TT
17055
17056
17057fi
6ec2e0f5
SDJ
17058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
17059$as_echo "$gl_cv_next_float_h" >&6; }
09607c9e 17060 fi
6ec2e0f5 17061 NEXT_FLOAT_H=$gl_cv_next_float_h
09607c9e
TT
17062
17063 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17064 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 17065 gl_next_as_first_directive='<'float.h'>'
09607c9e
TT
17066 else
17067 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 17068 gl_next_as_first_directive=$gl_cv_next_float_h
09607c9e 17069 fi
6ec2e0f5 17070 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
09607c9e
TT
17071
17072
17073
17074
6ec2e0f5 17075 fi
09607c9e 17076
6ec2e0f5
SDJ
17077 if test -n "$FLOAT_H"; then
17078 GL_GENERATE_FLOAT_H_TRUE=
17079 GL_GENERATE_FLOAT_H_FALSE='#'
3d99e817 17080else
6ec2e0f5
SDJ
17081 GL_GENERATE_FLOAT_H_TRUE='#'
17082 GL_GENERATE_FLOAT_H_FALSE=
3d99e817
AK
17083fi
17084
3d99e817 17085
09607c9e 17086
6ec2e0f5 17087 if test $REPLACE_FLOAT_LDBL = 1; then
8690e634 17088
8690e634 17089
8690e634 17090
8690e634 17091
8690e634 17092
6ec2e0f5
SDJ
17093
17094
17095
17096 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
17097
8690e634 17098 fi
6ec2e0f5 17099 if test $REPLACE_ITOLD = 1; then
8690e634
JK
17100
17101
17102
17103
17104
6ec2e0f5
SDJ
17105
17106
17107
17108 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
17109
8690e634
JK
17110 fi
17111
17112
17113
6ec2e0f5 17114
5e8754f9
SDJ
17115
17116 FNMATCH_H=
6ec2e0f5
SDJ
17117 gl_fnmatch_required_lowercase=`
17118 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
17119 `
5e8754f9
SDJ
17120 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
17121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
6ec2e0f5 17122$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
d0ac1c44 17123if eval \${$gl_fnmatch_cache_var+:} false; then :
8690e634 17124 $as_echo_n "(cached) " >&6
6ec2e0f5 17125else
5e8754f9
SDJ
17126 if test $gl_fnmatch_required = GNU; then
17127 gl_fnmatch_gnu_start=
17128 gl_fnmatch_gnu_end=
17129 else
17130 gl_fnmatch_gnu_start='#if 0'
17131 gl_fnmatch_gnu_end='#endif'
17132 fi
17133 if test "$cross_compiling" = yes; then :
6ec2e0f5 17134 eval "$gl_fnmatch_cache_var=\"guessing no\""
8690e634
JK
17135else
17136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17137/* end confdefs.h. */
6ec2e0f5 17138#include <fnmatch.h>
5e8754f9
SDJ
17139 static int
17140 y (char const *pattern, char const *string, int flags)
17141 {
17142 return fnmatch (pattern, string, flags) == 0;
17143 }
17144 static int
17145 n (char const *pattern, char const *string, int flags)
17146 {
17147 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
17148 }
8690e634 17149
8690e634
JK
17150int
17151main ()
17152{
6ec2e0f5 17153char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
5e8754f9
SDJ
17154 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
17155 static char const A_1[] = { 'A' - 1, 0 };
17156 static char const A01[] = { 'A' + 1, 0 };
17157 static char const a_1[] = { 'a' - 1, 0 };
17158 static char const a01[] = { 'a' + 1, 0 };
17159 static char const bs_1[] = { '\\\\' - 1, 0 };
17160 static char const bs01[] = { '\\\\' + 1, 0 };
17161 int result = 0;
17162 if (!n ("a*", "", 0))
17163 return 1;
17164 if (!y ("a*", "abc", 0))
17165 return 1;
17166 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
17167 return 1;
17168 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
17169 return 2;
17170 if (!y ("a\\\\bc", "abc", 0))
17171 return 3;
17172 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
17173 return 3;
17174 if (!y ("*x", ".x", 0))
17175 return 4;
17176 if (!n ("*x", ".x", FNM_PERIOD))
17177 return 4;
17178 if (!y (Apat, "\\\\", 0))
17179 return 5;
17180 if (!y (Apat, "A", 0))
17181 return 5;
17182 if (!y (apat, "\\\\", 0))
17183 return 5;
17184 if (!y (apat, "a", 0))
17185 return 5;
17186 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
17187 return 5;
17188 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
17189 return 5;
17190 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
17191 return 5;
17192 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
17193 return 5;
17194 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
17195 return 5;
17196 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
17197 return 5;
17198 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
17199 return 5;
17200 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
17201 return 5;
17202 $gl_fnmatch_gnu_start
17203 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
17204 result |= 8;
17205 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
17206 result |= 16;
17207 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
17208 result |= 32;
17209 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
17210 result |= 64;
17211 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
17212 result |= 64;
17213 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
17214 result |= 64;
17215 $gl_fnmatch_gnu_end
17216 return result;
8690e634
JK
17217
17218 ;
17219 return 0;
17220}
17221_ACEOF
6ec2e0f5
SDJ
17222if ac_fn_c_try_run "$LINENO"; then :
17223 eval "$gl_fnmatch_cache_var=yes"
8690e634 17224else
6ec2e0f5 17225 eval "$gl_fnmatch_cache_var=no"
8690e634 17226fi
6ec2e0f5
SDJ
17227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17228 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 17229fi
8690e634 17230
8690e634 17231
6ec2e0f5
SDJ
17232fi
17233eval ac_res=\$$gl_fnmatch_cache_var
17234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17235$as_echo "$ac_res" >&6; }
5e8754f9
SDJ
17236 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
17237 if test "$gl_fnmatch_result" = yes; then
17238 rm -f "$gl_source_base/fnmatch.h"
17239 else
17240 FNMATCH_H=fnmatch.h
8690e634
JK
17241 fi
17242
6ec2e0f5
SDJ
17243 if test -n "$FNMATCH_H"; then
17244 GL_GENERATE_FNMATCH_H_TRUE=
17245 GL_GENERATE_FNMATCH_H_FALSE='#'
17246else
17247 GL_GENERATE_FNMATCH_H_TRUE='#'
17248 GL_GENERATE_FNMATCH_H_FALSE=
17249fi
8690e634 17250
8690e634 17251
5e8754f9 17252 if test -n "$FNMATCH_H"; then
8690e634 17253
6ec2e0f5
SDJ
17254
17255
17256
17257
17258
6ec2e0f5
SDJ
17259
17260
7a6dbc2f 17261 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
6ec2e0f5 17262
6ec2e0f5
SDJ
17263
17264
5e8754f9
SDJ
17265cat >>confdefs.h <<_ACEOF
17266#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
17267_ACEOF
17268
17269
6ec2e0f5
SDJ
17270 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
17271"
d0ac1c44 17272if test "x$ac_cv_have_decl_isblank" = xyes; then :
6ec2e0f5 17273 ac_have_decl=1
8690e634 17274else
6ec2e0f5 17275 ac_have_decl=0
8690e634
JK
17276fi
17277
6ec2e0f5
SDJ
17278cat >>confdefs.h <<_ACEOF
17279#define HAVE_DECL_ISBLANK $ac_have_decl
17280_ACEOF
8690e634
JK
17281
17282
472fa5ee
SM
17283 :
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311 :
17312
17313
17314
17315
8690e634
JK
17316
17317
6ec2e0f5 17318 fi
8690e634
JK
17319
17320
17321
17322
17323
5e8754f9
SDJ
17324 if test -n "$FNMATCH_H"; then
17325
17326
17327
17328
472fa5ee
SM
17329
17330
17331
17332
5e8754f9 17333 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
472fa5ee
SM
17334
17335
17336
5e8754f9
SDJ
17337cat >>confdefs.h <<_ACEOF
17338#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
17339_ACEOF
472fa5ee
SM
17340
17341
5e8754f9
SDJ
17342 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
17343"
17344if test "x$ac_cv_have_decl_isblank" = xyes; then :
17345 ac_have_decl=1
17346else
17347 ac_have_decl=0
17348fi
472fa5ee 17349
5e8754f9
SDJ
17350cat >>confdefs.h <<_ACEOF
17351#define HAVE_DECL_ISBLANK $ac_have_decl
17352_ACEOF
472fa5ee
SM
17353
17354
5e8754f9 17355 :
472fa5ee
SM
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
98399780 17367
5e8754f9
SDJ
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383 :
17384
17385
17386
17387
17388
17389
17390 fi
17391
17392
17393
17394 FREXP_LIBM=
17395 if test $gl_cv_func_frexp_no_libm = no; then
17396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
17397$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
17398if ${gl_cv_func_frexp_in_libm+:} false; then :
17399 $as_echo_n "(cached) " >&6
6ec2e0f5 17400else
98399780 17401
5e8754f9
SDJ
17402 save_LIBS="$LIBS"
17403 LIBS="$LIBS -lm"
17404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17405/* end confdefs.h. */
17406#include <math.h>
17407 double x;
17408int
17409main ()
17410{
17411int e; return frexp (x, &e) > 0;
17412 ;
17413 return 0;
17414}
7a6dbc2f 17415_ACEOF
5e8754f9
SDJ
17416if ac_fn_c_try_link "$LINENO"; then :
17417 gl_cv_func_frexp_in_libm=yes
17418else
17419 gl_cv_func_frexp_in_libm=no
17420fi
17421rm -f core conftest.err conftest.$ac_objext \
17422 conftest$ac_exeext conftest.$ac_ext
17423 LIBS="$save_LIBS"
17424
17425fi
17426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
17427$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
17428 if test $gl_cv_func_frexp_in_libm = yes; then
17429 FREXP_LIBM=-lm
17430 fi
17431 fi
17432 if test $gl_cv_func_frexp_no_libm = yes \
17433 || test $gl_cv_func_frexp_in_libm = yes; then
17434 save_LIBS="$LIBS"
17435 LIBS="$LIBS $FREXP_LIBM"
17436
98399780
YQ
17437
17438
472fa5ee
SM
17439 :
17440
17441
17442
17443
17444
5e8754f9
SDJ
17445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
17446$as_echo_n "checking whether frexp works... " >&6; }
17447if ${gl_cv_func_frexp_works+:} false; then :
17448 $as_echo_n "(cached) " >&6
17449else
17450
17451 if test "$cross_compiling" = yes; then :
17452 case "$host_os" in
17453 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
17454 *) gl_cv_func_frexp_works="guessing yes";;
17455 esac
17456
17457else
17458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17459/* end confdefs.h. */
17460
17461#include <float.h>
17462#include <math.h>
17463#include <string.h>
17464#if HAVE_DECL_ALARM
17465# include <signal.h>
17466# include <unistd.h>
17467#endif
17468/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
17469 ICC 10.0 has a bug when optimizing the expression -zero.
17470 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
17471 to PowerPC on Mac OS X 10.5. */
17472#if defined __hpux || defined __sgi || defined __ICC
17473static double
17474compute_minus_zero (void)
17475{
17476 return -DBL_MIN * DBL_MIN;
17477}
17478# define minus_zero compute_minus_zero ()
17479#else
17480double minus_zero = -0.0;
17481#endif
17482int main()
17483{
17484 int result = 0;
17485 int i;
17486 volatile double x;
17487 double zero = 0.0;
17488#if HAVE_DECL_ALARM
17489 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
17490 number. Let the test fail in this case. */
17491 signal (SIGALRM, SIG_DFL);
17492 alarm (5);
17493#endif
17494 /* Test on denormalized numbers. */
17495 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
17496 ;
17497 if (x > 0.0)
17498 {
17499 int exp;
17500 double y = frexp (x, &exp);
17501 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
17502 On NetBSD: y = 0.75. Correct: y = 0.5. */
17503 if (y != 0.5)
17504 result |= 1;
17505 }
17506 /* Test on infinite numbers. */
17507 x = 1.0 / zero;
17508 {
17509 int exp;
17510 double y = frexp (x, &exp);
17511 if (y != x)
17512 result |= 2;
17513 }
17514 /* Test on negative zero. */
17515 x = minus_zero;
17516 {
17517 int exp;
17518 double y = frexp (x, &exp);
17519 if (memcmp (&y, &x, sizeof x))
17520 result |= 4;
17521 }
17522 return result;
17523}
17524_ACEOF
17525if ac_fn_c_try_run "$LINENO"; then :
17526 gl_cv_func_frexp_works=yes
17527else
17528 gl_cv_func_frexp_works=no
17529fi
17530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17531 conftest.$ac_objext conftest.beam conftest.$ac_ext
17532fi
17533
98399780 17534
5e8754f9
SDJ
17535fi
17536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
17537$as_echo "$gl_cv_func_frexp_works" >&6; }
98399780 17538
5e8754f9
SDJ
17539 LIBS="$save_LIBS"
17540 case "$gl_cv_func_frexp_works" in
17541 *yes) gl_func_frexp=yes ;;
17542 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
17543 esac
17544 else
17545 gl_func_frexp=no
17546 fi
17547 if test $gl_func_frexp = yes; then
98399780 17548
5e8754f9 17549$as_echo "#define HAVE_FREXP 1" >>confdefs.h
98399780 17550
5e8754f9 17551 fi
98399780
YQ
17552
17553
5e8754f9 17554 if test $gl_func_frexp != yes; then
6a29c58e
YQ
17555
17556
17557
17558
6a29c58e
YQ
17559
17560
17561
17562
5e8754f9 17563 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
8690e634 17564
5e8754f9 17565 fi
8690e634 17566
8690e634 17567
8690e634 17568
8690e634 17569
8690e634 17570
5e8754f9 17571 GNULIB_FREXP=1
8690e634 17572
8690e634 17573
4a626d0a 17574
8690e634 17575
8690e634 17576
5e8754f9 17577$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
8690e634
JK
17578
17579
17580
17581
17582
63ce7108 17583
e26b6bb0
TT
17584
17585
17586
5e8754f9
SDJ
17587 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
17588"
17589if test "x$ac_cv_have_decl_frexpl" = xyes; then :
e26b6bb0 17590
5e8754f9
SDJ
17591else
17592 HAVE_DECL_FREXPL=0
17593fi
e26b6bb0
TT
17594
17595
5e8754f9
SDJ
17596 FREXPL_LIBM=
17597 if test $HAVE_DECL_FREXPL = 1; then
e26b6bb0 17598
5e8754f9
SDJ
17599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
17600$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
17601if ${gl_cv_func_frexpl_no_libm+:} false; then :
17602 $as_echo_n "(cached) " >&6
17603else
e26b6bb0 17604
5e8754f9
SDJ
17605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17606/* end confdefs.h. */
17607#include <math.h>
17608 long double x;
17609int
17610main ()
17611{
17612int e; return frexpl (x, &e) > 0;
17613 ;
17614 return 0;
17615}
17616_ACEOF
17617if ac_fn_c_try_link "$LINENO"; then :
17618 gl_cv_func_frexpl_no_libm=yes
17619else
17620 gl_cv_func_frexpl_no_libm=no
17621fi
17622rm -f core conftest.err conftest.$ac_objext \
17623 conftest$ac_exeext conftest.$ac_ext
e26b6bb0 17624
5e8754f9
SDJ
17625fi
17626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
17627$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
e26b6bb0 17628
5e8754f9
SDJ
17629 if test $gl_cv_func_frexpl_no_libm = no; then
17630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
17631$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
17632if ${gl_cv_func_frexpl_in_libm+:} false; then :
17633 $as_echo_n "(cached) " >&6
17634else
e26b6bb0 17635
5e8754f9
SDJ
17636 save_LIBS="$LIBS"
17637 LIBS="$LIBS -lm"
17638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17639/* end confdefs.h. */
17640#include <math.h>
17641 long double x;
17642int
17643main ()
17644{
17645int e; return frexpl (x, &e) > 0;
17646 ;
17647 return 0;
17648}
17649_ACEOF
17650if ac_fn_c_try_link "$LINENO"; then :
17651 gl_cv_func_frexpl_in_libm=yes
17652else
17653 gl_cv_func_frexpl_in_libm=no
17654fi
17655rm -f core conftest.err conftest.$ac_objext \
17656 conftest$ac_exeext conftest.$ac_ext
17657 LIBS="$save_LIBS"
e26b6bb0 17658
5e8754f9
SDJ
17659fi
17660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
17661$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
17662 if test $gl_cv_func_frexpl_in_libm = yes; then
17663 FREXPL_LIBM=-lm
17664 fi
17665 fi
17666 if test $gl_cv_func_frexpl_no_libm = yes \
17667 || test $gl_cv_func_frexpl_in_libm = yes; then
17668 save_LIBS="$LIBS"
17669 LIBS="$LIBS $FREXPL_LIBM"
18848e28 17670
18848e28 17671
5e8754f9
SDJ
17672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
17673$as_echo_n "checking whether frexpl works... " >&6; }
17674if ${gl_cv_func_frexpl_works+:} false; then :
17675 $as_echo_n "(cached) " >&6
17676else
18848e28 17677
5e8754f9 17678 if test "$cross_compiling" = yes; then :
18848e28 17679
5e8754f9
SDJ
17680 case "$host_os" in
17681 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
17682 gl_cv_func_frexpl_works="guessing no";;
17683 *) gl_cv_func_frexpl_works="guessing yes";;
17684 esac
18848e28 17685
5e8754f9
SDJ
17686else
17687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17688/* end confdefs.h. */
18848e28 17689
5e8754f9
SDJ
17690#include <float.h>
17691#include <math.h>
17692/* Override the values of <float.h>, like done in float.in.h. */
17693#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
17694# undef LDBL_MIN_EXP
17695# define LDBL_MIN_EXP (-16381)
17696#endif
17697#if defined __i386__ && defined __FreeBSD__
17698# undef LDBL_MIN_EXP
17699# define LDBL_MIN_EXP (-16381)
17700#endif
17701#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
17702# undef LDBL_MIN_EXP
17703# define LDBL_MIN_EXP DBL_MIN_EXP
17704#endif
17705#if defined __sgi && (LDBL_MANT_DIG >= 106)
17706# if defined __GNUC__
17707# undef LDBL_MIN_EXP
17708# define LDBL_MIN_EXP DBL_MIN_EXP
17709# endif
17710#endif
17711extern
17712#ifdef __cplusplus
17713"C"
17714#endif
17715long double frexpl (long double, int *);
17716int main()
17717{
17718 int result = 0;
17719 volatile long double x;
17720 /* Test on finite numbers that fails on AIX 5.1. */
17721 x = 16.0L;
17722 {
17723 int exp = -9999;
17724 frexpl (x, &exp);
17725 if (exp != 5)
17726 result |= 1;
17727 }
17728 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
17729 function returns an invalid (incorrectly normalized) value: it returns
17730 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
17731 but the correct result is
17732 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
17733 x = 1.01L;
17734 {
17735 int exp = -9999;
17736 long double y = frexpl (x, &exp);
17737 if (!(exp == 1 && y == 0.505L))
17738 result |= 2;
17739 }
17740 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
17741 LDBL_MAX_EXP = 16384.
17742 In the loop end test, we test x against Infinity, rather than comparing
17743 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
17744 {
17745 int i;
17746 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
17747 {
17748 int exp = -9999;
17749 frexpl (x, &exp);
17750 if (exp != i)
17751 {
17752 result |= 4;
17753 break;
17754 }
17755 }
17756 }
17757 /* Test on denormalized numbers. */
17758 {
17759 int i;
17760 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
17761 ;
17762 if (x > 0.0L)
17763 {
17764 int exp;
17765 long double y = frexpl (x, &exp);
17766 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
17767 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
17768 if (exp != LDBL_MIN_EXP - 1)
17769 result |= 8;
17770 }
17771 }
17772 /* Test on infinite numbers. */
17773 x = 1.0L / 0.0L;
17774 {
17775 int exp;
17776 long double y = frexpl (x, &exp);
17777 if (y != x)
17778 result |= 16;
17779 }
17780 return result;
17781}
17782_ACEOF
17783if ac_fn_c_try_run "$LINENO"; then :
17784 gl_cv_func_frexpl_works=yes
17785else
17786 gl_cv_func_frexpl_works=no
17787fi
17788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17789 conftest.$ac_objext conftest.beam conftest.$ac_ext
17790fi
18848e28
GF
17791
17792
5e8754f9
SDJ
17793fi
17794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
17795$as_echo "$gl_cv_func_frexpl_works" >&6; }
18848e28 17796
5e8754f9
SDJ
17797 LIBS="$save_LIBS"
17798 case "$gl_cv_func_frexpl_works" in
17799 *yes) gl_func_frexpl=yes ;;
17800 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
17801 esac
17802 else
17803 gl_func_frexpl=no
17804 fi
17805 if test $gl_func_frexpl = yes; then
18848e28 17806
5e8754f9 17807$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
18848e28 17808
5e8754f9
SDJ
17809 fi
17810 fi
17811 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
17812 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
18848e28 17813
5e8754f9
SDJ
17814 FREXPL_LIBM="$FREXP_LIBM"
17815 else
17816 FREXPL_LIBM=
17817 fi
17818 fi
18848e28 17819
18848e28 17820
6ec2e0f5 17821 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
18848e28 17822
18848e28 17823
18848e28 17824
18848e28
GF
17825
17826
18848e28 17827
18848e28 17828
18848e28 17829
6ec2e0f5 17830 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
18848e28
GF
17831
17832 fi
17833
17834
17835
17836
17837
6ec2e0f5 17838 GNULIB_FREXPL=1
18848e28
GF
17839
17840
17841
17842
17843
6ec2e0f5 17844$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
18848e28
GF
17845
17846
17847
17848
17849
17850
17851
5e8754f9
SDJ
17852 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17853 REPLACE_FSTAT=1
17854 fi
17855
17856
17857 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
17858 REPLACE_FSTAT=1
17859 fi
18848e28 17860
6a29c58e 17861
6a29c58e 17862
6a29c58e 17863
6ec2e0f5 17864
472fa5ee
SM
17865 :
17866
17867
17868
17869
17870
6ec2e0f5
SDJ
17871 if test $ac_cv_func_fchdir = no; then
17872 HAVE_FCHDIR=0
6a29c58e
YQ
17873 fi
17874
6ec2e0f5
SDJ
17875 if test $HAVE_FCHDIR = 0; then
17876 case "$gl_cv_func_open_directory_works" in
17877 *yes) ;;
17878 *)
17879 REPLACE_FSTAT=1
17880 ;;
17881 esac
17882 fi
6a29c58e
YQ
17883
17884
6ec2e0f5 17885 if test $REPLACE_FSTAT = 1; then
6a29c58e 17886
3d99e817
AK
17887
17888
17889
3d99e817
AK
17890
17891
17892
17893
6ec2e0f5 17894 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
3d99e817 17895
5e8754f9 17896 :
6ec2e0f5 17897 fi
3d99e817
AK
17898
17899
17900
17901
17902
6ec2e0f5 17903 GNULIB_FSTAT=1
3d99e817 17904
49e4877c 17905
49e4877c 17906
49e4877c 17907
49e4877c 17908
6ec2e0f5 17909$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
49e4877c 17910
6a29c58e
YQ
17911
17912
88b48903 17913
8690e634 17914
a512b375 17915
88b48903 17916
88b48903 17917
472fa5ee
SM
17918 :
17919
17920
17921
17922
17923
6ec2e0f5
SDJ
17924
17925 if test $ac_cv_func_fstatat = no; then
17926 HAVE_FSTATAT=0
17927 else
17928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
17929$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
d0ac1c44 17930if ${gl_cv_func_fstatat_zero_flag+:} false; then :
6ec2e0f5
SDJ
17931 $as_echo_n "(cached) " >&6
17932else
17933 if test "$cross_compiling" = yes; then :
17934 case "$host_os" in
17935 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
17936 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
17937 esac
88b48903 17938
8690e634
JK
17939else
17940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17941/* end confdefs.h. */
8690e634 17942
6ec2e0f5
SDJ
17943 #include <fcntl.h>
17944 #include <sys/stat.h>
17945 int
17946 main (void)
17947 {
17948 struct stat a;
17949 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
17950 }
17951
88b48903
WN
17952_ACEOF
17953if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17954 gl_cv_func_fstatat_zero_flag=yes
88b48903 17955else
6ec2e0f5 17956 gl_cv_func_fstatat_zero_flag=no
88b48903
WN
17957fi
17958rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17959 conftest.$ac_objext conftest.beam conftest.$ac_ext
17960fi
17961
17962
17963fi
6ec2e0f5
SDJ
17964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
17965$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
88b48903 17966
6ec2e0f5
SDJ
17967 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
17968 *yes+*yes) ;;
5e8754f9
SDJ
17969 *) REPLACE_FSTATAT=1
17970 case $gl_cv_func_fstatat_zero_flag in
17971 *yes)
88b48903 17972
6ec2e0f5 17973$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
88b48903 17974
7a6dbc2f 17975 ;;
5e8754f9
SDJ
17976 esac
17977 ;;
6ec2e0f5
SDJ
17978 esac
17979 fi
88b48903 17980
6ec2e0f5 17981 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
88b48903
WN
17982
17983
17984
17985
17986
88b48903 17987
4a626d0a
PA
17988
17989
6ec2e0f5
SDJ
17990 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
17991
17992 fi
17993
17994
17995
4a626d0a 17996
6ec2e0f5
SDJ
17997
17998 GNULIB_FSTATAT=1
17999
18000
18001
18002
18003
18004$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
18005
18006
18007
18008
18009
18010
18011
18012
18013 gl_abort_bug=no
4a626d0a
PA
18014 case "$host_os" in
18015 mingw*)
6ec2e0f5 18016 gl_cv_func_getcwd_path_max=yes
4a626d0a
PA
18017 ;;
18018 *)
88b48903 18019
88b48903 18020
472fa5ee
SM
18021 :
18022
18023
18024
18025
18026
18027
18028
18029 :
18030
18031
18032
88b48903
WN
18033
18034
88b48903 18035
6ec2e0f5
SDJ
18036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
18037$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
d0ac1c44 18038if ${gl_cv_func_getcwd_path_max+:} false; then :
6ec2e0f5
SDJ
18039 $as_echo_n "(cached) " >&6
18040else
18041 # Arrange for deletion of the temporary directory this test creates.
18042 ac_clean_files="$ac_clean_files confdir3"
18043 if test "$cross_compiling" = yes; then :
b567ca63
SM
18044 # Cross-compilation guesses:
18045 case "$host_os" in
18046 aix*) # On AIX, it has the AIX bug.
18047 gl_cv_func_getcwd_path_max='no, it has the AIX bug' ;;
18048 gnu*) # On Hurd, it is 'yes'.
18049 gl_cv_func_getcwd_path_max=yes ;;
18050 linux* | kfreebsd*)
18051 # On older Linux+glibc it's 'no, but it is partly working',
18052 # on newer Linux+glibc it's 'yes'.
18053 # On Linux+musl libc, it's 'no, but it is partly working'.
18054 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
18055 gl_cv_func_getcwd_path_max='no, but it is partly working' ;;
18056 *) # If we don't know, assume the worst.
18057 gl_cv_func_getcwd_path_max=no ;;
5e8754f9 18058 esac
b567ca63 18059
6ec2e0f5
SDJ
18060else
18061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18062/* end confdefs.h. */
88b48903 18063
6ec2e0f5
SDJ
18064#include <errno.h>
18065#include <stdlib.h>
18066#if HAVE_UNISTD_H
18067# include <unistd.h>
18068#else
18069# include <direct.h>
18070#endif
18071#include <string.h>
18072#include <limits.h>
18073#include <sys/stat.h>
18074#include <sys/types.h>
18075#include <fcntl.h>
88b48903
WN
18076
18077
6ec2e0f5
SDJ
18078/* Arrange to define PATH_MAX, like "pathmax.h" does. */
18079#if HAVE_UNISTD_H
18080# include <unistd.h>
18081#endif
18082#include <limits.h>
18083#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
18084# include <sys/param.h>
18085#endif
18086#if !defined PATH_MAX && defined MAXPATHLEN
18087# define PATH_MAX MAXPATHLEN
18088#endif
18089#ifdef __hpux
18090# undef PATH_MAX
18091# define PATH_MAX 1024
18092#endif
5e8754f9 18093#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
18094# undef PATH_MAX
18095# define PATH_MAX 260
18096#endif
88b48903 18097
88b48903 18098
6ec2e0f5
SDJ
18099#ifndef AT_FDCWD
18100# define AT_FDCWD 0
18101#endif
18102#ifdef ENAMETOOLONG
18103# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
18104#else
18105# define is_ENAMETOOLONG(x) 0
18106#endif
88b48903 18107
6ec2e0f5
SDJ
18108/* Use the getcwd function, not any macro. */
18109#undef getcwd
88b48903 18110
6ec2e0f5
SDJ
18111/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
18112#undef mkdir
88b48903 18113
6ec2e0f5
SDJ
18114#ifndef S_IRWXU
18115# define S_IRWXU 0700
18116#endif
88b48903 18117
6ec2e0f5
SDJ
18118/* The length of this name must be 8. */
18119#define DIR_NAME "confdir3"
18120#define DIR_NAME_LEN 8
18121#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
88b48903 18122
6ec2e0f5
SDJ
18123/* The length of "../". */
18124#define DOTDOTSLASH_LEN 3
88b48903 18125
6ec2e0f5
SDJ
18126/* Leftover bytes in the buffer, to work around library or OS bugs. */
18127#define BUF_SLOP 20
88b48903 18128
6ec2e0f5
SDJ
18129int
18130main ()
18131{
18132#ifndef PATH_MAX
18133 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
18134 at least not on a local file system. And if we were to start worrying
18135 about remote file systems, we'd have to enable the wrapper function
18136 all of the time, just to be safe. That's not worth the cost. */
18137 exit (0);
18138#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
18139 - DIR_NAME_SIZE - BUF_SLOP) \
18140 <= PATH_MAX)
18141 /* FIXME: Assuming there's a system for which this is true,
18142 this should be done in a compile test. */
18143 exit (0);
18144#else
18145 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
18146 + DIR_NAME_SIZE + BUF_SLOP];
18147 char *cwd = getcwd (buf, PATH_MAX);
18148 size_t initial_cwd_len;
18149 size_t cwd_len;
18150 int fail = 0;
18151 size_t n_chdirs = 0;
88b48903 18152
6ec2e0f5
SDJ
18153 if (cwd == NULL)
18154 exit (10);
88b48903 18155
6ec2e0f5 18156 cwd_len = initial_cwd_len = strlen (cwd);
88b48903 18157
6ec2e0f5
SDJ
18158 while (1)
18159 {
18160 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
18161 char *c = NULL;
18162
18163 cwd_len += DIR_NAME_SIZE;
18164 /* If mkdir or chdir fails, it could be that this system cannot create
18165 any file with an absolute name longer than PATH_MAX, such as cygwin.
18166 If so, leave fail as 0, because the current working directory can't
18167 be too long for getcwd if it can't even be created. For other
18168 errors, be pessimistic and consider that as a failure, too. */
18169 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
18170 {
18171 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
18172 fail = 20;
18173 break;
18174 }
88b48903 18175
6ec2e0f5
SDJ
18176 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
18177 {
18178 struct stat sb;
88b48903 18179
6ec2e0f5
SDJ
18180 c = getcwd (buf, PATH_MAX);
18181 if (!c && errno == ENOENT)
18182 {
18183 fail = 11;
18184 break;
18185 }
18186 if (c)
18187 {
18188 fail = 31;
18189 break;
18190 }
18191 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
18192 {
18193 fail = 21;
18194 break;
18195 }
88b48903 18196
6ec2e0f5
SDJ
18197 /* Our replacement needs to be able to stat() long ../../paths,
18198 so generate a path larger than PATH_MAX to check,
18199 avoiding the replacement if we can't stat(). */
18200 c = getcwd (buf, cwd_len + 1);
18201 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
18202 {
18203 fail = 32;
18204 break;
18205 }
18206 }
88b48903 18207
6ec2e0f5
SDJ
18208 if (dotdot_max <= cwd_len - initial_cwd_len)
18209 {
18210 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
18211 break;
18212 c = getcwd (buf, cwd_len + 1);
18213 if (!c)
18214 {
18215 if (! (errno == ERANGE || errno == ENOENT
18216 || is_ENAMETOOLONG (errno)))
18217 {
18218 fail = 22;
18219 break;
18220 }
18221 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
18222 {
18223 fail = 12;
18224 break;
18225 }
18226 }
18227 }
88b48903 18228
6ec2e0f5
SDJ
18229 if (c && strlen (c) != cwd_len)
18230 {
18231 fail = 23;
18232 break;
18233 }
18234 ++n_chdirs;
18235 }
88b48903 18236
6ec2e0f5
SDJ
18237 /* Leaving behind such a deep directory is not polite.
18238 So clean up here, right away, even though the driving
18239 shell script would also clean up. */
18240 {
18241 size_t i;
88b48903 18242
6ec2e0f5
SDJ
18243 /* Try rmdir first, in case the chdir failed. */
18244 rmdir (DIR_NAME);
18245 for (i = 0; i <= n_chdirs; i++)
18246 {
18247 if (chdir ("..") < 0)
18248 break;
18249 if (rmdir (DIR_NAME) != 0)
18250 break;
18251 }
18252 }
88b48903 18253
6ec2e0f5
SDJ
18254 exit (fail);
18255#endif
18256}
88b48903 18257
6ec2e0f5
SDJ
18258_ACEOF
18259if ac_fn_c_try_run "$LINENO"; then :
18260 gl_cv_func_getcwd_path_max=yes
18261else
18262 case $? in
5e8754f9
SDJ
18263 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
18264 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
18265 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
18266 *) gl_cv_func_getcwd_path_max=no;;
18267 esac
6ec2e0f5
SDJ
18268fi
18269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18270 conftest.$ac_objext conftest.beam conftest.$ac_ext
18271fi
88b48903 18272
88b48903 18273
6ec2e0f5
SDJ
18274fi
18275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
18276$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
88b48903 18277
6ec2e0f5
SDJ
18278 case "$gl_cv_func_getcwd_null" in
18279 *yes)
88b48903
WN
18280
18281
472fa5ee
SM
18282 :
18283
18284
18285
18286
18287
18288
18289 :
18290
18291
18292
18293
88b48903
WN
18294
18295
5e8754f9
SDJ
18296 for ac_func in getpagesize
18297do :
18298 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
18299if test "x$ac_cv_func_getpagesize" = xyes; then :
18300 cat >>confdefs.h <<_ACEOF
7a6dbc2f
SDJ
18301#define HAVE_GETPAGESIZE 1
18302_ACEOF
18303
5e8754f9
SDJ
18304fi
18305done
6ec2e0f5
SDJ
18306
18307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
18308$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
d0ac1c44 18309if ${gl_cv_func_getcwd_abort_bug+:} false; then :
88b48903
WN
18310 $as_echo_n "(cached) " >&6
18311else
6ec2e0f5
SDJ
18312 # Remove any remnants of a previous test.
18313 rm -rf confdir-14B---
18314 # Arrange for deletion of the temporary directory this test creates.
18315 ac_clean_files="$ac_clean_files confdir-14B---"
18316 if test "$cross_compiling" = yes; then :
18317 gl_cv_func_getcwd_abort_bug=yes
88b48903
WN
18318else
18319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18320/* end confdefs.h. */
6ec2e0f5
SDJ
18321
18322#include <errno.h>
18323#include <stdlib.h>
18324#if HAVE_UNISTD_H
18325# include <unistd.h>
18326#else /* on Windows with MSVC */
18327# include <direct.h>
18328#endif
18329#include <string.h>
18330#include <sys/stat.h>
18331
18332
18333/* Arrange to define PATH_MAX, like "pathmax.h" does. */
18334#if HAVE_UNISTD_H
18335# include <unistd.h>
18336#endif
18337#include <limits.h>
18338#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
18339# include <sys/param.h>
18340#endif
18341#if !defined PATH_MAX && defined MAXPATHLEN
18342# define PATH_MAX MAXPATHLEN
18343#endif
18344#ifdef __hpux
18345# undef PATH_MAX
18346# define PATH_MAX 1024
18347#endif
5e8754f9 18348#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
18349# undef PATH_MAX
18350# define PATH_MAX 260
18351#endif
18352
18353
18354/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
18355#undef mkdir
18356
18357#ifndef S_IRWXU
18358# define S_IRWXU 0700
18359#endif
18360
18361/* FIXME: skip the run-test altogether on systems without getpagesize. */
18362#if ! HAVE_GETPAGESIZE
18363# define getpagesize() 0
18364#endif
18365
18366/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
18367 the 16kB pagesize on ia64 linux. Those conditions make the code below
18368 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
18369#define TARGET_LEN (5 * 1024)
88b48903
WN
18370
18371int
18372main ()
18373{
6ec2e0f5
SDJ
18374 char *cwd;
18375 size_t initial_cwd_len;
18376 int fail = 0;
18377
18378 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
18379 this relatively expensive and invasive test if that's not true. */
18380#ifdef PATH_MAX
18381 int bug_possible = PATH_MAX < getpagesize ();
18382#else
18383 int bug_possible = 0;
18384#endif
18385 if (! bug_possible)
18386 return 0;
8690e634 18387
6ec2e0f5
SDJ
18388 cwd = getcwd (NULL, 0);
18389 if (cwd == NULL)
18390 return 2;
18391
18392 initial_cwd_len = strlen (cwd);
18393 free (cwd);
18394
18395 if (1)
18396 {
18397 static char const dir_name[] = "confdir-14B---";
18398 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
18399 / sizeof dir_name);
18400 size_t d;
18401 for (d = 0; d < desired_depth; d++)
18402 {
18403 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
18404 {
18405 if (! (errno == ERANGE || errno == ENAMETOOLONG
18406 || errno == ENOENT))
18407 fail = 3; /* Unable to construct deep hierarchy. */
18408 break;
18409 }
18410 }
18411
18412 /* If libc has the bug in question, this invocation of getcwd
18413 results in a failed assertion. */
18414 cwd = getcwd (NULL, 0);
18415 if (cwd == NULL)
18416 fail = 4; /* getcwd didn't assert, but it failed for a long name
18417 where the answer could have been learned. */
18418 free (cwd);
18419
18420 /* Call rmdir first, in case the above chdir failed. */
18421 rmdir (dir_name);
18422 while (0 < d--)
18423 {
18424 if (chdir ("..") < 0)
18425 {
18426 fail = 5;
18427 break;
18428 }
18429 rmdir (dir_name);
18430 }
18431 }
18432
18433 return fail;
8690e634 18434}
6ec2e0f5 18435
8690e634
JK
18436_ACEOF
18437if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 18438 gl_cv_func_getcwd_abort_bug=no
8690e634 18439else
5e8754f9
SDJ
18440 ret=$?
18441 if test $ret -ge 128 || test $ret = 4; then
18442 gl_cv_func_getcwd_abort_bug=yes
18443 else
18444 gl_cv_func_getcwd_abort_bug=no
18445 fi
8690e634
JK
18446fi
18447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18448 conftest.$ac_objext conftest.beam conftest.$ac_ext
18449fi
18450
18451
18452fi
6ec2e0f5
SDJ
18453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
18454$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
18455 if test $gl_cv_func_getcwd_abort_bug = yes; then :
18456 gl_abort_bug=yes
18457fi
18458
18459 ;;
18460 esac
18461 ;;
18462 esac
18463 case "$gl_cv_func_getcwd_path_max" in
18464 "no"|"no, it has the AIX bug") ;;
18465 *)
18466
18467$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
18468
18469 ;;
18470 esac
18471 case "$gl_cv_func_getcwd_path_max" in
18472 "no, but it is partly working")
18473
18474$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
18475
18476 ;;
18477 "yes, but with shorter paths")
18478
18479$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
18480
18481 ;;
18482 esac
18483
18484 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
18485 || test $gl_cv_func_getcwd_posix_signature != yes \
18486 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
18487 || test $gl_abort_bug = yes; then
18488 REPLACE_GETCWD=1
8690e634
JK
18489 fi
18490
6ec2e0f5 18491 if test $REPLACE_GETCWD = 1; then
8690e634
JK
18492
18493
8690e634
JK
18494
18495
18496
18497
18498
18499
6ec2e0f5 18500 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
8690e634
JK
18501
18502
8690e634
JK
18503
18504
6ec2e0f5
SDJ
18505 :
18506
18507 fi
18508
8690e634
JK
18509
18510cat >>confdefs.h <<_ACEOF
6ec2e0f5 18511#define GNULIB_GETCWD 1
8690e634
JK
18512_ACEOF
18513
18514
8690e634 18515
8690e634
JK
18516
18517
c971b7fa 18518
c971b7fa 18519
6ec2e0f5
SDJ
18520 GNULIB_GETCWD=1
18521
18522
18523
18524
18525
18526$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
18527
c971b7fa 18528
c971b7fa 18529
c971b7fa 18530
c971b7fa 18531
c971b7fa 18532
c971b7fa 18533
c971b7fa 18534
6ec2e0f5
SDJ
18535 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
18536 *yes,yes) ;;
18537 *)
18538 REPLACE_GETCWD=1
18539 ;;
18540 esac
c971b7fa 18541
6ec2e0f5 18542 if test $REPLACE_GETCWD = 1; then
c971b7fa 18543
c971b7fa
PA
18544
18545
c971b7fa
PA
18546
18547
c971b7fa 18548
c971b7fa 18549
c971b7fa 18550
6ec2e0f5 18551 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
c971b7fa 18552
6ec2e0f5 18553 fi
c971b7fa 18554
c971b7fa 18555
c971b7fa 18556
c971b7fa 18557
8690e634 18558
6ec2e0f5 18559 GNULIB_GETCWD=1
c971b7fa 18560
88b48903
WN
18561
18562
18563
88b48903 18564
6ec2e0f5 18565$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
88b48903 18566
88b48903
WN
18567
18568
18569
6ec2e0f5
SDJ
18570
18571
18572
472fa5ee
SM
18573 :
18574
18575
18576
18577
18578
18579
18580 :
18581
18582
18583
18584
6ec2e0f5
SDJ
18585
18586 if test $ac_cv_func_getdtablesize = yes &&
18587 test $ac_cv_have_decl_getdtablesize = yes; then
5e8754f9
SDJ
18588 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
18589 # up to an unchangeable hard limit; all other platforms correctly
18590 # require setrlimit before getdtablesize() can report a larger value.
6ec2e0f5
SDJ
18591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
18592$as_echo_n "checking whether getdtablesize works... " >&6; }
d0ac1c44 18593if ${gl_cv_func_getdtablesize_works+:} false; then :
88b48903
WN
18594 $as_echo_n "(cached) " >&6
18595else
5e8754f9 18596 if test "$cross_compiling" = yes; then :
88b48903 18597 case "$host_os" in
5e8754f9
SDJ
18598 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
18599 gl_cv_func_getdtablesize_works="guessing no" ;;
18600 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
18601 esac
88b48903
WN
18602else
18603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18604/* end confdefs.h. */
18605
5e8754f9 18606 #include <unistd.h>
6ec2e0f5
SDJ
18607int
18608main ()
88b48903 18609{
6ec2e0f5 18610int size = getdtablesize();
5e8754f9
SDJ
18611 if (dup2 (0, getdtablesize()) != -1)
18612 return 1;
18613 if (size != getdtablesize())
18614 return 2;
6ec2e0f5
SDJ
18615
18616 ;
18617 return 0;
88b48903
WN
18618}
18619_ACEOF
18620if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 18621 gl_cv_func_getdtablesize_works=yes
88b48903 18622else
6ec2e0f5 18623 gl_cv_func_getdtablesize_works=no
88b48903
WN
18624fi
18625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18626 conftest.$ac_objext conftest.beam conftest.$ac_ext
18627fi
18628
18629
18630fi
6ec2e0f5
SDJ
18631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
18632$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
18633 case "$gl_cv_func_getdtablesize_works" in
5e8754f9 18634 *yes) ;;
6ec2e0f5 18635 *) REPLACE_GETDTABLESIZE=1 ;;
88b48903
WN
18636 esac
18637 else
6ec2e0f5 18638 HAVE_GETDTABLESIZE=0
88b48903
WN
18639 fi
18640
6ec2e0f5 18641 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
88b48903
WN
18642
18643
18644
18645
18646
18647
18648
18649
6ec2e0f5 18650 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
88b48903 18651
6ec2e0f5 18652 :
88b48903
WN
18653 fi
18654
18655
18656
18657
18658
6ec2e0f5 18659 GNULIB_GETDTABLESIZE=1
88b48903
WN
18660
18661
18662
88b48903 18663
88b48903 18664
6ec2e0f5 18665$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
88b48903 18666
88b48903 18667
88b48903 18668
88b48903 18669
88b48903 18670
88b48903 18671
88b48903 18672
88b48903
WN
18673
18674
472fa5ee
SM
18675 :
18676
18677
18678
18679
18680
6ec2e0f5
SDJ
18681 if test $ac_cv_have_decl_getlogin_r = no; then
18682 HAVE_DECL_GETLOGIN_R=0
18683 fi
88b48903 18684
88b48903 18685
472fa5ee
SM
18686 :
18687
18688
18689
18690
18691
6ec2e0f5
SDJ
18692 if test $ac_cv_func_getlogin_r = no; then
18693 HAVE_GETLOGIN_R=0
18694 else
18695 HAVE_GETLOGIN_R=1
18696
18697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
18698$as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
d0ac1c44 18699if ${gl_cv_func_getlogin_r_works+:} false; then :
6ec2e0f5
SDJ
18700 $as_echo_n "(cached) " >&6
18701else
88b48903 18702
6ec2e0f5 18703 case "$host_os" in
5e8754f9
SDJ
18704 # Guess no on OSF/1.
18705 osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
18706 # Guess yes otherwise.
18707 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
6ec2e0f5
SDJ
18708 esac
18709 if test "$cross_compiling" = yes; then :
18710 :
88b48903
WN
18711else
18712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18713/* end confdefs.h. */
18714
6ec2e0f5
SDJ
18715#include <stddef.h>
18716#include <unistd.h>
18717#if !HAVE_DECL_GETLOGIN_R
88b48903 18718extern
6ec2e0f5 18719# ifdef __cplusplus
88b48903 18720"C"
6ec2e0f5
SDJ
18721# endif
18722int getlogin_r (char *, size_t);
88b48903 18723#endif
6ec2e0f5
SDJ
18724int
18725main (void)
88b48903
WN
18726{
18727 int result = 0;
6ec2e0f5
SDJ
18728 char buf[100];
18729
18730 if (getlogin_r (buf, 0) == 0)
5e8754f9 18731 result |= 16;
6ec2e0f5 18732 if (getlogin_r (buf, 1) == 0)
5e8754f9 18733 result |= 17;
88b48903
WN
18734 return result;
18735}
18736_ACEOF
18737if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 18738 gl_cv_func_getlogin_r_works=yes
88b48903 18739else
5e8754f9
SDJ
18740 case $? in
18741 16 | 17) gl_cv_func_getlogin_r_works=no ;;
18742 esac
18743
88b48903
WN
18744fi
18745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18746 conftest.$ac_objext conftest.beam conftest.$ac_ext
18747fi
18748
18749
4a626d0a 18750fi
6ec2e0f5
SDJ
18751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
18752$as_echo "$gl_cv_func_getlogin_r_works" >&6; }
18753 case "$gl_cv_func_getlogin_r_works" in
18754 *yes) ;;
18755 *) REPLACE_GETLOGIN_R=1 ;;
18756 esac
18757 fi
18758
18759 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
18760
18761
18762
18763
18764
18765
18766
18767
18768 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
4a626d0a 18769
4a626d0a 18770
4a626d0a 18771
472fa5ee
SM
18772 :
18773
18774
18775
18776
18777
4a626d0a 18778
4a626d0a
PA
18779 fi
18780
18781
4a626d0a
PA
18782
18783
18784
6ec2e0f5 18785 GNULIB_GETLOGIN_R=1
4a626d0a
PA
18786
18787
18788
18789
18790
6ec2e0f5 18791$as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
4a626d0a 18792
4a626d0a
PA
18793
18794
18795
18796
472fa5ee
SM
18797 :
18798
18799
18800
18801
18802
18803
18804
18805
4a626d0a 18806
6ec2e0f5
SDJ
18807 ac_found=0
18808 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
18809"
d0ac1c44 18810if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
6ec2e0f5
SDJ
18811 ac_have_decl=1
18812else
18813 ac_have_decl=0
18814fi
18815
18816cat >>confdefs.h <<_ACEOF
18817#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
18818_ACEOF
18819if test $ac_have_decl = 1; then :
18820 ac_found=1
18821fi
18822
18823 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
18824"
d0ac1c44 18825if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
6ec2e0f5
SDJ
18826 ac_have_decl=1
18827else
18828 ac_have_decl=0
18829fi
18830
18831cat >>confdefs.h <<_ACEOF
18832#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
18833_ACEOF
18834if test $ac_have_decl = 1; then :
18835 ac_found=1
18836fi
4a626d0a 18837
6ec2e0f5
SDJ
18838 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
18839"
d0ac1c44 18840if test "x$ac_cv_have_decl___argv" = xyes; then :
6ec2e0f5
SDJ
18841 ac_have_decl=1
18842else
18843 ac_have_decl=0
18844fi
4a626d0a 18845
6ec2e0f5
SDJ
18846cat >>confdefs.h <<_ACEOF
18847#define HAVE_DECL___ARGV $ac_have_decl
18848_ACEOF
18849if test $ac_have_decl = 1; then :
18850 ac_found=1
18851fi
4a626d0a
PA
18852
18853
6ec2e0f5
SDJ
18854 # Incur the cost of this test only if none of the above worked.
18855 if test $ac_found = 0; then
18856 # On OpenBSD 5.1, using the global __progname variable appears to be
18857 # the only way to implement getprogname.
18858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
18859$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
d0ac1c44 18860if ${gl_cv_var___progname+:} false; then :
6ec2e0f5
SDJ
18861 $as_echo_n "(cached) " >&6
18862else
4a626d0a 18863
6ec2e0f5
SDJ
18864 gl_cv_var___progname=
18865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18866/* end confdefs.h. */
18867extern char *__progname;
18868int
18869main ()
18870{
18871return *__progname;
18872
18873 ;
18874 return 0;
18875}
18876_ACEOF
18877if ac_fn_c_try_link "$LINENO"; then :
18878 gl_cv_var___progname=yes
18879
18880fi
18881rm -f core conftest.err conftest.$ac_objext \
18882 conftest$ac_exeext conftest.$ac_ext
18883
18884
18885fi
18886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
18887$as_echo "$gl_cv_var___progname" >&6; }
18888 if test "$gl_cv_var___progname" = yes; then
18889
18890$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
18891
18892 fi
18893 fi
4a626d0a
PA
18894
18895
18896
18897
18898
18899
18900
18901
472fa5ee
SM
18902 :
18903
18904
18905
18906
18907
4a626d0a
PA
18908
18909 gl_gettimeofday_timezone=void
18910 if test $ac_cv_func_gettimeofday != yes; then
18911 HAVE_GETTIMEOFDAY=0
18912 else
18913
18914
18915
18916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
18917$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
d0ac1c44 18918if ${gl_cv_func_gettimeofday_clobber+:} false; then :
4a626d0a
PA
18919 $as_echo_n "(cached) " >&6
18920else
18921 if test "$cross_compiling" = yes; then :
18922 # When cross-compiling:
18923 case "$host_os" in
5e8754f9
SDJ
18924 # Guess all is fine on glibc systems.
18925 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
18926 # If we don't know, assume the worst.
18927 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
4a626d0a
PA
18928 esac
18929
18930else
18931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18932/* end confdefs.h. */
18933#include <string.h>
18934 #include <sys/time.h>
18935 #include <time.h>
18936 #include <stdlib.h>
18937
18938int
18939main ()
18940{
18941
18942 time_t t = 0;
18943 struct tm *lt;
18944 struct tm saved_lt;
18945 struct timeval tv;
18946 lt = localtime (&t);
18947 saved_lt = *lt;
18948 gettimeofday (&tv, NULL);
18949 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
18950
18951 ;
18952 return 0;
18953}
18954_ACEOF
18955if ac_fn_c_try_run "$LINENO"; then :
18956 gl_cv_func_gettimeofday_clobber=no
18957else
18958 gl_cv_func_gettimeofday_clobber=yes
18959fi
18960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18961 conftest.$ac_objext conftest.beam conftest.$ac_ext
18962fi
18963
18964fi
18965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
18966$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
18967
18968 case "$gl_cv_func_gettimeofday_clobber" in
18969 *yes)
18970 REPLACE_GETTIMEOFDAY=1
18971
7a6dbc2f
SDJ
18972 REPLACE_GMTIME=1
18973 REPLACE_LOCALTIME=1
4a626d0a 18974
5e8754f9
SDJ
18975
18976$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
18977
4a626d0a
PA
18978 ;;
18979 esac
18980
18981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
18982$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
d0ac1c44 18983if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
4a626d0a
PA
18984 $as_echo_n "(cached) " >&6
18985else
18986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18987/* end confdefs.h. */
18988#include <sys/time.h>
18989 struct timeval c;
18990 int gettimeofday (struct timeval *restrict, void *restrict);
18991
18992int
18993main ()
18994{
18995/* glibc uses struct timezone * rather than the POSIX void *
18996 if _GNU_SOURCE is defined. However, since the only portable
18997 use of gettimeofday uses NULL as the second parameter, and
18998 since the glibc definition is actually more typesafe, it is
18999 not worth wrapping this to get a compliant signature. */
19000 int (*f) (struct timeval *restrict, void *restrict)
19001 = gettimeofday;
19002 int x = f (&c, 0);
19003 return !(x | c.tv_sec | c.tv_usec);
19004
19005 ;
19006 return 0;
19007}
19008_ACEOF
19009if ac_fn_c_try_compile "$LINENO"; then :
19010 gl_cv_func_gettimeofday_posix_signature=yes
19011else
19012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19013/* end confdefs.h. */
19014#include <sys/time.h>
19015int gettimeofday (struct timeval *restrict, struct timezone *restrict);
19016
19017int
19018main ()
19019{
19020
19021 ;
19022 return 0;
19023}
19024_ACEOF
19025if ac_fn_c_try_compile "$LINENO"; then :
19026 gl_cv_func_gettimeofday_posix_signature=almost
19027else
19028 gl_cv_func_gettimeofday_posix_signature=no
19029fi
19030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19031fi
19032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19033fi
19034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
19035$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
19036 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
19037 gl_gettimeofday_timezone='struct timezone'
19038 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
19039 REPLACE_GETTIMEOFDAY=1
19040 fi
19041 if test $REPLACE_STRUCT_TIMEVAL = 1; then
19042 REPLACE_GETTIMEOFDAY=1
19043 fi
5e8754f9 19044
4a626d0a
PA
19045 fi
19046
19047cat >>confdefs.h <<_ACEOF
19048#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
19049_ACEOF
19050
88b48903 19051
4a626d0a 19052 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
88b48903 19053
88b48903 19054
88b48903 19055
88b48903
WN
19056
19057
88b48903
WN
19058
19059
19060
6ec2e0f5
SDJ
19061 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
19062
6ec2e0f5 19063
5e8754f9
SDJ
19064 for ac_header in sys/timeb.h
19065do :
19066 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
19067if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
19068 cat >>confdefs.h <<_ACEOF
19069#define HAVE_SYS_TIMEB_H 1
19070_ACEOF
6ec2e0f5 19071
5e8754f9 19072fi
6ec2e0f5 19073
5e8754f9 19074done
6ec2e0f5 19075
5e8754f9
SDJ
19076 for ac_func in _ftime
19077do :
19078 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
19079if test "x$ac_cv_func__ftime" = xyes; then :
19080 cat >>confdefs.h <<_ACEOF
19081#define HAVE__FTIME 1
19082_ACEOF
6ec2e0f5 19083
5e8754f9
SDJ
19084fi
19085done
6ec2e0f5
SDJ
19086
19087
5e8754f9 19088 fi
6ec2e0f5
SDJ
19089
19090
19091
6ec2e0f5
SDJ
19092
19093
5e8754f9 19094 GNULIB_GETTIMEOFDAY=1
6ec2e0f5
SDJ
19095
19096
19097
7a6dbc2f
SDJ
19098
19099
5e8754f9 19100$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
6ec2e0f5
SDJ
19101
19102
19103
5e8754f9
SDJ
19104 GLOB_H=
19105 for ac_header in glob.h
19106do :
19107 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
19108if test "x$ac_cv_header_glob_h" = xyes; then :
19109 cat >>confdefs.h <<_ACEOF
19110#define HAVE_GLOB_H 1
19111_ACEOF
6ec2e0f5 19112
5e8754f9
SDJ
19113else
19114 GLOB_H=glob.h
19115fi
6ec2e0f5 19116
5e8754f9 19117done
6ec2e0f5
SDJ
19118
19119
5e8754f9
SDJ
19120 if test -z "$GLOB_H"; then
19121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5
19122$as_echo_n "checking for GNU glob interface version 1... " >&6; }
19123if ${gl_cv_gnu_glob_interface_version_1+:} false; then :
6ec2e0f5
SDJ
19124 $as_echo_n "(cached) " >&6
19125else
19126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19127/* end confdefs.h. */
19128#include <gnu-versions.h>
5e8754f9 19129char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
6ec2e0f5
SDJ
19130_ACEOF
19131if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 19132 gl_cv_gnu_glob_interface_version_1=yes
6ec2e0f5 19133else
5e8754f9 19134 gl_cv_gnu_glob_interface_version_1=no
6ec2e0f5
SDJ
19135fi
19136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19137fi
5e8754f9
SDJ
19138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5
19139$as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; }
19140
19141 if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
19142 GLOB_H=glob.h
6ec2e0f5 19143 fi
5e8754f9 19144 fi
6ec2e0f5 19145
5e8754f9
SDJ
19146 if test -z "$GLOB_H"; then
19147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
6ec2e0f5 19148$as_echo_n "checking whether glob lists broken symlinks... " >&6; }
d0ac1c44 19149if ${gl_cv_glob_lists_symlinks+:} false; then :
6ec2e0f5
SDJ
19150 $as_echo_n "(cached) " >&6
19151else
5e8754f9
SDJ
19152 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
19153 gl_cv_glob_lists_symlinks=maybe
19154 else
19155 # If we can't make a symlink, then we cannot test this issue. Be
19156 # pessimistic about this.
19157 gl_cv_glob_lists_symlinks=no
19158 fi
19159
19160 if test $gl_cv_glob_lists_symlinks = maybe; then
19161 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
19162 gl_cv_glob_lists_symlinks=no
19163else
19164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19165/* end confdefs.h. */
5e8754f9 19166
6ec2e0f5 19167#include <stddef.h>
5e8754f9 19168#include <glob.h>
6ec2e0f5
SDJ
19169int
19170main ()
19171{
19172glob_t found;
5e8754f9 19173if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
6ec2e0f5
SDJ
19174 ;
19175 return 0;
19176}
4a626d0a 19177_ACEOF
6ec2e0f5
SDJ
19178if ac_fn_c_try_run "$LINENO"; then :
19179 gl_cv_glob_lists_symlinks=yes
19180else
19181 gl_cv_glob_lists_symlinks=no
19182fi
19183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19184 conftest.$ac_objext conftest.beam conftest.$ac_ext
19185fi
88b48903 19186
5e8754f9 19187 fi
4a626d0a 19188fi
6ec2e0f5
SDJ
19189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
19190$as_echo "$gl_cv_glob_lists_symlinks" >&6; }
88b48903 19191
5e8754f9
SDJ
19192 if test $gl_cv_glob_lists_symlinks = no; then
19193 GLOB_H=glob.h
6ec2e0f5
SDJ
19194 fi
19195 fi
4a626d0a 19196
5e8754f9 19197 rm -f conf$$-globtest
4a626d0a 19198
88b48903 19199
6ec2e0f5
SDJ
19200 if test -n "$GLOB_H"; then
19201 GL_GENERATE_GLOB_H_TRUE=
19202 GL_GENERATE_GLOB_H_FALSE='#'
19203else
19204 GL_GENERATE_GLOB_H_TRUE='#'
19205 GL_GENERATE_GLOB_H_FALSE=
19206fi
88b48903 19207
88b48903 19208
5e8754f9 19209 if test -n "$GLOB_H"; then
472fa5ee
SM
19210
19211
19212
19213
19214
19215
19216
19217
19218 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
19219
19220
19221
7a6dbc2f
SDJ
19222 :
19223
19224
19225
472fa5ee 19226
472fa5ee 19227
88b48903 19228
88b48903 19229
5e8754f9
SDJ
19230 if test $ac_cv_header_sys_cdefs_h = yes; then
19231 HAVE_SYS_CDEFS_H=1
19232 else
19233 HAVE_SYS_CDEFS_H=0
7a6dbc2f 19234 fi
88b48903
WN
19235
19236
725e2999
JB
19237 :
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249 fi
19250
19251 :
19252
19253
19254
19255
19256
19257
19258
19259
19260 HAVE_INET_NTOP=1
19261 INET_NTOP_LIB=
19262
19263
19264
19265
19266 :
19267
19268
19269
19270
19271
19272 if test $ac_cv_header_sys_socket_h != yes; then
19273 for ac_header in winsock2.h
19274do :
19275 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19276if test "x$ac_cv_header_winsock2_h" = xyes; then :
19277 cat >>confdefs.h <<_ACEOF
19278#define HAVE_WINSOCK2_H 1
19279_ACEOF
19280
19281fi
19282
19283done
19284
19285 fi
19286 if test "$ac_cv_header_winsock2_h" = yes; then
19287 HAVE_WINSOCK2_H=1
19288 UNISTD_H_HAVE_WINSOCK2_H=1
19289 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19290 else
19291 HAVE_WINSOCK2_H=0
19292 fi
19293
19294
19295 if test $HAVE_WINSOCK2_H = 1; then
19296 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
19297"
19298if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
19299 ac_have_decl=1
19300else
19301 ac_have_decl=0
19302fi
19303
19304cat >>confdefs.h <<_ACEOF
19305#define HAVE_DECL_INET_NTOP $ac_have_decl
19306_ACEOF
19307
19308 if test $ac_cv_have_decl_inet_ntop = yes; then
19309 REPLACE_INET_NTOP=1
19310 INET_NTOP_LIB="-lws2_32"
19311 else
19312 HAVE_DECL_INET_NTOP=0
19313 HAVE_INET_NTOP=0
19314 fi
19315 else
19316 gl_save_LIBS=$LIBS
19317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
19318$as_echo_n "checking for library containing inet_ntop... " >&6; }
19319if ${ac_cv_search_inet_ntop+:} false; then :
19320 $as_echo_n "(cached) " >&6
19321else
19322 ac_func_search_save_LIBS=$LIBS
19323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19324/* end confdefs.h. */
19325
19326/* Override any GCC internal prototype to avoid an error.
19327 Use char because int might match the return type of a GCC
19328 builtin and then its argument prototype would still apply. */
19329#ifdef __cplusplus
19330extern "C"
19331#endif
19332char inet_ntop ();
19333int
19334main ()
19335{
19336return inet_ntop ();
19337 ;
19338 return 0;
19339}
19340_ACEOF
19341for ac_lib in '' nsl resolv; do
19342 if test -z "$ac_lib"; then
19343 ac_res="none required"
19344 else
19345 ac_res=-l$ac_lib
19346 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19347 fi
19348 if ac_fn_c_try_link "$LINENO"; then :
19349 ac_cv_search_inet_ntop=$ac_res
19350fi
19351rm -f core conftest.err conftest.$ac_objext \
19352 conftest$ac_exeext
19353 if ${ac_cv_search_inet_ntop+:} false; then :
19354 break
19355fi
19356done
19357if ${ac_cv_search_inet_ntop+:} false; then :
19358
19359else
19360 ac_cv_search_inet_ntop=no
19361fi
19362rm conftest.$ac_ext
19363LIBS=$ac_func_search_save_LIBS
19364fi
19365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
19366$as_echo "$ac_cv_search_inet_ntop" >&6; }
19367ac_res=$ac_cv_search_inet_ntop
19368if test "$ac_res" != no; then :
19369 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19370
19371else
19372 for ac_func in inet_ntop
19373do :
19374 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
19375if test "x$ac_cv_func_inet_ntop" = xyes; then :
19376 cat >>confdefs.h <<_ACEOF
19377#define HAVE_INET_NTOP 1
19378_ACEOF
19379
19380fi
19381done
19382
19383 if test $ac_cv_func_inet_ntop = no; then
19384 HAVE_INET_NTOP=0
19385 fi
19386
19387fi
19388
19389 LIBS=$gl_save_LIBS
19390
19391 if test "$ac_cv_search_inet_ntop" != "no" \
19392 && test "$ac_cv_search_inet_ntop" != "none required"; then
19393 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
19394 fi
19395
19396
19397 :
19398
19399
19400
19401
19402
19403 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
19404 #if HAVE_NETDB_H
19405 # include <netdb.h>
19406 #endif
19407
19408"
19409if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
19410 ac_have_decl=1
19411else
19412 ac_have_decl=0
19413fi
19414
19415cat >>confdefs.h <<_ACEOF
19416#define HAVE_DECL_INET_NTOP $ac_have_decl
19417_ACEOF
19418
19419 if test $ac_cv_have_decl_inet_ntop = no; then
19420 HAVE_DECL_INET_NTOP=0
19421 fi
19422 fi
19423
19424
19425 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
19426
19427
19428
19429
19430
19431
19432
7a6dbc2f 19433
725e2999 19434 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
7a6dbc2f
SDJ
19435
19436
19437
7a6dbc2f 19438
725e2999 19439 fi
7a6dbc2f
SDJ
19440
19441
19442
19443
7a6dbc2f 19444
725e2999
JB
19445 GNULIB_INET_NTOP=1
19446
7a6dbc2f
SDJ
19447
19448
49e4877c
PA
19449
19450
88b48903
WN
19451
19452
19453
19454
19455 PRIPTR_PREFIX=
19456 if test -n "$STDINT_H"; then
19457 PRIPTR_PREFIX='"l"'
19458 else
19459 for glpfx in '' l ll I64; do
19460 case $glpfx in
19461 '') gltype1='int';;
19462 l) gltype1='long int';;
19463 ll) gltype1='long long int';;
19464 I64) gltype1='__int64';;
19465 esac
19466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19467/* end confdefs.h. */
19468#include <stdint.h>
19469 extern intptr_t foo;
19470 extern $gltype1 foo;
19471int
19472main ()
19473{
19474
19475 ;
19476 return 0;
19477}
19478_ACEOF
19479if ac_fn_c_try_compile "$LINENO"; then :
19480 PRIPTR_PREFIX='"'$glpfx'"'
19481fi
19482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19483 test -n "$PRIPTR_PREFIX" && break
19484 done
19485 fi
19486
19487
19488
19489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
19490$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
d0ac1c44 19491if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
88b48903
WN
19492 $as_echo_n "(cached) " >&6
19493else
19494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19495/* end confdefs.h. */
19496/* Work also in C++ mode. */
19497 #define __STDC_LIMIT_MACROS 1
19498
19499 /* Work if build is not clean. */
19500 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
19501
19502 #include <limits.h>
19503 #if HAVE_STDINT_H
19504 #include <stdint.h>
19505 #endif
19506
19507 #if defined INT32_MAX && defined INTMAX_MAX
19508 #define CONDITION (INT32_MAX < INTMAX_MAX)
19509 #elif HAVE_LONG_LONG_INT
19510 #define CONDITION (sizeof (int) < sizeof (long long int))
19511 #else
19512 #define CONDITION 0
19513 #endif
19514 int test[CONDITION ? 1 : -1];
19515int
19516main ()
19517{
19518
19519 ;
19520 return 0;
19521}
19522_ACEOF
19523if ac_fn_c_try_compile "$LINENO"; then :
19524 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
19525else
19526 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
19527fi
19528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19529fi
19530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
19531$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
19532 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
19533 INT32_MAX_LT_INTMAX_MAX=1;
19534 else
19535 INT32_MAX_LT_INTMAX_MAX=0;
19536 fi
19537
19538
19539 if test $APPLE_UNIVERSAL_BUILD = 0; then
19540
19541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
19542$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
d0ac1c44 19543if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
88b48903
WN
19544 $as_echo_n "(cached) " >&6
19545else
19546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19547/* end confdefs.h. */
19548/* Work also in C++ mode. */
19549 #define __STDC_LIMIT_MACROS 1
19550
19551 /* Work if build is not clean. */
19552 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
19553
19554 #include <limits.h>
19555 #if HAVE_STDINT_H
19556 #include <stdint.h>
19557 #endif
19558
19559 #if defined INT64_MAX
19560 #define CONDITION (INT64_MAX == LONG_MAX)
19561 #elif HAVE_LONG_LONG_INT
19562 #define CONDITION (sizeof (long long int) == sizeof (long int))
19563 #else
19564 #define CONDITION 0
19565 #endif
19566 int test[CONDITION ? 1 : -1];
19567int
19568main ()
19569{
19570
19571 ;
19572 return 0;
19573}
19574_ACEOF
19575if ac_fn_c_try_compile "$LINENO"; then :
19576 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
19577else
19578 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
19579fi
19580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19581fi
19582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
19583$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
19584 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
19585 INT64_MAX_EQ_LONG_MAX=1;
19586 else
19587 INT64_MAX_EQ_LONG_MAX=0;
19588 fi
19589
19590
19591 else
19592 INT64_MAX_EQ_LONG_MAX=-1
19593 fi
19594
19595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
19596$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
d0ac1c44 19597if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
88b48903
WN
19598 $as_echo_n "(cached) " >&6
19599else
19600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19601/* end confdefs.h. */
19602/* Work also in C++ mode. */
19603 #define __STDC_LIMIT_MACROS 1
19604
19605 /* Work if build is not clean. */
19606 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
19607
19608 #include <limits.h>
19609 #if HAVE_STDINT_H
19610 #include <stdint.h>
19611 #endif
19612
19613 #if defined UINT32_MAX && defined UINTMAX_MAX
19614 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
19615 #elif HAVE_LONG_LONG_INT
19616 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
19617 #else
19618 #define CONDITION 0
19619 #endif
19620 int test[CONDITION ? 1 : -1];
19621int
19622main ()
19623{
19624
19625 ;
19626 return 0;
19627}
19628_ACEOF
19629if ac_fn_c_try_compile "$LINENO"; then :
19630 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
19631else
19632 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
19633fi
19634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19635fi
19636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
19637$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
19638 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
19639 UINT32_MAX_LT_UINTMAX_MAX=1;
19640 else
19641 UINT32_MAX_LT_UINTMAX_MAX=0;
19642 fi
19643
19644
19645 if test $APPLE_UNIVERSAL_BUILD = 0; then
19646
19647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
19648$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
d0ac1c44 19649if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
88b48903
WN
19650 $as_echo_n "(cached) " >&6
19651else
19652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19653/* end confdefs.h. */
19654/* Work also in C++ mode. */
19655 #define __STDC_LIMIT_MACROS 1
19656
19657 /* Work if build is not clean. */
19658 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
19659
19660 #include <limits.h>
19661 #if HAVE_STDINT_H
19662 #include <stdint.h>
19663 #endif
19664
19665 #if defined UINT64_MAX
19666 #define CONDITION (UINT64_MAX == ULONG_MAX)
19667 #elif HAVE_LONG_LONG_INT
19668 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
19669 #else
19670 #define CONDITION 0
19671 #endif
19672 int test[CONDITION ? 1 : -1];
19673int
19674main ()
19675{
19676
19677 ;
19678 return 0;
19679}
19680_ACEOF
19681if ac_fn_c_try_compile "$LINENO"; then :
19682 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
19683else
19684 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
19685fi
19686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19687fi
19688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
19689$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
19690 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
19691 UINT64_MAX_EQ_ULONG_MAX=1;
19692 else
19693 UINT64_MAX_EQ_ULONG_MAX=0;
19694 fi
19695
19696
19697 else
19698 UINT64_MAX_EQ_ULONG_MAX=-1
19699 fi
19700
19701
19702
19703
19704
19705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
19706$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
d0ac1c44 19707if ${gl_cv_func_isnand_no_libm+:} false; then :
88b48903
WN
19708 $as_echo_n "(cached) " >&6
19709else
19710
19711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19712/* end confdefs.h. */
19713#include <math.h>
19714 #if __GNUC__ >= 4
19715 # undef isnand
19716 # define isnand(x) __builtin_isnan ((double)(x))
19717 #else
19718 # undef isnand
19719 # define isnand(x) isnan ((double)(x))
19720 #endif
19721 double x;
19722int
19723main ()
19724{
19725return isnand (x);
19726 ;
19727 return 0;
19728}
19729_ACEOF
19730if ac_fn_c_try_link "$LINENO"; then :
19731 gl_cv_func_isnand_no_libm=yes
19732else
19733 gl_cv_func_isnand_no_libm=no
19734fi
19735rm -f core conftest.err conftest.$ac_objext \
19736 conftest$ac_exeext conftest.$ac_ext
19737
19738fi
19739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
19740$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
19741
19742 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
19743 if test $gl_cv_func_isnand_no_libm = yes; then
19744
19745$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
19746
19747 fi
19748
19749 if test $gl_func_isnand_no_libm != yes; then
19750
19751
19752
19753
19754
19755
19756
19757
19758 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
19759
19760
19761
19762
19763 fi
19764
19765
19766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
19767$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
d0ac1c44 19768if ${gl_cv_func_isnanl_no_libm+:} false; then :
88b48903
WN
19769 $as_echo_n "(cached) " >&6
19770else
19771
19772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19773/* end confdefs.h. */
19774#include <math.h>
19775 #if __GNUC__ >= 4
19776 # undef isnanl
19777 # define isnanl(x) __builtin_isnanl ((long double)(x))
19778 #elif defined isnan
19779 # undef isnanl
19780 # define isnanl(x) isnan ((long double)(x))
19781 #endif
19782 long double x;
19783int
19784main ()
19785{
19786return isnanl (x);
19787 ;
19788 return 0;
19789}
19790_ACEOF
19791if ac_fn_c_try_link "$LINENO"; then :
19792 gl_cv_func_isnanl_no_libm=yes
19793else
19794 gl_cv_func_isnanl_no_libm=no
19795fi
19796rm -f core conftest.err conftest.$ac_objext \
19797 conftest$ac_exeext conftest.$ac_ext
19798
19799fi
19800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
19801$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
19802
19803 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
19804 if test $gl_func_isnanl_no_libm = yes; then
19805
19806
19807
19808
19809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
19810$as_echo_n "checking whether isnanl works... " >&6; }
d0ac1c44 19811if ${gl_cv_func_isnanl_works+:} false; then :
88b48903
WN
19812 $as_echo_n "(cached) " >&6
19813else
19814
19815 if test "$cross_compiling" = yes; then :
4a626d0a 19816 gl_cv_func_isnanl_works="guessing yes"
88b48903
WN
19817else
19818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19819/* end confdefs.h. */
19820
19821#include <float.h>
19822#include <limits.h>
19823#include <math.h>
19824#if __GNUC__ >= 4
19825# undef isnanl
19826# define isnanl(x) __builtin_isnanl ((long double)(x))
19827#elif defined isnan
19828# undef isnanl
19829# define isnanl(x) isnan ((long double)(x))
19830#endif
19831#define NWORDS \
19832 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19833typedef union { unsigned int word[NWORDS]; long double value; }
19834 memory_long_double;
19835/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
19836 runtime type conversion. */
19837#ifdef __sgi
19838static long double NaNl ()
19839{
19840 double zero = 0.0;
19841 return zero / zero;
19842}
19843#else
19844# define NaNl() (0.0L / 0.0L)
19845#endif
19846int main ()
19847{
19848 int result = 0;
19849
19850 if (!isnanl (NaNl ()))
19851 result |= 1;
19852
19853 {
19854 memory_long_double m;
19855 unsigned int i;
19856
19857 /* The isnanl function should be immune against changes in the sign bit and
19858 in the mantissa bits. The xor operation twiddles a bit that can only be
19859 a sign bit or a mantissa bit (since the exponent never extends to
19860 bit 31). */
19861 m.value = NaNl ();
19862 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
19863 for (i = 0; i < NWORDS; i++)
19864 m.word[i] |= 1;
19865 if (!isnanl (m.value))
19866 result |= 1;
19867 }
19868
19869#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
19870/* Representation of an 80-bit 'long double' as an initializer for a sequence
19871 of 'unsigned int' words. */
19872# ifdef WORDS_BIGENDIAN
19873# define LDBL80_WORDS(exponent,manthi,mantlo) \
19874 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
4a626d0a 19875 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
88b48903
WN
19876 (unsigned int) (mantlo) << 16 \
19877 }
19878# else
19879# define LDBL80_WORDS(exponent,manthi,mantlo) \
19880 { mantlo, manthi, exponent }
19881# endif
19882 { /* Quiet NaN. */
19883 static memory_long_double x =
19884 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
19885 if (!isnanl (x.value))
19886 result |= 2;
19887 }
19888 {
19889 /* Signalling NaN. */
19890 static memory_long_double x =
19891 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
19892 if (!isnanl (x.value))
19893 result |= 2;
19894 }
4a626d0a 19895 /* isnanl should return something even for noncanonical values. */
88b48903
WN
19896 { /* Pseudo-NaN. */
19897 static memory_long_double x =
19898 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
4a626d0a 19899 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
19900 result |= 4;
19901 }
19902 { /* Pseudo-Infinity. */
19903 static memory_long_double x =
19904 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
4a626d0a 19905 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
19906 result |= 8;
19907 }
19908 { /* Pseudo-Zero. */
19909 static memory_long_double x =
19910 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
4a626d0a 19911 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
19912 result |= 16;
19913 }
19914 { /* Unnormalized number. */
19915 static memory_long_double x =
19916 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
4a626d0a 19917 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
19918 result |= 32;
19919 }
19920 { /* Pseudo-Denormal. */
19921 static memory_long_double x =
19922 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
4a626d0a 19923 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
19924 result |= 64;
19925 }
19926#endif
19927
19928 return result;
19929}
19930_ACEOF
19931if ac_fn_c_try_run "$LINENO"; then :
19932 gl_cv_func_isnanl_works=yes
19933else
19934 gl_cv_func_isnanl_works=no
19935fi
19936rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19937 conftest.$ac_objext conftest.beam conftest.$ac_ext
19938fi
19939
19940
19941fi
19942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
19943$as_echo "$gl_cv_func_isnanl_works" >&6; }
19944
19945 case "$gl_cv_func_isnanl_works" in
19946 *yes) ;;
19947 *) gl_func_isnanl_no_libm=no ;;
19948 esac
19949 fi
19950 if test $gl_func_isnanl_no_libm = yes; then
19951
19952$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
19953
19954 fi
19955
19956 if test $gl_func_isnanl_no_libm != yes; then
19957
19958
19959
19960
19961
19962
19963
19964
19965 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
19966
19967
19968
19969
5e8754f9 19970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
88b48903 19971$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
d0ac1c44 19972if ${gl_cv_cc_long_double_expbit0+:} false; then :
88b48903
WN
19973 $as_echo_n "(cached) " >&6
19974else
19975
19976 if test "$cross_compiling" = yes; then :
19977
19978 gl_cv_cc_long_double_expbit0="unknown"
19979
19980else
19981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19982/* end confdefs.h. */
19983
19984#include <float.h>
19985#include <stddef.h>
19986#include <stdio.h>
19987#include <string.h>
19988#define NWORDS \
19989 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
19990typedef union { long double value; unsigned int word[NWORDS]; }
19991 memory_long_double;
19992static unsigned int ored_words[NWORDS];
19993static unsigned int anded_words[NWORDS];
19994static void add_to_ored_words (long double x)
19995{
19996 memory_long_double m;
19997 size_t i;
19998 /* Clear it first, in case
19999 sizeof (long double) < sizeof (memory_long_double). */
20000 memset (&m, 0, sizeof (memory_long_double));
20001 m.value = x;
20002 for (i = 0; i < NWORDS; i++)
20003 {
20004 ored_words[i] |= m.word[i];
20005 anded_words[i] &= m.word[i];
20006 }
20007}
20008int main ()
20009{
20010 size_t j;
20011 FILE *fp = fopen ("conftest.out", "w");
20012 if (fp == NULL)
20013 return 1;
20014 for (j = 0; j < NWORDS; j++)
20015 anded_words[j] = ~ (unsigned int) 0;
20016 add_to_ored_words (0.25L);
20017 add_to_ored_words (0.5L);
20018 add_to_ored_words (1.0L);
20019 add_to_ored_words (2.0L);
20020 add_to_ored_words (4.0L);
20021 /* Remove bits that are common (e.g. if representation of the first mantissa
20022 bit is explicit). */
20023 for (j = 0; j < NWORDS; j++)
20024 ored_words[j] &= ~anded_words[j];
20025 /* Now find the nonzero word. */
20026 for (j = 0; j < NWORDS; j++)
20027 if (ored_words[j] != 0)
20028 break;
20029 if (j < NWORDS)
20030 {
20031 size_t i;
20032 for (i = j + 1; i < NWORDS; i++)
20033 if (ored_words[i] != 0)
20034 {
20035 fprintf (fp, "unknown");
20036 return (fclose (fp) != 0);
20037 }
20038 for (i = 0; ; i++)
20039 if ((ored_words[j] >> i) & 1)
20040 {
20041 fprintf (fp, "word %d bit %d", (int) j, (int) i);
20042 return (fclose (fp) != 0);
20043 }
20044 }
20045 fprintf (fp, "unknown");
20046 return (fclose (fp) != 0);
20047}
20048
20049_ACEOF
20050if ac_fn_c_try_run "$LINENO"; then :
20051 gl_cv_cc_long_double_expbit0=`cat conftest.out`
20052else
20053 gl_cv_cc_long_double_expbit0="unknown"
20054fi
20055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20056 conftest.$ac_objext conftest.beam conftest.$ac_ext
20057fi
20058
20059 rm -f conftest.out
20060
20061fi
20062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
20063$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
20064 case "$gl_cv_cc_long_double_expbit0" in
20065 word*bit*)
20066 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
20067 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
20068
20069cat >>confdefs.h <<_ACEOF
20070#define LDBL_EXPBIT0_WORD $word
20071_ACEOF
20072
20073
20074cat >>confdefs.h <<_ACEOF
20075#define LDBL_EXPBIT0_BIT $bit
20076_ACEOF
20077
20078 ;;
20079 esac
20080
20081
20082
20083 fi
20084
20085
20086
20087
88b48903
WN
20088
20089
5e8754f9 20090 :
472fa5ee
SM
20091
20092
20093
20094
20095
88b48903
WN
20096
20097
2196f55f 20098
49e4877c 20099
5e8754f9 20100 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
88b48903
WN
20101
20102
20103
20104
472fa5ee
SM
20105 :
20106
20107
20108
20109
20110
f45c62c4
YQ
20111 if test $ac_cv_func_lstat = yes; then
20112
5e8754f9
SDJ
20113 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
20114 *no)
f45c62c4
YQ
20115 REPLACE_LSTAT=1
20116 ;;
20117 esac
20118 else
20119 HAVE_LSTAT=0
20120 fi
20121
20122 if test $REPLACE_LSTAT = 1; then
20123
20124
20125
20126
20127
20128
20129
20130
20131 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
20132
20133 :
20134 fi
20135
20136
20137
20138
20139
20140 GNULIB_LSTAT=1
20141
20142
20143
20144
20145
20146$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
20147
20148
20149
20150
20151
20152
6a29c58e
YQ
20153 if test $gl_cv_func_malloc_posix = yes; then
20154
20155$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
20156
20157 else
20158 REPLACE_MALLOC=1
20159 fi
20160
20161 if test $REPLACE_MALLOC = 1; then
20162
20163
20164
20165
20166
20167
20168
20169
20170 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
20171
20172 fi
20173
20174
20175
20176
20177
20178 GNULIB_MALLOC_POSIX=1
20179
20180
20181
20182
20183
20184$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
20185
20186
20187
20188
20189
20190
88b48903
WN
20191
20192
20193
20194
20195
88b48903 20196
c971b7fa 20197
c971b7fa 20198
98399780 20199
472fa5ee
SM
20200 :
20201
20202
20203
20204
20205
98399780
YQ
20206
20207
20208
88b48903
WN
20209 if test $gl_cv_have_include_next = yes; then
20210 gl_cv_next_math_h='<'math.h'>'
20211 else
20212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
20213$as_echo_n "checking absolute name of <math.h>... " >&6; }
d0ac1c44 20214if ${gl_cv_next_math_h+:} false; then :
88b48903
WN
20215 $as_echo_n "(cached) " >&6
20216else
c971b7fa 20217
88b48903 20218 if test $ac_cv_header_math_h = yes; then
c971b7fa
PA
20219
20220
4a626d0a
PA
20221
20222
20223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 20224/* end confdefs.h. */
88b48903 20225#include <math.h>
8690e634 20226_ACEOF
4a626d0a
PA
20227 case "$host_os" in
20228 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20229 *) gl_absname_cpp="$ac_cpp" ;;
20230 esac
20231
20232 case "$host_os" in
20233 mingw*)
20234 gl_dirsep_regex='[/\\]'
20235 ;;
20236 *)
20237 gl_dirsep_regex='\/'
20238 ;;
20239 esac
20240 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20241 gl_header_literal_regex=`echo 'math.h' \
20242 | sed -e "$gl_make_literal_regex_sed"`
20243 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20244 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20245 s|^/[^/]|//&|
20246 p
20247 q
20248 }'
20249
20250 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20251 sed -n "$gl_absolute_header_sed"`
20252
20253 gl_header=$gl_cv_absolute_math_h
20254 gl_cv_next_math_h='"'$gl_header'"'
88b48903
WN
20255 else
20256 gl_cv_next_math_h='<'math.h'>'
20257 fi
8690e634 20258
c971b7fa 20259
88b48903
WN
20260fi
20261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
20262$as_echo "$gl_cv_next_math_h" >&6; }
20263 fi
20264 NEXT_MATH_H=$gl_cv_next_math_h
c971b7fa 20265
88b48903
WN
20266 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20267 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20268 gl_next_as_first_directive='<'math.h'>'
20269 else
20270 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20271 gl_next_as_first_directive=$gl_cv_next_math_h
20272 fi
20273 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
8690e634 20274
c971b7fa 20275
c971b7fa
PA
20276
20277
c971b7fa 20278
88b48903
WN
20279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
20280$as_echo_n "checking whether NAN macro works... " >&6; }
d0ac1c44 20281if ${gl_cv_header_math_nan_works+:} false; then :
c971b7fa
PA
20282 $as_echo_n "(cached) " >&6
20283else
8690e634
JK
20284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20285/* end confdefs.h. */
88b48903 20286#include <math.h>
c971b7fa
PA
20287int
20288main ()
20289{
88b48903
WN
20290/* Solaris 10 has a broken definition of NAN. Other platforms
20291 fail to provide NAN, or provide it only in C99 mode; this
20292 test only needs to fail when NAN is provided but wrong. */
20293 float f = 1.0f;
20294#ifdef NAN
20295 f = NAN;
20296#endif
20297 return f == 0;
c971b7fa
PA
20298 ;
20299 return 0;
20300}
20301_ACEOF
20302if ac_fn_c_try_compile "$LINENO"; then :
88b48903 20303 gl_cv_header_math_nan_works=yes
8690e634 20304else
88b48903 20305 gl_cv_header_math_nan_works=no
c971b7fa
PA
20306fi
20307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 20308fi
88b48903
WN
20309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
20310$as_echo "$gl_cv_header_math_nan_works" >&6; }
20311 if test $gl_cv_header_math_nan_works = no; then
20312 REPLACE_NAN=1
c971b7fa 20313 fi
88b48903
WN
20314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
20315$as_echo_n "checking whether HUGE_VAL works... " >&6; }
d0ac1c44 20316if ${gl_cv_header_math_huge_val_works+:} false; then :
c971b7fa
PA
20317 $as_echo_n "(cached) " >&6
20318else
8690e634 20319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 20320/* end confdefs.h. */
88b48903 20321#include <math.h>
c971b7fa
PA
20322int
20323main ()
20324{
88b48903
WN
20325/* Solaris 10 has a broken definition of HUGE_VAL. */
20326 double d = HUGE_VAL;
20327 return d == 0;
c971b7fa
PA
20328 ;
20329 return 0;
20330}
20331_ACEOF
20332if ac_fn_c_try_compile "$LINENO"; then :
88b48903 20333 gl_cv_header_math_huge_val_works=yes
8690e634 20334else
88b48903 20335 gl_cv_header_math_huge_val_works=no
c971b7fa
PA
20336fi
20337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 20338fi
88b48903
WN
20339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
20340$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
20341 if test $gl_cv_header_math_huge_val_works = no; then
20342 REPLACE_HUGE_VAL=1
8690e634 20343 fi
c971b7fa 20344
c971b7fa 20345
5e8754f9
SDJ
20346 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
20347 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
20348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
20349$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
20350if eval \${$as_gl_Symbol+:} false; then :
20351 $as_echo_n "(cached) " >&6
20352else
20353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20354/* end confdefs.h. */
20355#include <math.h>
20356int
20357main ()
20358{
20359#undef $gl_func
20360 (void) $gl_func;
20361 ;
20362 return 0;
20363}
20364_ACEOF
20365if ac_fn_c_try_compile "$LINENO"; then :
20366 eval "$as_gl_Symbol=yes"
20367else
20368 eval "$as_gl_Symbol=no"
20369fi
20370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20371fi
20372eval ac_res=\$$as_gl_Symbol
20373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20374$as_echo "$ac_res" >&6; }
20375 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
20376 cat >>confdefs.h <<_ACEOF
20377#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
20378_ACEOF
c971b7fa 20379
5e8754f9
SDJ
20380 eval ac_cv_have_decl_$gl_func=yes
20381fi
20382 done
c971b7fa
PA
20383
20384
20385
20386
20387
c971b7fa 20388
c971b7fa 20389
c971b7fa 20390
c971b7fa
PA
20391
20392
c971b7fa 20393
472fa5ee
SM
20394 :
20395
20396
20397
20398
20399
20400
20401 :
20402
20403
20404
20405
8690e634
JK
20406
20407 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
20408
20409
20410
20411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
20412$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 20413if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
c971b7fa
PA
20414 $as_echo_n "(cached) " >&6
20415else
8690e634
JK
20416
20417 case "$host_os" in
20418 # Guess no on AIX and OSF/1.
20419 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
20420 # Guess yes otherwise.
20421 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
20422 esac
20423 if test $LOCALE_JA != none; then
20424 if test "$cross_compiling" = yes; then :
20425 :
20426else
c971b7fa
PA
20427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20428/* end confdefs.h. */
c971b7fa 20429
8690e634
JK
20430#include <locale.h>
20431#include <string.h>
20432/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20433 <wchar.h>.
20434 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20435 included before <wchar.h>. */
20436#include <stddef.h>
20437#include <stdio.h>
20438#include <time.h>
20439#include <wchar.h>
20440int main ()
c971b7fa 20441{
8690e634
JK
20442 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20443 {
20444 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20445 mbstate_t state;
20446 wchar_t wc;
20447
20448 memset (&state, '\0', sizeof (mbstate_t));
20449 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20450 if (mbsinit (&state))
5e8754f9 20451 return 1;
8690e634 20452 }
c971b7fa
PA
20453 return 0;
20454}
20455_ACEOF
8690e634
JK
20456if ac_fn_c_try_run "$LINENO"; then :
20457 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 20458else
8690e634 20459 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa 20460fi
8690e634
JK
20461rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20462 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 20463fi
c971b7fa 20464
8690e634 20465 fi
c971b7fa 20466
8690e634
JK
20467fi
20468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
20469$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 20470
c971b7fa 20471
c971b7fa 20472
c971b7fa 20473
8690e634
JK
20474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
20475$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 20476if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
20477 $as_echo_n "(cached) " >&6
20478else
20479
8690e634
JK
20480 case "$host_os" in
20481 # Guess no on Solaris 8.
20482 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
20483 # Guess yes otherwise.
20484 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
20485 esac
20486 if test $LOCALE_ZH_CN != none; then
20487 if test "$cross_compiling" = yes; then :
20488 :
20489else
20490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
20491/* end confdefs.h. */
20492
8690e634
JK
20493#include <locale.h>
20494#include <stdlib.h>
20495#include <string.h>
20496/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20497 <wchar.h>.
20498 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20499 included before <wchar.h>. */
20500#include <stddef.h>
20501#include <stdio.h>
20502#include <time.h>
20503#include <wchar.h>
20504int main ()
c971b7fa 20505{
8690e634
JK
20506 /* This fails on Solaris 8:
20507 mbrtowc returns 2, and sets wc to 0x00F0.
20508 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
20509 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20510 {
20511 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
20512 mbstate_t state;
20513 wchar_t wc;
20514
20515 memset (&state, '\0', sizeof (mbstate_t));
20516 if (mbrtowc (&wc, input + 3, 6, &state) != 4
20517 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 20518 return 1;
8690e634 20519 }
c971b7fa
PA
20520 return 0;
20521}
20522_ACEOF
8690e634
JK
20523if ac_fn_c_try_run "$LINENO"; then :
20524 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 20525else
8690e634 20526 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 20527fi
8690e634
JK
20528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20529 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 20530fi
c971b7fa 20531
8690e634 20532 fi
c971b7fa 20533
8690e634
JK
20534fi
20535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
20536$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
20537
20538 REPLACE_MBSTATE_T=0
20539 case "$gl_cv_func_mbrtowc_incomplete_state" in
20540 *yes) ;;
20541 *) REPLACE_MBSTATE_T=1 ;;
20542 esac
20543 case "$gl_cv_func_mbrtowc_sanitycheck" in
20544 *yes) ;;
20545 *) REPLACE_MBSTATE_T=1 ;;
20546 esac
c971b7fa 20547 else
8690e634 20548 REPLACE_MBSTATE_T=1
c971b7fa
PA
20549 fi
20550
20551
20552
472fa5ee
SM
20553 :
20554
20555
20556
20557
20558
8690e634
JK
20559 if test $ac_cv_func_mbrtowc = no; then
20560 HAVE_MBRTOWC=0
20561 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
20562/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20563 <wchar.h>.
20564 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20565 included before <wchar.h>. */
20566#include <stddef.h>
20567#include <stdio.h>
20568#include <time.h>
20569#include <wchar.h>
c971b7fa 20570
8690e634 20571"
d0ac1c44 20572if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
8690e634
JK
20573 ac_have_decl=1
20574else
20575 ac_have_decl=0
c971b7fa 20576fi
c971b7fa 20577
8690e634
JK
20578cat >>confdefs.h <<_ACEOF
20579#define HAVE_DECL_MBRTOWC $ac_have_decl
20580_ACEOF
c971b7fa 20581
8690e634
JK
20582 if test $ac_cv_have_decl_mbrtowc = yes; then
20583 REPLACE_MBRTOWC=1
20584 fi
20585 else
20586 if test $REPLACE_MBSTATE_T = 1; then
20587 REPLACE_MBRTOWC=1
20588 else
c971b7fa
PA
20589
20590
20591
8690e634
JK
20592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
20593$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
d0ac1c44 20594if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
8690e634 20595 $as_echo_n "(cached) " >&6
c971b7fa 20596else
c971b7fa 20597
8690e634
JK
20598 case "$host_os" in
20599 # Guess no on Solaris.
20600 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
20601 # Guess yes otherwise.
20602 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
20603 esac
20604 if test $LOCALE_FR_UTF8 != none; then
20605 if test "$cross_compiling" = yes; then :
20606 :
20607else
20608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
20609/* end confdefs.h. */
20610
8690e634
JK
20611#include <locale.h>
20612#include <stdlib.h>
20613#include <string.h>
20614/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20615 <wchar.h>.
20616 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20617 included before <wchar.h>. */
20618#include <stddef.h>
20619#include <stdio.h>
20620#include <time.h>
20621#include <wchar.h>
20622int main ()
20623{
20624 int result = 0;
20625
20626 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
20627 {
20628 char input[] = "\303\237er";
20629 mbstate_t state;
20630 wchar_t wc;
20631 size_t ret;
20632
20633 memset (&state, '\0', sizeof (mbstate_t));
20634 wc = (wchar_t) 0xBADFACE;
20635 ret = mbrtowc (&wc, input, 5, &state);
20636 if (ret != 2)
20637 result |= 1;
20638 if (!mbsinit (&state))
20639 result |= 2;
c971b7fa 20640
8690e634
JK
20641 memset (&state, '\0', sizeof (mbstate_t));
20642 ret = mbrtowc (NULL, input, 5, &state);
20643 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
20644 result |= 4;
20645 if (!mbsinit (&state))
20646 result |= 8;
20647 }
20648 return result;
20649}
c971b7fa 20650_ACEOF
8690e634
JK
20651if ac_fn_c_try_run "$LINENO"; then :
20652 gl_cv_func_mbrtowc_null_arg1=yes
20653else
20654 gl_cv_func_mbrtowc_null_arg1=no
20655fi
20656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20657 conftest.$ac_objext conftest.beam conftest.$ac_ext
20658fi
c971b7fa 20659
8690e634 20660 fi
c971b7fa 20661
c971b7fa 20662fi
8690e634
JK
20663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
20664$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
c971b7fa 20665
c971b7fa 20666
c971b7fa 20667
c971b7fa 20668
8690e634
JK
20669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
20670$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
d0ac1c44 20671if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
8690e634
JK
20672 $as_echo_n "(cached) " >&6
20673else
c971b7fa 20674
8690e634
JK
20675 case "$host_os" in
20676 # Guess no on OSF/1.
20677 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
20678 # Guess yes otherwise.
20679 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
20680 esac
20681 if test $LOCALE_FR_UTF8 != none; then
20682 if test "$cross_compiling" = yes; then :
c971b7fa 20683 :
8690e634
JK
20684else
20685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20686/* end confdefs.h. */
20687
20688#include <locale.h>
20689#include <string.h>
20690/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20691 <wchar.h>.
20692 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20693 included before <wchar.h>. */
20694#include <stddef.h>
20695#include <stdio.h>
20696#include <time.h>
20697#include <wchar.h>
20698int main ()
20699{
20700 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
20701 {
20702 mbstate_t state;
20703 wchar_t wc;
20704 int ret;
20705
20706 memset (&state, '\0', sizeof (mbstate_t));
20707 wc = (wchar_t) 0xBADFACE;
20708 mbrtowc (&wc, NULL, 5, &state);
20709 /* Check that wc was not modified. */
20710 if (wc != (wchar_t) 0xBADFACE)
5e8754f9 20711 return 1;
8690e634
JK
20712 }
20713 return 0;
20714}
20715_ACEOF
20716if ac_fn_c_try_run "$LINENO"; then :
20717 gl_cv_func_mbrtowc_null_arg2=yes
20718else
20719 gl_cv_func_mbrtowc_null_arg2=no
20720fi
20721rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20722 conftest.$ac_objext conftest.beam conftest.$ac_ext
20723fi
20724
20725 fi
20726
20727fi
20728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
20729$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
c971b7fa
PA
20730
20731
20732
20733
20734
20735
8690e634
JK
20736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
20737$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
d0ac1c44 20738if ${gl_cv_func_mbrtowc_retval+:} false; then :
8690e634
JK
20739 $as_echo_n "(cached) " >&6
20740else
20741
20742 case "$host_os" in
20743 # Guess no on HP-UX, Solaris, native Windows.
20744 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
20745 # Guess yes otherwise.
20746 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
20747 esac
20748 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
20749 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
20750 if test "$cross_compiling" = yes; then :
c971b7fa 20751 :
8690e634
JK
20752else
20753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20754/* end confdefs.h. */
c971b7fa 20755
8690e634
JK
20756#include <locale.h>
20757#include <string.h>
20758/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20759 <wchar.h>.
20760 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20761 included before <wchar.h>. */
20762#include <stddef.h>
20763#include <stdio.h>
20764#include <time.h>
20765#include <wchar.h>
20766int main ()
20767{
20768 int result = 0;
20769 int found_some_locale = 0;
20770 /* This fails on Solaris. */
20771 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
20772 {
20773 char input[] = "B\303\274\303\237er"; /* "Büßer" */
20774 mbstate_t state;
20775 wchar_t wc;
20776
20777 memset (&state, '\0', sizeof (mbstate_t));
20778 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20779 {
20780 input[1] = '\0';
20781 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
20782 result |= 1;
20783 }
20784 found_some_locale = 1;
20785 }
20786 /* This fails on HP-UX 11.11. */
20787 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20788 {
20789 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20790 mbstate_t state;
20791 wchar_t wc;
20792
20793 memset (&state, '\0', sizeof (mbstate_t));
20794 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20795 {
20796 input[1] = '\0';
20797 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
20798 result |= 2;
20799 }
20800 found_some_locale = 1;
20801 }
20802 /* This fails on native Windows. */
20803 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
20804 {
20805 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
20806 mbstate_t state;
20807 wchar_t wc;
20808
20809 memset (&state, '\0', sizeof (mbstate_t));
20810 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
20811 {
20812 input[3] = '\0';
20813 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
20814 result |= 4;
20815 }
20816 found_some_locale = 1;
20817 }
20818 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
20819 {
20820 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
20821 mbstate_t state;
20822 wchar_t wc;
20823
20824 memset (&state, '\0', sizeof (mbstate_t));
20825 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
20826 {
20827 input[3] = '\0';
20828 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
20829 result |= 8;
20830 }
20831 found_some_locale = 1;
20832 }
20833 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
20834 {
20835 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
20836 mbstate_t state;
20837 wchar_t wc;
20838
20839 memset (&state, '\0', sizeof (mbstate_t));
20840 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
20841 {
20842 input[3] = '\0';
20843 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
20844 result |= 16;
20845 }
20846 found_some_locale = 1;
20847 }
20848 return (found_some_locale ? result : 77);
20849}
20850_ACEOF
20851if ac_fn_c_try_run "$LINENO"; then :
20852 gl_cv_func_mbrtowc_retval=yes
20853else
20854 if test $? != 77; then
20855 gl_cv_func_mbrtowc_retval=no
20856 fi
c971b7fa 20857
8690e634
JK
20858fi
20859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20860 conftest.$ac_objext conftest.beam conftest.$ac_ext
20861fi
c971b7fa 20862
8690e634 20863 fi
c971b7fa 20864
8690e634
JK
20865fi
20866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
20867$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
c971b7fa
PA
20868
20869
20870
20871
8690e634
JK
20872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
20873$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
d0ac1c44 20874if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
c971b7fa
PA
20875 $as_echo_n "(cached) " >&6
20876else
8690e634
JK
20877
20878 case "$host_os" in
20879 # Guess no on Solaris 8 and 9.
20880 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
20881 # Guess yes otherwise.
20882 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
20883 esac
20884 if test $LOCALE_ZH_CN != none; then
20885 if test "$cross_compiling" = yes; then :
20886 :
c971b7fa
PA
20887else
20888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20889/* end confdefs.h. */
20890
8690e634 20891#include <locale.h>
c971b7fa 20892#include <string.h>
8690e634
JK
20893/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20894 <wchar.h>.
20895 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20896 included before <wchar.h>. */
20897#include <stddef.h>
20898#include <stdio.h>
20899#include <time.h>
20900#include <wchar.h>
20901int main ()
c971b7fa 20902{
8690e634
JK
20903 /* This fails on Solaris 8 and 9. */
20904 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
c971b7fa 20905 {
8690e634
JK
20906 mbstate_t state;
20907 wchar_t wc;
c971b7fa 20908
8690e634
JK
20909 memset (&state, '\0', sizeof (mbstate_t));
20910 if (mbrtowc (&wc, "", 1, &state) != 0)
5e8754f9 20911 return 1;
8690e634 20912 }
c971b7fa
PA
20913 return 0;
20914}
20915_ACEOF
20916if ac_fn_c_try_run "$LINENO"; then :
8690e634 20917 gl_cv_func_mbrtowc_nul_retval=yes
c971b7fa 20918else
8690e634 20919 gl_cv_func_mbrtowc_nul_retval=no
c971b7fa
PA
20920fi
20921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20922 conftest.$ac_objext conftest.beam conftest.$ac_ext
20923fi
20924
8690e634
JK
20925 fi
20926
c971b7fa 20927fi
8690e634
JK
20928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
20929$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
20930
4a626d0a
PA
20931
20932
20933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
20934$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
d0ac1c44 20935if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
4a626d0a
PA
20936 $as_echo_n "(cached) " >&6
20937else
20938
20939 case "$host_os" in
5e8754f9
SDJ
20940 # Guess no on AIX and glibc systems.
20941 aix* | *-gnu*)
20942 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
20943 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
4a626d0a
PA
20944 esac
20945 if test "$cross_compiling" = yes; then :
20946 :
20947else
20948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20949/* end confdefs.h. */
20950
20951 #include <wchar.h>
20952 static wchar_t wc;
20953 static mbstate_t mbs;
20954 int
20955 main (void)
20956 {
49e4877c 20957 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
4a626d0a
PA
20958 }
20959_ACEOF
20960if ac_fn_c_try_run "$LINENO"; then :
4a626d0a 20961 gl_cv_func_mbrtowc_empty_input=yes
49e4877c
PA
20962else
20963 gl_cv_func_mbrtowc_empty_input=no
4a626d0a
PA
20964fi
20965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20966 conftest.$ac_objext conftest.beam conftest.$ac_ext
20967fi
20968
20969
20970fi
20971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
20972$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
20973
49e4877c 20974
5e8754f9 20975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
49e4877c 20976$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
d0ac1c44 20977if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
49e4877c
PA
20978 $as_echo_n "(cached) " >&6
20979else
20980
20981 gl_cv_C_locale_sans_EILSEQ="guessing no"
20982
20983 if test "$cross_compiling" = yes; then :
5e8754f9 20984 :
49e4877c
PA
20985else
20986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20987/* end confdefs.h. */
20988#include <limits.h>
20989 #include <locale.h>
20990 #include <wchar.h>
20991
20992int
20993main ()
20994{
20995
20996 int i;
20997 char *locale = setlocale (LC_ALL, "C");
20998 if (! locale)
5e8754f9 20999 return 1;
49e4877c
PA
21000 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
21001 {
21002 char c = i;
21003 wchar_t wc;
21004 mbstate_t mbs = { 0, };
21005 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
21006 if (1 < ss)
5e8754f9 21007 return 1;
49e4877c
PA
21008 }
21009 return 0;
21010
6ec2e0f5
SDJ
21011 ;
21012 return 0;
21013}
21014_ACEOF
21015if ac_fn_c_try_run "$LINENO"; then :
21016 gl_cv_C_locale_sans_EILSEQ=yes
21017else
21018 gl_cv_C_locale_sans_EILSEQ=no
21019fi
21020rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21021 conftest.$ac_objext conftest.beam conftest.$ac_ext
21022fi
21023
21024fi
21025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
21026$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
21027
21028 case "$gl_cv_func_mbrtowc_null_arg1" in
21029 *yes) ;;
21030 *)
21031$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
21032
21033 REPLACE_MBRTOWC=1
21034 ;;
21035 esac
21036 case "$gl_cv_func_mbrtowc_null_arg2" in
21037 *yes) ;;
21038 *)
21039$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
21040
21041 REPLACE_MBRTOWC=1
21042 ;;
21043 esac
21044 case "$gl_cv_func_mbrtowc_retval" in
21045 *yes) ;;
21046 *)
21047$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
21048
21049 REPLACE_MBRTOWC=1
21050 ;;
21051 esac
21052 case "$gl_cv_func_mbrtowc_nul_retval" in
21053 *yes) ;;
21054 *)
21055$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
21056
21057 REPLACE_MBRTOWC=1
21058 ;;
21059 esac
21060 case "$gl_cv_func_mbrtowc_empty_input" in
21061 *yes) ;;
21062 *)
21063$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
21064
21065 REPLACE_MBRTOWC=1
21066 ;;
21067 esac
21068 case $gl_cv_C_locale_sans_EILSEQ in
21069 *yes) ;;
21070 *)
21071$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
21072
21073 REPLACE_MBRTOWC=1
21074 ;;
21075 esac
21076 fi
21077 fi
21078
21079 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
21080
21081
21082
21083
21084
21085
21086
21087
21088 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
21089
21090
21091 :
21092
21093 fi
21094
21095
21096
21097
21098
21099 GNULIB_MBRTOWC=1
21100
21101
21102
21103
21104
21105$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
472fa5ee
SM
21119 :
21120
21121
21122
21123
21124
21125
21126 :
21127
21128
21129
21130
6ec2e0f5
SDJ
21131
21132 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
21133
21134
21135
21136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21137$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 21138if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
6ec2e0f5
SDJ
21139 $as_echo_n "(cached) " >&6
21140else
21141
21142 case "$host_os" in
21143 # Guess no on AIX and OSF/1.
21144 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21145 # Guess yes otherwise.
21146 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21147 esac
21148 if test $LOCALE_JA != none; then
21149 if test "$cross_compiling" = yes; then :
21150 :
21151else
21152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21153/* end confdefs.h. */
21154
21155#include <locale.h>
21156#include <string.h>
21157/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21158 <wchar.h>.
21159 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21160 included before <wchar.h>. */
21161#include <stddef.h>
21162#include <stdio.h>
21163#include <time.h>
21164#include <wchar.h>
21165int main ()
21166{
21167 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21168 {
21169 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21170 mbstate_t state;
21171 wchar_t wc;
21172
21173 memset (&state, '\0', sizeof (mbstate_t));
21174 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21175 if (mbsinit (&state))
5e8754f9 21176 return 1;
6ec2e0f5
SDJ
21177 }
21178 return 0;
21179}
21180_ACEOF
21181if ac_fn_c_try_run "$LINENO"; then :
21182 gl_cv_func_mbrtowc_incomplete_state=yes
21183else
21184 gl_cv_func_mbrtowc_incomplete_state=no
21185fi
21186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21187 conftest.$ac_objext conftest.beam conftest.$ac_ext
21188fi
21189
21190 fi
21191
21192fi
21193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21194$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
21195
21196
21197
21198
21199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21200$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 21201if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
6ec2e0f5
SDJ
21202 $as_echo_n "(cached) " >&6
21203else
21204
21205 case "$host_os" in
21206 # Guess no on Solaris 8.
21207 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21208 # Guess yes otherwise.
21209 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21210 esac
21211 if test $LOCALE_ZH_CN != none; then
21212 if test "$cross_compiling" = yes; then :
21213 :
21214else
21215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21216/* end confdefs.h. */
21217
21218#include <locale.h>
21219#include <stdlib.h>
21220#include <string.h>
21221/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21222 <wchar.h>.
21223 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21224 included before <wchar.h>. */
21225#include <stddef.h>
21226#include <stdio.h>
21227#include <time.h>
21228#include <wchar.h>
21229int main ()
21230{
21231 /* This fails on Solaris 8:
21232 mbrtowc returns 2, and sets wc to 0x00F0.
21233 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
21234 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21235 {
21236 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21237 mbstate_t state;
21238 wchar_t wc;
21239
21240 memset (&state, '\0', sizeof (mbstate_t));
21241 if (mbrtowc (&wc, input + 3, 6, &state) != 4
21242 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 21243 return 1;
6ec2e0f5 21244 }
49e4877c
PA
21245 return 0;
21246}
21247_ACEOF
21248if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 21249 gl_cv_func_mbrtowc_sanitycheck=yes
49e4877c 21250else
6ec2e0f5 21251 gl_cv_func_mbrtowc_sanitycheck=no
49e4877c
PA
21252fi
21253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21254 conftest.$ac_objext conftest.beam conftest.$ac_ext
21255fi
21256
6ec2e0f5
SDJ
21257 fi
21258
49e4877c 21259fi
6ec2e0f5
SDJ
21260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21261$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
49e4877c 21262
6ec2e0f5
SDJ
21263 REPLACE_MBSTATE_T=0
21264 case "$gl_cv_func_mbrtowc_incomplete_state" in
21265 *yes) ;;
21266 *) REPLACE_MBSTATE_T=1 ;;
21267 esac
21268 case "$gl_cv_func_mbrtowc_sanitycheck" in
21269 *yes) ;;
21270 *) REPLACE_MBSTATE_T=1 ;;
21271 esac
21272 else
21273 REPLACE_MBSTATE_T=1
21274 fi
8690e634 21275
8690e634 21276
8690e634 21277
472fa5ee
SM
21278 :
21279
21280
21281
21282
21283
6ec2e0f5
SDJ
21284 if test $ac_cv_func_mbsinit = no; then
21285 HAVE_MBSINIT=0
21286 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
21287/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21288 <wchar.h>.
21289 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21290 included before <wchar.h>. */
21291#include <stddef.h>
21292#include <stdio.h>
21293#include <time.h>
21294#include <wchar.h>
8690e634 21295
6ec2e0f5 21296"
d0ac1c44 21297if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
6ec2e0f5
SDJ
21298 ac_have_decl=1
21299else
21300 ac_have_decl=0
21301fi
4a626d0a 21302
6ec2e0f5
SDJ
21303cat >>confdefs.h <<_ACEOF
21304#define HAVE_DECL_MBSINIT $ac_have_decl
21305_ACEOF
49e4877c 21306
6ec2e0f5
SDJ
21307 if test $ac_cv_have_decl_mbsinit = yes; then
21308 REPLACE_MBSINIT=1
21309 fi
21310 else
21311 if test $REPLACE_MBSTATE_T = 1; then
21312 REPLACE_MBSINIT=1
21313 else
21314 case "$host_os" in
21315 mingw*) REPLACE_MBSINIT=1 ;;
8690e634 21316 esac
c971b7fa
PA
21317 fi
21318 fi
21319
6ec2e0f5 21320 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
c971b7fa 21321
c971b7fa 21322
c971b7fa
PA
21323
21324
21325
21326
21327
21328
6ec2e0f5 21329 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
8690e634
JK
21330
21331
21332 :
c971b7fa 21333
a512b375 21334 fi
c971b7fa 21335
8690e634
JK
21336
21337
21338
21339
6ec2e0f5 21340 GNULIB_MBSINIT=1
8690e634
JK
21341
21342
21343
21344
8690e634 21345
6ec2e0f5 21346$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
8690e634
JK
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
c971b7fa 21358
472fa5ee
SM
21359 :
21360
21361
21362
21363
21364
21365
21366 :
21367
21368
21369
21370
c971b7fa 21371
8690e634 21372 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa 21373
8690e634
JK
21374
21375
21376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21377$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 21378if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
8690e634
JK
21379 $as_echo_n "(cached) " >&6
21380else
21381
21382 case "$host_os" in
21383 # Guess no on AIX and OSF/1.
21384 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21385 # Guess yes otherwise.
21386 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21387 esac
21388 if test $LOCALE_JA != none; then
21389 if test "$cross_compiling" = yes; then :
21390 :
c971b7fa
PA
21391else
21392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21393/* end confdefs.h. */
21394
8690e634
JK
21395#include <locale.h>
21396#include <string.h>
21397/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21398 <wchar.h>.
21399 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21400 included before <wchar.h>. */
21401#include <stddef.h>
21402#include <stdio.h>
21403#include <time.h>
21404#include <wchar.h>
21405int main ()
c971b7fa 21406{
8690e634 21407 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
c971b7fa 21408 {
8690e634
JK
21409 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21410 mbstate_t state;
21411 wchar_t wc;
21412
21413 memset (&state, '\0', sizeof (mbstate_t));
21414 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21415 if (mbsinit (&state))
5e8754f9 21416 return 1;
c971b7fa 21417 }
c971b7fa
PA
21418 return 0;
21419}
21420_ACEOF
21421if ac_fn_c_try_run "$LINENO"; then :
8690e634 21422 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 21423else
8690e634 21424 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa
PA
21425fi
21426rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21427 conftest.$ac_objext conftest.beam conftest.$ac_ext
21428fi
21429
8690e634 21430 fi
c971b7fa
PA
21431
21432fi
8690e634
JK
21433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21434$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa
PA
21435
21436
c971b7fa
PA
21437
21438
8690e634
JK
21439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21440$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 21441if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
21442 $as_echo_n "(cached) " >&6
21443else
8690e634
JK
21444
21445 case "$host_os" in
21446 # Guess no on Solaris 8.
21447 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21448 # Guess yes otherwise.
21449 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21450 esac
21451 if test $LOCALE_ZH_CN != none; then
21452 if test "$cross_compiling" = yes; then :
21453 :
21454else
c971b7fa
PA
21455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21456/* end confdefs.h. */
8690e634
JK
21457
21458#include <locale.h>
21459#include <stdlib.h>
21460#include <string.h>
21461/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21462 <wchar.h>.
21463 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21464 included before <wchar.h>. */
c971b7fa 21465#include <stddef.h>
8690e634
JK
21466#include <stdio.h>
21467#include <time.h>
21468#include <wchar.h>
21469int main ()
c971b7fa 21470{
8690e634
JK
21471 /* This fails on Solaris 8:
21472 mbrtowc returns 2, and sets wc to 0x00F0.
21473 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
21474 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21475 {
21476 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21477 mbstate_t state;
21478 wchar_t wc;
21479
21480 memset (&state, '\0', sizeof (mbstate_t));
21481 if (mbrtowc (&wc, input + 3, 6, &state) != 4
21482 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 21483 return 1;
8690e634 21484 }
c971b7fa
PA
21485 return 0;
21486}
21487_ACEOF
8690e634
JK
21488if ac_fn_c_try_run "$LINENO"; then :
21489 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 21490else
8690e634 21491 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 21492fi
8690e634
JK
21493rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21494 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 21495fi
c971b7fa 21496
8690e634
JK
21497 fi
21498
21499fi
21500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21501$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
c971b7fa 21502
8690e634
JK
21503 REPLACE_MBSTATE_T=0
21504 case "$gl_cv_func_mbrtowc_incomplete_state" in
21505 *yes) ;;
21506 *) REPLACE_MBSTATE_T=1 ;;
21507 esac
21508 case "$gl_cv_func_mbrtowc_sanitycheck" in
21509 *yes) ;;
21510 *) REPLACE_MBSTATE_T=1 ;;
21511 esac
21512 else
21513 REPLACE_MBSTATE_T=1
c971b7fa
PA
21514 fi
21515
c971b7fa 21516
8690e634 21517
472fa5ee
SM
21518 :
21519
21520
21521
21522
21523
6ec2e0f5
SDJ
21524 if test $ac_cv_func_mbsrtowcs = no; then
21525 HAVE_MBSRTOWCS=0
21526 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
8690e634
JK
21527/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21528 <wchar.h>.
21529 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21530 included before <wchar.h>. */
21531#include <stddef.h>
21532#include <stdio.h>
21533#include <time.h>
21534#include <wchar.h>
21535
21536"
d0ac1c44 21537if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
8690e634
JK
21538 ac_have_decl=1
21539else
21540 ac_have_decl=0
c971b7fa 21541fi
c971b7fa 21542
8690e634 21543cat >>confdefs.h <<_ACEOF
6ec2e0f5 21544#define HAVE_DECL_MBSRTOWCS $ac_have_decl
c971b7fa 21545_ACEOF
c971b7fa 21546
6ec2e0f5
SDJ
21547 if test $ac_cv_have_decl_mbsrtowcs = yes; then
21548 REPLACE_MBSRTOWCS=1
8690e634
JK
21549 fi
21550 else
21551 if test $REPLACE_MBSTATE_T = 1; then
6ec2e0f5 21552 REPLACE_MBSRTOWCS=1
8690e634 21553 else
6ec2e0f5
SDJ
21554
21555
21556
21557
21558
21559
21560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
21561$as_echo_n "checking whether mbsrtowcs works... " >&6; }
d0ac1c44 21562if ${gl_cv_func_mbsrtowcs_works+:} false; then :
6ec2e0f5
SDJ
21563 $as_echo_n "(cached) " >&6
21564else
21565
21566 case "$host_os" in
21567 # Guess no on HP-UX, Solaris, mingw.
21568 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
21569 # Guess yes otherwise.
21570 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
21571 esac
21572 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
21573 if test "$cross_compiling" = yes; then :
21574 :
21575else
21576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21577/* end confdefs.h. */
21578
21579#include <locale.h>
21580#include <string.h>
21581/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21582 <wchar.h>.
21583 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21584 included before <wchar.h>. */
21585#include <stddef.h>
21586#include <stdio.h>
21587#include <time.h>
21588#include <wchar.h>
21589int main ()
21590{
21591 int result = 0;
21592 /* Test whether the function supports a NULL destination argument.
21593 This fails on native Windows. */
21594 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
21595 {
21596 const char input[] = "\337er";
21597 const char *src = input;
21598 mbstate_t state;
21599
21600 memset (&state, '\0', sizeof (mbstate_t));
21601 if (mbsrtowcs (NULL, &src, 1, &state) != 3
21602 || src != input)
21603 result |= 1;
21604 }
21605 /* Test whether the function works when started with a conversion state
21606 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
21607 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
21608 {
21609 const char input[] = "B\303\274\303\237er";
21610 mbstate_t state;
21611
21612 memset (&state, '\0', sizeof (mbstate_t));
21613 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
21614 if (!mbsinit (&state))
21615 {
21616 const char *src = input + 2;
21617 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
21618 result |= 2;
21619 }
21620 }
21621 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21622 {
21623 const char input[] = "<\306\374\313\334\270\354>";
21624 mbstate_t state;
21625
21626 memset (&state, '\0', sizeof (mbstate_t));
21627 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
21628 if (!mbsinit (&state))
21629 {
21630 const char *src = input + 4;
21631 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
21632 result |= 4;
21633 }
21634 }
21635 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21636 {
21637 const char input[] = "B\250\271\201\060\211\070er";
21638 mbstate_t state;
21639
21640 memset (&state, '\0', sizeof (mbstate_t));
21641 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
21642 if (!mbsinit (&state))
21643 {
21644 const char *src = input + 2;
21645 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
21646 result |= 8;
21647 }
21648 }
21649 return result;
21650}
21651_ACEOF
21652if ac_fn_c_try_run "$LINENO"; then :
21653 gl_cv_func_mbsrtowcs_works=yes
21654else
21655 gl_cv_func_mbsrtowcs_works=no
21656fi
21657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21658 conftest.$ac_objext conftest.beam conftest.$ac_ext
21659fi
21660
21661 fi
21662
21663fi
21664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
21665$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
21666
21667 case "$gl_cv_func_mbsrtowcs_works" in
21668 *yes) ;;
21669 *) REPLACE_MBSRTOWCS=1 ;;
8690e634
JK
21670 esac
21671 fi
21672 fi
c971b7fa 21673
6ec2e0f5 21674 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
c971b7fa
PA
21675
21676
21677
21678
21679
21680
21681
21682
6ec2e0f5
SDJ
21683 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
c971b7fa
PA
21694
21695
8690e634 21696 :
c971b7fa 21697
a512b375 21698 fi
c971b7fa 21699
c971b7fa 21700
c971b7fa 21701
c971b7fa
PA
21702
21703
6ec2e0f5 21704 GNULIB_MBSRTOWCS=1
c971b7fa 21705
c971b7fa
PA
21706
21707
21708
21709
6ec2e0f5 21710$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
c971b7fa
PA
21711
21712
c971b7fa 21713
c971b7fa 21714
6ec2e0f5 21715 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
c971b7fa
PA
21716
21717
21718
c971b7fa 21719
c971b7fa
PA
21720
21721
21722
21723
6ec2e0f5 21724 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
8690e634 21725
c971b7fa 21726
6ec2e0f5
SDJ
21727 for ac_header in bp-sym.h
21728do :
21729 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
d0ac1c44 21730if test "x$ac_cv_header_bp_sym_h" = xyes; then :
6ec2e0f5
SDJ
21731 cat >>confdefs.h <<_ACEOF
21732#define HAVE_BP_SYM_H 1
21733_ACEOF
c971b7fa 21734
6ec2e0f5 21735fi
c971b7fa 21736
6ec2e0f5
SDJ
21737done
21738
21739
21740 fi
21741
21742
21743
21744
21745
21746 GNULIB_MEMCHR=1
21747
21748
21749
21750
21751
21752$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
21753
21754
21755
21756
21757
21758 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
21759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
21760$as_echo_n "checking whether memmem works in linear time... " >&6; }
d0ac1c44 21761if ${gl_cv_func_memmem_works_fast+:} false; then :
8690e634
JK
21762 $as_echo_n "(cached) " >&6
21763else
6ec2e0f5
SDJ
21764 if test "$cross_compiling" = yes; then :
21765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21766/* end confdefs.h. */
21767
21768#include <features.h>
21769#ifdef __GNU_LIBRARY__
21770 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
21771 && !defined __UCLIBC__
21772 Lucky user
21773 #endif
21774#endif
21775#ifdef __CYGWIN__
21776 #include <cygwin/version.h>
21777 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
21778 Lucky user
21779 #endif
21780#endif
21781
21782_ACEOF
21783if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21784 $EGREP "Lucky user" >/dev/null 2>&1; then :
21785 gl_cv_func_memmem_works_fast="guessing yes"
21786else
21787 gl_cv_func_memmem_works_fast="guessing no"
21788fi
21789rm -f conftest*
21790
c971b7fa 21791
8690e634
JK
21792else
21793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 21794/* end confdefs.h. */
c971b7fa 21795
6ec2e0f5
SDJ
21796#include <signal.h> /* for signal */
21797#include <string.h> /* for memmem */
21798#include <stdlib.h> /* for malloc */
21799#include <unistd.h> /* for alarm */
21800static void quit (int sig) { _exit (sig + 128); }
21801
21802int
21803main ()
8690e634 21804{
8690e634 21805
6ec2e0f5
SDJ
21806 int result = 0;
21807 size_t m = 1000000;
21808 char *haystack = (char *) malloc (2 * m + 1);
21809 char *needle = (char *) malloc (m + 1);
21810 /* Failure to compile this test due to missing alarm is okay,
21811 since all such platforms (mingw) also lack memmem. */
21812 signal (SIGALRM, quit);
21813 alarm (5);
21814 /* Check for quadratic performance. */
21815 if (haystack && needle)
21816 {
21817 memset (haystack, 'A', 2 * m);
21818 haystack[2 * m] = 'B';
21819 memset (needle, 'A', m);
21820 needle[m] = 'B';
21821 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
21822 result |= 1;
21823 }
21824 return result;
21825
21826 ;
c971b7fa
PA
21827 return 0;
21828}
21829_ACEOF
8690e634 21830if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 21831 gl_cv_func_memmem_works_fast=yes
8690e634 21832else
6ec2e0f5 21833 gl_cv_func_memmem_works_fast=no
8690e634
JK
21834fi
21835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21836 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 21837fi
c971b7fa
PA
21838
21839
8690e634 21840fi
6ec2e0f5
SDJ
21841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
21842$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
21843 case "$gl_cv_func_memmem_works_fast" in
21844 *yes) ;;
21845 *)
21846 REPLACE_MEMMEM=1
21847 ;;
21848 esac
21849 fi
c971b7fa 21850
6ec2e0f5 21851 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
8690e634
JK
21852
21853
21854
6ec2e0f5
SDJ
21855
21856
21857
21858
21859
21860 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
21861
21862 fi
21863
21864
21865
21866
21867 for ac_func in memmem
21868do :
21869 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 21870if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
21871 cat >>confdefs.h <<_ACEOF
21872#define HAVE_MEMMEM 1
21873_ACEOF
21874
21875fi
21876done
21877
21878 if test $ac_cv_func_memmem = yes; then
21879 HAVE_MEMMEM=1
21880 else
21881 HAVE_MEMMEM=0
21882 fi
21883
472fa5ee
SM
21884 :
21885
21886
21887
21888
21889
6ec2e0f5
SDJ
21890 if test $ac_cv_have_decl_memmem = no; then
21891 HAVE_DECL_MEMMEM=0
21892 else
21893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
21894$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 21895if ${gl_cv_func_memmem_works_always+:} false; then :
c971b7fa
PA
21896 $as_echo_n "(cached) " >&6
21897else
6ec2e0f5
SDJ
21898 if test "$cross_compiling" = yes; then :
21899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21900/* end confdefs.h. */
21901
21902#ifdef __GNU_LIBRARY__
21903 #include <features.h>
21904 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
21905 || __GLIBC_MINOR__ > 12)) \
21906 || (__GLIBC__ > 2)) \
21907 || defined __UCLIBC__
21908 Lucky user
21909 #endif
21910#elif defined __CYGWIN__
21911 #include <cygwin/version.h>
21912 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
21913 Lucky user
21914 #endif
21915#else
21916 Lucky user
21917#endif
21918
21919_ACEOF
21920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21921 $EGREP "Lucky user" >/dev/null 2>&1; then :
21922 gl_cv_func_memmem_works_always="guessing yes"
21923else
21924 gl_cv_func_memmem_works_always="guessing no"
21925fi
21926rm -f conftest*
21927
8690e634 21928
8690e634 21929else
c971b7fa
PA
21930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21931/* end confdefs.h. */
c971b7fa 21932
6ec2e0f5
SDJ
21933#include <string.h> /* for memmem */
21934#define P "_EF_BF_BD"
21935#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
21936#define NEEDLE P P P P P
21937
21938int
21939main ()
c971b7fa 21940{
8690e634 21941
6ec2e0f5
SDJ
21942 int result = 0;
21943 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
21944 result |= 1;
21945 /* Check for empty needle behavior. */
21946 {
21947 const char *haystack = "AAA";
21948 if (memmem (haystack, 3, NULL, 0) != haystack)
21949 result |= 2;
8690e634 21950 }
6ec2e0f5
SDJ
21951 return result;
21952
21953 ;
c971b7fa
PA
21954 return 0;
21955}
21956_ACEOF
8690e634 21957if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 21958 gl_cv_func_memmem_works_always=yes
c971b7fa 21959else
6ec2e0f5 21960 gl_cv_func_memmem_works_always=no
c971b7fa 21961fi
8690e634
JK
21962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21963 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 21964fi
8690e634 21965
8690e634
JK
21966
21967fi
6ec2e0f5
SDJ
21968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
21969$as_echo "$gl_cv_func_memmem_works_always" >&6; }
21970 case "$gl_cv_func_memmem_works_always" in
8690e634 21971 *yes) ;;
6ec2e0f5
SDJ
21972 *)
21973 REPLACE_MEMMEM=1
21974 ;;
8690e634 21975 esac
c971b7fa 21976 fi
6ec2e0f5 21977 :
c971b7fa 21978
6ec2e0f5 21979 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
c971b7fa 21980
c971b7fa 21981
8690e634 21982
c971b7fa 21983
6ec2e0f5
SDJ
21984
21985
21986
21987
21988 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
21989
21990 fi
21991
21992
21993
21994
21995
21996 GNULIB_MEMMEM=1
21997
21998
21999
22000
22001
22002$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012 for ac_func in mempcpy
22013do :
22014 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
d0ac1c44 22015if test "x$ac_cv_func_mempcpy" = xyes; then :
6ec2e0f5
SDJ
22016 cat >>confdefs.h <<_ACEOF
22017#define HAVE_MEMPCPY 1
8690e634 22018_ACEOF
c971b7fa 22019
6ec2e0f5
SDJ
22020fi
22021done
c971b7fa 22022
6ec2e0f5
SDJ
22023 if test $ac_cv_func_mempcpy = no; then
22024 HAVE_MEMPCPY=0
22025 fi
8690e634 22026
6ec2e0f5 22027 if test $HAVE_MEMPCPY = 0; then
8690e634
JK
22028
22029
22030
22031
8690e634 22032
6ec2e0f5
SDJ
22033
22034
22035
22036 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
22037
22038
8690e634 22039 :
c971b7fa 22040
6ec2e0f5 22041 fi
c971b7fa 22042
8690e634 22043
8690e634 22044
8690e634 22045
6ec2e0f5
SDJ
22046
22047 GNULIB_MEMPCPY=1
22048
22049
22050
22051
22052
22053$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
22054
22055
22056
22057
22058
22059
22060
22061
472fa5ee
SM
22062 :
22063
22064
22065
22066
22067
6ec2e0f5
SDJ
22068 if test $ac_cv_have_decl_memrchr = no; then
22069 HAVE_DECL_MEMRCHR=0
22070 fi
22071
22072 for ac_func in memrchr
22073do :
22074 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
d0ac1c44 22075if test "x$ac_cv_func_memrchr" = xyes; then :
6ec2e0f5
SDJ
22076 cat >>confdefs.h <<_ACEOF
22077#define HAVE_MEMRCHR 1
c971b7fa 22078_ACEOF
6ec2e0f5 22079
c971b7fa 22080fi
6ec2e0f5 22081done
8690e634 22082
8690e634 22083
6ec2e0f5 22084 if test $ac_cv_func_memrchr = no; then
8690e634 22085
6ec2e0f5
SDJ
22086
22087
22088
22089
22090
22091
22092
22093 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
22094
22095 :
c971b7fa
PA
22096 fi
22097
22098
c971b7fa 22099
c971b7fa 22100
c971b7fa 22101
6ec2e0f5
SDJ
22102 GNULIB_MEMRCHR=1
22103
22104
22105
22106
22107
22108$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
22109
22110
22111
22112
2d8adcbd 22113
8a99096f
SM
22114 :
22115
22116
22117
22118
22119
22120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
22121$as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
22122if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
22123 $as_echo_n "(cached) " >&6
22124else
22125 rm -rf conftest.dir
22126 if test "$cross_compiling" = yes; then :
22127 case "$host_os" in
5e8754f9
SDJ
22128 # Guess yes on glibc systems.
22129 *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
22130 # If we don't know, assume the worst.
22131 *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
8a99096f
SM
22132 esac
22133
22134else
22135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22136/* end confdefs.h. */
22137
22138# include <sys/types.h>
22139# include <sys/stat.h>
22140
22141int
22142main ()
22143{
22144return mkdir ("conftest.dir/", 0700);
22145 ;
22146 return 0;
22147}
22148_ACEOF
22149if ac_fn_c_try_run "$LINENO"; then :
22150 gl_cv_func_mkdir_trailing_slash_works=yes
22151else
22152 gl_cv_func_mkdir_trailing_slash_works=no
22153fi
22154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22155 conftest.$ac_objext conftest.beam conftest.$ac_ext
22156fi
22157
22158 rm -rf conftest.dir
22159
22160
22161fi
22162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
22163$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
22164 case "$gl_cv_func_mkdir_trailing_slash_works" in
22165 *yes) ;;
22166 *)
22167 REPLACE_MKDIR=1
22168 ;;
22169 esac
22170
22171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
22172$as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
22173if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
22174 $as_echo_n "(cached) " >&6
22175else
22176 rm -rf conftest.dir
22177 if test "$cross_compiling" = yes; then :
22178 case "$host_os" in
5e8754f9
SDJ
22179 # Guess yes on glibc systems.
22180 *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
22181 # If we don't know, assume the worst.
22182 *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
8a99096f
SM
22183 esac
22184
22185else
22186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22187/* end confdefs.h. */
22188
22189# include <sys/types.h>
22190# include <sys/stat.h>
22191
22192int
22193main ()
22194{
22195return !mkdir ("conftest.dir/./", 0700);
22196 ;
22197 return 0;
22198}
22199_ACEOF
22200if ac_fn_c_try_run "$LINENO"; then :
22201 gl_cv_func_mkdir_trailing_dot_works=yes
22202else
22203 gl_cv_func_mkdir_trailing_dot_works=no
22204fi
22205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22206 conftest.$ac_objext conftest.beam conftest.$ac_ext
22207fi
22208
22209 rm -rf conftest.dir
22210
22211
22212fi
22213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
22214$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
22215 case "$gl_cv_func_mkdir_trailing_dot_works" in
22216 *yes) ;;
22217 *)
22218 REPLACE_MKDIR=1
22219
22220$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
22221
22222 ;;
22223 esac
22224
22225 if test $REPLACE_MKDIR = 1; then
22226
22227
22228
22229
22230
22231
22232
22233
22234 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
22235
22236 fi
22237
22238
e8d8cce6
SM
22239 for ac_func in mkdtemp
22240do :
22241 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
22242if test "x$ac_cv_func_mkdtemp" = xyes; then :
22243 cat >>confdefs.h <<_ACEOF
22244#define HAVE_MKDTEMP 1
22245_ACEOF
22246
22247fi
22248done
22249
22250 if test $ac_cv_func_mkdtemp = no; then
22251 HAVE_MKDTEMP=0
22252 fi
22253
22254 if test $HAVE_MKDTEMP = 0; then
22255
22256
22257
22258
22259
22260
22261
22262
22263 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
22264
22265 :
22266
22267 fi
22268
22269
22270
22271
22272
22273 GNULIB_MKDTEMP=1
22274
22275
22276
22277
22278
22279$as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
22280
22281
22282
22283
22284
2d8adcbd
MM
22285
22286
b3279b60
TT
22287
22288
472fa5ee
SM
22289 :
22290
22291
22292
22293
22294
b3279b60
TT
22295 if test $ac_cv_func_mkostemp != yes; then
22296 HAVE_MKOSTEMP=0
22297 fi
2d8adcbd 22298
b3279b60 22299 if test $HAVE_MKOSTEMP = 0; then
2d8adcbd 22300
2d8adcbd 22301
2d8adcbd 22302
2d8adcbd 22303
2d8adcbd
MM
22304
22305
22306
22307
b3279b60 22308 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
2d8adcbd
MM
22309
22310
22311
b3279b60 22312 fi
2d8adcbd 22313
2d8adcbd 22314
b3279b60
TT
22315cat >>confdefs.h <<_ACEOF
22316#define GNULIB_MKOSTEMP 1
22317_ACEOF
2d8adcbd
MM
22318
22319
2d8adcbd
MM
22320
22321
22322
22323
22324
b3279b60 22325 GNULIB_MKOSTEMP=1
2d8adcbd
MM
22326
22327
22328
22329
22330
b3279b60 22331$as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
2d8adcbd
MM
22332
22333
22334
22335
6ec2e0f5
SDJ
22336 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
22337
22338
22339
c971b7fa 22340
c971b7fa 22341
c971b7fa
PA
22342
22343
8690e634 22344
6ec2e0f5 22345 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
8690e634 22346
6ec2e0f5 22347 fi
8690e634 22348
6ec2e0f5 22349 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
8690e634
JK
22350
22351
22352
22353
22354
22355
8690e634
JK
22356
22357
6ec2e0f5 22358 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
8690e634 22359
a512b375 22360 fi
8690e634
JK
22361
22362
725e2999
JB
22363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
22364$as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
22365if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
22366 $as_echo_n "(cached) " >&6
22367else
22368
22369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22370/* end confdefs.h. */
22371#include <netinet/in.h>
22372int
22373main ()
22374{
22375
22376 ;
22377 return 0;
22378}
22379_ACEOF
22380if ac_fn_c_try_compile "$LINENO"; then :
22381 gl_cv_header_netinet_in_h_selfcontained=yes
22382else
22383 gl_cv_header_netinet_in_h_selfcontained=no
22384fi
22385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22386
22387fi
22388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
22389$as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
22390 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
22391 NETINET_IN_H=''
22392 else
22393 NETINET_IN_H='netinet/in.h'
22394 for ac_header in netinet/in.h
22395do :
22396 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
22397if test "x$ac_cv_header_netinet_in_h" = xyes; then :
22398 cat >>confdefs.h <<_ACEOF
22399#define HAVE_NETINET_IN_H 1
22400_ACEOF
22401
22402fi
22403
22404done
22405
22406
22407
22408
22409
22410
22411
22412 :
22413
22414
22415
22416
22417
22418
22419
22420
22421 if test $gl_cv_have_include_next = yes; then
22422 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
22423 else
22424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
22425$as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
22426if ${gl_cv_next_netinet_in_h+:} false; then :
22427 $as_echo_n "(cached) " >&6
22428else
22429
22430 if test $ac_cv_header_netinet_in_h = yes; then
22431
22432
22433
22434
22435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22436/* end confdefs.h. */
22437#include <netinet/in.h>
22438_ACEOF
22439 case "$host_os" in
22440 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22441 *) gl_absname_cpp="$ac_cpp" ;;
22442 esac
22443
22444 case "$host_os" in
22445 mingw*)
22446 gl_dirsep_regex='[/\\]'
22447 ;;
22448 *)
22449 gl_dirsep_regex='\/'
22450 ;;
22451 esac
22452 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22453 gl_header_literal_regex=`echo 'netinet/in.h' \
22454 | sed -e "$gl_make_literal_regex_sed"`
22455 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22456 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22457 s|^/[^/]|//&|
22458 p
22459 q
22460 }'
22461
22462 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22463 sed -n "$gl_absolute_header_sed"`
22464
22465 gl_header=$gl_cv_absolute_netinet_in_h
22466 gl_cv_next_netinet_in_h='"'$gl_header'"'
22467 else
22468 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
22469 fi
22470
22471
22472fi
22473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
22474$as_echo "$gl_cv_next_netinet_in_h" >&6; }
22475 fi
22476 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
22477
22478 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22479 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22480 gl_next_as_first_directive='<'netinet/in.h'>'
22481 else
22482 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22483 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
22484 fi
22485 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
22486
22487
22488
22489
22490 if test $ac_cv_header_netinet_in_h = yes; then
22491 HAVE_NETINET_IN_H=1
22492 else
22493 HAVE_NETINET_IN_H=0
22494 fi
22495
22496 fi
22497
22498 if test -n "$NETINET_IN_H"; then
22499 GL_GENERATE_NETINET_IN_H_TRUE=
22500 GL_GENERATE_NETINET_IN_H_FALSE='#'
22501else
22502 GL_GENERATE_NETINET_IN_H_TRUE='#'
22503 GL_GENERATE_NETINET_IN_H_FALSE=
22504fi
22505
22506
22507
22508
8690e634 22509
6ec2e0f5
SDJ
22510 case "$host_os" in
22511 mingw* | pw*)
22512 REPLACE_OPEN=1
22513 ;;
22514 *)
22515
472fa5ee
SM
22516 :
22517
22518
22519
22520
22521
6ec2e0f5
SDJ
22522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
22523$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
d0ac1c44 22524if ${gl_cv_func_open_slash+:} false; then :
6ec2e0f5
SDJ
22525 $as_echo_n "(cached) " >&6
22526else
22527 # Assume that if we have lstat, we can also check symlinks.
22528 if test $ac_cv_func_lstat = yes; then
22529 touch conftest.tmp
22530 ln -s conftest.tmp conftest.lnk
22531 fi
22532 if test "$cross_compiling" = yes; then :
8690e634 22533
6ec2e0f5
SDJ
22534 case "$host_os" in
22535 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
22536 gl_cv_func_open_slash="guessing no" ;;
22537 *)
22538 gl_cv_func_open_slash="guessing yes" ;;
22539 esac
8690e634 22540
6ec2e0f5
SDJ
22541else
22542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22543/* end confdefs.h. */
22544
22545#include <fcntl.h>
22546#if HAVE_UNISTD_H
22547# include <unistd.h>
22548#endif
22549int main ()
22550{
22551 int result = 0;
22552#if HAVE_LSTAT
22553 if (open ("conftest.lnk/", O_RDONLY) != -1)
22554 result |= 1;
22555#endif
22556 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
22557 result |= 2;
22558 return result;
22559}
22560_ACEOF
22561if ac_fn_c_try_run "$LINENO"; then :
22562 gl_cv_func_open_slash=yes
22563else
22564 gl_cv_func_open_slash=no
22565fi
22566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22567 conftest.$ac_objext conftest.beam conftest.$ac_ext
22568fi
8690e634 22569
6ec2e0f5 22570 rm -f conftest.sl conftest.tmp conftest.lnk
8690e634 22571
6ec2e0f5
SDJ
22572fi
22573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
22574$as_echo "$gl_cv_func_open_slash" >&6; }
22575 case "$gl_cv_func_open_slash" in
22576 *no)
8690e634 22577
6ec2e0f5 22578$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
8690e634 22579
6ec2e0f5
SDJ
22580 REPLACE_OPEN=1
22581 ;;
22582 esac
22583 ;;
22584 esac
8690e634 22585
6ec2e0f5 22586 if test $REPLACE_OPEN = 0; then
c971b7fa
PA
22587
22588
22589
472fa5ee
SM
22590 :
22591
22592
22593
22594
22595
6ec2e0f5
SDJ
22596 if test $ac_cv_func_fchdir = no; then
22597 HAVE_FCHDIR=0
22598 fi
c971b7fa 22599
6ec2e0f5
SDJ
22600 if test $HAVE_FCHDIR = 0; then
22601 REPLACE_OPEN=1
22602 fi
22603 fi
c971b7fa
PA
22604
22605
22606
6ec2e0f5 22607 if test $REPLACE_OPEN = 1; then
c971b7fa
PA
22608
22609
22610
22611
22612
c971b7fa
PA
22613
22614
c971b7fa 22615
6ec2e0f5 22616 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
c971b7fa 22617
c971b7fa
PA
22618
22619
6ec2e0f5
SDJ
22620 :
22621
a512b375 22622 fi
c971b7fa
PA
22623
22624
22625
22626
22627
6ec2e0f5 22628 GNULIB_OPEN=1
c971b7fa
PA
22629
22630
22631
22632
22633
6ec2e0f5 22634$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
c971b7fa
PA
22635
22636
22637
22638
22639
c971b7fa 22640
c971b7fa 22641
472fa5ee
SM
22642 :
22643
22644
22645
22646
22647
63ce7108 22648
5e8754f9
SDJ
22649 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
22650 yes+*yes)
6ec2e0f5
SDJ
22651 ;;
22652 yes+*)
22653 # Solaris 9 has *at functions, but uniformly mishandles trailing
22654 # slash in all of them.
22655 REPLACE_OPENAT=1
22656 ;;
22657 *)
22658 HAVE_OPENAT=0
22659 ;;
22660 esac
63ce7108 22661
6ec2e0f5 22662 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
63ce7108 22663
63ce7108 22664
63ce7108 22665
63ce7108 22666
63ce7108
TT
22667
22668
63ce7108 22669
63ce7108 22670
6ec2e0f5 22671 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
63ce7108
TT
22672
22673
22674
6ec2e0f5 22675 :
63ce7108 22676
6ec2e0f5 22677 fi
63ce7108
TT
22678
22679
6ec2e0f5
SDJ
22680cat >>confdefs.h <<_ACEOF
22681#define GNULIB_OPENAT 1
22682_ACEOF
63ce7108 22683
63ce7108 22684
63ce7108
TT
22685
22686
22687
22688
6ec2e0f5 22689 GNULIB_OPENAT=1
63ce7108 22690
63ce7108 22691
63ce7108 22692
63ce7108 22693
63ce7108 22694
6ec2e0f5 22695$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
63ce7108
TT
22696
22697
63ce7108 22698
63ce7108 22699
63ce7108 22700
63ce7108 22701
6ec2e0f5
SDJ
22702 for ac_func in opendir
22703do :
22704 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
d0ac1c44 22705if test "x$ac_cv_func_opendir" = xyes; then :
6ec2e0f5
SDJ
22706 cat >>confdefs.h <<_ACEOF
22707#define HAVE_OPENDIR 1
63ce7108 22708_ACEOF
6ec2e0f5 22709
63ce7108 22710fi
6ec2e0f5 22711done
63ce7108 22712
6ec2e0f5
SDJ
22713 if test $ac_cv_func_opendir = no; then
22714 HAVE_OPENDIR=0
22715 fi
63ce7108 22716
6ec2e0f5
SDJ
22717
22718
22719
472fa5ee
SM
22720 :
22721
22722
22723
22724
22725
6ec2e0f5
SDJ
22726 if test $ac_cv_func_fchdir = no; then
22727 HAVE_FCHDIR=0
63ce7108 22728 fi
63ce7108 22729
6ec2e0f5
SDJ
22730 if test $HAVE_FCHDIR = 0; then
22731 if test $HAVE_OPENDIR = 1; then
22732 REPLACE_OPENDIR=1
22733 fi
22734 fi
22735
22736 case $host_os,$HAVE_OPENDIR in
22737 os2*,1)
22738 REPLACE_OPENDIR=1;;
22739 esac
22740
22741 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
63ce7108
TT
22742
22743
22744
22745
22746
22747
22748
22749
6ec2e0f5 22750 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
63ce7108
TT
22751
22752 fi
22753
22754
22755
22756
22757
6ec2e0f5 22758 GNULIB_OPENDIR=1
63ce7108
TT
22759
22760
22761
22762
63ce7108 22763
6ec2e0f5 22764$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
63ce7108
TT
22765
22766
22767
22768
22769
472fa5ee
SM
22770 :
22771
22772
22773
22774
22775
63ce7108
TT
22776
22777
2196f55f
YQ
22778
22779
8424cc97
SM
22780
22781 for ac_func in rawmemchr
22782do :
22783 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
d0ac1c44 22784if test "x$ac_cv_func_rawmemchr" = xyes; then :
8424cc97
SM
22785 cat >>confdefs.h <<_ACEOF
22786#define HAVE_RAWMEMCHR 1
22787_ACEOF
22788
22789fi
22790done
22791
22792 if test $ac_cv_func_rawmemchr = no; then
22793 HAVE_RAWMEMCHR=0
22794 fi
22795
22796 if test $HAVE_RAWMEMCHR = 0; then
22797
22798
22799
22800
22801
22802
22803
22804
22805 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
22806
22807 :
22808 fi
22809
22810
22811
22812
22813
22814 GNULIB_RAWMEMCHR=1
22815
22816
22817
22818
22819
22820$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
22821
22822
22823
22824
22825
22826
6ec2e0f5
SDJ
22827 for ac_func in readdir
22828do :
22829 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
d0ac1c44 22830if test "x$ac_cv_func_readdir" = xyes; then :
6ec2e0f5
SDJ
22831 cat >>confdefs.h <<_ACEOF
22832#define HAVE_READDIR 1
22833_ACEOF
22834
22835fi
22836done
22837
22838 if test $ac_cv_func_readdir = no; then
22839 HAVE_READDIR=0
22840 fi
22841
22842 if test $HAVE_READDIR = 0; then
22843
22844
22845
22846
22847
22848
22849
22850
22851 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
22852
22853 fi
22854
22855
22856
22857
22858
22859 GNULIB_READDIR=1
22860
22861
22862
22863
22864
22865$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
22866
22867
22868
22869
22870
22871
472fa5ee
SM
22872 :
22873
22874
22875
22876
22877
2196f55f
YQ
22878 if test $ac_cv_func_readlink = no; then
22879 HAVE_READLINK=0
22880 else
22881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
22882$as_echo_n "checking whether readlink signature is correct... " >&6; }
d0ac1c44 22883if ${gl_cv_decl_readlink_works+:} false; then :
2196f55f
YQ
22884 $as_echo_n "(cached) " >&6
22885else
22886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22887/* end confdefs.h. */
22888#include <unistd.h>
22889 /* Cause compilation failure if original declaration has wrong type. */
22890 ssize_t readlink (const char *, char *, size_t);
22891int
22892main ()
22893{
22894
22895 ;
22896 return 0;
22897}
22898_ACEOF
22899if ac_fn_c_try_compile "$LINENO"; then :
22900 gl_cv_decl_readlink_works=yes
22901else
22902 gl_cv_decl_readlink_works=no
22903fi
22904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22905fi
22906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
22907$as_echo "$gl_cv_decl_readlink_works" >&6; }
22908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
22909$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
d0ac1c44 22910if ${gl_cv_func_readlink_works+:} false; then :
2196f55f
YQ
22911 $as_echo_n "(cached) " >&6
22912else
22913 # We have readlink, so assume ln -s works.
22914 ln -s conftest.no-such conftest.link
22915 ln -s conftest.link conftest.lnk2
22916 if test "$cross_compiling" = yes; then :
22917 case "$host_os" in
5e8754f9
SDJ
22918 # Guess yes on glibc systems.
22919 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
22920 # If we don't know, assume the worst.
22921 *) gl_cv_func_readlink_works="guessing no" ;;
2196f55f
YQ
22922 esac
22923
22924else
22925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22926/* end confdefs.h. */
22927#include <unistd.h>
22928
22929int
22930main ()
22931{
22932char buf[20];
22933 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
22934 ;
22935 return 0;
22936}
22937_ACEOF
22938if ac_fn_c_try_run "$LINENO"; then :
22939 gl_cv_func_readlink_works=yes
22940else
22941 gl_cv_func_readlink_works=no
22942fi
22943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22944 conftest.$ac_objext conftest.beam conftest.$ac_ext
22945fi
22946
22947 rm -f conftest.link conftest.lnk2
22948fi
22949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
22950$as_echo "$gl_cv_func_readlink_works" >&6; }
22951 case "$gl_cv_func_readlink_works" in
22952 *yes)
22953 if test "$gl_cv_decl_readlink_works" != yes; then
22954 REPLACE_READLINK=1
22955 fi
22956 ;;
22957 *)
22958
22959$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
22960
22961 REPLACE_READLINK=1
22962 ;;
22963 esac
22964 fi
22965
22966 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
22967
22968
22969
22970
22971
22972
22973
22974
22975 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
22976
22977
22978 :
22979
22980 fi
22981
22982
22983
22984
22985
22986 GNULIB_READLINK=1
22987
22988
22989
22990
22991
22992$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
22993
22994
22995
22996
6a29c58e
YQ
22997
22998
6ec2e0f5
SDJ
22999 if test $gl_cv_func_malloc_posix = yes; then
23000
23001$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
23002
23003 else
23004 REPLACE_REALLOC=1
23005 fi
23006
23007 if test $REPLACE_REALLOC = 1; then
23008
23009
23010
23011
23012
23013
23014
23015
23016 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
23017
23018 fi
23019
23020
23021
23022
23023
23024 GNULIB_REALLOC_POSIX=1
23025
23026
23027
23028
23029
23030$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
23031
23032
23033
23034
23035
23036
6a29c58e 23037
472fa5ee
SM
23038 :
23039
23040
23041
23042
23043
6a29c58e
YQ
23044
23045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
23046$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
d0ac1c44 23047if ${gl_cv_func_rename_slash_dst_works+:} false; then :
6a29c58e
YQ
23048 $as_echo_n "(cached) " >&6
23049else
23050 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
23051 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 23052 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
23053 # Assume that if we have lstat, we can also check symlinks.
23054 if test $ac_cv_func_lstat = yes; then
23055 ln -s conftest.f conftest.lnk
23056 fi
23057 if test "$cross_compiling" = yes; then :
23058 case "$host_os" in
5e8754f9
SDJ
23059 # Guess yes on glibc systems.
23060 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
23061 # If we don't know, assume the worst.
23062 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
6a29c58e
YQ
23063 esac
23064
23065else
23066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23067/* end confdefs.h. */
23068
23069# include <stdio.h>
23070# include <stdlib.h>
23071
23072int
23073main ()
23074{
23075int result = 0;
23076 if (rename ("conftest.f1", "conftest.f2/") == 0)
23077 result |= 1;
23078 if (rename ("conftest.d1", "conftest.d2/") != 0)
23079 result |= 2;
23080#if HAVE_LSTAT
23081 if (rename ("conftest.f", "conftest.lnk/") == 0)
23082 result |= 4;
23083#endif
23084 return result;
23085
23086 ;
23087 return 0;
23088}
23089_ACEOF
23090if ac_fn_c_try_run "$LINENO"; then :
23091 gl_cv_func_rename_slash_dst_works=yes
23092else
23093 gl_cv_func_rename_slash_dst_works=no
23094fi
23095rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23096 conftest.$ac_objext conftest.beam conftest.$ac_ext
23097fi
23098
23099 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
23100
23101fi
23102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
23103$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
23104 case "$gl_cv_func_rename_slash_dst_works" in
23105 *yes) ;;
23106 *)
23107 REPLACE_RENAME=1
23108
23109$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
23110
23111 ;;
23112 esac
23113
23114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
23115$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
d0ac1c44 23116if ${gl_cv_func_rename_slash_src_works+:} false; then :
6a29c58e
YQ
23117 $as_echo_n "(cached) " >&6
23118else
23119 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
23120 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 23121 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
23122 # Assume that if we have lstat, we can also check symlinks.
23123 if test $ac_cv_func_lstat = yes; then
23124 ln -s conftest.f conftest.lnk
23125 fi
23126 if test "$cross_compiling" = yes; then :
23127 case "$host_os" in
5e8754f9
SDJ
23128 # Guess yes on glibc systems.
23129 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
23130 # If we don't know, assume the worst.
23131 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
6a29c58e
YQ
23132 esac
23133
23134else
23135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23136/* end confdefs.h. */
23137
23138# include <stdio.h>
23139# include <stdlib.h>
23140
23141int
23142main ()
23143{
23144int result = 0;
23145 if (rename ("conftest.f1/", "conftest.d3") == 0)
23146 result |= 1;
23147 if (rename ("conftest.d1/", "conftest.d2") != 0)
23148 result |= 2;
23149#if HAVE_LSTAT
23150 if (rename ("conftest.lnk/", "conftest.f") == 0)
23151 result |= 4;
23152#endif
23153 return result;
23154
23155 ;
23156 return 0;
23157}
23158_ACEOF
23159if ac_fn_c_try_run "$LINENO"; then :
23160 gl_cv_func_rename_slash_src_works=yes
23161else
23162 gl_cv_func_rename_slash_src_works=no
23163fi
23164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23165 conftest.$ac_objext conftest.beam conftest.$ac_ext
23166fi
23167
23168 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
23169
23170fi
23171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
23172$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
23173 case "$gl_cv_func_rename_slash_src_works" in
23174 *yes) ;;
23175 *)
23176 REPLACE_RENAME=1
23177
23178$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
23179
23180 ;;
23181 esac
23182
23183
472fa5ee
SM
23184 :
23185
23186
23187
23188
23189
6a29c58e
YQ
23190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
23191$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
d0ac1c44 23192if ${gl_cv_func_rename_link_works+:} false; then :
6a29c58e
YQ
23193 $as_echo_n "(cached) " >&6
23194else
23195 if test $ac_cv_func_link = yes; then
5e8754f9
SDJ
23196 rm -rf conftest.f conftest.f1
23197 if touch conftest.f && ln conftest.f conftest.f1 &&
6a29c58e
YQ
23198 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
23199 if test "$cross_compiling" = yes; then :
23200 case "$host_os" in
5e8754f9
SDJ
23201 # Guess yes on glibc systems.
23202 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
23203 # If we don't know, assume the worst.
23204 *) gl_cv_func_rename_link_works="guessing no" ;;
6a29c58e
YQ
23205 esac
23206
23207else
23208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23209/* end confdefs.h. */
23210
23211# include <stdio.h>
23212# include <stdlib.h>
23213# include <unistd.h>
23214
23215int
23216main ()
23217{
23218int result = 0;
23219 if (rename ("conftest.f", "conftest.f1"))
23220 result |= 1;
23221 if (unlink ("conftest.f1"))
23222 result |= 2;
5e8754f9 23223 if (rename ("conftest.f", "conftest.f"))
6a29c58e
YQ
23224 result |= 4;
23225 if (rename ("conftest.f1", "conftest.f1") == 0)
23226 result |= 8;
23227 return result;
23228
23229 ;
23230 return 0;
23231}
23232_ACEOF
23233if ac_fn_c_try_run "$LINENO"; then :
23234 gl_cv_func_rename_link_works=yes
23235else
23236 gl_cv_func_rename_link_works=no
23237fi
23238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23239 conftest.$ac_objext conftest.beam conftest.$ac_ext
23240fi
23241
23242 else
23243 gl_cv_func_rename_link_works="guessing no"
23244 fi
5e8754f9 23245 rm -rf conftest.f conftest.f1
6a29c58e
YQ
23246 else
23247 gl_cv_func_rename_link_works=yes
23248 fi
23249
23250fi
23251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
23252$as_echo "$gl_cv_func_rename_link_works" >&6; }
23253 case "$gl_cv_func_rename_link_works" in
23254 *yes) ;;
23255 *)
23256 REPLACE_RENAME=1
23257
23258$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
23259
23260 ;;
23261 esac
23262
23263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
23264$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
d0ac1c44 23265if ${gl_cv_func_rename_dest_works+:} false; then :
6a29c58e
YQ
23266 $as_echo_n "(cached) " >&6
23267else
23268 rm -rf conftest.f conftest.d1 conftest.d2
23269 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
d0ac1c44 23270 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
23271 if test "$cross_compiling" = yes; then :
23272 case "$host_os" in
5e8754f9
SDJ
23273 # Guess yes on glibc systems.
23274 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
23275 # If we don't know, assume the worst.
23276 *) gl_cv_func_rename_dest_works="guessing no" ;;
6a29c58e
YQ
23277 esac
23278
23279else
23280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23281/* end confdefs.h. */
23282
23283# include <stdio.h>
23284# include <stdlib.h>
23285
23286int
23287main ()
23288{
23289int result = 0;
23290 if (rename ("conftest.d1", "conftest.d2") != 0)
23291 result |= 1;
23292 if (rename ("conftest.d2", "conftest.f") == 0)
23293 result |= 2;
23294 return result;
23295
23296 ;
23297 return 0;
23298}
23299_ACEOF
23300if ac_fn_c_try_run "$LINENO"; then :
23301 gl_cv_func_rename_dest_works=yes
23302else
23303 gl_cv_func_rename_dest_works=no
23304fi
23305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23306 conftest.$ac_objext conftest.beam conftest.$ac_ext
23307fi
23308
23309 rm -rf conftest.f conftest.d1 conftest.d2
23310
23311fi
23312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
23313$as_echo "$gl_cv_func_rename_dest_works" >&6; }
23314 case "$gl_cv_func_rename_dest_works" in
23315 *yes) ;;
23316 *)
23317 REPLACE_RENAME=1
23318
23319$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
23320
23321 ;;
23322 esac
23323
23324 if test $REPLACE_RENAME = 1; then
23325
23326
23327
23328
23329
23330
23331
23332
23333 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
23334
23335 fi
23336
23337
23338
23339
23340
23341 GNULIB_RENAME=1
23342
23343
23344
23345
23346
23347$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
23348
23349
23350
23351
23352
23353
6ec2e0f5
SDJ
23354 for ac_func in rewinddir
23355do :
23356 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
d0ac1c44 23357if test "x$ac_cv_func_rewinddir" = xyes; then :
6ec2e0f5
SDJ
23358 cat >>confdefs.h <<_ACEOF
23359#define HAVE_REWINDDIR 1
23360_ACEOF
23361
23362fi
23363done
23364
23365 if test $ac_cv_func_rewinddir = no; then
23366 HAVE_REWINDDIR=0
23367 fi
23368
23369 if test $HAVE_REWINDDIR = 0; then
23370
23371
23372
23373
23374
23375
23376
23377
23378 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
23379
23380 fi
23381
23382
23383
23384
23385
23386 GNULIB_REWINDDIR=1
23387
23388
23389
23390
23391
23392$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
23393
23394
23395
23396
23397
23398
472fa5ee
SM
23399 :
23400
23401
23402
23403
23404
6a29c58e
YQ
23405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
23406$as_echo_n "checking whether rmdir works... " >&6; }
d0ac1c44 23407if ${gl_cv_func_rmdir_works+:} false; then :
6a29c58e
YQ
23408 $as_echo_n "(cached) " >&6
23409else
23410 mkdir conftest.dir
23411 touch conftest.file
23412 if test "$cross_compiling" = yes; then :
23413 case "$host_os" in
5e8754f9
SDJ
23414 # Guess yes on glibc systems.
23415 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
23416 # If we don't know, assume the worst.
23417 *) gl_cv_func_rmdir_works="guessing no" ;;
6a29c58e
YQ
23418 esac
23419
23420else
23421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23422/* end confdefs.h. */
23423#include <stdio.h>
23424 #include <errno.h>
23425 #if HAVE_UNISTD_H
23426 # include <unistd.h>
23427 #else /* on Windows with MSVC */
23428 # include <direct.h>
23429 #endif
23430
23431int
23432main ()
23433{
23434int result = 0;
23435 if (!rmdir ("conftest.file/"))
23436 result |= 1;
23437 else if (errno != ENOTDIR)
23438 result |= 2;
23439 if (!rmdir ("conftest.dir/./"))
23440 result |= 4;
23441 return result;
23442
23443 ;
23444 return 0;
23445}
23446_ACEOF
23447if ac_fn_c_try_run "$LINENO"; then :
23448 gl_cv_func_rmdir_works=yes
23449else
23450 gl_cv_func_rmdir_works=no
23451fi
23452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23453 conftest.$ac_objext conftest.beam conftest.$ac_ext
23454fi
23455
23456 rm -rf conftest.dir conftest.file
23457fi
23458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
23459$as_echo "$gl_cv_func_rmdir_works" >&6; }
23460 case "$gl_cv_func_rmdir_works" in
23461 *yes) ;;
23462 *)
23463 REPLACE_RMDIR=1
23464 ;;
23465 esac
23466
23467 if test $REPLACE_RMDIR = 1; then
23468
23469
23470
23471
23472
23473
23474
23475
23476 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
23477
23478 fi
23479
23480
23481
23482
23483
23484 GNULIB_RMDIR=1
23485
23486
23487
23488
23489
23490$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
23491
23492
23493
23494
0750520d 23495
472fa5ee
SM
23496 :
23497
23498
23499
23500
23501
23502
23503
23504
5e8754f9
SDJ
23505
23506
23507
23508 :
23509
23510
23511
23512
23513
23514 if test $ac_cv_func_secure_getenv = no; then
23515 HAVE_SECURE_GETENV=0
23516 fi
23517
23518 if test $HAVE_SECURE_GETENV = 0; then
23519
23520
23521
23522
23523
23524
23525
23526
23527 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
23528
23529
23530 for ac_func in __secure_getenv
23531do :
23532 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
23533if test "x$ac_cv_func___secure_getenv" = xyes; then :
23534 cat >>confdefs.h <<_ACEOF
23535#define HAVE___SECURE_GETENV 1
23536_ACEOF
23537
23538fi
23539done
23540
23541 if test $ac_cv_func___secure_getenv = no; then
23542 for ac_func in issetugid
23543do :
23544 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
23545if test "x$ac_cv_func_issetugid" = xyes; then :
23546 cat >>confdefs.h <<_ACEOF
23547#define HAVE_ISSETUGID 1
23548_ACEOF
23549
23550fi
23551done
23552
23553 fi
23554
23555 :
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
23568
23569
23570
23571 fi
23572
23573
23574
23575
23576
23577 GNULIB_SECURE_GETENV=1
23578
23579
23580
23581
23582
23583$as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
23584
23585
23586
23587
23588
3d99e817
AK
23589 if test $ac_cv_func_setenv = no; then
23590 HAVE_SETENV=0
23591 else
23592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
23593$as_echo_n "checking whether setenv validates arguments... " >&6; }
d0ac1c44 23594if ${gl_cv_func_setenv_works+:} false; then :
3d99e817
AK
23595 $as_echo_n "(cached) " >&6
23596else
23597 if test "$cross_compiling" = yes; then :
23598 case "$host_os" in
5e8754f9
SDJ
23599 # Guess yes on glibc systems.
23600 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
23601 # If we don't know, assume the worst.
23602 *) gl_cv_func_setenv_works="guessing no" ;;
3d99e817
AK
23603 esac
23604
23605else
23606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23607/* end confdefs.h. */
23608
23609 #include <stdlib.h>
23610 #include <errno.h>
23611 #include <string.h>
23612
23613int
23614main ()
23615{
23616
23617 int result = 0;
23618 {
23619 if (setenv ("", "", 0) != -1)
23620 result |= 1;
23621 else if (errno != EINVAL)
23622 result |= 2;
23623 }
23624 {
23625 if (setenv ("a", "=", 1) != 0)
23626 result |= 4;
23627 else if (strcmp (getenv ("a"), "=") != 0)
23628 result |= 8;
23629 }
23630 return result;
23631
23632 ;
23633 return 0;
23634}
23635_ACEOF
23636if ac_fn_c_try_run "$LINENO"; then :
23637 gl_cv_func_setenv_works=yes
23638else
23639 gl_cv_func_setenv_works=no
23640fi
23641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23642 conftest.$ac_objext conftest.beam conftest.$ac_ext
23643fi
23644
23645fi
23646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
23647$as_echo "$gl_cv_func_setenv_works" >&6; }
23648 case "$gl_cv_func_setenv_works" in
23649 *yes) ;;
23650 *)
23651 REPLACE_SETENV=1
23652 ;;
23653 esac
23654 fi
23655
23656 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
23657
23658
23659
23660
23661
23662
23663
23664
23665 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
23666
23667 fi
23668
23669
23670
23671
23672
23673 GNULIB_SETENV=1
23674
23675
23676
23677
23678
23679$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
23680
23681
23682
23683
23684
0750520d
PA
23685
23686
23687
23688
23689
23690
23691
23692
23693
23694 if test $gl_cv_have_include_next = yes; then
23695 gl_cv_next_signal_h='<'signal.h'>'
23696 else
23697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
23698$as_echo_n "checking absolute name of <signal.h>... " >&6; }
d0ac1c44 23699if ${gl_cv_next_signal_h+:} false; then :
0750520d
PA
23700 $as_echo_n "(cached) " >&6
23701else
23702
23703
23704
23705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23706/* end confdefs.h. */
23707#include <signal.h>
23708_ACEOF
23709 case "$host_os" in
23710 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23711 *) gl_absname_cpp="$ac_cpp" ;;
23712 esac
23713
23714 case "$host_os" in
23715 mingw*)
23716 gl_dirsep_regex='[/\\]'
23717 ;;
23718 *)
23719 gl_dirsep_regex='\/'
23720 ;;
23721 esac
23722 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23723 gl_header_literal_regex=`echo 'signal.h' \
23724 | sed -e "$gl_make_literal_regex_sed"`
23725 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23726 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23727 s|^/[^/]|//&|
23728 p
23729 q
23730 }'
23731
23732 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23733 sed -n "$gl_absolute_header_sed"`
23734
23735 gl_header=$gl_cv_absolute_signal_h
23736 gl_cv_next_signal_h='"'$gl_header'"'
23737
23738
23739fi
23740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
23741$as_echo "$gl_cv_next_signal_h" >&6; }
23742 fi
23743 NEXT_SIGNAL_H=$gl_cv_next_signal_h
23744
23745 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23746 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23747 gl_next_as_first_directive='<'signal.h'>'
23748 else
23749 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23750 gl_next_as_first_directive=$gl_cv_next_signal_h
23751 fi
23752 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
23753
23754
23755
23756
23757
23758# AIX declares sig_atomic_t to already include volatile, and C89 compilers
23759# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
23760 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
23761#include <signal.h>
23762
23763"
d0ac1c44 23764if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
0750520d
PA
23765
23766else
23767 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
23768fi
23769
23770
23771
23772
23773
23774
23775
23776 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
23777#include <signal.h>
23778
23779"
d0ac1c44 23780if test "x$ac_cv_type_sighandler_t" = xyes; then :
0750520d
PA
23781
23782else
23783 HAVE_SIGHANDLER_T=0
23784fi
23785
23786
23787
5e8754f9
SDJ
23788 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
23789 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23791$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
23792if eval \${$as_gl_Symbol+:} false; then :
23793 $as_echo_n "(cached) " >&6
23794else
23795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23796/* end confdefs.h. */
23797#include <signal.h>
23798
23799int
23800main ()
23801{
23802#undef $gl_func
23803 (void) $gl_func;
23804 ;
23805 return 0;
23806}
23807_ACEOF
23808if ac_fn_c_try_compile "$LINENO"; then :
23809 eval "$as_gl_Symbol=yes"
23810else
23811 eval "$as_gl_Symbol=no"
23812fi
23813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23814fi
23815eval ac_res=\$$as_gl_Symbol
23816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23817$as_echo "$ac_res" >&6; }
23818 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
23819 cat >>confdefs.h <<_ACEOF
23820#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23821_ACEOF
0750520d 23822
5e8754f9
SDJ
23823 eval ac_cv_have_decl_$gl_func=yes
23824fi
23825 done
0750520d
PA
23826
23827
725e2999
JB
23828 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
23829/* <sys/types.h> is not needed according to POSIX, but the
23830 <sys/socket.h> in i386-unknown-freebsd4.10 and
23831 powerpc-apple-darwin5.5 required it. */
23832#include <sys/types.h>
23833#if HAVE_SYS_SOCKET_H
23834# include <sys/socket.h>
23835#elif HAVE_WS2TCPIP_H
23836# include <ws2tcpip.h>
23837#endif
23838
23839"
23840if test "x$ac_cv_type_socklen_t" = xyes; then :
23841
23842else
23843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
23844$as_echo_n "checking for socklen_t equivalent... " >&6; }
23845 if ${gl_cv_socklen_t_equiv+:} false; then :
23846 $as_echo_n "(cached) " >&6
23847else
23848 # Systems have either "struct sockaddr *" or
23849 # "void *" as the second argument to getpeername
23850 gl_cv_socklen_t_equiv=
23851 for arg2 in "struct sockaddr" void; do
23852 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
23853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23854/* end confdefs.h. */
23855#include <sys/types.h>
23856 #include <sys/socket.h>
23857
23858 int getpeername (int, $arg2 *, $t *);
23859int
23860main ()
23861{
23862$t len;
23863 getpeername (0, 0, &len);
23864 ;
23865 return 0;
23866}
23867_ACEOF
23868if ac_fn_c_try_compile "$LINENO"; then :
23869 gl_cv_socklen_t_equiv="$t"
23870fi
23871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23872 test "$gl_cv_socklen_t_equiv" != "" && break
23873 done
23874 test "$gl_cv_socklen_t_equiv" != "" && break
23875 done
23876
23877fi
23878
23879 if test "$gl_cv_socklen_t_equiv" = ""; then
23880 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
23881 fi
23882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
23883$as_echo "$gl_cv_socklen_t_equiv" >&6; }
23884
23885cat >>confdefs.h <<_ACEOF
23886#define socklen_t $gl_cv_socklen_t_equiv
23887_ACEOF
23888
23889fi
23890
0750520d 23891
63ce7108
TT
23892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
23893$as_echo_n "checking for ssize_t... " >&6; }
d0ac1c44 23894if ${gt_cv_ssize_t+:} false; then :
63ce7108
TT
23895 $as_echo_n "(cached) " >&6
23896else
23897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23898/* end confdefs.h. */
23899#include <sys/types.h>
23900int
23901main ()
23902{
23903int x = sizeof (ssize_t *) + sizeof (ssize_t);
23904 return !x;
23905 ;
23906 return 0;
23907}
23908_ACEOF
23909if ac_fn_c_try_compile "$LINENO"; then :
23910 gt_cv_ssize_t=yes
23911else
23912 gt_cv_ssize_t=no
23913fi
23914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23915fi
23916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
23917$as_echo "$gt_cv_ssize_t" >&6; }
23918 if test $gt_cv_ssize_t = no; then
23919
23920$as_echo "#define ssize_t int" >>confdefs.h
23921
23922 fi
23923
23924
23925
23926
472fa5ee
SM
23927 :
23928
23929
23930
23931
23932
5e8754f9
SDJ
23933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
23934$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
23935if ${gl_cv_func_stat_dir_slash+:} false; then :
2196f55f
YQ
23936 $as_echo_n "(cached) " >&6
23937else
5e8754f9
SDJ
23938 if test "$cross_compiling" = yes; then :
23939 case $host_os in
23940 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
23941 *) gl_cv_func_stat_dir_slash="guessing yes";;
23942 esac
2196f55f
YQ
23943else
23944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23945/* end confdefs.h. */
23946#include <sys/stat.h>
23947
23948int
23949main ()
23950{
5e8754f9 23951struct stat st; return stat (".", &st) != stat ("./", &st);
2196f55f
YQ
23952 ;
23953 return 0;
23954}
23955_ACEOF
23956if ac_fn_c_try_run "$LINENO"; then :
5e8754f9 23957 gl_cv_func_stat_dir_slash=yes
2196f55f 23958else
5e8754f9 23959 gl_cv_func_stat_dir_slash=no
2196f55f
YQ
23960fi
23961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23962 conftest.$ac_objext conftest.beam conftest.$ac_ext
23963fi
23964
23965fi
5e8754f9
SDJ
23966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
23967$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
23968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
23969$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
23970if ${gl_cv_func_stat_file_slash+:} false; then :
7a6dbc2f 23971 $as_echo_n "(cached) " >&6
2196f55f 23972else
5e8754f9
SDJ
23973 touch conftest.tmp
23974 # Assume that if we have lstat, we can also check symlinks.
23975 if test $ac_cv_func_lstat = yes; then
23976 ln -s conftest.tmp conftest.lnk
23977 fi
23978 if test "$cross_compiling" = yes; then :
23979 case "$host_os" in
23980 # Guess yes on glibc systems.
23981 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
23982 # If we don't know, assume the worst.
23983 *) gl_cv_func_stat_file_slash="guessing no" ;;
23984 esac
7a6dbc2f 23985
2196f55f 23986else
5e8754f9
SDJ
23987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23988/* end confdefs.h. */
23989#include <sys/stat.h>
7a6dbc2f 23990
5e8754f9
SDJ
23991int
23992main ()
23993{
23994int result = 0;
23995 struct stat st;
23996 if (!stat ("conftest.tmp/", &st))
23997 result |= 1;
23998#if HAVE_LSTAT
23999 if (!stat ("conftest.lnk/", &st))
24000 result |= 2;
24001#endif
24002 return result;
7a6dbc2f 24003
5e8754f9
SDJ
24004 ;
24005 return 0;
24006}
24007_ACEOF
24008if ac_fn_c_try_run "$LINENO"; then :
24009 gl_cv_func_stat_file_slash=yes
24010else
24011 gl_cv_func_stat_file_slash=no
2196f55f 24012fi
5e8754f9
SDJ
24013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24014 conftest.$ac_objext conftest.beam conftest.$ac_ext
2196f55f 24015fi
2196f55f 24016
5e8754f9 24017 rm -f conftest.tmp conftest.lnk
7a6dbc2f 24018fi
5e8754f9
SDJ
24019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
24020$as_echo "$gl_cv_func_stat_file_slash" >&6; }
24021 case $gl_cv_func_stat_dir_slash in
24022 *no) REPLACE_STAT=1
2196f55f 24023
5e8754f9
SDJ
24024$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
24025;;
24026 esac
24027 case $gl_cv_func_stat_file_slash in
24028 *no) REPLACE_STAT=1
2196f55f 24029
5e8754f9
SDJ
24030$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
24031;;
24032 esac
2196f55f 24033
5e8754f9 24034 if test $REPLACE_STAT = 1; then
2196f55f
YQ
24035
24036
24037
24038
24039
24040
24041
2196f55f 24042
5e8754f9 24043 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
2196f55f 24044
5e8754f9
SDJ
24045 :
24046 fi
2196f55f
YQ
24047
24048
24049
24050
2196f55f 24051
5e8754f9 24052 GNULIB_STAT=1
2196f55f
YQ
24053
24054
24055
24056
2196f55f 24057
5e8754f9
SDJ
24058$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
24059
2196f55f
YQ
24060
24061
24062
725e2999
JB
24063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
24064$as_echo_n "checking for working stdalign.h... " >&6; }
24065if ${gl_cv_header_working_stdalign_h+:} false; then :
24066 $as_echo_n "(cached) " >&6
24067else
24068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24069/* end confdefs.h. */
24070#include <stdalign.h>
24071 #include <stddef.h>
24072
24073 /* Test that alignof yields a result consistent with offsetof.
24074 This catches GCC bug 52023
24075 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
24076 #ifdef __cplusplus
24077 template <class t> struct alignof_helper { char a; t b; };
24078 # define ao(type) offsetof (alignof_helper<type>, b)
24079 #else
24080 # define ao(type) offsetof (struct { char a; type b; }, b)
24081 #endif
24082 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
24083 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
24084 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
24085
24086 /* Test _Alignas only on platforms where gnulib can help. */
24087 #if \
24088 ((defined __cplusplus && 201103 <= __cplusplus) \
24089 || (defined __APPLE__ && defined __MACH__ \
24090 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
24091 : __GNUC__) \
24092 || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
24093 || __ICC || 0x5110 <= __SUNPRO_C \
24094 || 1300 <= _MSC_VER)
24095 struct alignas_test { char c; char alignas (8) alignas_8; };
24096 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
24097 ? 1 : -1];
24098 #endif
24099
24100int
24101main ()
24102{
24103
24104 ;
24105 return 0;
24106}
24107_ACEOF
24108if ac_fn_c_try_compile "$LINENO"; then :
24109 gl_cv_header_working_stdalign_h=yes
24110else
24111 gl_cv_header_working_stdalign_h=no
24112fi
24113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24114fi
24115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
24116$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
24117
24118 if test $gl_cv_header_working_stdalign_h = yes; then
24119 STDALIGN_H=''
24120 else
24121 STDALIGN_H='stdalign.h'
24122 fi
24123
24124
24125 if test -n "$STDALIGN_H"; then
24126 GL_GENERATE_STDALIGN_H_TRUE=
24127 GL_GENERATE_STDALIGN_H_FALSE='#'
24128else
24129 GL_GENERATE_STDALIGN_H_TRUE='#'
24130 GL_GENERATE_STDALIGN_H_FALSE=
24131fi
24132
24133
24134
2196f55f
YQ
24135
24136
63ce7108
TT
24137 # Define two additional variables used in the Makefile substitution.
24138
24139 if test "$ac_cv_header_stdbool_h" = yes; then
24140 STDBOOL_H=''
24141 else
24142 STDBOOL_H='stdbool.h'
24143 fi
24144
24145 if test -n "$STDBOOL_H"; then
24146 GL_GENERATE_STDBOOL_H_TRUE=
24147 GL_GENERATE_STDBOOL_H_FALSE='#'
24148else
24149 GL_GENERATE_STDBOOL_H_TRUE='#'
24150 GL_GENERATE_STDBOOL_H_FALSE=
24151fi
24152
24153
24154 if test "$ac_cv_type__Bool" = yes; then
24155 HAVE__BOOL=1
24156 else
24157 HAVE__BOOL=0
24158 fi
24159
24160
24161
24162
24163
24164 STDDEF_H=
4a626d0a
PA
24165 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
24166
24167"
d0ac1c44 24168if test "x$ac_cv_type_max_align_t" = xyes; then :
4a626d0a
PA
24169
24170else
24171 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
24172fi
24173
63ce7108
TT
24174 if test $gt_cv_c_wchar_t = no; then
24175 HAVE_WCHAR_T=0
24176 STDDEF_H=stddef.h
24177 fi
24178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
24179$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
d0ac1c44 24180if ${gl_cv_decl_null_works+:} false; then :
63ce7108
TT
24181 $as_echo_n "(cached) " >&6
24182else
24183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24184/* end confdefs.h. */
24185#include <stddef.h>
24186 int test[2 * (sizeof NULL == sizeof (void *)) -1];
24187
24188int
24189main ()
24190{
24191
24192 ;
24193 return 0;
24194}
24195_ACEOF
24196if ac_fn_c_try_compile "$LINENO"; then :
24197 gl_cv_decl_null_works=yes
24198else
24199 gl_cv_decl_null_works=no
24200fi
24201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24202fi
24203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
24204$as_echo "$gl_cv_decl_null_works" >&6; }
24205 if test $gl_cv_decl_null_works = no; then
24206 REPLACE_NULL=1
24207 STDDEF_H=stddef.h
24208 fi
24209
24210 if test -n "$STDDEF_H"; then
24211 GL_GENERATE_STDDEF_H_TRUE=
24212 GL_GENERATE_STDDEF_H_FALSE='#'
24213else
24214 GL_GENERATE_STDDEF_H_TRUE='#'
24215 GL_GENERATE_STDDEF_H_FALSE=
24216fi
24217
24218 if test -n "$STDDEF_H"; then
24219
24220
24221
24222
24223
24224
24225
24226
24227 if test $gl_cv_have_include_next = yes; then
24228 gl_cv_next_stddef_h='<'stddef.h'>'
24229 else
24230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
24231$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
d0ac1c44 24232if ${gl_cv_next_stddef_h+:} false; then :
63ce7108
TT
24233 $as_echo_n "(cached) " >&6
24234else
24235
4a626d0a
PA
24236
24237
24238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
24239/* end confdefs.h. */
24240#include <stddef.h>
63ce7108 24241_ACEOF
4a626d0a
PA
24242 case "$host_os" in
24243 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24244 *) gl_absname_cpp="$ac_cpp" ;;
24245 esac
63ce7108 24246
4a626d0a
PA
24247 case "$host_os" in
24248 mingw*)
24249 gl_dirsep_regex='[/\\]'
24250 ;;
24251 *)
24252 gl_dirsep_regex='\/'
24253 ;;
24254 esac
24255 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24256 gl_header_literal_regex=`echo 'stddef.h' \
24257 | sed -e "$gl_make_literal_regex_sed"`
24258 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24259 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24260 s|^/[^/]|//&|
24261 p
24262 q
24263 }'
63ce7108 24264
4a626d0a
PA
24265 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24266 sed -n "$gl_absolute_header_sed"`
24267
24268 gl_header=$gl_cv_absolute_stddef_h
24269 gl_cv_next_stddef_h='"'$gl_header'"'
63ce7108
TT
24270
24271
24272fi
24273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
24274$as_echo "$gl_cv_next_stddef_h" >&6; }
24275 fi
24276 NEXT_STDDEF_H=$gl_cv_next_stddef_h
24277
24278 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24279 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24280 gl_next_as_first_directive='<'stddef.h'>'
24281 else
24282 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24283 gl_next_as_first_directive=$gl_cv_next_stddef_h
24284 fi
24285 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
24286
24287
24288
24289
24290 fi
24291
24292
24293
24294
49e4877c 24295 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
63ce7108
TT
24296
24297
24298
98399780
YQ
24299
24300
24301
24302
24303
4a626d0a
PA
24304
24305
6a29c58e
YQ
24306 if test $gl_cv_have_include_next = yes; then
24307 gl_cv_next_stdio_h='<'stdio.h'>'
24308 else
24309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
24310$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
d0ac1c44 24311if ${gl_cv_next_stdio_h+:} false; then :
6a29c58e
YQ
24312 $as_echo_n "(cached) " >&6
24313else
24314
4a626d0a
PA
24315
24316
24317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6a29c58e
YQ
24318/* end confdefs.h. */
24319#include <stdio.h>
6a29c58e 24320_ACEOF
4a626d0a
PA
24321 case "$host_os" in
24322 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24323 *) gl_absname_cpp="$ac_cpp" ;;
24324 esac
24325
24326 case "$host_os" in
24327 mingw*)
24328 gl_dirsep_regex='[/\\]'
24329 ;;
24330 *)
24331 gl_dirsep_regex='\/'
24332 ;;
24333 esac
24334 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24335 gl_header_literal_regex=`echo 'stdio.h' \
24336 | sed -e "$gl_make_literal_regex_sed"`
24337 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24338 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24339 s|^/[^/]|//&|
24340 p
24341 q
24342 }'
6a29c58e 24343
4a626d0a
PA
24344 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24345 sed -n "$gl_absolute_header_sed"`
6a29c58e 24346
4a626d0a
PA
24347 gl_header=$gl_cv_absolute_stdio_h
24348 gl_cv_next_stdio_h='"'$gl_header'"'
6a29c58e
YQ
24349
24350
24351fi
24352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
24353$as_echo "$gl_cv_next_stdio_h" >&6; }
24354 fi
24355 NEXT_STDIO_H=$gl_cv_next_stdio_h
24356
24357 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24358 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24359 gl_next_as_first_directive='<'stdio.h'>'
24360 else
24361 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24362 gl_next_as_first_directive=$gl_cv_next_stdio_h
24363 fi
24364 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
24365
24366
24367
24368
24369
4a626d0a
PA
24370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
24371$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
d0ac1c44 24372if ${gl_cv_func_printf_attribute_flavor+:} false; then :
4a626d0a
PA
24373 $as_echo_n "(cached) " >&6
24374else
24375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24376/* end confdefs.h. */
24377
24378 #define __STDC_FORMAT_MACROS 1
24379 #include <stdio.h>
24380 #include <inttypes.h>
24381 /* For non-mingw systems, compilation will trivially succeed.
24382 For mingw, compilation will succeed for older mingw (system
24383 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
5e8754f9 24384 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
4a626d0a
PA
24385 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
24386 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
24387 #endif
24388
24389int
24390main ()
24391{
24392
24393 ;
24394 return 0;
24395}
24396_ACEOF
24397if ac_fn_c_try_compile "$LINENO"; then :
24398 gl_cv_func_printf_attribute_flavor=system
24399else
24400 gl_cv_func_printf_attribute_flavor=gnu
24401fi
24402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24403fi
24404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
24405$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
24406 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
24407
24408$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
24409
24410 fi
24411
6a29c58e
YQ
24412 GNULIB_FSCANF=1
24413
24414
24415cat >>confdefs.h <<_ACEOF
24416#define GNULIB_FSCANF 1
24417_ACEOF
24418
24419
24420 GNULIB_SCANF=1
24421
24422
24423cat >>confdefs.h <<_ACEOF
24424#define GNULIB_SCANF 1
24425_ACEOF
24426
24427
24428 GNULIB_FGETC=1
24429 GNULIB_GETC=1
24430 GNULIB_GETCHAR=1
24431 GNULIB_FGETS=1
24432 GNULIB_FREAD=1
24433
24434
24435 GNULIB_FPRINTF=1
24436 GNULIB_PRINTF=1
24437 GNULIB_VFPRINTF=1
24438 GNULIB_VPRINTF=1
24439 GNULIB_FPUTC=1
24440 GNULIB_PUTC=1
24441 GNULIB_PUTCHAR=1
24442 GNULIB_FPUTS=1
24443 GNULIB_PUTS=1
24444 GNULIB_FWRITE=1
24445
24446
24447
24448
5e8754f9
SDJ
24449 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
24450 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24452$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24453if eval \${$as_gl_Symbol+:} false; then :
24454 $as_echo_n "(cached) " >&6
24455else
24456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24457/* end confdefs.h. */
24458#include <stdio.h>
24459
24460int
24461main ()
24462{
24463#undef $gl_func
24464 (void) $gl_func;
24465 ;
24466 return 0;
24467}
24468_ACEOF
24469if ac_fn_c_try_compile "$LINENO"; then :
24470 eval "$as_gl_Symbol=yes"
24471else
24472 eval "$as_gl_Symbol=no"
24473fi
24474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24475fi
24476eval ac_res=\$$as_gl_Symbol
24477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24478$as_echo "$ac_res" >&6; }
24479 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24480 cat >>confdefs.h <<_ACEOF
24481#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24482_ACEOF
6a29c58e 24483
5e8754f9
SDJ
24484 eval ac_cv_have_decl_$gl_func=yes
24485fi
24486 done
6a29c58e
YQ
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
24498
98399780
YQ
24499 if test $gl_cv_have_include_next = yes; then
24500 gl_cv_next_stdlib_h='<'stdlib.h'>'
24501 else
24502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
24503$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
d0ac1c44 24504if ${gl_cv_next_stdlib_h+:} false; then :
98399780
YQ
24505 $as_echo_n "(cached) " >&6
24506else
24507
4a626d0a
PA
24508
24509
24510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98399780
YQ
24511/* end confdefs.h. */
24512#include <stdlib.h>
98399780 24513_ACEOF
4a626d0a
PA
24514 case "$host_os" in
24515 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24516 *) gl_absname_cpp="$ac_cpp" ;;
24517 esac
24518
24519 case "$host_os" in
24520 mingw*)
24521 gl_dirsep_regex='[/\\]'
24522 ;;
24523 *)
24524 gl_dirsep_regex='\/'
24525 ;;
24526 esac
24527 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24528 gl_header_literal_regex=`echo 'stdlib.h' \
24529 | sed -e "$gl_make_literal_regex_sed"`
24530 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24531 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24532 s|^/[^/]|//&|
24533 p
24534 q
24535 }'
98399780 24536
4a626d0a
PA
24537 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24538 sed -n "$gl_absolute_header_sed"`
98399780 24539
4a626d0a
PA
24540 gl_header=$gl_cv_absolute_stdlib_h
24541 gl_cv_next_stdlib_h='"'$gl_header'"'
98399780
YQ
24542
24543
24544fi
24545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
24546$as_echo "$gl_cv_next_stdlib_h" >&6; }
24547 fi
24548 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
24549
24550 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24551 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24552 gl_next_as_first_directive='<'stdlib.h'>'
24553 else
24554 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24555 gl_next_as_first_directive=$gl_cv_next_stdlib_h
24556 fi
24557 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
24558
24559
24560
24561
24562
24563
5e8754f9
SDJ
24564 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
24565 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24567$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24568if eval \${$as_gl_Symbol+:} false; then :
24569 $as_echo_n "(cached) " >&6
24570else
24571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24572/* end confdefs.h. */
24573#include <stdlib.h>
24574#if HAVE_SYS_LOADAVG_H
24575# include <sys/loadavg.h>
24576#endif
24577#if HAVE_RANDOM_H
24578# include <random.h>
24579#endif
24580
24581int
24582main ()
24583{
24584#undef $gl_func
24585 (void) $gl_func;
24586 ;
24587 return 0;
24588}
24589_ACEOF
24590if ac_fn_c_try_compile "$LINENO"; then :
24591 eval "$as_gl_Symbol=yes"
24592else
24593 eval "$as_gl_Symbol=no"
24594fi
24595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24596fi
24597eval ac_res=\$$as_gl_Symbol
24598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24599$as_echo "$ac_res" >&6; }
24600 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24601 cat >>confdefs.h <<_ACEOF
24602#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24603_ACEOF
98399780 24604
5e8754f9
SDJ
24605 eval ac_cv_have_decl_$gl_func=yes
24606fi
24607 done
98399780
YQ
24608
24609
24610
24611
24612
24613
8424cc97
SM
24614 for ac_func in strchrnul
24615do :
24616 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
d0ac1c44 24617if test "x$ac_cv_func_strchrnul" = xyes; then :
8424cc97
SM
24618 cat >>confdefs.h <<_ACEOF
24619#define HAVE_STRCHRNUL 1
24620_ACEOF
24621
24622fi
24623done
24624
24625 if test $ac_cv_func_strchrnul = no; then
24626 HAVE_STRCHRNUL=0
24627 else
24628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
24629$as_echo_n "checking whether strchrnul works... " >&6; }
d0ac1c44 24630if ${gl_cv_func_strchrnul_works+:} false; then :
8424cc97
SM
24631 $as_echo_n "(cached) " >&6
24632else
24633 if test "$cross_compiling" = yes; then :
24634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24635/* end confdefs.h. */
24636
24637#if defined __CYGWIN__
24638 #include <cygwin/version.h>
24639 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
24640 Lucky user
24641 #endif
24642#else
24643 Lucky user
24644#endif
24645
24646_ACEOF
24647if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24648 $EGREP "Lucky user" >/dev/null 2>&1; then :
24649 gl_cv_func_strchrnul_works="guessing yes"
24650else
24651 gl_cv_func_strchrnul_works="guessing no"
24652fi
24653rm -f conftest*
24654
24655
24656else
24657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24658/* end confdefs.h. */
24659
24660#include <string.h> /* for strchrnul */
24661
24662int
24663main ()
24664{
24665const char *buf = "a";
24666 return strchrnul (buf, 'b') != buf + 1;
24667
24668 ;
24669 return 0;
24670}
24671_ACEOF
24672if ac_fn_c_try_run "$LINENO"; then :
24673 gl_cv_func_strchrnul_works=yes
24674else
24675 gl_cv_func_strchrnul_works=no
24676fi
24677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24678 conftest.$ac_objext conftest.beam conftest.$ac_ext
24679fi
24680
24681
24682fi
24683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
24684$as_echo "$gl_cv_func_strchrnul_works" >&6; }
24685 case "$gl_cv_func_strchrnul_works" in
24686 *yes) ;;
24687 *) REPLACE_STRCHRNUL=1 ;;
24688 esac
24689 fi
24690
24691 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
24692
24693
24694
24695
24696
24697
24698
24699
24700 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
24701
24702 :
24703 fi
24704
24705
24706
24707
24708
24709 GNULIB_STRCHRNUL=1
24710
24711
24712
24713
24714
24715$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
24716
24717
24718
24719
24720
24721
24722
472fa5ee
SM
24723 :
24724
24725
24726
24727
24728
6ec2e0f5
SDJ
24729 if test $ac_cv_func_strdup = yes; then
24730 if test $gl_cv_func_malloc_posix != yes; then
24731 REPLACE_STRDUP=1
24732 fi
24733 fi
24734
472fa5ee
SM
24735 :
24736
24737
24738
24739
24740
6ec2e0f5
SDJ
24741 if test $ac_cv_have_decl_strdup = no; then
24742 HAVE_DECL_STRDUP=0
24743 fi
24744
24745 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
24746
24747
24748
24749
24750
24751
24752
24753
24754 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
24755
24756 :
24757 fi
24758
24759
24760
24761
24762
24763 GNULIB_STRDUP=1
24764
24765
24766
24767
24768
24769$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
24770
24771
24772
24773
24774
24775
24776
24777
24778 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
24779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
24780$as_echo_n "checking for working strerror function... " >&6; }
d0ac1c44 24781if ${gl_cv_func_working_strerror+:} false; then :
6ec2e0f5
SDJ
24782 $as_echo_n "(cached) " >&6
24783else
24784 if test "$cross_compiling" = yes; then :
24785 case "$host_os" in
5e8754f9
SDJ
24786 # Guess yes on glibc systems.
24787 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
24788 # If we don't know, assume the worst.
24789 *) gl_cv_func_working_strerror="guessing no" ;;
6ec2e0f5
SDJ
24790 esac
24791
24792else
24793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24794/* end confdefs.h. */
24795#include <string.h>
24796
24797int
24798main ()
24799{
24800if (!*strerror (-2)) return 1;
24801 ;
24802 return 0;
24803}
24804_ACEOF
24805if ac_fn_c_try_run "$LINENO"; then :
24806 gl_cv_func_working_strerror=yes
24807else
24808 gl_cv_func_working_strerror=no
24809fi
24810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24811 conftest.$ac_objext conftest.beam conftest.$ac_ext
24812fi
24813
24814
24815fi
24816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
24817$as_echo "$gl_cv_func_working_strerror" >&6; }
24818 case "$gl_cv_func_working_strerror" in
24819 *yes) ;;
24820 *)
24821 REPLACE_STRERROR=1
24822 ;;
24823 esac
24824
24825 else
24826 REPLACE_STRERROR=1
24827 fi
24828
24829 if test $REPLACE_STRERROR = 1; then
24830
24831
24832
24833
24834
24835
24836
24837
24838 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
24839
24840 fi
24841
24842
24843cat >>confdefs.h <<_ACEOF
24844#define GNULIB_STRERROR 1
24845_ACEOF
24846
24847
24848
24849
24850
24851
24852
24853 GNULIB_STRERROR=1
24854
24855
24856
24857
24858
24859$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
24860
24861
24862
24863
24864
24865 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
24866
24867
24868
24869
24870
24871
24872
24873
24874 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
24875
24876
24877
24878
24879
472fa5ee
SM
24880 :
24881
24882
24883
24884
24885
6ec2e0f5
SDJ
24886 if test $ac_cv_header_sys_socket_h != yes; then
24887 for ac_header in winsock2.h
24888do :
24889 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 24890if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
24891 cat >>confdefs.h <<_ACEOF
24892#define HAVE_WINSOCK2_H 1
24893_ACEOF
24894
24895fi
24896
24897done
24898
24899 fi
24900 if test "$ac_cv_header_winsock2_h" = yes; then
24901 HAVE_WINSOCK2_H=1
24902 UNISTD_H_HAVE_WINSOCK2_H=1
24903 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
24904 else
24905 HAVE_WINSOCK2_H=0
24906 fi
24907
24908
24909 fi
24910
24911
24912
24913
98399780 24914
63ce7108
TT
24915 if test $REPLACE_STRSTR = 0; then
24916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
24917$as_echo_n "checking whether strstr works in linear time... " >&6; }
d0ac1c44 24918if ${gl_cv_func_strstr_linear+:} false; then :
63ce7108
TT
24919 $as_echo_n "(cached) " >&6
24920else
24921 if test "$cross_compiling" = yes; then :
24922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24923/* end confdefs.h. */
24924
24925#include <features.h>
24926#ifdef __GNU_LIBRARY__
24927 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
24928 && !(defined __i386__ || defined __x86_64__) \
24929 && !defined __UCLIBC__
24930 Lucky user
24931 #endif
24932#endif
24933#ifdef __CYGWIN__
24934 #include <cygwin/version.h>
24935 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
24936 Lucky user
24937 #endif
24938#endif
24939
24940_ACEOF
24941if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24942 $EGREP "Lucky user" >/dev/null 2>&1; then :
24943 gl_cv_func_strstr_linear="guessing yes"
c971b7fa 24944else
63ce7108 24945 gl_cv_func_strstr_linear="guessing no"
c971b7fa
PA
24946fi
24947rm -f conftest*
24948
24949
24950else
24951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24952/* end confdefs.h. */
24953
49e4877c
PA
24954#ifdef __MVS__
24955/* z/OS does not deliver signals while strstr() is running (thanks to
24956 restrictions on its LE runtime), which prevents us from limiting the
24957 running time of this test. */
24958# error "This test does not work properly on z/OS"
24959#endif
c971b7fa 24960#include <signal.h> /* for signal */
63ce7108 24961#include <string.h> /* for strstr */
c971b7fa
PA
24962#include <stdlib.h> /* for malloc */
24963#include <unistd.h> /* for alarm */
49e4877c 24964static void quit (int sig) { _exit (sig + 128); }
c971b7fa
PA
24965
24966int
24967main ()
24968{
24969
24970 int result = 0;
24971 size_t m = 1000000;
63ce7108
TT
24972 char *haystack = (char *) malloc (2 * m + 2);
24973 char *needle = (char *) malloc (m + 2);
c971b7fa 24974 /* Failure to compile this test due to missing alarm is okay,
63ce7108 24975 since all such platforms (mingw) also have quadratic strstr. */
c971b7fa
PA
24976 signal (SIGALRM, quit);
24977 alarm (5);
24978 /* Check for quadratic performance. */
24979 if (haystack && needle)
24980 {
24981 memset (haystack, 'A', 2 * m);
24982 haystack[2 * m] = 'B';
63ce7108 24983 haystack[2 * m + 1] = 0;
c971b7fa
PA
24984 memset (needle, 'A', m);
24985 needle[m] = 'B';
63ce7108
TT
24986 needle[m + 1] = 0;
24987 if (!strstr (haystack, needle))
c971b7fa
PA
24988 result |= 1;
24989 }
24990 return result;
24991
24992 ;
24993 return 0;
24994}
24995_ACEOF
24996if ac_fn_c_try_run "$LINENO"; then :
63ce7108 24997 gl_cv_func_strstr_linear=yes
c971b7fa 24998else
63ce7108 24999 gl_cv_func_strstr_linear=no
c971b7fa
PA
25000fi
25001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25002 conftest.$ac_objext conftest.beam conftest.$ac_ext
25003fi
25004
25005
25006fi
63ce7108
TT
25007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
25008$as_echo "$gl_cv_func_strstr_linear" >&6; }
25009 case "$gl_cv_func_strstr_linear" in
40a73391
JK
25010 *yes) ;;
25011 *)
63ce7108 25012 REPLACE_STRSTR=1
40a73391
JK
25013 ;;
25014 esac
c971b7fa
PA
25015 fi
25016
63ce7108 25017 if test $REPLACE_STRSTR = 1; then
c971b7fa
PA
25018
25019
25020
25021
25022
25023
25024
25025
63ce7108 25026 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
c971b7fa 25027
a512b375 25028 fi
c971b7fa
PA
25029
25030
25031
5e8754f9 25032 if test "$gl_cv_func_memchr_works" != yes; then
63ce7108 25033 REPLACE_STRSTR=1
c971b7fa 25034 else
63ce7108
TT
25035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
25036$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 25037if ${gl_cv_func_strstr_works_always+:} false; then :
c971b7fa
PA
25038 $as_echo_n "(cached) " >&6
25039else
25040 if test "$cross_compiling" = yes; then :
63ce7108 25041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
25042/* end confdefs.h. */
25043
25044#ifdef __GNU_LIBRARY__
25045 #include <features.h>
63ce7108 25046 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
c971b7fa
PA
25047 || defined __UCLIBC__
25048 Lucky user
25049 #endif
25050#elif defined __CYGWIN__
25051 #include <cygwin/version.h>
25052 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
25053 Lucky user
25054 #endif
25055#else
25056 Lucky user
25057#endif
25058
25059_ACEOF
25060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25061 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108 25062 gl_cv_func_strstr_works_always="guessing yes"
c971b7fa 25063else
63ce7108 25064 gl_cv_func_strstr_works_always="guessing no"
c971b7fa
PA
25065fi
25066rm -f conftest*
25067
25068
25069else
25070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25071/* end confdefs.h. */
25072
63ce7108 25073#include <string.h> /* for strstr */
c971b7fa
PA
25074#define P "_EF_BF_BD"
25075#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
25076#define NEEDLE P P P P P
25077
25078int
25079main ()
25080{
63ce7108 25081return !!strstr (HAYSTACK, NEEDLE);
c971b7fa
PA
25082
25083 ;
25084 return 0;
25085}
25086_ACEOF
25087if ac_fn_c_try_run "$LINENO"; then :
63ce7108 25088 gl_cv_func_strstr_works_always=yes
c971b7fa 25089else
63ce7108 25090 gl_cv_func_strstr_works_always=no
c971b7fa
PA
25091fi
25092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25093 conftest.$ac_objext conftest.beam conftest.$ac_ext
25094fi
25095
25096
25097fi
63ce7108
TT
25098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
25099$as_echo "$gl_cv_func_strstr_works_always" >&6; }
25100 case "$gl_cv_func_strstr_works_always" in
40a73391
JK
25101 *yes) ;;
25102 *)
63ce7108 25103 REPLACE_STRSTR=1
40a73391
JK
25104 ;;
25105 esac
c971b7fa 25106 fi
8839a007 25107
63ce7108 25108 if test $REPLACE_STRSTR = 1; then
8839a007 25109
8690e634
JK
25110
25111
8690e634
JK
25112
25113
25114
25115
25116
63ce7108 25117 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
8690e634 25118
8690e634
JK
25119 fi
25120
8690e634
JK
25121
25122
8690e634 25123
8690e634 25124
63ce7108 25125 GNULIB_STRSTR=1
8690e634
JK
25126
25127
25128
8690e634
JK
25129
25130
63ce7108 25131$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
8690e634
JK
25132
25133
25134
25135
25136
25137
25138
421693b0
PA
25139 for ac_func in strtok_r
25140do :
25141 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
d0ac1c44 25142if test "x$ac_cv_func_strtok_r" = xyes; then :
421693b0
PA
25143 cat >>confdefs.h <<_ACEOF
25144#define HAVE_STRTOK_R 1
25145_ACEOF
25146
25147fi
25148done
25149
25150 if test $ac_cv_func_strtok_r = yes; then
25151 HAVE_STRTOK_R=1
25152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
25153$as_echo_n "checking whether strtok_r works... " >&6; }
d0ac1c44 25154if ${gl_cv_func_strtok_r_works+:} false; then :
421693b0
PA
25155 $as_echo_n "(cached) " >&6
25156else
25157 if test "$cross_compiling" = yes; then :
5e8754f9
SDJ
25158
25159 case "$host_os" in
25160 # Guess no on glibc systems.
25161 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
25162 *) gl_cv_func_strtok_r_works="guessing yes";;
421693b0
PA
25163 esac
25164
25165else
25166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25167/* end confdefs.h. */
25168
25169 #ifndef __OPTIMIZE__
25170 # define __OPTIMIZE__ 1
25171 #endif
25172 #undef __OPTIMIZE_SIZE__
25173 #undef __NO_INLINE__
25174 #include <stdlib.h>
25175 #include <string.h>
25176
25177int
25178main ()
25179{
25180static const char dummy[] = "\177\01a";
25181 char delimiters[] = "xxxxxxxx";
25182 char *save_ptr = (char *) dummy;
25183 strtok_r (delimiters, "x", &save_ptr);
25184 strtok_r (NULL, "x", &save_ptr);
25185 return 0;
25186
25187 ;
25188 return 0;
25189}
25190
25191_ACEOF
25192if ac_fn_c_try_run "$LINENO"; then :
25193 gl_cv_func_strtok_r_works=yes
25194else
25195 gl_cv_func_strtok_r_works=no
25196fi
25197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25198 conftest.$ac_objext conftest.beam conftest.$ac_ext
25199fi
25200
25201
25202fi
25203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
25204$as_echo "$gl_cv_func_strtok_r_works" >&6; }
25205 case "$gl_cv_func_strtok_r_works" in
25206 *no)
25207 UNDEFINE_STRTOK_R=1
25208 ;;
25209 esac
25210 else
25211 HAVE_STRTOK_R=0
25212 fi
25213
472fa5ee
SM
25214 :
25215
25216
25217
25218
25219
421693b0
PA
25220 if test $ac_cv_have_decl_strtok_r = no; then
25221 HAVE_DECL_STRTOK_R=0
25222 fi
25223
25224 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
25225
25226
25227
25228
25229
25230
25231
25232
25233 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
25234
25235
25236 :
25237
25238 fi
25239
25240
25241
25242
25243
25244 GNULIB_STRTOK_R=1
25245
25246
25247
25248
25249
25250$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
25251
25252
25253
25254
25255
25256
25257
8690e634
JK
25258
25259
25260
25261
25262
8690e634 25263
09607c9e 25264
725e2999
JB
25265
25266
472fa5ee
SM
25267 :
25268
25269
25270
25271
25272
09607c9e
TT
25273
25274
25275
25276 if test $gl_cv_have_include_next = yes; then
25277 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
25278 else
25279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
25280$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 25281if ${gl_cv_next_sys_stat_h+:} false; then :
09607c9e
TT
25282 $as_echo_n "(cached) " >&6
25283else
25284
25285 if test $ac_cv_header_sys_stat_h = yes; then
25286
25287
4a626d0a
PA
25288
25289
25290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
25291/* end confdefs.h. */
25292#include <sys/stat.h>
09607c9e 25293_ACEOF
4a626d0a
PA
25294 case "$host_os" in
25295 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25296 *) gl_absname_cpp="$ac_cpp" ;;
25297 esac
25298
25299 case "$host_os" in
25300 mingw*)
25301 gl_dirsep_regex='[/\\]'
25302 ;;
25303 *)
25304 gl_dirsep_regex='\/'
25305 ;;
25306 esac
25307 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25308 gl_header_literal_regex=`echo 'sys/stat.h' \
25309 | sed -e "$gl_make_literal_regex_sed"`
25310 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25311 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25312 s|^/[^/]|//&|
25313 p
25314 q
25315 }'
25316
25317 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25318 sed -n "$gl_absolute_header_sed"`
25319
25320 gl_header=$gl_cv_absolute_sys_stat_h
25321 gl_cv_next_sys_stat_h='"'$gl_header'"'
09607c9e
TT
25322 else
25323 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
25324 fi
25325
25326
25327fi
25328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
25329$as_echo "$gl_cv_next_sys_stat_h" >&6; }
25330 fi
25331 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
25332
25333 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25334 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25335 gl_next_as_first_directive='<'sys/stat.h'>'
25336 else
25337 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25338 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
25339 fi
25340 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
25341
25342
25343
25344
25345
25346
25347
25348
2196f55f 25349
09607c9e
TT
25350
25351
5e8754f9 25352 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
09607c9e 25353
5e8754f9 25354$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
09607c9e 25355
5e8754f9 25356 fi
09607c9e
TT
25357
25358 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
25359 #include <sys/stat.h>
25360"
d0ac1c44 25361if test "x$ac_cv_type_nlink_t" = xyes; then :
09607c9e
TT
25362
25363else
25364
25365$as_echo "#define nlink_t int" >>confdefs.h
25366
25367fi
25368
25369
25370
5e8754f9
SDJ
25371 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
25372 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25374$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25375if eval \${$as_gl_Symbol+:} false; then :
25376 $as_echo_n "(cached) " >&6
25377else
25378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25379/* end confdefs.h. */
25380#include <sys/stat.h>
25381
25382int
25383main ()
25384{
25385#undef $gl_func
25386 (void) $gl_func;
25387 ;
25388 return 0;
25389}
25390_ACEOF
25391if ac_fn_c_try_compile "$LINENO"; then :
25392 eval "$as_gl_Symbol=yes"
25393else
25394 eval "$as_gl_Symbol=no"
25395fi
25396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25397fi
25398eval ac_res=\$$as_gl_Symbol
25399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25400$as_echo "$ac_res" >&6; }
25401 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25402 cat >>confdefs.h <<_ACEOF
25403#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25404_ACEOF
09607c9e 25405
5e8754f9
SDJ
25406 eval ac_cv_have_decl_$gl_func=yes
25407fi
25408 done
09607c9e
TT
25409
25410
25411
25412
25413
25414
25415
25416
25417
25418
25419
725e2999
JB
25420
25421
25422
25423
25424
25425
25426 :
25427
25428
25429
25430
25431
25432
25433
25434
25435 if test $gl_cv_have_include_next = yes; then
25436 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
25437 else
25438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
25439$as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
25440if ${gl_cv_next_sys_uio_h+:} false; then :
25441 $as_echo_n "(cached) " >&6
25442else
25443
25444 if test $ac_cv_header_sys_uio_h = yes; then
25445
25446
25447
25448
25449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25450/* end confdefs.h. */
25451#include <sys/uio.h>
25452_ACEOF
25453 case "$host_os" in
25454 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25455 *) gl_absname_cpp="$ac_cpp" ;;
25456 esac
25457
25458 case "$host_os" in
25459 mingw*)
25460 gl_dirsep_regex='[/\\]'
25461 ;;
25462 *)
25463 gl_dirsep_regex='\/'
25464 ;;
25465 esac
25466 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25467 gl_header_literal_regex=`echo 'sys/uio.h' \
25468 | sed -e "$gl_make_literal_regex_sed"`
25469 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25470 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25471 s|^/[^/]|//&|
25472 p
25473 q
25474 }'
25475
25476 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25477 sed -n "$gl_absolute_header_sed"`
25478
25479 gl_header=$gl_cv_absolute_sys_uio_h
25480 gl_cv_next_sys_uio_h='"'$gl_header'"'
25481 else
25482 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
25483 fi
25484
25485
25486fi
25487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
25488$as_echo "$gl_cv_next_sys_uio_h" >&6; }
25489 fi
25490 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
25491
25492 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25493 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25494 gl_next_as_first_directive='<'sys/uio.h'>'
25495 else
25496 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25497 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
25498 fi
25499 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
25500
25501
25502
25503
25504 if test $ac_cv_header_sys_uio_h = yes; then
25505 HAVE_SYS_UIO_H=1
25506 else
25507 HAVE_SYS_UIO_H=0
25508 fi
25509
25510
25511
25512
25513
2d8adcbd
MM
25514 :
25515
25516
25517
25518
09607c9e
TT
25519
25520
25521
8839a007
PA
25522
25523
25524
25525
09607c9e
TT
25526
25527
8839a007 25528
472fa5ee
SM
25529 :
25530
25531
25532
25533
25534
8839a007
PA
25535
25536
25537
25538 if test $gl_cv_have_include_next = yes; then
25539 gl_cv_next_unistd_h='<'unistd.h'>'
25540 else
25541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
25542$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
d0ac1c44 25543if ${gl_cv_next_unistd_h+:} false; then :
8839a007
PA
25544 $as_echo_n "(cached) " >&6
25545else
25546
25547 if test $ac_cv_header_unistd_h = yes; then
25548
25549
4a626d0a
PA
25550
25551
25552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8839a007
PA
25553/* end confdefs.h. */
25554#include <unistd.h>
8839a007 25555_ACEOF
4a626d0a
PA
25556 case "$host_os" in
25557 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25558 *) gl_absname_cpp="$ac_cpp" ;;
25559 esac
25560
25561 case "$host_os" in
25562 mingw*)
25563 gl_dirsep_regex='[/\\]'
25564 ;;
25565 *)
25566 gl_dirsep_regex='\/'
25567 ;;
25568 esac
25569 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25570 gl_header_literal_regex=`echo 'unistd.h' \
25571 | sed -e "$gl_make_literal_regex_sed"`
25572 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25573 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25574 s|^/[^/]|//&|
25575 p
25576 q
25577 }'
25578
25579 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25580 sed -n "$gl_absolute_header_sed"`
25581
25582 gl_header=$gl_cv_absolute_unistd_h
25583 gl_cv_next_unistd_h='"'$gl_header'"'
8839a007
PA
25584 else
25585 gl_cv_next_unistd_h='<'unistd.h'>'
25586 fi
25587
25588
25589fi
25590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
25591$as_echo "$gl_cv_next_unistd_h" >&6; }
25592 fi
25593 NEXT_UNISTD_H=$gl_cv_next_unistd_h
25594
25595 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25596 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25597 gl_next_as_first_directive='<'unistd.h'>'
25598 else
25599 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25600 gl_next_as_first_directive=$gl_cv_next_unistd_h
25601 fi
25602 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
25603
25604
25605
25606
25607 if test $ac_cv_header_unistd_h = yes; then
25608 HAVE_UNISTD_H=1
25609 else
25610 HAVE_UNISTD_H=0
25611 fi
25612
25613
25614
25615
25616
25617
25618
5e8754f9
SDJ
25619 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
25620 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25622$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25623if eval \${$as_gl_Symbol+:} false; then :
25624 $as_echo_n "(cached) " >&6
25625else
25626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25627/* end confdefs.h. */
25628
25629#if HAVE_UNISTD_H
25630# include <unistd.h>
25631#endif
25632/* Some systems declare various items in the wrong headers. */
25633#if !(defined __GLIBC__ && !defined __UCLIBC__)
25634# include <fcntl.h>
25635# include <stdio.h>
25636# include <stdlib.h>
25637# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
25638# include <io.h>
25639# endif
25640#endif
25641
25642int
25643main ()
25644{
25645#undef $gl_func
25646 (void) $gl_func;
25647 ;
25648 return 0;
25649}
25650_ACEOF
25651if ac_fn_c_try_compile "$LINENO"; then :
25652 eval "$as_gl_Symbol=yes"
25653else
25654 eval "$as_gl_Symbol=no"
25655fi
25656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25657fi
25658eval ac_res=\$$as_gl_Symbol
25659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25660$as_echo "$ac_res" >&6; }
25661 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25662 cat >>confdefs.h <<_ACEOF
25663#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25664_ACEOF
8839a007 25665
5e8754f9
SDJ
25666 eval ac_cv_have_decl_$gl_func=yes
25667fi
25668 done
8839a007
PA
25669
25670
25671
25672
472fa5ee
SM
25673 :
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683 :
25684
8839a007 25685
6ec2e0f5
SDJ
25686
25687
25688
3d99e817
AK
25689 if test $ac_cv_have_decl_unsetenv = no; then
25690 HAVE_DECL_UNSETENV=0
25691 fi
25692 for ac_func in unsetenv
25693do :
25694 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
d0ac1c44 25695if test "x$ac_cv_func_unsetenv" = xyes; then :
3d99e817
AK
25696 cat >>confdefs.h <<_ACEOF
25697#define HAVE_UNSETENV 1
25698_ACEOF
25699
25700fi
25701done
25702
25703 if test $ac_cv_func_unsetenv = no; then
25704 HAVE_UNSETENV=0
25705 else
25706 HAVE_UNSETENV=1
25707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
25708$as_echo_n "checking for unsetenv() return type... " >&6; }
d0ac1c44 25709if ${gt_cv_func_unsetenv_ret+:} false; then :
3d99e817
AK
25710 $as_echo_n "(cached) " >&6
25711else
25712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25713/* end confdefs.h. */
25714
25715#undef _BSD
25716#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
25717#include <stdlib.h>
25718extern
25719#ifdef __cplusplus
25720"C"
25721#endif
25722int unsetenv (const char *name);
25723
25724int
25725main ()
25726{
25727
25728 ;
25729 return 0;
25730}
25731_ACEOF
25732if ac_fn_c_try_compile "$LINENO"; then :
25733 gt_cv_func_unsetenv_ret='int'
25734else
25735 gt_cv_func_unsetenv_ret='void'
25736fi
25737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25738fi
25739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
25740$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
25741 if test $gt_cv_func_unsetenv_ret = 'void'; then
25742
25743$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
25744
25745 REPLACE_UNSETENV=1
25746 fi
25747
25748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
25749$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
d0ac1c44 25750if ${gl_cv_func_unsetenv_works+:} false; then :
3d99e817
AK
25751 $as_echo_n "(cached) " >&6
25752else
25753 if test "$cross_compiling" = yes; then :
25754 case "$host_os" in
25755 # Guess yes on glibc systems.
25756 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
25757 # If we don't know, assume the worst.
25758 *) gl_cv_func_unsetenv_works="guessing no" ;;
25759 esac
25760
25761else
25762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25763/* end confdefs.h. */
25764
25765 #include <stdlib.h>
25766 #include <errno.h>
25767 extern char **environ;
25768
25769int
25770main ()
25771{
25772
25773 char entry1[] = "a=1";
25774 char entry2[] = "b=2";
25775 char *env[] = { entry1, entry2, NULL };
25776 if (putenv ((char *) "a=1")) return 1;
25777 if (putenv (entry2)) return 2;
25778 entry2[0] = 'a';
25779 unsetenv ("a");
25780 if (getenv ("a")) return 3;
25781 if (!unsetenv ("") || errno != EINVAL) return 4;
25782 entry2[0] = 'b';
25783 environ = env;
25784 if (!getenv ("a")) return 5;
25785 entry2[0] = 'a';
25786 unsetenv ("a");
25787 if (getenv ("a")) return 6;
25788
25789 ;
25790 return 0;
25791}
25792_ACEOF
25793if ac_fn_c_try_run "$LINENO"; then :
25794 gl_cv_func_unsetenv_works=yes
25795else
25796 gl_cv_func_unsetenv_works=no
25797fi
25798rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25799 conftest.$ac_objext conftest.beam conftest.$ac_ext
25800fi
25801
25802fi
25803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
25804$as_echo "$gl_cv_func_unsetenv_works" >&6; }
25805 case "$gl_cv_func_unsetenv_works" in
25806 *yes) ;;
25807 *)
25808 REPLACE_UNSETENV=1
25809 ;;
25810 esac
25811 fi
25812
25813 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
25814
25815
25816
25817
25818
25819
25820
25821
25822 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
25823
25824
25825
25826
472fa5ee
SM
25827 :
25828
25829
25830
25831
25832
3d99e817
AK
25833
25834 fi
25835
25836
25837
25838
25839
25840 GNULIB_UNSETENV=1
25841
25842
25843
25844
25845
25846$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
25847
25848
25849
25850
25851
25852
8839a007
PA
25853
25854
25855
25856
25857
25858
472fa5ee
SM
25859 :
25860
25861
25862
25863
25864
8839a007 25865
8690e634
JK
25866
25867
25868 if test $gl_cv_have_include_next = yes; then
25869 gl_cv_next_wchar_h='<'wchar.h'>'
25870 else
25871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
25872$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
d0ac1c44 25873if ${gl_cv_next_wchar_h+:} false; then :
8690e634
JK
25874 $as_echo_n "(cached) " >&6
25875else
25876
25877 if test $ac_cv_header_wchar_h = yes; then
25878
25879
4a626d0a
PA
25880
25881
25882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
25883/* end confdefs.h. */
25884#include <wchar.h>
8690e634 25885_ACEOF
4a626d0a
PA
25886 case "$host_os" in
25887 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25888 *) gl_absname_cpp="$ac_cpp" ;;
25889 esac
25890
25891 case "$host_os" in
25892 mingw*)
25893 gl_dirsep_regex='[/\\]'
25894 ;;
25895 *)
25896 gl_dirsep_regex='\/'
25897 ;;
25898 esac
25899 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25900 gl_header_literal_regex=`echo 'wchar.h' \
25901 | sed -e "$gl_make_literal_regex_sed"`
25902 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25903 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25904 s|^/[^/]|//&|
25905 p
25906 q
25907 }'
25908
25909 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25910 sed -n "$gl_absolute_header_sed"`
25911
25912 gl_header=$gl_cv_absolute_wchar_h
25913 gl_cv_next_wchar_h='"'$gl_header'"'
8690e634
JK
25914 else
25915 gl_cv_next_wchar_h='<'wchar.h'>'
25916 fi
25917
25918
25919fi
25920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
25921$as_echo "$gl_cv_next_wchar_h" >&6; }
25922 fi
25923 NEXT_WCHAR_H=$gl_cv_next_wchar_h
25924
25925 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25926 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25927 gl_next_as_first_directive='<'wchar.h'>'
25928 else
25929 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25930 gl_next_as_first_directive=$gl_cv_next_wchar_h
25931 fi
25932 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
25933
25934
25935
25936
25937 if test $ac_cv_header_wchar_h = yes; then
25938 HAVE_WCHAR_H=1
25939 else
25940 HAVE_WCHAR_H=0
25941 fi
25942
c971b7fa
PA
25943
25944
25945
25946
8690e634
JK
25947 if test $gt_cv_c_wint_t = yes; then
25948 HAVE_WINT_T=1
25949 else
25950 HAVE_WINT_T=0
25951 fi
c971b7fa
PA
25952
25953
25954
5e8754f9
SDJ
25955 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
25956 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25958$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25959if eval \${$as_gl_Symbol+:} false; then :
25960 $as_echo_n "(cached) " >&6
25961else
25962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25963/* end confdefs.h. */
8690e634 25964
5e8754f9
SDJ
25965/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25966 <wchar.h>.
25967 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25968 included before <wchar.h>. */
25969#if !(defined __GLIBC__ && !defined __UCLIBC__)
25970# include <stddef.h>
25971# include <stdio.h>
25972# include <time.h>
25973#endif
25974#include <wchar.h>
c971b7fa 25975
5e8754f9
SDJ
25976int
25977main ()
25978{
25979#undef $gl_func
25980 (void) $gl_func;
25981 ;
25982 return 0;
25983}
25984_ACEOF
25985if ac_fn_c_try_compile "$LINENO"; then :
25986 eval "$as_gl_Symbol=yes"
25987else
25988 eval "$as_gl_Symbol=no"
25989fi
25990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25991fi
25992eval ac_res=\$$as_gl_Symbol
25993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25994$as_echo "$ac_res" >&6; }
25995 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25996 cat >>confdefs.h <<_ACEOF
25997#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25998_ACEOF
c971b7fa 25999
5e8754f9
SDJ
26000 eval ac_cv_have_decl_$gl_func=yes
26001fi
26002 done
8690e634
JK
26003
26004
26005
26006
26007
26008
26009
472fa5ee
SM
26010 :
26011
26012
26013
26014
26015
8690e634
JK
26016 if test $ac_cv_func_iswcntrl = yes; then
26017 HAVE_ISWCNTRL=1
26018 else
26019 HAVE_ISWCNTRL=0
26020 fi
26021
26022
26023
8690e634
JK
26024 if test $gt_cv_c_wint_t = yes; then
26025 HAVE_WINT_T=1
26026 else
26027 HAVE_WINT_T=0
26028 fi
26029
26030
26031
26032
26033
26034
c971b7fa 26035
8690e634 26036
472fa5ee
SM
26037 :
26038
26039
26040
26041
26042
c971b7fa
PA
26043
26044
26045
26046 if test $gl_cv_have_include_next = yes; then
8690e634 26047 gl_cv_next_wctype_h='<'wctype.h'>'
c971b7fa 26048 else
8690e634
JK
26049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
26050$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
d0ac1c44 26051if ${gl_cv_next_wctype_h+:} false; then :
c971b7fa
PA
26052 $as_echo_n "(cached) " >&6
26053else
26054
8690e634
JK
26055 if test $ac_cv_header_wctype_h = yes; then
26056
26057
4a626d0a
PA
26058
26059
26060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 26061/* end confdefs.h. */
8690e634 26062#include <wctype.h>
c971b7fa 26063_ACEOF
4a626d0a
PA
26064 case "$host_os" in
26065 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26066 *) gl_absname_cpp="$ac_cpp" ;;
26067 esac
26068
26069 case "$host_os" in
26070 mingw*)
26071 gl_dirsep_regex='[/\\]'
26072 ;;
26073 *)
26074 gl_dirsep_regex='\/'
26075 ;;
26076 esac
26077 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26078 gl_header_literal_regex=`echo 'wctype.h' \
26079 | sed -e "$gl_make_literal_regex_sed"`
26080 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26081 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26082 s|^/[^/]|//&|
26083 p
26084 q
26085 }'
26086
26087 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26088 sed -n "$gl_absolute_header_sed"`
26089
26090 gl_header=$gl_cv_absolute_wctype_h
26091 gl_cv_next_wctype_h='"'$gl_header'"'
8690e634
JK
26092 else
26093 gl_cv_next_wctype_h='<'wctype.h'>'
26094 fi
c971b7fa
PA
26095
26096
26097fi
8690e634
JK
26098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
26099$as_echo "$gl_cv_next_wctype_h" >&6; }
c971b7fa 26100 fi
8690e634 26101 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
c971b7fa
PA
26102
26103 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26104 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8690e634 26105 gl_next_as_first_directive='<'wctype.h'>'
c971b7fa
PA
26106 else
26107 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8690e634 26108 gl_next_as_first_directive=$gl_cv_next_wctype_h
c971b7fa 26109 fi
8690e634
JK
26110 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
26111
26112
26113
26114
26115 if test $ac_cv_header_wctype_h = yes; then
26116 if test $ac_cv_func_iswcntrl = yes; then
26117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
26118$as_echo_n "checking whether iswcntrl works... " >&6; }
d0ac1c44 26119if ${gl_cv_func_iswcntrl_works+:} false; then :
8690e634
JK
26120 $as_echo_n "(cached) " >&6
26121else
26122
26123 if test "$cross_compiling" = yes; then :
5e8754f9 26124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
26125/* end confdefs.h. */
26126#include <stdlib.h>
26127 #if __GNU_LIBRARY__ == 1
26128 Linux libc5 i18n is broken.
26129 #endif
26130int
26131main ()
26132{
26133
26134 ;
26135 return 0;
26136}
26137_ACEOF
26138if ac_fn_c_try_compile "$LINENO"; then :
26139 gl_cv_func_iswcntrl_works="guessing yes"
26140else
26141 gl_cv_func_iswcntrl_works="guessing no"
26142fi
26143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26144
26145else
26146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26147/* end confdefs.h. */
26148
26149 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
26150 included before <wchar.h>.
26151 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
26152 must be included before <wchar.h>. */
26153 #include <stddef.h>
26154 #include <stdio.h>
26155 #include <time.h>
26156 #include <wchar.h>
26157 #include <wctype.h>
26158 int main () { return iswprint ('x') == 0; }
26159
26160_ACEOF
26161if ac_fn_c_try_run "$LINENO"; then :
26162 gl_cv_func_iswcntrl_works=yes
26163else
26164 gl_cv_func_iswcntrl_works=no
26165fi
26166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26167 conftest.$ac_objext conftest.beam conftest.$ac_ext
26168fi
26169
26170
26171fi
26172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
26173$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
26174 fi
26175 HAVE_WCTYPE_H=1
26176 else
26177 HAVE_WCTYPE_H=0
26178 fi
26179
26180
26181 case "$gl_cv_func_iswcntrl_works" in
26182 *yes) REPLACE_ISWCNTRL=0 ;;
26183 *) REPLACE_ISWCNTRL=1 ;;
26184 esac
26185
26186
26187 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
26188 :
26189 fi
26190
26191 if test $REPLACE_ISWCNTRL = 1; then
26192 REPLACE_TOWLOWER=1
26193 else
26194 for ac_func in towlower
26195do :
26196 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
d0ac1c44 26197if test "x$ac_cv_func_towlower" = xyes; then :
8690e634
JK
26198 cat >>confdefs.h <<_ACEOF
26199#define HAVE_TOWLOWER 1
26200_ACEOF
26201
26202fi
26203done
26204
26205 if test $ac_cv_func_towlower = yes; then
26206 REPLACE_TOWLOWER=0
26207 else
26208 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
26209 included before <wchar.h>.
26210 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
26211 must be included before <wchar.h>. */
26212 #include <stddef.h>
26213 #include <stdio.h>
26214 #include <time.h>
26215 #include <wchar.h>
26216 #if HAVE_WCTYPE_H
26217 # include <wctype.h>
26218 #endif
26219
26220"
d0ac1c44 26221if test "x$ac_cv_have_decl_towlower" = xyes; then :
8690e634
JK
26222 ac_have_decl=1
26223else
26224 ac_have_decl=0
26225fi
26226
26227cat >>confdefs.h <<_ACEOF
26228#define HAVE_DECL_TOWLOWER $ac_have_decl
26229_ACEOF
26230
26231 if test $ac_cv_have_decl_towlower = yes; then
26232 REPLACE_TOWLOWER=1
26233 else
26234 REPLACE_TOWLOWER=0
26235 fi
26236 fi
26237 fi
26238
26239
26240 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
26241 :
26242 fi
26243
26244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
26245$as_echo_n "checking for wctype_t... " >&6; }
d0ac1c44 26246if ${gl_cv_type_wctype_t+:} false; then :
8690e634
JK
26247 $as_echo_n "(cached) " >&6
26248else
26249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26250/* end confdefs.h. */
26251/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
26252 included before <wchar.h>.
26253 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
26254 must be included before <wchar.h>. */
26255 #include <stddef.h>
26256 #include <stdio.h>
26257 #include <time.h>
26258 #include <wchar.h>
26259 #if HAVE_WCTYPE_H
26260 # include <wctype.h>
26261 #endif
26262 wctype_t a;
26263
26264int
26265main ()
26266{
26267
26268 ;
26269 return 0;
26270}
26271_ACEOF
26272if ac_fn_c_try_compile "$LINENO"; then :
26273 gl_cv_type_wctype_t=yes
26274else
26275 gl_cv_type_wctype_t=no
26276fi
26277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 26278
8690e634
JK
26279fi
26280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
26281$as_echo "$gl_cv_type_wctype_t" >&6; }
26282 if test $gl_cv_type_wctype_t = no; then
26283 HAVE_WCTYPE_T=0
26284 fi
26285
26286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
26287$as_echo_n "checking for wctrans_t... " >&6; }
d0ac1c44 26288if ${gl_cv_type_wctrans_t+:} false; then :
8690e634
JK
26289 $as_echo_n "(cached) " >&6
26290else
26291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26292/* end confdefs.h. */
26293/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
26294 included before <wchar.h>.
26295 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
26296 must be included before <wchar.h>. */
26297 #include <stddef.h>
26298 #include <stdio.h>
26299 #include <time.h>
26300 #include <wchar.h>
26301 #include <wctype.h>
26302 wctrans_t a;
c971b7fa 26303
8690e634
JK
26304int
26305main ()
26306{
c971b7fa 26307
8690e634
JK
26308 ;
26309 return 0;
26310}
26311_ACEOF
26312if ac_fn_c_try_compile "$LINENO"; then :
26313 gl_cv_type_wctrans_t=yes
26314else
26315 gl_cv_type_wctrans_t=no
26316fi
26317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 26318
8690e634
JK
26319fi
26320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
26321$as_echo "$gl_cv_type_wctrans_t" >&6; }
26322 if test $gl_cv_type_wctrans_t = no; then
26323 HAVE_WCTRANS_T=0
c971b7fa
PA
26324 fi
26325
26326
5e8754f9
SDJ
26327 for gl_func in wctype iswctype wctrans towctrans ; do
26328 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26330$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
26331if eval \${$as_gl_Symbol+:} false; then :
26332 $as_echo_n "(cached) " >&6
26333else
26334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26335/* end confdefs.h. */
26336
26337/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
26338 <wchar.h>.
26339 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
26340 included before <wchar.h>. */
26341#if !(defined __GLIBC__ && !defined __UCLIBC__)
26342# include <stddef.h>
26343# include <stdio.h>
26344# include <time.h>
26345# include <wchar.h>
26346#endif
26347#include <wctype.h>
26348
26349int
26350main ()
26351{
26352#undef $gl_func
26353 (void) $gl_func;
26354 ;
26355 return 0;
26356}
26357_ACEOF
26358if ac_fn_c_try_compile "$LINENO"; then :
26359 eval "$as_gl_Symbol=yes"
26360else
26361 eval "$as_gl_Symbol=no"
26362fi
26363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26364fi
26365eval ac_res=\$$as_gl_Symbol
26366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26367$as_echo "$ac_res" >&6; }
26368 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26369 cat >>confdefs.h <<_ACEOF
26370#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26371_ACEOF
c971b7fa 26372
5e8754f9
SDJ
26373 eval ac_cv_have_decl_$gl_func=yes
26374fi
26375 done
c971b7fa
PA
26376
26377
26378 # End of code from modules
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388 gltests_libdeps=
26389 gltests_ltlibdeps=
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399 gl_source_base='tests'
26400 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
26401
26402 gl_module_indicator_condition=$gltests_WITNESS
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412 LIBGNU_LIBDEPS="$gl_libdeps"
26413
26414 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
26415
26416
26417
26418# We don't use automake, but gnulib does. This line lets us generate
26419# its Makefile.in.
d0ac1c44 26420am__api_version='1.15'
c971b7fa
PA
26421
26422# Find a good install program. We prefer a C program (faster),
26423# so one script is as good as another. But avoid the broken or
26424# incompatible versions:
26425# SysV /etc/install, /usr/sbin/install
26426# SunOS /usr/etc/install
26427# IRIX /sbin/install
26428# AIX /bin/install
26429# AmigaOS /C/install, which installs bootblocks on floppy discs
26430# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
26431# AFS /usr/afsws/bin/install, which mishandles nonexistent args
26432# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
26433# OS/2's system install, which has a completely different semantic
26434# ./install, which can be erroneously created by make from ./install.sh.
26435# Reject install programs that cannot install multiple files.
26436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
26437$as_echo_n "checking for a BSD-compatible install... " >&6; }
26438if test -z "$INSTALL"; then
d0ac1c44 26439if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
26440 $as_echo_n "(cached) " >&6
26441else
26442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26443for as_dir in $PATH
26444do
26445 IFS=$as_save_IFS
26446 test -z "$as_dir" && as_dir=.
26447 # Account for people who put trailing slashes in PATH elements.
26448case $as_dir/ in #((
26449 ./ | .// | /[cC]/* | \
26450 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
26451 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
26452 /usr/ucb/* ) ;;
26453 *)
26454 # OSF1 and SCO ODT 3.0 have their own names for install.
26455 # Don't use installbsd from OSF since it installs stuff as root
26456 # by default.
26457 for ac_prog in ginstall scoinst install; do
26458 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26459 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
26460 if test $ac_prog = install &&
26461 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
26462 # AIX install. It has an incompatible calling convention.
26463 :
26464 elif test $ac_prog = install &&
26465 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
26466 # program-specific install script used by HP pwplus--don't use.
26467 :
26468 else
26469 rm -rf conftest.one conftest.two conftest.dir
26470 echo one > conftest.one
26471 echo two > conftest.two
26472 mkdir conftest.dir
26473 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
26474 test -s conftest.one && test -s conftest.two &&
26475 test -s conftest.dir/conftest.one &&
26476 test -s conftest.dir/conftest.two
26477 then
26478 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
26479 break 3
26480 fi
26481 fi
26482 fi
26483 done
26484 done
26485 ;;
26486esac
26487
26488 done
26489IFS=$as_save_IFS
26490
26491rm -rf conftest.one conftest.two conftest.dir
26492
26493fi
26494 if test "${ac_cv_path_install+set}" = set; then
26495 INSTALL=$ac_cv_path_install
26496 else
26497 # As a last resort, use the slow shell script. Don't cache a
26498 # value for INSTALL within a source directory, because that will
26499 # break other packages using the cache if that directory is
26500 # removed, or if the value is a relative name.
26501 INSTALL=$ac_install_sh
26502 fi
26503fi
26504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
26505$as_echo "$INSTALL" >&6; }
26506
26507# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
26508# It thinks the first close brace ends the variable substitution.
26509test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
26510
26511test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
26512
26513test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
26514
26515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
26516$as_echo_n "checking whether build environment is sane... " >&6; }
c971b7fa
PA
26517# Reject unsafe characters in $srcdir or the absolute working directory
26518# name. Accept space and tab only in the latter.
26519am_lf='
26520'
26521case `pwd` in
26522 *[\\\"\#\$\&\'\`$am_lf]*)
d0ac1c44 26523 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
c971b7fa
PA
26524esac
26525case $srcdir in
26526 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
d0ac1c44 26527 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
c971b7fa
PA
26528esac
26529
d0ac1c44 26530# Do 'set' in a subshell so we don't clobber the current shell's
c971b7fa
PA
26531# arguments. Must try -L first in case configure is actually a
26532# symlink; some systems play weird games with the mod time of symlinks
26533# (eg FreeBSD returns the mod time of the symlink's containing
26534# directory).
26535if (
d0ac1c44
SM
26536 am_has_slept=no
26537 for am_try in 1 2; do
26538 echo "timestamp, slept: $am_has_slept" > conftest.file
26539 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
26540 if test "$*" = "X"; then
26541 # -L didn't work.
26542 set X `ls -t "$srcdir/configure" conftest.file`
26543 fi
26544 if test "$*" != "X $srcdir/configure conftest.file" \
26545 && test "$*" != "X conftest.file $srcdir/configure"; then
26546
26547 # If neither matched, then we have a broken ls. This can happen
26548 # if, for instance, CONFIG_SHELL is bash and it inherits a
26549 # broken ls alias from the environment. This has actually
26550 # happened. Such a system could not be considered "sane".
26551 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
26552 alias in your environment" "$LINENO" 5
26553 fi
26554 if test "$2" = conftest.file || test $am_try -eq 2; then
26555 break
26556 fi
26557 # Just in case.
26558 sleep 1
26559 am_has_slept=yes
26560 done
c971b7fa
PA
26561 test "$2" = conftest.file
26562 )
26563then
26564 # Ok.
26565 :
26566else
d0ac1c44 26567 as_fn_error $? "newly created file is older than distributed files!
c971b7fa
PA
26568Check your system clock" "$LINENO" 5
26569fi
26570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26571$as_echo "yes" >&6; }
d0ac1c44
SM
26572# If we didn't sleep, we still need to ensure time stamps of config.status and
26573# generated files are strictly newer.
26574am_sleep_pid=
26575if grep 'slept: no' conftest.file >/dev/null 2>&1; then
26576 ( sleep 1 ) &
26577 am_sleep_pid=$!
26578fi
26579
26580rm -f conftest.file
26581
c971b7fa
PA
26582test "$program_prefix" != NONE &&
26583 program_transform_name="s&^&$program_prefix&;$program_transform_name"
26584# Use a double $ so make ignores it.
26585test "$program_suffix" != NONE &&
26586 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
26587# Double any \ or $.
26588# By default was `s,x,x', remove it if useless.
26589ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
26590program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
26591
c971b7fa
PA
26592if test x"${MISSING+set}" != xset; then
26593 case $am_aux_dir in
26594 *\ * | *\ *)
26595 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
26596 *)
26597 MISSING="\${SHELL} $am_aux_dir/missing" ;;
26598 esac
26599fi
26600# Use eval to expand $SHELL
d0ac1c44
SM
26601if eval "$MISSING --is-lightweight"; then
26602 am_missing_run="$MISSING "
c971b7fa
PA
26603else
26604 am_missing_run=
d0ac1c44
SM
26605 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
26606$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
c971b7fa
PA
26607fi
26608
d0ac1c44 26609if test x"${install_sh+set}" != xset; then
c971b7fa
PA
26610 case $am_aux_dir in
26611 *\ * | *\ *)
26612 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
26613 *)
26614 install_sh="\${SHELL} $am_aux_dir/install-sh"
26615 esac
26616fi
26617
d0ac1c44
SM
26618# Installed binaries are usually stripped using 'strip' when the user
26619# run "make install-strip". However 'strip' might not be the right
c971b7fa 26620# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 26621# will honor the 'STRIP' environment variable to overrule this program.
c971b7fa
PA
26622if test "$cross_compiling" != no; then
26623 if test -n "$ac_tool_prefix"; then
26624 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26625set dummy ${ac_tool_prefix}strip; ac_word=$2
26626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26627$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26628if ${ac_cv_prog_STRIP+:} false; then :
c971b7fa
PA
26629 $as_echo_n "(cached) " >&6
26630else
26631 if test -n "$STRIP"; then
26632 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26633else
26634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26635for as_dir in $PATH
26636do
26637 IFS=$as_save_IFS
26638 test -z "$as_dir" && as_dir=.
26639 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26641 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26643 break 2
26644 fi
26645done
26646 done
26647IFS=$as_save_IFS
26648
26649fi
26650fi
26651STRIP=$ac_cv_prog_STRIP
26652if test -n "$STRIP"; then
26653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26654$as_echo "$STRIP" >&6; }
26655else
26656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26657$as_echo "no" >&6; }
26658fi
26659
26660
26661fi
26662if test -z "$ac_cv_prog_STRIP"; then
26663 ac_ct_STRIP=$STRIP
26664 # Extract the first word of "strip", so it can be a program name with args.
26665set dummy strip; ac_word=$2
26666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26667$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26668if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
c971b7fa
PA
26669 $as_echo_n "(cached) " >&6
26670else
26671 if test -n "$ac_ct_STRIP"; then
26672 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26673else
26674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26675for as_dir in $PATH
26676do
26677 IFS=$as_save_IFS
26678 test -z "$as_dir" && as_dir=.
26679 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26681 ac_cv_prog_ac_ct_STRIP="strip"
26682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26683 break 2
26684 fi
26685done
26686 done
26687IFS=$as_save_IFS
26688
26689fi
26690fi
26691ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26692if test -n "$ac_ct_STRIP"; then
26693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26694$as_echo "$ac_ct_STRIP" >&6; }
26695else
26696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26697$as_echo "no" >&6; }
26698fi
26699
26700 if test "x$ac_ct_STRIP" = x; then
26701 STRIP=":"
26702 else
26703 case $cross_compiling:$ac_tool_warned in
26704yes:)
26705{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26706$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26707ac_tool_warned=yes ;;
26708esac
26709 STRIP=$ac_ct_STRIP
26710 fi
26711else
26712 STRIP="$ac_cv_prog_STRIP"
26713fi
26714
26715fi
26716INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
26717
c971b7fa
PA
26718for ac_prog in gawk mawk nawk awk
26719do
26720 # Extract the first word of "$ac_prog", so it can be a program name with args.
26721set dummy $ac_prog; ac_word=$2
26722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26723$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 26724if ${ac_cv_prog_AWK+:} false; then :
c971b7fa
PA
26725 $as_echo_n "(cached) " >&6
26726else
26727 if test -n "$AWK"; then
26728 ac_cv_prog_AWK="$AWK" # Let the user override the test.
26729else
26730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26731for as_dir in $PATH
26732do
26733 IFS=$as_save_IFS
26734 test -z "$as_dir" && as_dir=.
26735 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 26736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
26737 ac_cv_prog_AWK="$ac_prog"
26738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26739 break 2
26740 fi
26741done
26742 done
26743IFS=$as_save_IFS
26744
26745fi
26746fi
26747AWK=$ac_cv_prog_AWK
26748if test -n "$AWK"; then
26749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
26750$as_echo "$AWK" >&6; }
26751else
26752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26753$as_echo "no" >&6; }
26754fi
26755
26756
26757 test -n "$AWK" && break
26758done
26759
26760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
26761$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
26762set x ${MAKE-make}
26763ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
d0ac1c44 26764if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
c971b7fa
PA
26765 $as_echo_n "(cached) " >&6
26766else
26767 cat >conftest.make <<\_ACEOF
26768SHELL = /bin/sh
26769all:
26770 @echo '@@@%%%=$(MAKE)=@@@%%%'
26771_ACEOF
d0ac1c44 26772# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
c971b7fa
PA
26773case `${MAKE-make} -f conftest.make 2>/dev/null` in
26774 *@@@%%%=?*=@@@%%%*)
26775 eval ac_cv_prog_make_${ac_make}_set=yes;;
26776 *)
26777 eval ac_cv_prog_make_${ac_make}_set=no;;
26778esac
26779rm -f conftest.make
26780fi
26781if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
26782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26783$as_echo "yes" >&6; }
26784 SET_MAKE=
26785else
26786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26787$as_echo "no" >&6; }
26788 SET_MAKE="MAKE=${MAKE-make}"
26789fi
26790
26791rm -rf .tst 2>/dev/null
26792mkdir .tst 2>/dev/null
26793if test -d .tst; then
26794 am__leading_dot=.
26795else
26796 am__leading_dot=_
26797fi
26798rmdir .tst 2>/dev/null
26799
26800DEPDIR="${am__leading_dot}deps"
26801
26802ac_config_commands="$ac_config_commands depfiles"
26803
26804
26805am_make=${MAKE-make}
26806cat > confinc << 'END'
26807am__doit:
26808 @echo this is the am__doit target
26809.PHONY: am__doit
26810END
26811# If we don't find an include directive, just comment out the code.
26812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
26813$as_echo_n "checking for style of include used by $am_make... " >&6; }
26814am__include="#"
26815am__quote=
26816_am_result=none
26817# First try GNU make style include.
26818echo "include confinc" > confmf
d0ac1c44 26819# Ignore all kinds of additional output from 'make'.
c971b7fa
PA
26820case `$am_make -s -f confmf 2> /dev/null` in #(
26821*the\ am__doit\ target*)
26822 am__include=include
26823 am__quote=
26824 _am_result=GNU
26825 ;;
26826esac
26827# Now try BSD make style include.
26828if test "$am__include" = "#"; then
26829 echo '.include "confinc"' > confmf
26830 case `$am_make -s -f confmf 2> /dev/null` in #(
26831 *the\ am__doit\ target*)
26832 am__include=.include
26833 am__quote="\""
26834 _am_result=BSD
26835 ;;
26836 esac
26837fi
26838
26839
26840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
26841$as_echo "$_am_result" >&6; }
26842rm -f confinc confmf
26843
26844# Check whether --enable-dependency-tracking was given.
26845if test "${enable_dependency_tracking+set}" = set; then :
26846 enableval=$enable_dependency_tracking;
26847fi
26848
26849if test "x$enable_dependency_tracking" != xno; then
26850 am_depcomp="$ac_aux_dir/depcomp"
26851 AMDEPBACKSLASH='\'
d0ac1c44 26852 am__nodep='_no'
c971b7fa
PA
26853fi
26854 if test "x$enable_dependency_tracking" != xno; then
26855 AMDEP_TRUE=
26856 AMDEP_FALSE='#'
26857else
26858 AMDEP_TRUE='#'
26859 AMDEP_FALSE=
26860fi
26861
26862
d0ac1c44
SM
26863# Check whether --enable-silent-rules was given.
26864if test "${enable_silent_rules+set}" = set; then :
26865 enableval=$enable_silent_rules;
26866fi
26867
26868case $enable_silent_rules in # (((
26869 yes) AM_DEFAULT_VERBOSITY=0;;
26870 no) AM_DEFAULT_VERBOSITY=1;;
26871 *) AM_DEFAULT_VERBOSITY=1;;
26872esac
26873am_make=${MAKE-make}
26874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
26875$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
26876if ${am_cv_make_support_nested_variables+:} false; then :
26877 $as_echo_n "(cached) " >&6
26878else
26879 if $as_echo 'TRUE=$(BAR$(V))
26880BAR0=false
26881BAR1=true
26882V=1
26883am__doit:
26884 @$(TRUE)
26885.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
26886 am_cv_make_support_nested_variables=yes
26887else
26888 am_cv_make_support_nested_variables=no
26889fi
26890fi
26891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
26892$as_echo "$am_cv_make_support_nested_variables" >&6; }
26893if test $am_cv_make_support_nested_variables = yes; then
26894 AM_V='$(V)'
26895 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
26896else
26897 AM_V=$AM_DEFAULT_VERBOSITY
26898 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
26899fi
26900AM_BACKSLASH='\'
26901
c971b7fa
PA
26902if test "`cd $srcdir && pwd`" != "`pwd`"; then
26903 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
26904 # is not polluted with repeated "-I."
26905 am__isrc=' -I$(srcdir)'
26906 # test to see if srcdir already configured
26907 if test -f $srcdir/config.status; then
d0ac1c44 26908 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
c971b7fa
PA
26909 fi
26910fi
26911
26912# test whether we have cygpath
26913if test -z "$CYGPATH_W"; then
26914 if (cygpath --version) >/dev/null 2>/dev/null; then
26915 CYGPATH_W='cygpath -w'
26916 else
26917 CYGPATH_W=echo
26918 fi
26919fi
26920
26921
26922# Define the identity of the package.
d0ac1c44
SM
26923 PACKAGE='libgnu'
26924 VERSION='UNUSED-VERSION'
c971b7fa
PA
26925
26926
26927# Some tools Automake needs.
26928
26929ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
26930
26931
26932AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
26933
26934
26935AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
26936
26937
26938AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
26939
26940
26941MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
26942
d0ac1c44
SM
26943# For better backward compatibility. To be removed once Automake 1.9.x
26944# dies out for good. For more background, see:
26945# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
26946# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
26947mkdir_p='$(MKDIR_P)'
26948
26949# We need awk for the "check" target (and possibly the TAP driver). The
26950# system "awk" is bad on some platforms.
26951# Always define AMTAR for backward compatibility. Yes, it's still used
26952# in the wild :-( We should find a proper way to deprecate it ...
26953AMTAR='$${TAR-tar}'
26954
26955
26956# We'll loop over all known methods to create a tar archive until one works.
26957_am_tools='gnutar pax cpio none'
c971b7fa 26958
d0ac1c44 26959am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
c971b7fa 26960
c971b7fa
PA
26961
26962
26963
26964
26965depcc="$CC" am_compiler_list=
26966
26967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
26968$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 26969if ${am_cv_CC_dependencies_compiler_type+:} false; then :
c971b7fa
PA
26970 $as_echo_n "(cached) " >&6
26971else
26972 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
26973 # We make a subdir and do the tests there. Otherwise we can end up
26974 # making bogus files that we don't know about and never remove. For
26975 # instance it was reported that on HP-UX the gcc test will end up
d0ac1c44
SM
26976 # making a dummy file named 'D' -- because '-MD' means "put the output
26977 # in D".
26978 rm -rf conftest.dir
c971b7fa
PA
26979 mkdir conftest.dir
26980 # Copy depcomp to subdir because otherwise we won't find it if we're
26981 # using a relative directory.
26982 cp "$am_depcomp" conftest.dir
26983 cd conftest.dir
26984 # We will build objects and dependencies in a subdirectory because
26985 # it helps to detect inapplicable dependency modes. For instance
26986 # both Tru64's cc and ICC support -MD to output dependencies as a
26987 # side effect of compilation, but ICC will put the dependencies in
26988 # the current directory while Tru64 will put them in the object
26989 # directory.
26990 mkdir sub
26991
26992 am_cv_CC_dependencies_compiler_type=none
26993 if test "$am_compiler_list" = ""; then
26994 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
26995 fi
26996 am__universal=false
26997 case " $depcc " in #(
26998 *\ -arch\ *\ -arch\ *) am__universal=true ;;
26999 esac
27000
27001 for depmode in $am_compiler_list; do
27002 # Setup a source with many dependencies, because some compilers
27003 # like to wrap large dependency lists on column 80 (with \), and
27004 # we should not choose a depcomp mode which is confused by this.
27005 #
27006 # We need to recreate these files for each test, as the compiler may
27007 # overwrite some of them when testing with obscure command lines.
27008 # This happens at least with the AIX C compiler.
27009 : > sub/conftest.c
27010 for i in 1 2 3 4 5 6; do
27011 echo '#include "conftst'$i'.h"' >> sub/conftest.c
d0ac1c44
SM
27012 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
27013 # Solaris 10 /bin/sh.
27014 echo '/* dummy */' > sub/conftst$i.h
c971b7fa
PA
27015 done
27016 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
27017
d0ac1c44 27018 # We check with '-c' and '-o' for the sake of the "dashmstdout"
c971b7fa 27019 # mode. It turns out that the SunPro C++ compiler does not properly
d0ac1c44
SM
27020 # handle '-M -o', and we need to detect this. Also, some Intel
27021 # versions had trouble with output in subdirs.
c971b7fa
PA
27022 am__obj=sub/conftest.${OBJEXT-o}
27023 am__minus_obj="-o $am__obj"
27024 case $depmode in
27025 gcc)
27026 # This depmode causes a compiler race in universal mode.
27027 test "$am__universal" = false || continue
27028 ;;
27029 nosideeffect)
d0ac1c44
SM
27030 # After this tag, mechanisms are not by side-effect, so they'll
27031 # only be used when explicitly requested.
c971b7fa
PA
27032 if test "x$enable_dependency_tracking" = xyes; then
27033 continue
27034 else
27035 break
27036 fi
27037 ;;
d0ac1c44
SM
27038 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
27039 # This compiler won't grok '-c -o', but also, the minuso test has
c971b7fa
PA
27040 # not run yet. These depmodes are late enough in the game, and
27041 # so weak that their functioning should not be impacted.
27042 am__obj=conftest.${OBJEXT-o}
27043 am__minus_obj=
27044 ;;
27045 none) break ;;
27046 esac
27047 if depmode=$depmode \
27048 source=sub/conftest.c object=$am__obj \
27049 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
27050 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
27051 >/dev/null 2>conftest.err &&
27052 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
27053 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
27054 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
27055 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
27056 # icc doesn't choke on unknown options, it will just issue warnings
27057 # or remarks (even with -Werror). So we grep stderr for any message
27058 # that says an option was ignored or not supported.
27059 # When given -MP, icc 7.0 and 7.1 complain thusly:
27060 # icc: Command line warning: ignoring option '-M'; no argument required
27061 # The diagnosis changed in icc 8.0:
27062 # icc: Command line remark: option '-MP' not supported
27063 if (grep 'ignoring option' conftest.err ||
27064 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
27065 am_cv_CC_dependencies_compiler_type=$depmode
27066 break
27067 fi
27068 fi
27069 done
27070
27071 cd ..
27072 rm -rf conftest.dir
27073else
27074 am_cv_CC_dependencies_compiler_type=none
27075fi
27076
27077fi
27078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
27079$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
27080CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
27081
27082 if
27083 test "x$enable_dependency_tracking" != xno \
27084 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
27085 am__fastdepCC_TRUE=
27086 am__fastdepCC_FALSE='#'
27087else
27088 am__fastdepCC_TRUE='#'
27089 am__fastdepCC_FALSE=
27090fi
27091
27092
27093
d0ac1c44
SM
27094# POSIX will say in a future version that running "rm -f" with no argument
27095# is OK; and we want to be able to make that assumption in our Makefile
27096# recipes. So use an aggressive probe to check that the usage we want is
27097# actually supported "in the wild" to an acceptable degree.
27098# See automake bug#10828.
27099# To make any issue more visible, cause the running configure to be aborted
27100# by default if the 'rm' program in use doesn't match our expectations; the
27101# user can still override this though.
27102if rm -f && rm -fr && rm -rf; then : OK; else
27103 cat >&2 <<'END'
27104Oops!
27105
27106Your 'rm' program seems unable to run without file operands specified
27107on the command line, even when the '-f' option is present. This is contrary
27108to the behaviour of most rm programs out there, and not conforming with
27109the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
27110
27111Please tell bug-automake@gnu.org about your system, including the value
27112of your $PATH and any error possibly output before this message. This
27113can help us improve future automake versions.
27114
27115END
27116 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
27117 echo 'Configuration will proceed anyway, since you have set the' >&2
27118 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
27119 echo >&2
27120 else
27121 cat >&2 <<'END'
27122Aborting the configuration process, to ensure you take notice of the issue.
27123
27124You can download and install GNU coreutils to get an 'rm' implementation
27125that behaves properly: <http://www.gnu.org/software/coreutils/>.
27126
27127If you want to complete the configuration process using your problematic
27128'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
27129to "yes", and re-run configure.
27130
27131END
27132 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
27133 fi
27134fi
27135
c971b7fa 27136
39be3c7e
SM
27137# Check whether --enable-silent-rules was given.
27138if test "${enable_silent_rules+set}" = set; then :
27139 enableval=$enable_silent_rules;
27140fi
27141
d0ac1c44
SM
27142case $enable_silent_rules in # (((
27143 yes) AM_DEFAULT_VERBOSITY=0;;
27144 no) AM_DEFAULT_VERBOSITY=1;;
27145 *) AM_DEFAULT_VERBOSITY=0;;
39be3c7e 27146esac
d0ac1c44
SM
27147am_make=${MAKE-make}
27148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
27149$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
27150if ${am_cv_make_support_nested_variables+:} false; then :
27151 $as_echo_n "(cached) " >&6
27152else
27153 if $as_echo 'TRUE=$(BAR$(V))
27154BAR0=false
27155BAR1=true
27156V=1
27157am__doit:
27158 @$(TRUE)
27159.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
27160 am_cv_make_support_nested_variables=yes
27161else
27162 am_cv_make_support_nested_variables=no
27163fi
27164fi
27165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
27166$as_echo "$am_cv_make_support_nested_variables" >&6; }
27167if test $am_cv_make_support_nested_variables = yes; then
27168 AM_V='$(V)'
27169 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
27170else
27171 AM_V=$AM_DEFAULT_VERBOSITY
27172 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
27173fi
39be3c7e
SM
27174AM_BACKSLASH='\'
27175
27176
c971b7fa
PA
27177# --------------------- #
27178# Checks for programs. #
27179# --------------------- #
27180
27181
27182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
27183$as_echo_n "checking whether ln -s works... " >&6; }
27184LN_S=$as_ln_s
27185if test "$LN_S" = "ln -s"; then
27186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27187$as_echo "yes" >&6; }
27188else
27189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
27190$as_echo "no, using $LN_S" >&6; }
27191fi
27192
27193if test -n "$ac_tool_prefix"; then
27194 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
27195set dummy ${ac_tool_prefix}ranlib; ac_word=$2
27196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27197$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 27198if ${ac_cv_prog_RANLIB+:} false; then :
c971b7fa
PA
27199 $as_echo_n "(cached) " >&6
27200else
27201 if test -n "$RANLIB"; then
27202 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
27203else
27204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27205for as_dir in $PATH
27206do
27207 IFS=$as_save_IFS
27208 test -z "$as_dir" && as_dir=.
27209 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 27210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
27211 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
27212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27213 break 2
27214 fi
27215done
27216 done
27217IFS=$as_save_IFS
27218
27219fi
27220fi
27221RANLIB=$ac_cv_prog_RANLIB
27222if test -n "$RANLIB"; then
27223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
27224$as_echo "$RANLIB" >&6; }
27225else
27226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27227$as_echo "no" >&6; }
27228fi
27229
27230
27231fi
27232if test -z "$ac_cv_prog_RANLIB"; then
27233 ac_ct_RANLIB=$RANLIB
27234 # Extract the first word of "ranlib", so it can be a program name with args.
27235set dummy ranlib; ac_word=$2
27236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27237$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 27238if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
27239 $as_echo_n "(cached) " >&6
27240else
27241 if test -n "$ac_ct_RANLIB"; then
27242 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
27243else
27244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27245for as_dir in $PATH
27246do
27247 IFS=$as_save_IFS
27248 test -z "$as_dir" && as_dir=.
27249 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 27250 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
27251 ac_cv_prog_ac_ct_RANLIB="ranlib"
27252 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27253 break 2
27254 fi
27255done
27256 done
27257IFS=$as_save_IFS
27258
27259fi
27260fi
27261ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
27262if test -n "$ac_ct_RANLIB"; then
27263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
27264$as_echo "$ac_ct_RANLIB" >&6; }
27265else
27266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27267$as_echo "no" >&6; }
27268fi
27269
27270 if test "x$ac_ct_RANLIB" = x; then
27271 RANLIB=":"
27272 else
27273 case $cross_compiling:$ac_tool_warned in
27274yes:)
27275{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27276$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27277ac_tool_warned=yes ;;
27278esac
27279 RANLIB=$ac_ct_RANLIB
27280 fi
27281else
27282 RANLIB="$ac_cv_prog_RANLIB"
27283fi
27284
27285
27286if test -n "$ac_tool_prefix"; then
27287 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
27288set dummy ${ac_tool_prefix}ar; ac_word=$2
27289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27290$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 27291if ${ac_cv_prog_AR+:} false; then :
c971b7fa
PA
27292 $as_echo_n "(cached) " >&6
27293else
27294 if test -n "$AR"; then
27295 ac_cv_prog_AR="$AR" # Let the user override the test.
27296else
27297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27298for as_dir in $PATH
27299do
27300 IFS=$as_save_IFS
27301 test -z "$as_dir" && as_dir=.
27302 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 27303 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
27304 ac_cv_prog_AR="${ac_tool_prefix}ar"
27305 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27306 break 2
27307 fi
27308done
27309 done
27310IFS=$as_save_IFS
27311
27312fi
27313fi
27314AR=$ac_cv_prog_AR
27315if test -n "$AR"; then
27316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
27317$as_echo "$AR" >&6; }
27318else
27319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27320$as_echo "no" >&6; }
27321fi
27322
27323
27324fi
27325if test -z "$ac_cv_prog_AR"; then
27326 ac_ct_AR=$AR
27327 # Extract the first word of "ar", so it can be a program name with args.
27328set dummy ar; ac_word=$2
27329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27330$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 27331if ${ac_cv_prog_ac_ct_AR+:} false; then :
c971b7fa
PA
27332 $as_echo_n "(cached) " >&6
27333else
27334 if test -n "$ac_ct_AR"; then
27335 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
27336else
27337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27338for as_dir in $PATH
27339do
27340 IFS=$as_save_IFS
27341 test -z "$as_dir" && as_dir=.
27342 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 27343 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
27344 ac_cv_prog_ac_ct_AR="ar"
27345 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27346 break 2
27347 fi
27348done
27349 done
27350IFS=$as_save_IFS
27351
27352fi
27353fi
27354ac_ct_AR=$ac_cv_prog_ac_ct_AR
27355if test -n "$ac_ct_AR"; then
27356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
27357$as_echo "$ac_ct_AR" >&6; }
27358else
27359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27360$as_echo "no" >&6; }
27361fi
27362
27363 if test "x$ac_ct_AR" = x; then
27364 AR=""
27365 else
27366 case $cross_compiling:$ac_tool_warned in
27367yes:)
27368{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27369$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27370ac_tool_warned=yes ;;
27371esac
27372 AR=$ac_ct_AR
27373 fi
27374else
27375 AR="$ac_cv_prog_AR"
27376fi
27377
27378
27379# ---------------------- #
27380# Checks for libraries. #
27381# ---------------------- #
27382
27383ac_config_files="$ac_config_files Makefile import/Makefile"
27384
27385ac_config_commands="$ac_config_commands default"
27386
27387cat >confcache <<\_ACEOF
27388# This file is a shell script that caches the results of configure
27389# tests run on this system so they can be shared between configure
27390# scripts and configure runs, see configure's option --config-cache.
27391# It is not useful on other systems. If it contains results you don't
27392# want to keep, you may remove or edit it.
27393#
27394# config.status only pays attention to the cache file if you give it
27395# the --recheck option to rerun configure.
27396#
27397# `ac_cv_env_foo' variables (set or unset) will be overridden when
27398# loading this file, other *unset* `ac_cv_foo' will be assigned the
27399# following values.
27400
27401_ACEOF
27402
27403# The following way of writing the cache mishandles newlines in values,
27404# but we know of no workaround that is simple, portable, and efficient.
27405# So, we kill variables containing newlines.
27406# Ultrix sh set writes to stderr and can't be redirected directly,
27407# and sets the high bit in the cache file unless we assign to the vars.
27408(
27409 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27410 eval ac_val=\$$ac_var
27411 case $ac_val in #(
27412 *${as_nl}*)
27413 case $ac_var in #(
27414 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
27415$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
27416 esac
27417 case $ac_var in #(
27418 _ | IFS | as_nl) ;; #(
27419 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
27420 *) { eval $ac_var=; unset $ac_var;} ;;
27421 esac ;;
27422 esac
27423 done
27424
27425 (set) 2>&1 |
27426 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27427 *${as_nl}ac_space=\ *)
27428 # `set' does not quote correctly, so add quotes: double-quote
27429 # substitution turns \\\\ into \\, and sed turns \\ into \.
27430 sed -n \
27431 "s/'/'\\\\''/g;
27432 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
27433 ;; #(
27434 *)
27435 # `set' quotes correctly as required by POSIX, so do not add quotes.
27436 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
27437 ;;
27438 esac |
27439 sort
27440) |
27441 sed '
27442 /^ac_cv_env_/b end
27443 t clear
27444 :clear
27445 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27446 t end
27447 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27448 :end' >>confcache
27449if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27450 if test -w "$cache_file"; then
d0ac1c44 27451 if test "x$cache_file" != "x/dev/null"; then
c971b7fa
PA
27452 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
27453$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
27454 if test ! -f "$cache_file" || test -h "$cache_file"; then
27455 cat confcache >"$cache_file"
27456 else
27457 case $cache_file in #(
27458 */* | ?:*)
27459 mv -f confcache "$cache_file"$$ &&
27460 mv -f "$cache_file"$$ "$cache_file" ;; #(
27461 *)
27462 mv -f confcache "$cache_file" ;;
27463 esac
27464 fi
27465 fi
c971b7fa
PA
27466 else
27467 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
27468$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
27469 fi
27470fi
27471rm -f confcache
27472
27473test "x$prefix" = xNONE && prefix=$ac_default_prefix
27474# Let make expand exec_prefix.
27475test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
27476
27477DEFS=-DHAVE_CONFIG_H
27478
27479ac_libobjs=
27480ac_ltlibobjs=
27481for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27482 # 1. Remove the extension, and $U if already installed.
27483 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
27484 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
27485 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27486 # will be set to the directory where LIBOBJS objects are built.
27487 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27488 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
27489done
27490LIBOBJS=$ac_libobjs
27491
27492LTLIBOBJS=$ac_ltlibobjs
27493
27494
27495if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 27496 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
c971b7fa
PA
27497Usually this means the macro was only invoked conditionally." "$LINENO" 5
27498fi
27499if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
d0ac1c44 27500 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
c971b7fa
PA
27501Usually this means the macro was only invoked conditionally." "$LINENO" 5
27502fi
8690e634 27503if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
d0ac1c44 27504 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
8690e634
JK
27505Usually this means the macro was only invoked conditionally." "$LINENO" 5
27506fi
18848e28 27507if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
d0ac1c44 27508 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
18848e28
GF
27509Usually this means the macro was only invoked conditionally." "$LINENO" 5
27510fi
88b48903 27511if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
d0ac1c44 27512 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
88b48903
WN
27513Usually this means the macro was only invoked conditionally." "$LINENO" 5
27514fi
8690e634 27515if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
d0ac1c44 27516 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
8690e634
JK
27517Usually this means the macro was only invoked conditionally." "$LINENO" 5
27518fi
6ec2e0f5 27519if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
d0ac1c44 27520 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
6ec2e0f5
SDJ
27521Usually this means the macro was only invoked conditionally." "$LINENO" 5
27522fi
49e4877c 27523if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 27524 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
27525Usually this means the macro was only invoked conditionally." "$LINENO" 5
27526fi
27527if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 27528 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
27529Usually this means the macro was only invoked conditionally." "$LINENO" 5
27530fi
c971b7fa 27531if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
d0ac1c44 27532 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
c971b7fa
PA
27533Usually this means the macro was only invoked conditionally." "$LINENO" 5
27534fi
88b48903
WN
27535
27536
725e2999
JB
27537if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
27538 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
27539Usually this means the macro was only invoked conditionally." "$LINENO" 5
27540fi
27541if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
27542 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
27543Usually this means the macro was only invoked conditionally." "$LINENO" 5
27544fi
8690e634 27545if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
d0ac1c44 27546 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
8690e634
JK
27547Usually this means the macro was only invoked conditionally." "$LINENO" 5
27548fi
c971b7fa 27549if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
d0ac1c44 27550 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
c971b7fa
PA
27551Usually this means the macro was only invoked conditionally." "$LINENO" 5
27552fi
27553
27554 gl_libobjs=
27555 gl_ltlibobjs=
27556 if test -n "$gl_LIBOBJS"; then
27557 # Remove the extension.
27558 sed_drop_objext='s/\.o$//;s/\.obj$//'
27559 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
27560 gl_libobjs="$gl_libobjs $i.$ac_objext"
27561 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
27562 done
27563 fi
27564 gl_LIBOBJS=$gl_libobjs
27565
27566 gl_LTLIBOBJS=$gl_ltlibobjs
27567
27568
27569
27570 gltests_libobjs=
27571 gltests_ltlibobjs=
27572 if test -n "$gltests_LIBOBJS"; then
27573 # Remove the extension.
27574 sed_drop_objext='s/\.o$//;s/\.obj$//'
27575 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
27576 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
27577 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
27578 done
27579 fi
27580 gltests_LIBOBJS=$gltests_libobjs
27581
27582 gltests_LTLIBOBJS=$gltests_ltlibobjs
27583
27584
d0ac1c44
SM
27585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
27586$as_echo_n "checking that generated files are newer than configure... " >&6; }
27587 if test -n "$am_sleep_pid"; then
27588 # Hide warnings about reused PIDs.
27589 wait $am_sleep_pid 2>/dev/null
27590 fi
27591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
27592$as_echo "done" >&6; }
c971b7fa 27593if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
d0ac1c44 27594 as_fn_error $? "conditional \"AMDEP\" was never defined.
c971b7fa
PA
27595Usually this means the macro was only invoked conditionally." "$LINENO" 5
27596fi
27597if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
d0ac1c44 27598 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
c971b7fa
PA
27599Usually this means the macro was only invoked conditionally." "$LINENO" 5
27600fi
27601 if test -n "$EXEEXT"; then
27602 am__EXEEXT_TRUE=
27603 am__EXEEXT_FALSE='#'
27604else
27605 am__EXEEXT_TRUE='#'
27606 am__EXEEXT_FALSE=
27607fi
27608
27609
d0ac1c44 27610: "${CONFIG_STATUS=./config.status}"
c971b7fa
PA
27611ac_write_fail=0
27612ac_clean_files_save=$ac_clean_files
27613ac_clean_files="$ac_clean_files $CONFIG_STATUS"
27614{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
27615$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
27616as_write_fail=0
27617cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
27618#! $SHELL
27619# Generated by $as_me.
27620# Run this file to recreate the current configuration.
27621# Compiler output produced by configure, useful for debugging
27622# configure, is in config.log if it exists.
27623
27624debug=false
27625ac_cs_recheck=false
27626ac_cs_silent=false
27627
27628SHELL=\${CONFIG_SHELL-$SHELL}
27629export SHELL
27630_ASEOF
27631cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
27632## -------------------- ##
27633## M4sh Initialization. ##
27634## -------------------- ##
27635
27636# Be more Bourne compatible
27637DUALCASE=1; export DUALCASE # for MKS sh
27638if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
27639 emulate sh
27640 NULLCMD=:
27641 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
27642 # is contrary to our usage. Disable this feature.
27643 alias -g '${1+"$@"}'='"$@"'
27644 setopt NO_GLOB_SUBST
27645else
27646 case `(set -o) 2>/dev/null` in #(
27647 *posix*) :
27648 set -o posix ;; #(
27649 *) :
27650 ;;
27651esac
27652fi
27653
27654
27655as_nl='
27656'
27657export as_nl
27658# Printing a long string crashes Solaris 7 /usr/bin/printf.
27659as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
27660as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
27661as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
27662# Prefer a ksh shell builtin over an external printf program on Solaris,
27663# but without wasting forks for bash or zsh.
27664if test -z "$BASH_VERSION$ZSH_VERSION" \
27665 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
27666 as_echo='print -r --'
27667 as_echo_n='print -rn --'
27668elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
27669 as_echo='printf %s\n'
27670 as_echo_n='printf %s'
27671else
27672 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
27673 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
27674 as_echo_n='/usr/ucb/echo -n'
27675 else
27676 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
27677 as_echo_n_body='eval
27678 arg=$1;
27679 case $arg in #(
27680 *"$as_nl"*)
27681 expr "X$arg" : "X\\(.*\\)$as_nl";
27682 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
27683 esac;
27684 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
27685 '
27686 export as_echo_n_body
27687 as_echo_n='sh -c $as_echo_n_body as_echo'
27688 fi
27689 export as_echo_body
27690 as_echo='sh -c $as_echo_body as_echo'
27691fi
27692
27693# The user is always right.
27694if test "${PATH_SEPARATOR+set}" != set; then
27695 PATH_SEPARATOR=:
27696 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
27697 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
27698 PATH_SEPARATOR=';'
27699 }
27700fi
27701
27702
27703# IFS
27704# We need space, tab and new line, in precisely that order. Quoting is
27705# there to prevent editors from complaining about space-tab.
27706# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27707# splitting by setting IFS to empty value.)
27708IFS=" "" $as_nl"
27709
27710# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 27711as_myself=
c971b7fa
PA
27712case $0 in #((
27713 *[\\/]* ) as_myself=$0 ;;
27714 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27715for as_dir in $PATH
27716do
27717 IFS=$as_save_IFS
27718 test -z "$as_dir" && as_dir=.
27719 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27720 done
27721IFS=$as_save_IFS
27722
27723 ;;
27724esac
27725# We did not find ourselves, most probably we were run as `sh COMMAND'
27726# in which case we are not to be found in the path.
27727if test "x$as_myself" = x; then
27728 as_myself=$0
27729fi
27730if test ! -f "$as_myself"; then
27731 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
27732 exit 1
27733fi
27734
27735# Unset variables that we do not need and which cause bugs (e.g. in
27736# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
27737# suppresses any "Segmentation fault" message there. '((' could
27738# trigger a bug in pdksh 5.2.14.
27739for as_var in BASH_ENV ENV MAIL MAILPATH
27740do eval test x\${$as_var+set} = xset \
27741 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
27742done
27743PS1='$ '
27744PS2='> '
27745PS4='+ '
27746
27747# NLS nuisances.
27748LC_ALL=C
27749export LC_ALL
27750LANGUAGE=C
27751export LANGUAGE
27752
27753# CDPATH.
27754(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
27755
27756
d0ac1c44
SM
27757# as_fn_error STATUS ERROR [LINENO LOG_FD]
27758# ----------------------------------------
c971b7fa
PA
27759# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
27760# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 27761# script with STATUS, using 1 if that was 0.
c971b7fa
PA
27762as_fn_error ()
27763{
d0ac1c44
SM
27764 as_status=$1; test $as_status -eq 0 && as_status=1
27765 if test "$4"; then
27766 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
27767 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
c971b7fa 27768 fi
d0ac1c44 27769 $as_echo "$as_me: error: $2" >&2
c971b7fa
PA
27770 as_fn_exit $as_status
27771} # as_fn_error
27772
27773
27774# as_fn_set_status STATUS
27775# -----------------------
27776# Set $? to STATUS, without forking.
27777as_fn_set_status ()
27778{
27779 return $1
27780} # as_fn_set_status
27781
27782# as_fn_exit STATUS
27783# -----------------
27784# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
27785as_fn_exit ()
27786{
27787 set +e
27788 as_fn_set_status $1
27789 exit $1
27790} # as_fn_exit
27791
27792# as_fn_unset VAR
27793# ---------------
27794# Portably unset VAR.
27795as_fn_unset ()
27796{
27797 { eval $1=; unset $1;}
27798}
27799as_unset=as_fn_unset
27800# as_fn_append VAR VALUE
27801# ----------------------
27802# Append the text in VALUE to the end of the definition contained in VAR. Take
27803# advantage of any shell optimizations that allow amortized linear growth over
27804# repeated appends, instead of the typical quadratic growth present in naive
27805# implementations.
27806if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
27807 eval 'as_fn_append ()
27808 {
27809 eval $1+=\$2
27810 }'
27811else
27812 as_fn_append ()
27813 {
27814 eval $1=\$$1\$2
27815 }
27816fi # as_fn_append
27817
27818# as_fn_arith ARG...
27819# ------------------
27820# Perform arithmetic evaluation on the ARGs, and store the result in the
27821# global $as_val. Take advantage of shells that can avoid forks. The arguments
27822# must be portable across $(()) and expr.
27823if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
27824 eval 'as_fn_arith ()
27825 {
27826 as_val=$(( $* ))
27827 }'
27828else
27829 as_fn_arith ()
27830 {
27831 as_val=`expr "$@" || test $? -eq 1`
27832 }
27833fi # as_fn_arith
27834
27835
27836if expr a : '\(a\)' >/dev/null 2>&1 &&
27837 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27838 as_expr=expr
27839else
27840 as_expr=false
27841fi
27842
27843if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27844 as_basename=basename
27845else
27846 as_basename=false
27847fi
27848
27849if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27850 as_dirname=dirname
27851else
27852 as_dirname=false
27853fi
27854
27855as_me=`$as_basename -- "$0" ||
27856$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27857 X"$0" : 'X\(//\)$' \| \
27858 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
27859$as_echo X/"$0" |
27860 sed '/^.*\/\([^/][^/]*\)\/*$/{
27861 s//\1/
27862 q
27863 }
27864 /^X\/\(\/\/\)$/{
27865 s//\1/
27866 q
27867 }
27868 /^X\/\(\/\).*/{
27869 s//\1/
27870 q
27871 }
27872 s/.*/./; q'`
27873
27874# Avoid depending upon Character Ranges.
27875as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27876as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27877as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27878as_cr_digits='0123456789'
27879as_cr_alnum=$as_cr_Letters$as_cr_digits
27880
27881ECHO_C= ECHO_N= ECHO_T=
27882case `echo -n x` in #(((((
27883-n*)
27884 case `echo 'xy\c'` in
27885 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27886 xy) ECHO_C='\c';;
27887 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
27888 ECHO_T=' ';;
27889 esac;;
27890*)
27891 ECHO_N='-n';;
27892esac
27893
27894rm -f conf$$ conf$$.exe conf$$.file
27895if test -d conf$$.dir; then
27896 rm -f conf$$.dir/conf$$.file
27897else
27898 rm -f conf$$.dir
27899 mkdir conf$$.dir 2>/dev/null
27900fi
27901if (echo >conf$$.file) 2>/dev/null; then
27902 if ln -s conf$$.file conf$$ 2>/dev/null; then
27903 as_ln_s='ln -s'
27904 # ... but there are two gotchas:
27905 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27906 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 27907 # In both cases, we have to default to `cp -pR'.
c971b7fa 27908 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 27909 as_ln_s='cp -pR'
c971b7fa
PA
27910 elif ln conf$$.file conf$$ 2>/dev/null; then
27911 as_ln_s=ln
27912 else
d0ac1c44 27913 as_ln_s='cp -pR'
c971b7fa
PA
27914 fi
27915else
d0ac1c44 27916 as_ln_s='cp -pR'
c971b7fa
PA
27917fi
27918rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27919rmdir conf$$.dir 2>/dev/null
27920
27921
27922# as_fn_mkdir_p
27923# -------------
27924# Create "$as_dir" as a directory, including parents if necessary.
27925as_fn_mkdir_p ()
27926{
27927
27928 case $as_dir in #(
27929 -*) as_dir=./$as_dir;;
27930 esac
27931 test -d "$as_dir" || eval $as_mkdir_p || {
27932 as_dirs=
27933 while :; do
27934 case $as_dir in #(
27935 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
27936 *) as_qdir=$as_dir;;
27937 esac
27938 as_dirs="'$as_qdir' $as_dirs"
27939 as_dir=`$as_dirname -- "$as_dir" ||
27940$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27941 X"$as_dir" : 'X\(//\)[^/]' \| \
27942 X"$as_dir" : 'X\(//\)$' \| \
27943 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
27944$as_echo X"$as_dir" |
27945 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27946 s//\1/
27947 q
27948 }
27949 /^X\(\/\/\)[^/].*/{
27950 s//\1/
27951 q
27952 }
27953 /^X\(\/\/\)$/{
27954 s//\1/
27955 q
27956 }
27957 /^X\(\/\).*/{
27958 s//\1/
27959 q
27960 }
27961 s/.*/./; q'`
27962 test -d "$as_dir" && break
27963 done
27964 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 27965 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
c971b7fa
PA
27966
27967
27968} # as_fn_mkdir_p
27969if mkdir -p . 2>/dev/null; then
27970 as_mkdir_p='mkdir -p "$as_dir"'
27971else
27972 test -d ./-p && rmdir ./-p
27973 as_mkdir_p=false
27974fi
27975
d0ac1c44
SM
27976
27977# as_fn_executable_p FILE
27978# -----------------------
27979# Test if FILE is an executable regular file.
27980as_fn_executable_p ()
27981{
27982 test -f "$1" && test -x "$1"
27983} # as_fn_executable_p
27984as_test_x='test -x'
27985as_executable_p=as_fn_executable_p
c971b7fa
PA
27986
27987# Sed expression to map a string onto a valid CPP name.
27988as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
27989
27990# Sed expression to map a string onto a valid variable name.
27991as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
27992
27993
27994exec 6>&1
27995## ----------------------------------- ##
27996## Main body of $CONFIG_STATUS script. ##
27997## ----------------------------------- ##
27998_ASEOF
27999test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
28000
28001cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28002# Save the log message, to keep $0 and so on meaningful, and to
28003# report actual input values of CONFIG_FILES etc. instead of their
28004# values after options handling.
28005ac_log="
d0ac1c44
SM
28006This file was extended by libgnu $as_me UNUSED-VERSION, which was
28007generated by GNU Autoconf 2.69. Invocation command line was
c971b7fa
PA
28008
28009 CONFIG_FILES = $CONFIG_FILES
28010 CONFIG_HEADERS = $CONFIG_HEADERS
28011 CONFIG_LINKS = $CONFIG_LINKS
28012 CONFIG_COMMANDS = $CONFIG_COMMANDS
28013 $ $0 $@
28014
28015on `(hostname || uname -n) 2>/dev/null | sed 1q`
28016"
28017
28018_ACEOF
28019
28020case $ac_config_files in *"
28021"*) set x $ac_config_files; shift; ac_config_files=$*;;
28022esac
28023
28024case $ac_config_headers in *"
28025"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
28026esac
28027
28028
28029cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28030# Files that config.status was made for.
28031config_files="$ac_config_files"
28032config_headers="$ac_config_headers"
28033config_commands="$ac_config_commands"
28034
28035_ACEOF
28036
28037cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28038ac_cs_usage="\
28039\`$as_me' instantiates files and other configuration actions
28040from templates according to the current configuration. Unless the files
28041and actions are specified as TAGs, all are instantiated by default.
28042
28043Usage: $0 [OPTION]... [TAG]...
28044
28045 -h, --help print this help, then exit
28046 -V, --version print version number and configuration settings, then exit
d0ac1c44 28047 --config print configuration, then exit
c971b7fa
PA
28048 -q, --quiet, --silent
28049 do not print progress messages
28050 -d, --debug don't remove temporary files
28051 --recheck update $as_me by reconfiguring in the same conditions
28052 --file=FILE[:TEMPLATE]
28053 instantiate the configuration file FILE
28054 --header=FILE[:TEMPLATE]
28055 instantiate the configuration header FILE
28056
28057Configuration files:
28058$config_files
28059
28060Configuration headers:
28061$config_headers
28062
28063Configuration commands:
28064$config_commands
28065
28066Report bugs to the package provider."
28067
28068_ACEOF
28069cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 28070ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
c971b7fa 28071ac_cs_version="\\
d0ac1c44
SM
28072libgnu config.status UNUSED-VERSION
28073configured by $0, generated by GNU Autoconf 2.69,
28074 with options \\"\$ac_cs_config\\"
c971b7fa 28075
d0ac1c44 28076Copyright (C) 2012 Free Software Foundation, Inc.
c971b7fa
PA
28077This config.status script is free software; the Free Software Foundation
28078gives unlimited permission to copy, distribute and modify it."
28079
28080ac_pwd='$ac_pwd'
28081srcdir='$srcdir'
28082INSTALL='$INSTALL'
28083MKDIR_P='$MKDIR_P'
28084AWK='$AWK'
28085test -n "\$AWK" || AWK=awk
28086_ACEOF
28087
28088cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28089# The default lists apply if the user does not specify any file.
28090ac_need_defaults=:
28091while test $# != 0
28092do
28093 case $1 in
d0ac1c44 28094 --*=?*)
c971b7fa
PA
28095 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28096 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
28097 ac_shift=:
28098 ;;
d0ac1c44
SM
28099 --*=)
28100 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28101 ac_optarg=
28102 ac_shift=:
28103 ;;
c971b7fa
PA
28104 *)
28105 ac_option=$1
28106 ac_optarg=$2
28107 ac_shift=shift
28108 ;;
28109 esac
28110
28111 case $ac_option in
28112 # Handling of the options.
28113 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28114 ac_cs_recheck=: ;;
28115 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
28116 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
28117 --config | --confi | --conf | --con | --co | --c )
28118 $as_echo "$ac_cs_config"; exit ;;
c971b7fa
PA
28119 --debug | --debu | --deb | --de | --d | -d )
28120 debug=: ;;
28121 --file | --fil | --fi | --f )
28122 $ac_shift
28123 case $ac_optarg in
28124 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 28125 '') as_fn_error $? "missing file argument" ;;
c971b7fa
PA
28126 esac
28127 as_fn_append CONFIG_FILES " '$ac_optarg'"
28128 ac_need_defaults=false;;
28129 --header | --heade | --head | --hea )
28130 $ac_shift
28131 case $ac_optarg in
28132 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
28133 esac
28134 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
28135 ac_need_defaults=false;;
28136 --he | --h)
28137 # Conflict between --help and --header
d0ac1c44 28138 as_fn_error $? "ambiguous option: \`$1'
c971b7fa
PA
28139Try \`$0 --help' for more information.";;
28140 --help | --hel | -h )
28141 $as_echo "$ac_cs_usage"; exit ;;
28142 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28143 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28144 ac_cs_silent=: ;;
28145
28146 # This is an error.
d0ac1c44 28147 -*) as_fn_error $? "unrecognized option: \`$1'
c971b7fa
PA
28148Try \`$0 --help' for more information." ;;
28149
28150 *) as_fn_append ac_config_targets " $1"
28151 ac_need_defaults=false ;;
28152
28153 esac
28154 shift
28155done
28156
28157ac_configure_extra_args=
28158
28159if $ac_cs_silent; then
28160 exec 6>/dev/null
28161 ac_configure_extra_args="$ac_configure_extra_args --silent"
28162fi
28163
28164_ACEOF
28165cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28166if \$ac_cs_recheck; then
d0ac1c44 28167 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
c971b7fa
PA
28168 shift
28169 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
28170 CONFIG_SHELL='$SHELL'
28171 export CONFIG_SHELL
28172 exec "\$@"
28173fi
28174
28175_ACEOF
28176cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28177exec 5>>config.log
28178{
28179 echo
28180 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28181## Running $as_me. ##
28182_ASBOX
28183 $as_echo "$ac_log"
28184} >&5
28185
28186_ACEOF
28187cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28188#
28189# INIT-COMMANDS
28190#
28191AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
28192
28193_ACEOF
28194
28195cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28196
28197# Handling of arguments.
28198for ac_config_target in $ac_config_targets
28199do
28200 case $ac_config_target in
28201 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
28202 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
28203 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28204 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
28205 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
28206
d0ac1c44 28207 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c971b7fa
PA
28208 esac
28209done
28210
28211
28212# If the user did not use the arguments to specify the items to instantiate,
28213# then the envvar interface is used. Set only those that are not.
28214# We use the long form for the default assignment because of an extremely
28215# bizarre bug on SunOS 4.1.3.
28216if $ac_need_defaults; then
28217 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28218 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28219 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28220fi
28221
28222# Have a temporary directory for convenience. Make it in the build tree
28223# simply because there is no reason against having it here, and in addition,
28224# creating and moving files from /tmp can sometimes cause problems.
28225# Hook for its removal unless debugging.
28226# Note that there is a small window in which the directory will not be cleaned:
28227# after its creation but before its name has been assigned to `$tmp'.
28228$debug ||
28229{
d0ac1c44 28230 tmp= ac_tmp=
c971b7fa 28231 trap 'exit_status=$?
d0ac1c44
SM
28232 : "${ac_tmp:=$tmp}"
28233 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
c971b7fa
PA
28234' 0
28235 trap 'as_fn_exit 1' 1 2 13 15
28236}
28237# Create a (secure) tmp directory for tmp files.
28238
28239{
28240 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 28241 test -d "$tmp"
c971b7fa
PA
28242} ||
28243{
28244 tmp=./conf$$-$RANDOM
28245 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
28246} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
28247ac_tmp=$tmp
c971b7fa
PA
28248
28249# Set up the scripts for CONFIG_FILES section.
28250# No need to generate them if there are no CONFIG_FILES.
28251# This happens for instance with `./config.status config.h'.
28252if test -n "$CONFIG_FILES"; then
28253
28254
28255ac_cr=`echo X | tr X '\015'`
28256# On cygwin, bash can eat \r inside `` if the user requested igncr.
28257# But we know of no other shell where ac_cr would be empty at this
28258# point, so we can use a bashism as a fallback.
28259if test "x$ac_cr" = x; then
28260 eval ac_cr=\$\'\\r\'
28261fi
28262ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
28263if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 28264 ac_cs_awk_cr='\\r'
c971b7fa
PA
28265else
28266 ac_cs_awk_cr=$ac_cr
28267fi
28268
d0ac1c44 28269echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
c971b7fa
PA
28270_ACEOF
28271
28272
28273{
28274 echo "cat >conf$$subs.awk <<_ACEOF" &&
28275 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
28276 echo "_ACEOF"
28277} >conf$$subs.sh ||
d0ac1c44
SM
28278 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
28279ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
c971b7fa
PA
28280ac_delim='%!_!# '
28281for ac_last_try in false false false false false :; do
28282 . ./conf$$subs.sh ||
d0ac1c44 28283 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
28284
28285 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
28286 if test $ac_delim_n = $ac_delim_num; then
28287 break
28288 elif $ac_last_try; then
d0ac1c44 28289 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
28290 else
28291 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28292 fi
28293done
28294rm -f conf$$subs.sh
28295
28296cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 28297cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
c971b7fa
PA
28298_ACEOF
28299sed -n '
28300h
28301s/^/S["/; s/!.*/"]=/
28302p
28303g
28304s/^[^!]*!//
28305:repl
28306t repl
28307s/'"$ac_delim"'$//
28308t delim
28309:nl
28310h
d0ac1c44 28311s/\(.\{148\}\)..*/\1/
c971b7fa
PA
28312t more1
28313s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
28314p
28315n
28316b repl
28317:more1
28318s/["\\]/\\&/g; s/^/"/; s/$/"\\/
28319p
28320g
28321s/.\{148\}//
28322t nl
28323:delim
28324h
d0ac1c44 28325s/\(.\{148\}\)..*/\1/
c971b7fa
PA
28326t more2
28327s/["\\]/\\&/g; s/^/"/; s/$/"/
28328p
28329b
28330:more2
28331s/["\\]/\\&/g; s/^/"/; s/$/"\\/
28332p
28333g
28334s/.\{148\}//
28335t delim
28336' <conf$$subs.awk | sed '
28337/^[^""]/{
28338 N
28339 s/\n//
28340}
28341' >>$CONFIG_STATUS || ac_write_fail=1
28342rm -f conf$$subs.awk
28343cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28344_ACAWK
d0ac1c44 28345cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
c971b7fa
PA
28346 for (key in S) S_is_set[key] = 1
28347 FS = "\a"
28348
28349}
28350{
28351 line = $ 0
28352 nfields = split(line, field, "@")
28353 substed = 0
28354 len = length(field[1])
28355 for (i = 2; i < nfields; i++) {
28356 key = field[i]
28357 keylen = length(key)
28358 if (S_is_set[key]) {
28359 value = S[key]
28360 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
28361 len += length(value) + length(field[++i])
28362 substed = 1
28363 } else
28364 len += 1 + keylen
28365 }
28366
28367 print line
28368}
28369
28370_ACAWK
28371_ACEOF
28372cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28373if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
28374 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
28375else
28376 cat
d0ac1c44
SM
28377fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
28378 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
c971b7fa
PA
28379_ACEOF
28380
d0ac1c44
SM
28381# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
28382# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
c971b7fa
PA
28383# trailing colons and then remove the whole line if VPATH becomes empty
28384# (actually we leave an empty line to preserve line numbers).
28385if test "x$srcdir" = x.; then
d0ac1c44
SM
28386 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
28387h
28388s///
28389s/^/:/
28390s/[ ]*$/:/
28391s/:\$(srcdir):/:/g
28392s/:\${srcdir}:/:/g
28393s/:@srcdir@:/:/g
28394s/^:*//
c971b7fa 28395s/:*$//
d0ac1c44
SM
28396x
28397s/\(=[ ]*\).*/\1/
28398G
28399s/\n//
c971b7fa
PA
28400s/^[^=]*=[ ]*$//
28401}'
28402fi
28403
28404cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28405fi # test -n "$CONFIG_FILES"
28406
28407# Set up the scripts for CONFIG_HEADERS section.
28408# No need to generate them if there are no CONFIG_HEADERS.
28409# This happens for instance with `./config.status Makefile'.
28410if test -n "$CONFIG_HEADERS"; then
d0ac1c44 28411cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
c971b7fa
PA
28412BEGIN {
28413_ACEOF
28414
28415# Transform confdefs.h into an awk script `defines.awk', embedded as
28416# here-document in config.status, that substitutes the proper values into
28417# config.h.in to produce config.h.
28418
28419# Create a delimiter string that does not exist in confdefs.h, to ease
28420# handling of long lines.
28421ac_delim='%!_!# '
28422for ac_last_try in false false :; do
d0ac1c44
SM
28423 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
28424 if test -z "$ac_tt"; then
c971b7fa
PA
28425 break
28426 elif $ac_last_try; then
d0ac1c44 28427 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
c971b7fa
PA
28428 else
28429 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28430 fi
28431done
28432
28433# For the awk script, D is an array of macro values keyed by name,
28434# likewise P contains macro parameters if any. Preserve backslash
28435# newline sequences.
28436
28437ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28438sed -n '
28439s/.\{148\}/&'"$ac_delim"'/g
28440t rset
28441:rset
28442s/^[ ]*#[ ]*define[ ][ ]*/ /
28443t def
28444d
28445:def
28446s/\\$//
28447t bsnl
28448s/["\\]/\\&/g
28449s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
28450D["\1"]=" \3"/p
28451s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
28452d
28453:bsnl
28454s/["\\]/\\&/g
28455s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
28456D["\1"]=" \3\\\\\\n"\\/p
28457t cont
28458s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
28459t cont
28460d
28461:cont
28462n
28463s/.\{148\}/&'"$ac_delim"'/g
28464t clear
28465:clear
28466s/\\$//
28467t bsnlc
28468s/["\\]/\\&/g; s/^/"/; s/$/"/p
28469d
28470:bsnlc
28471s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
28472b cont
28473' <confdefs.h | sed '
28474s/'"$ac_delim"'/"\\\
28475"/g' >>$CONFIG_STATUS || ac_write_fail=1
28476
28477cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28478 for (key in D) D_is_set[key] = 1
28479 FS = "\a"
28480}
28481/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
28482 line = \$ 0
28483 split(line, arg, " ")
28484 if (arg[1] == "#") {
28485 defundef = arg[2]
28486 mac1 = arg[3]
28487 } else {
28488 defundef = substr(arg[1], 2)
28489 mac1 = arg[2]
28490 }
28491 split(mac1, mac2, "(") #)
28492 macro = mac2[1]
28493 prefix = substr(line, 1, index(line, defundef) - 1)
28494 if (D_is_set[macro]) {
28495 # Preserve the white space surrounding the "#".
28496 print prefix "define", macro P[macro] D[macro]
28497 next
28498 } else {
28499 # Replace #undef with comments. This is necessary, for example,
28500 # in the case of _POSIX_SOURCE, which is predefined and required
28501 # on some systems where configure will not decide to define it.
28502 if (defundef == "undef") {
28503 print "/*", prefix defundef, macro, "*/"
28504 next
28505 }
28506 }
28507}
28508{ print }
28509_ACAWK
28510_ACEOF
28511cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 28512 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
c971b7fa
PA
28513fi # test -n "$CONFIG_HEADERS"
28514
28515
28516eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
28517shift
28518for ac_tag
28519do
28520 case $ac_tag in
28521 :[FHLC]) ac_mode=$ac_tag; continue;;
28522 esac
28523 case $ac_mode$ac_tag in
28524 :[FHL]*:*);;
d0ac1c44 28525 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
c971b7fa
PA
28526 :[FH]-) ac_tag=-:-;;
28527 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28528 esac
28529 ac_save_IFS=$IFS
28530 IFS=:
28531 set x $ac_tag
28532 IFS=$ac_save_IFS
28533 shift
28534 ac_file=$1
28535 shift
28536
28537 case $ac_mode in
28538 :L) ac_source=$1;;
28539 :[FH])
28540 ac_file_inputs=
28541 for ac_f
28542 do
28543 case $ac_f in
d0ac1c44 28544 -) ac_f="$ac_tmp/stdin";;
c971b7fa
PA
28545 *) # Look for the file first in the build tree, then in the source tree
28546 # (if the path is not absolute). The absolute path cannot be DOS-style,
28547 # because $ac_f cannot contain `:'.
28548 test -f "$ac_f" ||
28549 case $ac_f in
28550 [\\/$]*) false;;
28551 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28552 esac ||
d0ac1c44 28553 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
c971b7fa
PA
28554 esac
28555 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
28556 as_fn_append ac_file_inputs " '$ac_f'"
28557 done
28558
28559 # Let's still pretend it is `configure' which instantiates (i.e., don't
28560 # use $as_me), people would be surprised to read:
28561 # /* config.h. Generated by config.status. */
28562 configure_input='Generated from '`
28563 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
28564 `' by configure.'
28565 if test x"$ac_file" != x-; then
28566 configure_input="$ac_file. $configure_input"
28567 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
28568$as_echo "$as_me: creating $ac_file" >&6;}
28569 fi
28570 # Neutralize special characters interpreted by sed in replacement strings.
28571 case $configure_input in #(
28572 *\&* | *\|* | *\\* )
28573 ac_sed_conf_input=`$as_echo "$configure_input" |
28574 sed 's/[\\\\&|]/\\\\&/g'`;; #(
28575 *) ac_sed_conf_input=$configure_input;;
28576 esac
28577
28578 case $ac_tag in
d0ac1c44
SM
28579 *:-:* | *:-) cat >"$ac_tmp/stdin" \
28580 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
c971b7fa
PA
28581 esac
28582 ;;
28583 esac
28584
28585 ac_dir=`$as_dirname -- "$ac_file" ||
28586$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28587 X"$ac_file" : 'X\(//\)[^/]' \| \
28588 X"$ac_file" : 'X\(//\)$' \| \
28589 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
28590$as_echo X"$ac_file" |
28591 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28592 s//\1/
28593 q
28594 }
28595 /^X\(\/\/\)[^/].*/{
28596 s//\1/
28597 q
28598 }
28599 /^X\(\/\/\)$/{
28600 s//\1/
28601 q
28602 }
28603 /^X\(\/\).*/{
28604 s//\1/
28605 q
28606 }
28607 s/.*/./; q'`
28608 as_dir="$ac_dir"; as_fn_mkdir_p
28609 ac_builddir=.
28610
28611case "$ac_dir" in
28612.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28613*)
28614 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
28615 # A ".." for each directory in $ac_dir_suffix.
28616 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
28617 case $ac_top_builddir_sub in
28618 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28619 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28620 esac ;;
28621esac
28622ac_abs_top_builddir=$ac_pwd
28623ac_abs_builddir=$ac_pwd$ac_dir_suffix
28624# for backward compatibility:
28625ac_top_builddir=$ac_top_build_prefix
28626
28627case $srcdir in
28628 .) # We are building in place.
28629 ac_srcdir=.
28630 ac_top_srcdir=$ac_top_builddir_sub
28631 ac_abs_top_srcdir=$ac_pwd ;;
28632 [\\/]* | ?:[\\/]* ) # Absolute name.
28633 ac_srcdir=$srcdir$ac_dir_suffix;
28634 ac_top_srcdir=$srcdir
28635 ac_abs_top_srcdir=$srcdir ;;
28636 *) # Relative name.
28637 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28638 ac_top_srcdir=$ac_top_build_prefix$srcdir
28639 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
28640esac
28641ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
28642
28643
28644 case $ac_mode in
28645 :F)
28646 #
28647 # CONFIG_FILE
28648 #
28649
28650 case $INSTALL in
28651 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
28652 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
28653 esac
28654 ac_MKDIR_P=$MKDIR_P
28655 case $MKDIR_P in
28656 [\\/$]* | ?:[\\/]* ) ;;
28657 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
28658 esac
28659_ACEOF
28660
28661cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28662# If the template does not know about datarootdir, expand it.
28663# FIXME: This hack should be removed a few years after 2.60.
28664ac_datarootdir_hack=; ac_datarootdir_seen=
28665ac_sed_dataroot='
28666/datarootdir/ {
28667 p
28668 q
28669}
28670/@datadir@/p
28671/@docdir@/p
28672/@infodir@/p
28673/@localedir@/p
28674/@mandir@/p'
28675case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
28676*datarootdir*) ac_datarootdir_seen=yes;;
28677*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
28678 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28679$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
28680_ACEOF
28681cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28682 ac_datarootdir_hack='
28683 s&@datadir@&$datadir&g
28684 s&@docdir@&$docdir&g
28685 s&@infodir@&$infodir&g
28686 s&@localedir@&$localedir&g
28687 s&@mandir@&$mandir&g
28688 s&\\\${datarootdir}&$datarootdir&g' ;;
28689esac
28690_ACEOF
28691
28692# Neutralize VPATH when `$srcdir' = `.'.
28693# Shell code in configure.ac might set extrasub.
28694# FIXME: do we really want to maintain this feature?
28695cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28696ac_sed_extra="$ac_vpsub
28697$extrasub
28698_ACEOF
28699cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28700:t
28701/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
28702s|@configure_input@|$ac_sed_conf_input|;t t
28703s&@top_builddir@&$ac_top_builddir_sub&;t t
28704s&@top_build_prefix@&$ac_top_build_prefix&;t t
28705s&@srcdir@&$ac_srcdir&;t t
28706s&@abs_srcdir@&$ac_abs_srcdir&;t t
28707s&@top_srcdir@&$ac_top_srcdir&;t t
28708s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28709s&@builddir@&$ac_builddir&;t t
28710s&@abs_builddir@&$ac_abs_builddir&;t t
28711s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28712s&@INSTALL@&$ac_INSTALL&;t t
28713s&@MKDIR_P@&$ac_MKDIR_P&;t t
28714$ac_datarootdir_hack
28715"
d0ac1c44
SM
28716eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
28717 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
28718
28719test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
28720 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
28721 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
28722 "$ac_tmp/out"`; test -z "$ac_out"; } &&
c971b7fa 28723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 28724which seems to be undefined. Please make sure it is defined" >&5
c971b7fa 28725$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 28726which seems to be undefined. Please make sure it is defined" >&2;}
c971b7fa 28727
d0ac1c44 28728 rm -f "$ac_tmp/stdin"
c971b7fa 28729 case $ac_file in
d0ac1c44
SM
28730 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
28731 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
c971b7fa 28732 esac \
d0ac1c44 28733 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
28734 ;;
28735 :H)
28736 #
28737 # CONFIG_HEADER
28738 #
28739 if test x"$ac_file" != x-; then
28740 {
28741 $as_echo "/* $configure_input */" \
d0ac1c44
SM
28742 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
28743 } >"$ac_tmp/config.h" \
28744 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
28745 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
c971b7fa
PA
28746 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
28747$as_echo "$as_me: $ac_file is unchanged" >&6;}
28748 else
28749 rm -f "$ac_file"
d0ac1c44
SM
28750 mv "$ac_tmp/config.h" "$ac_file" \
28751 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
28752 fi
28753 else
28754 $as_echo "/* $configure_input */" \
d0ac1c44
SM
28755 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
28756 || as_fn_error $? "could not create -" "$LINENO" 5
c971b7fa
PA
28757 fi
28758# Compute "$ac_file"'s index in $config_headers.
28759_am_arg="$ac_file"
28760_am_stamp_count=1
28761for _am_header in $config_headers :; do
28762 case $_am_header in
28763 $_am_arg | $_am_arg:* )
28764 break ;;
28765 * )
28766 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
28767 esac
28768done
28769echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
28770$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28771 X"$_am_arg" : 'X\(//\)[^/]' \| \
28772 X"$_am_arg" : 'X\(//\)$' \| \
28773 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
28774$as_echo X"$_am_arg" |
28775 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28776 s//\1/
28777 q
28778 }
28779 /^X\(\/\/\)[^/].*/{
28780 s//\1/
28781 q
28782 }
28783 /^X\(\/\/\)$/{
28784 s//\1/
28785 q
28786 }
28787 /^X\(\/\).*/{
28788 s//\1/
28789 q
28790 }
28791 s/.*/./; q'`/stamp-h$_am_stamp_count
28792 ;;
28793
28794 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
28795$as_echo "$as_me: executing $ac_file commands" >&6;}
28796 ;;
28797 esac
28798
28799
28800 case $ac_file$ac_mode in
28801 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
d0ac1c44 28802 # Older Autoconf quotes --file arguments for eval, but not when files
c971b7fa
PA
28803 # are listed without --file. Let's play safe and only enable the eval
28804 # if we detect the quoting.
28805 case $CONFIG_FILES in
28806 *\'*) eval set x "$CONFIG_FILES" ;;
28807 *) set x $CONFIG_FILES ;;
28808 esac
28809 shift
28810 for mf
28811 do
28812 # Strip MF so we end up with the name of the file.
28813 mf=`echo "$mf" | sed -e 's/:.*$//'`
28814 # Check whether this is an Automake generated Makefile or not.
d0ac1c44 28815 # We used to match only the files named 'Makefile.in', but
c971b7fa
PA
28816 # some people rename them; so instead we look at the file content.
28817 # Grep'ing the first line is not enough: some people post-process
28818 # each Makefile.in and add a new line on top of each file to say so.
28819 # Grep'ing the whole file is not good either: AIX grep has a line
28820 # limit of 2048, but all sed's we know have understand at least 4000.
28821 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
28822 dirpart=`$as_dirname -- "$mf" ||
28823$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28824 X"$mf" : 'X\(//\)[^/]' \| \
28825 X"$mf" : 'X\(//\)$' \| \
28826 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
28827$as_echo X"$mf" |
28828 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28829 s//\1/
28830 q
28831 }
28832 /^X\(\/\/\)[^/].*/{
28833 s//\1/
28834 q
28835 }
28836 /^X\(\/\/\)$/{
28837 s//\1/
28838 q
28839 }
28840 /^X\(\/\).*/{
28841 s//\1/
28842 q
28843 }
28844 s/.*/./; q'`
28845 else
28846 continue
28847 fi
28848 # Extract the definition of DEPDIR, am__include, and am__quote
d0ac1c44 28849 # from the Makefile without running 'make'.
c971b7fa
PA
28850 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
28851 test -z "$DEPDIR" && continue
28852 am__include=`sed -n 's/^am__include = //p' < "$mf"`
d0ac1c44 28853 test -z "$am__include" && continue
c971b7fa 28854 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
c971b7fa
PA
28855 # Find all dependency output files, they are included files with
28856 # $(DEPDIR) in their names. We invoke sed twice because it is the
28857 # simplest approach to changing $(DEPDIR) to its actual value in the
28858 # expansion.
28859 for file in `sed -n "
28860 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
d0ac1c44 28861 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
c971b7fa
PA
28862 # Make sure the directory exists.
28863 test -f "$dirpart/$file" && continue
28864 fdir=`$as_dirname -- "$file" ||
28865$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28866 X"$file" : 'X\(//\)[^/]' \| \
28867 X"$file" : 'X\(//\)$' \| \
28868 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
28869$as_echo X"$file" |
28870 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28871 s//\1/
28872 q
28873 }
28874 /^X\(\/\/\)[^/].*/{
28875 s//\1/
28876 q
28877 }
28878 /^X\(\/\/\)$/{
28879 s//\1/
28880 q
28881 }
28882 /^X\(\/\).*/{
28883 s//\1/
28884 q
28885 }
28886 s/.*/./; q'`
28887 as_dir=$dirpart/$fdir; as_fn_mkdir_p
28888 # echo "creating $dirpart/$file"
28889 echo '# dummy' > "$dirpart/$file"
28890 done
28891 done
28892}
28893 ;;
28894 "default":C)
28895case x$CONFIG_HEADERS in
28896xconfig.h:config.in)
28897echo > stamp-h ;;
28898esac
28899 ;;
28900
28901 esac
28902done # for ac_tag
28903
28904
28905as_fn_exit 0
28906_ACEOF
28907ac_clean_files=$ac_clean_files_save
28908
28909test $ac_write_fail = 0 ||
d0ac1c44 28910 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
28911
28912
28913# configure is writing to config.log, and then calls config.status.
28914# config.status does its own redirection, appending to config.log.
28915# Unfortunately, on DOS this fails, as config.log is still kept open
28916# by configure, so config.status won't be able to write to it; its
28917# output is simply discarded. So we exec the FD to /dev/null,
28918# effectively closing config.log, so it can be properly (re)opened and
28919# appended to by config.status. When coming back to configure, we
28920# need to make the FD available again.
28921if test "$no_create" != yes; then
28922 ac_cs_success=:
28923 ac_config_status_args=
28924 test "$silent" = yes &&
28925 ac_config_status_args="$ac_config_status_args --quiet"
28926 exec 5>/dev/null
28927 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
28928 exec 5>>config.log
28929 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28930 # would make configure fail if this is the last instruction.
d0ac1c44 28931 $ac_cs_success || as_fn_exit 1
c971b7fa
PA
28932fi
28933if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
28934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
28935$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
28936fi
28937
28938
28939exit 0
This page took 2.04109 seconds and 4 git commands to generate.