asan: score: global-buffer-overflow
[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
5abebf3c 622gl_use_threads_default=
472fa5ee 623gl_header_list=
725e2999 624gl_func_list=
8690e634 625gl_fnmatch_required=POSIX
c971b7fa
PA
626ac_subst_vars='am__EXEEXT_FALSE
627am__EXEEXT_TRUE
628gltests_LTLIBOBJS
629gltests_LIBOBJS
630gl_LTLIBOBJS
631gl_LIBOBJS
632LTLIBOBJS
633LIBOBJS
634LN_S
39be3c7e
SM
635AM_BACKSLASH
636AM_DEFAULT_VERBOSITY
d0ac1c44
SM
637AM_DEFAULT_V
638AM_V
c971b7fa
PA
639am__fastdepCC_FALSE
640am__fastdepCC_TRUE
641CCDEPMODE
d0ac1c44 642am__nodep
c971b7fa
PA
643AMDEPBACKSLASH
644AMDEP_FALSE
645AMDEP_TRUE
646am__quote
647am__include
648DEPDIR
649am__untar
650am__tar
651AMTAR
652am__leading_dot
653SET_MAKE
654AWK
655mkdir_p
c971b7fa
PA
656INSTALL_STRIP_PROGRAM
657STRIP
658install_sh
659MAKEINFO
660AUTOHEADER
661AUTOMAKE
662AUTOCONF
663ACLOCAL
664VERSION
665PACKAGE
666CYGPATH_W
667am__isrc
668INSTALL_DATA
669INSTALL_SCRIPT
670INSTALL_PROGRAM
671LIBGNU_LTLIBDEPS
672LIBGNU_LIBDEPS
673gltests_WITNESS
8690e634
JK
674REPLACE_TOWLOWER
675REPLACE_ISWCNTRL
676HAVE_WCTYPE_H
677NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
678NEXT_WCTYPE_H
679HAVE_ISWCNTRL
680REPLACE_ISWBLANK
681HAVE_WCTRANS_T
682HAVE_WCTYPE_T
683HAVE_ISWBLANK
684GNULIB_TOWCTRANS
685GNULIB_WCTRANS
686GNULIB_ISWCTYPE
687GNULIB_WCTYPE
688GNULIB_ISWBLANK
689HAVE_WINT_T
8690e634
JK
690NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
691NEXT_WCHAR_H
8839a007
PA
692HAVE_UNISTD_H
693NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
694NEXT_UNISTD_H
4a626d0a 695UNISTD_H_DEFINES_STRUCT_TIMESPEC
09607c9e
TT
696PTHREAD_H_DEFINES_STRUCT_TIMESPEC
697SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
698TIME_H_DEFINES_STRUCT_TIMESPEC
699NEXT_AS_FIRST_DIRECTIVE_TIME_H
700NEXT_TIME_H
5e8754f9
SDJ
701REPLACE_LOCALTIME
702REPLACE_GMTIME
703REPLACE_TIMEGM
704REPLACE_NANOSLEEP
705REPLACE_MKTIME
706REPLACE_LOCALTIME_R
707HAVE_TIMEGM
708HAVE_STRPTIME
709HAVE_NANOSLEEP
710HAVE_DECL_LOCALTIME_R
711GNULIB_TIME_RZ
712GNULIB_TIME_R
713GNULIB_TIMEGM
714GNULIB_STRPTIME
715GNULIB_NANOSLEEP
716GNULIB_MKTIME
725e2999
JB
717HAVE_SYS_UIO_H
718NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
719NEXT_SYS_UIO_H
63ce7108
TT
720WINDOWS_64_BIT_OFF_T
721NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
722NEXT_SYS_TYPES_H
2196f55f
YQ
723NEXT_AS_FIRST_DIRECTIVE_STRING_H
724NEXT_STRING_H
98399780
YQ
725NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
726NEXT_STDLIB_H
6a29c58e
YQ
727NEXT_AS_FIRST_DIRECTIVE_STDIO_H
728NEXT_STDIO_H
2196f55f
YQ
729NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
730NEXT_STDDEF_H
731GL_GENERATE_STDDEF_H_FALSE
732GL_GENERATE_STDDEF_H_TRUE
733STDDEF_H
734HAVE_WCHAR_T
4a626d0a 735HAVE_MAX_ALIGN_T
2196f55f
YQ
736REPLACE_NULL
737HAVE__BOOL
738GL_GENERATE_STDBOOL_H_FALSE
739GL_GENERATE_STDBOOL_H_TRUE
740STDBOOL_H
725e2999
JB
741GL_GENERATE_STDALIGN_H_FALSE
742GL_GENERATE_STDALIGN_H_TRUE
743STDALIGN_H
0750520d
PA
744NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
745NEXT_SIGNAL_H
746REPLACE_RAISE
747REPLACE_PTHREAD_SIGMASK
748HAVE_SIGHANDLER_T
749HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
750HAVE_STRUCT_SIGACTION_SA_SIGACTION
751HAVE_SIGACTION
752HAVE_SIGINFO_T
753HAVE_SIGSET_T
754HAVE_RAISE
755HAVE_PTHREAD_SIGMASK
756HAVE_POSIX_SIGNALBLOCKING
757GNULIB_SIGACTION
758GNULIB_SIGPROCMASK
759GNULIB_SIGNAL_H_SIGPIPE
760GNULIB_RAISE
761GNULIB_PTHREAD_SIGMASK
6a29c58e
YQ
762REPLACE_VSPRINTF
763REPLACE_VSNPRINTF
764REPLACE_VPRINTF
765REPLACE_VFPRINTF
766REPLACE_VDPRINTF
767REPLACE_VASPRINTF
768REPLACE_TMPFILE
769REPLACE_STDIO_WRITE_FUNCS
770REPLACE_STDIO_READ_FUNCS
771REPLACE_SPRINTF
772REPLACE_SNPRINTF
773REPLACE_RENAMEAT
774REPLACE_RENAME
775REPLACE_REMOVE
776REPLACE_PRINTF
777REPLACE_POPEN
778REPLACE_PERROR
779REPLACE_OBSTACK_PRINTF
780REPLACE_GETLINE
781REPLACE_GETDELIM
782REPLACE_FTELLO
783REPLACE_FTELL
784REPLACE_FSEEKO
785REPLACE_FSEEK
786REPLACE_FREOPEN
787REPLACE_FPURGE
788REPLACE_FPRINTF
789REPLACE_FOPEN
790REPLACE_FFLUSH
791REPLACE_FDOPEN
792REPLACE_FCLOSE
793REPLACE_DPRINTF
794HAVE_VDPRINTF
795HAVE_VASPRINTF
796HAVE_RENAMEAT
797HAVE_POPEN
798HAVE_PCLOSE
799HAVE_FTELLO
800HAVE_FSEEKO
801HAVE_DPRINTF
802HAVE_DECL_VSNPRINTF
803HAVE_DECL_SNPRINTF
804HAVE_DECL_OBSTACK_PRINTF
805HAVE_DECL_GETLINE
806HAVE_DECL_GETDELIM
807HAVE_DECL_FTELLO
808HAVE_DECL_FSEEKO
809HAVE_DECL_FPURGE
810GNULIB_VSPRINTF_POSIX
811GNULIB_VSNPRINTF
812GNULIB_VPRINTF_POSIX
813GNULIB_VPRINTF
814GNULIB_VFPRINTF_POSIX
815GNULIB_VFPRINTF
816GNULIB_VDPRINTF
817GNULIB_VSCANF
818GNULIB_VFSCANF
819GNULIB_VASPRINTF
820GNULIB_TMPFILE
821GNULIB_STDIO_H_SIGPIPE
822GNULIB_STDIO_H_NONBLOCKING
823GNULIB_SPRINTF_POSIX
824GNULIB_SNPRINTF
825GNULIB_SCANF
826GNULIB_RENAMEAT
827GNULIB_RENAME
828GNULIB_REMOVE
829GNULIB_PUTS
830GNULIB_PUTCHAR
831GNULIB_PUTC
832GNULIB_PRINTF_POSIX
833GNULIB_PRINTF
834GNULIB_POPEN
835GNULIB_PERROR
836GNULIB_PCLOSE
837GNULIB_OBSTACK_PRINTF_POSIX
838GNULIB_OBSTACK_PRINTF
839GNULIB_GETLINE
840GNULIB_GETDELIM
841GNULIB_GETCHAR
842GNULIB_GETC
843GNULIB_FWRITE
844GNULIB_FTELLO
845GNULIB_FTELL
846GNULIB_FSEEKO
847GNULIB_FSEEK
848GNULIB_FSCANF
849GNULIB_FREOPEN
850GNULIB_FREAD
851GNULIB_FPUTS
852GNULIB_FPUTC
853GNULIB_FPURGE
854GNULIB_FPRINTF_POSIX
855GNULIB_FPRINTF
856GNULIB_FOPEN
857GNULIB_FGETS
858GNULIB_FGETC
859GNULIB_FFLUSH
860GNULIB_FDOPEN
861GNULIB_FCLOSE
862GNULIB_DPRINTF
725e2999
JB
863GL_GENERATE_NETINET_IN_H_FALSE
864GL_GENERATE_NETINET_IN_H_TRUE
865NETINET_IN_H
866HAVE_NETINET_IN_H
867NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
868NEXT_NETINET_IN_H
c971b7fa 869UNDEFINE_STRTOK_R
5e8754f9 870REPLACE_STRTOK_R
c971b7fa 871REPLACE_STRSIGNAL
5e8754f9
SDJ
872REPLACE_STRNLEN
873REPLACE_STRNDUP
874REPLACE_STRNCAT
c971b7fa
PA
875REPLACE_STRERROR_R
876REPLACE_STRERROR
5e8754f9 877REPLACE_STRCHRNUL
c971b7fa
PA
878REPLACE_STRCASESTR
879REPLACE_STRSTR
880REPLACE_STRDUP
881REPLACE_STPNCPY
882REPLACE_MEMMEM
883REPLACE_MEMCHR
884HAVE_STRVERSCMP
885HAVE_DECL_STRSIGNAL
886HAVE_DECL_STRERROR_R
887HAVE_DECL_STRTOK_R
888HAVE_STRCASESTR
889HAVE_STRSEP
890HAVE_STRPBRK
891HAVE_DECL_STRNLEN
892HAVE_DECL_STRNDUP
893HAVE_DECL_STRDUP
894HAVE_STRCHRNUL
895HAVE_STPNCPY
896HAVE_STPCPY
897HAVE_RAWMEMCHR
898HAVE_DECL_MEMRCHR
899HAVE_MEMPCPY
900HAVE_DECL_MEMMEM
901HAVE_MEMCHR
902HAVE_FFSLL
903HAVE_FFSL
904HAVE_MBSLEN
905GNULIB_STRVERSCMP
906GNULIB_STRSIGNAL
907GNULIB_STRERROR_R
908GNULIB_STRERROR
909GNULIB_MBSTOK_R
910GNULIB_MBSSEP
911GNULIB_MBSSPN
912GNULIB_MBSPBRK
913GNULIB_MBSCSPN
914GNULIB_MBSCASESTR
915GNULIB_MBSPCASECMP
916GNULIB_MBSNCASECMP
917GNULIB_MBSCASECMP
918GNULIB_MBSSTR
919GNULIB_MBSRCHR
920GNULIB_MBSCHR
921GNULIB_MBSNLEN
922GNULIB_MBSLEN
923GNULIB_STRTOK_R
924GNULIB_STRCASESTR
925GNULIB_STRSTR
926GNULIB_STRSEP
927GNULIB_STRPBRK
928GNULIB_STRNLEN
929GNULIB_STRNDUP
930GNULIB_STRNCAT
931GNULIB_STRDUP
932GNULIB_STRCHRNUL
933GNULIB_STPNCPY
934GNULIB_STPCPY
935GNULIB_RAWMEMCHR
936GNULIB_MEMRCHR
937GNULIB_MEMPCPY
938GNULIB_MEMMEM
939GNULIB_MEMCHR
940GNULIB_FFSLL
941GNULIB_FFSL
8690e634
JK
942LOCALE_FR
943LOCALE_FR_UTF8
944LOCALE_ZH_CN
945LOCALE_JA
946REPLACE_WCSWIDTH
947REPLACE_WCWIDTH
948REPLACE_WCSNRTOMBS
949REPLACE_WCSRTOMBS
950REPLACE_WCRTOMB
951REPLACE_MBSNRTOWCS
952REPLACE_MBSRTOWCS
953REPLACE_MBRLEN
954REPLACE_MBRTOWC
955REPLACE_MBSINIT
956REPLACE_WCTOB
957REPLACE_BTOWC
958REPLACE_MBSTATE_T
959HAVE_DECL_WCWIDTH
960HAVE_DECL_WCTOB
961HAVE_WCSWIDTH
962HAVE_WCSTOK
963HAVE_WCSSTR
964HAVE_WCSPBRK
965HAVE_WCSSPN
966HAVE_WCSCSPN
967HAVE_WCSRCHR
968HAVE_WCSCHR
969HAVE_WCSDUP
970HAVE_WCSXFRM
971HAVE_WCSCOLL
972HAVE_WCSNCASECMP
973HAVE_WCSCASECMP
974HAVE_WCSNCMP
975HAVE_WCSCMP
976HAVE_WCSNCAT
977HAVE_WCSCAT
978HAVE_WCPNCPY
979HAVE_WCSNCPY
980HAVE_WCPCPY
981HAVE_WCSCPY
982HAVE_WCSNLEN
983HAVE_WCSLEN
984HAVE_WMEMSET
985HAVE_WMEMMOVE
986HAVE_WMEMCPY
987HAVE_WMEMCMP
988HAVE_WMEMCHR
989HAVE_WCSNRTOMBS
990HAVE_WCSRTOMBS
991HAVE_WCRTOMB
992HAVE_MBSNRTOWCS
993HAVE_MBSRTOWCS
994HAVE_MBRLEN
995HAVE_MBRTOWC
996HAVE_MBSINIT
997HAVE_BTOWC
998GNULIB_WCSWIDTH
999GNULIB_WCSTOK
1000GNULIB_WCSSTR
1001GNULIB_WCSPBRK
1002GNULIB_WCSSPN
1003GNULIB_WCSCSPN
1004GNULIB_WCSRCHR
1005GNULIB_WCSCHR
1006GNULIB_WCSDUP
1007GNULIB_WCSXFRM
1008GNULIB_WCSCOLL
1009GNULIB_WCSNCASECMP
1010GNULIB_WCSCASECMP
1011GNULIB_WCSNCMP
1012GNULIB_WCSCMP
1013GNULIB_WCSNCAT
1014GNULIB_WCSCAT
1015GNULIB_WCPNCPY
1016GNULIB_WCSNCPY
1017GNULIB_WCPCPY
1018GNULIB_WCSCPY
1019GNULIB_WCSNLEN
1020GNULIB_WCSLEN
1021GNULIB_WMEMSET
1022GNULIB_WMEMMOVE
1023GNULIB_WMEMCPY
1024GNULIB_WMEMCMP
1025GNULIB_WMEMCHR
1026GNULIB_WCWIDTH
1027GNULIB_WCSNRTOMBS
1028GNULIB_WCSRTOMBS
1029GNULIB_WCRTOMB
1030GNULIB_MBSNRTOWCS
1031GNULIB_MBSRTOWCS
1032GNULIB_MBRLEN
1033GNULIB_MBRTOWC
1034GNULIB_MBSINIT
1035GNULIB_WCTOB
1036GNULIB_BTOWC
88b48903
WN
1037NEXT_AS_FIRST_DIRECTIVE_MATH_H
1038NEXT_MATH_H
5abebf3c
CB
1039LTLIBMULTITHREAD
1040LIBMULTITHREAD
1041LTLIBTHREAD
1042LIBTHREAD
1043LIBPTH_PREFIX
1044LTLIBPTH
1045LIBPTH
8690e634 1046LOCALCHARSET_TESTS_ENVIRONMENT
5e8754f9 1047GLIBC21
c971b7fa
PA
1048NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1049NEXT_INTTYPES_H
1050UINT64_MAX_EQ_ULONG_MAX
1051UINT32_MAX_LT_UINTMAX_MAX
1052PRIPTR_PREFIX
1053PRI_MACROS_BROKEN
1054INT64_MAX_EQ_LONG_MAX
1055INT32_MAX_LT_INTMAX_MAX
4a626d0a 1056REPLACE_STRTOUMAX
c971b7fa
PA
1057REPLACE_STRTOIMAX
1058HAVE_DECL_STRTOUMAX
1059HAVE_DECL_STRTOIMAX
1060HAVE_DECL_IMAXDIV
1061HAVE_DECL_IMAXABS
1062GNULIB_STRTOUMAX
1063GNULIB_STRTOIMAX
1064GNULIB_IMAXDIV
1065GNULIB_IMAXABS
1066GL_GENERATE_STDINT_H_FALSE
1067GL_GENERATE_STDINT_H_TRUE
1068STDINT_H
49e4877c
PA
1069HAVE_SYS_INTTYPES_H
1070HAVE_SYS_BITYPES_H
1071HAVE_C99_STDINT_H
c971b7fa
PA
1072WINT_T_SUFFIX
1073WCHAR_T_SUFFIX
1074SIG_ATOMIC_T_SUFFIX
1075SIZE_T_SUFFIX
1076PTRDIFF_T_SUFFIX
1077HAVE_SIGNED_WINT_T
1078HAVE_SIGNED_WCHAR_T
1079HAVE_SIGNED_SIG_ATOMIC_T
1080BITSIZEOF_WINT_T
1081BITSIZEOF_WCHAR_T
1082BITSIZEOF_SIG_ATOMIC_T
1083BITSIZEOF_SIZE_T
1084BITSIZEOF_PTRDIFF_T
1085APPLE_UNIVERSAL_BUILD
c971b7fa
PA
1086HAVE_STDINT_H
1087NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1088NEXT_STDINT_H
c971b7fa
PA
1089HAVE_SYS_TYPES_H
1090HAVE_INTTYPES_H
1091HAVE_WCHAR_H
1092HAVE_UNSIGNED_LONG_LONG_INT
1093HAVE_LONG_LONG_INT
49e4877c
PA
1094GL_GENERATE_LIMITS_H_FALSE
1095GL_GENERATE_LIMITS_H_TRUE
1096LIMITS_H
1097NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1098NEXT_LIMITS_H
725e2999
JB
1099HAVE_WS2TCPIP_H
1100HAVE_SYS_SOCKET_H
1101NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
1102NEXT_SYS_SOCKET_H
1103HAVE_ACCEPT4
1104HAVE_SA_FAMILY_T
1105HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
1106HAVE_STRUCT_SOCKADDR_STORAGE
1107GNULIB_ACCEPT4
1108GNULIB_SHUTDOWN
1109GNULIB_SETSOCKOPT
1110GNULIB_SENDTO
1111GNULIB_RECVFROM
1112GNULIB_SEND
1113GNULIB_RECV
1114GNULIB_LISTEN
1115GNULIB_GETSOCKOPT
1116GNULIB_GETSOCKNAME
1117GNULIB_GETPEERNAME
1118GNULIB_BIND
1119GNULIB_ACCEPT
1120GNULIB_CONNECT
1121GNULIB_SOCKET
1122INET_NTOP_LIB
5e8754f9 1123HAVE_SYS_CDEFS_H
6ec2e0f5
SDJ
1124GL_GENERATE_GLOB_H_FALSE
1125GL_GENERATE_GLOB_H_TRUE
1126GLOB_H
4a626d0a
PA
1127NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1128NEXT_SYS_TIME_H
1129REPLACE_STRUCT_TIMEVAL
1130REPLACE_GETTIMEOFDAY
5e8754f9 1131HAVE_TIMEZONE_T
4a626d0a
PA
1132HAVE_SYS_TIME_H
1133HAVE_STRUCT_TIMEVAL
1134HAVE_GETTIMEOFDAY
1135GNULIB_GETTIMEOFDAY
6ec2e0f5
SDJ
1136LTLIBINTL
1137LIBINTL
1138WINDOWS_64_BIT_ST_SIZE
1139NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1140NEXT_SYS_STAT_H
1141REPLACE_UTIMENSAT
1142REPLACE_STAT
1143REPLACE_MKNOD
1144REPLACE_MKFIFO
1145REPLACE_MKDIR
1146REPLACE_LSTAT
1147REPLACE_FUTIMENS
1148REPLACE_FSTATAT
1149REPLACE_FSTAT
1150HAVE_UTIMENSAT
1151HAVE_MKNODAT
1152HAVE_MKNOD
1153HAVE_MKFIFOAT
1154HAVE_MKFIFO
1155HAVE_MKDIRAT
1156HAVE_LSTAT
1157HAVE_LCHMOD
1158HAVE_FUTIMENS
1159HAVE_FSTATAT
1160HAVE_FCHMODAT
1161GNULIB_UTIMENSAT
1162GNULIB_STAT
1163GNULIB_MKNODAT
1164GNULIB_MKNOD
1165GNULIB_MKFIFOAT
1166GNULIB_MKFIFO
1167GNULIB_MKDIRAT
1168GNULIB_LSTAT
1169GNULIB_LCHMOD
1170GNULIB_FUTIMENS
1171GNULIB_FSTATAT
1172GNULIB_FSTAT
1173GNULIB_FCHMODAT
88b48903
WN
1174FREXPL_LIBM
1175HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1176FREXP_LIBM
1177REPLACE_TRUNCL
1178REPLACE_TRUNCF
1179REPLACE_TRUNC
1180REPLACE_SQRTL
1181REPLACE_SIGNBIT_USING_GCC
1182REPLACE_SIGNBIT
1183REPLACE_ROUNDL
1184REPLACE_ROUNDF
1185REPLACE_ROUND
1186REPLACE_REMAINDERL
1187REPLACE_REMAINDERF
1188REPLACE_REMAINDER
1189REPLACE_NAN
1190REPLACE_MODFL
1191REPLACE_MODFF
1192REPLACE_MODF
1193REPLACE_LOGBL
1194REPLACE_LOGBF
1195REPLACE_LOGB
1196REPLACE_LOG2L
1197REPLACE_LOG2F
1198REPLACE_LOG2
1199REPLACE_LOG1PL
1200REPLACE_LOG1PF
1201REPLACE_LOG1P
1202REPLACE_LOG10L
1203REPLACE_LOG10F
1204REPLACE_LOG10
1205REPLACE_LOGL
1206REPLACE_LOGF
1207REPLACE_LOG
1208REPLACE_LDEXPL
1209REPLACE_ISNAN
1210REPLACE_ISINF
1211REPLACE_ISFINITE
1212REPLACE_ILOGBF
1213REPLACE_ILOGB
1214REPLACE_HYPOTL
1215REPLACE_HYPOTF
1216REPLACE_HYPOT
1217REPLACE_HUGE_VAL
1218REPLACE_FREXPL
1219REPLACE_FREXP
1220REPLACE_FREXPF
1221REPLACE_FMODL
1222REPLACE_FMODF
1223REPLACE_FMOD
1224REPLACE_FMAL
1225REPLACE_FMAF
1226REPLACE_FMA
1227REPLACE_FLOORL
1228REPLACE_FLOORF
1229REPLACE_FLOOR
1230REPLACE_FABSL
1231REPLACE_EXP2L
1232REPLACE_EXP2
1233REPLACE_EXPM1F
1234REPLACE_EXPM1
1235REPLACE_CEILL
1236REPLACE_CEILF
1237REPLACE_CEIL
1238REPLACE_CBRTL
1239REPLACE_CBRTF
1240HAVE_DECL_TRUNCL
1241HAVE_DECL_TRUNCF
1242HAVE_DECL_TRUNC
1243HAVE_DECL_TANL
1244HAVE_DECL_SQRTL
1245HAVE_DECL_SINL
1246HAVE_DECL_ROUNDL
1247HAVE_DECL_ROUNDF
1248HAVE_DECL_ROUND
1249HAVE_DECL_RINTF
1250HAVE_DECL_REMAINDERL
1251HAVE_DECL_REMAINDER
1252HAVE_DECL_LOGB
1253HAVE_DECL_LOG2L
1254HAVE_DECL_LOG2F
1255HAVE_DECL_LOG2
1256HAVE_DECL_LOG10L
1257HAVE_DECL_LOGL
1258HAVE_DECL_LDEXPL
1259HAVE_DECL_FREXPL
1260HAVE_DECL_FLOORL
1261HAVE_DECL_FLOORF
1262HAVE_DECL_EXPM1L
1263HAVE_DECL_EXP2L
1264HAVE_DECL_EXP2F
1265HAVE_DECL_EXP2
1266HAVE_DECL_EXPL
1267HAVE_DECL_COSL
1268HAVE_DECL_COPYSIGNF
1269HAVE_DECL_CEILL
1270HAVE_DECL_CEILF
1271HAVE_DECL_CBRTL
1272HAVE_DECL_CBRTF
1273HAVE_DECL_ATANL
1274HAVE_DECL_ASINL
1275HAVE_DECL_ACOSL
1276HAVE_TANHF
1277HAVE_TANL
1278HAVE_TANF
1279HAVE_SQRTL
1280HAVE_SQRTF
1281HAVE_SINHF
1282HAVE_SINL
1283HAVE_SINF
1284HAVE_RINTL
1285HAVE_RINT
1286HAVE_REMAINDERF
1287HAVE_REMAINDER
1288HAVE_POWF
1289HAVE_MODFL
1290HAVE_MODFF
1291HAVE_LOGBL
1292HAVE_LOGBF
1293HAVE_LOG1PL
1294HAVE_LOG1PF
1295HAVE_LOG1P
1296HAVE_LOG10L
1297HAVE_LOG10F
1298HAVE_LOGL
1299HAVE_LOGF
1300HAVE_LDEXPF
1301HAVE_ISNANL
1302HAVE_ISNAND
1303HAVE_ISNANF
1304HAVE_ILOGBL
1305HAVE_ILOGBF
1306HAVE_ILOGB
1307HAVE_HYPOTL
1308HAVE_HYPOTF
1309HAVE_FREXPF
1310HAVE_FMODL
1311HAVE_FMODF
1312HAVE_FMAL
1313HAVE_FMAF
1314HAVE_FMA
1315HAVE_FABSL
1316HAVE_FABSF
1317HAVE_EXPM1F
1318HAVE_EXPM1
1319HAVE_EXPL
1320HAVE_EXPF
1321HAVE_COSHF
1322HAVE_COSL
1323HAVE_COSF
1324HAVE_COPYSIGNL
1325HAVE_COPYSIGN
1326HAVE_CBRTL
1327HAVE_CBRTF
1328HAVE_CBRT
1329HAVE_ATAN2F
1330HAVE_ATANL
1331HAVE_ATANF
1332HAVE_ASINL
1333HAVE_ASINF
1334HAVE_ACOSL
1335HAVE_ACOSF
1336GNULIB_TRUNCL
1337GNULIB_TRUNCF
1338GNULIB_TRUNC
1339GNULIB_TANHF
1340GNULIB_TANL
1341GNULIB_TANF
1342GNULIB_SQRTL
1343GNULIB_SQRTF
1344GNULIB_SINHF
1345GNULIB_SINL
1346GNULIB_SINF
1347GNULIB_SIGNBIT
1348GNULIB_ROUNDL
1349GNULIB_ROUNDF
1350GNULIB_ROUND
1351GNULIB_RINTL
1352GNULIB_RINTF
1353GNULIB_RINT
1354GNULIB_REMAINDERL
1355GNULIB_REMAINDERF
1356GNULIB_REMAINDER
1357GNULIB_POWF
1358GNULIB_MODFL
1359GNULIB_MODFF
1360GNULIB_MODF
1361GNULIB_LOGBL
1362GNULIB_LOGBF
1363GNULIB_LOGB
1364GNULIB_LOG2L
1365GNULIB_LOG2F
1366GNULIB_LOG2
1367GNULIB_LOG1PL
1368GNULIB_LOG1PF
1369GNULIB_LOG1P
1370GNULIB_LOG10L
1371GNULIB_LOG10F
1372GNULIB_LOG10
1373GNULIB_LOGL
1374GNULIB_LOGF
1375GNULIB_LOG
1376GNULIB_LDEXPL
1377GNULIB_LDEXPF
1378GNULIB_ISNANL
1379GNULIB_ISNAND
1380GNULIB_ISNANF
1381GNULIB_ISNAN
1382GNULIB_ISINF
1383GNULIB_ISFINITE
1384GNULIB_ILOGBL
1385GNULIB_ILOGBF
1386GNULIB_ILOGB
1387GNULIB_HYPOTL
1388GNULIB_HYPOTF
1389GNULIB_HYPOT
1390GNULIB_FREXPL
1391GNULIB_FREXP
1392GNULIB_FREXPF
1393GNULIB_FMODL
1394GNULIB_FMODF
1395GNULIB_FMOD
1396GNULIB_FMAL
1397GNULIB_FMAF
1398GNULIB_FMA
1399GNULIB_FLOORL
1400GNULIB_FLOORF
1401GNULIB_FLOOR
1402GNULIB_FABSL
1403GNULIB_FABSF
1404GNULIB_EXPM1L
1405GNULIB_EXPM1F
1406GNULIB_EXPM1
1407GNULIB_EXP2L
1408GNULIB_EXP2F
1409GNULIB_EXP2
1410GNULIB_EXPL
1411GNULIB_EXPF
1412GNULIB_COSHF
1413GNULIB_COSL
1414GNULIB_COSF
1415GNULIB_COPYSIGNL
1416GNULIB_COPYSIGNF
1417GNULIB_COPYSIGN
1418GNULIB_CEILL
1419GNULIB_CEILF
1420GNULIB_CEIL
1421GNULIB_CBRTL
1422GNULIB_CBRTF
1423GNULIB_CBRT
1424GNULIB_ATAN2F
1425GNULIB_ATANL
1426GNULIB_ATANF
1427GNULIB_ASINL
1428GNULIB_ASINF
1429GNULIB_ACOSL
1430GNULIB_ACOSF
8690e634
JK
1431GL_GENERATE_FNMATCH_H_FALSE
1432GL_GENERATE_FNMATCH_H_TRUE
1433FNMATCH_H
88b48903
WN
1434REPLACE_ITOLD
1435GL_GENERATE_FLOAT_H_FALSE
1436GL_GENERATE_FLOAT_H_TRUE
1437FLOAT_H
1438NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1439NEXT_FLOAT_H
6ec2e0f5
SDJ
1440NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1441NEXT_FCNTL_H
1442REPLACE_OPENAT
1443REPLACE_OPEN
1444REPLACE_FCNTL
1445HAVE_OPENAT
1446HAVE_FCNTL
1447GNULIB_OPENAT
1448GNULIB_OPEN
1449GNULIB_NONBLOCKING
1450GNULIB_FCNTL
18848e28
GF
1451EOVERFLOW_VALUE
1452EOVERFLOW_HIDDEN
1453ENOLINK_VALUE
1454ENOLINK_HIDDEN
1455EMULTIHOP_VALUE
1456EMULTIHOP_HIDDEN
1457GL_GENERATE_ERRNO_H_FALSE
1458GL_GENERATE_ERRNO_H_TRUE
1459ERRNO_H
1460NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1461NEXT_ERRNO_H
e26b6bb0
TT
1462HAVE_DIRENT_H
1463NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1464NEXT_DIRENT_H
5e8754f9
SDJ
1465pkglibexecdir
1466runstatedir
1467lispdir
e26b6bb0
TT
1468REPLACE_FDOPENDIR
1469REPLACE_DIRFD
1470REPLACE_CLOSEDIR
1471REPLACE_OPENDIR
1472HAVE_ALPHASORT
1473HAVE_SCANDIR
1474HAVE_FDOPENDIR
1475HAVE_DECL_FDOPENDIR
1476HAVE_DECL_DIRFD
1477HAVE_CLOSEDIR
1478HAVE_REWINDDIR
1479HAVE_READDIR
1480HAVE_OPENDIR
1481GNULIB_ALPHASORT
1482GNULIB_SCANDIR
1483GNULIB_FDOPENDIR
1484GNULIB_DIRFD
1485GNULIB_CLOSEDIR
1486GNULIB_REWINDDIR
1487GNULIB_READDIR
1488GNULIB_OPENDIR
6ec2e0f5
SDJ
1489HAVE_WINSOCK2_H
1490HAVE_MSVC_INVALID_PARAMETER_HANDLER
e26b6bb0
TT
1491UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1492UNISTD_H_HAVE_WINSOCK2_H
1493REPLACE_WRITE
1494REPLACE_USLEEP
1495REPLACE_UNLINKAT
1496REPLACE_UNLINK
1497REPLACE_TTYNAME_R
4a626d0a 1498REPLACE_SYMLINKAT
e26b6bb0
TT
1499REPLACE_SYMLINK
1500REPLACE_SLEEP
1501REPLACE_RMDIR
4a626d0a 1502REPLACE_READLINKAT
e26b6bb0
TT
1503REPLACE_READLINK
1504REPLACE_READ
1505REPLACE_PWRITE
1506REPLACE_PREAD
1507REPLACE_LSEEK
1508REPLACE_LINKAT
1509REPLACE_LINK
1510REPLACE_LCHOWN
1511REPLACE_ISATTY
1512REPLACE_GETPAGESIZE
1513REPLACE_GETGROUPS
1514REPLACE_GETLOGIN_R
4a626d0a 1515REPLACE_GETDTABLESIZE
e26b6bb0
TT
1516REPLACE_GETDOMAINNAME
1517REPLACE_GETCWD
1518REPLACE_FTRUNCATE
1519REPLACE_FCHOWNAT
1520REPLACE_DUP2
1521REPLACE_DUP
1522REPLACE_CLOSE
1523REPLACE_CHOWN
1524HAVE_SYS_PARAM_H
1525HAVE_OS_H
1526HAVE_DECL_TTYNAME_R
1527HAVE_DECL_SETHOSTNAME
1528HAVE_DECL_GETUSERSHELL
1529HAVE_DECL_GETPAGESIZE
1530HAVE_DECL_GETLOGIN_R
1531HAVE_DECL_GETDOMAINNAME
1532HAVE_DECL_FDATASYNC
1533HAVE_DECL_FCHDIR
1534HAVE_DECL_ENVIRON
1535HAVE_USLEEP
1536HAVE_UNLINKAT
1537HAVE_SYMLINKAT
1538HAVE_SYMLINK
1539HAVE_SLEEP
1540HAVE_SETHOSTNAME
1541HAVE_READLINKAT
1542HAVE_READLINK
1543HAVE_PWRITE
1544HAVE_PREAD
1545HAVE_PIPE2
1546HAVE_PIPE
1547HAVE_LINKAT
1548HAVE_LINK
1549HAVE_LCHOWN
1550HAVE_GROUP_MEMBER
1551HAVE_GETPAGESIZE
1552HAVE_GETLOGIN
1553HAVE_GETHOSTNAME
1554HAVE_GETGROUPS
1555HAVE_GETDTABLESIZE
1556HAVE_FTRUNCATE
1557HAVE_FSYNC
1558HAVE_FDATASYNC
1559HAVE_FCHOWNAT
1560HAVE_FCHDIR
1561HAVE_FACCESSAT
1562HAVE_EUIDACCESS
1563HAVE_DUP3
1564HAVE_DUP2
1565HAVE_CHOWN
1566GNULIB_WRITE
1567GNULIB_USLEEP
1568GNULIB_UNLINKAT
1569GNULIB_UNLINK
1570GNULIB_UNISTD_H_SIGPIPE
1571GNULIB_UNISTD_H_NONBLOCKING
1572GNULIB_TTYNAME_R
1573GNULIB_SYMLINKAT
1574GNULIB_SYMLINK
1575GNULIB_SLEEP
1576GNULIB_SETHOSTNAME
1577GNULIB_RMDIR
1578GNULIB_READLINKAT
1579GNULIB_READLINK
1580GNULIB_READ
1581GNULIB_PWRITE
1582GNULIB_PREAD
1583GNULIB_PIPE2
1584GNULIB_PIPE
1585GNULIB_LSEEK
1586GNULIB_LINKAT
1587GNULIB_LINK
1588GNULIB_LCHOWN
1589GNULIB_ISATTY
1590GNULIB_GROUP_MEMBER
1591GNULIB_GETUSERSHELL
1592GNULIB_GETPAGESIZE
1593GNULIB_GETLOGIN_R
1594GNULIB_GETLOGIN
1595GNULIB_GETHOSTNAME
1596GNULIB_GETGROUPS
1597GNULIB_GETDTABLESIZE
1598GNULIB_GETDOMAINNAME
1599GNULIB_GETCWD
1600GNULIB_FTRUNCATE
1601GNULIB_FSYNC
1602GNULIB_FDATASYNC
1603GNULIB_FCHOWNAT
1604GNULIB_FCHDIR
1605GNULIB_FACCESSAT
1606GNULIB_EUIDACCESS
1607GNULIB_ENVIRON
1608GNULIB_DUP3
1609GNULIB_DUP2
1610GNULIB_DUP
1611GNULIB_CLOSE
1612GNULIB_CHOWN
1613GNULIB_CHDIR
98399780
YQ
1614REPLACE_WCTOMB
1615REPLACE_UNSETENV
1616REPLACE_STRTOD
1617REPLACE_SETENV
1618REPLACE_REALPATH
1619REPLACE_REALLOC
1620REPLACE_RANDOM_R
4a626d0a 1621REPLACE_QSORT_R
98399780
YQ
1622REPLACE_PUTENV
1623REPLACE_PTSNAME_R
1624REPLACE_PTSNAME
1625REPLACE_MKSTEMP
1626REPLACE_MBTOWC
1627REPLACE_MALLOC
1628REPLACE_CANONICALIZE_FILE_NAME
1629REPLACE_CALLOC
1630HAVE_DECL_UNSETENV
1631HAVE_UNLOCKPT
1632HAVE_SYS_LOADAVG_H
1633HAVE_STRUCT_RANDOM_DATA
1634HAVE_STRTOULL
1635HAVE_STRTOLL
1636HAVE_STRTOD
1637HAVE_DECL_SETENV
1638HAVE_SETENV
4a626d0a 1639HAVE_SECURE_GETENV
98399780
YQ
1640HAVE_RPMATCH
1641HAVE_REALPATH
1642HAVE_RANDOM_R
1643HAVE_RANDOM_H
1644HAVE_RANDOM
4c62b19f 1645HAVE_QSORT_R
98399780
YQ
1646HAVE_PTSNAME_R
1647HAVE_PTSNAME
1648HAVE_POSIX_OPENPT
1649HAVE_MKSTEMPS
1650HAVE_MKSTEMP
1651HAVE_MKOSTEMPS
1652HAVE_MKOSTEMP
1653HAVE_MKDTEMP
1654HAVE_GRANTPT
1655HAVE_GETSUBOPT
1656HAVE_DECL_GETLOADAVG
1657HAVE_CANONICALIZE_FILE_NAME
1658HAVE_ATOLL
1659HAVE__EXIT
1660GNULIB_WCTOMB
1661GNULIB_UNSETENV
1662GNULIB_UNLOCKPT
1663GNULIB_SYSTEM_POSIX
1664GNULIB_STRTOULL
1665GNULIB_STRTOLL
1666GNULIB_STRTOD
1667GNULIB_SETENV
4a626d0a 1668GNULIB_SECURE_GETENV
98399780
YQ
1669GNULIB_RPMATCH
1670GNULIB_REALPATH
1671GNULIB_REALLOC_POSIX
1672GNULIB_RANDOM_R
1673GNULIB_RANDOM
4a626d0a 1674GNULIB_QSORT_R
98399780
YQ
1675GNULIB_PUTENV
1676GNULIB_PTSNAME_R
1677GNULIB_PTSNAME
1678GNULIB_POSIX_OPENPT
1679GNULIB_MKSTEMPS
1680GNULIB_MKSTEMP
1681GNULIB_MKOSTEMPS
1682GNULIB_MKOSTEMP
1683GNULIB_MKDTEMP
1684GNULIB_MBTOWC
1685GNULIB_MALLOC_POSIX
1686GNULIB_GRANTPT
1687GNULIB_GETSUBOPT
1688GNULIB_GETLOADAVG
1689GNULIB_CANONICALIZE_FILE_NAME
1690GNULIB_CALLOC_POSIX
1691GNULIB_ATOLL
1692GNULIB__EXIT
725e2999
JB
1693MKDIR_P
1694HAVE_FEATURES_H
1695NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
1696NEXT_ARPA_INET_H
1697PRAGMA_COLUMNS
1698PRAGMA_SYSTEM_HEADER
1699INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1700INCLUDE_NEXT
1701HAVE_ARPA_INET_H
1702REPLACE_INET_PTON
1703REPLACE_INET_NTOP
1704HAVE_DECL_INET_PTON
1705HAVE_DECL_INET_NTOP
1706GNULIB_INET_PTON
1707GNULIB_INET_NTOP
8690e634
JK
1708GL_GENERATE_ALLOCA_H_FALSE
1709GL_GENERATE_ALLOCA_H_TRUE
1710ALLOCA_H
1711ALLOCA
c971b7fa
PA
1712GL_COND_LIBTOOL_FALSE
1713GL_COND_LIBTOOL_TRUE
1714target_os
1715target_vendor
1716target_cpu
1717target
c971b7fa
PA
1718host_os
1719host_vendor
1720host_cpu
1721host
1722build_os
1723build_vendor
1724build_cpu
1725build
4a626d0a
PA
1726RANLIB
1727ARFLAGS
5e8754f9 1728ac_ct_AR
4a626d0a
PA
1729AR
1730EGREP
1731GREP
1732CPP
c971b7fa
PA
1733OBJEXT
1734EXEEXT
1735ac_ct_CC
1736CPPFLAGS
1737LDFLAGS
1738CFLAGS
1739CC
1740MAINT
1741MAINTAINER_MODE_FALSE
1742MAINTAINER_MODE_TRUE
1743target_alias
1744host_alias
1745build_alias
1746LIBS
1747ECHO_T
1748ECHO_N
1749ECHO_C
1750DEFS
1751mandir
1752localedir
1753libdir
1754psdir
1755pdfdir
1756dvidir
1757htmldir
1758infodir
1759docdir
1760oldincludedir
1761includedir
1762localstatedir
1763sharedstatedir
1764sysconfdir
1765datadir
1766datarootdir
1767libexecdir
1768sbindir
1769bindir
1770program_transform_name
1771prefix
1772exec_prefix
1773PACKAGE_URL
1774PACKAGE_BUGREPORT
1775PACKAGE_STRING
1776PACKAGE_VERSION
1777PACKAGE_TARNAME
1778PACKAGE_NAME
1779PATH_SEPARATOR
1780SHELL'
1781ac_subst_files=''
1782ac_user_opts='
1783enable_option_checking
1784enable_maintainer_mode
2196f55f 1785enable_largefile
5abebf3c 1786enable_threads
73cc7272 1787enable_plugins
5abebf3c
CB
1788with_gnu_ld
1789enable_rpath
1790with_libpth_prefix
c971b7fa 1791enable_dependency_tracking
39be3c7e 1792enable_silent_rules
c971b7fa
PA
1793'
1794 ac_precious_vars='build_alias
1795host_alias
1796target_alias
1797CC
1798CFLAGS
1799LDFLAGS
1800LIBS
1801CPPFLAGS
1802CPP'
1803
1804
1805# Initialize some variables set by options.
1806ac_init_help=
1807ac_init_version=false
1808ac_unrecognized_opts=
1809ac_unrecognized_sep=
1810# The variables have the same names as the options, with
1811# dashes changed to underlines.
1812cache_file=/dev/null
1813exec_prefix=NONE
1814no_create=
1815no_recursion=
1816prefix=NONE
1817program_prefix=NONE
1818program_suffix=NONE
1819program_transform_name=s,x,x,
1820silent=
1821site=
1822srcdir=
1823verbose=
1824x_includes=NONE
1825x_libraries=NONE
1826
1827# Installation directory options.
1828# These are left unexpanded so users can "make install exec_prefix=/foo"
1829# and all the variables that are supposed to be based on exec_prefix
1830# by default will actually change.
1831# Use braces instead of parens because sh, perl, etc. also accept them.
1832# (The list follows the same order as the GNU Coding Standards.)
1833bindir='${exec_prefix}/bin'
1834sbindir='${exec_prefix}/sbin'
1835libexecdir='${exec_prefix}/libexec'
1836datarootdir='${prefix}/share'
1837datadir='${datarootdir}'
1838sysconfdir='${prefix}/etc'
1839sharedstatedir='${prefix}/com'
1840localstatedir='${prefix}/var'
1841includedir='${prefix}/include'
1842oldincludedir='/usr/include'
d0ac1c44 1843docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
c971b7fa
PA
1844infodir='${datarootdir}/info'
1845htmldir='${docdir}'
1846dvidir='${docdir}'
1847pdfdir='${docdir}'
1848psdir='${docdir}'
1849libdir='${exec_prefix}/lib'
1850localedir='${datarootdir}/locale'
1851mandir='${datarootdir}/man'
1852
1853ac_prev=
1854ac_dashdash=
1855for ac_option
1856do
1857 # If the previous option needs an argument, assign it.
1858 if test -n "$ac_prev"; then
1859 eval $ac_prev=\$ac_option
1860 ac_prev=
1861 continue
1862 fi
1863
1864 case $ac_option in
d0ac1c44
SM
1865 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1866 *=) ac_optarg= ;;
1867 *) ac_optarg=yes ;;
c971b7fa
PA
1868 esac
1869
1870 # Accept the important Cygnus configure options, so we can diagnose typos.
1871
1872 case $ac_dashdash$ac_option in
1873 --)
1874 ac_dashdash=yes ;;
1875
1876 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1877 ac_prev=bindir ;;
1878 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1879 bindir=$ac_optarg ;;
1880
1881 -build | --build | --buil | --bui | --bu)
1882 ac_prev=build_alias ;;
1883 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1884 build_alias=$ac_optarg ;;
1885
1886 -cache-file | --cache-file | --cache-fil | --cache-fi \
1887 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1888 ac_prev=cache_file ;;
1889 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1890 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1891 cache_file=$ac_optarg ;;
1892
1893 --config-cache | -C)
1894 cache_file=config.cache ;;
1895
1896 -datadir | --datadir | --datadi | --datad)
1897 ac_prev=datadir ;;
1898 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1899 datadir=$ac_optarg ;;
1900
1901 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1902 | --dataroo | --dataro | --datar)
1903 ac_prev=datarootdir ;;
1904 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1905 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1906 datarootdir=$ac_optarg ;;
1907
1908 -disable-* | --disable-*)
1909 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1910 # Reject names that are not valid shell variable names.
1911 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1912 as_fn_error $? "invalid feature name: $ac_useropt"
c971b7fa
PA
1913 ac_useropt_orig=$ac_useropt
1914 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1915 case $ac_user_opts in
1916 *"
1917"enable_$ac_useropt"
1918"*) ;;
1919 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1920 ac_unrecognized_sep=', ';;
1921 esac
1922 eval enable_$ac_useropt=no ;;
1923
1924 -docdir | --docdir | --docdi | --doc | --do)
1925 ac_prev=docdir ;;
1926 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1927 docdir=$ac_optarg ;;
1928
1929 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1930 ac_prev=dvidir ;;
1931 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1932 dvidir=$ac_optarg ;;
1933
1934 -enable-* | --enable-*)
1935 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1936 # Reject names that are not valid shell variable names.
1937 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1938 as_fn_error $? "invalid feature name: $ac_useropt"
c971b7fa
PA
1939 ac_useropt_orig=$ac_useropt
1940 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1941 case $ac_user_opts in
1942 *"
1943"enable_$ac_useropt"
1944"*) ;;
1945 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1946 ac_unrecognized_sep=', ';;
1947 esac
1948 eval enable_$ac_useropt=\$ac_optarg ;;
1949
1950 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1951 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1952 | --exec | --exe | --ex)
1953 ac_prev=exec_prefix ;;
1954 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1955 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1956 | --exec=* | --exe=* | --ex=*)
1957 exec_prefix=$ac_optarg ;;
1958
1959 -gas | --gas | --ga | --g)
1960 # Obsolete; use --with-gas.
1961 with_gas=yes ;;
1962
1963 -help | --help | --hel | --he | -h)
1964 ac_init_help=long ;;
1965 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1966 ac_init_help=recursive ;;
1967 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1968 ac_init_help=short ;;
1969
1970 -host | --host | --hos | --ho)
1971 ac_prev=host_alias ;;
1972 -host=* | --host=* | --hos=* | --ho=*)
1973 host_alias=$ac_optarg ;;
1974
1975 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1976 ac_prev=htmldir ;;
1977 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1978 | --ht=*)
1979 htmldir=$ac_optarg ;;
1980
1981 -includedir | --includedir | --includedi | --included | --include \
1982 | --includ | --inclu | --incl | --inc)
1983 ac_prev=includedir ;;
1984 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1985 | --includ=* | --inclu=* | --incl=* | --inc=*)
1986 includedir=$ac_optarg ;;
1987
1988 -infodir | --infodir | --infodi | --infod | --info | --inf)
1989 ac_prev=infodir ;;
1990 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1991 infodir=$ac_optarg ;;
1992
1993 -libdir | --libdir | --libdi | --libd)
1994 ac_prev=libdir ;;
1995 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1996 libdir=$ac_optarg ;;
1997
1998 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1999 | --libexe | --libex | --libe)
2000 ac_prev=libexecdir ;;
2001 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2002 | --libexe=* | --libex=* | --libe=*)
2003 libexecdir=$ac_optarg ;;
2004
2005 -localedir | --localedir | --localedi | --localed | --locale)
2006 ac_prev=localedir ;;
2007 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2008 localedir=$ac_optarg ;;
2009
2010 -localstatedir | --localstatedir | --localstatedi | --localstated \
2011 | --localstate | --localstat | --localsta | --localst | --locals)
2012 ac_prev=localstatedir ;;
2013 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2014 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2015 localstatedir=$ac_optarg ;;
2016
2017 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2018 ac_prev=mandir ;;
2019 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2020 mandir=$ac_optarg ;;
2021
2022 -nfp | --nfp | --nf)
2023 # Obsolete; use --without-fp.
2024 with_fp=no ;;
2025
2026 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2027 | --no-cr | --no-c | -n)
2028 no_create=yes ;;
2029
2030 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2031 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2032 no_recursion=yes ;;
2033
2034 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2035 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2036 | --oldin | --oldi | --old | --ol | --o)
2037 ac_prev=oldincludedir ;;
2038 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2039 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2040 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2041 oldincludedir=$ac_optarg ;;
2042
2043 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2044 ac_prev=prefix ;;
2045 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2046 prefix=$ac_optarg ;;
2047
2048 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2049 | --program-pre | --program-pr | --program-p)
2050 ac_prev=program_prefix ;;
2051 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2052 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2053 program_prefix=$ac_optarg ;;
2054
2055 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2056 | --program-suf | --program-su | --program-s)
2057 ac_prev=program_suffix ;;
2058 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2059 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2060 program_suffix=$ac_optarg ;;
2061
2062 -program-transform-name | --program-transform-name \
2063 | --program-transform-nam | --program-transform-na \
2064 | --program-transform-n | --program-transform- \
2065 | --program-transform | --program-transfor \
2066 | --program-transfo | --program-transf \
2067 | --program-trans | --program-tran \
2068 | --progr-tra | --program-tr | --program-t)
2069 ac_prev=program_transform_name ;;
2070 -program-transform-name=* | --program-transform-name=* \
2071 | --program-transform-nam=* | --program-transform-na=* \
2072 | --program-transform-n=* | --program-transform-=* \
2073 | --program-transform=* | --program-transfor=* \
2074 | --program-transfo=* | --program-transf=* \
2075 | --program-trans=* | --program-tran=* \
2076 | --progr-tra=* | --program-tr=* | --program-t=*)
2077 program_transform_name=$ac_optarg ;;
2078
2079 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2080 ac_prev=pdfdir ;;
2081 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2082 pdfdir=$ac_optarg ;;
2083
2084 -psdir | --psdir | --psdi | --psd | --ps)
2085 ac_prev=psdir ;;
2086 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2087 psdir=$ac_optarg ;;
2088
2089 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2090 | -silent | --silent | --silen | --sile | --sil)
2091 silent=yes ;;
2092
2093 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2094 ac_prev=sbindir ;;
2095 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2096 | --sbi=* | --sb=*)
2097 sbindir=$ac_optarg ;;
2098
2099 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2100 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2101 | --sharedst | --shareds | --shared | --share | --shar \
2102 | --sha | --sh)
2103 ac_prev=sharedstatedir ;;
2104 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2105 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2106 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2107 | --sha=* | --sh=*)
2108 sharedstatedir=$ac_optarg ;;
2109
2110 -site | --site | --sit)
2111 ac_prev=site ;;
2112 -site=* | --site=* | --sit=*)
2113 site=$ac_optarg ;;
2114
2115 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2116 ac_prev=srcdir ;;
2117 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2118 srcdir=$ac_optarg ;;
2119
2120 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2121 | --syscon | --sysco | --sysc | --sys | --sy)
2122 ac_prev=sysconfdir ;;
2123 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2124 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2125 sysconfdir=$ac_optarg ;;
2126
2127 -target | --target | --targe | --targ | --tar | --ta | --t)
2128 ac_prev=target_alias ;;
2129 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2130 target_alias=$ac_optarg ;;
2131
2132 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2133 verbose=yes ;;
2134
2135 -version | --version | --versio | --versi | --vers | -V)
2136 ac_init_version=: ;;
2137
2138 -with-* | --with-*)
2139 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2140 # Reject names that are not valid shell variable names.
2141 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 2142 as_fn_error $? "invalid package name: $ac_useropt"
c971b7fa
PA
2143 ac_useropt_orig=$ac_useropt
2144 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2145 case $ac_user_opts in
2146 *"
2147"with_$ac_useropt"
2148"*) ;;
2149 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2150 ac_unrecognized_sep=', ';;
2151 esac
2152 eval with_$ac_useropt=\$ac_optarg ;;
2153
2154 -without-* | --without-*)
2155 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2156 # Reject names that are not valid shell variable names.
2157 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 2158 as_fn_error $? "invalid package name: $ac_useropt"
c971b7fa
PA
2159 ac_useropt_orig=$ac_useropt
2160 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2161 case $ac_user_opts in
2162 *"
2163"with_$ac_useropt"
2164"*) ;;
2165 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2166 ac_unrecognized_sep=', ';;
2167 esac
2168 eval with_$ac_useropt=no ;;
2169
2170 --x)
2171 # Obsolete; use --with-x.
2172 with_x=yes ;;
2173
2174 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2175 | --x-incl | --x-inc | --x-in | --x-i)
2176 ac_prev=x_includes ;;
2177 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2178 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2179 x_includes=$ac_optarg ;;
2180
2181 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2182 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2183 ac_prev=x_libraries ;;
2184 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2185 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2186 x_libraries=$ac_optarg ;;
2187
d0ac1c44
SM
2188 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2189Try \`$0 --help' for more information"
c971b7fa
PA
2190 ;;
2191
2192 *=*)
2193 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2194 # Reject names that are not valid shell variable names.
2195 case $ac_envvar in #(
2196 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 2197 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
c971b7fa
PA
2198 esac
2199 eval $ac_envvar=\$ac_optarg
2200 export $ac_envvar ;;
2201
2202 *)
2203 # FIXME: should be removed in autoconf 3.0.
2204 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2205 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2206 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 2207 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c971b7fa
PA
2208 ;;
2209
2210 esac
2211done
2212
2213if test -n "$ac_prev"; then
2214 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 2215 as_fn_error $? "missing argument to $ac_option"
c971b7fa
PA
2216fi
2217
2218if test -n "$ac_unrecognized_opts"; then
2219 case $enable_option_checking in
2220 no) ;;
d0ac1c44 2221 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
c971b7fa
PA
2222 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2223 esac
2224fi
2225
2226# Check all directory arguments for consistency.
2227for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2228 datadir sysconfdir sharedstatedir localstatedir includedir \
2229 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2230 libdir localedir mandir
2231do
2232 eval ac_val=\$$ac_var
2233 # Remove trailing slashes.
2234 case $ac_val in
2235 */ )
2236 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2237 eval $ac_var=\$ac_val;;
2238 esac
2239 # Be sure to have absolute directory names.
2240 case $ac_val in
2241 [\\/$]* | ?:[\\/]* ) continue;;
2242 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2243 esac
d0ac1c44 2244 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c971b7fa
PA
2245done
2246
2247# There might be people who depend on the old broken behavior: `$host'
2248# used to hold the argument of --host etc.
2249# FIXME: To remove some day.
2250build=$build_alias
2251host=$host_alias
2252target=$target_alias
2253
2254# FIXME: To remove some day.
2255if test "x$host_alias" != x; then
2256 if test "x$build_alias" = x; then
2257 cross_compiling=maybe
c971b7fa
PA
2258 elif test "x$build_alias" != "x$host_alias"; then
2259 cross_compiling=yes
2260 fi
2261fi
2262
2263ac_tool_prefix=
2264test -n "$host_alias" && ac_tool_prefix=$host_alias-
2265
2266test "$silent" = yes && exec 6>/dev/null
2267
2268
2269ac_pwd=`pwd` && test -n "$ac_pwd" &&
2270ac_ls_di=`ls -di .` &&
2271ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 2272 as_fn_error $? "working directory cannot be determined"
c971b7fa 2273test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 2274 as_fn_error $? "pwd does not report name of working directory"
c971b7fa
PA
2275
2276
2277# Find the source files, if location was not specified.
2278if test -z "$srcdir"; then
2279 ac_srcdir_defaulted=yes
2280 # Try the directory containing this script, then the parent directory.
2281 ac_confdir=`$as_dirname -- "$as_myself" ||
2282$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2283 X"$as_myself" : 'X\(//\)[^/]' \| \
2284 X"$as_myself" : 'X\(//\)$' \| \
2285 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2286$as_echo X"$as_myself" |
2287 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2288 s//\1/
2289 q
2290 }
2291 /^X\(\/\/\)[^/].*/{
2292 s//\1/
2293 q
2294 }
2295 /^X\(\/\/\)$/{
2296 s//\1/
2297 q
2298 }
2299 /^X\(\/\).*/{
2300 s//\1/
2301 q
2302 }
2303 s/.*/./; q'`
2304 srcdir=$ac_confdir
2305 if test ! -r "$srcdir/$ac_unique_file"; then
2306 srcdir=..
2307 fi
2308else
2309 ac_srcdir_defaulted=no
2310fi
2311if test ! -r "$srcdir/$ac_unique_file"; then
2312 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 2313 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
c971b7fa
PA
2314fi
2315ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2316ac_abs_confdir=`(
d0ac1c44 2317 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
c971b7fa
PA
2318 pwd)`
2319# When building in place, set srcdir=.
2320if test "$ac_abs_confdir" = "$ac_pwd"; then
2321 srcdir=.
2322fi
2323# Remove unnecessary trailing slashes from srcdir.
2324# Double slashes in file names in object file debugging info
2325# mess up M-x gdb in Emacs.
2326case $srcdir in
2327*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2328esac
2329for ac_var in $ac_precious_vars; do
2330 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2331 eval ac_env_${ac_var}_value=\$${ac_var}
2332 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2333 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2334done
2335
2336#
2337# Report the --help message.
2338#
2339if test "$ac_init_help" = "long"; then
2340 # Omit some internal or obsolete options to make the list less imposing.
2341 # This message is too long to be a string in the A/UX 3.1 sh.
2342 cat <<_ACEOF
d0ac1c44 2343\`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
c971b7fa
PA
2344
2345Usage: $0 [OPTION]... [VAR=VALUE]...
2346
2347To assign environment variables (e.g., CC, CFLAGS...), specify them as
2348VAR=VALUE. See below for descriptions of some of the useful variables.
2349
2350Defaults for the options are specified in brackets.
2351
2352Configuration:
2353 -h, --help display this help and exit
2354 --help=short display options specific to this package
2355 --help=recursive display the short help of all the included packages
2356 -V, --version display version information and exit
d0ac1c44 2357 -q, --quiet, --silent do not print \`checking ...' messages
c971b7fa
PA
2358 --cache-file=FILE cache test results in FILE [disabled]
2359 -C, --config-cache alias for \`--cache-file=config.cache'
2360 -n, --no-create do not create output files
2361 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2362
2363Installation directories:
2364 --prefix=PREFIX install architecture-independent files in PREFIX
2365 [$ac_default_prefix]
2366 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2367 [PREFIX]
2368
2369By default, \`make install' will install all the files in
2370\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2371an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2372for instance \`--prefix=\$HOME'.
2373
2374For better control, use the options below.
2375
2376Fine tuning of the installation directories:
2377 --bindir=DIR user executables [EPREFIX/bin]
2378 --sbindir=DIR system admin executables [EPREFIX/sbin]
2379 --libexecdir=DIR program executables [EPREFIX/libexec]
2380 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2381 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2382 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2383 --libdir=DIR object code libraries [EPREFIX/lib]
2384 --includedir=DIR C header files [PREFIX/include]
2385 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2386 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2387 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2388 --infodir=DIR info documentation [DATAROOTDIR/info]
2389 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2390 --mandir=DIR man documentation [DATAROOTDIR/man]
d0ac1c44 2391 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
c971b7fa
PA
2392 --htmldir=DIR html documentation [DOCDIR]
2393 --dvidir=DIR dvi documentation [DOCDIR]
2394 --pdfdir=DIR pdf documentation [DOCDIR]
2395 --psdir=DIR ps documentation [DOCDIR]
2396_ACEOF
2397
2398 cat <<\_ACEOF
2399
2400Program names:
2401 --program-prefix=PREFIX prepend PREFIX to installed program names
2402 --program-suffix=SUFFIX append SUFFIX to installed program names
2403 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2404
2405System types:
2406 --build=BUILD configure for building on BUILD [guessed]
2407 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2408 --target=TARGET configure for building compilers for TARGET [HOST]
2409_ACEOF
2410fi
2411
2412if test -n "$ac_init_help"; then
d0ac1c44
SM
2413 case $ac_init_help in
2414 short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
2415 esac
c971b7fa
PA
2416 cat <<\_ACEOF
2417
2418Optional Features:
2419 --disable-option-checking ignore unrecognized --enable/--with options
2420 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2421 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
2422 --enable-maintainer-mode
2423 enable make rules and dependencies not useful (and
2424 sometimes confusing) to the casual installer
2196f55f 2425 --disable-largefile omit support for large files
5abebf3c
CB
2426 --enable-threads={posix|solaris|pth|windows}
2427 specify multithreading API
2428 --disable-threads build without multithread safety
73cc7272 2429 --enable-plugins Enable support for plugins
5abebf3c 2430 --disable-rpath do not hardcode runtime library paths
d0ac1c44
SM
2431 --enable-dependency-tracking
2432 do not reject slow dependency extractors
2433 --disable-dependency-tracking
2434 speeds up one-time build
2435 --enable-silent-rules less verbose build output (undo: "make V=1")
2436 --disable-silent-rules verbose build output (undo: "make V=0")
c971b7fa 2437
5abebf3c
CB
2438Optional Packages:
2439 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2440 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2441 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2442 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
2443 --without-libpth-prefix don't search for libpth in includedir and libdir
2444
c971b7fa
PA
2445Some influential environment variables:
2446 CC C compiler command
2447 CFLAGS C compiler flags
2448 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2449 nonstandard directory <lib dir>
2450 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 2451 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
c971b7fa
PA
2452 you have headers in a nonstandard directory <include dir>
2453 CPP C preprocessor
2454
2455Use these variables to override the choices made by `configure' or to help
2456it to find libraries and programs with nonstandard names/locations.
2457
2458Report bugs to the package provider.
2459_ACEOF
2460ac_status=$?
2461fi
2462
2463if test "$ac_init_help" = "recursive"; then
2464 # If there are subdirs, report their specific --help.
2465 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2466 test -d "$ac_dir" ||
2467 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2468 continue
2469 ac_builddir=.
2470
2471case "$ac_dir" in
2472.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2473*)
2474 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2475 # A ".." for each directory in $ac_dir_suffix.
2476 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2477 case $ac_top_builddir_sub in
2478 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2479 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2480 esac ;;
2481esac
2482ac_abs_top_builddir=$ac_pwd
2483ac_abs_builddir=$ac_pwd$ac_dir_suffix
2484# for backward compatibility:
2485ac_top_builddir=$ac_top_build_prefix
2486
2487case $srcdir in
2488 .) # We are building in place.
2489 ac_srcdir=.
2490 ac_top_srcdir=$ac_top_builddir_sub
2491 ac_abs_top_srcdir=$ac_pwd ;;
2492 [\\/]* | ?:[\\/]* ) # Absolute name.
2493 ac_srcdir=$srcdir$ac_dir_suffix;
2494 ac_top_srcdir=$srcdir
2495 ac_abs_top_srcdir=$srcdir ;;
2496 *) # Relative name.
2497 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2498 ac_top_srcdir=$ac_top_build_prefix$srcdir
2499 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2500esac
2501ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2502
2503 cd "$ac_dir" || { ac_status=$?; continue; }
2504 # Check for guested configure.
2505 if test -f "$ac_srcdir/configure.gnu"; then
2506 echo &&
2507 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2508 elif test -f "$ac_srcdir/configure"; then
2509 echo &&
2510 $SHELL "$ac_srcdir/configure" --help=recursive
2511 else
2512 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2513 fi || ac_status=$?
2514 cd "$ac_pwd" || { ac_status=$?; break; }
2515 done
2516fi
2517
2518test -n "$ac_init_help" && exit $ac_status
2519if $ac_init_version; then
2520 cat <<\_ACEOF
d0ac1c44
SM
2521libgnu configure UNUSED-VERSION
2522generated by GNU Autoconf 2.69
c971b7fa 2523
d0ac1c44 2524Copyright (C) 2012 Free Software Foundation, Inc.
c971b7fa
PA
2525This configure script is free software; the Free Software Foundation
2526gives unlimited permission to copy, distribute and modify it.
2527_ACEOF
2528 exit
2529fi
2530
2531## ------------------------ ##
2532## Autoconf initialization. ##
2533## ------------------------ ##
2534
2535# ac_fn_c_try_compile LINENO
2536# --------------------------
2537# Try to compile conftest.$ac_ext, and return whether this succeeded.
2538ac_fn_c_try_compile ()
2539{
2540 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2541 rm -f conftest.$ac_objext
2542 if { { ac_try="$ac_compile"
2543case "(($ac_try" in
2544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2545 *) ac_try_echo=$ac_try;;
2546esac
2547eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2548$as_echo "$ac_try_echo"; } >&5
2549 (eval "$ac_compile") 2>conftest.err
2550 ac_status=$?
2551 if test -s conftest.err; then
2552 grep -v '^ *+' conftest.err >conftest.er1
2553 cat conftest.er1 >&5
2554 mv -f conftest.er1 conftest.err
2555 fi
2556 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2557 test $ac_status = 0; } && {
2558 test -z "$ac_c_werror_flag" ||
2559 test ! -s conftest.err
2560 } && test -s conftest.$ac_objext; then :
2561 ac_retval=0
2562else
2563 $as_echo "$as_me: failed program was:" >&5
2564sed 's/^/| /' conftest.$ac_ext >&5
2565
2566 ac_retval=1
2567fi
d0ac1c44
SM
2568 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2569 as_fn_set_status $ac_retval
c971b7fa
PA
2570
2571} # ac_fn_c_try_compile
2572
2573# ac_fn_c_try_cpp LINENO
2574# ----------------------
2575# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2576ac_fn_c_try_cpp ()
2577{
2578 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2579 if { { ac_try="$ac_cpp conftest.$ac_ext"
2580case "(($ac_try" in
2581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2582 *) ac_try_echo=$ac_try;;
2583esac
2584eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2585$as_echo "$ac_try_echo"; } >&5
2586 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2587 ac_status=$?
2588 if test -s conftest.err; then
2589 grep -v '^ *+' conftest.err >conftest.er1
2590 cat conftest.er1 >&5
2591 mv -f conftest.er1 conftest.err
2592 fi
2593 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 2594 test $ac_status = 0; } > conftest.i && {
c971b7fa
PA
2595 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2596 test ! -s conftest.err
2597 }; then :
2598 ac_retval=0
2599else
2600 $as_echo "$as_me: failed program was:" >&5
2601sed 's/^/| /' conftest.$ac_ext >&5
2602
2603 ac_retval=1
2604fi
d0ac1c44
SM
2605 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2606 as_fn_set_status $ac_retval
c971b7fa
PA
2607
2608} # ac_fn_c_try_cpp
2609
2610# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2611# -------------------------------------------------------
2612# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2613# the include files in INCLUDES and setting the cache variable VAR
2614# accordingly.
2615ac_fn_c_check_header_mongrel ()
2616{
2617 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 2618 if eval \${$3+:} false; then :
c971b7fa
PA
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2620$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2621if eval \${$3+:} false; then :
c971b7fa
PA
2622 $as_echo_n "(cached) " >&6
2623fi
2624eval ac_res=\$$3
2625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2626$as_echo "$ac_res" >&6; }
2627else
2628 # Is the header compilable?
2629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2630$as_echo_n "checking $2 usability... " >&6; }
2631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2632/* end confdefs.h. */
2633$4
2634#include <$2>
2635_ACEOF
2636if ac_fn_c_try_compile "$LINENO"; then :
2637 ac_header_compiler=yes
2638else
2639 ac_header_compiler=no
2640fi
2641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2643$as_echo "$ac_header_compiler" >&6; }
2644
2645# Is the header present?
2646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2647$as_echo_n "checking $2 presence... " >&6; }
2648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2649/* end confdefs.h. */
2650#include <$2>
2651_ACEOF
2652if ac_fn_c_try_cpp "$LINENO"; then :
2653 ac_header_preproc=yes
2654else
2655 ac_header_preproc=no
2656fi
d0ac1c44 2657rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
2658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2659$as_echo "$ac_header_preproc" >&6; }
2660
2661# So? What about this header?
2662case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2663 yes:no: )
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2665$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2667$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2668 ;;
2669 no:yes:* )
2670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2671$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2673$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2675$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2677$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2679$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2680 ;;
2681esac
2682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2683$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2684if eval \${$3+:} false; then :
c971b7fa
PA
2685 $as_echo_n "(cached) " >&6
2686else
2687 eval "$3=\$ac_header_compiler"
2688fi
2689eval ac_res=\$$3
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2691$as_echo "$ac_res" >&6; }
2692fi
d0ac1c44 2693 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c971b7fa
PA
2694
2695} # ac_fn_c_check_header_mongrel
2696
2697# ac_fn_c_try_run LINENO
2698# ----------------------
2699# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2700# that executables *can* be run.
2701ac_fn_c_try_run ()
2702{
2703 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2704 if { { ac_try="$ac_link"
2705case "(($ac_try" in
2706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2707 *) ac_try_echo=$ac_try;;
2708esac
2709eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2710$as_echo "$ac_try_echo"; } >&5
2711 (eval "$ac_link") 2>&5
2712 ac_status=$?
2713 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2714 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2715 { { case "(($ac_try" in
2716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2717 *) ac_try_echo=$ac_try;;
2718esac
2719eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2720$as_echo "$ac_try_echo"; } >&5
2721 (eval "$ac_try") 2>&5
2722 ac_status=$?
2723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2724 test $ac_status = 0; }; }; then :
2725 ac_retval=0
2726else
2727 $as_echo "$as_me: program exited with status $ac_status" >&5
2728 $as_echo "$as_me: failed program was:" >&5
2729sed 's/^/| /' conftest.$ac_ext >&5
2730
2731 ac_retval=$ac_status
2732fi
2733 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2734 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2735 as_fn_set_status $ac_retval
c971b7fa
PA
2736
2737} # ac_fn_c_try_run
2738
2739# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2740# -------------------------------------------------------
2741# Tests whether HEADER exists and can be compiled using the include files in
2742# INCLUDES, setting the cache variable VAR accordingly.
2743ac_fn_c_check_header_compile ()
2744{
2745 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2747$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2748if eval \${$3+:} false; then :
c971b7fa
PA
2749 $as_echo_n "(cached) " >&6
2750else
2751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2752/* end confdefs.h. */
2753$4
2754#include <$2>
2755_ACEOF
2756if ac_fn_c_try_compile "$LINENO"; then :
2757 eval "$3=yes"
2758else
2759 eval "$3=no"
2760fi
2761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2762fi
2763eval ac_res=\$$3
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2765$as_echo "$ac_res" >&6; }
d0ac1c44 2766 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c971b7fa
PA
2767
2768} # ac_fn_c_check_header_compile
2769
73cc7272
TT
2770# ac_fn_c_try_link LINENO
2771# -----------------------
2772# Try to link conftest.$ac_ext, and return whether this succeeded.
2773ac_fn_c_try_link ()
2774{
2775 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2776 rm -f conftest.$ac_objext conftest$ac_exeext
2777 if { { ac_try="$ac_link"
2778case "(($ac_try" in
2779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2780 *) ac_try_echo=$ac_try;;
2781esac
2782eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2783$as_echo "$ac_try_echo"; } >&5
2784 (eval "$ac_link") 2>conftest.err
2785 ac_status=$?
2786 if test -s conftest.err; then
2787 grep -v '^ *+' conftest.err >conftest.er1
2788 cat conftest.er1 >&5
2789 mv -f conftest.er1 conftest.err
2790 fi
2791 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2792 test $ac_status = 0; } && {
2793 test -z "$ac_c_werror_flag" ||
2794 test ! -s conftest.err
2795 } && test -s conftest$ac_exeext && {
2796 test "$cross_compiling" = yes ||
2797 test -x conftest$ac_exeext
2798 }; then :
2799 ac_retval=0
2800else
2801 $as_echo "$as_me: failed program was:" >&5
2802sed 's/^/| /' conftest.$ac_ext >&5
2803
2804 ac_retval=1
2805fi
2806 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2807 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2808 # interfere with the next link command; also delete a directory that is
2809 # left behind by Apple's compiler. We do this before executing the actions.
2810 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2811 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2812 as_fn_set_status $ac_retval
2813
2814} # ac_fn_c_try_link
2815
d0ac1c44
SM
2816# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2817# -------------------------------------------
2818# Tests whether TYPE exists after having included INCLUDES, setting cache
2819# variable VAR accordingly.
2820ac_fn_c_check_type ()
2821{
2822 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2824$as_echo_n "checking for $2... " >&6; }
2825if eval \${$3+:} false; then :
2826 $as_echo_n "(cached) " >&6
2827else
2828 eval "$3=no"
2829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2830/* end confdefs.h. */
2831$4
2832int
2833main ()
2834{
2835if (sizeof ($2))
2836 return 0;
2837 ;
2838 return 0;
2839}
2840_ACEOF
2841if ac_fn_c_try_compile "$LINENO"; then :
2842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2843/* end confdefs.h. */
2844$4
2845int
2846main ()
2847{
2848if (sizeof (($2)))
2849 return 0;
2850 ;
2851 return 0;
2852}
2853_ACEOF
2854if ac_fn_c_try_compile "$LINENO"; then :
2855
2856else
2857 eval "$3=yes"
2858fi
2859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2860fi
2861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2862fi
2863eval ac_res=\$$3
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2865$as_echo "$ac_res" >&6; }
2866 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2867
2868} # ac_fn_c_check_type
2869
8690e634
JK
2870# ac_fn_c_check_func LINENO FUNC VAR
2871# ----------------------------------
2872# Tests whether FUNC exists, setting the cache variable VAR accordingly
2873ac_fn_c_check_func ()
2874{
2875 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2877$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2878if eval \${$3+:} false; then :
8690e634
JK
2879 $as_echo_n "(cached) " >&6
2880else
2881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2882/* end confdefs.h. */
2883/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2884 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2885#define $2 innocuous_$2
2886
2887/* System header to define __stub macros and hopefully few prototypes,
2888 which can conflict with char $2 (); below.
2889 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2890 <limits.h> exists even on freestanding compilers. */
2891
2892#ifdef __STDC__
2893# include <limits.h>
2894#else
2895# include <assert.h>
2896#endif
2897
2898#undef $2
2899
2900/* Override any GCC internal prototype to avoid an error.
2901 Use char because int might match the return type of a GCC
2902 builtin and then its argument prototype would still apply. */
2903#ifdef __cplusplus
2904extern "C"
2905#endif
2906char $2 ();
2907/* The GNU C library defines this for functions which it implements
2908 to always fail with ENOSYS. Some functions are actually named
2909 something starting with __ and the normal name is an alias. */
2910#if defined __stub_$2 || defined __stub___$2
2911choke me
2912#endif
2913
2914int
2915main ()
2916{
2917return $2 ();
2918 ;
2919 return 0;
2920}
2921_ACEOF
2922if ac_fn_c_try_link "$LINENO"; then :
2923 eval "$3=yes"
2924else
2925 eval "$3=no"
2926fi
2927rm -f core conftest.err conftest.$ac_objext \
2928 conftest$ac_exeext conftest.$ac_ext
2929fi
2930eval ac_res=\$$3
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2932$as_echo "$ac_res" >&6; }
d0ac1c44 2933 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
8690e634
JK
2934
2935} # ac_fn_c_check_func
2936
d0ac1c44
SM
2937# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2938# ---------------------------------------------
2939# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2940# accordingly.
8986e351
TT
2941ac_fn_c_check_decl ()
2942{
2943 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44
SM
2944 as_decl_name=`echo $2|sed 's/ *(.*//'`
2945 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2947$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2948if eval \${$3+:} false; then :
8986e351
TT
2949 $as_echo_n "(cached) " >&6
2950else
2951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2952/* end confdefs.h. */
2953$4
2954int
2955main ()
2956{
d0ac1c44
SM
2957#ifndef $as_decl_name
2958#ifdef __cplusplus
2959 (void) $as_decl_use;
2960#else
2961 (void) $as_decl_name;
2962#endif
8986e351
TT
2963#endif
2964
2965 ;
2966 return 0;
2967}
2968_ACEOF
2969if ac_fn_c_try_compile "$LINENO"; then :
2970 eval "$3=yes"
2971else
2972 eval "$3=no"
2973fi
2974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2975fi
2976eval ac_res=\$$3
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2978$as_echo "$ac_res" >&6; }
d0ac1c44 2979 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
8986e351
TT
2980
2981} # ac_fn_c_check_decl
2982
c971b7fa
PA
2983# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2984# --------------------------------------------
2985# Tries to find the compile-time value of EXPR in a program that includes
2986# INCLUDES, setting VAR accordingly. Returns whether the value could be
2987# computed
2988ac_fn_c_compute_int ()
2989{
2990 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2991 if test "$cross_compiling" = yes; then
2992 # Depending upon the size, compute the lo and hi bounds.
2993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2994/* end confdefs.h. */
2995$4
2996int
2997main ()
2998{
2999static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
3000test_array [0] = 0;
3001return test_array [0];
c971b7fa
PA
3002
3003 ;
3004 return 0;
3005}
3006_ACEOF
3007if ac_fn_c_try_compile "$LINENO"; then :
3008 ac_lo=0 ac_mid=0
3009 while :; do
3010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3011/* end confdefs.h. */
3012$4
3013int
3014main ()
3015{
3016static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
3017test_array [0] = 0;
3018return test_array [0];
c971b7fa
PA
3019
3020 ;
3021 return 0;
3022}
3023_ACEOF
3024if ac_fn_c_try_compile "$LINENO"; then :
3025 ac_hi=$ac_mid; break
3026else
3027 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3028 if test $ac_lo -le $ac_mid; then
3029 ac_lo= ac_hi=
3030 break
3031 fi
3032 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3033fi
3034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3035 done
3036else
3037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3038/* end confdefs.h. */
3039$4
3040int
3041main ()
3042{
3043static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
3044test_array [0] = 0;
3045return test_array [0];
c971b7fa
PA
3046
3047 ;
3048 return 0;
3049}
3050_ACEOF
3051if ac_fn_c_try_compile "$LINENO"; then :
3052 ac_hi=-1 ac_mid=-1
3053 while :; do
3054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3055/* end confdefs.h. */
3056$4
3057int
3058main ()
3059{
3060static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
3061test_array [0] = 0;
3062return test_array [0];
c971b7fa
PA
3063
3064 ;
3065 return 0;
3066}
3067_ACEOF
3068if ac_fn_c_try_compile "$LINENO"; then :
3069 ac_lo=$ac_mid; break
3070else
3071 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3072 if test $ac_mid -le $ac_hi; then
3073 ac_lo= ac_hi=
3074 break
3075 fi
3076 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3077fi
3078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3079 done
3080else
3081 ac_lo= ac_hi=
3082fi
3083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3084fi
3085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3086# Binary search between lo and hi bounds.
3087while test "x$ac_lo" != "x$ac_hi"; do
3088 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3090/* end confdefs.h. */
3091$4
3092int
3093main ()
3094{
3095static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
3096test_array [0] = 0;
3097return test_array [0];
c971b7fa
PA
3098
3099 ;
3100 return 0;
3101}
3102_ACEOF
3103if ac_fn_c_try_compile "$LINENO"; then :
3104 ac_hi=$ac_mid
3105else
3106 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3107fi
3108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3109done
3110case $ac_lo in #((
3111?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3112'') ac_retval=1 ;;
3113esac
3114 else
3115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3116/* end confdefs.h. */
3117$4
3118static long int longval () { return $2; }
3119static unsigned long int ulongval () { return $2; }
3120#include <stdio.h>
3121#include <stdlib.h>
3122int
3123main ()
3124{
3125
3126 FILE *f = fopen ("conftest.val", "w");
3127 if (! f)
3128 return 1;
3129 if (($2) < 0)
3130 {
3131 long int i = longval ();
3132 if (i != ($2))
3133 return 1;
3134 fprintf (f, "%ld", i);
3135 }
3136 else
3137 {
3138 unsigned long int i = ulongval ();
3139 if (i != ($2))
3140 return 1;
3141 fprintf (f, "%lu", i);
3142 }
3143 /* Do not output a trailing newline, as this causes \r\n confusion
3144 on some platforms. */
3145 return ferror (f) || fclose (f) != 0;
3146
3147 ;
3148 return 0;
3149}
3150_ACEOF
3151if ac_fn_c_try_run "$LINENO"; then :
3152 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3153else
3154 ac_retval=1
3155fi
3156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3157 conftest.$ac_objext conftest.beam conftest.$ac_ext
3158rm -f conftest.val
3159
3160 fi
d0ac1c44
SM
3161 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3162 as_fn_set_status $ac_retval
c971b7fa
PA
3163
3164} # ac_fn_c_compute_int
725e2999
JB
3165
3166# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3167# ----------------------------------------------------
3168# Tries to find if the field MEMBER exists in type AGGR, after including
3169# INCLUDES, setting cache variable VAR accordingly.
3170ac_fn_c_check_member ()
3171{
3172 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3174$as_echo_n "checking for $2.$3... " >&6; }
3175if eval \${$4+:} false; then :
3176 $as_echo_n "(cached) " >&6
3177else
3178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3179/* end confdefs.h. */
3180$5
3181int
3182main ()
3183{
3184static $2 ac_aggr;
3185if (ac_aggr.$3)
3186return 0;
3187 ;
3188 return 0;
3189}
3190_ACEOF
3191if ac_fn_c_try_compile "$LINENO"; then :
3192 eval "$4=yes"
3193else
3194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3195/* end confdefs.h. */
3196$5
3197int
3198main ()
3199{
3200static $2 ac_aggr;
3201if (sizeof ac_aggr.$3)
3202return 0;
3203 ;
3204 return 0;
3205}
3206_ACEOF
3207if ac_fn_c_try_compile "$LINENO"; then :
3208 eval "$4=yes"
3209else
3210 eval "$4=no"
3211fi
3212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3213fi
3214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3215fi
3216eval ac_res=\$$4
3217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3218$as_echo "$ac_res" >&6; }
3219 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3220
3221} # ac_fn_c_check_member
c971b7fa
PA
3222cat >config.log <<_ACEOF
3223This file contains any messages produced by compilers while
3224running configure, to aid debugging if configure makes a mistake.
3225
d0ac1c44
SM
3226It was created by libgnu $as_me UNUSED-VERSION, which was
3227generated by GNU Autoconf 2.69. Invocation command line was
c971b7fa
PA
3228
3229 $ $0 $@
3230
3231_ACEOF
3232exec 5>>config.log
3233{
3234cat <<_ASUNAME
3235## --------- ##
3236## Platform. ##
3237## --------- ##
3238
3239hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3240uname -m = `(uname -m) 2>/dev/null || echo unknown`
3241uname -r = `(uname -r) 2>/dev/null || echo unknown`
3242uname -s = `(uname -s) 2>/dev/null || echo unknown`
3243uname -v = `(uname -v) 2>/dev/null || echo unknown`
3244
3245/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3246/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3247
3248/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3249/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3250/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3251/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3252/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3253/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3254/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3255
3256_ASUNAME
3257
3258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3259for as_dir in $PATH
3260do
3261 IFS=$as_save_IFS
3262 test -z "$as_dir" && as_dir=.
3263 $as_echo "PATH: $as_dir"
3264 done
3265IFS=$as_save_IFS
3266
3267} >&5
3268
3269cat >&5 <<_ACEOF
3270
3271
3272## ----------- ##
3273## Core tests. ##
3274## ----------- ##
3275
3276_ACEOF
3277
3278
3279# Keep a trace of the command line.
3280# Strip out --no-create and --no-recursion so they do not pile up.
3281# Strip out --silent because we don't want to record it for future runs.
3282# Also quote any args containing shell meta-characters.
3283# Make two passes to allow for proper duplicate-argument suppression.
3284ac_configure_args=
3285ac_configure_args0=
3286ac_configure_args1=
3287ac_must_keep_next=false
3288for ac_pass in 1 2
3289do
3290 for ac_arg
3291 do
3292 case $ac_arg in
3293 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3294 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3295 | -silent | --silent | --silen | --sile | --sil)
3296 continue ;;
3297 *\'*)
3298 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3299 esac
3300 case $ac_pass in
3301 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3302 2)
3303 as_fn_append ac_configure_args1 " '$ac_arg'"
3304 if test $ac_must_keep_next = true; then
3305 ac_must_keep_next=false # Got value, back to normal.
3306 else
3307 case $ac_arg in
3308 *=* | --config-cache | -C | -disable-* | --disable-* \
3309 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3310 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3311 | -with-* | --with-* | -without-* | --without-* | --x)
3312 case "$ac_configure_args0 " in
3313 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3314 esac
3315 ;;
3316 -* ) ac_must_keep_next=true ;;
3317 esac
3318 fi
3319 as_fn_append ac_configure_args " '$ac_arg'"
3320 ;;
3321 esac
3322 done
3323done
3324{ ac_configure_args0=; unset ac_configure_args0;}
3325{ ac_configure_args1=; unset ac_configure_args1;}
3326
3327# When interrupted or exit'd, cleanup temporary files, and complete
3328# config.log. We remove comments because anyway the quotes in there
3329# would cause problems or look ugly.
3330# WARNING: Use '\'' to represent an apostrophe within the trap.
3331# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3332trap 'exit_status=$?
3333 # Save into config.log some information that might help in debugging.
3334 {
3335 echo
3336
d0ac1c44 3337 $as_echo "## ---------------- ##
c971b7fa 3338## Cache variables. ##
d0ac1c44 3339## ---------------- ##"
c971b7fa
PA
3340 echo
3341 # The following way of writing the cache mishandles newlines in values,
3342(
3343 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3344 eval ac_val=\$$ac_var
3345 case $ac_val in #(
3346 *${as_nl}*)
3347 case $ac_var in #(
3348 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3349$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3350 esac
3351 case $ac_var in #(
3352 _ | IFS | as_nl) ;; #(
3353 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3354 *) { eval $ac_var=; unset $ac_var;} ;;
3355 esac ;;
3356 esac
3357 done
3358 (set) 2>&1 |
3359 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3360 *${as_nl}ac_space=\ *)
3361 sed -n \
3362 "s/'\''/'\''\\\\'\'''\''/g;
3363 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3364 ;; #(
3365 *)
3366 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3367 ;;
3368 esac |
3369 sort
3370)
3371 echo
3372
d0ac1c44 3373 $as_echo "## ----------------- ##
c971b7fa 3374## Output variables. ##
d0ac1c44 3375## ----------------- ##"
c971b7fa
PA
3376 echo
3377 for ac_var in $ac_subst_vars
3378 do
3379 eval ac_val=\$$ac_var
3380 case $ac_val in
3381 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3382 esac
3383 $as_echo "$ac_var='\''$ac_val'\''"
3384 done | sort
3385 echo
3386
3387 if test -n "$ac_subst_files"; then
d0ac1c44 3388 $as_echo "## ------------------- ##
c971b7fa 3389## File substitutions. ##
d0ac1c44 3390## ------------------- ##"
c971b7fa
PA
3391 echo
3392 for ac_var in $ac_subst_files
3393 do
3394 eval ac_val=\$$ac_var
3395 case $ac_val in
3396 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3397 esac
3398 $as_echo "$ac_var='\''$ac_val'\''"
3399 done | sort
3400 echo
3401 fi
3402
3403 if test -s confdefs.h; then
d0ac1c44 3404 $as_echo "## ----------- ##
c971b7fa 3405## confdefs.h. ##
d0ac1c44 3406## ----------- ##"
c971b7fa
PA
3407 echo
3408 cat confdefs.h
3409 echo
3410 fi
3411 test "$ac_signal" != 0 &&
3412 $as_echo "$as_me: caught signal $ac_signal"
3413 $as_echo "$as_me: exit $exit_status"
3414 } >&5
3415 rm -f core *.core core.conftest.* &&
3416 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3417 exit $exit_status
3418' 0
3419for ac_signal in 1 2 13 15; do
3420 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3421done
3422ac_signal=0
3423
3424# confdefs.h avoids OS command line length limits that DEFS can exceed.
3425rm -f -r conftest* confdefs.h
3426
3427$as_echo "/* confdefs.h */" > confdefs.h
3428
3429# Predefined preprocessor variables.
3430
3431cat >>confdefs.h <<_ACEOF
3432#define PACKAGE_NAME "$PACKAGE_NAME"
3433_ACEOF
3434
3435cat >>confdefs.h <<_ACEOF
3436#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3437_ACEOF
3438
3439cat >>confdefs.h <<_ACEOF
3440#define PACKAGE_VERSION "$PACKAGE_VERSION"
3441_ACEOF
3442
3443cat >>confdefs.h <<_ACEOF
3444#define PACKAGE_STRING "$PACKAGE_STRING"
3445_ACEOF
3446
3447cat >>confdefs.h <<_ACEOF
3448#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3449_ACEOF
3450
3451cat >>confdefs.h <<_ACEOF
3452#define PACKAGE_URL "$PACKAGE_URL"
3453_ACEOF
3454
3455
3456# Let the site file select an alternate cache file if it wants to.
3457# Prefer an explicitly selected file to automatically selected ones.
3458ac_site_file1=NONE
3459ac_site_file2=NONE
3460if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
3461 # We do not want a PATH search for config.site.
3462 case $CONFIG_SITE in #((
3463 -*) ac_site_file1=./$CONFIG_SITE;;
3464 */*) ac_site_file1=$CONFIG_SITE;;
3465 *) ac_site_file1=./$CONFIG_SITE;;
3466 esac
c971b7fa
PA
3467elif test "x$prefix" != xNONE; then
3468 ac_site_file1=$prefix/share/config.site
3469 ac_site_file2=$prefix/etc/config.site
3470else
3471 ac_site_file1=$ac_default_prefix/share/config.site
3472 ac_site_file2=$ac_default_prefix/etc/config.site
3473fi
3474for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3475do
3476 test "x$ac_site_file" = xNONE && continue
d0ac1c44 3477 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
c971b7fa
PA
3478 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3479$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3480 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
3481 . "$ac_site_file" \
3482 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3483$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3484as_fn_error $? "failed to load site script $ac_site_file
3485See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
3486 fi
3487done
3488
3489if test -r "$cache_file"; then
d0ac1c44
SM
3490 # Some versions of bash will fail to source /dev/null (special files
3491 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3492 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
c971b7fa
PA
3493 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3494$as_echo "$as_me: loading cache $cache_file" >&6;}
3495 case $cache_file in
3496 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3497 *) . "./$cache_file";;
3498 esac
3499 fi
3500else
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3502$as_echo "$as_me: creating cache $cache_file" >&6;}
3503 >$cache_file
3504fi
3505
725e2999
JB
3506gl_header_list="$gl_header_list arpa/inet.h"
3507gl_header_list="$gl_header_list features.h"
472fa5ee
SM
3508gl_func_list="$gl_func_list canonicalize_file_name"
3509gl_func_list="$gl_func_list getcwd"
3510gl_func_list="$gl_func_list readlink"
3511gl_func_list="$gl_func_list realpath"
3512gl_header_list="$gl_header_list sys/param.h"
3513gl_header_list="$gl_header_list unistd.h"
3514gl_func_list="$gl_func_list _set_invalid_parameter_handler"
3515gl_header_list="$gl_header_list sys/socket.h"
3516gl_func_list="$gl_func_list fchdir"
3517gl_header_list="$gl_header_list dirent.h"
3518gl_func_list="$gl_func_list fcntl"
3519gl_func_list="$gl_func_list symlink"
3520gl_func_list="$gl_func_list fdopendir"
3521gl_func_list="$gl_func_list mempcpy"
3522gl_func_list="$gl_func_list btowc"
3523gl_func_list="$gl_func_list isblank"
3524gl_func_list="$gl_func_list iswctype"
3525gl_func_list="$gl_func_list mbsrtowcs"
3526gl_func_list="$gl_func_list wmemchr"
3527gl_func_list="$gl_func_list wmemcpy"
3528gl_func_list="$gl_func_list wmempcpy"
3529gl_header_list="$gl_header_list wctype.h"
8690e634 3530gl_fnmatch_required=GNU
472fa5ee
SM
3531gl_header_list="$gl_header_list sys/stat.h"
3532gl_func_list="$gl_func_list fstatat"
3533gl_func_list="$gl_func_list getdtablesize"
3534gl_func_list="$gl_func_list getlogin_r"
3535gl_func_list="$gl_func_list getprogname"
3536gl_func_list="$gl_func_list getexecname"
3537gl_header_list="$gl_header_list sys/time.h"
3538gl_func_list="$gl_func_list gettimeofday"
5e8754f9 3539gl_header_list="$gl_header_list sys/cdefs.h"
472fa5ee 3540gl_func_list="$gl_func_list getpwnam_r"
725e2999
JB
3541gl_header_list="$gl_header_list netdb.h"
3542gl_header_list="$gl_header_list netinet/in.h"
472fa5ee
SM
3543gl_header_list="$gl_header_list limits.h"
3544gl_header_list="$gl_header_list wchar.h"
3545gl_header_list="$gl_header_list stdint.h"
3546gl_header_list="$gl_header_list inttypes.h"
3547gl_func_list="$gl_func_list lstat"
3548gl_header_list="$gl_header_list math.h"
3549gl_func_list="$gl_func_list mbsinit"
3550gl_func_list="$gl_func_list mbrtowc"
3551gl_header_list="$gl_header_list sys/mman.h"
3552gl_func_list="$gl_func_list mprotect"
b3279b60 3553gl_func_list="$gl_func_list mkostemp"
472fa5ee
SM
3554gl_func_list="$gl_func_list openat"
3555gl_func_list="$gl_func_list link"
5e8754f9
SDJ
3556gl_func_list="$gl_func_list secure_getenv"
3557gl_func_list="$gl_func_list getuid"
3558gl_func_list="$gl_func_list geteuid"
3559gl_func_list="$gl_func_list getgid"
3560gl_func_list="$gl_func_list getegid"
472fa5ee
SM
3561gl_func_list="$gl_func_list setenv"
3562gl_func_list="$gl_func_list strdup"
5abebf3c
CB
3563gl_func_list="$gl_func_list __xpg_strerror_r"
3564gl_func_list="$gl_func_list catgets"
3565gl_func_list="$gl_func_list snprintf"
725e2999 3566gl_header_list="$gl_header_list sys/uio.h"
f8e27d88 3567gl_func_list="$gl_func_list localtime_r"
472fa5ee 3568gl_func_list="$gl_func_list pipe"
472fa5ee 3569gl_func_list="$gl_func_list iswcntrl"
c971b7fa
PA
3570# Check that the precious variables saved in the cache have kept the same
3571# value.
3572ac_cache_corrupted=false
3573for ac_var in $ac_precious_vars; do
3574 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3575 eval ac_new_set=\$ac_env_${ac_var}_set
3576 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3577 eval ac_new_val=\$ac_env_${ac_var}_value
3578 case $ac_old_set,$ac_new_set in
3579 set,)
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3581$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3582 ac_cache_corrupted=: ;;
3583 ,set)
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3585$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3586 ac_cache_corrupted=: ;;
3587 ,);;
3588 *)
3589 if test "x$ac_old_val" != "x$ac_new_val"; then
3590 # differences in whitespace do not lead to failure.
3591 ac_old_val_w=`echo x $ac_old_val`
3592 ac_new_val_w=`echo x $ac_new_val`
3593 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3595$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3596 ac_cache_corrupted=:
3597 else
3598 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3599$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3600 eval $ac_var=\$ac_old_val
3601 fi
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3603$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3604 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3605$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3606 fi;;
3607 esac
3608 # Pass precious variables to config.status.
3609 if test "$ac_new_set" = set; then
3610 case $ac_new_val in
3611 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3612 *) ac_arg=$ac_var=$ac_new_val ;;
3613 esac
3614 case " $ac_configure_args " in
3615 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3616 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3617 esac
3618 fi
3619done
3620if $ac_cache_corrupted; then
3621 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3622$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3624$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 3625 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
c971b7fa
PA
3626fi
3627## -------------------- ##
3628## Main body of script. ##
3629## -------------------- ##
3630
3631ac_ext=c
3632ac_cpp='$CPP $CPPFLAGS'
3633ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3634ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3635ac_compiler_gnu=$ac_cv_c_compiler_gnu
3636
3637
d0ac1c44 3638
73cc7272
TT
3639
3640
3641
c971b7fa
PA
3642ac_config_headers="$ac_config_headers config.h:config.in"
3643
3644
5abebf3c
CB
3645
3646
c971b7fa
PA
3647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3648$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3649 # Check whether --enable-maintainer-mode was given.
3650if test "${enable_maintainer_mode+set}" = set; then :
3651 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3652else
3653 USE_MAINTAINER_MODE=no
3654fi
3655
3656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3657$as_echo "$USE_MAINTAINER_MODE" >&6; }
3658 if test $USE_MAINTAINER_MODE = yes; then
3659 MAINTAINER_MODE_TRUE=
3660 MAINTAINER_MODE_FALSE='#'
3661else
3662 MAINTAINER_MODE_TRUE='#'
3663 MAINTAINER_MODE_FALSE=
3664fi
3665
3666 MAINT=$MAINTAINER_MODE_TRUE
3667
3668
3669
3670ac_ext=c
3671ac_cpp='$CPP $CPPFLAGS'
3672ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3673ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3674ac_compiler_gnu=$ac_cv_c_compiler_gnu
3675if test -n "$ac_tool_prefix"; then
3676 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3677set dummy ${ac_tool_prefix}gcc; ac_word=$2
3678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3679$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3680if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3681 $as_echo_n "(cached) " >&6
3682else
3683 if test -n "$CC"; then
3684 ac_cv_prog_CC="$CC" # Let the user override the test.
3685else
3686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3687for as_dir in $PATH
3688do
3689 IFS=$as_save_IFS
3690 test -z "$as_dir" && as_dir=.
3691 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3693 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3695 break 2
3696 fi
3697done
3698 done
3699IFS=$as_save_IFS
3700
3701fi
3702fi
3703CC=$ac_cv_prog_CC
3704if test -n "$CC"; then
3705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3706$as_echo "$CC" >&6; }
3707else
3708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3709$as_echo "no" >&6; }
3710fi
3711
3712
3713fi
3714if test -z "$ac_cv_prog_CC"; then
3715 ac_ct_CC=$CC
3716 # Extract the first word of "gcc", so it can be a program name with args.
3717set dummy gcc; ac_word=$2
3718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3719$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3720if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
3721 $as_echo_n "(cached) " >&6
3722else
3723 if test -n "$ac_ct_CC"; then
3724 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3725else
3726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3727for as_dir in $PATH
3728do
3729 IFS=$as_save_IFS
3730 test -z "$as_dir" && as_dir=.
3731 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3733 ac_cv_prog_ac_ct_CC="gcc"
3734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3735 break 2
3736 fi
3737done
3738 done
3739IFS=$as_save_IFS
3740
3741fi
3742fi
3743ac_ct_CC=$ac_cv_prog_ac_ct_CC
3744if test -n "$ac_ct_CC"; then
3745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3746$as_echo "$ac_ct_CC" >&6; }
3747else
3748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3749$as_echo "no" >&6; }
3750fi
3751
3752 if test "x$ac_ct_CC" = x; then
3753 CC=""
3754 else
3755 case $cross_compiling:$ac_tool_warned in
3756yes:)
3757{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3758$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3759ac_tool_warned=yes ;;
3760esac
3761 CC=$ac_ct_CC
3762 fi
3763else
3764 CC="$ac_cv_prog_CC"
3765fi
3766
3767if test -z "$CC"; then
3768 if test -n "$ac_tool_prefix"; then
3769 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3770set dummy ${ac_tool_prefix}cc; ac_word=$2
3771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3772$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3773if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3774 $as_echo_n "(cached) " >&6
3775else
3776 if test -n "$CC"; then
3777 ac_cv_prog_CC="$CC" # Let the user override the test.
3778else
3779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3780for as_dir in $PATH
3781do
3782 IFS=$as_save_IFS
3783 test -z "$as_dir" && as_dir=.
3784 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3786 ac_cv_prog_CC="${ac_tool_prefix}cc"
3787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3788 break 2
3789 fi
3790done
3791 done
3792IFS=$as_save_IFS
3793
3794fi
3795fi
3796CC=$ac_cv_prog_CC
3797if test -n "$CC"; then
3798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3799$as_echo "$CC" >&6; }
3800else
3801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3802$as_echo "no" >&6; }
3803fi
3804
3805
3806 fi
3807fi
3808if test -z "$CC"; then
3809 # Extract the first word of "cc", so it can be a program name with args.
3810set dummy cc; ac_word=$2
3811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3812$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3813if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3814 $as_echo_n "(cached) " >&6
3815else
3816 if test -n "$CC"; then
3817 ac_cv_prog_CC="$CC" # Let the user override the test.
3818else
3819 ac_prog_rejected=no
3820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3821for as_dir in $PATH
3822do
3823 IFS=$as_save_IFS
3824 test -z "$as_dir" && as_dir=.
3825 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3827 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3828 ac_prog_rejected=yes
3829 continue
3830 fi
3831 ac_cv_prog_CC="cc"
3832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3833 break 2
3834 fi
3835done
3836 done
3837IFS=$as_save_IFS
3838
3839if test $ac_prog_rejected = yes; then
3840 # We found a bogon in the path, so make sure we never use it.
3841 set dummy $ac_cv_prog_CC
3842 shift
3843 if test $# != 0; then
3844 # We chose a different compiler from the bogus one.
3845 # However, it has the same basename, so the bogon will be chosen
3846 # first if we set CC to just the basename; use the full file name.
3847 shift
3848 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3849 fi
3850fi
3851fi
3852fi
3853CC=$ac_cv_prog_CC
3854if test -n "$CC"; then
3855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3856$as_echo "$CC" >&6; }
3857else
3858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3859$as_echo "no" >&6; }
3860fi
3861
3862
3863fi
3864if test -z "$CC"; then
3865 if test -n "$ac_tool_prefix"; then
3866 for ac_prog in cl.exe
3867 do
3868 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3869set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3871$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3872if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3873 $as_echo_n "(cached) " >&6
3874else
3875 if test -n "$CC"; then
3876 ac_cv_prog_CC="$CC" # Let the user override the test.
3877else
3878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3879for as_dir in $PATH
3880do
3881 IFS=$as_save_IFS
3882 test -z "$as_dir" && as_dir=.
3883 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3885 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3887 break 2
3888 fi
3889done
3890 done
3891IFS=$as_save_IFS
3892
3893fi
3894fi
3895CC=$ac_cv_prog_CC
3896if test -n "$CC"; then
3897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3898$as_echo "$CC" >&6; }
3899else
3900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3901$as_echo "no" >&6; }
3902fi
3903
3904
3905 test -n "$CC" && break
3906 done
3907fi
3908if test -z "$CC"; then
3909 ac_ct_CC=$CC
3910 for ac_prog in cl.exe
3911do
3912 # Extract the first word of "$ac_prog", so it can be a program name with args.
3913set dummy $ac_prog; ac_word=$2
3914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3915$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3916if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
3917 $as_echo_n "(cached) " >&6
3918else
3919 if test -n "$ac_ct_CC"; then
3920 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3921else
3922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3923for as_dir in $PATH
3924do
3925 IFS=$as_save_IFS
3926 test -z "$as_dir" && as_dir=.
3927 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3929 ac_cv_prog_ac_ct_CC="$ac_prog"
3930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3931 break 2
3932 fi
3933done
3934 done
3935IFS=$as_save_IFS
3936
3937fi
3938fi
3939ac_ct_CC=$ac_cv_prog_ac_ct_CC
3940if test -n "$ac_ct_CC"; then
3941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3942$as_echo "$ac_ct_CC" >&6; }
3943else
3944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3945$as_echo "no" >&6; }
3946fi
3947
3948
3949 test -n "$ac_ct_CC" && break
3950done
3951
3952 if test "x$ac_ct_CC" = x; then
3953 CC=""
3954 else
3955 case $cross_compiling:$ac_tool_warned in
3956yes:)
3957{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3958$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3959ac_tool_warned=yes ;;
3960esac
3961 CC=$ac_ct_CC
3962 fi
3963fi
3964
3965fi
3966
3967
3968test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3970as_fn_error $? "no acceptable C compiler found in \$PATH
3971See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
3972
3973# Provide some information about the compiler.
3974$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3975set X $ac_compile
3976ac_compiler=$2
5e8754f9 3977for ac_option in --version -v -V -qversion; do
c971b7fa
PA
3978 { { ac_try="$ac_compiler $ac_option >&5"
3979case "(($ac_try" in
3980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3981 *) ac_try_echo=$ac_try;;
3982esac
3983eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3984$as_echo "$ac_try_echo"; } >&5
3985 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3986 ac_status=$?
3987 if test -s conftest.err; then
3988 sed '10a\
3989... rest of stderr output deleted ...
3990 10q' conftest.err >conftest.er1
3991 cat conftest.er1 >&5
c971b7fa 3992 fi
d0ac1c44 3993 rm -f conftest.er1 conftest.err
c971b7fa
PA
3994 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3995 test $ac_status = 0; }
3996done
3997
3998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3999/* end confdefs.h. */
d0ac1c44 4000
c971b7fa
PA
4001int
4002main ()
4003{
c971b7fa
PA
4004
4005 ;
4006 return 0;
4007}
4008_ACEOF
4009ac_clean_files_save=$ac_clean_files
d0ac1c44 4010ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
c971b7fa
PA
4011# Try to create an executable without -o first, disregard a.out.
4012# It will help us diagnose broken compilers, and finding out an intuition
4013# of exeext.
d0ac1c44
SM
4014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4015$as_echo_n "checking whether the C compiler works... " >&6; }
c971b7fa
PA
4016ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4017
4018# The possible output files:
4019ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4020
4021ac_rmfiles=
4022for ac_file in $ac_files
4023do
4024 case $ac_file in
4025 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4026 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4027 esac
4028done
4029rm -f $ac_rmfiles
4030
4031if { { ac_try="$ac_link_default"
4032case "(($ac_try" in
4033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4034 *) ac_try_echo=$ac_try;;
4035esac
4036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4037$as_echo "$ac_try_echo"; } >&5
4038 (eval "$ac_link_default") 2>&5
4039 ac_status=$?
4040 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4041 test $ac_status = 0; }; then :
4042 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4043# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4044# in a Makefile. We should not override ac_cv_exeext if it was cached,
4045# so that the user can short-circuit this test for compilers unknown to
4046# Autoconf.
4047for ac_file in $ac_files ''
4048do
4049 test -f "$ac_file" || continue
4050 case $ac_file in
4051 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4052 ;;
4053 [ab].out )
4054 # We found the default executable, but exeext='' is most
4055 # certainly right.
4056 break;;
4057 *.* )
4058 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4059 then :; else
4060 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4061 fi
4062 # We set ac_cv_exeext here because the later test for it is not
4063 # safe: cross compilers may not add the suffix if given an `-o'
4064 # argument, so we may need to know it at that point already.
4065 # Even if this section looks crufty: it has the advantage of
4066 # actually working.
4067 break;;
4068 * )
4069 break;;
4070 esac
4071done
4072test "$ac_cv_exeext" = no && ac_cv_exeext=
4073
4074else
4075 ac_file=''
4076fi
c971b7fa 4077if test -z "$ac_file"; then :
d0ac1c44
SM
4078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4079$as_echo "no" >&6; }
4080$as_echo "$as_me: failed program was:" >&5
c971b7fa
PA
4081sed 's/^/| /' conftest.$ac_ext >&5
4082
4083{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4085as_fn_error 77 "C compiler cannot create executables
4086See \`config.log' for more details" "$LINENO" 5; }
4087else
4088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4089$as_echo "yes" >&6; }
c971b7fa 4090fi
d0ac1c44
SM
4091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4092$as_echo_n "checking for C compiler default output file name... " >&6; }
4093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4094$as_echo "$ac_file" >&6; }
c971b7fa
PA
4095ac_exeext=$ac_cv_exeext
4096
d0ac1c44 4097rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
c971b7fa 4098ac_clean_files=$ac_clean_files_save
c971b7fa
PA
4099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4100$as_echo_n "checking for suffix of executables... " >&6; }
4101if { { ac_try="$ac_link"
4102case "(($ac_try" in
4103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4104 *) ac_try_echo=$ac_try;;
4105esac
4106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4107$as_echo "$ac_try_echo"; } >&5
4108 (eval "$ac_link") 2>&5
4109 ac_status=$?
4110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4111 test $ac_status = 0; }; then :
4112 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4113# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4114# work properly (i.e., refer to `conftest.exe'), while it won't with
4115# `rm'.
4116for ac_file in conftest.exe conftest conftest.*; do
4117 test -f "$ac_file" || continue
4118 case $ac_file in
4119 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4120 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4121 break;;
4122 * ) break;;
4123 esac
4124done
4125else
4126 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4128as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4129See \`config.log' for more details" "$LINENO" 5; }
c971b7fa 4130fi
d0ac1c44 4131rm -f conftest conftest$ac_cv_exeext
c971b7fa
PA
4132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4133$as_echo "$ac_cv_exeext" >&6; }
4134
4135rm -f conftest.$ac_ext
4136EXEEXT=$ac_cv_exeext
4137ac_exeext=$EXEEXT
d0ac1c44
SM
4138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4139/* end confdefs.h. */
4140#include <stdio.h>
4141int
4142main ()
4143{
4144FILE *f = fopen ("conftest.out", "w");
4145 return ferror (f) || fclose (f) != 0;
4146
4147 ;
4148 return 0;
4149}
4150_ACEOF
4151ac_clean_files="$ac_clean_files conftest.out"
4152# Check that the compiler produces executables we can run. If not, either
4153# the compiler is broken, or we cross compile.
4154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4155$as_echo_n "checking whether we are cross compiling... " >&6; }
4156if test "$cross_compiling" != yes; then
4157 { { ac_try="$ac_link"
4158case "(($ac_try" in
4159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4160 *) ac_try_echo=$ac_try;;
4161esac
4162eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4163$as_echo "$ac_try_echo"; } >&5
4164 (eval "$ac_link") 2>&5
4165 ac_status=$?
4166 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4167 test $ac_status = 0; }
4168 if { ac_try='./conftest$ac_cv_exeext'
4169 { { case "(($ac_try" in
4170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4171 *) ac_try_echo=$ac_try;;
4172esac
4173eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4174$as_echo "$ac_try_echo"; } >&5
4175 (eval "$ac_try") 2>&5
4176 ac_status=$?
4177 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4178 test $ac_status = 0; }; }; then
4179 cross_compiling=no
4180 else
4181 if test "$cross_compiling" = maybe; then
4182 cross_compiling=yes
4183 else
4184 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4186as_fn_error $? "cannot run C compiled programs.
4187If you meant to cross compile, use \`--host'.
4188See \`config.log' for more details" "$LINENO" 5; }
4189 fi
4190 fi
4191fi
4192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4193$as_echo "$cross_compiling" >&6; }
4194
4195rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4196ac_clean_files=$ac_clean_files_save
c971b7fa
PA
4197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4198$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 4199if ${ac_cv_objext+:} false; then :
c971b7fa
PA
4200 $as_echo_n "(cached) " >&6
4201else
4202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4203/* end confdefs.h. */
4204
4205int
4206main ()
4207{
4208
4209 ;
4210 return 0;
4211}
4212_ACEOF
4213rm -f conftest.o conftest.obj
4214if { { ac_try="$ac_compile"
4215case "(($ac_try" in
4216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4217 *) ac_try_echo=$ac_try;;
4218esac
4219eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4220$as_echo "$ac_try_echo"; } >&5
4221 (eval "$ac_compile") 2>&5
4222 ac_status=$?
4223 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4224 test $ac_status = 0; }; then :
4225 for ac_file in conftest.o conftest.obj conftest.*; do
4226 test -f "$ac_file" || continue;
4227 case $ac_file in
4228 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4229 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4230 break;;
4231 esac
4232done
4233else
4234 $as_echo "$as_me: failed program was:" >&5
4235sed 's/^/| /' conftest.$ac_ext >&5
4236
4237{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4239as_fn_error $? "cannot compute suffix of object files: cannot compile
4240See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
4241fi
4242rm -f conftest.$ac_cv_objext conftest.$ac_ext
4243fi
4244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4245$as_echo "$ac_cv_objext" >&6; }
4246OBJEXT=$ac_cv_objext
4247ac_objext=$OBJEXT
4248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4249$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 4250if ${ac_cv_c_compiler_gnu+:} false; then :
c971b7fa
PA
4251 $as_echo_n "(cached) " >&6
4252else
4253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4254/* end confdefs.h. */
4255
4256int
4257main ()
4258{
4259#ifndef __GNUC__
4260 choke me
4261#endif
4262
4263 ;
4264 return 0;
4265}
4266_ACEOF
4267if ac_fn_c_try_compile "$LINENO"; then :
4268 ac_compiler_gnu=yes
4269else
4270 ac_compiler_gnu=no
4271fi
4272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4273ac_cv_c_compiler_gnu=$ac_compiler_gnu
4274
4275fi
4276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4277$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4278if test $ac_compiler_gnu = yes; then
4279 GCC=yes
4280else
4281 GCC=
4282fi
4283ac_test_CFLAGS=${CFLAGS+set}
4284ac_save_CFLAGS=$CFLAGS
4285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4286$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 4287if ${ac_cv_prog_cc_g+:} false; then :
c971b7fa
PA
4288 $as_echo_n "(cached) " >&6
4289else
4290 ac_save_c_werror_flag=$ac_c_werror_flag
4291 ac_c_werror_flag=yes
4292 ac_cv_prog_cc_g=no
4293 CFLAGS="-g"
4294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4295/* end confdefs.h. */
4296
4297int
4298main ()
4299{
4300
4301 ;
4302 return 0;
4303}
4304_ACEOF
4305if ac_fn_c_try_compile "$LINENO"; then :
4306 ac_cv_prog_cc_g=yes
4307else
4308 CFLAGS=""
4309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4310/* end confdefs.h. */
4311
4312int
4313main ()
4314{
4315
4316 ;
4317 return 0;
4318}
4319_ACEOF
4320if ac_fn_c_try_compile "$LINENO"; then :
4321
4322else
4323 ac_c_werror_flag=$ac_save_c_werror_flag
4324 CFLAGS="-g"
4325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4326/* end confdefs.h. */
4327
4328int
4329main ()
4330{
4331
4332 ;
4333 return 0;
4334}
4335_ACEOF
4336if ac_fn_c_try_compile "$LINENO"; then :
4337 ac_cv_prog_cc_g=yes
4338fi
4339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4340fi
4341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4342fi
4343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4344 ac_c_werror_flag=$ac_save_c_werror_flag
4345fi
4346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4347$as_echo "$ac_cv_prog_cc_g" >&6; }
4348if test "$ac_test_CFLAGS" = set; then
4349 CFLAGS=$ac_save_CFLAGS
4350elif test $ac_cv_prog_cc_g = yes; then
4351 if test "$GCC" = yes; then
4352 CFLAGS="-g -O2"
4353 else
4354 CFLAGS="-g"
4355 fi
4356else
4357 if test "$GCC" = yes; then
4358 CFLAGS="-O2"
4359 else
4360 CFLAGS=
4361 fi
4362fi
5e8754f9
SDJ
4363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4364$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4365if ${ac_cv_prog_cc_c89+:} false; then :
c971b7fa
PA
4366 $as_echo_n "(cached) " >&6
4367else
5e8754f9 4368 ac_cv_prog_cc_c89=no
c971b7fa
PA
4369ac_save_CC=$CC
4370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4371/* end confdefs.h. */
4372#include <stdarg.h>
4373#include <stdio.h>
5e8754f9
SDJ
4374struct stat;
4375/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4376struct buf { int x; };
4377FILE * (*rcsopen) (struct buf *, struct stat *, int);
4378static char *e (p, i)
4379 char **p;
4380 int i;
7a6dbc2f 4381{
5e8754f9 4382 return p[i];
c971b7fa 4383}
5e8754f9 4384static char *f (char * (*g) (char **, int), char **p, ...)
7a6dbc2f 4385{
5e8754f9
SDJ
4386 char *s;
4387 va_list v;
4388 va_start (v,p);
4389 s = g (p, va_arg (v,int));
4390 va_end (v);
4391 return s;
7a6dbc2f 4392}
7a6dbc2f 4393
5e8754f9
SDJ
4394/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4395 function prototypes and stuff, but not '\xHH' hex character constants.
4396 These don't provoke an error unfortunately, instead are silently treated
4397 as 'x'. The following induces an error, until -std is added to get
4398 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4399 array size at least. It's necessary to write '\x00'==0 to get something
4400 that's true only with -std. */
4401int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7a6dbc2f 4402
5e8754f9
SDJ
4403/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4404 inside strings and character constants. */
4405#define FOO(x) 'x'
4406int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
c971b7fa 4407
5e8754f9
SDJ
4408int test (int i, double x);
4409struct s1 {int (*f) (int a);};
4410struct s2 {int (*f) (double a);};
4411int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4412int argc;
4413char **argv;
c971b7fa
PA
4414int
4415main ()
4416{
5e8754f9 4417return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
c971b7fa
PA
4418 ;
4419 return 0;
4420}
4421_ACEOF
5e8754f9
SDJ
4422for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4423 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c971b7fa
PA
4424do
4425 CC="$ac_save_CC $ac_arg"
4426 if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 4427 ac_cv_prog_cc_c89=$ac_arg
c971b7fa
PA
4428fi
4429rm -f core conftest.err conftest.$ac_objext
5e8754f9 4430 test "x$ac_cv_prog_cc_c89" != "xno" && break
c971b7fa
PA
4431done
4432rm -f conftest.$ac_ext
4433CC=$ac_save_CC
4434
4435fi
4436# AC_CACHE_VAL
5e8754f9 4437case "x$ac_cv_prog_cc_c89" in
c971b7fa
PA
4438 x)
4439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4440$as_echo "none needed" >&6; } ;;
4441 xno)
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4443$as_echo "unsupported" >&6; } ;;
4444 *)
5e8754f9
SDJ
4445 CC="$CC $ac_cv_prog_cc_c89"
4446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4447$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c971b7fa 4448esac
5e8754f9 4449if test "x$ac_cv_prog_cc_c89" != xno; then :
7a6dbc2f 4450
5e8754f9 4451fi
7a6dbc2f 4452
5e8754f9
SDJ
4453ac_ext=c
4454ac_cpp='$CPP $CPPFLAGS'
4455ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4456ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4457ac_compiler_gnu=$ac_cv_c_compiler_gnu
7a6dbc2f 4458
5e8754f9
SDJ
4459ac_aux_dir=
4460for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4461 if test -f "$ac_dir/install-sh"; then
4462 ac_aux_dir=$ac_dir
4463 ac_install_sh="$ac_aux_dir/install-sh -c"
4464 break
4465 elif test -f "$ac_dir/install.sh"; then
4466 ac_aux_dir=$ac_dir
4467 ac_install_sh="$ac_aux_dir/install.sh -c"
4468 break
4469 elif test -f "$ac_dir/shtool"; then
4470 ac_aux_dir=$ac_dir
4471 ac_install_sh="$ac_aux_dir/shtool install -c"
4472 break
4473 fi
4474done
4475if test -z "$ac_aux_dir"; then
4476 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4477fi
7a6dbc2f 4478
5e8754f9
SDJ
4479# These three variables are undocumented and unsupported,
4480# and are intended to be withdrawn in a future Autoconf release.
4481# They can cause serious problems if a builder's source tree is in a directory
4482# whose full name contains unusual characters.
4483ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4484ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4485ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
7a6dbc2f 4486
7a6dbc2f 4487
5e8754f9
SDJ
4488# Expand $ac_aux_dir to an absolute path.
4489am_aux_dir=`cd "$ac_aux_dir" && pwd`
7a6dbc2f 4490
5e8754f9
SDJ
4491ac_ext=c
4492ac_cpp='$CPP $CPPFLAGS'
4493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4495ac_compiler_gnu=$ac_cv_c_compiler_gnu
4496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4497$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4498if ${am_cv_prog_cc_c_o+:} false; then :
d0ac1c44
SM
4499 $as_echo_n "(cached) " >&6
4500else
5e8754f9 4501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d0ac1c44
SM
4502/* end confdefs.h. */
4503
4504int
4505main ()
4506{
5e8754f9 4507
d0ac1c44
SM
4508 ;
4509 return 0;
4510}
4511_ACEOF
5e8754f9
SDJ
4512 # Make sure it works both with $CC and with simple cc.
4513 # Following AC_PROG_CC_C_O, we do the test twice because some
4514 # compilers refuse to overwrite an existing .o file with -o,
4515 # though they will create one.
4516 am_cv_prog_cc_c_o=yes
4517 for am_i in 1 2; do
4518 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4519 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4520 ac_status=$?
4521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4522 (exit $ac_status); } \
4523 && test -f conftest2.$ac_objext; then
4524 : OK
4525 else
4526 am_cv_prog_cc_c_o=no
4527 break
4528 fi
4529 done
4530 rm -f core conftest*
4531 unset am_i
4532fi
4533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4534$as_echo "$am_cv_prog_cc_c_o" >&6; }
4535if test "$am_cv_prog_cc_c_o" != yes; then
4536 # Losing compiler, so override with the script.
4537 # FIXME: It is wrong to rewrite CC.
4538 # But if we don't then we get into trouble of one sort or another.
4539 # A longer-term fix would be to have automake use am__CC in this case,
4540 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4541 CC="$am_aux_dir/compile $CC"
7a6dbc2f 4542fi
d0ac1c44
SM
4543ac_ext=c
4544ac_cpp='$CPP $CPPFLAGS'
4545ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4546ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4547ac_compiler_gnu=$ac_cv_c_compiler_gnu
4548
4549
5e8754f9 4550
c971b7fa
PA
4551ac_ext=c
4552ac_cpp='$CPP $CPPFLAGS'
4553ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4554ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4555ac_compiler_gnu=$ac_cv_c_compiler_gnu
4556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4557$as_echo_n "checking how to run the C preprocessor... " >&6; }
4558# On Suns, sometimes $CPP names a directory.
4559if test -n "$CPP" && test -d "$CPP"; then
4560 CPP=
4561fi
4562if test -z "$CPP"; then
d0ac1c44 4563 if ${ac_cv_prog_CPP+:} false; then :
c971b7fa
PA
4564 $as_echo_n "(cached) " >&6
4565else
4566 # Double quotes because CPP needs to be expanded
4567 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4568 do
4569 ac_preproc_ok=false
4570for ac_c_preproc_warn_flag in '' yes
4571do
4572 # Use a header file that comes with gcc, so configuring glibc
4573 # with a fresh cross-compiler works.
4574 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4575 # <limits.h> exists even on freestanding compilers.
4576 # On the NeXT, cc -E runs the code through the compiler's parser,
4577 # not just through cpp. "Syntax error" is here to catch this case.
4578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4579/* end confdefs.h. */
4580#ifdef __STDC__
4581# include <limits.h>
4582#else
4583# include <assert.h>
4584#endif
4585 Syntax error
4586_ACEOF
4587if ac_fn_c_try_cpp "$LINENO"; then :
4588
4589else
4590 # Broken: fails on valid input.
4591continue
4592fi
d0ac1c44 4593rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4594
4595 # OK, works on sane cases. Now check whether nonexistent headers
4596 # can be detected and how.
4597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4598/* end confdefs.h. */
4599#include <ac_nonexistent.h>
4600_ACEOF
4601if ac_fn_c_try_cpp "$LINENO"; then :
4602 # Broken: success on invalid input.
4603continue
4604else
4605 # Passes both tests.
4606ac_preproc_ok=:
4607break
4608fi
d0ac1c44 4609rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4610
4611done
4612# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4613rm -f conftest.i conftest.err conftest.$ac_ext
c971b7fa
PA
4614if $ac_preproc_ok; then :
4615 break
4616fi
4617
4618 done
4619 ac_cv_prog_CPP=$CPP
4620
4621fi
4622 CPP=$ac_cv_prog_CPP
4623else
4624 ac_cv_prog_CPP=$CPP
4625fi
4626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4627$as_echo "$CPP" >&6; }
4628ac_preproc_ok=false
4629for ac_c_preproc_warn_flag in '' yes
4630do
4631 # Use a header file that comes with gcc, so configuring glibc
4632 # with a fresh cross-compiler works.
4633 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4634 # <limits.h> exists even on freestanding compilers.
4635 # On the NeXT, cc -E runs the code through the compiler's parser,
4636 # not just through cpp. "Syntax error" is here to catch this case.
4637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4638/* end confdefs.h. */
4639#ifdef __STDC__
4640# include <limits.h>
4641#else
4642# include <assert.h>
4643#endif
4644 Syntax error
4645_ACEOF
4646if ac_fn_c_try_cpp "$LINENO"; then :
4647
4648else
4649 # Broken: fails on valid input.
4650continue
4651fi
d0ac1c44 4652rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4653
4654 # OK, works on sane cases. Now check whether nonexistent headers
4655 # can be detected and how.
4656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4657/* end confdefs.h. */
4658#include <ac_nonexistent.h>
4659_ACEOF
4660if ac_fn_c_try_cpp "$LINENO"; then :
4661 # Broken: success on invalid input.
4662continue
4663else
4664 # Passes both tests.
4665ac_preproc_ok=:
4666break
4667fi
d0ac1c44 4668rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4669
4670done
4671# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4672rm -f conftest.i conftest.err conftest.$ac_ext
c971b7fa
PA
4673if $ac_preproc_ok; then :
4674
4675else
4676 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4678as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4679See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
4680fi
4681
4682ac_ext=c
4683ac_cpp='$CPP $CPPFLAGS'
4684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4686ac_compiler_gnu=$ac_cv_c_compiler_gnu
4687
4688
4689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4690$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4691if ${ac_cv_path_GREP+:} false; then :
c971b7fa
PA
4692 $as_echo_n "(cached) " >&6
4693else
4694 if test -z "$GREP"; then
4695 ac_path_GREP_found=false
4696 # Loop through the user's path and test for each of PROGNAME-LIST
4697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4698for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4699do
4700 IFS=$as_save_IFS
4701 test -z "$as_dir" && as_dir=.
4702 for ac_prog in grep ggrep; do
4703 for ac_exec_ext in '' $ac_executable_extensions; do
4704 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4705 as_fn_executable_p "$ac_path_GREP" || continue
c971b7fa
PA
4706# Check for GNU ac_path_GREP and select it if it is found.
4707 # Check for GNU $ac_path_GREP
4708case `"$ac_path_GREP" --version 2>&1` in
4709*GNU*)
4710 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4711*)
4712 ac_count=0
4713 $as_echo_n 0123456789 >"conftest.in"
4714 while :
4715 do
4716 cat "conftest.in" "conftest.in" >"conftest.tmp"
4717 mv "conftest.tmp" "conftest.in"
4718 cp "conftest.in" "conftest.nl"
4719 $as_echo 'GREP' >> "conftest.nl"
4720 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4721 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4722 as_fn_arith $ac_count + 1 && ac_count=$as_val
4723 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4724 # Best one so far, save it but keep looking for a better one
4725 ac_cv_path_GREP="$ac_path_GREP"
4726 ac_path_GREP_max=$ac_count
4727 fi
4728 # 10*(2^10) chars as input seems more than enough
4729 test $ac_count -gt 10 && break
4730 done
4731 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4732esac
4733
4734 $ac_path_GREP_found && break 3
4735 done
4736 done
4737 done
4738IFS=$as_save_IFS
4739 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4740 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
c971b7fa
PA
4741 fi
4742else
4743 ac_cv_path_GREP=$GREP
4744fi
4745
4746fi
4747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4748$as_echo "$ac_cv_path_GREP" >&6; }
4749 GREP="$ac_cv_path_GREP"
4750
4751
4752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4753$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4754if ${ac_cv_path_EGREP+:} false; then :
c971b7fa
PA
4755 $as_echo_n "(cached) " >&6
4756else
4757 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4758 then ac_cv_path_EGREP="$GREP -E"
4759 else
4760 if test -z "$EGREP"; then
4761 ac_path_EGREP_found=false
4762 # Loop through the user's path and test for each of PROGNAME-LIST
4763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4764for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4765do
4766 IFS=$as_save_IFS
4767 test -z "$as_dir" && as_dir=.
4768 for ac_prog in egrep; do
4769 for ac_exec_ext in '' $ac_executable_extensions; do
4770 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4771 as_fn_executable_p "$ac_path_EGREP" || continue
c971b7fa
PA
4772# Check for GNU ac_path_EGREP and select it if it is found.
4773 # Check for GNU $ac_path_EGREP
4774case `"$ac_path_EGREP" --version 2>&1` in
4775*GNU*)
4776 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4777*)
4778 ac_count=0
4779 $as_echo_n 0123456789 >"conftest.in"
4780 while :
4781 do
4782 cat "conftest.in" "conftest.in" >"conftest.tmp"
4783 mv "conftest.tmp" "conftest.in"
4784 cp "conftest.in" "conftest.nl"
4785 $as_echo 'EGREP' >> "conftest.nl"
4786 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4787 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4788 as_fn_arith $ac_count + 1 && ac_count=$as_val
4789 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4790 # Best one so far, save it but keep looking for a better one
4791 ac_cv_path_EGREP="$ac_path_EGREP"
4792 ac_path_EGREP_max=$ac_count
4793 fi
4794 # 10*(2^10) chars as input seems more than enough
4795 test $ac_count -gt 10 && break
4796 done
4797 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4798esac
4799
4800 $ac_path_EGREP_found && break 3
4801 done
4802 done
4803 done
4804IFS=$as_save_IFS
4805 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4806 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
c971b7fa
PA
4807 fi
4808else
4809 ac_cv_path_EGREP=$EGREP
4810fi
4811
4812 fi
4813fi
4814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4815$as_echo "$ac_cv_path_EGREP" >&6; }
4816 EGREP="$ac_cv_path_EGREP"
4817
4818
4819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4820$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4821if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
4822 $as_echo_n "(cached) " >&6
4823else
4824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4825/* end confdefs.h. */
4826#include <stdlib.h>
4827#include <stdarg.h>
4828#include <string.h>
4829#include <float.h>
4830
4831int
4832main ()
4833{
4834
4835 ;
4836 return 0;
4837}
4838_ACEOF
4839if ac_fn_c_try_compile "$LINENO"; then :
4840 ac_cv_header_stdc=yes
4841else
4842 ac_cv_header_stdc=no
4843fi
4844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4845
4846if test $ac_cv_header_stdc = yes; then
4847 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4849/* end confdefs.h. */
4850#include <string.h>
4851
4852_ACEOF
4853if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4854 $EGREP "memchr" >/dev/null 2>&1; then :
4855
4856else
4857 ac_cv_header_stdc=no
4858fi
4859rm -f conftest*
4860
4861fi
4862
4863if test $ac_cv_header_stdc = yes; then
4864 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4866/* end confdefs.h. */
4867#include <stdlib.h>
4868
4869_ACEOF
4870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4871 $EGREP "free" >/dev/null 2>&1; then :
4872
4873else
4874 ac_cv_header_stdc=no
4875fi
4876rm -f conftest*
4877
4878fi
4879
4880if test $ac_cv_header_stdc = yes; then
4881 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4882 if test "$cross_compiling" = yes; then :
4883 :
4884else
4885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4886/* end confdefs.h. */
4887#include <ctype.h>
4888#include <stdlib.h>
4889#if ((' ' & 0x0FF) == 0x020)
4890# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4891# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4892#else
4893# define ISLOWER(c) \
4894 (('a' <= (c) && (c) <= 'i') \
4895 || ('j' <= (c) && (c) <= 'r') \
4896 || ('s' <= (c) && (c) <= 'z'))
4897# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4898#endif
4899
4900#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4901int
4902main ()
4903{
4904 int i;
4905 for (i = 0; i < 256; i++)
4906 if (XOR (islower (i), ISLOWER (i))
4907 || toupper (i) != TOUPPER (i))
4908 return 2;
4909 return 0;
4910}
4911_ACEOF
4912if ac_fn_c_try_run "$LINENO"; then :
4913
4914else
4915 ac_cv_header_stdc=no
4916fi
4917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4918 conftest.$ac_objext conftest.beam conftest.$ac_ext
4919fi
4920
4921fi
4922fi
4923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4924$as_echo "$ac_cv_header_stdc" >&6; }
4925if test $ac_cv_header_stdc = yes; then
4926
4927$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4928
4929fi
4930
4931# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4932for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4933 inttypes.h stdint.h unistd.h
4934do :
4935 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4936ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4937"
d0ac1c44 4938if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c971b7fa
PA
4939 cat >>confdefs.h <<_ACEOF
4940#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4941_ACEOF
4942
4943fi
4944
4945done
4946
4947
4948
c971b7fa 4949 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4950if test "x$ac_cv_header_minix_config_h" = xyes; then :
c971b7fa
PA
4951 MINIX=yes
4952else
4953 MINIX=
4954fi
4955
4956
4957 if test "$MINIX" = yes; then
4958
4959$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4960
4961
4962$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4963
4964
4965$as_echo "#define _MINIX 1" >>confdefs.h
4966
c971b7fa 4967
4a626d0a 4968$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
c971b7fa 4969
4a626d0a 4970 fi
c971b7fa
PA
4971
4972
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4974$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4975if ${ac_cv_safe_to_define___extensions__+:} false; then :
c971b7fa
PA
4976 $as_echo_n "(cached) " >&6
4977else
4978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4979/* end confdefs.h. */
4980
4981# define __EXTENSIONS__ 1
4982 $ac_includes_default
4983int
4984main ()
4985{
4986
4987 ;
4988 return 0;
4989}
4990_ACEOF
4991if ac_fn_c_try_compile "$LINENO"; then :
4992 ac_cv_safe_to_define___extensions__=yes
4993else
4994 ac_cv_safe_to_define___extensions__=no
4995fi
4996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4997fi
4998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4999$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5000 test $ac_cv_safe_to_define___extensions__ = yes &&
5001 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5002
5003 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5004
5005 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5006
5007 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5008
5009 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5010
49e4877c
PA
5011 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5012
5013 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5014
5015 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5016
5017 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5018
5019 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5020
5021 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5022
5023 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5024
c971b7fa
PA
5025 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5026
4a626d0a
PA
5027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5028$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
d0ac1c44 5029if ${ac_cv_should_define__xopen_source+:} false; then :
4a626d0a
PA
5030 $as_echo_n "(cached) " >&6
5031else
5032 ac_cv_should_define__xopen_source=no
5033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5034/* end confdefs.h. */
5035
5036 #include <wchar.h>
5037 mbstate_t x;
5038int
5039main ()
5040{
5041
5042 ;
5043 return 0;
5044}
5045_ACEOF
5046if ac_fn_c_try_compile "$LINENO"; then :
5047
5048else
5049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5050/* end confdefs.h. */
5051
5052 #define _XOPEN_SOURCE 500
5053 #include <wchar.h>
5054 mbstate_t x;
5055int
5056main ()
5057{
5058
5059 ;
5060 return 0;
5061}
5062_ACEOF
5063if ac_fn_c_try_compile "$LINENO"; then :
5064 ac_cv_should_define__xopen_source=yes
5065fi
d0ac1c44
SM
5066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5067fi
5068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5069fi
5070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5071$as_echo "$ac_cv_should_define__xopen_source" >&6; }
5072 test $ac_cv_should_define__xopen_source = yes &&
5073 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5086$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5087if ${gl_cv_c_amsterdam_compiler+:} false; then :
5088 $as_echo_n "(cached) " >&6
5089else
5090
5091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5092/* end confdefs.h. */
5093
5094#ifdef __ACK__
5095Amsterdam
5096#endif
5097
5098_ACEOF
5099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5100 $EGREP "Amsterdam" >/dev/null 2>&1; then :
5101 gl_cv_c_amsterdam_compiler=yes
5102else
5103 gl_cv_c_amsterdam_compiler=no
5104fi
5105rm -f conftest*
5106
5107
5108fi
5109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5110$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5111
5112 if test $gl_cv_c_amsterdam_compiler = yes; then
5113 if test -z "$AR"; then
5114 AR='cc -c.a'
5115 fi
5116 if test -z "$ARFLAGS"; then
5117 ARFLAGS='-o'
5118 fi
5119 else
5e8754f9
SDJ
5120 if test -n "$ac_tool_prefix"; then
5121 for ac_prog in ar lib "link -lib"
5122 do
5123 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5124set dummy $ac_tool_prefix$ac_prog; ac_word=$2
d0ac1c44
SM
5125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5126$as_echo_n "checking for $ac_word... " >&6; }
5127if ${ac_cv_prog_AR+:} false; then :
5128 $as_echo_n "(cached) " >&6
5129else
5130 if test -n "$AR"; then
5131 ac_cv_prog_AR="$AR" # Let the user override the test.
5132else
5133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134for as_dir in $PATH
5135do
5136 IFS=$as_save_IFS
5137 test -z "$as_dir" && as_dir=.
5138 for ac_exec_ext in '' $ac_executable_extensions; do
5139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5e8754f9 5140 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
d0ac1c44
SM
5141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5142 break 2
5143 fi
5144done
5145 done
5146IFS=$as_save_IFS
5147
5148fi
4a626d0a 5149fi
d0ac1c44
SM
5150AR=$ac_cv_prog_AR
5151if test -n "$AR"; then
5152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5153$as_echo "$AR" >&6; }
5154else
5155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5156$as_echo "no" >&6; }
4a626d0a 5157fi
c971b7fa 5158
49e4877c 5159
5e8754f9
SDJ
5160 test -n "$AR" && break
5161 done
d0ac1c44 5162fi
5e8754f9 5163if test -z "$AR"; then
d0ac1c44 5164 ac_ct_AR=$AR
5e8754f9
SDJ
5165 for ac_prog in ar lib "link -lib"
5166do
5167 # Extract the first word of "$ac_prog", so it can be a program name with args.
5168set dummy $ac_prog; ac_word=$2
d0ac1c44
SM
5169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5170$as_echo_n "checking for $ac_word... " >&6; }
5171if ${ac_cv_prog_ac_ct_AR+:} false; then :
5172 $as_echo_n "(cached) " >&6
5173else
5174 if test -n "$ac_ct_AR"; then
5175 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5176else
5177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5178for as_dir in $PATH
5179do
5180 IFS=$as_save_IFS
5181 test -z "$as_dir" && as_dir=.
5182 for ac_exec_ext in '' $ac_executable_extensions; do
5183 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5e8754f9 5184 ac_cv_prog_ac_ct_AR="$ac_prog"
d0ac1c44
SM
5185 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5186 break 2
5187 fi
5188done
5189 done
5190IFS=$as_save_IFS
49e4877c 5191
d0ac1c44
SM
5192fi
5193fi
5194ac_ct_AR=$ac_cv_prog_ac_ct_AR
5195if test -n "$ac_ct_AR"; then
5196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5197$as_echo "$ac_ct_AR" >&6; }
5198else
5199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5200$as_echo "no" >&6; }
5201fi
49e4877c 5202
5e8754f9
SDJ
5203
5204 test -n "$ac_ct_AR" && break
5205done
5206
d0ac1c44 5207 if test "x$ac_ct_AR" = x; then
5e8754f9 5208 AR="false"
d0ac1c44
SM
5209 else
5210 case $cross_compiling:$ac_tool_warned in
5211yes:)
5212{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5213$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5214ac_tool_warned=yes ;;
5215esac
5216 AR=$ac_ct_AR
5217 fi
d0ac1c44 5218fi
c971b7fa 5219
5e8754f9 5220: ${AR=ar}
c971b7fa 5221
5e8754f9
SDJ
5222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
5223$as_echo_n "checking the archiver ($AR) interface... " >&6; }
5224if ${am_cv_ar_interface+:} false; then :
c971b7fa
PA
5225 $as_echo_n "(cached) " >&6
5226else
5e8754f9
SDJ
5227 ac_ext=c
5228ac_cpp='$CPP $CPPFLAGS'
5229ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5230ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5231ac_compiler_gnu=$ac_cv_c_compiler_gnu
5232
5233 am_cv_ar_interface=ar
5234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5235/* end confdefs.h. */
5236int some_variable = 0;
5237_ACEOF
5238if ac_fn_c_try_compile "$LINENO"; then :
5239 am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
5240 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5241 (eval $am_ar_try) 2>&5
5242 ac_status=$?
5243 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5244 test $ac_status = 0; }
5245 if test "$ac_status" -eq 0; then
5246 am_cv_ar_interface=ar
5247 else
5248 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
5249 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5250 (eval $am_ar_try) 2>&5
5251 ac_status=$?
5252 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5253 test $ac_status = 0; }
5254 if test "$ac_status" -eq 0; then
5255 am_cv_ar_interface=lib
5256 else
5257 am_cv_ar_interface=unknown
5258 fi
5259 fi
5260 rm -f conftest.lib libconftest.a
5261
5262fi
5263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5264 ac_ext=c
5265ac_cpp='$CPP $CPPFLAGS'
5266ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5267ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5268ac_compiler_gnu=$ac_cv_c_compiler_gnu
5269
5270fi
5271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
5272$as_echo "$am_cv_ar_interface" >&6; }
5273
5274case $am_cv_ar_interface in
5275ar)
5276 ;;
5277lib)
5278 # Microsoft lib, so override with the ar-lib wrapper script.
5279 # FIXME: It is wrong to rewrite AR.
5280 # But if we don't then we get into trouble of one sort or another.
5281 # A longer-term fix would be to have automake use am__AR in this case,
5282 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
5283 # similar.
5284 AR="$am_aux_dir/ar-lib $AR"
5285 ;;
5286unknown)
5287 as_fn_error $? "could not determine $AR interface" "$LINENO" 5
5288 ;;
5289esac
5290
5291 fi
5292
5293 if test -n "$ac_tool_prefix"; then
5294 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5295set dummy ${ac_tool_prefix}ar; ac_word=$2
5296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5297$as_echo_n "checking for $ac_word... " >&6; }
5298if ${ac_cv_prog_AR+:} false; then :
5299 $as_echo_n "(cached) " >&6
5300else
5301 if test -n "$AR"; then
5302 ac_cv_prog_AR="$AR" # Let the user override the test.
5303else
5304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5305for as_dir in $PATH
5306do
5307 IFS=$as_save_IFS
5308 test -z "$as_dir" && as_dir=.
5309 for ac_exec_ext in '' $ac_executable_extensions; do
5310 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5311 ac_cv_prog_AR="${ac_tool_prefix}ar"
5312 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5313 break 2
5314 fi
5315done
5316 done
5317IFS=$as_save_IFS
5318
5319fi
5320fi
5321AR=$ac_cv_prog_AR
5322if test -n "$AR"; then
5323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5324$as_echo "$AR" >&6; }
5325else
5326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5327$as_echo "no" >&6; }
5328fi
5329
5330
5331fi
5332if test -z "$ac_cv_prog_AR"; then
5333 ac_ct_AR=$AR
5334 # Extract the first word of "ar", so it can be a program name with args.
5335set dummy ar; ac_word=$2
5336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5337$as_echo_n "checking for $ac_word... " >&6; }
5338if ${ac_cv_prog_ac_ct_AR+:} false; then :
5339 $as_echo_n "(cached) " >&6
5340else
5341 if test -n "$ac_ct_AR"; then
5342 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5343else
5344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5345for as_dir in $PATH
5346do
5347 IFS=$as_save_IFS
5348 test -z "$as_dir" && as_dir=.
5349 for ac_exec_ext in '' $ac_executable_extensions; do
5350 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5351 ac_cv_prog_ac_ct_AR="ar"
5352 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5353 break 2
5354 fi
5355done
5356 done
5357IFS=$as_save_IFS
5358
5359fi
5360fi
5361ac_ct_AR=$ac_cv_prog_ac_ct_AR
5362if test -n "$ac_ct_AR"; then
5363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5364$as_echo "$ac_ct_AR" >&6; }
5365else
5366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367$as_echo "no" >&6; }
5368fi
5369
5370 if test "x$ac_ct_AR" = x; then
5371 AR="ar"
5372 else
5373 case $cross_compiling:$ac_tool_warned in
5374yes:)
5375{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5376$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5377ac_tool_warned=yes ;;
5378esac
5379 AR=$ac_ct_AR
5380 fi
5381else
5382 AR="$ac_cv_prog_AR"
5383fi
5384
5385 if test -z "$ARFLAGS"; then
5386 ARFLAGS='cr'
5387 fi
5388
c971b7fa 5389
5e8754f9
SDJ
5390
5391 if test -z "$RANLIB"; then
5392 if test $gl_cv_c_amsterdam_compiler = yes; then
5393 RANLIB=':'
5394 else
5395 if test -n "$ac_tool_prefix"; then
5396 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5397set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5399$as_echo_n "checking for $ac_word... " >&6; }
5400if ${ac_cv_prog_RANLIB+:} false; then :
5401 $as_echo_n "(cached) " >&6
5402else
5403 if test -n "$RANLIB"; then
5404 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5405else
5406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5407for as_dir in $PATH
5408do
5409 IFS=$as_save_IFS
5410 test -z "$as_dir" && as_dir=.
5411 for ac_exec_ext in '' $ac_executable_extensions; do
5412 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5413 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5415 break 2
5416 fi
5417done
5418 done
5419IFS=$as_save_IFS
5420
5421fi
5422fi
5423RANLIB=$ac_cv_prog_RANLIB
5424if test -n "$RANLIB"; then
5425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5426$as_echo "$RANLIB" >&6; }
5427else
5428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5429$as_echo "no" >&6; }
5430fi
c971b7fa
PA
5431
5432
5433fi
5434if test -z "$ac_cv_prog_RANLIB"; then
5435 ac_ct_RANLIB=$RANLIB
5436 # Extract the first word of "ranlib", so it can be a program name with args.
5437set dummy ranlib; ac_word=$2
5438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5439$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5440if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
5441 $as_echo_n "(cached) " >&6
5442else
5443 if test -n "$ac_ct_RANLIB"; then
5444 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5445else
5446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5447for as_dir in $PATH
5448do
5449 IFS=$as_save_IFS
5450 test -z "$as_dir" && as_dir=.
5451 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5452 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5453 ac_cv_prog_ac_ct_RANLIB="ranlib"
5454 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5455 break 2
5456 fi
5457done
5458 done
5459IFS=$as_save_IFS
5460
5461fi
5462fi
5463ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5464if test -n "$ac_ct_RANLIB"; then
5465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5466$as_echo "$ac_ct_RANLIB" >&6; }
5467else
5468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5469$as_echo "no" >&6; }
5470fi
5471
5472 if test "x$ac_ct_RANLIB" = x; then
5473 RANLIB=":"
5474 else
5475 case $cross_compiling:$ac_tool_warned in
5476yes:)
5477{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5478$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5479ac_tool_warned=yes ;;
5480esac
5481 RANLIB=$ac_ct_RANLIB
5482 fi
5483else
5484 RANLIB="$ac_cv_prog_RANLIB"
5485fi
5486
5487 fi
5488 fi
5489
5490
5abebf3c 5491
4a626d0a
PA
5492# Make sure we can run config.sub.
5493$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 5494 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4a626d0a
PA
5495
5496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5497$as_echo_n "checking build system type... " >&6; }
d0ac1c44 5498if ${ac_cv_build+:} false; then :
4a626d0a
PA
5499 $as_echo_n "(cached) " >&6
5500else
5501 ac_build_alias=$build_alias
5502test "x$ac_build_alias" = x &&
5503 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5504test "x$ac_build_alias" = x &&
d0ac1c44 5505 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4a626d0a 5506ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 5507 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4a626d0a
PA
5508
5509fi
5510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5511$as_echo "$ac_cv_build" >&6; }
5512case $ac_cv_build in
5513*-*-*) ;;
d0ac1c44 5514*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4a626d0a
PA
5515esac
5516build=$ac_cv_build
5517ac_save_IFS=$IFS; IFS='-'
5518set x $ac_cv_build
5519shift
5520build_cpu=$1
5521build_vendor=$2
5522shift; shift
5523# Remember, the first character of IFS is used to create $*,
5524# except with old shells:
5525build_os=$*
5526IFS=$ac_save_IFS
5527case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5528
5529
5530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5531$as_echo_n "checking host system type... " >&6; }
d0ac1c44 5532if ${ac_cv_host+:} false; then :
4a626d0a
PA
5533 $as_echo_n "(cached) " >&6
5534else
5535 if test "x$host_alias" = x; then
5536 ac_cv_host=$ac_cv_build
5537else
5538 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 5539 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4a626d0a
PA
5540fi
5541
5542fi
5543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5544$as_echo "$ac_cv_host" >&6; }
5545case $ac_cv_host in
5546*-*-*) ;;
d0ac1c44 5547*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4a626d0a
PA
5548esac
5549host=$ac_cv_host
5550ac_save_IFS=$IFS; IFS='-'
5551set x $ac_cv_host
5552shift
5553host_cpu=$1
5554host_vendor=$2
5555shift; shift
5556# Remember, the first character of IFS is used to create $*,
5557# except with old shells:
5558host_os=$*
5559IFS=$ac_save_IFS
5560case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5561
5562
c971b7fa
PA
5563
5564
88b48903
WN
5565
5566 # IEEE behaviour is the default on all CPUs except Alpha and SH
5567 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5568 # and the GCC 4.1.2 manual).
5569 case "$host_cpu" in
5570 alpha*)
5571 # On Alpha systems, a compiler option provides the behaviour.
5572 # See the ieee(3) manual page, also available at
5e8754f9 5573 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
88b48903
WN
5574 if test -n "$GCC"; then
5575 # GCC has the option -mieee.
5576 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
5577 CPPFLAGS="$CPPFLAGS -mieee"
5578 else
5579 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
5580 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
5581 CPPFLAGS="$CPPFLAGS -ieee"
5582 fi
5583 ;;
5584 sh*)
5585 if test -n "$GCC"; then
5586 # GCC has the option -mieee.
5587 CPPFLAGS="$CPPFLAGS -mieee"
5588 fi
5589 ;;
5590 esac
5591
2196f55f
YQ
5592# Check whether --enable-largefile was given.
5593if test "${enable_largefile+set}" = set; then :
5594 enableval=$enable_largefile;
5595fi
5596
5597if test "$enable_largefile" != no; then
5598
5599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5600$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 5601if ${ac_cv_sys_largefile_CC+:} false; then :
2196f55f
YQ
5602 $as_echo_n "(cached) " >&6
5603else
5604 ac_cv_sys_largefile_CC=no
5605 if test "$GCC" != yes; then
5606 ac_save_CC=$CC
5607 while :; do
5608 # IRIX 6.2 and later do not support large files by default,
5609 # so use the C compiler's -n32 option if that helps.
5610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5611/* end confdefs.h. */
5612#include <sys/types.h>
5613 /* Check that off_t can represent 2**63 - 1 correctly.
5614 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5615 since some C++ compilers masquerading as C compilers
5616 incorrectly reject 9223372036854775807. */
5617#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5618 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5619 && LARGE_OFF_T % 2147483647 == 1)
5620 ? 1 : -1];
5621int
5622main ()
5623{
5624
5625 ;
5626 return 0;
5627}
5628_ACEOF
5629 if ac_fn_c_try_compile "$LINENO"; then :
5630 break
5631fi
5632rm -f core conftest.err conftest.$ac_objext
5633 CC="$CC -n32"
5634 if ac_fn_c_try_compile "$LINENO"; then :
5635 ac_cv_sys_largefile_CC=' -n32'; break
5636fi
5637rm -f core conftest.err conftest.$ac_objext
5638 break
5639 done
5640 CC=$ac_save_CC
5641 rm -f conftest.$ac_ext
5642 fi
5643fi
5644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5645$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5646 if test "$ac_cv_sys_largefile_CC" != no; then
5647 CC=$CC$ac_cv_sys_largefile_CC
5648 fi
5649
5650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5651$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 5652if ${ac_cv_sys_file_offset_bits+:} false; then :
2196f55f
YQ
5653 $as_echo_n "(cached) " >&6
5654else
5655 while :; do
5656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5657/* end confdefs.h. */
5658#include <sys/types.h>
5659 /* Check that off_t can represent 2**63 - 1 correctly.
5660 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5661 since some C++ compilers masquerading as C compilers
5662 incorrectly reject 9223372036854775807. */
5663#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5664 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5665 && LARGE_OFF_T % 2147483647 == 1)
5666 ? 1 : -1];
5667int
5668main ()
5669{
5670
5671 ;
5672 return 0;
5673}
5674_ACEOF
5675if ac_fn_c_try_compile "$LINENO"; then :
5676 ac_cv_sys_file_offset_bits=no; break
5677fi
5678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5680/* end confdefs.h. */
5681#define _FILE_OFFSET_BITS 64
5682#include <sys/types.h>
5683 /* Check that off_t can represent 2**63 - 1 correctly.
5684 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5685 since some C++ compilers masquerading as C compilers
5686 incorrectly reject 9223372036854775807. */
5687#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5688 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5689 && LARGE_OFF_T % 2147483647 == 1)
5690 ? 1 : -1];
5691int
5692main ()
5693{
5694
5695 ;
5696 return 0;
5697}
5698_ACEOF
5699if ac_fn_c_try_compile "$LINENO"; then :
5700 ac_cv_sys_file_offset_bits=64; break
5701fi
5702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5703 ac_cv_sys_file_offset_bits=unknown
5704 break
5705done
5706fi
5707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5708$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5709case $ac_cv_sys_file_offset_bits in #(
5710 no | unknown) ;;
5711 *)
5712cat >>confdefs.h <<_ACEOF
5713#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5714_ACEOF
5715;;
5716esac
5717rm -rf conftest*
5718 if test $ac_cv_sys_file_offset_bits = unknown; then
5719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5720$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 5721if ${ac_cv_sys_large_files+:} false; then :
2196f55f
YQ
5722 $as_echo_n "(cached) " >&6
5723else
5724 while :; do
5725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5726/* end confdefs.h. */
5727#include <sys/types.h>
5728 /* Check that off_t can represent 2**63 - 1 correctly.
5729 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5730 since some C++ compilers masquerading as C compilers
5731 incorrectly reject 9223372036854775807. */
5732#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5733 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5734 && LARGE_OFF_T % 2147483647 == 1)
5735 ? 1 : -1];
5736int
5737main ()
5738{
5739
5740 ;
5741 return 0;
5742}
5743_ACEOF
5744if ac_fn_c_try_compile "$LINENO"; then :
5745 ac_cv_sys_large_files=no; break
5746fi
5747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5749/* end confdefs.h. */
5750#define _LARGE_FILES 1
5751#include <sys/types.h>
5752 /* Check that off_t can represent 2**63 - 1 correctly.
5753 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5754 since some C++ compilers masquerading as C compilers
5755 incorrectly reject 9223372036854775807. */
5756#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5757 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5758 && LARGE_OFF_T % 2147483647 == 1)
5759 ? 1 : -1];
5760int
5761main ()
5762{
5763
5764 ;
5765 return 0;
5766}
5767_ACEOF
5768if ac_fn_c_try_compile "$LINENO"; then :
5769 ac_cv_sys_large_files=1; break
5770fi
5771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5772 ac_cv_sys_large_files=unknown
5773 break
5774done
5775fi
5776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5777$as_echo "$ac_cv_sys_large_files" >&6; }
5778case $ac_cv_sys_large_files in #(
5779 no | unknown) ;;
5780 *)
5781cat >>confdefs.h <<_ACEOF
5782#define _LARGE_FILES $ac_cv_sys_large_files
5783_ACEOF
5784;;
5785esac
5786rm -rf conftest*
5787 fi
5788
5789
4a626d0a
PA
5790$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
5791
2196f55f
YQ
5792fi
5793
88b48903
WN
5794
5795
5abebf3c
CB
5796
5797
5798
5799 # Check whether --enable-threads was given.
5800if test "${enable_threads+set}" = set; then :
5801 enableval=$enable_threads; gl_use_threads=$enableval
5802else
5803 if test -n "$gl_use_threads_default"; then
5804 gl_use_threads="$gl_use_threads_default"
5805 else
5806 case "$host_os" in
5807 osf*) gl_use_threads=no ;;
5808 cygwin*)
5809 case `uname -r` in
5810 1.[0-5].*) gl_use_threads=no ;;
5811 *) gl_use_threads=yes ;;
5812 esac
5813 ;;
5814 *) gl_use_threads=yes ;;
5815 esac
5816 fi
5817
5818fi
5819
5820 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
5821 # For using <pthread.h>:
5822 case "$host_os" in
5823 osf*)
5824 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
5825 # groks <pthread.h>. cc also understands the flag -pthread, but
5826 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
5827 # 2. putting a flag into CPPFLAGS that has an effect on the linker
5828 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
5829 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
5830 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
5831 ;;
5832 esac
5833 # Some systems optimize for single-threaded programs by default, and
5834 # need special flags to disable these optimizations. For example, the
5835 # definition of 'errno' in <errno.h>.
5836 case "$host_os" in
5837 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
5838 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
5839 esac
5840 fi
5841
5842
5843
49e4877c
PA
5844 # Pre-early section.
5845
5846
5847
5abebf3c 5848
4a626d0a 5849 # Code from module absolute-header:
8690e634
JK
5850 # Code from module alloca:
5851 # Code from module alloca-opt:
725e2999 5852 # Code from module arpa_inet:
6ec2e0f5
SDJ
5853 # Code from module assure:
5854 # Code from module at-internal:
98399780 5855 # Code from module canonicalize-lgpl:
6a29c58e 5856 # Code from module chdir:
6ec2e0f5
SDJ
5857 # Code from module chdir-long:
5858 # Code from module cloexec:
5859 # Code from module close:
5860 # Code from module closedir:
5e8754f9 5861 # Code from module configmake:
6ec2e0f5
SDJ
5862 # Code from module d-ino:
5863 # Code from module d-type:
e26b6bb0 5864 # Code from module dirent:
18848e28 5865 # Code from module dirfd:
6a29c58e 5866 # Code from module dirname-lgpl:
2196f55f 5867 # Code from module dosname:
6a29c58e 5868 # Code from module double-slash-root:
6ec2e0f5
SDJ
5869 # Code from module dup:
5870 # Code from module dup2:
3d99e817 5871 # Code from module environ:
18848e28 5872 # Code from module errno:
6ec2e0f5
SDJ
5873 # Code from module error:
5874 # Code from module exitfail:
c971b7fa 5875 # Code from module extensions:
a512b375 5876 # Code from module extern-inline:
6ec2e0f5
SDJ
5877 # Code from module fchdir:
5878 # Code from module fcntl:
5879 # Code from module fcntl-h:
5880 # Code from module fd-hook:
5881 # Code from module fdopendir:
5882 # Code from module filename:
5883 # Code from module filenamecat-lgpl:
49e4877c 5884 # Code from module flexmember:
88b48903 5885 # Code from module float:
8690e634
JK
5886 # Code from module fnmatch:
5887 # Code from module fnmatch-gnu:
88b48903
WN
5888 # Code from module fpieee:
5889
5890 # Code from module fpucw:
5891 # Code from module frexp:
5892 # Code from module frexpl:
6ec2e0f5
SDJ
5893 # Code from module fstat:
5894 # Code from module fstatat:
5895 # Code from module getcwd:
5896 # Code from module getcwd-lgpl:
5897 # Code from module getdtablesize:
5898 # Code from module getlogin_r:
5899 # Code from module getprogname:
5900 # Code from module gettext-h:
4a626d0a 5901 # Code from module gettimeofday:
6ec2e0f5 5902 # Code from module glob:
49e4877c 5903 # Code from module hard-locale:
5abebf3c 5904 # Code from module havelib:
c971b7fa 5905 # Code from module include_next:
725e2999 5906 # Code from module inet_ntop:
6ec2e0f5 5907 # Code from module intprops:
c971b7fa
PA
5908 # Code from module inttypes:
5909 # Code from module inttypes-incomplete:
88b48903
WN
5910 # Code from module isnand-nolibm:
5911 # Code from module isnanl-nolibm:
2196f55f
YQ
5912 # Code from module largefile:
5913
49e4877c 5914 # Code from module limits-h:
8690e634 5915 # Code from module localcharset:
5abebf3c 5916 # Code from module lock:
f45c62c4 5917 # Code from module lstat:
6a29c58e 5918 # Code from module malloc-posix:
98399780 5919 # Code from module malloca:
88b48903 5920 # Code from module math:
8690e634
JK
5921 # Code from module mbrtowc:
5922 # Code from module mbsinit:
5923 # Code from module mbsrtowcs:
c971b7fa
PA
5924 # Code from module memchr:
5925 # Code from module memmem:
5926 # Code from module memmem-simple:
6ec2e0f5
SDJ
5927 # Code from module mempcpy:
5928 # Code from module memrchr:
8a99096f 5929 # Code from module mkdir:
e8d8cce6 5930 # Code from module mkdtemp:
b3279b60 5931 # Code from module mkostemp:
6ec2e0f5
SDJ
5932 # Code from module msvc-inval:
5933 # Code from module msvc-nothrow:
c971b7fa 5934 # Code from module multiarch:
725e2999 5935 # Code from module netinet_in:
98399780 5936 # Code from module nocrash:
6ec2e0f5
SDJ
5937 # Code from module open:
5938 # Code from module openat:
5939 # Code from module openat-die:
5940 # Code from module openat-h:
5941 # Code from module opendir:
38ec2207 5942 # Code from module pathmax:
8424cc97 5943 # Code from module rawmemchr:
6ec2e0f5 5944 # Code from module readdir:
2196f55f 5945 # Code from module readlink:
6ec2e0f5 5946 # Code from module realloc-posix:
6a29c58e 5947 # Code from module rename:
6ec2e0f5 5948 # Code from module rewinddir:
6a29c58e
YQ
5949 # Code from module rmdir:
5950 # Code from module same-inode:
6ec2e0f5 5951 # Code from module save-cwd:
5e8754f9 5952 # Code from module secure_getenv:
3d99e817 5953 # Code from module setenv:
0750520d 5954 # Code from module signal-h:
98399780 5955 # Code from module snippet/_Noreturn:
c971b7fa
PA
5956 # Code from module snippet/arg-nonnull:
5957 # Code from module snippet/c++defs:
5958 # Code from module snippet/warn-on-use:
725e2999 5959 # Code from module socklen:
8839a007 5960 # Code from module ssize_t:
2196f55f 5961 # Code from module stat:
725e2999 5962 # Code from module stdalign:
8690e634 5963 # Code from module stdbool:
c971b7fa
PA
5964 # Code from module stddef:
5965 # Code from module stdint:
6a29c58e 5966 # Code from module stdio:
98399780 5967 # Code from module stdlib:
8424cc97 5968 # Code from module strchrnul:
6ec2e0f5 5969 # Code from module strdup-posix:
8690e634 5970 # Code from module streq:
6ec2e0f5
SDJ
5971 # Code from module strerror:
5972 # Code from module strerror-override:
5abebf3c 5973 # Code from module strerror_r-posix:
c971b7fa 5974 # Code from module string:
8690e634 5975 # Code from module strnlen1:
63ce7108
TT
5976 # Code from module strstr:
5977 # Code from module strstr-simple:
421693b0 5978 # Code from module strtok_r:
725e2999 5979 # Code from module sys_socket:
09607c9e 5980 # Code from module sys_stat:
4a626d0a 5981 # Code from module sys_time:
8839a007 5982 # Code from module sys_types:
725e2999 5983 # Code from module sys_uio:
2d8adcbd 5984 # Code from module tempname:
5abebf3c
CB
5985 # Code from module threadlib:
5986
5987
5988
09607c9e 5989 # Code from module time:
f8e27d88 5990 # Code from module time_r:
8839a007 5991 # Code from module unistd:
6ec2e0f5 5992 # Code from module unistd-safer:
3d99e817 5993 # Code from module unsetenv:
c971b7fa 5994 # Code from module update-copyright:
8690e634
JK
5995 # Code from module verify:
5996 # Code from module wchar:
5997 # Code from module wctype-h:
c971b7fa 5998
5e8754f9
SDJ
5999ac_ext=c
6000ac_cpp='$CPP $CPPFLAGS'
6001ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6002ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6003ac_compiler_gnu=$ac_cv_c_compiler_gnu
6004if test -n "$ac_tool_prefix"; then
6005 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
6006set dummy ${ac_tool_prefix}gcc; ac_word=$2
6007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6008$as_echo_n "checking for $ac_word... " >&6; }
6009if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
6010 $as_echo_n "(cached) " >&6
6011else
5e8754f9
SDJ
6012 if test -n "$CC"; then
6013 ac_cv_prog_CC="$CC" # Let the user override the test.
c971b7fa 6014else
5e8754f9
SDJ
6015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6016for as_dir in $PATH
6017do
6018 IFS=$as_save_IFS
6019 test -z "$as_dir" && as_dir=.
6020 for ac_exec_ext in '' $ac_executable_extensions; do
6021 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6022 ac_cv_prog_CC="${ac_tool_prefix}gcc"
6023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6024 break 2
6025 fi
6026done
6027 done
6028IFS=$as_save_IFS
c971b7fa 6029
5e8754f9
SDJ
6030fi
6031fi
6032CC=$ac_cv_prog_CC
6033if test -n "$CC"; then
6034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6035$as_echo "$CC" >&6; }
7a6dbc2f 6036else
5e8754f9
SDJ
6037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6038$as_echo "no" >&6; }
6039fi
c971b7fa 6040
c971b7fa 6041
7a6dbc2f 6042fi
5e8754f9
SDJ
6043if test -z "$ac_cv_prog_CC"; then
6044 ac_ct_CC=$CC
6045 # Extract the first word of "gcc", so it can be a program name with args.
6046set dummy gcc; ac_word=$2
6047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6048$as_echo_n "checking for $ac_word... " >&6; }
6049if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
6050 $as_echo_n "(cached) " >&6
6051else
5e8754f9
SDJ
6052 if test -n "$ac_ct_CC"; then
6053 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
c971b7fa 6054else
5e8754f9
SDJ
6055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6056for as_dir in $PATH
6057do
6058 IFS=$as_save_IFS
6059 test -z "$as_dir" && as_dir=.
6060 for ac_exec_ext in '' $ac_executable_extensions; do
6061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6062 ac_cv_prog_ac_ct_CC="gcc"
6063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6064 break 2
6065 fi
6066done
6067 done
6068IFS=$as_save_IFS
6069
c971b7fa 6070fi
c971b7fa 6071fi
5e8754f9
SDJ
6072ac_ct_CC=$ac_cv_prog_ac_ct_CC
6073if test -n "$ac_ct_CC"; then
6074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6075$as_echo "$ac_ct_CC" >&6; }
6076else
6077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6078$as_echo "no" >&6; }
6079fi
7a6dbc2f 6080
5e8754f9
SDJ
6081 if test "x$ac_ct_CC" = x; then
6082 CC=""
6083 else
6084 case $cross_compiling:$ac_tool_warned in
6085yes:)
6086{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6087$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6088ac_tool_warned=yes ;;
6089esac
6090 CC=$ac_ct_CC
6091 fi
6092else
6093 CC="$ac_cv_prog_CC"
c971b7fa 6094fi
7a6dbc2f 6095
5e8754f9
SDJ
6096if test -z "$CC"; then
6097 if test -n "$ac_tool_prefix"; then
6098 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
6099set dummy ${ac_tool_prefix}cc; ac_word=$2
6100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6101$as_echo_n "checking for $ac_word... " >&6; }
6102if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
6103 $as_echo_n "(cached) " >&6
6104else
5e8754f9
SDJ
6105 if test -n "$CC"; then
6106 ac_cv_prog_CC="$CC" # Let the user override the test.
c971b7fa 6107else
5e8754f9
SDJ
6108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6109for as_dir in $PATH
6110do
6111 IFS=$as_save_IFS
6112 test -z "$as_dir" && as_dir=.
6113 for ac_exec_ext in '' $ac_executable_extensions; do
6114 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6115 ac_cv_prog_CC="${ac_tool_prefix}cc"
6116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6117 break 2
6118 fi
6119done
6120 done
6121IFS=$as_save_IFS
6122
7a6dbc2f 6123fi
7a6dbc2f 6124fi
5e8754f9
SDJ
6125CC=$ac_cv_prog_CC
6126if test -n "$CC"; then
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6128$as_echo "$CC" >&6; }
c971b7fa 6129else
5e8754f9
SDJ
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6131$as_echo "no" >&6; }
6132fi
7a6dbc2f
SDJ
6133
6134
5e8754f9
SDJ
6135 fi
6136fi
6137if test -z "$CC"; then
6138 # Extract the first word of "cc", so it can be a program name with args.
6139set dummy cc; ac_word=$2
6140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6141$as_echo_n "checking for $ac_word... " >&6; }
6142if ${ac_cv_prog_CC+:} false; then :
7a6dbc2f
SDJ
6143 $as_echo_n "(cached) " >&6
6144else
5e8754f9
SDJ
6145 if test -n "$CC"; then
6146 ac_cv_prog_CC="$CC" # Let the user override the test.
7a6dbc2f 6147else
5e8754f9
SDJ
6148 ac_prog_rejected=no
6149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6150for as_dir in $PATH
6151do
6152 IFS=$as_save_IFS
6153 test -z "$as_dir" && as_dir=.
6154 for ac_exec_ext in '' $ac_executable_extensions; do
6155 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6156 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
6157 ac_prog_rejected=yes
6158 continue
6159 fi
6160 ac_cv_prog_CC="cc"
6161 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6162 break 2
6163 fi
6164done
6165 done
6166IFS=$as_save_IFS
6167
6168if test $ac_prog_rejected = yes; then
6169 # We found a bogon in the path, so make sure we never use it.
6170 set dummy $ac_cv_prog_CC
6171 shift
6172 if test $# != 0; then
6173 # We chose a different compiler from the bogus one.
6174 # However, it has the same basename, so the bogon will be chosen
6175 # first if we set CC to just the basename; use the full file name.
6176 shift
6177 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
6178 fi
6179fi
6180fi
6181fi
6182CC=$ac_cv_prog_CC
6183if test -n "$CC"; then
6184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6185$as_echo "$CC" >&6; }
6186else
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6188$as_echo "no" >&6; }
c971b7fa 6189fi
7a6dbc2f 6190
7a6dbc2f 6191
c971b7fa 6192fi
5e8754f9
SDJ
6193if test -z "$CC"; then
6194 if test -n "$ac_tool_prefix"; then
6195 for ac_prog in cl.exe
6196 do
6197 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6198set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6200$as_echo_n "checking for $ac_word... " >&6; }
6201if ${ac_cv_prog_CC+:} false; then :
6202 $as_echo_n "(cached) " >&6
6203else
6204 if test -n "$CC"; then
6205 ac_cv_prog_CC="$CC" # Let the user override the test.
6206else
6207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6208for as_dir in $PATH
6209do
6210 IFS=$as_save_IFS
6211 test -z "$as_dir" && as_dir=.
6212 for ac_exec_ext in '' $ac_executable_extensions; do
6213 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6214 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6215 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6216 break 2
6217 fi
6218done
7a6dbc2f 6219 done
5e8754f9
SDJ
6220IFS=$as_save_IFS
6221
6222fi
6223fi
6224CC=$ac_cv_prog_CC
6225if test -n "$CC"; then
6226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6227$as_echo "$CC" >&6; }
6228else
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6230$as_echo "no" >&6; }
c971b7fa 6231fi
7a6dbc2f 6232
5e8754f9
SDJ
6233
6234 test -n "$CC" && break
6235 done
6236fi
6237if test -z "$CC"; then
6238 ac_ct_CC=$CC
6239 for ac_prog in cl.exe
6240do
6241 # Extract the first word of "$ac_prog", so it can be a program name with args.
6242set dummy $ac_prog; ac_word=$2
6243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6244$as_echo_n "checking for $ac_word... " >&6; }
6245if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
6246 $as_echo_n "(cached) " >&6
6247else
5e8754f9
SDJ
6248 if test -n "$ac_ct_CC"; then
6249 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6250else
6251as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252for as_dir in $PATH
6253do
6254 IFS=$as_save_IFS
6255 test -z "$as_dir" && as_dir=.
6256 for ac_exec_ext in '' $ac_executable_extensions; do
6257 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6258 ac_cv_prog_ac_ct_CC="$ac_prog"
6259 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6260 break 2
6261 fi
6262done
6263 done
6264IFS=$as_save_IFS
6265
6266fi
6267fi
6268ac_ct_CC=$ac_cv_prog_ac_ct_CC
6269if test -n "$ac_ct_CC"; then
6270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6271$as_echo "$ac_ct_CC" >&6; }
6272else
6273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6274$as_echo "no" >&6; }
6275fi
6276
6277
6278 test -n "$ac_ct_CC" && break
6279done
6280
6281 if test "x$ac_ct_CC" = x; then
6282 CC=""
6283 else
6284 case $cross_compiling:$ac_tool_warned in
6285yes:)
6286{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6287$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6288ac_tool_warned=yes ;;
6289esac
6290 CC=$ac_ct_CC
6291 fi
6292fi
6293
6294fi
6295
6296
6297test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6298$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6299as_fn_error $? "no acceptable C compiler found in \$PATH
6300See \`config.log' for more details" "$LINENO" 5; }
6301
6302# Provide some information about the compiler.
6303$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
6304set X $ac_compile
6305ac_compiler=$2
6306for ac_option in --version -v -V -qversion; do
6307 { { ac_try="$ac_compiler $ac_option >&5"
6308case "(($ac_try" in
6309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6310 *) ac_try_echo=$ac_try;;
6311esac
6312eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6313$as_echo "$ac_try_echo"; } >&5
6314 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6315 ac_status=$?
6316 if test -s conftest.err; then
6317 sed '10a\
6318... rest of stderr output deleted ...
6319 10q' conftest.err >conftest.er1
6320 cat conftest.er1 >&5
6321 fi
6322 rm -f conftest.er1 conftest.err
6323 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6324 test $ac_status = 0; }
6325done
6326
6327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6328$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
6329if ${ac_cv_c_compiler_gnu+:} false; then :
6330 $as_echo_n "(cached) " >&6
7a6dbc2f
SDJ
6331else
6332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6333/* end confdefs.h. */
c971b7fa 6334
c971b7fa 6335int
5e8754f9 6336main ()
c971b7fa 6337{
5e8754f9
SDJ
6338#ifndef __GNUC__
6339 choke me
6340#endif
6341
6342 ;
6343 return 0;
c971b7fa
PA
6344}
6345_ACEOF
5e8754f9
SDJ
6346if ac_fn_c_try_compile "$LINENO"; then :
6347 ac_compiler_gnu=yes
7a6dbc2f 6348else
5e8754f9 6349 ac_compiler_gnu=no
c971b7fa 6350fi
5e8754f9
SDJ
6351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6352ac_cv_c_compiler_gnu=$ac_compiler_gnu
c971b7fa
PA
6353
6354fi
5e8754f9
SDJ
6355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6356$as_echo "$ac_cv_c_compiler_gnu" >&6; }
6357if test $ac_compiler_gnu = yes; then
6358 GCC=yes
6359else
6360 GCC=
d0ac1c44 6361fi
5e8754f9
SDJ
6362ac_test_CFLAGS=${CFLAGS+set}
6363ac_save_CFLAGS=$CFLAGS
6364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6365$as_echo_n "checking whether $CC accepts -g... " >&6; }
6366if ${ac_cv_prog_cc_g+:} false; then :
6367 $as_echo_n "(cached) " >&6
6368else
6369 ac_save_c_werror_flag=$ac_c_werror_flag
6370 ac_c_werror_flag=yes
6371 ac_cv_prog_cc_g=no
6372 CFLAGS="-g"
6373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6374/* end confdefs.h. */
d0ac1c44 6375
5e8754f9
SDJ
6376int
6377main ()
6378{
c971b7fa 6379
5e8754f9
SDJ
6380 ;
6381 return 0;
6382}
6383_ACEOF
6384if ac_fn_c_try_compile "$LINENO"; then :
6385 ac_cv_prog_cc_g=yes
6386else
6387 CFLAGS=""
6388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6389/* end confdefs.h. */
c971b7fa 6390
5e8754f9
SDJ
6391int
6392main ()
6393{
c971b7fa 6394
5e8754f9
SDJ
6395 ;
6396 return 0;
6397}
6398_ACEOF
6399if ac_fn_c_try_compile "$LINENO"; then :
c971b7fa 6400
5e8754f9
SDJ
6401else
6402 ac_c_werror_flag=$ac_save_c_werror_flag
6403 CFLAGS="-g"
6404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6405/* end confdefs.h. */
c971b7fa 6406
5e8754f9
SDJ
6407int
6408main ()
6409{
c971b7fa 6410
5e8754f9
SDJ
6411 ;
6412 return 0;
6413}
7a6dbc2f 6414_ACEOF
5e8754f9
SDJ
6415if ac_fn_c_try_compile "$LINENO"; then :
6416 ac_cv_prog_cc_g=yes
c971b7fa 6417fi
5e8754f9
SDJ
6418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6419fi
6420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6421fi
6422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6423 ac_c_werror_flag=$ac_save_c_werror_flag
6424fi
6425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6426$as_echo "$ac_cv_prog_cc_g" >&6; }
6427if test "$ac_test_CFLAGS" = set; then
6428 CFLAGS=$ac_save_CFLAGS
6429elif test $ac_cv_prog_cc_g = yes; then
6430 if test "$GCC" = yes; then
6431 CFLAGS="-g -O2"
6432 else
6433 CFLAGS="-g"
6434 fi
6435else
6436 if test "$GCC" = yes; then
6437 CFLAGS="-O2"
6438 else
6439 CFLAGS=
6440 fi
6441fi
6442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6443$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6444if ${ac_cv_prog_cc_c89+:} false; then :
6445 $as_echo_n "(cached) " >&6
6446else
6447 ac_cv_prog_cc_c89=no
6448ac_save_CC=$CC
6449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6450/* end confdefs.h. */
6451#include <stdarg.h>
6452#include <stdio.h>
6453struct stat;
6454/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6455struct buf { int x; };
6456FILE * (*rcsopen) (struct buf *, struct stat *, int);
6457static char *e (p, i)
6458 char **p;
6459 int i;
6460{
6461 return p[i];
6462}
6463static char *f (char * (*g) (char **, int), char **p, ...)
6464{
6465 char *s;
6466 va_list v;
6467 va_start (v,p);
6468 s = g (p, va_arg (v,int));
6469 va_end (v);
6470 return s;
6471}
c971b7fa 6472
5e8754f9
SDJ
6473/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6474 function prototypes and stuff, but not '\xHH' hex character constants.
6475 These don't provoke an error unfortunately, instead are silently treated
6476 as 'x'. The following induces an error, until -std is added to get
6477 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6478 array size at least. It's necessary to write '\x00'==0 to get something
6479 that's true only with -std. */
6480int osf4_cc_array ['\x00' == 0 ? 1 : -1];
c971b7fa 6481
5e8754f9
SDJ
6482/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6483 inside strings and character constants. */
6484#define FOO(x) 'x'
6485int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
c971b7fa 6486
5e8754f9
SDJ
6487int test (int i, double x);
6488struct s1 {int (*f) (int a);};
6489struct s2 {int (*f) (double a);};
6490int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6491int argc;
6492char **argv;
6493int
6494main ()
6495{
6496return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6497 ;
6498 return 0;
6499}
6500_ACEOF
6501for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6502 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6503do
6504 CC="$ac_save_CC $ac_arg"
6505 if ac_fn_c_try_compile "$LINENO"; then :
6506 ac_cv_prog_cc_c89=$ac_arg
6507fi
6508rm -f core conftest.err conftest.$ac_objext
6509 test "x$ac_cv_prog_cc_c89" != "xno" && break
6510done
6511rm -f conftest.$ac_ext
6512CC=$ac_save_CC
c971b7fa 6513
5e8754f9
SDJ
6514fi
6515# AC_CACHE_VAL
6516case "x$ac_cv_prog_cc_c89" in
6517 x)
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6519$as_echo "none needed" >&6; } ;;
6520 xno)
6521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6522$as_echo "unsupported" >&6; } ;;
6523 *)
6524 CC="$CC $ac_cv_prog_cc_c89"
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6526$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6527esac
6528if test "x$ac_cv_prog_cc_c89" != xno; then :
c971b7fa 6529
5e8754f9 6530fi
c971b7fa 6531
5e8754f9
SDJ
6532ac_ext=c
6533ac_cpp='$CPP $CPPFLAGS'
6534ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6535ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6536ac_compiler_gnu=$ac_cv_c_compiler_gnu
d0ac1c44 6537
5e8754f9
SDJ
6538ac_ext=c
6539ac_cpp='$CPP $CPPFLAGS'
6540ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6541ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6542ac_compiler_gnu=$ac_cv_c_compiler_gnu
6543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6544$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
6545if ${am_cv_prog_cc_c_o+:} false; then :
6546 $as_echo_n "(cached) " >&6
6547else
6548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6549/* end confdefs.h. */
d0ac1c44 6550
5e8754f9
SDJ
6551int
6552main ()
6553{
d0ac1c44 6554
5e8754f9
SDJ
6555 ;
6556 return 0;
6557}
6558_ACEOF
6559 # Make sure it works both with $CC and with simple cc.
6560 # Following AC_PROG_CC_C_O, we do the test twice because some
6561 # compilers refuse to overwrite an existing .o file with -o,
6562 # though they will create one.
6563 am_cv_prog_cc_c_o=yes
6564 for am_i in 1 2; do
6565 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6566 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6567 ac_status=$?
6568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6569 (exit $ac_status); } \
6570 && test -f conftest2.$ac_objext; then
6571 : OK
6572 else
6573 am_cv_prog_cc_c_o=no
6574 break
6575 fi
6576 done
6577 rm -f core conftest*
6578 unset am_i
6579fi
6580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6581$as_echo "$am_cv_prog_cc_c_o" >&6; }
6582if test "$am_cv_prog_cc_c_o" != yes; then
6583 # Losing compiler, so override with the script.
6584 # FIXME: It is wrong to rewrite CC.
6585 # But if we don't then we get into trouble of one sort or another.
6586 # A longer-term fix would be to have automake use am__CC in this case,
6587 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6588 CC="$am_aux_dir/compile $CC"
6589fi
6590ac_ext=c
6591ac_cpp='$CPP $CPPFLAGS'
6592ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6593ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6594ac_compiler_gnu=$ac_cv_c_compiler_gnu
d0ac1c44 6595
7a6dbc2f 6596
5e8754f9 6597am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
7a6dbc2f
SDJ
6598
6599
5e8754f9
SDJ
6600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6601$as_echo_n "checking target system type... " >&6; }
6602if ${ac_cv_target+:} false; then :
c971b7fa
PA
6603 $as_echo_n "(cached) " >&6
6604else
5e8754f9
SDJ
6605 if test "x$target_alias" = x; then
6606 ac_cv_target=$ac_cv_host
6607else
6608 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6609 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
c971b7fa 6610fi
c971b7fa 6611
5e8754f9
SDJ
6612fi
6613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6614$as_echo "$ac_cv_target" >&6; }
6615case $ac_cv_target in
6616*-*-*) ;;
6617*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6618esac
6619target=$ac_cv_target
6620ac_save_IFS=$IFS; IFS='-'
6621set x $ac_cv_target
6622shift
6623target_cpu=$1
6624target_vendor=$2
6625shift; shift
6626# Remember, the first character of IFS is used to create $*,
6627# except with old shells:
6628target_os=$*
6629IFS=$ac_save_IFS
6630case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
c971b7fa
PA
6631
6632
5e8754f9
SDJ
6633# The aliases save the names the user supplied, while $host etc.
6634# will get canonicalized.
6635test -n "$target_alias" &&
6636 test "$program_prefix$program_suffix$program_transform_name" = \
6637 NONENONEs,x,x, &&
6638 program_prefix=${target_alias}-
7a6dbc2f 6639
73cc7272
TT
6640# The tests for host and target for $enable_largefile require
6641# canonical names.
6642
6643
6644
6645# As the $enable_largefile decision depends on --enable-plugins we must set it
6646# even in directories otherwise not depending on the $plugins option.
6647
6648
6649 maybe_plugins=no
6650 for ac_header in dlfcn.h
6651do :
6652 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
6653"
6654if test "x$ac_cv_header_dlfcn_h" = xyes; then :
6655 cat >>confdefs.h <<_ACEOF
6656#define HAVE_DLFCN_H 1
6657_ACEOF
6658 maybe_plugins=yes
6659fi
6660
6661done
6662
6663 for ac_header in windows.h
6664do :
6665 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
6666"
6667if test "x$ac_cv_header_windows_h" = xyes; then :
6668 cat >>confdefs.h <<_ACEOF
6669#define HAVE_WINDOWS_H 1
6670_ACEOF
6671 maybe_plugins=yes
6672fi
6673
6674done
6675
6676
6677 # Check whether --enable-plugins was given.
6678if test "${enable_plugins+set}" = set; then :
6679 enableval=$enable_plugins; case "${enableval}" in
6680 no) plugins=no ;;
6681 *) plugins=yes
6682 if test "$maybe_plugins" != "yes" ; then
6683 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
6684 fi ;;
6685 esac
6686else
6687 plugins=$maybe_plugins
6688
6689fi
6690
6691 if test "$plugins" = "yes"; then
6692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
6693$as_echo_n "checking for library containing dlsym... " >&6; }
6694if ${ac_cv_search_dlsym+:} false; then :
6695 $as_echo_n "(cached) " >&6
6696else
6697 ac_func_search_save_LIBS=$LIBS
6698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6699/* end confdefs.h. */
6700
6701/* Override any GCC internal prototype to avoid an error.
6702 Use char because int might match the return type of a GCC
6703 builtin and then its argument prototype would still apply. */
6704#ifdef __cplusplus
6705extern "C"
6706#endif
6707char dlsym ();
6708int
6709main ()
6710{
6711return dlsym ();
6712 ;
6713 return 0;
6714}
6715_ACEOF
6716for ac_lib in '' dl; do
6717 if test -z "$ac_lib"; then
6718 ac_res="none required"
6719 else
6720 ac_res=-l$ac_lib
6721 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6722 fi
6723 if ac_fn_c_try_link "$LINENO"; then :
6724 ac_cv_search_dlsym=$ac_res
6725fi
6726rm -f core conftest.err conftest.$ac_objext \
6727 conftest$ac_exeext
6728 if ${ac_cv_search_dlsym+:} false; then :
6729 break
6730fi
6731done
6732if ${ac_cv_search_dlsym+:} false; then :
6733
6734else
6735 ac_cv_search_dlsym=no
6736fi
6737rm conftest.$ac_ext
6738LIBS=$ac_func_search_save_LIBS
6739fi
6740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
6741$as_echo "$ac_cv_search_dlsym" >&6; }
6742ac_res=$ac_cv_search_dlsym
6743if test "$ac_res" != no; then :
6744 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6745
6746fi
6747
6748 fi
6749
6750
6751case "${host}" in
6752 sparc-*-solaris*|i[3-7]86-*-solaris*)
6753 # On native 32bit sparc and ia32 solaris, large-file and procfs support
6754 # are mutually exclusive; and without procfs support, the bfd/ elf module
6755 # cannot provide certain routines such as elfcore_write_prpsinfo
6756 # or elfcore_write_prstatus. So unless the user explicitly requested
6757 # large-file support through the --enable-largefile switch, disable
6758 # large-file support in favor of procfs support.
6759 test "${target}" = "${host}" -a "x$plugins" = xno \
6760 && : ${enable_largefile="no"}
6761 ;;
6762esac
6763
6764# Check whether --enable-largefile was given.
6765if test "${enable_largefile+set}" = set; then :
6766 enableval=$enable_largefile;
6767fi
6768
6769if test "$enable_largefile" != no; then
6770
6771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6772$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6773if ${ac_cv_sys_largefile_CC+:} false; then :
6774 $as_echo_n "(cached) " >&6
6775else
6776 ac_cv_sys_largefile_CC=no
6777 if test "$GCC" != yes; then
6778 ac_save_CC=$CC
6779 while :; do
6780 # IRIX 6.2 and later do not support large files by default,
6781 # so use the C compiler's -n32 option if that helps.
6782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6783/* end confdefs.h. */
6784#include <sys/types.h>
6785 /* Check that off_t can represent 2**63 - 1 correctly.
6786 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6787 since some C++ compilers masquerading as C compilers
6788 incorrectly reject 9223372036854775807. */
6789#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6790 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6791 && LARGE_OFF_T % 2147483647 == 1)
6792 ? 1 : -1];
6793int
6794main ()
6795{
6796
6797 ;
6798 return 0;
6799}
6800_ACEOF
6801 if ac_fn_c_try_compile "$LINENO"; then :
6802 break
6803fi
6804rm -f core conftest.err conftest.$ac_objext
6805 CC="$CC -n32"
6806 if ac_fn_c_try_compile "$LINENO"; then :
6807 ac_cv_sys_largefile_CC=' -n32'; break
6808fi
6809rm -f core conftest.err conftest.$ac_objext
6810 break
6811 done
6812 CC=$ac_save_CC
6813 rm -f conftest.$ac_ext
6814 fi
6815fi
6816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6817$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6818 if test "$ac_cv_sys_largefile_CC" != no; then
6819 CC=$CC$ac_cv_sys_largefile_CC
6820 fi
6821
6822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6823$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6824if ${ac_cv_sys_file_offset_bits+:} false; then :
6825 $as_echo_n "(cached) " >&6
6826else
6827 while :; do
6828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6829/* end confdefs.h. */
6830#include <sys/types.h>
6831 /* Check that off_t can represent 2**63 - 1 correctly.
6832 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6833 since some C++ compilers masquerading as C compilers
6834 incorrectly reject 9223372036854775807. */
6835#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6836 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6837 && LARGE_OFF_T % 2147483647 == 1)
6838 ? 1 : -1];
6839int
6840main ()
6841{
6842
6843 ;
6844 return 0;
6845}
6846_ACEOF
6847if ac_fn_c_try_compile "$LINENO"; then :
6848 ac_cv_sys_file_offset_bits=no; break
6849fi
6850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6852/* end confdefs.h. */
6853#define _FILE_OFFSET_BITS 64
6854#include <sys/types.h>
6855 /* Check that off_t can represent 2**63 - 1 correctly.
6856 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6857 since some C++ compilers masquerading as C compilers
6858 incorrectly reject 9223372036854775807. */
6859#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6860 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6861 && LARGE_OFF_T % 2147483647 == 1)
6862 ? 1 : -1];
6863int
6864main ()
6865{
6866
6867 ;
6868 return 0;
6869}
6870_ACEOF
6871if ac_fn_c_try_compile "$LINENO"; then :
6872 ac_cv_sys_file_offset_bits=64; break
6873fi
6874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6875 ac_cv_sys_file_offset_bits=unknown
6876 break
6877done
6878fi
6879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6880$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6881case $ac_cv_sys_file_offset_bits in #(
6882 no | unknown) ;;
6883 *)
6884cat >>confdefs.h <<_ACEOF
6885#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6886_ACEOF
6887;;
6888esac
6889rm -rf conftest*
6890 if test $ac_cv_sys_file_offset_bits = unknown; then
6891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6892$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6893if ${ac_cv_sys_large_files+:} false; then :
6894 $as_echo_n "(cached) " >&6
6895else
6896 while :; do
6897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6898/* end confdefs.h. */
6899#include <sys/types.h>
6900 /* Check that off_t can represent 2**63 - 1 correctly.
6901 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6902 since some C++ compilers masquerading as C compilers
6903 incorrectly reject 9223372036854775807. */
6904#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6905 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6906 && LARGE_OFF_T % 2147483647 == 1)
6907 ? 1 : -1];
6908int
6909main ()
6910{
6911
6912 ;
6913 return 0;
6914}
6915_ACEOF
6916if ac_fn_c_try_compile "$LINENO"; then :
6917 ac_cv_sys_large_files=no; break
6918fi
6919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6921/* end confdefs.h. */
6922#define _LARGE_FILES 1
6923#include <sys/types.h>
6924 /* Check that off_t can represent 2**63 - 1 correctly.
6925 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6926 since some C++ compilers masquerading as C compilers
6927 incorrectly reject 9223372036854775807. */
6928#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6929 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6930 && LARGE_OFF_T % 2147483647 == 1)
6931 ? 1 : -1];
6932int
6933main ()
6934{
6935
6936 ;
6937 return 0;
6938}
6939_ACEOF
6940if ac_fn_c_try_compile "$LINENO"; then :
6941 ac_cv_sys_large_files=1; break
6942fi
6943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6944 ac_cv_sys_large_files=unknown
6945 break
6946done
6947fi
6948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6949$as_echo "$ac_cv_sys_large_files" >&6; }
6950case $ac_cv_sys_large_files in #(
6951 no | unknown) ;;
6952 *)
6953cat >>confdefs.h <<_ACEOF
6954#define _LARGE_FILES $ac_cv_sys_large_files
6955_ACEOF
6956;;
6957esac
6958rm -rf conftest*
6959 fi
6960
6961
6962$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6963
6964fi
6965
6966
6967
6968ac_aux_dir=
6969for ac_dir in .. "$srcdir"/..; do
6970 if test -f "$ac_dir/install-sh"; then
6971 ac_aux_dir=$ac_dir
6972 ac_install_sh="$ac_aux_dir/install-sh -c"
6973 break
6974 elif test -f "$ac_dir/install.sh"; then
6975 ac_aux_dir=$ac_dir
6976 ac_install_sh="$ac_aux_dir/install.sh -c"
6977 break
6978 elif test -f "$ac_dir/shtool"; then
6979 ac_aux_dir=$ac_dir
6980 ac_install_sh="$ac_aux_dir/shtool install -c"
6981 break
6982 fi
6983done
6984if test -z "$ac_aux_dir"; then
6985 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
6986fi
6987
6988# These three variables are undocumented and unsupported,
6989# and are intended to be withdrawn in a future Autoconf release.
6990# They can cause serious problems if a builder's source tree is in a directory
6991# whose full name contains unusual characters.
6992ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6993ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6994ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6995
6996
6997
7a6dbc2f
SDJ
6998
6999
7000
7001
7002
7003
5e8754f9
SDJ
7004 LIBC_FATAL_STDERR_=1
7005 export LIBC_FATAL_STDERR_
7a6dbc2f 7006
5e8754f9
SDJ
7007ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7008if test "x$ac_cv_type_size_t" = xyes; then :
7a6dbc2f 7009
5e8754f9 7010else
7a6dbc2f 7011
5e8754f9
SDJ
7012cat >>confdefs.h <<_ACEOF
7013#define size_t unsigned int
7014_ACEOF
7a6dbc2f 7015
5e8754f9 7016fi
7a6dbc2f 7017
5e8754f9
SDJ
7018# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7019# for constant arguments. Useless!
7020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7021$as_echo_n "checking for working alloca.h... " >&6; }
7022if ${ac_cv_working_alloca_h+:} false; then :
c971b7fa 7023 $as_echo_n "(cached) " >&6
7a6dbc2f 7024else
5e8754f9
SDJ
7025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7026/* end confdefs.h. */
7027#include <alloca.h>
7028int
7029main ()
7030{
7031char *p = (char *) alloca (2 * sizeof (int));
7032 if (p) return 0;
7033 ;
7034 return 0;
7035}
7036_ACEOF
7037if ac_fn_c_try_link "$LINENO"; then :
7038 ac_cv_working_alloca_h=yes
7039else
7040 ac_cv_working_alloca_h=no
7041fi
7042rm -f core conftest.err conftest.$ac_objext \
7043 conftest$ac_exeext conftest.$ac_ext
7044fi
7045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7046$as_echo "$ac_cv_working_alloca_h" >&6; }
7047if test $ac_cv_working_alloca_h = yes; then
7a6dbc2f 7048
5e8754f9
SDJ
7049$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7050
7051fi
7a6dbc2f 7052
5e8754f9
SDJ
7053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7054$as_echo_n "checking for alloca... " >&6; }
7055if ${ac_cv_func_alloca_works+:} false; then :
7056 $as_echo_n "(cached) " >&6
c971b7fa
PA
7057else
7058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7059/* end confdefs.h. */
5e8754f9
SDJ
7060#ifdef __GNUC__
7061# define alloca __builtin_alloca
7062#else
7063# ifdef _MSC_VER
7064# include <malloc.h>
7065# define alloca _alloca
7066# else
7067# ifdef HAVE_ALLOCA_H
7068# include <alloca.h>
7069# else
7070# ifdef _AIX
7071 #pragma alloca
7072# else
7073# ifndef alloca /* predefined by HP cc +Olibcalls */
7074void *alloca (size_t);
7075# endif
7076# endif
7077# endif
7078# endif
7079#endif
7a6dbc2f 7080
5e8754f9
SDJ
7081int
7082main ()
7a6dbc2f 7083{
5e8754f9
SDJ
7084char *p = (char *) alloca (1);
7085 if (p) return 0;
7086 ;
7087 return 0;
7a6dbc2f 7088}
c971b7fa 7089_ACEOF
5e8754f9
SDJ
7090if ac_fn_c_try_link "$LINENO"; then :
7091 ac_cv_func_alloca_works=yes
c971b7fa 7092else
5e8754f9 7093 ac_cv_func_alloca_works=no
7a6dbc2f 7094fi
5e8754f9
SDJ
7095rm -f core conftest.err conftest.$ac_objext \
7096 conftest$ac_exeext conftest.$ac_ext
c0fc7f8b 7097fi
5e8754f9
SDJ
7098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7099$as_echo "$ac_cv_func_alloca_works" >&6; }
98399780 7100
5e8754f9 7101if test $ac_cv_func_alloca_works = yes; then
98399780 7102
5e8754f9 7103$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
472fa5ee 7104
5e8754f9
SDJ
7105else
7106 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7107# that cause trouble. Some versions do not even contain alloca or
7108# contain a buggy version. If you still want to use their alloca,
7109# use ar to extract alloca.o from them instead of compiling alloca.c.
472fa5ee
SM
7110
7111
7112
7113
7114
5e8754f9 7115ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
472fa5ee 7116
5e8754f9 7117$as_echo "#define C_ALLOCA 1" >>confdefs.h
472fa5ee
SM
7118
7119
5e8754f9
SDJ
7120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7121$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7122if ${ac_cv_os_cray+:} false; then :
7123 $as_echo_n "(cached) " >&6
7124else
7125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7126/* end confdefs.h. */
7127#if defined CRAY && ! defined CRAY2
7128webecray
7129#else
7130wenotbecray
7131#endif
472fa5ee 7132
5e8754f9
SDJ
7133_ACEOF
7134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7135 $EGREP "webecray" >/dev/null 2>&1; then :
7136 ac_cv_os_cray=yes
7137else
7138 ac_cv_os_cray=no
7139fi
7140rm -f conftest*
472fa5ee 7141
5e8754f9
SDJ
7142fi
7143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7144$as_echo "$ac_cv_os_cray" >&6; }
7145if test $ac_cv_os_cray = yes; then
7146 for ac_func in _getb67 GETB67 getb67; do
7147 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7148ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7149if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
472fa5ee 7150
5e8754f9
SDJ
7151cat >>confdefs.h <<_ACEOF
7152#define CRAY_STACKSEG_END $ac_func
7153_ACEOF
472fa5ee 7154
5e8754f9
SDJ
7155 break
7156fi
472fa5ee 7157
5e8754f9
SDJ
7158 done
7159fi
472fa5ee 7160
5e8754f9
SDJ
7161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7162$as_echo_n "checking stack direction for C alloca... " >&6; }
7163if ${ac_cv_c_stack_direction+:} false; then :
7164 $as_echo_n "(cached) " >&6
7165else
7166 if test "$cross_compiling" = yes; then :
7167 ac_cv_c_stack_direction=0
7168else
7169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7170/* end confdefs.h. */
7171$ac_includes_default
7172int
7173find_stack_direction (int *addr, int depth)
7174{
7175 int dir, dummy = 0;
7176 if (! addr)
7177 addr = &dummy;
7178 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7179 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7180 return dir + dummy;
7181}
472fa5ee 7182
5e8754f9
SDJ
7183int
7184main (int argc, char **argv)
7185{
7186 return find_stack_direction (0, argc + !argv + 20) < 0;
7187}
7188_ACEOF
7189if ac_fn_c_try_run "$LINENO"; then :
7190 ac_cv_c_stack_direction=1
7191else
7192 ac_cv_c_stack_direction=-1
7193fi
7194rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7195 conftest.$ac_objext conftest.beam conftest.$ac_ext
7196fi
472fa5ee 7197
5e8754f9
SDJ
7198fi
7199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7200$as_echo "$ac_cv_c_stack_direction" >&6; }
7201cat >>confdefs.h <<_ACEOF
7202#define STACK_DIRECTION $ac_cv_c_stack_direction
7203_ACEOF
472fa5ee 7204
98399780 7205
5e8754f9 7206fi
98399780
YQ
7207
7208
725e2999
JB
7209 GNULIB_INET_NTOP=0;
7210 GNULIB_INET_PTON=0;
7211 HAVE_DECL_INET_NTOP=1;
7212 HAVE_DECL_INET_PTON=1;
7213 REPLACE_INET_NTOP=0;
7214 REPLACE_INET_PTON=0;
7215
7216
7217
7218
7219
7220 for ac_header in $gl_header_list
7221do :
7222 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7223ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7224if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7225 cat >>confdefs.h <<_ACEOF
7226#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7227_ACEOF
7228
7229fi
7230
7231done
7232
7233
7234
7235
7236
7237
7238
7239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7240$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7241if ${gl_cv_have_include_next+:} false; then :
7242 $as_echo_n "(cached) " >&6
7243else
7244 rm -rf conftestd1a conftestd1b conftestd2
7245 mkdir conftestd1a conftestd1b conftestd2
7246 cat <<EOF > conftestd1a/conftest.h
7247#define DEFINED_IN_CONFTESTD1
7248#include_next <conftest.h>
7249#ifdef DEFINED_IN_CONFTESTD2
7250int foo;
7251#else
7252#error "include_next doesn't work"
7253#endif
7254EOF
7255 cat <<EOF > conftestd1b/conftest.h
7256#define DEFINED_IN_CONFTESTD1
7257#include <stdio.h>
7258#include_next <conftest.h>
7259#ifdef DEFINED_IN_CONFTESTD2
7260int foo;
7261#else
7262#error "include_next doesn't work"
7263#endif
7264EOF
7265 cat <<EOF > conftestd2/conftest.h
7266#ifndef DEFINED_IN_CONFTESTD1
7267#error "include_next test doesn't work"
7268#endif
7269#define DEFINED_IN_CONFTESTD2
7270EOF
7271 gl_save_CPPFLAGS="$CPPFLAGS"
7272 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7274/* end confdefs.h. */
7275#include <conftest.h>
7276_ACEOF
7277if ac_fn_c_try_compile "$LINENO"; then :
7278 gl_cv_have_include_next=yes
7279else
7280 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7282/* end confdefs.h. */
7283#include <conftest.h>
7284_ACEOF
7285if ac_fn_c_try_compile "$LINENO"; then :
7286 gl_cv_have_include_next=buggy
7287else
7288 gl_cv_have_include_next=no
7289fi
7290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7291
7292fi
7293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7294 CPPFLAGS="$gl_save_CPPFLAGS"
7295 rm -rf conftestd1a conftestd1b conftestd2
7296
7297fi
7298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7299$as_echo "$gl_cv_have_include_next" >&6; }
7300 PRAGMA_SYSTEM_HEADER=
7301 if test $gl_cv_have_include_next = yes; then
7302 INCLUDE_NEXT=include_next
7303 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7304 if test -n "$GCC"; then
7305 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7306 fi
7307 else
7308 if test $gl_cv_have_include_next = buggy; then
7309 INCLUDE_NEXT=include
7310 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7311 else
7312 INCLUDE_NEXT=include
7313 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7314 fi
7315 fi
7316
7317
7318
7319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7320$as_echo_n "checking whether system header files limit the line length... " >&6; }
7321if ${gl_cv_pragma_columns+:} false; then :
7322 $as_echo_n "(cached) " >&6
7323else
7324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7325/* end confdefs.h. */
7326
7327#ifdef __TANDEM
7328choke me
7329#endif
7330
7331_ACEOF
7332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7333 $EGREP "choke me" >/dev/null 2>&1; then :
7334 gl_cv_pragma_columns=yes
7335else
7336 gl_cv_pragma_columns=no
7337fi
7338rm -f conftest*
7339
7340
7341fi
7342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7343$as_echo "$gl_cv_pragma_columns" >&6; }
7344 if test $gl_cv_pragma_columns = yes; then
7345 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7346 else
7347 PRAGMA_COLUMNS=
7348 fi
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358 :
7359
7360
7361
7362
7363
7364 if test $ac_cv_header_features_h = yes; then
7365 HAVE_FEATURES_H=1
7366 else
7367 HAVE_FEATURES_H=0
7368 fi
7369
7370
7371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7372$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7373if test -z "$MKDIR_P"; then
7374 if ${ac_cv_path_mkdir+:} false; then :
7375 $as_echo_n "(cached) " >&6
7376else
7377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7378for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7379do
7380 IFS=$as_save_IFS
7381 test -z "$as_dir" && as_dir=.
7382 for ac_prog in mkdir gmkdir; do
7383 for ac_exec_ext in '' $ac_executable_extensions; do
7384 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7385 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7386 'mkdir (GNU coreutils) '* | \
7387 'mkdir (coreutils) '* | \
7388 'mkdir (fileutils) '4.1*)
7389 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7390 break 3;;
7391 esac
7392 done
7393 done
7394 done
7395IFS=$as_save_IFS
7396
7397fi
7398
7399 test -d ./--version && rmdir ./--version
7400 if test "${ac_cv_path_mkdir+set}" = set; then
7401 MKDIR_P="$ac_cv_path_mkdir -p"
7402 else
7403 # As a last resort, use the slow shell script. Don't cache a
7404 # value for MKDIR_P within a source directory, because that will
7405 # break other packages using the cache if that directory is
7406 # removed, or if the value is a relative name.
7407 MKDIR_P="$ac_install_sh -d"
7408 fi
7409fi
7410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7411$as_echo "$MKDIR_P" >&6; }
7412
7413
5e8754f9
SDJ
7414 GNULIB__EXIT=0;
7415 GNULIB_ATOLL=0;
7416 GNULIB_CALLOC_POSIX=0;
7417 GNULIB_CANONICALIZE_FILE_NAME=0;
7418 GNULIB_GETLOADAVG=0;
7419 GNULIB_GETSUBOPT=0;
7420 GNULIB_GRANTPT=0;
7421 GNULIB_MALLOC_POSIX=0;
7422 GNULIB_MBTOWC=0;
7423 GNULIB_MKDTEMP=0;
7424 GNULIB_MKOSTEMP=0;
7425 GNULIB_MKOSTEMPS=0;
7426 GNULIB_MKSTEMP=0;
7427 GNULIB_MKSTEMPS=0;
7428 GNULIB_POSIX_OPENPT=0;
7429 GNULIB_PTSNAME=0;
7430 GNULIB_PTSNAME_R=0;
7431 GNULIB_PUTENV=0;
7432 GNULIB_QSORT_R=0;
7433 GNULIB_RANDOM=0;
7434 GNULIB_RANDOM_R=0;
7435 GNULIB_REALLOC_POSIX=0;
7436 GNULIB_REALPATH=0;
7437 GNULIB_RPMATCH=0;
7438 GNULIB_SECURE_GETENV=0;
7439 GNULIB_SETENV=0;
7440 GNULIB_STRTOD=0;
7441 GNULIB_STRTOLL=0;
7442 GNULIB_STRTOULL=0;
7443 GNULIB_SYSTEM_POSIX=0;
7444 GNULIB_UNLOCKPT=0;
7445 GNULIB_UNSETENV=0;
7446 GNULIB_WCTOMB=0;
7447 HAVE__EXIT=1;
7448 HAVE_ATOLL=1;
7449 HAVE_CANONICALIZE_FILE_NAME=1;
7450 HAVE_DECL_GETLOADAVG=1;
7451 HAVE_GETSUBOPT=1;
7452 HAVE_GRANTPT=1;
7453 HAVE_MKDTEMP=1;
7454 HAVE_MKOSTEMP=1;
7455 HAVE_MKOSTEMPS=1;
7456 HAVE_MKSTEMP=1;
7457 HAVE_MKSTEMPS=1;
7458 HAVE_POSIX_OPENPT=1;
7459 HAVE_PTSNAME=1;
7460 HAVE_PTSNAME_R=1;
7461 HAVE_QSORT_R=1;
7462 HAVE_RANDOM=1;
7463 HAVE_RANDOM_H=1;
7464 HAVE_RANDOM_R=1;
7465 HAVE_REALPATH=1;
7466 HAVE_RPMATCH=1;
7467 HAVE_SECURE_GETENV=1;
7468 HAVE_SETENV=1;
7469 HAVE_DECL_SETENV=1;
7470 HAVE_STRTOD=1;
7471 HAVE_STRTOLL=1;
7472 HAVE_STRTOULL=1;
7473 HAVE_STRUCT_RANDOM_DATA=1;
7474 HAVE_SYS_LOADAVG_H=0;
7475 HAVE_UNLOCKPT=1;
7476 HAVE_DECL_UNSETENV=1;
7477 REPLACE_CALLOC=0;
7478 REPLACE_CANONICALIZE_FILE_NAME=0;
7479 REPLACE_MALLOC=0;
7480 REPLACE_MBTOWC=0;
7481 REPLACE_MKSTEMP=0;
7482 REPLACE_PTSNAME=0;
7483 REPLACE_PTSNAME_R=0;
7484 REPLACE_PUTENV=0;
7485 REPLACE_QSORT_R=0;
7486 REPLACE_RANDOM_R=0;
7487 REPLACE_REALLOC=0;
7488 REPLACE_REALPATH=0;
7489 REPLACE_SETENV=0;
7490 REPLACE_STRTOD=0;
7491 REPLACE_UNSETENV=0;
7492 REPLACE_WCTOMB=0;
6ec2e0f5
SDJ
7493
7494
7495
7496
472fa5ee 7497
5e8754f9
SDJ
7498 for ac_func in $gl_func_list
7499do :
7500 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7501ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7502if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7503 cat >>confdefs.h <<_ACEOF
7504#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7505_ACEOF
472fa5ee 7506
5e8754f9
SDJ
7507fi
7508done
472fa5ee
SM
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
472fa5ee
SM
7523
7524
7525
5e8754f9
SDJ
7526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7527$as_echo_n "checking whether // is distinct from /... " >&6; }
7528if ${gl_cv_double_slash_root+:} false; then :
7529 $as_echo_n "(cached) " >&6
7530else
7531 if test x"$cross_compiling" = xyes ; then
7532 # When cross-compiling, there is no way to tell whether // is special
7533 # short of a list of hosts. However, the only known hosts to date
7534 # that have a distinct // are Apollo DomainOS (too old to port to),
7535 # Cygwin, and z/OS. If anyone knows of another system for which // has
7536 # special semantics and is distinct from /, please report it to
7537 # <bug-gnulib@gnu.org>.
7538 case $host in
7539 *-cygwin | i370-ibm-openedition)
7540 gl_cv_double_slash_root=yes ;;
7541 *)
7542 # Be optimistic and assume that / and // are the same when we
7543 # don't know.
7544 gl_cv_double_slash_root='unknown, assuming no' ;;
7545 esac
7546 else
7547 set x `ls -di / // 2>/dev/null`
7548 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7549 gl_cv_double_slash_root=no
7550 else
7551 gl_cv_double_slash_root=yes
7552 fi
7553 fi
7554fi
7555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7556$as_echo "$gl_cv_double_slash_root" >&6; }
7557 if test "$gl_cv_double_slash_root" = yes; then
6ec2e0f5 7558
5e8754f9 7559$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6ec2e0f5 7560
5e8754f9 7561 fi
6ec2e0f5 7562
6ec2e0f5 7563
6ec2e0f5
SDJ
7564
7565
7566
7567
7568
7569
5e8754f9 7570 :
6ec2e0f5 7571
472fa5ee
SM
7572
7573
7574
7575
5e8754f9
SDJ
7576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
7577$as_echo_n "checking whether realpath works... " >&6; }
7578if ${gl_cv_func_realpath_works+:} false; then :
7579 $as_echo_n "(cached) " >&6
7580else
472fa5ee 7581
5e8754f9
SDJ
7582 touch conftest.a
7583 mkdir conftest.d
7584 if test "$cross_compiling" = yes; then :
7585 case "$host_os" in
7586 # Guess yes on glibc systems.
7587 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
7588 # If we don't know, assume the worst.
7589 *) gl_cv_func_realpath_works="guessing no" ;;
7590 esac
472fa5ee 7591
5e8754f9
SDJ
7592else
7593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7594/* end confdefs.h. */
e26b6bb0
TT
7595
7596
7597
5e8754f9
SDJ
7598#include <stdlib.h>
7599#if defined __MACH__ && defined __APPLE__
7600/* Avoid a crash on Mac OS X. */
7601#include <mach/mach.h>
7602#include <mach/mach_error.h>
7603#include <mach/thread_status.h>
7604#include <mach/exception.h>
7605#include <mach/task.h>
7606#include <pthread.h>
7607/* The exception port on which our thread listens. */
7608static mach_port_t our_exception_port;
7609/* The main function of the thread listening for exceptions of type
7610 EXC_BAD_ACCESS. */
7611static void *
7612mach_exception_thread (void *arg)
7613{
7614 /* Buffer for a message to be received. */
7615 struct {
7616 mach_msg_header_t head;
7617 mach_msg_body_t msgh_body;
7618 char data[1024];
7619 } msg;
7620 mach_msg_return_t retval;
7621 /* Wait for a message on the exception port. */
7622 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
7623 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
7624 if (retval != MACH_MSG_SUCCESS)
7625 abort ();
7626 exit (1);
7627}
7628static void
7629nocrash_init (void)
7630{
7631 mach_port_t self = mach_task_self ();
7632 /* Allocate a port on which the thread shall listen for exceptions. */
7633 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
7634 == KERN_SUCCESS) {
7635 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
7636 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
7637 MACH_MSG_TYPE_MAKE_SEND)
7638 == KERN_SUCCESS) {
7639 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
7640 for us. */
7641 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
7642 /* Create the thread listening on the exception port. */
7643 pthread_attr_t attr;
7644 pthread_t thread;
7645 if (pthread_attr_init (&attr) == 0
7646 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
7647 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
7648 pthread_attr_destroy (&attr);
7649 /* Replace the exception port info for these exceptions with our own.
7650 Note that we replace the exception port for the entire task, not only
7651 for a particular thread. This has the effect that when our exception
7652 port gets the message, the thread specific exception port has already
7653 been asked, and we don't need to bother about it.
7654 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
7655 task_set_exception_ports (self, mask, our_exception_port,
7656 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
7657 }
7658 }
7659 }
7660}
7661#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7662/* Avoid a crash on native Windows. */
7663#define WIN32_LEAN_AND_MEAN
7664#include <windows.h>
7665#include <winerror.h>
7666static LONG WINAPI
7667exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
7668{
7669 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
7670 {
7671 case EXCEPTION_ACCESS_VIOLATION:
7672 case EXCEPTION_IN_PAGE_ERROR:
7673 case EXCEPTION_STACK_OVERFLOW:
7674 case EXCEPTION_GUARD_PAGE:
7675 case EXCEPTION_PRIV_INSTRUCTION:
7676 case EXCEPTION_ILLEGAL_INSTRUCTION:
7677 case EXCEPTION_DATATYPE_MISALIGNMENT:
7678 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
7679 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
7680 exit (1);
7681 }
7682 return EXCEPTION_CONTINUE_SEARCH;
7683}
7684static void
7685nocrash_init (void)
7686{
7687 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
7688}
e26b6bb0 7689#else
5e8754f9
SDJ
7690/* Avoid a crash on POSIX systems. */
7691#include <signal.h>
7692#include <unistd.h>
7693/* A POSIX signal handler. */
7694static void
7695exception_handler (int sig)
7696{
7697 _exit (1);
7698}
7699static void
7700nocrash_init (void)
7701{
7702#ifdef SIGSEGV
7703 signal (SIGSEGV, exception_handler);
88b48903 7704#endif
5e8754f9
SDJ
7705#ifdef SIGBUS
7706 signal (SIGBUS, exception_handler);
88b48903 7707#endif
5e8754f9 7708}
88b48903 7709#endif
88b48903 7710
5e8754f9
SDJ
7711 #include <stdlib.h>
7712 #include <string.h>
88b48903 7713
5e8754f9
SDJ
7714int
7715main ()
7716{
88b48903 7717
5e8754f9
SDJ
7718 int result = 0;
7719 {
7720 char *name = realpath ("conftest.a", NULL);
7721 if (!(name && *name == '/'))
7722 result |= 1;
7723 free (name);
7724 }
7725 {
7726 char *name = realpath ("conftest.b/../conftest.a", NULL);
7727 if (name != NULL)
7728 result |= 2;
7729 free (name);
7730 }
7731 {
7732 char *name = realpath ("conftest.a/", NULL);
7733 if (name != NULL)
7734 result |= 4;
7735 free (name);
7736 }
7737 {
7738 char *name1 = realpath (".", NULL);
7739 char *name2 = realpath ("conftest.d//./..", NULL);
7740 if (! name1 || ! name2 || strcmp (name1, name2))
7741 result |= 8;
7742 free (name1);
7743 free (name2);
7744 }
7745 return result;
88b48903 7746
5e8754f9
SDJ
7747 ;
7748 return 0;
7749}
88b48903
WN
7750
7751_ACEOF
5e8754f9
SDJ
7752if ac_fn_c_try_run "$LINENO"; then :
7753 gl_cv_func_realpath_works=yes
88b48903 7754else
5e8754f9
SDJ
7755 gl_cv_func_realpath_works=no
7756fi
7757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7758 conftest.$ac_objext conftest.beam conftest.$ac_ext
88b48903 7759fi
88b48903 7760
5e8754f9 7761 rm -rf conftest.a conftest.d
88b48903
WN
7762
7763fi
5e8754f9
SDJ
7764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
7765$as_echo "$gl_cv_func_realpath_works" >&6; }
7766 case "$gl_cv_func_realpath_works" in
7767 *yes)
88b48903 7768
5e8754f9 7769$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
88b48903 7770
5e8754f9
SDJ
7771 ;;
7772 esac
88b48903
WN
7773
7774
e26b6bb0 7775
e26b6bb0 7776
3d99e817 7777
472fa5ee
SM
7778
7779
7780
7781
5e8754f9 7782 :
472fa5ee
SM
7783
7784
3d99e817 7785
3d99e817 7786
3d99e817 7787
3d99e817 7788
3d99e817 7789
3d99e817
AK
7790
7791
3d99e817
AK
7792
7793
7794
18848e28 7795
18848e28 7796
5e8754f9 7797 :
18848e28 7798
18848e28
GF
7799
7800
18848e28
GF
7801
7802
7803
7804
5e8754f9
SDJ
7805 GNULIB_CHDIR=0;
7806 GNULIB_CHOWN=0;
7807 GNULIB_CLOSE=0;
7808 GNULIB_DUP=0;
7809 GNULIB_DUP2=0;
7810 GNULIB_DUP3=0;
7811 GNULIB_ENVIRON=0;
7812 GNULIB_EUIDACCESS=0;
7813 GNULIB_FACCESSAT=0;
7814 GNULIB_FCHDIR=0;
7815 GNULIB_FCHOWNAT=0;
7816 GNULIB_FDATASYNC=0;
7817 GNULIB_FSYNC=0;
7818 GNULIB_FTRUNCATE=0;
7819 GNULIB_GETCWD=0;
7820 GNULIB_GETDOMAINNAME=0;
7821 GNULIB_GETDTABLESIZE=0;
7822 GNULIB_GETGROUPS=0;
7823 GNULIB_GETHOSTNAME=0;
7824 GNULIB_GETLOGIN=0;
7825 GNULIB_GETLOGIN_R=0;
7826 GNULIB_GETPAGESIZE=0;
7827 GNULIB_GETUSERSHELL=0;
7828 GNULIB_GROUP_MEMBER=0;
7829 GNULIB_ISATTY=0;
7830 GNULIB_LCHOWN=0;
7831 GNULIB_LINK=0;
7832 GNULIB_LINKAT=0;
7833 GNULIB_LSEEK=0;
7834 GNULIB_PIPE=0;
7835 GNULIB_PIPE2=0;
7836 GNULIB_PREAD=0;
7837 GNULIB_PWRITE=0;
7838 GNULIB_READ=0;
7839 GNULIB_READLINK=0;
7840 GNULIB_READLINKAT=0;
7841 GNULIB_RMDIR=0;
7842 GNULIB_SETHOSTNAME=0;
7843 GNULIB_SLEEP=0;
7844 GNULIB_SYMLINK=0;
7845 GNULIB_SYMLINKAT=0;
7846 GNULIB_TTYNAME_R=0;
7847 GNULIB_UNISTD_H_NONBLOCKING=0;
7848 GNULIB_UNISTD_H_SIGPIPE=0;
7849 GNULIB_UNLINK=0;
7850 GNULIB_UNLINKAT=0;
7851 GNULIB_USLEEP=0;
7852 GNULIB_WRITE=0;
7853 HAVE_CHOWN=1;
7854 HAVE_DUP2=1;
7855 HAVE_DUP3=1;
7856 HAVE_EUIDACCESS=1;
7857 HAVE_FACCESSAT=1;
7858 HAVE_FCHDIR=1;
7859 HAVE_FCHOWNAT=1;
7860 HAVE_FDATASYNC=1;
7861 HAVE_FSYNC=1;
7862 HAVE_FTRUNCATE=1;
7863 HAVE_GETDTABLESIZE=1;
7864 HAVE_GETGROUPS=1;
7865 HAVE_GETHOSTNAME=1;
7866 HAVE_GETLOGIN=1;
7867 HAVE_GETPAGESIZE=1;
7868 HAVE_GROUP_MEMBER=1;
7869 HAVE_LCHOWN=1;
7870 HAVE_LINK=1;
7871 HAVE_LINKAT=1;
7872 HAVE_PIPE=1;
7873 HAVE_PIPE2=1;
7874 HAVE_PREAD=1;
7875 HAVE_PWRITE=1;
7876 HAVE_READLINK=1;
7877 HAVE_READLINKAT=1;
7878 HAVE_SETHOSTNAME=1;
7879 HAVE_SLEEP=1;
7880 HAVE_SYMLINK=1;
7881 HAVE_SYMLINKAT=1;
7882 HAVE_UNLINKAT=1;
7883 HAVE_USLEEP=1;
7884 HAVE_DECL_ENVIRON=1;
7885 HAVE_DECL_FCHDIR=1;
7886 HAVE_DECL_FDATASYNC=1;
7887 HAVE_DECL_GETDOMAINNAME=1;
7888 HAVE_DECL_GETLOGIN_R=1;
7889 HAVE_DECL_GETPAGESIZE=1;
7890 HAVE_DECL_GETUSERSHELL=1;
7891 HAVE_DECL_SETHOSTNAME=1;
7892 HAVE_DECL_TTYNAME_R=1;
7893 HAVE_OS_H=0;
7894 HAVE_SYS_PARAM_H=0;
7895 REPLACE_CHOWN=0;
7896 REPLACE_CLOSE=0;
7897 REPLACE_DUP=0;
7898 REPLACE_DUP2=0;
7899 REPLACE_FCHOWNAT=0;
7900 REPLACE_FTRUNCATE=0;
7901 REPLACE_GETCWD=0;
7902 REPLACE_GETDOMAINNAME=0;
7903 REPLACE_GETDTABLESIZE=0;
7904 REPLACE_GETLOGIN_R=0;
7905 REPLACE_GETGROUPS=0;
7906 REPLACE_GETPAGESIZE=0;
7907 REPLACE_ISATTY=0;
7908 REPLACE_LCHOWN=0;
7909 REPLACE_LINK=0;
7910 REPLACE_LINKAT=0;
7911 REPLACE_LSEEK=0;
7912 REPLACE_PREAD=0;
7913 REPLACE_PWRITE=0;
7914 REPLACE_READ=0;
7915 REPLACE_READLINK=0;
7916 REPLACE_READLINKAT=0;
7917 REPLACE_RMDIR=0;
7918 REPLACE_SLEEP=0;
7919 REPLACE_SYMLINK=0;
7920 REPLACE_SYMLINKAT=0;
7921 REPLACE_TTYNAME_R=0;
7922 REPLACE_UNLINK=0;
7923 REPLACE_UNLINKAT=0;
7924 REPLACE_USLEEP=0;
7925 REPLACE_WRITE=0;
7926 UNISTD_H_HAVE_WINSOCK2_H=0;
7927 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
18848e28
GF
7928
7929
7930
7931
18848e28 7932
4a626d0a
PA
7933
7934
18848e28 7935
4a626d0a 7936
5e8754f9 7937 :
4a626d0a 7938
4a626d0a
PA
7939
7940
18848e28 7941
18848e28
GF
7942
7943
7944
7945
18848e28 7946
18848e28
GF
7947
7948
18848e28 7949
18848e28 7950
18848e28 7951
18848e28 7952
18848e28 7953
5e8754f9 7954 :
18848e28 7955
18848e28 7956
18848e28 7957
18848e28 7958
18848e28 7959
5e8754f9
SDJ
7960 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7961 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
18848e28 7962
5e8754f9 7963$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
18848e28 7964
5e8754f9
SDJ
7965 else
7966 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
18848e28
GF
7967 fi
7968
7969
18848e28 7970
18848e28 7971
18848e28 7972
18848e28 7973
18848e28 7974
18848e28 7975
18848e28 7976
18848e28 7977
18848e28 7978
18848e28 7979
18848e28 7980
5e8754f9
SDJ
7981 GNULIB_OPENDIR=0;
7982 GNULIB_READDIR=0;
7983 GNULIB_REWINDDIR=0;
7984 GNULIB_CLOSEDIR=0;
7985 GNULIB_DIRFD=0;
7986 GNULIB_FDOPENDIR=0;
7987 GNULIB_SCANDIR=0;
7988 GNULIB_ALPHASORT=0;
7989 HAVE_OPENDIR=1;
7990 HAVE_READDIR=1;
7991 HAVE_REWINDDIR=1;
7992 HAVE_CLOSEDIR=1;
7993 HAVE_DECL_DIRFD=1;
7994 HAVE_DECL_FDOPENDIR=1;
7995 HAVE_FDOPENDIR=1;
7996 HAVE_SCANDIR=1;
7997 HAVE_ALPHASORT=1;
7998 REPLACE_OPENDIR=0;
7999 REPLACE_CLOSEDIR=0;
8000 REPLACE_DIRFD=0;
8001 REPLACE_FDOPENDIR=0;
18848e28 8002
18848e28
GF
8003
8004
63ce7108
TT
8005
8006
8007
8008
8009
8010
8011
8012
5e8754f9 8013 :
63ce7108 8014
472fa5ee
SM
8015
8016
8017
8018
8019
472fa5ee 8020
5e8754f9
SDJ
8021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
8022$as_echo_n "checking if environ is properly declared... " >&6; }
8023 if ${gt_cv_var_environ_declaration+:} false; then :
8024 $as_echo_n "(cached) " >&6
8025else
472fa5ee 8026
5e8754f9
SDJ
8027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8028/* end confdefs.h. */
8029#if HAVE_UNISTD_H
8030 #include <unistd.h>
8031 #endif
8032 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
8033 #include <stdlib.h>
472fa5ee 8034
5e8754f9
SDJ
8035 extern struct { int foo; } environ;
8036int
8037main ()
8038{
8039environ.foo = 1;
8040 ;
8041 return 0;
8042}
8043_ACEOF
8044if ac_fn_c_try_compile "$LINENO"; then :
8045 gt_cv_var_environ_declaration=no
8046else
8047 gt_cv_var_environ_declaration=yes
8048fi
8049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8050fi
472fa5ee 8051
5e8754f9
SDJ
8052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
8053$as_echo "$gt_cv_var_environ_declaration" >&6; }
8054 if test $gt_cv_var_environ_declaration = yes; then
472fa5ee 8055
5e8754f9 8056$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
472fa5ee 8057
5e8754f9 8058 fi
472fa5ee
SM
8059
8060
5e8754f9
SDJ
8061 if test $gt_cv_var_environ_declaration != yes; then
8062 HAVE_DECL_ENVIRON=0
8063 fi
472fa5ee
SM
8064
8065
8066
5e8754f9
SDJ
8067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8068$as_echo_n "checking for complete errno.h... " >&6; }
8069if ${gl_cv_header_errno_h_complete+:} false; then :
6ec2e0f5
SDJ
8070 $as_echo_n "(cached) " >&6
8071else
7a6dbc2f 8072
5e8754f9 8073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 8074/* end confdefs.h. */
63ce7108 8075
5e8754f9
SDJ
8076#include <errno.h>
8077#if !defined ETXTBSY
8078booboo
8079#endif
8080#if !defined ENOMSG
8081booboo
8082#endif
8083#if !defined EIDRM
8084booboo
8085#endif
8086#if !defined ENOLINK
8087booboo
8088#endif
8089#if !defined EPROTO
8090booboo
8091#endif
8092#if !defined EMULTIHOP
8093booboo
8094#endif
8095#if !defined EBADMSG
8096booboo
8097#endif
8098#if !defined EOVERFLOW
8099booboo
8100#endif
8101#if !defined ENOTSUP
8102booboo
8103#endif
8104#if !defined ENETRESET
8105booboo
8106#endif
8107#if !defined ECONNABORTED
8108booboo
8109#endif
8110#if !defined ESTALE
8111booboo
8112#endif
8113#if !defined EDQUOT
8114booboo
8115#endif
8116#if !defined ECANCELED
8117booboo
8118#endif
8119#if !defined EOWNERDEAD
8120booboo
8121#endif
8122#if !defined ENOTRECOVERABLE
8123booboo
8124#endif
8125#if !defined EILSEQ
8126booboo
8127#endif
6ec2e0f5 8128
6ec2e0f5 8129_ACEOF
5e8754f9
SDJ
8130if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8131 $EGREP "booboo" >/dev/null 2>&1; then :
8132 gl_cv_header_errno_h_complete=no
6ec2e0f5 8133else
5e8754f9 8134 gl_cv_header_errno_h_complete=yes
6ec2e0f5 8135fi
5e8754f9 8136rm -f conftest*
6ec2e0f5 8137
6ec2e0f5
SDJ
8138
8139fi
5e8754f9
SDJ
8140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8141$as_echo "$gl_cv_header_errno_h_complete" >&6; }
8142 if test $gl_cv_header_errno_h_complete = yes; then
8143 ERRNO_H=''
8144 else
472fa5ee
SM
8145
8146
8147
8148
8149
8150
8151
8152
7a6dbc2f 8153 if test $gl_cv_have_include_next = yes; then
5e8754f9 8154 gl_cv_next_errno_h='<'errno.h'>'
7a6dbc2f 8155 else
5e8754f9
SDJ
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8157$as_echo_n "checking absolute name of <errno.h>... " >&6; }
8158if ${gl_cv_next_errno_h+:} false; then :
7a6dbc2f
SDJ
8159 $as_echo_n "(cached) " >&6
8160else
472fa5ee 8161
472fa5ee
SM
8162
8163
7a6dbc2f
SDJ
8164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8165/* end confdefs.h. */
5e8754f9 8166#include <errno.h>
7a6dbc2f
SDJ
8167_ACEOF
8168 case "$host_os" in
8169 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8170 *) gl_absname_cpp="$ac_cpp" ;;
8171 esac
472fa5ee 8172
7a6dbc2f
SDJ
8173 case "$host_os" in
8174 mingw*)
8175 gl_dirsep_regex='[/\\]'
8176 ;;
8177 *)
8178 gl_dirsep_regex='\/'
8179 ;;
8180 esac
8181 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5e8754f9 8182 gl_header_literal_regex=`echo 'errno.h' \
7a6dbc2f
SDJ
8183 | sed -e "$gl_make_literal_regex_sed"`
8184 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8185 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8186 s|^/[^/]|//&|
8187 p
8188 q
8189 }'
8190
5e8754f9 8191 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7a6dbc2f
SDJ
8192 sed -n "$gl_absolute_header_sed"`
8193
5e8754f9
SDJ
8194 gl_header=$gl_cv_absolute_errno_h
8195 gl_cv_next_errno_h='"'$gl_header'"'
7a6dbc2f
SDJ
8196
8197
8198fi
5e8754f9
SDJ
8199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8200$as_echo "$gl_cv_next_errno_h" >&6; }
7a6dbc2f 8201 fi
5e8754f9 8202 NEXT_ERRNO_H=$gl_cv_next_errno_h
7a6dbc2f
SDJ
8203
8204 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8205 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5e8754f9 8206 gl_next_as_first_directive='<'errno.h'>'
7a6dbc2f
SDJ
8207 else
8208 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5e8754f9 8209 gl_next_as_first_directive=$gl_cv_next_errno_h
7a6dbc2f 8210 fi
5e8754f9 8211 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7a6dbc2f
SDJ
8212
8213
8214
8215
5e8754f9 8216 ERRNO_H='errno.h'
7a6dbc2f
SDJ
8217 fi
8218
5e8754f9
SDJ
8219 if test -n "$ERRNO_H"; then
8220 GL_GENERATE_ERRNO_H_TRUE=
8221 GL_GENERATE_ERRNO_H_FALSE='#'
7a6dbc2f 8222else
5e8754f9
SDJ
8223 GL_GENERATE_ERRNO_H_TRUE='#'
8224 GL_GENERATE_ERRNO_H_FALSE=
7a6dbc2f
SDJ
8225fi
8226
8227
5e8754f9
SDJ
8228 if test -n "$ERRNO_H"; then
8229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8230$as_echo_n "checking for EMULTIHOP value... " >&6; }
8231if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
8232 $as_echo_n "(cached) " >&6
8233else
7a6dbc2f 8234
5e8754f9
SDJ
8235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8236/* end confdefs.h. */
7a6dbc2f 8237
5e8754f9
SDJ
8238#include <errno.h>
8239#ifdef EMULTIHOP
8240yes
8241#endif
7a6dbc2f 8242
7a6dbc2f 8243_ACEOF
5e8754f9
SDJ
8244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8245 $EGREP "yes" >/dev/null 2>&1; then :
8246 gl_cv_header_errno_h_EMULTIHOP=yes
7a6dbc2f 8247else
5e8754f9 8248 gl_cv_header_errno_h_EMULTIHOP=no
7a6dbc2f 8249fi
5e8754f9 8250rm -f conftest*
7a6dbc2f 8251
5e8754f9
SDJ
8252 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8254/* end confdefs.h. */
7a6dbc2f 8255
5e8754f9
SDJ
8256#define _XOPEN_SOURCE_EXTENDED 1
8257#include <errno.h>
8258#ifdef EMULTIHOP
8259yes
8260#endif
7a6dbc2f 8261
5e8754f9
SDJ
8262_ACEOF
8263if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8264 $EGREP "yes" >/dev/null 2>&1; then :
8265 gl_cv_header_errno_h_EMULTIHOP=hidden
8266fi
8267rm -f conftest*
7a6dbc2f 8268
5e8754f9
SDJ
8269 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8270 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
8271#define _XOPEN_SOURCE_EXTENDED 1
8272#include <errno.h>
8273/* The following two lines are a workaround against an autoconf-2.52 bug. */
8274#include <stdio.h>
8275#include <stdlib.h>
8276"; then :
7a6dbc2f 8277
5e8754f9 8278fi
7a6dbc2f 8279
5e8754f9
SDJ
8280 fi
8281 fi
7a6dbc2f 8282
5e8754f9
SDJ
8283fi
8284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8285$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8286 case $gl_cv_header_errno_h_EMULTIHOP in
8287 yes | no)
8288 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8289 ;;
8290 *)
8291 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8292 ;;
8293 esac
7a6dbc2f
SDJ
8294
8295
5e8754f9 8296 fi
7a6dbc2f
SDJ
8297
8298
5e8754f9
SDJ
8299 if test -n "$ERRNO_H"; then
8300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8301$as_echo_n "checking for ENOLINK value... " >&6; }
8302if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
8303 $as_echo_n "(cached) " >&6
8304else
7a6dbc2f 8305
5e8754f9
SDJ
8306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8307/* end confdefs.h. */
7a6dbc2f 8308
5e8754f9
SDJ
8309#include <errno.h>
8310#ifdef ENOLINK
8311yes
8312#endif
7a6dbc2f 8313
5e8754f9
SDJ
8314_ACEOF
8315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8316 $EGREP "yes" >/dev/null 2>&1; then :
8317 gl_cv_header_errno_h_ENOLINK=yes
8318else
8319 gl_cv_header_errno_h_ENOLINK=no
8320fi
8321rm -f conftest*
7a6dbc2f 8322
5e8754f9
SDJ
8323 if test $gl_cv_header_errno_h_ENOLINK = no; then
8324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8325/* end confdefs.h. */
7a6dbc2f 8326
5e8754f9
SDJ
8327#define _XOPEN_SOURCE_EXTENDED 1
8328#include <errno.h>
8329#ifdef ENOLINK
8330yes
8331#endif
7a6dbc2f 8332
5e8754f9
SDJ
8333_ACEOF
8334if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8335 $EGREP "yes" >/dev/null 2>&1; then :
8336 gl_cv_header_errno_h_ENOLINK=hidden
8337fi
8338rm -f conftest*
7a6dbc2f 8339
5e8754f9
SDJ
8340 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8341 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
8342#define _XOPEN_SOURCE_EXTENDED 1
8343#include <errno.h>
8344/* The following two lines are a workaround against an autoconf-2.52 bug. */
8345#include <stdio.h>
8346#include <stdlib.h>
8347"; then :
7a6dbc2f 8348
5e8754f9 8349fi
7a6dbc2f 8350
5e8754f9
SDJ
8351 fi
8352 fi
7a6dbc2f 8353
5e8754f9
SDJ
8354fi
8355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8356$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
8357 case $gl_cv_header_errno_h_ENOLINK in
8358 yes | no)
8359 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8360 ;;
8361 *)
8362 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8363 ;;
8364 esac
7a6dbc2f
SDJ
8365
8366
5e8754f9 8367 fi
7a6dbc2f
SDJ
8368
8369
5e8754f9
SDJ
8370 if test -n "$ERRNO_H"; then
8371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8372$as_echo_n "checking for EOVERFLOW value... " >&6; }
8373if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
8374 $as_echo_n "(cached) " >&6
8375else
7a6dbc2f 8376
5e8754f9
SDJ
8377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8378/* end confdefs.h. */
7a6dbc2f 8379
5e8754f9
SDJ
8380#include <errno.h>
8381#ifdef EOVERFLOW
8382yes
8383#endif
7a6dbc2f 8384
5e8754f9
SDJ
8385_ACEOF
8386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8387 $EGREP "yes" >/dev/null 2>&1; then :
8388 gl_cv_header_errno_h_EOVERFLOW=yes
8389else
8390 gl_cv_header_errno_h_EOVERFLOW=no
8391fi
8392rm -f conftest*
7a6dbc2f 8393
5e8754f9
SDJ
8394 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8396/* end confdefs.h. */
7a6dbc2f 8397
5e8754f9
SDJ
8398#define _XOPEN_SOURCE_EXTENDED 1
8399#include <errno.h>
8400#ifdef EOVERFLOW
8401yes
8402#endif
7a6dbc2f 8403
5e8754f9
SDJ
8404_ACEOF
8405if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8406 $EGREP "yes" >/dev/null 2>&1; then :
8407 gl_cv_header_errno_h_EOVERFLOW=hidden
8408fi
8409rm -f conftest*
7a6dbc2f 8410
5e8754f9
SDJ
8411 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8412 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
8413#define _XOPEN_SOURCE_EXTENDED 1
8414#include <errno.h>
8415/* The following two lines are a workaround against an autoconf-2.52 bug. */
8416#include <stdio.h>
8417#include <stdlib.h>
8418"; then :
7a6dbc2f 8419
5e8754f9 8420fi
7a6dbc2f 8421
5e8754f9
SDJ
8422 fi
8423 fi
7a6dbc2f 8424
5e8754f9
SDJ
8425fi
8426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8427$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8428 case $gl_cv_header_errno_h_EOVERFLOW in
8429 yes | no)
8430 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8431 ;;
8432 *)
8433 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8434 ;;
8435 esac
7a6dbc2f
SDJ
8436
8437
5e8754f9 8438 fi
7a6dbc2f
SDJ
8439
8440
7a6dbc2f
SDJ
8441
8442
5abebf3c 8443$as_echo "#define HAVE_DECL_STRERROR_R 1" >>confdefs.h
7a6dbc2f 8444
5e8754f9 8445
5abebf3c 8446$as_echo "#define HAVE_STRERROR_R 1" >>confdefs.h
7a6dbc2f
SDJ
8447
8448
5abebf3c 8449$as_echo "#define STRERROR_R_CHAR_P 0" >>confdefs.h
7a6dbc2f 8450
7a6dbc2f
SDJ
8451
8452
8453
8454
8455
5e8754f9
SDJ
8456 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8457if test "x$ac_cv_have_decl_fchdir" = xyes; then :
8458 ac_have_decl=1
7a6dbc2f 8459else
5e8754f9
SDJ
8460 ac_have_decl=0
8461fi
7a6dbc2f 8462
5e8754f9
SDJ
8463cat >>confdefs.h <<_ACEOF
8464#define HAVE_DECL_FCHDIR $ac_have_decl
8465_ACEOF
7a6dbc2f 8466
7a6dbc2f 8467
7a6dbc2f 8468
5e8754f9
SDJ
8469 GNULIB_FCNTL=0;
8470 GNULIB_NONBLOCKING=0;
8471 GNULIB_OPEN=0;
8472 GNULIB_OPENAT=0;
8473 HAVE_FCNTL=1;
8474 HAVE_OPENAT=1;
8475 REPLACE_FCNTL=0;
8476 REPLACE_OPEN=0;
8477 REPLACE_OPENAT=0;
7a6dbc2f 8478
7a6dbc2f 8479
7a6dbc2f
SDJ
8480
8481
7a6dbc2f 8482
7a6dbc2f 8483
7a6dbc2f 8484
7a6dbc2f
SDJ
8485
8486
8487
7a6dbc2f 8488
7a6dbc2f 8489
7a6dbc2f 8490
7a6dbc2f 8491
7a6dbc2f 8492
5e8754f9 8493 :
7a6dbc2f
SDJ
8494
8495
8496
8497
8498
8499
5e8754f9 8500 :
7a6dbc2f 8501
7a6dbc2f 8502
7a6dbc2f
SDJ
8503
8504
7a6dbc2f 8505
5e8754f9
SDJ
8506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8507$as_echo_n "checking for working fcntl.h... " >&6; }
8508if ${gl_cv_header_working_fcntl_h+:} false; then :
88b48903
WN
8509 $as_echo_n "(cached) " >&6
8510else
5e8754f9
SDJ
8511 if test "$cross_compiling" = yes; then :
8512 gl_cv_header_working_fcntl_h=cross-compiling
8513else
8514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903 8515/* end confdefs.h. */
5e8754f9
SDJ
8516#include <sys/types.h>
8517 #include <sys/stat.h>
8518 #if HAVE_UNISTD_H
8519 # include <unistd.h>
8520 #else /* on Windows with MSVC */
8521 # include <io.h>
8522 # include <stdlib.h>
8523 # defined sleep(n) _sleep ((n) * 1000)
8524 #endif
8525 #include <fcntl.h>
8526 #ifndef O_NOATIME
8527 #define O_NOATIME 0
8528 #endif
8529 #ifndef O_NOFOLLOW
8530 #define O_NOFOLLOW 0
8531 #endif
8532 static int const constants[] =
8533 {
8534 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8535 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8536 };
8537
8538int
88b48903
WN
8539main ()
8540{
5e8754f9
SDJ
8541
8542 int result = !constants;
8543 #if HAVE_SYMLINK
8544 {
8545 static char const sym[] = "conftest.sym";
8546 if (symlink ("/dev/null", sym) != 0)
8547 result |= 2;
8548 else
8549 {
8550 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8551 if (fd >= 0)
8552 {
8553 close (fd);
8554 result |= 4;
8555 }
8556 }
8557 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8558 result |= 2;
8559 else
8560 {
8561 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8562 if (fd >= 0)
8563 {
8564 close (fd);
8565 result |= 4;
8566 }
8567 }
8568 unlink (sym);
8569 }
8570 #endif
8571 {
8572 static char const file[] = "confdefs.h";
8573 int fd = open (file, O_RDONLY | O_NOATIME);
8574 if (fd < 0)
8575 result |= 8;
8576 else
8577 {
8578 struct stat st0;
8579 if (fstat (fd, &st0) != 0)
8580 result |= 16;
8581 else
8582 {
8583 char c;
8584 sleep (1);
8585 if (read (fd, &c, 1) != 1)
8586 result |= 24;
8587 else
8588 {
8589 if (close (fd) != 0)
8590 result |= 32;
8591 else
8592 {
8593 struct stat st1;
8594 if (stat (file, &st1) != 0)
8595 result |= 40;
8596 else
8597 if (st0.st_atime != st1.st_atime)
8598 result |= 64;
8599 }
8600 }
8601 }
8602 }
8603 }
8604 return result;
88b48903
WN
8605 ;
8606 return 0;
8607}
8608_ACEOF
5e8754f9
SDJ
8609if ac_fn_c_try_run "$LINENO"; then :
8610 gl_cv_header_working_fcntl_h=yes
88b48903 8611else
5e8754f9
SDJ
8612 case $? in #(
8613 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8614 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8615 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8616 *) gl_cv_header_working_fcntl_h='no';;
8617 esac
88b48903 8618fi
5e8754f9
SDJ
8619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8620 conftest.$ac_objext conftest.beam conftest.$ac_ext
8621fi
8622
8623fi
8624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8625$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
8626
8627 case $gl_cv_header_working_fcntl_h in #(
8628 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8629 *) ac_val=1;;
8630 esac
8631
8632cat >>confdefs.h <<_ACEOF
8633#define HAVE_WORKING_O_NOATIME $ac_val
8634_ACEOF
8635
8636
8637 case $gl_cv_header_working_fcntl_h in #(
8638 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8639 *) ac_val=1;;
8640 esac
8641
8642cat >>confdefs.h <<_ACEOF
8643#define HAVE_WORKING_O_NOFOLLOW $ac_val
8644_ACEOF
8645
8646
8647ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8648if test "x$ac_cv_type_pid_t" = xyes; then :
8649
8650else
8651
8652cat >>confdefs.h <<_ACEOF
8653#define pid_t int
8654_ACEOF
8655
8656fi
8657
8658ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8659if test "x$ac_cv_type_mode_t" = xyes; then :
8660
8661else
8662
8663cat >>confdefs.h <<_ACEOF
8664#define mode_t int
8665_ACEOF
8666
8667fi
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
8682$as_echo_n "checking for mbstate_t... " >&6; }
8683if ${ac_cv_type_mbstate_t+:} false; then :
8684 $as_echo_n "(cached) " >&6
8685else
8686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8687/* end confdefs.h. */
8688$ac_includes_default
8689/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8690 <wchar.h>.
8691 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8692 included before <wchar.h>. */
8693#include <stddef.h>
8694#include <stdio.h>
8695#include <time.h>
8696#include <wchar.h>
8697int
8698main ()
8699{
8700mbstate_t x; return sizeof x;
8701 ;
8702 return 0;
8703}
8704_ACEOF
8705if ac_fn_c_try_compile "$LINENO"; then :
8706 ac_cv_type_mbstate_t=yes
8707else
8708 ac_cv_type_mbstate_t=no
8709fi
8710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8711fi
8712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
8713$as_echo "$ac_cv_type_mbstate_t" >&6; }
8714 if test $ac_cv_type_mbstate_t = yes; then
8715
8716$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
8717
8718 else
8719
8720$as_echo "#define mbstate_t int" >>confdefs.h
8721
8722 fi
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
8763
8764
8765 GNULIB_ACOSF=0;
8766 GNULIB_ACOSL=0;
8767 GNULIB_ASINF=0;
8768 GNULIB_ASINL=0;
8769 GNULIB_ATANF=0;
8770 GNULIB_ATANL=0;
8771 GNULIB_ATAN2F=0;
8772 GNULIB_CBRT=0;
8773 GNULIB_CBRTF=0;
8774 GNULIB_CBRTL=0;
8775 GNULIB_CEIL=0;
8776 GNULIB_CEILF=0;
8777 GNULIB_CEILL=0;
8778 GNULIB_COPYSIGN=0;
8779 GNULIB_COPYSIGNF=0;
8780 GNULIB_COPYSIGNL=0;
8781 GNULIB_COSF=0;
8782 GNULIB_COSL=0;
8783 GNULIB_COSHF=0;
8784 GNULIB_EXPF=0;
8785 GNULIB_EXPL=0;
8786 GNULIB_EXP2=0;
8787 GNULIB_EXP2F=0;
8788 GNULIB_EXP2L=0;
8789 GNULIB_EXPM1=0;
8790 GNULIB_EXPM1F=0;
8791 GNULIB_EXPM1L=0;
8792 GNULIB_FABSF=0;
8793 GNULIB_FABSL=0;
8794 GNULIB_FLOOR=0;
8795 GNULIB_FLOORF=0;
8796 GNULIB_FLOORL=0;
8797 GNULIB_FMA=0;
8798 GNULIB_FMAF=0;
8799 GNULIB_FMAL=0;
8800 GNULIB_FMOD=0;
8801 GNULIB_FMODF=0;
8802 GNULIB_FMODL=0;
8803 GNULIB_FREXPF=0;
8804 GNULIB_FREXP=0;
8805 GNULIB_FREXPL=0;
8806 GNULIB_HYPOT=0;
8807 GNULIB_HYPOTF=0;
8808 GNULIB_HYPOTL=0;
8809 GNULIB_ILOGB=0;
8810 GNULIB_ILOGBF=0;
8811 GNULIB_ILOGBL=0;
8812 GNULIB_ISFINITE=0;
8813 GNULIB_ISINF=0;
8814 GNULIB_ISNAN=0;
8815 GNULIB_ISNANF=0;
8816 GNULIB_ISNAND=0;
8817 GNULIB_ISNANL=0;
8818 GNULIB_LDEXPF=0;
8819 GNULIB_LDEXPL=0;
8820 GNULIB_LOG=0;
8821 GNULIB_LOGF=0;
8822 GNULIB_LOGL=0;
8823 GNULIB_LOG10=0;
8824 GNULIB_LOG10F=0;
8825 GNULIB_LOG10L=0;
8826 GNULIB_LOG1P=0;
8827 GNULIB_LOG1PF=0;
8828 GNULIB_LOG1PL=0;
8829 GNULIB_LOG2=0;
8830 GNULIB_LOG2F=0;
8831 GNULIB_LOG2L=0;
8832 GNULIB_LOGB=0;
8833 GNULIB_LOGBF=0;
8834 GNULIB_LOGBL=0;
8835 GNULIB_MODF=0;
8836 GNULIB_MODFF=0;
8837 GNULIB_MODFL=0;
8838 GNULIB_POWF=0;
8839 GNULIB_REMAINDER=0;
8840 GNULIB_REMAINDERF=0;
8841 GNULIB_REMAINDERL=0;
8842 GNULIB_RINT=0;
8843 GNULIB_RINTF=0;
8844 GNULIB_RINTL=0;
8845 GNULIB_ROUND=0;
8846 GNULIB_ROUNDF=0;
8847 GNULIB_ROUNDL=0;
8848 GNULIB_SIGNBIT=0;
8849 GNULIB_SINF=0;
8850 GNULIB_SINL=0;
8851 GNULIB_SINHF=0;
8852 GNULIB_SQRTF=0;
8853 GNULIB_SQRTL=0;
8854 GNULIB_TANF=0;
8855 GNULIB_TANL=0;
8856 GNULIB_TANHF=0;
8857 GNULIB_TRUNC=0;
8858 GNULIB_TRUNCF=0;
8859 GNULIB_TRUNCL=0;
8860 HAVE_ACOSF=1;
8861 HAVE_ACOSL=1;
8862 HAVE_ASINF=1;
8863 HAVE_ASINL=1;
8864 HAVE_ATANF=1;
8865 HAVE_ATANL=1;
8866 HAVE_ATAN2F=1;
8867 HAVE_CBRT=1;
8868 HAVE_CBRTF=1;
8869 HAVE_CBRTL=1;
8870 HAVE_COPYSIGN=1;
8871 HAVE_COPYSIGNL=1;
8872 HAVE_COSF=1;
8873 HAVE_COSL=1;
8874 HAVE_COSHF=1;
8875 HAVE_EXPF=1;
8876 HAVE_EXPL=1;
8877 HAVE_EXPM1=1;
8878 HAVE_EXPM1F=1;
8879 HAVE_FABSF=1;
8880 HAVE_FABSL=1;
8881 HAVE_FMA=1;
8882 HAVE_FMAF=1;
8883 HAVE_FMAL=1;
8884 HAVE_FMODF=1;
8885 HAVE_FMODL=1;
8886 HAVE_FREXPF=1;
8887 HAVE_HYPOTF=1;
8888 HAVE_HYPOTL=1;
8889 HAVE_ILOGB=1;
8890 HAVE_ILOGBF=1;
8891 HAVE_ILOGBL=1;
8892 HAVE_ISNANF=1;
8893 HAVE_ISNAND=1;
8894 HAVE_ISNANL=1;
8895 HAVE_LDEXPF=1;
8896 HAVE_LOGF=1;
8897 HAVE_LOGL=1;
8898 HAVE_LOG10F=1;
8899 HAVE_LOG10L=1;
8900 HAVE_LOG1P=1;
8901 HAVE_LOG1PF=1;
8902 HAVE_LOG1PL=1;
8903 HAVE_LOGBF=1;
8904 HAVE_LOGBL=1;
8905 HAVE_MODFF=1;
8906 HAVE_MODFL=1;
8907 HAVE_POWF=1;
8908 HAVE_REMAINDER=1;
8909 HAVE_REMAINDERF=1;
8910 HAVE_RINT=1;
8911 HAVE_RINTL=1;
8912 HAVE_SINF=1;
8913 HAVE_SINL=1;
8914 HAVE_SINHF=1;
8915 HAVE_SQRTF=1;
8916 HAVE_SQRTL=1;
8917 HAVE_TANF=1;
8918 HAVE_TANL=1;
8919 HAVE_TANHF=1;
8920 HAVE_DECL_ACOSL=1;
8921 HAVE_DECL_ASINL=1;
8922 HAVE_DECL_ATANL=1;
8923 HAVE_DECL_CBRTF=1;
8924 HAVE_DECL_CBRTL=1;
8925 HAVE_DECL_CEILF=1;
8926 HAVE_DECL_CEILL=1;
8927 HAVE_DECL_COPYSIGNF=1;
8928 HAVE_DECL_COSL=1;
8929 HAVE_DECL_EXPL=1;
8930 HAVE_DECL_EXP2=1;
8931 HAVE_DECL_EXP2F=1;
8932 HAVE_DECL_EXP2L=1;
8933 HAVE_DECL_EXPM1L=1;
8934 HAVE_DECL_FLOORF=1;
8935 HAVE_DECL_FLOORL=1;
8936 HAVE_DECL_FREXPL=1;
8937 HAVE_DECL_LDEXPL=1;
8938 HAVE_DECL_LOGL=1;
8939 HAVE_DECL_LOG10L=1;
8940 HAVE_DECL_LOG2=1;
8941 HAVE_DECL_LOG2F=1;
8942 HAVE_DECL_LOG2L=1;
8943 HAVE_DECL_LOGB=1;
8944 HAVE_DECL_REMAINDER=1;
8945 HAVE_DECL_REMAINDERL=1;
8946 HAVE_DECL_RINTF=1;
8947 HAVE_DECL_ROUND=1;
8948 HAVE_DECL_ROUNDF=1;
8949 HAVE_DECL_ROUNDL=1;
8950 HAVE_DECL_SINL=1;
8951 HAVE_DECL_SQRTL=1;
8952 HAVE_DECL_TANL=1;
8953 HAVE_DECL_TRUNC=1;
8954 HAVE_DECL_TRUNCF=1;
8955 HAVE_DECL_TRUNCL=1;
8956 REPLACE_CBRTF=0;
8957 REPLACE_CBRTL=0;
8958 REPLACE_CEIL=0;
8959 REPLACE_CEILF=0;
8960 REPLACE_CEILL=0;
8961 REPLACE_EXPM1=0;
8962 REPLACE_EXPM1F=0;
8963 REPLACE_EXP2=0;
8964 REPLACE_EXP2L=0;
8965 REPLACE_FABSL=0;
8966 REPLACE_FLOOR=0;
8967 REPLACE_FLOORF=0;
8968 REPLACE_FLOORL=0;
8969 REPLACE_FMA=0;
8970 REPLACE_FMAF=0;
8971 REPLACE_FMAL=0;
8972 REPLACE_FMOD=0;
8973 REPLACE_FMODF=0;
8974 REPLACE_FMODL=0;
8975 REPLACE_FREXPF=0;
8976 REPLACE_FREXP=0;
8977 REPLACE_FREXPL=0;
8978 REPLACE_HUGE_VAL=0;
8979 REPLACE_HYPOT=0;
8980 REPLACE_HYPOTF=0;
8981 REPLACE_HYPOTL=0;
8982 REPLACE_ILOGB=0;
8983 REPLACE_ILOGBF=0;
8984 REPLACE_ISFINITE=0;
8985 REPLACE_ISINF=0;
8986 REPLACE_ISNAN=0;
8987 REPLACE_LDEXPL=0;
8988 REPLACE_LOG=0;
8989 REPLACE_LOGF=0;
8990 REPLACE_LOGL=0;
8991 REPLACE_LOG10=0;
8992 REPLACE_LOG10F=0;
8993 REPLACE_LOG10L=0;
8994 REPLACE_LOG1P=0;
8995 REPLACE_LOG1PF=0;
8996 REPLACE_LOG1PL=0;
8997 REPLACE_LOG2=0;
8998 REPLACE_LOG2F=0;
8999 REPLACE_LOG2L=0;
9000 REPLACE_LOGB=0;
9001 REPLACE_LOGBF=0;
9002 REPLACE_LOGBL=0;
9003 REPLACE_MODF=0;
9004 REPLACE_MODFF=0;
9005 REPLACE_MODFL=0;
9006 REPLACE_NAN=0;
9007 REPLACE_REMAINDER=0;
9008 REPLACE_REMAINDERF=0;
9009 REPLACE_REMAINDERL=0;
9010 REPLACE_ROUND=0;
9011 REPLACE_ROUNDF=0;
9012 REPLACE_ROUNDL=0;
9013 REPLACE_SIGNBIT=0;
9014 REPLACE_SIGNBIT_USING_GCC=0;
9015 REPLACE_SQRTL=0;
9016 REPLACE_TRUNC=0;
9017 REPLACE_TRUNCF=0;
9018 REPLACE_TRUNCL=0;
88b48903 9019
472fa5ee 9020
5e8754f9
SDJ
9021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
9022$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
9023if ${gl_cv_func_frexp_no_libm+:} false; then :
7a6dbc2f 9024 $as_echo_n "(cached) " >&6
4a626d0a 9025else
88b48903 9026
5e8754f9 9027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7a6dbc2f
SDJ
9028/* end confdefs.h. */
9029#include <math.h>
5e8754f9 9030 double x;
7a6dbc2f
SDJ
9031int
9032main ()
9033{
5e8754f9 9034int e; return frexp (x, &e) > 0;
7a6dbc2f
SDJ
9035 ;
9036 return 0;
9037}
4a626d0a 9038_ACEOF
7a6dbc2f 9039if ac_fn_c_try_link "$LINENO"; then :
5e8754f9 9040 gl_cv_func_frexp_no_libm=yes
7a6dbc2f 9041else
5e8754f9 9042 gl_cv_func_frexp_no_libm=no
7a6dbc2f
SDJ
9043fi
9044rm -f core conftest.err conftest.$ac_objext \
9045 conftest$ac_exeext conftest.$ac_ext
88b48903 9046
7a6dbc2f 9047fi
5e8754f9
SDJ
9048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
9049$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
88b48903 9050
472fa5ee 9051
5e8754f9
SDJ
9052 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
9053if test "x$ac_cv_have_decl_alarm" = xyes; then :
9054 ac_have_decl=1
7a6dbc2f 9055else
5e8754f9
SDJ
9056 ac_have_decl=0
9057fi
7a6dbc2f 9058
5e8754f9
SDJ
9059cat >>confdefs.h <<_ACEOF
9060#define HAVE_DECL_ALARM $ac_have_decl
9061_ACEOF
7a6dbc2f 9062
7a6dbc2f 9063
5e8754f9
SDJ
9064
9065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9066$as_echo_n "checking whether long double and double are the same... " >&6; }
9067if ${gl_cv_long_double_equals_double+:} false; then :
9068 $as_echo_n "(cached) " >&6
88b48903
WN
9069else
9070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9071/* end confdefs.h. */
9072#include <float.h>
5e8754f9
SDJ
9073int
9074main ()
88b48903 9075{
5e8754f9
SDJ
9076typedef int check[sizeof (long double) == sizeof (double)
9077 && LDBL_MANT_DIG == DBL_MANT_DIG
9078 && LDBL_MAX_EXP == DBL_MAX_EXP
9079 && LDBL_MIN_EXP == DBL_MIN_EXP
9080 ? 1 : -1];
9081
9082 ;
9083 return 0;
88b48903
WN
9084}
9085_ACEOF
5e8754f9
SDJ
9086if ac_fn_c_try_compile "$LINENO"; then :
9087 gl_cv_long_double_equals_double=yes
88b48903 9088else
5e8754f9 9089 gl_cv_long_double_equals_double=no
88b48903 9090fi
5e8754f9 9091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
88b48903
WN
9092
9093fi
5e8754f9
SDJ
9094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9095$as_echo "$gl_cv_long_double_equals_double" >&6; }
9096 if test $gl_cv_long_double_equals_double = yes; then
7a6dbc2f 9097
5e8754f9 9098$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
7a6dbc2f 9099
5e8754f9
SDJ
9100 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9101 else
9102 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
88b48903
WN
9103 fi
9104
9105
4a626d0a 9106
6ec2e0f5
SDJ
9107 GNULIB_FCHMODAT=0;
9108 GNULIB_FSTAT=0;
9109 GNULIB_FSTATAT=0;
9110 GNULIB_FUTIMENS=0;
9111 GNULIB_LCHMOD=0;
9112 GNULIB_LSTAT=0;
9113 GNULIB_MKDIRAT=0;
9114 GNULIB_MKFIFO=0;
9115 GNULIB_MKFIFOAT=0;
9116 GNULIB_MKNOD=0;
9117 GNULIB_MKNODAT=0;
9118 GNULIB_STAT=0;
9119 GNULIB_UTIMENSAT=0;
9120 HAVE_FCHMODAT=1;
9121 HAVE_FSTATAT=1;
9122 HAVE_FUTIMENS=1;
9123 HAVE_LCHMOD=1;
9124 HAVE_LSTAT=1;
9125 HAVE_MKDIRAT=1;
9126 HAVE_MKFIFO=1;
9127 HAVE_MKFIFOAT=1;
9128 HAVE_MKNOD=1;
9129 HAVE_MKNODAT=1;
9130 HAVE_UTIMENSAT=1;
9131 REPLACE_FSTAT=0;
9132 REPLACE_FSTATAT=0;
9133 REPLACE_FUTIMENS=0;
9134 REPLACE_LSTAT=0;
9135 REPLACE_MKDIR=0;
9136 REPLACE_MKFIFO=0;
9137 REPLACE_MKNOD=0;
9138 REPLACE_STAT=0;
9139 REPLACE_UTIMENSAT=0;
9140
9141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
9142$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
d0ac1c44 9143if ${ac_cv_header_stat_broken+:} false; then :
6ec2e0f5
SDJ
9144 $as_echo_n "(cached) " >&6
9145else
9146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9147/* end confdefs.h. */
9148#include <sys/types.h>
9149#include <sys/stat.h>
9150
9151#if defined S_ISBLK && defined S_IFDIR
9152extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
9153#endif
9154
9155#if defined S_ISBLK && defined S_IFCHR
9156extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
9157#endif
9158
9159#if defined S_ISLNK && defined S_IFREG
9160extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
9161#endif
9162
9163#if defined S_ISSOCK && defined S_IFREG
9164extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
9165#endif
4a626d0a 9166
4a626d0a
PA
9167_ACEOF
9168if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
9169 ac_cv_header_stat_broken=no
9170else
9171 ac_cv_header_stat_broken=yes
4a626d0a
PA
9172fi
9173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9174fi
9175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
9176$as_echo "$ac_cv_header_stat_broken" >&6; }
9177if test $ac_cv_header_stat_broken = yes; then
9178
9179$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
4a626d0a
PA
9180
9181fi
4a626d0a 9182
4a626d0a
PA
9183
9184
4a626d0a
PA
9185
9186
472fa5ee
SM
9187
9188
9189
6ec2e0f5
SDJ
9190 case "$host_os" in
9191 mingw*)
9192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
9193$as_echo_n "checking for 64-bit off_t... " >&6; }
d0ac1c44 9194if ${gl_cv_type_off_t_64+:} false; then :
6ec2e0f5
SDJ
9195 $as_echo_n "(cached) " >&6
9196else
9197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9198/* end confdefs.h. */
9199#include <sys/types.h>
9200 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
9201
9202int
9203main ()
9204{
9205
9206 ;
9207 return 0;
9208}
9209_ACEOF
9210if ac_fn_c_try_compile "$LINENO"; then :
9211 gl_cv_type_off_t_64=yes
9212else
9213 gl_cv_type_off_t_64=no
9214fi
9215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4a626d0a 9216
6ec2e0f5
SDJ
9217fi
9218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
9219$as_echo "$gl_cv_type_off_t_64" >&6; }
9220 if test $gl_cv_type_off_t_64 = no; then
9221 WINDOWS_64_BIT_OFF_T=1
9222 else
7a6dbc2f
SDJ
9223 WINDOWS_64_BIT_OFF_T=0
9224 fi
5e8754f9 9225 WINDOWS_64_BIT_ST_SIZE=1
6ec2e0f5
SDJ
9226 ;;
9227 *)
9228 WINDOWS_64_BIT_OFF_T=0
9229 WINDOWS_64_BIT_ST_SIZE=0
9230 ;;
9231 esac
4a626d0a
PA
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
472fa5ee
SM
9244 :
9245
9246
9247
9248
9249
4a626d0a
PA
9250
9251
9252
9253 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9254 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a 9255 else
6ec2e0f5
SDJ
9256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
9257$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 9258if ${gl_cv_next_sys_stat_h+:} false; then :
4a626d0a
PA
9259 $as_echo_n "(cached) " >&6
9260else
9261
6ec2e0f5 9262 if test $ac_cv_header_sys_stat_h = yes; then
4a626d0a
PA
9263
9264
9265
9266
9267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9268/* end confdefs.h. */
6ec2e0f5 9269#include <sys/stat.h>
4a626d0a
PA
9270_ACEOF
9271 case "$host_os" in
9272 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9273 *) gl_absname_cpp="$ac_cpp" ;;
9274 esac
9275
9276 case "$host_os" in
9277 mingw*)
9278 gl_dirsep_regex='[/\\]'
9279 ;;
9280 *)
9281 gl_dirsep_regex='\/'
9282 ;;
9283 esac
9284 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9285 gl_header_literal_regex=`echo 'sys/stat.h' \
4a626d0a
PA
9286 | sed -e "$gl_make_literal_regex_sed"`
9287 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9288 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9289 s|^/[^/]|//&|
9290 p
9291 q
9292 }'
9293
6ec2e0f5 9294 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
9295 sed -n "$gl_absolute_header_sed"`
9296
6ec2e0f5
SDJ
9297 gl_header=$gl_cv_absolute_sys_stat_h
9298 gl_cv_next_sys_stat_h='"'$gl_header'"'
4a626d0a 9299 else
6ec2e0f5 9300 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a
PA
9301 fi
9302
9303
9304fi
6ec2e0f5
SDJ
9305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
9306$as_echo "$gl_cv_next_sys_stat_h" >&6; }
4a626d0a 9307 fi
6ec2e0f5 9308 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
4a626d0a
PA
9309
9310 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9311 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 9312 gl_next_as_first_directive='<'sys/stat.h'>'
4a626d0a
PA
9313 else
9314 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 9315 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
4a626d0a 9316 fi
6ec2e0f5 9317 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
4a626d0a
PA
9318
9319
9320
9321
9322
4a626d0a
PA
9323
9324
9325
9326
9327
4a626d0a 9328
5e8754f9 9329 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
4a626d0a 9330
5e8754f9 9331$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
4a626d0a 9332
5e8754f9 9333 fi
4a626d0a 9334
6ec2e0f5
SDJ
9335 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
9336 #include <sys/stat.h>
9337"
d0ac1c44 9338if test "x$ac_cv_type_nlink_t" = xyes; then :
6ec2e0f5
SDJ
9339
9340else
4a626d0a 9341
6ec2e0f5
SDJ
9342$as_echo "#define nlink_t int" >>confdefs.h
9343
9344fi
9345
9346
9347
5e8754f9
SDJ
9348 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
9349 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9351$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9352if eval \${$as_gl_Symbol+:} false; then :
9353 $as_echo_n "(cached) " >&6
9354else
9355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9356/* end confdefs.h. */
9357#include <sys/stat.h>
9358
9359int
9360main ()
9361{
9362#undef $gl_func
9363 (void) $gl_func;
9364 ;
9365 return 0;
9366}
9367_ACEOF
9368if ac_fn_c_try_compile "$LINENO"; then :
9369 eval "$as_gl_Symbol=yes"
9370else
9371 eval "$as_gl_Symbol=no"
9372fi
9373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9374fi
9375eval ac_res=\$$as_gl_Symbol
9376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9377$as_echo "$ac_res" >&6; }
9378 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9379 cat >>confdefs.h <<_ACEOF
9380#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9381_ACEOF
4a626d0a 9382
5e8754f9
SDJ
9383 eval ac_cv_have_decl_$gl_func=yes
9384fi
9385 done
6ec2e0f5
SDJ
9386
9387
9388
5e8754f9 9389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
6ec2e0f5 9390$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
d0ac1c44 9391if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
4a626d0a
PA
9392 $as_echo_n "(cached) " >&6
9393else
6ec2e0f5
SDJ
9394 rm -f conftest.sym conftest.file
9395 echo >conftest.file
9396 if test "$cross_compiling" = yes; then :
9397 case "$host_os" in
5e8754f9 9398 *-gnu*)
6ec2e0f5
SDJ
9399 # Guess yes on glibc systems.
9400 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9401 *)
9402 # If we don't know, assume the worst.
9403 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
9404 esac
4a626d0a 9405
6ec2e0f5
SDJ
9406else
9407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9408/* end confdefs.h. */
9409$ac_includes_default
4a626d0a
PA
9410int
9411main ()
9412{
6ec2e0f5
SDJ
9413struct stat sbuf;
9414 if (symlink ("conftest.file", "conftest.sym") != 0)
9415 return 1;
9416 /* Linux will dereference the symlink and fail, as required by
9417 POSIX. That is better in the sense that it means we will not
9418 have to compile and use the lstat wrapper. */
9419 return lstat ("conftest.sym/", &sbuf) == 0;
4a626d0a
PA
9420
9421 ;
9422 return 0;
9423}
9424_ACEOF
6ec2e0f5
SDJ
9425if ac_fn_c_try_run "$LINENO"; then :
9426 gl_cv_func_lstat_dereferences_slashed_symlink=yes
4a626d0a 9427else
6ec2e0f5
SDJ
9428 gl_cv_func_lstat_dereferences_slashed_symlink=no
9429fi
9430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9431 conftest.$ac_objext conftest.beam conftest.$ac_ext
4a626d0a 9432fi
6ec2e0f5
SDJ
9433
9434 rm -f conftest.sym conftest.file
4a626d0a
PA
9435
9436fi
6ec2e0f5
SDJ
9437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9438$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9439 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
9440 *yes)
4a626d0a 9441
6ec2e0f5
SDJ
9442cat >>confdefs.h <<_ACEOF
9443#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9444_ACEOF
4a626d0a 9445
6ec2e0f5
SDJ
9446 ;;
9447 esac
9448
9449
9450
9451
9452
472fa5ee
SM
9453
9454
9455
9456 :
9457
9458
9459
9460
9461
6ec2e0f5
SDJ
9462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
9463$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
d0ac1c44 9464if ${gl_cv_func_getcwd_null+:} false; then :
4a626d0a 9465 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
9466else
9467 if test "$cross_compiling" = yes; then :
9468 case "$host_os" in
5e8754f9
SDJ
9469 # Guess yes on glibc systems.
9470 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
9471 # Guess yes on Cygwin.
9472 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
9473 # If we don't know, assume the worst.
9474 *) gl_cv_func_getcwd_null="guessing no";;
6ec2e0f5
SDJ
9475 esac
9476
4a626d0a
PA
9477else
9478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9479/* end confdefs.h. */
9480
6ec2e0f5
SDJ
9481# include <stdlib.h>
9482# if HAVE_UNISTD_H
9483# include <unistd.h>
9484# else /* on Windows with MSVC */
9485# include <direct.h>
9486# endif
9487# ifndef getcwd
9488 char *getcwd ();
9489# endif
9490
9491int
9492main ()
9493{
9494
5e8754f9 9495#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
9496/* mingw cwd does not start with '/', but getcwd does allocate.
9497 However, mingw fails to honor non-zero size. */
9498#else
9499 if (chdir ("/") != 0)
9500 return 1;
9501 else
9502 {
9503 char *f = getcwd (NULL, 0);
9504 if (! f)
9505 return 2;
9506 if (f[0] != '/')
5e8754f9 9507 return 3;
6ec2e0f5 9508 if (f[1] != '\0')
5e8754f9 9509 return 4;
6ec2e0f5
SDJ
9510 free (f);
9511 return 0;
9512 }
4a626d0a 9513#endif
4a626d0a 9514
6ec2e0f5
SDJ
9515 ;
9516 return 0;
9517}
9518_ACEOF
9519if ac_fn_c_try_run "$LINENO"; then :
9520 gl_cv_func_getcwd_null=yes
9521else
9522 gl_cv_func_getcwd_null=no
9523fi
9524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9525 conftest.$ac_objext conftest.beam conftest.$ac_ext
9526fi
9527
9528fi
9529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
9530$as_echo "$gl_cv_func_getcwd_null" >&6; }
9531
9532
9533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
9534$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
d0ac1c44 9535if ${gl_cv_func_getcwd_posix_signature+:} false; then :
6ec2e0f5
SDJ
9536 $as_echo_n "(cached) " >&6
9537else
9538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9539/* end confdefs.h. */
9540#include <unistd.h>
4a626d0a
PA
9541int
9542main ()
9543{
6ec2e0f5
SDJ
9544extern
9545 #ifdef __cplusplus
9546 "C"
9547 #endif
9548 char *getcwd (char *, size_t);
9549
4a626d0a
PA
9550 ;
9551 return 0;
9552}
6ec2e0f5 9553
4a626d0a
PA
9554_ACEOF
9555if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9556 gl_cv_func_getcwd_posix_signature=yes
4a626d0a 9557else
6ec2e0f5 9558 gl_cv_func_getcwd_posix_signature=no
4a626d0a
PA
9559fi
9560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 9561
4a626d0a 9562fi
6ec2e0f5
SDJ
9563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
9564$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
9565
472fa5ee
SM
9566
9567 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
d0ac1c44 9568if test "x$ac_cv_have_decl_getcwd" = xyes; then :
6ec2e0f5
SDJ
9569 ac_have_decl=1
9570else
9571 ac_have_decl=0
9572fi
9573
9574cat >>confdefs.h <<_ACEOF
9575#define HAVE_DECL_GETCWD $ac_have_decl
4a626d0a
PA
9576_ACEOF
9577
6ec2e0f5
SDJ
9578
9579
472fa5ee
SM
9580
9581
9582
9583
9584
9585 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
d0ac1c44 9586if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
6ec2e0f5
SDJ
9587 ac_have_decl=1
9588else
9589 ac_have_decl=0
4a626d0a 9590fi
4a626d0a 9591
6ec2e0f5
SDJ
9592cat >>confdefs.h <<_ACEOF
9593#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
9594_ACEOF
9595
472fa5ee
SM
9596
9597
9598 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
d0ac1c44 9599if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
6ec2e0f5
SDJ
9600 ac_have_decl=1
9601else
9602 ac_have_decl=0
9603fi
9604
9605cat >>confdefs.h <<_ACEOF
9606#define HAVE_DECL_GETLOGIN_R $ac_have_decl
9607_ACEOF
9608
9609
9610
472fa5ee
SM
9611
9612
9613
9614
9615
9616 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
d0ac1c44 9617if test "x$ac_cv_have_decl_getlogin" = xyes; then :
6ec2e0f5
SDJ
9618 ac_have_decl=1
9619else
9620 ac_have_decl=0
9621fi
9622
9623cat >>confdefs.h <<_ACEOF
9624#define HAVE_DECL_GETLOGIN $ac_have_decl
9625_ACEOF
9626
9627
9628
9629
7a6dbc2f
SDJ
9630
9631
6ec2e0f5 9632
472fa5ee
SM
9633
9634
9635
9636
9637
6ec2e0f5
SDJ
9638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
9639$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
d0ac1c44 9640if ${ac_cv_c_restrict+:} false; then :
6ec2e0f5
SDJ
9641 $as_echo_n "(cached) " >&6
9642else
9643 ac_cv_c_restrict=no
9644 # The order here caters to the fact that C++ does not require restrict.
9645 for ac_kw in __restrict __restrict__ _Restrict restrict; do
9646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9647/* end confdefs.h. */
9648typedef int *int_ptr;
5e8754f9
SDJ
9649 int foo (int_ptr $ac_kw ip) { return ip[0]; }
9650 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
9651 int bar (int ip[$ac_kw]) { return ip[0]; }
6ec2e0f5
SDJ
9652
9653int
9654main ()
9655{
9656int s[1];
5e8754f9
SDJ
9657 int *$ac_kw t = s;
9658 t[0] = 0;
9659 return foo (t) + bar (t);
6ec2e0f5
SDJ
9660
9661 ;
9662 return 0;
9663}
9664_ACEOF
9665if ac_fn_c_try_compile "$LINENO"; then :
9666 ac_cv_c_restrict=$ac_kw
9667fi
9668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9669 test "$ac_cv_c_restrict" != no && break
9670 done
9671
9672fi
9673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
9674$as_echo "$ac_cv_c_restrict" >&6; }
9675
9676 case $ac_cv_c_restrict in
9677 restrict) ;;
9678 no) $as_echo "#define restrict /**/" >>confdefs.h
9679 ;;
9680 *) cat >>confdefs.h <<_ACEOF
9681#define restrict $ac_cv_c_restrict
9682_ACEOF
9683 ;;
9684 esac
4a626d0a
PA
9685
9686
5e8754f9
SDJ
9687 GNULIB_GETTIMEOFDAY=0;
9688 HAVE_GETTIMEOFDAY=1;
9689 HAVE_STRUCT_TIMEVAL=1;
9690 HAVE_SYS_TIME_H=1;
9691 HAVE_TIMEZONE_T=0;
9692 REPLACE_GETTIMEOFDAY=0;
9693 REPLACE_STRUCT_TIMEVAL=0;
9694
9695
4a626d0a
PA
9696
9697
88b48903 9698
49e4877c
PA
9699
9700
9701
9702
9703
472fa5ee
SM
9704 :
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716 :
9717
9718
49e4877c
PA
9719
9720
9721
9722
9723
9724
9725 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9726 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c 9727 else
6ec2e0f5
SDJ
9728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
9729$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
d0ac1c44 9730if ${gl_cv_next_sys_time_h+:} false; then :
49e4877c
PA
9731 $as_echo_n "(cached) " >&6
9732else
9733
6ec2e0f5 9734 if test $ac_cv_header_sys_time_h = yes; then
49e4877c
PA
9735
9736
9737
9738
9739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9740/* end confdefs.h. */
6ec2e0f5 9741#include <sys/time.h>
49e4877c
PA
9742_ACEOF
9743 case "$host_os" in
9744 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9745 *) gl_absname_cpp="$ac_cpp" ;;
9746 esac
9747
9748 case "$host_os" in
9749 mingw*)
9750 gl_dirsep_regex='[/\\]'
9751 ;;
9752 *)
9753 gl_dirsep_regex='\/'
9754 ;;
9755 esac
9756 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9757 gl_header_literal_regex=`echo 'sys/time.h' \
49e4877c
PA
9758 | sed -e "$gl_make_literal_regex_sed"`
9759 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9760 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9761 s|^/[^/]|//&|
9762 p
9763 q
9764 }'
9765
6ec2e0f5 9766 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
49e4877c
PA
9767 sed -n "$gl_absolute_header_sed"`
9768
6ec2e0f5
SDJ
9769 gl_header=$gl_cv_absolute_sys_time_h
9770 gl_cv_next_sys_time_h='"'$gl_header'"'
49e4877c 9771 else
6ec2e0f5 9772 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c
PA
9773 fi
9774
9775
9776fi
6ec2e0f5
SDJ
9777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
9778$as_echo "$gl_cv_next_sys_time_h" >&6; }
49e4877c 9779 fi
6ec2e0f5 9780 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
49e4877c
PA
9781
9782 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9783 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 9784 gl_next_as_first_directive='<'sys/time.h'>'
49e4877c
PA
9785 else
9786 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 9787 gl_next_as_first_directive=$gl_cv_next_sys_time_h
49e4877c 9788 fi
6ec2e0f5 9789 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
49e4877c
PA
9790
9791
9792
9793
9794
6ec2e0f5
SDJ
9795 if test $ac_cv_header_sys_time_h != yes; then
9796 HAVE_SYS_TIME_H=0
9797 fi
9798
9799
9800
9801
9802
472fa5ee
SM
9803 :
9804
9805
9806
9807
9808
6ec2e0f5
SDJ
9809 if test $ac_cv_header_sys_socket_h != yes; then
9810 for ac_header in winsock2.h
9811do :
9812 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 9813if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
9814 cat >>confdefs.h <<_ACEOF
9815#define HAVE_WINSOCK2_H 1
9816_ACEOF
9817
9818fi
9819
9820done
9821
9822 fi
9823 if test "$ac_cv_header_winsock2_h" = yes; then
9824 HAVE_WINSOCK2_H=1
9825 UNISTD_H_HAVE_WINSOCK2_H=1
9826 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9827 else
9828 HAVE_WINSOCK2_H=0
9829 fi
9830
9831
9832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
9833$as_echo_n "checking for struct timeval... " >&6; }
d0ac1c44 9834if ${gl_cv_sys_struct_timeval+:} false; then :
6ec2e0f5
SDJ
9835 $as_echo_n "(cached) " >&6
9836else
9837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9838/* end confdefs.h. */
9839#if HAVE_SYS_TIME_H
9840 #include <sys/time.h>
9841 #endif
9842 #include <time.h>
9843 #if HAVE_WINSOCK2_H
9844 # include <winsock2.h>
9845 #endif
9846
49e4877c
PA
9847int
9848main ()
9849{
6ec2e0f5 9850static struct timeval x; x.tv_sec = x.tv_usec;
49e4877c
PA
9851 ;
9852 return 0;
9853}
9854_ACEOF
9855if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9856 gl_cv_sys_struct_timeval=yes
49e4877c 9857else
6ec2e0f5 9858 gl_cv_sys_struct_timeval=no
49e4877c
PA
9859fi
9860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49e4877c 9861
49e4877c 9862fi
6ec2e0f5
SDJ
9863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
9864$as_echo "$gl_cv_sys_struct_timeval" >&6; }
9865 if test $gl_cv_sys_struct_timeval != yes; then
9866 HAVE_STRUCT_TIMEVAL=0
9867 else
9868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
9869$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
d0ac1c44 9870if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
8690e634
JK
9871 $as_echo_n "(cached) " >&6
9872else
6ec2e0f5 9873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9874/* end confdefs.h. */
6ec2e0f5
SDJ
9875#if HAVE_SYS_TIME_H
9876 #include <sys/time.h>
9877 #endif
9878 #include <time.h>
9879 #if HAVE_WINSOCK2_H
9880 # include <winsock2.h>
9881 #endif
8690e634 9882
8690e634
JK
9883int
9884main ()
9885{
6ec2e0f5
SDJ
9886static struct timeval x;
9887 typedef int verify_tv_sec_type[
9888 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
9889 ];
9890
8690e634
JK
9891 ;
9892 return 0;
9893}
8690e634 9894_ACEOF
6ec2e0f5
SDJ
9895if ac_fn_c_try_compile "$LINENO"; then :
9896 gl_cv_sys_struct_timeval_tv_sec=yes
8690e634 9897else
6ec2e0f5 9898 gl_cv_sys_struct_timeval_tv_sec=no
8690e634 9899fi
6ec2e0f5 9900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9901
6ec2e0f5 9902fi
725e2999
JB
9903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
9904$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
9905 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
9906 REPLACE_STRUCT_TIMEVAL=1
9907 fi
9908 fi
9909
9910
9911 for gl_func in gettimeofday; do
9912 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9914$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9915if eval \${$as_gl_Symbol+:} false; then :
9916 $as_echo_n "(cached) " >&6
9917else
9918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9919/* end confdefs.h. */
9920
9921#if HAVE_SYS_TIME_H
9922# include <sys/time.h>
9923#endif
9924#include <time.h>
9925
9926int
9927main ()
9928{
9929#undef $gl_func
9930 (void) $gl_func;
9931 ;
9932 return 0;
9933}
9934_ACEOF
9935if ac_fn_c_try_compile "$LINENO"; then :
9936 eval "$as_gl_Symbol=yes"
9937else
9938 eval "$as_gl_Symbol=no"
9939fi
9940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9941fi
9942eval ac_res=\$$as_gl_Symbol
9943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9944$as_echo "$ac_res" >&6; }
9945 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9946 cat >>confdefs.h <<_ACEOF
9947#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9948_ACEOF
9949
9950 eval ac_cv_have_decl_$gl_func=yes
9951fi
9952 done
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979 GNULIB_SOCKET=0;
9980 GNULIB_CONNECT=0;
9981 GNULIB_ACCEPT=0;
9982 GNULIB_BIND=0;
9983 GNULIB_GETPEERNAME=0;
9984 GNULIB_GETSOCKNAME=0;
9985 GNULIB_GETSOCKOPT=0;
9986 GNULIB_LISTEN=0;
9987 GNULIB_RECV=0;
9988 GNULIB_SEND=0;
9989 GNULIB_RECVFROM=0;
9990 GNULIB_SENDTO=0;
9991 GNULIB_SETSOCKOPT=0;
9992 GNULIB_SHUTDOWN=0;
9993 GNULIB_ACCEPT4=0;
9994 HAVE_STRUCT_SOCKADDR_STORAGE=1;
9995 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
9996
9997 HAVE_SA_FAMILY_T=1;
9998 HAVE_ACCEPT4=1;
9999
10000
10001 :
10002
10003
10004
10005
10006
10007 if test $ac_cv_header_sys_socket_h = no; then
10008 for ac_header in ws2tcpip.h
10009do :
10010 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
10011if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
10012 cat >>confdefs.h <<_ACEOF
10013#define HAVE_WS2TCPIP_H 1
10014_ACEOF
10015
10016fi
10017
10018done
10019
10020 fi
10021
10022
10023
10024
10025
10026 case "$host_os" in
10027 osf*)
10028
10029$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
10030
10031 ;;
10032 esac
10033
10034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
10035$as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
10036if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
10037 $as_echo_n "(cached) " >&6
10038else
10039
10040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10041/* end confdefs.h. */
10042#include <sys/socket.h>
10043int
10044main ()
10045{
10046
10047 ;
10048 return 0;
10049}
10050_ACEOF
10051if ac_fn_c_try_compile "$LINENO"; then :
10052 gl_cv_header_sys_socket_h_selfcontained=yes
10053else
10054 gl_cv_header_sys_socket_h_selfcontained=no
10055fi
10056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10057
10058fi
10059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
10060$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
10061 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
10062 for ac_func in shutdown
10063do :
10064 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
10065if test "x$ac_cv_func_shutdown" = xyes; then :
10066 cat >>confdefs.h <<_ACEOF
10067#define HAVE_SHUTDOWN 1
10068_ACEOF
10069
10070fi
10071done
10072
10073 if test $ac_cv_func_shutdown = yes; then
10074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
10075$as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
10076if ${gl_cv_header_sys_socket_h_shut+:} false; then :
10077 $as_echo_n "(cached) " >&6
10078else
10079
10080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10081/* end confdefs.h. */
10082#include <sys/socket.h>
10083int
10084main ()
10085{
10086int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
10087 ;
10088 return 0;
10089}
10090_ACEOF
10091if ac_fn_c_try_compile "$LINENO"; then :
10092 gl_cv_header_sys_socket_h_shut=yes
10093else
10094 gl_cv_header_sys_socket_h_shut=no
10095fi
10096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10097
10098fi
10099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
10100$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
10101 if test $gl_cv_header_sys_socket_h_shut = no; then
10102 SYS_SOCKET_H='sys/socket.h'
10103 fi
10104 fi
10105 fi
10106 # We need to check for ws2tcpip.h now.
10107
10108
10109
10110
10111
10112
10113
10114
10115 :
10116
10117
10118
10119
10120
10121
10122
10123
10124 if test $gl_cv_have_include_next = yes; then
10125 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
10126 else
10127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
10128$as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
10129if ${gl_cv_next_sys_socket_h+:} false; then :
10130 $as_echo_n "(cached) " >&6
10131else
10132
10133 if test $ac_cv_header_sys_socket_h = yes; then
10134
10135
10136
10137
10138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10139/* end confdefs.h. */
10140#include <sys/socket.h>
10141_ACEOF
10142 case "$host_os" in
10143 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10144 *) gl_absname_cpp="$ac_cpp" ;;
10145 esac
10146
10147 case "$host_os" in
10148 mingw*)
10149 gl_dirsep_regex='[/\\]'
10150 ;;
10151 *)
10152 gl_dirsep_regex='\/'
10153 ;;
10154 esac
10155 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10156 gl_header_literal_regex=`echo 'sys/socket.h' \
10157 | sed -e "$gl_make_literal_regex_sed"`
10158 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10159 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10160 s|^/[^/]|//&|
10161 p
10162 q
10163 }'
10164
10165 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10166 sed -n "$gl_absolute_header_sed"`
10167
10168 gl_header=$gl_cv_absolute_sys_socket_h
10169 gl_cv_next_sys_socket_h='"'$gl_header'"'
10170 else
10171 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
10172 fi
10173
10174
10175fi
10176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
10177$as_echo "$gl_cv_next_sys_socket_h" >&6; }
10178 fi
10179 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
10180
10181 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10182 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10183 gl_next_as_first_directive='<'sys/socket.h'>'
10184 else
10185 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10186 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
10187 fi
10188 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
10189
10190
10191
10192
10193 if test $ac_cv_header_sys_socket_h = yes; then
10194 HAVE_SYS_SOCKET_H=1
10195 HAVE_WS2TCPIP_H=0
10196 else
10197 HAVE_SYS_SOCKET_H=0
10198 if test $ac_cv_header_ws2tcpip_h = yes; then
10199 HAVE_WS2TCPIP_H=1
10200 else
10201 HAVE_WS2TCPIP_H=0
10202 fi
10203 fi
10204
10205
10206
10207 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
10208 /* sys/types.h is not needed according to POSIX, but the
10209 sys/socket.h in i386-unknown-freebsd4.10 and
10210 powerpc-apple-darwin5.5 required it. */
10211#include <sys/types.h>
10212#ifdef HAVE_SYS_SOCKET_H
10213#include <sys/socket.h>
10214#endif
10215#ifdef HAVE_WS2TCPIP_H
10216#include <ws2tcpip.h>
10217#endif
10218
10219"
10220if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10221
10222cat >>confdefs.h <<_ACEOF
10223#define HAVE_STRUCT_SOCKADDR_STORAGE 1
10224_ACEOF
10225
10226
10227fi
10228ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
10229 /* sys/types.h is not needed according to POSIX, but the
10230 sys/socket.h in i386-unknown-freebsd4.10 and
10231 powerpc-apple-darwin5.5 required it. */
10232#include <sys/types.h>
10233#ifdef HAVE_SYS_SOCKET_H
10234#include <sys/socket.h>
10235#endif
10236#ifdef HAVE_WS2TCPIP_H
10237#include <ws2tcpip.h>
10238#endif
10239
10240"
10241if test "x$ac_cv_type_sa_family_t" = xyes; then :
10242
10243cat >>confdefs.h <<_ACEOF
10244#define HAVE_SA_FAMILY_T 1
10245_ACEOF
10246
10247
10248fi
10249
10250 if test $ac_cv_type_struct_sockaddr_storage = no; then
10251 HAVE_STRUCT_SOCKADDR_STORAGE=0
10252 fi
10253 if test $ac_cv_type_sa_family_t = no; then
10254 HAVE_SA_FAMILY_T=0
10255 fi
10256 if test $ac_cv_type_struct_sockaddr_storage != no; then
10257 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10258 #ifdef HAVE_SYS_SOCKET_H
10259 #include <sys/socket.h>
10260 #endif
10261 #ifdef HAVE_WS2TCPIP_H
10262 #include <ws2tcpip.h>
10263 #endif
10264
10265"
10266if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10267
10268cat >>confdefs.h <<_ACEOF
10269#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10270_ACEOF
10271
10272
10273else
10274 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
10275fi
10276
10277 fi
10278 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
10279 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
10280 SYS_SOCKET_H='sys/socket.h'
10281 fi
10282
10283
10284
10285
10286 :
10287
10288
10289
10290
10291
10292 if test $ac_cv_header_sys_socket_h != yes; then
10293 for ac_header in winsock2.h
10294do :
10295 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
10296if test "x$ac_cv_header_winsock2_h" = xyes; then :
10297 cat >>confdefs.h <<_ACEOF
10298#define HAVE_WINSOCK2_H 1
10299_ACEOF
10300
10301fi
10302
10303done
10304
10305 fi
10306 if test "$ac_cv_header_winsock2_h" = yes; then
10307 HAVE_WINSOCK2_H=1
10308 UNISTD_H_HAVE_WINSOCK2_H=1
10309 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
10310 else
10311 HAVE_WINSOCK2_H=0
8690e634
JK
10312 fi
10313
10314
725e2999
JB
10315
10316
10317 for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do
5e8754f9
SDJ
10318 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10320$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10321if eval \${$as_gl_Symbol+:} false; then :
8690e634 10322 $as_echo_n "(cached) " >&6
8690e634
JK
10323else
10324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10325/* end confdefs.h. */
7a6dbc2f 10326
725e2999
JB
10327/* Some systems require prerequisite headers. */
10328#include <sys/types.h>
10329#include <sys/socket.h>
8690e634 10330
5e8754f9
SDJ
10331int
10332main ()
10333{
10334#undef $gl_func
10335 (void) $gl_func;
10336 ;
10337 return 0;
10338}
10339_ACEOF
10340if ac_fn_c_try_compile "$LINENO"; then :
10341 eval "$as_gl_Symbol=yes"
7a6dbc2f 10342else
5e8754f9
SDJ
10343 eval "$as_gl_Symbol=no"
10344fi
10345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 10346fi
5e8754f9
SDJ
10347eval ac_res=\$$as_gl_Symbol
10348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10349$as_echo "$ac_res" >&6; }
10350 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
10351 cat >>confdefs.h <<_ACEOF
10352#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10353_ACEOF
7a6dbc2f 10354
5e8754f9
SDJ
10355 eval ac_cv_have_decl_$gl_func=yes
10356fi
10357 done
8690e634 10358
8690e634 10359
8690e634
JK
10360
10361
10362
10363
10364
10365
88b48903 10366
8690e634 10367
725e2999
JB
10368 :
10369
10370
10371
8690e634 10372
8690e634
JK
10373
10374
725e2999
JB
10375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
10376$as_echo_n "checking for IPv4 sockets... " >&6; }
10377 if ${gl_cv_socket_ipv4+:} false; then :
10378 $as_echo_n "(cached) " >&6
10379else
10380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10381/* end confdefs.h. */
10382#include <sys/types.h>
10383#ifdef HAVE_SYS_SOCKET_H
10384#include <sys/socket.h>
10385#endif
10386#ifdef HAVE_NETINET_IN_H
10387#include <netinet/in.h>
10388#endif
10389#ifdef HAVE_WINSOCK2_H
10390#include <winsock2.h>
10391#endif
10392int
10393main ()
10394{
10395int x = AF_INET; struct in_addr y; struct sockaddr_in z;
10396 if (&x && &y && &z) return 0;
10397 ;
10398 return 0;
10399}
10400_ACEOF
10401if ac_fn_c_try_compile "$LINENO"; then :
10402 gl_cv_socket_ipv4=yes
10403else
10404 gl_cv_socket_ipv4=no
10405fi
10406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10407fi
10408
10409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
10410$as_echo "$gl_cv_socket_ipv4" >&6; }
10411 if test $gl_cv_socket_ipv4 = yes; then
8690e634 10412
725e2999 10413$as_echo "#define HAVE_IPV4 1" >>confdefs.h
8690e634 10414
725e2999 10415 fi
8690e634 10416
725e2999
JB
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
10418$as_echo_n "checking for IPv6 sockets... " >&6; }
10419 if ${gl_cv_socket_ipv6+:} false; then :
10420 $as_echo_n "(cached) " >&6
10421else
10422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10423/* end confdefs.h. */
10424#include <sys/types.h>
10425#ifdef HAVE_SYS_SOCKET_H
10426#include <sys/socket.h>
10427#endif
10428#ifdef HAVE_NETINET_IN_H
10429#include <netinet/in.h>
10430#endif
10431#ifdef HAVE_WINSOCK2_H
10432#include <winsock2.h>
10433#endif
10434#ifdef HAVE_WS2TCPIP_H
10435#include <ws2tcpip.h>
10436#endif
10437int
10438main ()
10439{
10440int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
10441 if (&x && &y && &z) return 0;
10442 ;
10443 return 0;
10444}
10445_ACEOF
10446if ac_fn_c_try_compile "$LINENO"; then :
10447 gl_cv_socket_ipv6=yes
10448else
10449 gl_cv_socket_ipv6=no
10450fi
10451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10452fi
49e4877c 10453
725e2999
JB
10454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
10455$as_echo "$gl_cv_socket_ipv6" >&6; }
10456 if test $gl_cv_socket_ipv6 = yes; then
49e4877c 10457
725e2999 10458$as_echo "#define HAVE_IPV6 1" >>confdefs.h
8690e634 10459
725e2999 10460 fi
8690e634 10461
472fa5ee
SM
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474 :
10475
10476
10477
10478
10479
8690e634
JK
10480
10481
10482
10483 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 10484 gl_cv_next_limits_h='<'limits.h'>'
8690e634 10485 else
6ec2e0f5
SDJ
10486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
10487$as_echo_n "checking absolute name of <limits.h>... " >&6; }
d0ac1c44 10488if ${gl_cv_next_limits_h+:} false; then :
8690e634
JK
10489 $as_echo_n "(cached) " >&6
10490else
10491
6ec2e0f5 10492 if test $ac_cv_header_limits_h = yes; then
8690e634
JK
10493
10494
4a626d0a
PA
10495
10496
10497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 10498/* end confdefs.h. */
6ec2e0f5 10499#include <limits.h>
8690e634 10500_ACEOF
4a626d0a
PA
10501 case "$host_os" in
10502 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10503 *) gl_absname_cpp="$ac_cpp" ;;
10504 esac
10505
10506 case "$host_os" in
10507 mingw*)
10508 gl_dirsep_regex='[/\\]'
10509 ;;
10510 *)
10511 gl_dirsep_regex='\/'
10512 ;;
10513 esac
10514 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 10515 gl_header_literal_regex=`echo 'limits.h' \
4a626d0a
PA
10516 | sed -e "$gl_make_literal_regex_sed"`
10517 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10518 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10519 s|^/[^/]|//&|
10520 p
10521 q
10522 }'
10523
6ec2e0f5 10524 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
10525 sed -n "$gl_absolute_header_sed"`
10526
6ec2e0f5
SDJ
10527 gl_header=$gl_cv_absolute_limits_h
10528 gl_cv_next_limits_h='"'$gl_header'"'
8690e634 10529 else
6ec2e0f5 10530 gl_cv_next_limits_h='<'limits.h'>'
8690e634
JK
10531 fi
10532
5e8754f9 10533
7a6dbc2f 10534fi
5e8754f9
SDJ
10535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
10536$as_echo "$gl_cv_next_limits_h" >&6; }
10537 fi
10538 NEXT_LIMITS_H=$gl_cv_next_limits_h
10539
10540 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10541 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10542 gl_next_as_first_directive='<'limits.h'>'
10543 else
10544 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10545 gl_next_as_first_directive=$gl_cv_next_limits_h
10546 fi
10547 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
7a6dbc2f 10548
7a6dbc2f
SDJ
10549
10550
5e8754f9
SDJ
10551
10552
10553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
10554$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
10555if ${gl_cv_header_limits_width+:} false; then :
6ec2e0f5
SDJ
10556 $as_echo_n "(cached) " >&6
10557else
10558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10559/* end confdefs.h. */
5e8754f9
SDJ
10560#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
10561 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
10562 #endif
10563 #include <limits.h>
10564 int ullw = ULLONG_WIDTH;
6ec2e0f5
SDJ
10565int
10566main ()
10567{
10568
10569 ;
10570 return 0;
10571}
10572_ACEOF
10573if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 10574 gl_cv_header_limits_width=yes
6ec2e0f5 10575else
5e8754f9 10576 gl_cv_header_limits_width=no
6ec2e0f5
SDJ
10577fi
10578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10579fi
5e8754f9
SDJ
10580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
10581$as_echo "$gl_cv_header_limits_width" >&6; }
10582 if test "$gl_cv_header_limits_width" = yes; then
10583 LIMITS_H=
8690e634 10584 else
5e8754f9 10585 LIMITS_H=limits.h
8690e634
JK
10586 fi
10587
5e8754f9
SDJ
10588 if test -n "$LIMITS_H"; then
10589 GL_GENERATE_LIMITS_H_TRUE=
10590 GL_GENERATE_LIMITS_H_FALSE='#'
10591else
10592 GL_GENERATE_LIMITS_H_TRUE='#'
10593 GL_GENERATE_LIMITS_H_FALSE=
10594fi
10595
8690e634 10596
6ec2e0f5
SDJ
10597
10598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10599$as_echo_n "checking for unsigned long long int... " >&6; }
d0ac1c44 10600if ${ac_cv_type_unsigned_long_long_int+:} false; then :
8690e634
JK
10601 $as_echo_n "(cached) " >&6
10602else
6ec2e0f5
SDJ
10603 ac_cv_type_unsigned_long_long_int=yes
10604 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8690e634
JK
10605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10606/* end confdefs.h. */
10607
6ec2e0f5
SDJ
10608 /* For now, do not test the preprocessor; as of 2007 there are too many
10609 implementations with broken preprocessors. Perhaps this can
10610 be revisited in 2012. In the meantime, code should not expect
10611 #if to work with literals wider than 32 bits. */
10612 /* Test literals. */
10613 long long int ll = 9223372036854775807ll;
10614 long long int nll = -9223372036854775807LL;
10615 unsigned long long int ull = 18446744073709551615ULL;
10616 /* Test constant expressions. */
10617 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10618 ? 1 : -1)];
10619 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10620 ? 1 : -1)];
10621 int i = 63;
10622int
10623main ()
10624{
10625/* Test availability of runtime routines for shift and division. */
10626 long long int llmax = 9223372036854775807ll;
10627 unsigned long long int ullmax = 18446744073709551615ull;
10628 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10629 | (llmax / ll) | (llmax % ll)
10630 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10631 | (ullmax / ull) | (ullmax % ull));
10632 ;
10633 return 0;
10634}
8690e634 10635
6ec2e0f5
SDJ
10636_ACEOF
10637if ac_fn_c_try_link "$LINENO"; then :
8690e634 10638
6ec2e0f5
SDJ
10639else
10640 ac_cv_type_unsigned_long_long_int=no
10641fi
10642rm -f core conftest.err conftest.$ac_objext \
10643 conftest$ac_exeext conftest.$ac_ext
10644 fi
10645fi
10646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10647$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10648 if test $ac_cv_type_unsigned_long_long_int = yes; then
8690e634 10649
6ec2e0f5 10650$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8690e634 10651
6ec2e0f5 10652 fi
8690e634 10653
8690e634 10654
8690e634 10655
6ec2e0f5
SDJ
10656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10657$as_echo_n "checking for long long int... " >&6; }
d0ac1c44 10658if ${ac_cv_type_long_long_int+:} false; then :
6ec2e0f5
SDJ
10659 $as_echo_n "(cached) " >&6
10660else
10661 ac_cv_type_long_long_int=yes
10662 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10663 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10664 if test $ac_cv_type_long_long_int = yes; then
10665 if test "$cross_compiling" = yes; then :
10666 :
8690e634
JK
10667else
10668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10669/* end confdefs.h. */
6ec2e0f5
SDJ
10670#include <limits.h>
10671 #ifndef LLONG_MAX
10672 # define HALF \
10673 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10674 # define LLONG_MAX (HALF - 1 + HALF)
10675 #endif
8690e634
JK
10676int
10677main ()
10678{
6ec2e0f5
SDJ
10679long long int n = 1;
10680 int i;
10681 for (i = 0; ; i++)
10682 {
10683 long long int m = n << i;
10684 if (m >> i != n)
10685 return 1;
10686 if (LLONG_MAX / 2 < m)
10687 break;
10688 }
10689 return 0;
8690e634
JK
10690 ;
10691 return 0;
10692}
10693_ACEOF
10694if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5
SDJ
10695
10696else
10697 ac_cv_type_long_long_int=no
8690e634
JK
10698fi
10699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10700 conftest.$ac_objext conftest.beam conftest.$ac_ext
10701fi
10702
6ec2e0f5
SDJ
10703 fi
10704 fi
8690e634 10705fi
6ec2e0f5
SDJ
10706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10707$as_echo "$ac_cv_type_long_long_int" >&6; }
10708 if test $ac_cv_type_long_long_int = yes; then
49e4877c 10709
6ec2e0f5 10710$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
49e4877c 10711
6ec2e0f5 10712 fi
49e4877c 10713
49e4877c
PA
10714
10715
49e4877c
PA
10716
10717
49e4877c 10718
472fa5ee
SM
10719
10720
10721
10722
10723
10724
6ec2e0f5
SDJ
10725 gl_cv_c_multiarch=no
10726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10727/* end confdefs.h. */
10728#ifndef __APPLE_CC__
10729 not a universal capable compiler
10730 #endif
10731 typedef int dummy;
49e4877c 10732
49e4877c
PA
10733_ACEOF
10734if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
10735
10736 arch=
10737 prev=
10738 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10739 if test -n "$prev"; then
10740 case $word in
10741 i?86 | x86_64 | ppc | ppc64)
10742 if test -z "$arch" || test "$arch" = "$word"; then
10743 arch="$word"
10744 else
10745 gl_cv_c_multiarch=yes
10746 fi
10747 ;;
10748 esac
10749 prev=
10750 else
10751 if test "x$word" = "x-arch"; then
10752 prev=arch
10753 fi
10754 fi
10755 done
10756
49e4877c
PA
10757fi
10758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
10759 if test $gl_cv_c_multiarch = yes; then
10760 APPLE_UNIVERSAL_BUILD=1
10761 else
10762 APPLE_UNIVERSAL_BUILD=0
10763 fi
49e4877c 10764
49e4877c 10765
49e4877c
PA
10766
10767
49e4877c 10768
49e4877c 10769
49e4877c 10770
6ec2e0f5
SDJ
10771 if test $ac_cv_type_long_long_int = yes; then
10772 HAVE_LONG_LONG_INT=1
10773 else
10774 HAVE_LONG_LONG_INT=0
10775 fi
49e4877c 10776
49e4877c 10777
6ec2e0f5
SDJ
10778 if test $ac_cv_type_unsigned_long_long_int = yes; then
10779 HAVE_UNSIGNED_LONG_LONG_INT=1
8690e634 10780 else
6ec2e0f5
SDJ
10781 HAVE_UNSIGNED_LONG_LONG_INT=0
10782 fi
8690e634 10783
8690e634 10784
8690e634 10785
472fa5ee
SM
10786 :
10787
10788
10789
10790
10791
6ec2e0f5
SDJ
10792 if test $ac_cv_header_wchar_h = yes; then
10793 HAVE_WCHAR_H=1
10794 else
10795 HAVE_WCHAR_H=0
10796 fi
8690e634
JK
10797
10798
6ec2e0f5
SDJ
10799 if test $ac_cv_header_inttypes_h = yes; then
10800 HAVE_INTTYPES_H=1
10801 else
10802 HAVE_INTTYPES_H=0
10803 fi
8690e634
JK
10804
10805
6ec2e0f5
SDJ
10806 if test $ac_cv_header_sys_types_h = yes; then
10807 HAVE_SYS_TYPES_H=1
10808 else
10809 HAVE_SYS_TYPES_H=0
10810 fi
8690e634 10811
8690e634 10812
8690e634 10813
8690e634 10814
8690e634 10815
8690e634
JK
10816
10817
8690e634 10818
472fa5ee
SM
10819 :
10820
10821
10822
10823
10824
8690e634 10825
6ec2e0f5
SDJ
10826
10827
10828 if test $gl_cv_have_include_next = yes; then
10829 gl_cv_next_stdint_h='<'stdint.h'>'
10830 else
10831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
10832$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
d0ac1c44 10833if ${gl_cv_next_stdint_h+:} false; then :
8690e634
JK
10834 $as_echo_n "(cached) " >&6
10835else
8690e634 10836
6ec2e0f5 10837 if test $ac_cv_header_stdint_h = yes; then
8690e634 10838
8690e634 10839
8690e634 10840
6ec2e0f5
SDJ
10841
10842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10843/* end confdefs.h. */
10844#include <stdint.h>
8690e634 10845_ACEOF
6ec2e0f5
SDJ
10846 case "$host_os" in
10847 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10848 *) gl_absname_cpp="$ac_cpp" ;;
10849 esac
8690e634 10850
6ec2e0f5
SDJ
10851 case "$host_os" in
10852 mingw*)
10853 gl_dirsep_regex='[/\\]'
10854 ;;
10855 *)
10856 gl_dirsep_regex='\/'
10857 ;;
10858 esac
10859 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10860 gl_header_literal_regex=`echo 'stdint.h' \
10861 | sed -e "$gl_make_literal_regex_sed"`
10862 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10863 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10864 s|^/[^/]|//&|
10865 p
10866 q
10867 }'
10868
10869 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10870 sed -n "$gl_absolute_header_sed"`
10871
10872 gl_header=$gl_cv_absolute_stdint_h
10873 gl_cv_next_stdint_h='"'$gl_header'"'
10874 else
10875 gl_cv_next_stdint_h='<'stdint.h'>'
10876 fi
10877
10878
10879fi
10880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
10881$as_echo "$gl_cv_next_stdint_h" >&6; }
10882 fi
10883 NEXT_STDINT_H=$gl_cv_next_stdint_h
10884
10885 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10886 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10887 gl_next_as_first_directive='<'stdint.h'>'
10888 else
10889 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10890 gl_next_as_first_directive=$gl_cv_next_stdint_h
10891 fi
10892 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
8690e634
JK
10893
10894
10895
10896
6ec2e0f5
SDJ
10897 if test $ac_cv_header_stdint_h = yes; then
10898 HAVE_STDINT_H=1
10899 else
10900 HAVE_STDINT_H=0
10901 fi
10902
10903
10904 if test $ac_cv_header_stdint_h = yes; then
10905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
10906$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
d0ac1c44 10907if ${gl_cv_header_working_stdint_h+:} false; then :
8690e634
JK
10908 $as_echo_n "(cached) " >&6
10909else
6ec2e0f5
SDJ
10910 gl_cv_header_working_stdint_h=no
10911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
10912/* end confdefs.h. */
10913
6ec2e0f5
SDJ
10914
10915#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10916#define __STDC_CONSTANT_MACROS 1
10917#define __STDC_LIMIT_MACROS 1
10918#include <stdint.h>
10919/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
10920#if !(defined WCHAR_MIN && defined WCHAR_MAX)
10921#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
10922#endif
10923
10924
8690e634
JK
10925 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10926 included before <wchar.h>. */
10927 #include <stddef.h>
10928 #include <signal.h>
10929 #if HAVE_WCHAR_H
10930 # include <stdio.h>
10931 # include <time.h>
10932 # include <wchar.h>
10933 #endif
10934
8690e634 10935
6ec2e0f5
SDJ
10936#ifdef INT8_MAX
10937int8_t a1 = INT8_MAX;
10938int8_t a1min = INT8_MIN;
10939#endif
10940#ifdef INT16_MAX
10941int16_t a2 = INT16_MAX;
10942int16_t a2min = INT16_MIN;
10943#endif
10944#ifdef INT32_MAX
10945int32_t a3 = INT32_MAX;
10946int32_t a3min = INT32_MIN;
10947#endif
10948#ifdef INT64_MAX
10949int64_t a4 = INT64_MAX;
10950int64_t a4min = INT64_MIN;
10951#endif
10952#ifdef UINT8_MAX
10953uint8_t b1 = UINT8_MAX;
10954#else
10955typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
10956#endif
10957#ifdef UINT16_MAX
10958uint16_t b2 = UINT16_MAX;
10959#endif
10960#ifdef UINT32_MAX
10961uint32_t b3 = UINT32_MAX;
10962#endif
10963#ifdef UINT64_MAX
10964uint64_t b4 = UINT64_MAX;
10965#endif
10966int_least8_t c1 = INT8_C (0x7f);
10967int_least8_t c1max = INT_LEAST8_MAX;
10968int_least8_t c1min = INT_LEAST8_MIN;
10969int_least16_t c2 = INT16_C (0x7fff);
10970int_least16_t c2max = INT_LEAST16_MAX;
10971int_least16_t c2min = INT_LEAST16_MIN;
10972int_least32_t c3 = INT32_C (0x7fffffff);
10973int_least32_t c3max = INT_LEAST32_MAX;
10974int_least32_t c3min = INT_LEAST32_MIN;
10975int_least64_t c4 = INT64_C (0x7fffffffffffffff);
10976int_least64_t c4max = INT_LEAST64_MAX;
10977int_least64_t c4min = INT_LEAST64_MIN;
10978uint_least8_t d1 = UINT8_C (0xff);
10979uint_least8_t d1max = UINT_LEAST8_MAX;
10980uint_least16_t d2 = UINT16_C (0xffff);
10981uint_least16_t d2max = UINT_LEAST16_MAX;
10982uint_least32_t d3 = UINT32_C (0xffffffff);
10983uint_least32_t d3max = UINT_LEAST32_MAX;
10984uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
10985uint_least64_t d4max = UINT_LEAST64_MAX;
10986int_fast8_t e1 = INT_FAST8_MAX;
10987int_fast8_t e1min = INT_FAST8_MIN;
10988int_fast16_t e2 = INT_FAST16_MAX;
10989int_fast16_t e2min = INT_FAST16_MIN;
10990int_fast32_t e3 = INT_FAST32_MAX;
10991int_fast32_t e3min = INT_FAST32_MIN;
10992int_fast64_t e4 = INT_FAST64_MAX;
10993int_fast64_t e4min = INT_FAST64_MIN;
10994uint_fast8_t f1 = UINT_FAST8_MAX;
10995uint_fast16_t f2 = UINT_FAST16_MAX;
10996uint_fast32_t f3 = UINT_FAST32_MAX;
10997uint_fast64_t f4 = UINT_FAST64_MAX;
10998#ifdef INTPTR_MAX
10999intptr_t g = INTPTR_MAX;
11000intptr_t gmin = INTPTR_MIN;
11001#endif
11002#ifdef UINTPTR_MAX
11003uintptr_t h = UINTPTR_MAX;
11004#endif
11005intmax_t i = INTMAX_MAX;
11006uintmax_t j = UINTMAX_MAX;
8690e634 11007
6ec2e0f5
SDJ
11008/* Check that SIZE_MAX has the correct type, if possible. */
11009#if 201112 <= __STDC_VERSION__
11010int k = _Generic (SIZE_MAX, size_t: 0);
11011#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
11012 || (0x5110 <= __SUNPRO_C && !__STDC__))
11013extern size_t k;
11014extern __typeof__ (SIZE_MAX) k;
11015#endif
8690e634 11016
6ec2e0f5
SDJ
11017#include <limits.h> /* for CHAR_BIT */
11018#define TYPE_MINIMUM(t) \
11019 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
11020#define TYPE_MAXIMUM(t) \
11021 ((t) ((t) 0 < (t) -1 \
11022 ? (t) -1 \
11023 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
11024struct s {
11025 int check_PTRDIFF:
11026 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
11027 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
11028 ? 1 : -1;
11029 /* Detect bug in FreeBSD 6.0 / ia64. */
11030 int check_SIG_ATOMIC:
11031 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
11032 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
11033 ? 1 : -1;
11034 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
11035 int check_WCHAR:
11036 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
11037 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
11038 ? 1 : -1;
11039 /* Detect bug in mingw. */
11040 int check_WINT:
11041 WINT_MIN == TYPE_MINIMUM (wint_t)
11042 && WINT_MAX == TYPE_MAXIMUM (wint_t)
11043 ? 1 : -1;
8690e634 11044
6ec2e0f5
SDJ
11045 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
11046 int check_UINT8_C:
11047 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
11048 int check_UINT16_C:
11049 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
8690e634 11050
6ec2e0f5
SDJ
11051 /* Detect bugs in OpenBSD 3.9 stdint.h. */
11052#ifdef UINT8_MAX
11053 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
11054#endif
11055#ifdef UINT16_MAX
11056 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
11057#endif
11058#ifdef UINT32_MAX
11059 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
11060#endif
11061#ifdef UINT64_MAX
11062 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
11063#endif
11064 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
11065 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
11066 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
11067 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
11068 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
11069 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
11070 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
11071 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
11072 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
11073 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
11074 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
11075};
8690e634 11076
8690e634
JK
11077int
11078main ()
11079{
11080
11081 ;
11082 return 0;
11083}
11084_ACEOF
11085if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11086 if test "$cross_compiling" = yes; then :
5e8754f9 11087 gl_cv_header_working_stdint_h=yes
8690e634 11088
6ec2e0f5
SDJ
11089else
11090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11091/* end confdefs.h. */
8690e634 11092
8690e634 11093
6ec2e0f5
SDJ
11094#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
11095#define __STDC_CONSTANT_MACROS 1
11096#define __STDC_LIMIT_MACROS 1
11097#include <stdint.h>
8690e634 11098
8690e634
JK
11099
11100 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11101 included before <wchar.h>. */
11102 #include <stddef.h>
11103 #include <signal.h>
11104 #if HAVE_WCHAR_H
11105 # include <stdio.h>
11106 # include <time.h>
11107 # include <wchar.h>
11108 #endif
11109
8690e634 11110
6ec2e0f5
SDJ
11111#include <stdio.h>
11112#include <string.h>
11113#define MVAL(macro) MVAL1(macro)
11114#define MVAL1(expression) #expression
11115static const char *macro_values[] =
11116 {
11117#ifdef INT8_MAX
11118 MVAL (INT8_MAX),
11119#endif
11120#ifdef INT16_MAX
11121 MVAL (INT16_MAX),
11122#endif
11123#ifdef INT32_MAX
11124 MVAL (INT32_MAX),
11125#endif
11126#ifdef INT64_MAX
11127 MVAL (INT64_MAX),
11128#endif
11129#ifdef UINT8_MAX
11130 MVAL (UINT8_MAX),
11131#endif
11132#ifdef UINT16_MAX
11133 MVAL (UINT16_MAX),
11134#endif
11135#ifdef UINT32_MAX
11136 MVAL (UINT32_MAX),
11137#endif
11138#ifdef UINT64_MAX
11139 MVAL (UINT64_MAX),
11140#endif
11141 NULL
11142 };
11143
11144int
11145main ()
11146{
11147
11148 const char **mv;
11149 for (mv = macro_values; *mv != NULL; mv++)
11150 {
11151 const char *value = *mv;
11152 /* Test whether it looks like a cast expression. */
11153 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
11154 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
11155 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
11156 || strncmp (value, "((int)"/*)*/, 6) == 0
11157 || strncmp (value, "((signed short)"/*)*/, 15) == 0
11158 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
11159 return mv - macro_values + 1;
11160 }
11161 return 0;
11162
11163 ;
8690e634
JK
11164 return 0;
11165}
11166_ACEOF
6ec2e0f5
SDJ
11167if ac_fn_c_try_run "$LINENO"; then :
11168 gl_cv_header_working_stdint_h=yes
8690e634 11169fi
6ec2e0f5
SDJ
11170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11171 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 11172fi
8690e634
JK
11173
11174
6ec2e0f5
SDJ
11175fi
11176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 11177
6ec2e0f5
SDJ
11178fi
11179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
11180$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8690e634
JK
11181 fi
11182
6ec2e0f5
SDJ
11183 HAVE_C99_STDINT_H=0
11184 HAVE_SYS_BITYPES_H=0
11185 HAVE_SYS_INTTYPES_H=0
11186 STDINT_H=stdint.h
5e8754f9
SDJ
11187 if test "$gl_cv_header_working_stdint_h" = yes; then
11188 HAVE_C99_STDINT_H=1
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
6ec2e0f5 11190$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
d0ac1c44 11191if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
6ec2e0f5 11192 $as_echo_n "(cached) " >&6
49e4877c 11193else
6ec2e0f5 11194 gl_cv_header_stdint_predates_cxx11_h=yes
5e8754f9 11195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 11196/* end confdefs.h. */
49e4877c
PA
11197
11198
6ec2e0f5
SDJ
11199#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
11200#include <stdint.h>
49e4877c
PA
11201
11202
6ec2e0f5
SDJ
11203 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11204 included before <wchar.h>. */
11205 #include <stddef.h>
11206 #include <signal.h>
11207 #if HAVE_WCHAR_H
11208 # include <stdio.h>
11209 # include <time.h>
11210 # include <wchar.h>
11211 #endif
49e4877c 11212
8690e634 11213
6ec2e0f5
SDJ
11214intmax_t im = INTMAX_MAX;
11215int32_t i32 = INT32_C (0x7fffffff);
8690e634 11216
6ec2e0f5
SDJ
11217int
11218main ()
11219{
8690e634 11220
6ec2e0f5
SDJ
11221 ;
11222 return 0;
11223}
11224_ACEOF
11225if ac_fn_c_try_compile "$LINENO"; then :
11226 gl_cv_header_stdint_predates_cxx11_h=no
11227fi
11228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11229fi
11230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
11231$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
8690e634 11232
5e8754f9 11233 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
8690e634 11234
6ec2e0f5 11235$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
8690e634
JK
11236
11237
6ec2e0f5 11238$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
8690e634 11239
5e8754f9
SDJ
11240 fi
11241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
6ec2e0f5 11242$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
d0ac1c44 11243if ${gl_cv_header_stdint_width+:} false; then :
6ec2e0f5
SDJ
11244 $as_echo_n "(cached) " >&6
11245else
11246 gl_cv_header_stdint_width=no
5e8754f9 11247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 11248/* end confdefs.h. */
8690e634 11249
5e8754f9
SDJ
11250 /* Work if build is not clean. */
11251 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
11252 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
11253 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
11254 #endif
11255 #include <stdint.h>
8690e634 11256
6ec2e0f5
SDJ
11257 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11258 included before <wchar.h>. */
11259 #include <stddef.h>
11260 #include <signal.h>
11261 #if HAVE_WCHAR_H
11262 # include <stdio.h>
11263 # include <time.h>
11264 # include <wchar.h>
11265 #endif
8690e634 11266
5e8754f9 11267 int iw = UINTMAX_WIDTH;
8690e634 11268
6ec2e0f5
SDJ
11269int
11270main ()
11271{
8690e634 11272
6ec2e0f5
SDJ
11273 ;
11274 return 0;
11275}
11276_ACEOF
11277if ac_fn_c_try_compile "$LINENO"; then :
11278 gl_cv_header_stdint_width=yes
11279fi
11280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11281fi
11282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
11283$as_echo "$gl_cv_header_stdint_width" >&6; }
5e8754f9
SDJ
11284 if test "$gl_cv_header_stdint_width" = yes; then
11285 STDINT_H=
11286 fi
11287 else
11288 for ac_header in sys/inttypes.h sys/bitypes.h
6ec2e0f5
SDJ
11289do :
11290 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11291ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 11292if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6ec2e0f5
SDJ
11293 cat >>confdefs.h <<_ACEOF
11294#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11295_ACEOF
8690e634 11296
6ec2e0f5 11297fi
8690e634 11298
6ec2e0f5 11299done
8690e634 11300
5e8754f9
SDJ
11301 if test $ac_cv_header_sys_inttypes_h = yes; then
11302 HAVE_SYS_INTTYPES_H=1
11303 fi
11304 if test $ac_cv_header_sys_bitypes_h = yes; then
11305 HAVE_SYS_BITYPES_H=1
11306 fi
8690e634
JK
11307
11308
6ec2e0f5 11309 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634
JK
11310
11311
6ec2e0f5
SDJ
11312 for gltype in ptrdiff_t size_t ; do
11313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11314$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 11315if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
8690e634
JK
11316 $as_echo_n "(cached) " >&6
11317else
6ec2e0f5
SDJ
11318 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11319 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11320 included before <wchar.h>. */
11321 #include <stddef.h>
11322 #include <signal.h>
11323 #if HAVE_WCHAR_H
11324 # include <stdio.h>
11325 # include <time.h>
11326 # include <wchar.h>
11327 #endif
8690e634 11328
6ec2e0f5 11329#include <limits.h>"; then :
4a626d0a 11330
6ec2e0f5
SDJ
11331else
11332 result=unknown
11333fi
4a626d0a 11334
6ec2e0f5 11335 eval gl_cv_bitsizeof_${gltype}=\$result
4a626d0a 11336
6ec2e0f5
SDJ
11337fi
11338eval ac_res=\$gl_cv_bitsizeof_${gltype}
11339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11340$as_echo "$ac_res" >&6; }
11341 eval result=\$gl_cv_bitsizeof_${gltype}
11342 if test $result = unknown; then
11343 result=0
11344 fi
11345 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11346 cat >>confdefs.h <<_ACEOF
11347#define BITSIZEOF_${GLTYPE} $result
11348_ACEOF
4a626d0a 11349
6ec2e0f5
SDJ
11350 eval BITSIZEOF_${GLTYPE}=\$result
11351 done
4a626d0a 11352
8690e634 11353
6ec2e0f5 11354 fi
8690e634 11355
8690e634 11356
6ec2e0f5
SDJ
11357 for gltype in sig_atomic_t wchar_t wint_t ; do
11358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11359$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 11360if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
6ec2e0f5
SDJ
11361 $as_echo_n "(cached) " >&6
11362else
11363 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11364 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11365 included before <wchar.h>. */
11366 #include <stddef.h>
11367 #include <signal.h>
11368 #if HAVE_WCHAR_H
11369 # include <stdio.h>
11370 # include <time.h>
11371 # include <wchar.h>
11372 #endif
8690e634 11373
6ec2e0f5
SDJ
11374#include <limits.h>"; then :
11375
11376else
11377 result=unknown
11378fi
8690e634 11379
6ec2e0f5 11380 eval gl_cv_bitsizeof_${gltype}=\$result
8690e634 11381
6ec2e0f5
SDJ
11382fi
11383eval ac_res=\$gl_cv_bitsizeof_${gltype}
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11385$as_echo "$ac_res" >&6; }
11386 eval result=\$gl_cv_bitsizeof_${gltype}
11387 if test $result = unknown; then
11388 result=0
11389 fi
11390 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11391 cat >>confdefs.h <<_ACEOF
11392#define BITSIZEOF_${GLTYPE} $result
11393_ACEOF
8690e634 11394
6ec2e0f5
SDJ
11395 eval BITSIZEOF_${GLTYPE}=\$result
11396 done
8690e634
JK
11397
11398
11399
11400
6ec2e0f5
SDJ
11401 for gltype in sig_atomic_t wchar_t wint_t ; do
11402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
11403$as_echo_n "checking whether $gltype is signed... " >&6; }
d0ac1c44 11404if eval \${gl_cv_type_${gltype}_signed+:} false; then :
8690e634
JK
11405 $as_echo_n "(cached) " >&6
11406else
11407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11408/* end confdefs.h. */
8690e634 11409
6ec2e0f5
SDJ
11410 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11411 included before <wchar.h>. */
11412 #include <stddef.h>
11413 #include <signal.h>
11414 #if HAVE_WCHAR_H
11415 # include <stdio.h>
11416 # include <time.h>
11417 # include <wchar.h>
11418 #endif
11419
11420 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8690e634
JK
11421int
11422main ()
11423{
6ec2e0f5 11424
8690e634
JK
11425 ;
11426 return 0;
11427}
11428_ACEOF
11429if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11430 result=yes
8690e634 11431else
6ec2e0f5 11432 result=no
8690e634
JK
11433fi
11434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11435 eval gl_cv_type_${gltype}_signed=\$result
11436
8690e634 11437fi
6ec2e0f5 11438eval ac_res=\$gl_cv_type_${gltype}_signed
8690e634
JK
11439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11440$as_echo "$ac_res" >&6; }
6ec2e0f5
SDJ
11441 eval result=\$gl_cv_type_${gltype}_signed
11442 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11443 if test "$result" = yes; then
11444 cat >>confdefs.h <<_ACEOF
11445#define HAVE_SIGNED_${GLTYPE} 1
8690e634
JK
11446_ACEOF
11447
6ec2e0f5
SDJ
11448 eval HAVE_SIGNED_${GLTYPE}=1
11449 else
11450 eval HAVE_SIGNED_${GLTYPE}=0
11451 fi
11452 done
8690e634 11453
8690e634 11454
6ec2e0f5
SDJ
11455 gl_cv_type_ptrdiff_t_signed=yes
11456 gl_cv_type_size_t_signed=no
11457 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634 11458
8690e634 11459
6ec2e0f5
SDJ
11460 for gltype in ptrdiff_t size_t ; do
11461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11462$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 11463if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
11464 $as_echo_n "(cached) " >&6
11465else
6ec2e0f5
SDJ
11466 eval gl_cv_type_${gltype}_suffix=no
11467 eval result=\$gl_cv_type_${gltype}_signed
11468 if test "$result" = yes; then
11469 glsufu=
11470 else
11471 glsufu=u
11472 fi
11473 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11474 case $glsuf in
11475 '') gltype1='int';;
11476 l) gltype1='long int';;
11477 ll) gltype1='long long int';;
11478 i64) gltype1='__int64';;
11479 u) gltype1='unsigned int';;
11480 ul) gltype1='unsigned long int';;
11481 ull) gltype1='unsigned long long int';;
11482 ui64)gltype1='unsigned __int64';;
11483 esac
11484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
11485/* end confdefs.h. */
11486
6ec2e0f5
SDJ
11487 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11488 included before <wchar.h>. */
11489 #include <stddef.h>
11490 #include <signal.h>
11491 #if HAVE_WCHAR_H
11492 # include <stdio.h>
11493 # include <time.h>
11494 # include <wchar.h>
11495 #endif
8690e634 11496
6ec2e0f5
SDJ
11497 extern $gltype foo;
11498 extern $gltype1 foo;
8690e634
JK
11499int
11500main ()
11501{
11502
11503 ;
11504 return 0;
11505}
11506_ACEOF
11507if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11508 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634
JK
11509fi
11510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11511 eval result=\$gl_cv_type_${gltype}_suffix
11512 test "$result" != no && break
11513 done
8690e634 11514fi
6ec2e0f5
SDJ
11515eval ac_res=\$gl_cv_type_${gltype}_suffix
11516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11517$as_echo "$ac_res" >&6; }
11518 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11519 eval result=\$gl_cv_type_${gltype}_suffix
11520 test "$result" = no && result=
11521 eval ${GLTYPE}_SUFFIX=\$result
11522 cat >>confdefs.h <<_ACEOF
11523#define ${GLTYPE}_SUFFIX $result
8690e634
JK
11524_ACEOF
11525
6ec2e0f5 11526 done
8690e634
JK
11527
11528
6ec2e0f5 11529 fi
8690e634 11530
6ec2e0f5
SDJ
11531
11532 for gltype in sig_atomic_t wchar_t wint_t ; do
11533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11534$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 11535if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
11536 $as_echo_n "(cached) " >&6
11537else
6ec2e0f5
SDJ
11538 eval gl_cv_type_${gltype}_suffix=no
11539 eval result=\$gl_cv_type_${gltype}_signed
11540 if test "$result" = yes; then
11541 glsufu=
11542 else
11543 glsufu=u
11544 fi
11545 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11546 case $glsuf in
11547 '') gltype1='int';;
11548 l) gltype1='long int';;
11549 ll) gltype1='long long int';;
11550 i64) gltype1='__int64';;
11551 u) gltype1='unsigned int';;
11552 ul) gltype1='unsigned long int';;
11553 ull) gltype1='unsigned long long int';;
11554 ui64)gltype1='unsigned __int64';;
11555 esac
11556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 11557/* end confdefs.h. */
88b48903 11558
6ec2e0f5
SDJ
11559 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11560 included before <wchar.h>. */
11561 #include <stddef.h>
11562 #include <signal.h>
11563 #if HAVE_WCHAR_H
11564 # include <stdio.h>
11565 # include <time.h>
11566 # include <wchar.h>
11567 #endif
88b48903 11568
6ec2e0f5
SDJ
11569 extern $gltype foo;
11570 extern $gltype1 foo;
88b48903
WN
11571int
11572main ()
11573{
88b48903
WN
11574
11575 ;
11576 return 0;
11577}
11578_ACEOF
11579if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11580 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634 11581fi
88b48903 11582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11583 eval result=\$gl_cv_type_${gltype}_suffix
11584 test "$result" != no && break
11585 done
8690e634 11586fi
6ec2e0f5
SDJ
11587eval ac_res=\$gl_cv_type_${gltype}_suffix
11588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11589$as_echo "$ac_res" >&6; }
11590 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11591 eval result=\$gl_cv_type_${gltype}_suffix
11592 test "$result" = no && result=
11593 eval ${GLTYPE}_SUFFIX=\$result
11594 cat >>confdefs.h <<_ACEOF
11595#define ${GLTYPE}_SUFFIX $result
88b48903 11596_ACEOF
8690e634 11597
6ec2e0f5 11598 done
8690e634
JK
11599
11600
11601
5e8754f9 11602 if test $BITSIZEOF_WINT_T -lt 32; then
6ec2e0f5
SDJ
11603 BITSIZEOF_WINT_T=32
11604 fi
8690e634 11605
5e8754f9 11606 fi
7a6dbc2f 11607
5e8754f9
SDJ
11608 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
11609 LIMITS_H=limits.h
6ec2e0f5
SDJ
11610 if test -n "$LIMITS_H"; then
11611 GL_GENERATE_LIMITS_H_TRUE=
11612 GL_GENERATE_LIMITS_H_FALSE='#'
88b48903 11613else
6ec2e0f5
SDJ
11614 GL_GENERATE_LIMITS_H_TRUE='#'
11615 GL_GENERATE_LIMITS_H_FALSE=
88b48903 11616fi
8690e634
JK
11617
11618
11619
11620
11621
6ec2e0f5
SDJ
11622
11623 if test -n "$STDINT_H"; then
11624 GL_GENERATE_STDINT_H_TRUE=
11625 GL_GENERATE_STDINT_H_FALSE='#'
11626else
11627 GL_GENERATE_STDINT_H_TRUE='#'
11628 GL_GENERATE_STDINT_H_FALSE=
88b48903 11629fi
8690e634 11630
8690e634
JK
11631
11632
11633
6ec2e0f5 11634
472fa5ee
SM
11635
11636
11637
6ec2e0f5
SDJ
11638 GNULIB_IMAXABS=0;
11639 GNULIB_IMAXDIV=0;
11640 GNULIB_STRTOIMAX=0;
11641 GNULIB_STRTOUMAX=0;
11642 HAVE_DECL_IMAXABS=1;
11643 HAVE_DECL_IMAXDIV=1;
11644 HAVE_DECL_STRTOIMAX=1;
11645 HAVE_DECL_STRTOUMAX=1;
11646 REPLACE_STRTOIMAX=0;
11647 REPLACE_STRTOUMAX=0;
11648 INT32_MAX_LT_INTMAX_MAX=1;
11649 INT64_MAX_EQ_LONG_MAX='defined _LP64';
11650 PRI_MACROS_BROKEN=0;
11651 PRIPTR_PREFIX=__PRIPTR_PREFIX;
11652 UINT32_MAX_LT_UINTMAX_MAX=1;
11653 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
11654
11655
11656
11657
472fa5ee
SM
11658 :
11659
11660
11661
11662
11663
11664
11665
6ec2e0f5
SDJ
11666
11667
11668
11669
11670
11671
472fa5ee
SM
11672 :
11673
11674
11675
6ec2e0f5
SDJ
11676
11677
11678
11679
11680
11681 if test $gl_cv_have_include_next = yes; then
11682 gl_cv_next_inttypes_h='<'inttypes.h'>'
11683 else
11684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
11685$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
d0ac1c44 11686if ${gl_cv_next_inttypes_h+:} false; then :
6ec2e0f5 11687 $as_echo_n "(cached) " >&6
88b48903 11688else
8690e634 11689
6ec2e0f5 11690 if test $ac_cv_header_inttypes_h = yes; then
8690e634
JK
11691
11692
8690e634
JK
11693
11694
6ec2e0f5
SDJ
11695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11696/* end confdefs.h. */
11697#include <inttypes.h>
88b48903 11698_ACEOF
6ec2e0f5
SDJ
11699 case "$host_os" in
11700 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11701 *) gl_absname_cpp="$ac_cpp" ;;
11702 esac
8690e634 11703
6ec2e0f5
SDJ
11704 case "$host_os" in
11705 mingw*)
11706 gl_dirsep_regex='[/\\]'
11707 ;;
11708 *)
11709 gl_dirsep_regex='\/'
88b48903
WN
11710 ;;
11711 esac
6ec2e0f5
SDJ
11712 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11713 gl_header_literal_regex=`echo 'inttypes.h' \
11714 | sed -e "$gl_make_literal_regex_sed"`
11715 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11716 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11717 s|^/[^/]|//&|
11718 p
11719 q
11720 }'
8690e634 11721
6ec2e0f5
SDJ
11722 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11723 sed -n "$gl_absolute_header_sed"`
8690e634 11724
6ec2e0f5
SDJ
11725 gl_header=$gl_cv_absolute_inttypes_h
11726 gl_cv_next_inttypes_h='"'$gl_header'"'
11727 else
11728 gl_cv_next_inttypes_h='<'inttypes.h'>'
11729 fi
88b48903 11730
88b48903 11731
88b48903 11732fi
6ec2e0f5
SDJ
11733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
11734$as_echo "$gl_cv_next_inttypes_h" >&6; }
11735 fi
11736 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
88b48903 11737
6ec2e0f5
SDJ
11738 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11739 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11740 gl_next_as_first_directive='<'inttypes.h'>'
11741 else
11742 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11743 gl_next_as_first_directive=$gl_cv_next_inttypes_h
11744 fi
11745 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
88b48903 11746
6ec2e0f5
SDJ
11747
11748
11749
11750
11751
11752
11753
5e8754f9
SDJ
11754 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
11755 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11757$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11758if eval \${$as_gl_Symbol+:} false; then :
11759 $as_echo_n "(cached) " >&6
11760else
11761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11762/* end confdefs.h. */
11763#include <inttypes.h>
11764
11765int
11766main ()
11767{
11768#undef $gl_func
11769 (void) $gl_func;
11770 ;
11771 return 0;
11772}
11773_ACEOF
11774if ac_fn_c_try_compile "$LINENO"; then :
11775 eval "$as_gl_Symbol=yes"
11776else
11777 eval "$as_gl_Symbol=no"
11778fi
11779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11780fi
11781eval ac_res=\$$as_gl_Symbol
11782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11783$as_echo "$ac_res" >&6; }
11784 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11785 cat >>confdefs.h <<_ACEOF
11786#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11787_ACEOF
6ec2e0f5 11788
5e8754f9
SDJ
11789 eval ac_cv_have_decl_$gl_func=yes
11790fi
11791 done
6ec2e0f5
SDJ
11792
11793
11794
11795 for ac_header in inttypes.h
11796do :
11797 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
d0ac1c44 11798if test "x$ac_cv_header_inttypes_h" = xyes; then :
6ec2e0f5
SDJ
11799 cat >>confdefs.h <<_ACEOF
11800#define HAVE_INTTYPES_H 1
11801_ACEOF
11802
11803fi
11804
11805done
11806
11807 if test $ac_cv_header_inttypes_h = yes; then
11808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
11809$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
d0ac1c44 11810if ${gt_cv_inttypes_pri_broken+:} false; then :
6ec2e0f5
SDJ
11811 $as_echo_n "(cached) " >&6
11812else
11813
11814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11815/* end confdefs.h. */
11816
11817#include <inttypes.h>
11818#ifdef PRId32
11819char *p = PRId32;
11820#endif
11821
11822int
11823main ()
11824{
11825
11826 ;
11827 return 0;
11828}
11829_ACEOF
11830if ac_fn_c_try_compile "$LINENO"; then :
11831 gt_cv_inttypes_pri_broken=no
11832else
11833 gt_cv_inttypes_pri_broken=yes
11834fi
11835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11836
11837fi
11838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
11839$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
11840 fi
11841 if test "$gt_cv_inttypes_pri_broken" = yes; then
11842
11843cat >>confdefs.h <<_ACEOF
11844#define PRI_MACROS_BROKEN 1
11845_ACEOF
11846
11847 PRI_MACROS_BROKEN=1
11848 else
11849 PRI_MACROS_BROKEN=0
11850 fi
11851
11852
11853
11854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
11855$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
d0ac1c44 11856if ${gl_cv_cc_double_expbit0+:} false; then :
6ec2e0f5
SDJ
11857 $as_echo_n "(cached) " >&6
11858else
11859
11860 if test "$cross_compiling" = yes; then :
11861
11862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11863/* end confdefs.h. */
11864
11865#if defined arm || defined __arm || defined __arm__
11866 mixed_endianness
11867#endif
11868
11869_ACEOF
11870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11871 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
11872 gl_cv_cc_double_expbit0="unknown"
11873else
11874
11875 :
d0ac1c44 11876if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
11877 $as_echo_n "(cached) " >&6
11878else
11879 ac_cv_c_bigendian=unknown
11880 # See if we're dealing with a universal compiler.
11881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11882/* end confdefs.h. */
11883#ifndef __APPLE_CC__
11884 not a universal capable compiler
11885 #endif
11886 typedef int dummy;
11887
11888_ACEOF
11889if ac_fn_c_try_compile "$LINENO"; then :
11890
11891 # Check for potential -arch flags. It is not universal unless
11892 # there are at least two -arch flags with different values.
11893 ac_arch=
11894 ac_prev=
11895 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11896 if test -n "$ac_prev"; then
11897 case $ac_word in
11898 i?86 | x86_64 | ppc | ppc64)
11899 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11900 ac_arch=$ac_word
11901 else
11902 ac_cv_c_bigendian=universal
11903 break
11904 fi
11905 ;;
11906 esac
11907 ac_prev=
11908 elif test "x$ac_word" = "x-arch"; then
11909 ac_prev=arch
11910 fi
11911 done
11912fi
11913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11914 if test $ac_cv_c_bigendian = unknown; then
11915 # See if sys/param.h defines the BYTE_ORDER macro.
11916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11917/* end confdefs.h. */
11918#include <sys/types.h>
11919 #include <sys/param.h>
11920
11921int
11922main ()
11923{
11924#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11925 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11926 && LITTLE_ENDIAN)
11927 bogus endian macros
11928 #endif
11929
11930 ;
11931 return 0;
11932}
11933_ACEOF
11934if ac_fn_c_try_compile "$LINENO"; then :
11935 # It does; now see whether it defined to BIG_ENDIAN or not.
11936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11937/* end confdefs.h. */
11938#include <sys/types.h>
11939 #include <sys/param.h>
11940
11941int
11942main ()
11943{
11944#if BYTE_ORDER != BIG_ENDIAN
11945 not big endian
11946 #endif
11947
11948 ;
11949 return 0;
11950}
11951_ACEOF
11952if ac_fn_c_try_compile "$LINENO"; then :
11953 ac_cv_c_bigendian=yes
11954else
11955 ac_cv_c_bigendian=no
11956fi
11957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11958fi
11959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11960 fi
11961 if test $ac_cv_c_bigendian = unknown; then
11962 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11964/* end confdefs.h. */
11965#include <limits.h>
11966
11967int
88b48903
WN
11968main ()
11969{
11970#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11971 bogus endian macros
11972 #endif
11973
11974 ;
11975 return 0;
11976}
11977_ACEOF
11978if ac_fn_c_try_compile "$LINENO"; then :
11979 # It does; now see whether it defined to _BIG_ENDIAN or not.
11980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11981/* end confdefs.h. */
11982#include <limits.h>
11983
11984int
11985main ()
11986{
11987#ifndef _BIG_ENDIAN
11988 not big endian
11989 #endif
11990
11991 ;
11992 return 0;
11993}
11994_ACEOF
11995if ac_fn_c_try_compile "$LINENO"; then :
11996 ac_cv_c_bigendian=yes
11997else
11998 ac_cv_c_bigendian=no
11999fi
12000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12001fi
12002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12003 fi
12004 if test $ac_cv_c_bigendian = unknown; then
12005 # Compile a test program.
12006 if test "$cross_compiling" = yes; then :
12007 # Try to guess by grepping values from an object file.
12008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12009/* end confdefs.h. */
12010short int ascii_mm[] =
12011 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12012 short int ascii_ii[] =
12013 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12014 int use_ascii (int i) {
12015 return ascii_mm[i] + ascii_ii[i];
12016 }
12017 short int ebcdic_ii[] =
12018 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12019 short int ebcdic_mm[] =
12020 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12021 int use_ebcdic (int i) {
12022 return ebcdic_mm[i] + ebcdic_ii[i];
12023 }
12024 extern int foo;
12025
12026int
12027main ()
12028{
12029return use_ascii (foo) == use_ebcdic (foo);
12030 ;
12031 return 0;
12032}
12033_ACEOF
12034if ac_fn_c_try_compile "$LINENO"; then :
12035 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12036 ac_cv_c_bigendian=yes
12037 fi
12038 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12039 if test "$ac_cv_c_bigendian" = unknown; then
12040 ac_cv_c_bigendian=no
12041 else
12042 # finding both strings is unlikely to happen, but who knows?
12043 ac_cv_c_bigendian=unknown
12044 fi
12045 fi
12046fi
12047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12048else
12049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12050/* end confdefs.h. */
12051$ac_includes_default
12052int
12053main ()
12054{
12055
12056 /* Are we little or big endian? From Harbison&Steele. */
12057 union
12058 {
12059 long int l;
12060 char c[sizeof (long int)];
12061 } u;
12062 u.l = 1;
12063 return u.c[sizeof (long int) - 1] == 1;
12064
12065 ;
12066 return 0;
12067}
12068_ACEOF
12069if ac_fn_c_try_run "$LINENO"; then :
12070 ac_cv_c_bigendian=no
12071else
12072 ac_cv_c_bigendian=yes
12073fi
12074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12075 conftest.$ac_objext conftest.beam conftest.$ac_ext
12076fi
12077
12078 fi
12079fi
6ec2e0f5 12080:
88b48903
WN
12081 case $ac_cv_c_bigendian in #(
12082 yes)
6ec2e0f5 12083 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
88b48903 12084 no)
6ec2e0f5 12085 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
88b48903
WN
12086 universal)
12087
12088$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12089
12090 ;; #(
12091 *)
6ec2e0f5 12092 gl_cv_cc_double_expbit0="unknown" ;;
88b48903
WN
12093 esac
12094
12095
6ec2e0f5
SDJ
12096fi
12097rm -f conftest*
88b48903 12098
2196f55f 12099
2196f55f
YQ
12100else
12101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12102/* end confdefs.h. */
2196f55f 12103
6ec2e0f5
SDJ
12104#include <float.h>
12105#include <stddef.h>
12106#include <stdio.h>
12107#include <string.h>
12108#define NWORDS \
12109 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
12110typedef union { double value; unsigned int word[NWORDS]; } memory_double;
12111static unsigned int ored_words[NWORDS];
12112static unsigned int anded_words[NWORDS];
12113static void add_to_ored_words (double x)
2196f55f 12114{
6ec2e0f5
SDJ
12115 memory_double m;
12116 size_t i;
12117 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
12118 memset (&m, 0, sizeof (memory_double));
12119 m.value = x;
12120 for (i = 0; i < NWORDS; i++)
12121 {
12122 ored_words[i] |= m.word[i];
12123 anded_words[i] &= m.word[i];
12124 }
2196f55f 12125}
6ec2e0f5 12126int main ()
88b48903 12127{
6ec2e0f5
SDJ
12128 size_t j;
12129 FILE *fp = fopen ("conftest.out", "w");
12130 if (fp == NULL)
12131 return 1;
12132 for (j = 0; j < NWORDS; j++)
12133 anded_words[j] = ~ (unsigned int) 0;
12134 add_to_ored_words (0.25);
12135 add_to_ored_words (0.5);
12136 add_to_ored_words (1.0);
12137 add_to_ored_words (2.0);
12138 add_to_ored_words (4.0);
12139 /* Remove bits that are common (e.g. if representation of the first mantissa
12140 bit is explicit). */
12141 for (j = 0; j < NWORDS; j++)
12142 ored_words[j] &= ~anded_words[j];
12143 /* Now find the nonzero word. */
12144 for (j = 0; j < NWORDS; j++)
12145 if (ored_words[j] != 0)
12146 break;
12147 if (j < NWORDS)
12148 {
12149 size_t i;
12150 for (i = j + 1; i < NWORDS; i++)
12151 if (ored_words[i] != 0)
12152 {
12153 fprintf (fp, "unknown");
12154 return (fclose (fp) != 0);
12155 }
12156 for (i = 0; ; i++)
12157 if ((ored_words[j] >> i) & 1)
12158 {
12159 fprintf (fp, "word %d bit %d", (int) j, (int) i);
12160 return (fclose (fp) != 0);
12161 }
12162 }
12163 fprintf (fp, "unknown");
12164 return (fclose (fp) != 0);
88b48903 12165}
6ec2e0f5 12166
88b48903 12167_ACEOF
6ec2e0f5
SDJ
12168if ac_fn_c_try_run "$LINENO"; then :
12169 gl_cv_cc_double_expbit0=`cat conftest.out`
88b48903 12170else
6ec2e0f5 12171 gl_cv_cc_double_expbit0="unknown"
88b48903 12172fi
6ec2e0f5
SDJ
12173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12174 conftest.$ac_objext conftest.beam conftest.$ac_ext
12175fi
12176
12177 rm -f conftest.out
88b48903
WN
12178
12179fi
6ec2e0f5
SDJ
12180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
12181$as_echo "$gl_cv_cc_double_expbit0" >&6; }
12182 case "$gl_cv_cc_double_expbit0" in
12183 word*bit*)
12184 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
12185 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
88b48903 12186
6ec2e0f5
SDJ
12187cat >>confdefs.h <<_ACEOF
12188#define DBL_EXPBIT0_WORD $word
12189_ACEOF
88b48903 12190
88b48903 12191
6ec2e0f5
SDJ
12192cat >>confdefs.h <<_ACEOF
12193#define DBL_EXPBIT0_BIT $bit
12194_ACEOF
88b48903 12195
6ec2e0f5
SDJ
12196 ;;
12197 esac
88b48903
WN
12198
12199
6ec2e0f5
SDJ
12200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12201$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12202if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
12203 $as_echo_n "(cached) " >&6
12204else
12205 ac_cv_c_bigendian=unknown
12206 # See if we're dealing with a universal compiler.
12207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12208/* end confdefs.h. */
12209#ifndef __APPLE_CC__
12210 not a universal capable compiler
12211 #endif
12212 typedef int dummy;
88b48903 12213
6ec2e0f5
SDJ
12214_ACEOF
12215if ac_fn_c_try_compile "$LINENO"; then :
88b48903 12216
6ec2e0f5
SDJ
12217 # Check for potential -arch flags. It is not universal unless
12218 # there are at least two -arch flags with different values.
12219 ac_arch=
12220 ac_prev=
12221 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12222 if test -n "$ac_prev"; then
12223 case $ac_word in
12224 i?86 | x86_64 | ppc | ppc64)
12225 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12226 ac_arch=$ac_word
12227 else
12228 ac_cv_c_bigendian=universal
12229 break
12230 fi
12231 ;;
12232 esac
12233 ac_prev=
12234 elif test "x$ac_word" = "x-arch"; then
12235 ac_prev=arch
12236 fi
12237 done
12238fi
12239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12240 if test $ac_cv_c_bigendian = unknown; then
12241 # See if sys/param.h defines the BYTE_ORDER macro.
12242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12243/* end confdefs.h. */
12244#include <sys/types.h>
12245 #include <sys/param.h>
88b48903 12246
6ec2e0f5
SDJ
12247int
12248main ()
12249{
12250#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12251 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12252 && LITTLE_ENDIAN)
12253 bogus endian macros
12254 #endif
88b48903 12255
6ec2e0f5
SDJ
12256 ;
12257 return 0;
12258}
12259_ACEOF
12260if ac_fn_c_try_compile "$LINENO"; then :
12261 # It does; now see whether it defined to BIG_ENDIAN or not.
12262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903
WN
12263/* end confdefs.h. */
12264#include <sys/types.h>
6ec2e0f5 12265 #include <sys/param.h>
8690e634
JK
12266
12267int
12268main ()
12269{
6ec2e0f5
SDJ
12270#if BYTE_ORDER != BIG_ENDIAN
12271 not big endian
12272 #endif
8690e634 12273
8690e634
JK
12274 ;
12275 return 0;
12276}
12277_ACEOF
6ec2e0f5
SDJ
12278if ac_fn_c_try_compile "$LINENO"; then :
12279 ac_cv_c_bigendian=yes
8690e634 12280else
6ec2e0f5 12281 ac_cv_c_bigendian=no
8690e634 12282fi
6ec2e0f5 12283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 12284fi
6ec2e0f5
SDJ
12285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12286 fi
12287 if test $ac_cv_c_bigendian = unknown; then
12288 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12290/* end confdefs.h. */
12291#include <limits.h>
12292
12293int
12294main ()
12295{
12296#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12297 bogus endian macros
12298 #endif
12299
12300 ;
12301 return 0;
12302}
12303_ACEOF
12304if ac_fn_c_try_compile "$LINENO"; then :
12305 # It does; now see whether it defined to _BIG_ENDIAN or not.
12306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12307/* end confdefs.h. */
12308#include <limits.h>
8690e634 12309
6ec2e0f5
SDJ
12310int
12311main ()
12312{
12313#ifndef _BIG_ENDIAN
12314 not big endian
12315 #endif
12316
12317 ;
12318 return 0;
12319}
12320_ACEOF
12321if ac_fn_c_try_compile "$LINENO"; then :
12322 ac_cv_c_bigendian=yes
12323else
12324 ac_cv_c_bigendian=no
8690e634 12325fi
6ec2e0f5
SDJ
12326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12327fi
12328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12329 fi
12330 if test $ac_cv_c_bigendian = unknown; then
12331 # Compile a test program.
12332 if test "$cross_compiling" = yes; then :
12333 # Try to guess by grepping values from an object file.
12334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12335/* end confdefs.h. */
12336short int ascii_mm[] =
12337 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12338 short int ascii_ii[] =
12339 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12340 int use_ascii (int i) {
12341 return ascii_mm[i] + ascii_ii[i];
12342 }
12343 short int ebcdic_ii[] =
12344 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12345 short int ebcdic_mm[] =
12346 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12347 int use_ebcdic (int i) {
12348 return ebcdic_mm[i] + ebcdic_ii[i];
12349 }
12350 extern int foo;
8690e634 12351
6ec2e0f5
SDJ
12352int
12353main ()
12354{
12355return use_ascii (foo) == use_ebcdic (foo);
12356 ;
12357 return 0;
12358}
12359_ACEOF
12360if ac_fn_c_try_compile "$LINENO"; then :
12361 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12362 ac_cv_c_bigendian=yes
12363 fi
12364 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12365 if test "$ac_cv_c_bigendian" = unknown; then
12366 ac_cv_c_bigendian=no
12367 else
12368 # finding both strings is unlikely to happen, but who knows?
12369 ac_cv_c_bigendian=unknown
12370 fi
12371 fi
12372fi
12373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12374else
12375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12376/* end confdefs.h. */
12377$ac_includes_default
12378int
12379main ()
12380{
8690e634 12381
6ec2e0f5
SDJ
12382 /* Are we little or big endian? From Harbison&Steele. */
12383 union
12384 {
12385 long int l;
12386 char c[sizeof (long int)];
12387 } u;
12388 u.l = 1;
12389 return u.c[sizeof (long int) - 1] == 1;
12390
12391 ;
12392 return 0;
12393}
8690e634 12394_ACEOF
6ec2e0f5
SDJ
12395if ac_fn_c_try_run "$LINENO"; then :
12396 ac_cv_c_bigendian=no
12397else
12398 ac_cv_c_bigendian=yes
12399fi
12400rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12401 conftest.$ac_objext conftest.beam conftest.$ac_ext
12402fi
12403
12404 fi
12405fi
12406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12407$as_echo "$ac_cv_c_bigendian" >&6; }
12408 case $ac_cv_c_bigendian in #(
12409 yes)
12410 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12411;; #(
12412 no)
12413 ;; #(
12414 universal)
8690e634 12415
6ec2e0f5 12416$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8690e634 12417
6ec2e0f5
SDJ
12418 ;; #(
12419 *)
d0ac1c44 12420 as_fn_error $? "unknown endianness
6ec2e0f5
SDJ
12421 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12422 esac
8690e634 12423
6ec2e0f5
SDJ
12424
12425
12426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12427$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 12428if ${am_cv_langinfo_codeset+:} false; then :
6ec2e0f5
SDJ
12429 $as_echo_n "(cached) " >&6
12430else
12431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12432/* end confdefs.h. */
12433#include <langinfo.h>
12434int
12435main ()
12436{
12437char* cs = nl_langinfo(CODESET); return !cs;
12438 ;
12439 return 0;
12440}
8690e634 12441_ACEOF
6ec2e0f5
SDJ
12442if ac_fn_c_try_link "$LINENO"; then :
12443 am_cv_langinfo_codeset=yes
12444else
12445 am_cv_langinfo_codeset=no
12446fi
12447rm -f core conftest.err conftest.$ac_objext \
12448 conftest$ac_exeext conftest.$ac_ext
12449
12450fi
12451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12452$as_echo "$am_cv_langinfo_codeset" >&6; }
12453 if test $am_cv_langinfo_codeset = yes; then
12454
12455$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8690e634 12456
6ec2e0f5 12457 fi
8690e634 12458
472fa5ee 12459
5e8754f9
SDJ
12460 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
12461if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
12462 ac_have_decl=1
12463else
12464 ac_have_decl=0
12465fi
12466
12467cat >>confdefs.h <<_ACEOF
12468#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
12469_ACEOF
12470
12471
12472
5abebf3c
CB
12473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
12474$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
12475if ${ac_cv_gnu_library_2_1+:} false; then :
12476 $as_echo_n "(cached) " >&6
12477else
12478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12479/* end confdefs.h. */
12480
12481#include <features.h>
12482#ifdef __GNU_LIBRARY__
12483 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
12484 Lucky GNU user
12485 #endif
12486#endif
12487#ifdef __UCLIBC__
12488 Lucky user
12489#endif
12490
12491_ACEOF
12492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12493 $EGREP "Lucky" >/dev/null 2>&1; then :
12494 ac_cv_gnu_library_2_1=yes
12495else
12496 ac_cv_gnu_library_2_1=no
12497fi
12498rm -f conftest*
12499
12500
12501
12502fi
12503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
12504$as_echo "$ac_cv_gnu_library_2_1" >&6; }
12505
12506 GLIBC21="$ac_cv_gnu_library_2_1"
12507
12508
12509
12510 if test "X$prefix" = "XNONE"; then
12511 acl_final_prefix="$ac_default_prefix"
12512 else
12513 acl_final_prefix="$prefix"
12514 fi
12515 if test "X$exec_prefix" = "XNONE"; then
12516 acl_final_exec_prefix='${prefix}'
12517 else
12518 acl_final_exec_prefix="$exec_prefix"
12519 fi
12520 acl_save_prefix="$prefix"
12521 prefix="$acl_final_prefix"
12522 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
12523 prefix="$acl_save_prefix"
12524
12525
12526
12527# Check whether --with-gnu-ld was given.
12528if test "${with_gnu_ld+set}" = set; then :
12529 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
12530else
12531 with_gnu_ld=no
12532fi
12533
12534# Prepare PATH_SEPARATOR.
12535# The user is always right.
12536if test "${PATH_SEPARATOR+set}" != set; then
12537 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
12538 # contains only /bin. Note that ksh looks also at the FPATH variable,
12539 # so we have to set that as well for the test.
12540 PATH_SEPARATOR=:
12541 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
12542 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
12543 || PATH_SEPARATOR=';'
12544 }
12545fi
12546
12547ac_prog=ld
12548if test "$GCC" = yes; then
12549 # Check if gcc -print-prog-name=ld gives a path.
12550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
12551$as_echo_n "checking for ld used by $CC... " >&6; }
12552 case $host in
12553 *-*-mingw*)
12554 # gcc leaves a trailing carriage return which upsets mingw
12555 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
12556 *)
12557 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
12558 esac
12559 case $ac_prog in
12560 # Accept absolute paths.
12561 [\\/]* | ?:[\\/]*)
12562 re_direlt='/[^/][^/]*/\.\./'
12563 # Canonicalize the pathname of ld
12564 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
12565 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
12566 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
12567 done
12568 test -z "$LD" && LD="$ac_prog"
12569 ;;
12570 "")
12571 # If it fails, then pretend we aren't using GCC.
12572 ac_prog=ld
12573 ;;
12574 *)
12575 # If it is relative, then search for the first ld in PATH.
12576 with_gnu_ld=unknown
12577 ;;
12578 esac
12579elif test "$with_gnu_ld" = yes; then
12580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
12581$as_echo_n "checking for GNU ld... " >&6; }
12582else
12583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
12584$as_echo_n "checking for non-GNU ld... " >&6; }
12585fi
12586if ${acl_cv_path_LD+:} false; then :
12587 $as_echo_n "(cached) " >&6
12588else
12589 if test -z "$LD"; then
12590 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
12591 for ac_dir in $PATH; do
12592 IFS="$acl_save_ifs"
12593 test -z "$ac_dir" && ac_dir=.
12594 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
12595 acl_cv_path_LD="$ac_dir/$ac_prog"
12596 # Check to see if the program is GNU ld. I'd rather use --version,
12597 # but apparently some variants of GNU ld only accept -v.
12598 # Break only if it was the GNU/non-GNU ld that we prefer.
12599 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
12600 *GNU* | *'with BFD'*)
12601 test "$with_gnu_ld" != no && break
12602 ;;
12603 *)
12604 test "$with_gnu_ld" != yes && break
12605 ;;
12606 esac
12607 fi
12608 done
12609 IFS="$acl_save_ifs"
12610else
12611 acl_cv_path_LD="$LD" # Let the user override the test with a path.
12612fi
12613fi
12614
12615LD="$acl_cv_path_LD"
12616if test -n "$LD"; then
12617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
12618$as_echo "$LD" >&6; }
12619else
12620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12621$as_echo "no" >&6; }
12622fi
12623test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
12624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
12625$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
12626if ${acl_cv_prog_gnu_ld+:} false; then :
12627 $as_echo_n "(cached) " >&6
12628else
12629 # I'd rather use --version here, but apparently some GNU lds only accept -v.
12630case `$LD -v 2>&1 </dev/null` in
12631*GNU* | *'with BFD'*)
12632 acl_cv_prog_gnu_ld=yes
12633 ;;
12634*)
12635 acl_cv_prog_gnu_ld=no
12636 ;;
12637esac
12638fi
12639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
12640$as_echo "$acl_cv_prog_gnu_ld" >&6; }
12641with_gnu_ld=$acl_cv_prog_gnu_ld
12642
12643
12644
12645
12646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
12647$as_echo_n "checking for shared library run path origin... " >&6; }
12648if ${acl_cv_rpath+:} false; then :
12649 $as_echo_n "(cached) " >&6
12650else
12651
12652 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
12653 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
12654 . ./conftest.sh
12655 rm -f ./conftest.sh
12656 acl_cv_rpath=done
12657
12658fi
12659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
12660$as_echo "$acl_cv_rpath" >&6; }
12661 wl="$acl_cv_wl"
12662 acl_libext="$acl_cv_libext"
12663 acl_shlibext="$acl_cv_shlibext"
12664 acl_libname_spec="$acl_cv_libname_spec"
12665 acl_library_names_spec="$acl_cv_library_names_spec"
12666 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
12667 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
12668 acl_hardcode_direct="$acl_cv_hardcode_direct"
12669 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
12670 # Check whether --enable-rpath was given.
12671if test "${enable_rpath+set}" = set; then :
12672 enableval=$enable_rpath; :
12673else
12674 enable_rpath=yes
12675fi
12676
12677
12678
12679
12680 acl_libdirstem=lib
12681 acl_libdirstem2=
12682 case "$host_os" in
12683 solaris*)
12684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
12685$as_echo_n "checking for 64-bit host... " >&6; }
12686if ${gl_cv_solaris_64bit+:} false; then :
12687 $as_echo_n "(cached) " >&6
12688else
12689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12690/* end confdefs.h. */
12691
12692#ifdef _LP64
12693sixtyfour bits
12694#endif
12695
12696_ACEOF
12697if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12698 $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
12699 gl_cv_solaris_64bit=yes
12700else
12701 gl_cv_solaris_64bit=no
12702fi
12703rm -f conftest*
12704
12705
12706fi
12707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
12708$as_echo "$gl_cv_solaris_64bit" >&6; }
12709 if test $gl_cv_solaris_64bit = yes; then
12710 acl_libdirstem=lib/64
12711 case "$host_cpu" in
12712 sparc*) acl_libdirstem2=lib/sparcv9 ;;
12713 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
12714 esac
12715 fi
12716 ;;
12717 *)
12718 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
12719 if test -n "$searchpath"; then
12720 acl_save_IFS="${IFS= }"; IFS=":"
12721 for searchdir in $searchpath; do
12722 if test -d "$searchdir"; then
12723 case "$searchdir" in
12724 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
12725 */../ | */.. )
12726 # Better ignore directories of this form. They are misleading.
12727 ;;
12728 *) searchdir=`cd "$searchdir" && pwd`
12729 case "$searchdir" in
12730 */lib64 ) acl_libdirstem=lib64 ;;
12731 esac ;;
12732 esac
12733 fi
12734 done
12735 IFS="$acl_save_IFS"
12736 fi
12737 ;;
12738 esac
12739 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
12740
12741
12742
12743 gl_threads_api=none
12744 LIBTHREAD=
12745 LTLIBTHREAD=
12746 LIBMULTITHREAD=
12747 LTLIBMULTITHREAD=
12748 if test "$gl_use_threads" != no; then
12749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
12750$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
12751if ${gl_cv_have_weak+:} false; then :
12752 $as_echo_n "(cached) " >&6
12753else
12754 gl_cv_have_weak=no
12755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12756/* end confdefs.h. */
12757extern void xyzzy ();
12758#pragma weak xyzzy
12759int
12760main ()
12761{
12762xyzzy();
12763 ;
12764 return 0;
12765}
12766_ACEOF
12767if ac_fn_c_try_link "$LINENO"; then :
12768 gl_cv_have_weak=maybe
12769fi
12770rm -f core conftest.err conftest.$ac_objext \
12771 conftest$ac_exeext conftest.$ac_ext
12772 if test $gl_cv_have_weak = maybe; then
12773 if test "$cross_compiling" = yes; then :
12774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12775/* end confdefs.h. */
12776#ifdef __ELF__
12777 Extensible Linking Format
12778 #endif
12779
12780_ACEOF
12781if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12782 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
12783 gl_cv_have_weak="guessing yes"
12784else
12785 gl_cv_have_weak="guessing no"
12786fi
12787rm -f conftest*
12788
12789
12790else
12791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12792/* end confdefs.h. */
12793
12794#include <stdio.h>
12795#pragma weak fputs
12796int main ()
12797{
12798 return (fputs == NULL);
12799}
12800_ACEOF
12801if ac_fn_c_try_run "$LINENO"; then :
12802 gl_cv_have_weak=yes
12803else
12804 gl_cv_have_weak=no
12805fi
12806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12807 conftest.$ac_objext conftest.beam conftest.$ac_ext
12808fi
12809
12810 fi
12811
12812fi
12813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
12814$as_echo "$gl_cv_have_weak" >&6; }
12815 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
12816 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
12817 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
12818 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12819if test "x$ac_cv_header_pthread_h" = xyes; then :
12820 gl_have_pthread_h=yes
12821else
12822 gl_have_pthread_h=no
12823fi
12824
12825
12826 if test "$gl_have_pthread_h" = yes; then
12827 # Other possible tests:
12828 # -lpthreads (FSU threads, PCthreads)
12829 # -lgthreads
12830 gl_have_pthread=
12831 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
12832 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
12833 # the second one only in libpthread, and lock.c needs it.
12834 #
12835 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
12836 # needs -pthread for some reason. See:
12837 # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
12838 save_LIBS=$LIBS
12839 for gl_pthread in '' '-pthread'; do
12840 LIBS="$LIBS $gl_pthread"
12841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12842/* end confdefs.h. */
12843#include <pthread.h>
12844 pthread_mutex_t m;
12845 pthread_mutexattr_t ma;
12846
12847int
12848main ()
12849{
12850pthread_mutex_lock (&m);
12851 pthread_mutexattr_init (&ma);
12852 ;
12853 return 0;
12854}
12855_ACEOF
12856if ac_fn_c_try_link "$LINENO"; then :
12857 gl_have_pthread=yes
12858 LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
12859 LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
12860fi
12861rm -f core conftest.err conftest.$ac_objext \
12862 conftest$ac_exeext conftest.$ac_ext
12863 LIBS=$save_LIBS
12864 test -n "$gl_have_pthread" && break
12865 done
12866
12867 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
12868 # since it is defined as a macro on OSF/1.)
12869 if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
12870 # The program links fine without libpthread. But it may actually
12871 # need to link with libpthread in order to create multiple threads.
12872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12873$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
12874if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
12875 $as_echo_n "(cached) " >&6
12876else
12877 ac_check_lib_save_LIBS=$LIBS
12878LIBS="-lpthread $LIBS"
12879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12880/* end confdefs.h. */
12881
12882/* Override any GCC internal prototype to avoid an error.
12883 Use char because int might match the return type of a GCC
12884 builtin and then its argument prototype would still apply. */
12885#ifdef __cplusplus
12886extern "C"
12887#endif
12888char pthread_kill ();
12889int
12890main ()
12891{
12892return pthread_kill ();
12893 ;
12894 return 0;
12895}
12896_ACEOF
12897if ac_fn_c_try_link "$LINENO"; then :
12898 ac_cv_lib_pthread_pthread_kill=yes
12899else
12900 ac_cv_lib_pthread_pthread_kill=no
12901fi
12902rm -f core conftest.err conftest.$ac_objext \
12903 conftest$ac_exeext conftest.$ac_ext
12904LIBS=$ac_check_lib_save_LIBS
12905fi
12906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12907$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
12908if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
12909 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
12910 # On Solaris and HP-UX, most pthread functions exist also in libc.
12911 # Therefore pthread_in_use() needs to actually try to create a
12912 # thread: pthread_create from libc will fail, whereas
12913 # pthread_create will actually create a thread.
12914 case "$host_os" in
12915 solaris* | hpux*)
12916
12917$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
12918
12919 esac
12920
12921fi
12922
12923 elif test -z "$gl_have_pthread"; then
12924 # Some library is needed. Try libpthread and libc_r.
12925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12926$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
12927if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
12928 $as_echo_n "(cached) " >&6
12929else
12930 ac_check_lib_save_LIBS=$LIBS
12931LIBS="-lpthread $LIBS"
12932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12933/* end confdefs.h. */
12934
12935/* Override any GCC internal prototype to avoid an error.
12936 Use char because int might match the return type of a GCC
12937 builtin and then its argument prototype would still apply. */
12938#ifdef __cplusplus
12939extern "C"
12940#endif
12941char pthread_kill ();
12942int
12943main ()
12944{
12945return pthread_kill ();
12946 ;
12947 return 0;
12948}
12949_ACEOF
12950if ac_fn_c_try_link "$LINENO"; then :
12951 ac_cv_lib_pthread_pthread_kill=yes
12952else
12953 ac_cv_lib_pthread_pthread_kill=no
12954fi
12955rm -f core conftest.err conftest.$ac_objext \
12956 conftest$ac_exeext conftest.$ac_ext
12957LIBS=$ac_check_lib_save_LIBS
12958fi
12959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12960$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
12961if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
12962 gl_have_pthread=yes
12963 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
12964 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
12965fi
12966
12967 if test -z "$gl_have_pthread"; then
12968 # For FreeBSD 4.
12969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
12970$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
12971if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
12972 $as_echo_n "(cached) " >&6
12973else
12974 ac_check_lib_save_LIBS=$LIBS
12975LIBS="-lc_r $LIBS"
12976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12977/* end confdefs.h. */
12978
12979/* Override any GCC internal prototype to avoid an error.
12980 Use char because int might match the return type of a GCC
12981 builtin and then its argument prototype would still apply. */
12982#ifdef __cplusplus
12983extern "C"
12984#endif
12985char pthread_kill ();
12986int
12987main ()
12988{
12989return pthread_kill ();
12990 ;
12991 return 0;
12992}
12993_ACEOF
12994if ac_fn_c_try_link "$LINENO"; then :
12995 ac_cv_lib_c_r_pthread_kill=yes
12996else
12997 ac_cv_lib_c_r_pthread_kill=no
12998fi
12999rm -f core conftest.err conftest.$ac_objext \
13000 conftest$ac_exeext conftest.$ac_ext
13001LIBS=$ac_check_lib_save_LIBS
13002fi
13003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
13004$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
13005if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
13006 gl_have_pthread=yes
13007 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
13008 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
13009fi
13010
13011 fi
13012 fi
13013 if test -n "$gl_have_pthread"; then
13014 gl_threads_api=posix
13015
13016$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
13017
13018 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13019 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13020
13021$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
13022
13023 LIBTHREAD=
13024 LTLIBTHREAD=
13025 fi
13026 fi
13027 fi
13028 fi
13029 fi
13030 if test -z "$gl_have_pthread"; then
13031 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
13032 gl_have_solaristhread=
13033 gl_save_LIBS="$LIBS"
13034 LIBS="$LIBS -lthread"
13035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13036/* end confdefs.h. */
13037
13038#include <thread.h>
13039#include <synch.h>
13040
13041int
13042main ()
13043{
13044thr_self();
13045 ;
13046 return 0;
13047}
13048_ACEOF
13049if ac_fn_c_try_link "$LINENO"; then :
13050 gl_have_solaristhread=yes
13051fi
13052rm -f core conftest.err conftest.$ac_objext \
13053 conftest$ac_exeext conftest.$ac_ext
13054 LIBS="$gl_save_LIBS"
13055 if test -n "$gl_have_solaristhread"; then
13056 gl_threads_api=solaris
13057 LIBTHREAD=-lthread
13058 LTLIBTHREAD=-lthread
13059 LIBMULTITHREAD="$LIBTHREAD"
13060 LTLIBMULTITHREAD="$LTLIBTHREAD"
13061
13062$as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
13063
13064 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13065
13066$as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
13067
13068 LIBTHREAD=
13069 LTLIBTHREAD=
13070 fi
13071 fi
13072 fi
13073 fi
13074 if test "$gl_use_threads" = pth; then
13075 gl_save_CPPFLAGS="$CPPFLAGS"
13076
13077
13078
13079
13080
13081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
13082$as_echo_n "checking how to link with libpth... " >&6; }
13083if ${ac_cv_libpth_libs+:} false; then :
13084 $as_echo_n "(cached) " >&6
13085else
13086
13087
13088
13089
13090
13091
13092
13093
13094 use_additional=yes
13095
13096 acl_save_prefix="$prefix"
13097 prefix="$acl_final_prefix"
13098 acl_save_exec_prefix="$exec_prefix"
13099 exec_prefix="$acl_final_exec_prefix"
13100
13101 eval additional_includedir=\"$includedir\"
13102 eval additional_libdir=\"$libdir\"
13103
13104 exec_prefix="$acl_save_exec_prefix"
13105 prefix="$acl_save_prefix"
13106
13107
13108# Check whether --with-libpth-prefix was given.
13109if test "${with_libpth_prefix+set}" = set; then :
13110 withval=$with_libpth_prefix;
13111 if test "X$withval" = "Xno"; then
13112 use_additional=no
13113 else
13114 if test "X$withval" = "X"; then
13115
13116 acl_save_prefix="$prefix"
13117 prefix="$acl_final_prefix"
13118 acl_save_exec_prefix="$exec_prefix"
13119 exec_prefix="$acl_final_exec_prefix"
13120
13121 eval additional_includedir=\"$includedir\"
13122 eval additional_libdir=\"$libdir\"
13123
13124 exec_prefix="$acl_save_exec_prefix"
13125 prefix="$acl_save_prefix"
13126
13127 else
13128 additional_includedir="$withval/include"
13129 additional_libdir="$withval/$acl_libdirstem"
13130 if test "$acl_libdirstem2" != "$acl_libdirstem" \
13131 && ! test -d "$withval/$acl_libdirstem"; then
13132 additional_libdir="$withval/$acl_libdirstem2"
13133 fi
13134 fi
13135 fi
13136
13137fi
13138
13139 LIBPTH=
13140 LTLIBPTH=
13141 INCPTH=
13142 LIBPTH_PREFIX=
13143 HAVE_LIBPTH=
13144 rpathdirs=
13145 ltrpathdirs=
13146 names_already_handled=
13147 names_next_round='pth '
13148 while test -n "$names_next_round"; do
13149 names_this_round="$names_next_round"
13150 names_next_round=
13151 for name in $names_this_round; do
13152 already_handled=
13153 for n in $names_already_handled; do
13154 if test "$n" = "$name"; then
13155 already_handled=yes
13156 break
13157 fi
13158 done
13159 if test -z "$already_handled"; then
13160 names_already_handled="$names_already_handled $name"
13161 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
13162 eval value=\"\$HAVE_LIB$uppername\"
13163 if test -n "$value"; then
13164 if test "$value" = yes; then
13165 eval value=\"\$LIB$uppername\"
13166 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
13167 eval value=\"\$LTLIB$uppername\"
13168 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
13169 else
13170 :
13171 fi
13172 else
13173 found_dir=
13174 found_la=
13175 found_so=
13176 found_a=
13177 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
13178 if test -n "$acl_shlibext"; then
13179 shrext=".$acl_shlibext" # typically: shrext=.so
13180 else
13181 shrext=
13182 fi
13183 if test $use_additional = yes; then
13184 dir="$additional_libdir"
13185 if test -n "$acl_shlibext"; then
13186 if test -f "$dir/$libname$shrext"; then
13187 found_dir="$dir"
13188 found_so="$dir/$libname$shrext"
13189 else
13190 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13191 ver=`(cd "$dir" && \
13192 for f in "$libname$shrext".*; do echo "$f"; done \
13193 | sed -e "s,^$libname$shrext\\\\.,," \
13194 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13195 | sed 1q ) 2>/dev/null`
13196 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13197 found_dir="$dir"
13198 found_so="$dir/$libname$shrext.$ver"
13199 fi
13200 else
13201 eval library_names=\"$acl_library_names_spec\"
13202 for f in $library_names; do
13203 if test -f "$dir/$f"; then
13204 found_dir="$dir"
13205 found_so="$dir/$f"
13206 break
13207 fi
13208 done
13209 fi
13210 fi
13211 fi
13212 if test "X$found_dir" = "X"; then
13213 if test -f "$dir/$libname.$acl_libext"; then
13214 found_dir="$dir"
13215 found_a="$dir/$libname.$acl_libext"
13216 fi
13217 fi
13218 if test "X$found_dir" != "X"; then
13219 if test -f "$dir/$libname.la"; then
13220 found_la="$dir/$libname.la"
13221 fi
13222 fi
13223 fi
13224 if test "X$found_dir" = "X"; then
13225 for x in $LDFLAGS $LTLIBPTH; do
13226
13227 acl_save_prefix="$prefix"
13228 prefix="$acl_final_prefix"
13229 acl_save_exec_prefix="$exec_prefix"
13230 exec_prefix="$acl_final_exec_prefix"
13231 eval x=\"$x\"
13232 exec_prefix="$acl_save_exec_prefix"
13233 prefix="$acl_save_prefix"
13234
13235 case "$x" in
13236 -L*)
13237 dir=`echo "X$x" | sed -e 's/^X-L//'`
13238 if test -n "$acl_shlibext"; then
13239 if test -f "$dir/$libname$shrext"; then
13240 found_dir="$dir"
13241 found_so="$dir/$libname$shrext"
13242 else
13243 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13244 ver=`(cd "$dir" && \
13245 for f in "$libname$shrext".*; do echo "$f"; done \
13246 | sed -e "s,^$libname$shrext\\\\.,," \
13247 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13248 | sed 1q ) 2>/dev/null`
13249 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13250 found_dir="$dir"
13251 found_so="$dir/$libname$shrext.$ver"
13252 fi
13253 else
13254 eval library_names=\"$acl_library_names_spec\"
13255 for f in $library_names; do
13256 if test -f "$dir/$f"; then
13257 found_dir="$dir"
13258 found_so="$dir/$f"
13259 break
13260 fi
13261 done
13262 fi
13263 fi
13264 fi
13265 if test "X$found_dir" = "X"; then
13266 if test -f "$dir/$libname.$acl_libext"; then
13267 found_dir="$dir"
13268 found_a="$dir/$libname.$acl_libext"
13269 fi
13270 fi
13271 if test "X$found_dir" != "X"; then
13272 if test -f "$dir/$libname.la"; then
13273 found_la="$dir/$libname.la"
13274 fi
13275 fi
13276 ;;
13277 esac
13278 if test "X$found_dir" != "X"; then
13279 break
13280 fi
13281 done
13282 fi
13283 if test "X$found_dir" != "X"; then
13284 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
13285 if test "X$found_so" != "X"; then
13286 if test "$enable_rpath" = no \
13287 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
13288 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
13289 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13290 else
13291 haveit=
13292 for x in $ltrpathdirs; do
13293 if test "X$x" = "X$found_dir"; then
13294 haveit=yes
13295 break
13296 fi
13297 done
13298 if test -z "$haveit"; then
13299 ltrpathdirs="$ltrpathdirs $found_dir"
13300 fi
13301 if test "$acl_hardcode_direct" = yes; then
13302 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13303 else
13304 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
13305 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13306 haveit=
13307 for x in $rpathdirs; do
13308 if test "X$x" = "X$found_dir"; then
13309 haveit=yes
13310 break
13311 fi
13312 done
13313 if test -z "$haveit"; then
13314 rpathdirs="$rpathdirs $found_dir"
13315 fi
13316 else
13317 haveit=
13318 for x in $LDFLAGS $LIBPTH; do
13319
13320 acl_save_prefix="$prefix"
13321 prefix="$acl_final_prefix"
13322 acl_save_exec_prefix="$exec_prefix"
13323 exec_prefix="$acl_final_exec_prefix"
13324 eval x=\"$x\"
13325 exec_prefix="$acl_save_exec_prefix"
13326 prefix="$acl_save_prefix"
13327
13328 if test "X$x" = "X-L$found_dir"; then
13329 haveit=yes
13330 break
13331 fi
13332 done
13333 if test -z "$haveit"; then
13334 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
13335 fi
13336 if test "$acl_hardcode_minus_L" != no; then
13337 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13338 else
13339 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
13340 fi
13341 fi
13342 fi
13343 fi
13344 else
13345 if test "X$found_a" != "X"; then
13346 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
13347 else
13348 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
13349 fi
13350 fi
13351 additional_includedir=
13352 case "$found_dir" in
13353 */$acl_libdirstem | */$acl_libdirstem/)
13354 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
13355 if test "$name" = 'pth'; then
13356 LIBPTH_PREFIX="$basedir"
13357 fi
13358 additional_includedir="$basedir/include"
13359 ;;
13360 */$acl_libdirstem2 | */$acl_libdirstem2/)
13361 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
13362 if test "$name" = 'pth'; then
13363 LIBPTH_PREFIX="$basedir"
13364 fi
13365 additional_includedir="$basedir/include"
13366 ;;
13367 esac
13368 if test "X$additional_includedir" != "X"; then
13369 if test "X$additional_includedir" != "X/usr/include"; then
13370 haveit=
13371 if test "X$additional_includedir" = "X/usr/local/include"; then
13372 if test -n "$GCC"; then
13373 case $host_os in
13374 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13375 esac
13376 fi
13377 fi
13378 if test -z "$haveit"; then
13379 for x in $CPPFLAGS $INCPTH; do
13380
13381 acl_save_prefix="$prefix"
13382 prefix="$acl_final_prefix"
13383 acl_save_exec_prefix="$exec_prefix"
13384 exec_prefix="$acl_final_exec_prefix"
13385 eval x=\"$x\"
13386 exec_prefix="$acl_save_exec_prefix"
13387 prefix="$acl_save_prefix"
13388
13389 if test "X$x" = "X-I$additional_includedir"; then
13390 haveit=yes
13391 break
13392 fi
13393 done
13394 if test -z "$haveit"; then
13395 if test -d "$additional_includedir"; then
13396 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
13397 fi
13398 fi
13399 fi
13400 fi
13401 fi
13402 if test -n "$found_la"; then
13403 save_libdir="$libdir"
13404 case "$found_la" in
13405 */* | *\\*) . "$found_la" ;;
13406 *) . "./$found_la" ;;
13407 esac
13408 libdir="$save_libdir"
13409 for dep in $dependency_libs; do
13410 case "$dep" in
13411 -L*)
13412 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13413 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
13414 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
13415 haveit=
13416 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
13417 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
13418 if test -n "$GCC"; then
13419 case $host_os in
13420 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13421 esac
13422 fi
13423 fi
13424 if test -z "$haveit"; then
13425 haveit=
13426 for x in $LDFLAGS $LIBPTH; do
13427
13428 acl_save_prefix="$prefix"
13429 prefix="$acl_final_prefix"
13430 acl_save_exec_prefix="$exec_prefix"
13431 exec_prefix="$acl_final_exec_prefix"
13432 eval x=\"$x\"
13433 exec_prefix="$acl_save_exec_prefix"
13434 prefix="$acl_save_prefix"
13435
13436 if test "X$x" = "X-L$additional_libdir"; then
13437 haveit=yes
13438 break
13439 fi
13440 done
13441 if test -z "$haveit"; then
13442 if test -d "$additional_libdir"; then
13443 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
13444 fi
13445 fi
13446 haveit=
13447 for x in $LDFLAGS $LTLIBPTH; do
13448
13449 acl_save_prefix="$prefix"
13450 prefix="$acl_final_prefix"
13451 acl_save_exec_prefix="$exec_prefix"
13452 exec_prefix="$acl_final_exec_prefix"
13453 eval x=\"$x\"
13454 exec_prefix="$acl_save_exec_prefix"
13455 prefix="$acl_save_prefix"
13456
13457 if test "X$x" = "X-L$additional_libdir"; then
13458 haveit=yes
13459 break
13460 fi
13461 done
13462 if test -z "$haveit"; then
13463 if test -d "$additional_libdir"; then
13464 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
13465 fi
13466 fi
13467 fi
13468 fi
13469 ;;
13470 -R*)
13471 dir=`echo "X$dep" | sed -e 's/^X-R//'`
13472 if test "$enable_rpath" != no; then
13473 haveit=
13474 for x in $rpathdirs; do
13475 if test "X$x" = "X$dir"; then
13476 haveit=yes
13477 break
13478 fi
13479 done
13480 if test -z "$haveit"; then
13481 rpathdirs="$rpathdirs $dir"
13482 fi
13483 haveit=
13484 for x in $ltrpathdirs; do
13485 if test "X$x" = "X$dir"; then
13486 haveit=yes
13487 break
13488 fi
13489 done
13490 if test -z "$haveit"; then
13491 ltrpathdirs="$ltrpathdirs $dir"
13492 fi
13493 fi
13494 ;;
13495 -l*)
13496 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13497 ;;
13498 *.la)
13499 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13500 ;;
13501 *)
13502 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
13503 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
13504 ;;
13505 esac
13506 done
13507 fi
13508 else
13509 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
13510 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
13511 fi
13512 fi
13513 fi
13514 done
13515 done
13516 if test "X$rpathdirs" != "X"; then
13517 if test -n "$acl_hardcode_libdir_separator"; then
13518 alldirs=
13519 for found_dir in $rpathdirs; do
13520 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
13521 done
13522 acl_save_libdir="$libdir"
13523 libdir="$alldirs"
13524 eval flag=\"$acl_hardcode_libdir_flag_spec\"
13525 libdir="$acl_save_libdir"
13526 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
13527 else
13528 for found_dir in $rpathdirs; do
13529 acl_save_libdir="$libdir"
13530 libdir="$found_dir"
13531 eval flag=\"$acl_hardcode_libdir_flag_spec\"
13532 libdir="$acl_save_libdir"
13533 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
13534 done
13535 fi
13536 fi
13537 if test "X$ltrpathdirs" != "X"; then
13538 for found_dir in $ltrpathdirs; do
13539 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
13540 done
13541 fi
13542
13543
13544
13545
13546
13547
13548 ac_cv_libpth_libs="$LIBPTH"
13549 ac_cv_libpth_ltlibs="$LTLIBPTH"
13550 ac_cv_libpth_cppflags="$INCPTH"
13551 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
13552
13553fi
13554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
13555$as_echo "$ac_cv_libpth_libs" >&6; }
13556 LIBPTH="$ac_cv_libpth_libs"
13557 LTLIBPTH="$ac_cv_libpth_ltlibs"
13558 INCPTH="$ac_cv_libpth_cppflags"
13559 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
13560
13561 for element in $INCPTH; do
13562 haveit=
13563 for x in $CPPFLAGS; do
13564
13565 acl_save_prefix="$prefix"
13566 prefix="$acl_final_prefix"
13567 acl_save_exec_prefix="$exec_prefix"
13568 exec_prefix="$acl_final_exec_prefix"
13569 eval x=\"$x\"
13570 exec_prefix="$acl_save_exec_prefix"
13571 prefix="$acl_save_prefix"
13572
13573 if test "X$x" = "X$element"; then
13574 haveit=yes
13575 break
13576 fi
13577 done
13578 if test -z "$haveit"; then
13579 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13580 fi
13581 done
13582
13583
13584
13585
13586 HAVE_LIBPTH=yes
13587
13588
13589
13590 gl_have_pth=
13591 gl_save_LIBS="$LIBS"
13592 LIBS="$LIBS $LIBPTH"
13593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13594/* end confdefs.h. */
13595#include <pth.h>
13596int
13597main ()
13598{
13599pth_self();
13600 ;
13601 return 0;
13602}
13603_ACEOF
13604if ac_fn_c_try_link "$LINENO"; then :
13605 gl_have_pth=yes
13606fi
13607rm -f core conftest.err conftest.$ac_objext \
13608 conftest$ac_exeext conftest.$ac_ext
13609 LIBS="$gl_save_LIBS"
13610 if test -n "$gl_have_pth"; then
13611 gl_threads_api=pth
13612 LIBTHREAD="$LIBPTH"
13613 LTLIBTHREAD="$LTLIBPTH"
13614 LIBMULTITHREAD="$LIBTHREAD"
13615 LTLIBMULTITHREAD="$LTLIBTHREAD"
13616
13617$as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
13618
13619 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13620 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13621
13622$as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
13623
13624 LIBTHREAD=
13625 LTLIBTHREAD=
13626 fi
13627 fi
13628 else
13629 CPPFLAGS="$gl_save_CPPFLAGS"
13630 fi
13631 fi
13632 if test -z "$gl_have_pthread"; then
13633 case "$gl_use_threads" in
13634 yes | windows | win32) # The 'win32' is for backward compatibility.
13635 if { case "$host_os" in
13636 mingw*) true;;
13637 *) false;;
13638 esac
13639 }; then
13640 gl_threads_api=windows
13641
13642$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
13643
13644 fi
13645 ;;
13646 esac
13647 fi
13648 fi
13649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
13650$as_echo_n "checking for multithread API to use... " >&6; }
13651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
13652$as_echo "$gl_threads_api" >&6; }
13653
5e8754f9 13654
5e8754f9 13655
5e8754f9
SDJ
13656
13657
13658
5e8754f9 13659
5e8754f9
SDJ
13660
13661
13662
f45c62c4
YQ
13663
13664
472fa5ee
SM
13665
13666
13667
6ec2e0f5
SDJ
13668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
13669$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
d0ac1c44 13670if ${gl_cv_func_malloc_posix+:} false; then :
f45c62c4
YQ
13671 $as_echo_n "(cached) " >&6
13672else
f45c62c4 13673
6ec2e0f5 13674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f45c62c4 13675/* end confdefs.h. */
6ec2e0f5 13676
f45c62c4
YQ
13677int
13678main ()
13679{
5e8754f9 13680#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
13681 choke me
13682 #endif
f45c62c4
YQ
13683
13684 ;
13685 return 0;
13686}
13687_ACEOF
6ec2e0f5
SDJ
13688if ac_fn_c_try_compile "$LINENO"; then :
13689 gl_cv_func_malloc_posix=yes
f45c62c4 13690else
6ec2e0f5 13691 gl_cv_func_malloc_posix=no
f45c62c4 13692fi
6ec2e0f5 13693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6a29c58e
YQ
13694
13695fi
13696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
13697$as_echo "$gl_cv_func_malloc_posix" >&6; }
13698
13699
13700
13701 for ac_header in stdlib.h
98399780
YQ
13702do :
13703 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
d0ac1c44 13704if test "x$ac_cv_header_stdlib_h" = xyes; then :
98399780
YQ
13705 cat >>confdefs.h <<_ACEOF
13706#define HAVE_STDLIB_H 1
13707_ACEOF
13708
13709fi
13710
13711done
13712
6a29c58e 13713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
98399780 13714$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
d0ac1c44 13715if ${ac_cv_func_malloc_0_nonnull+:} false; then :
98399780
YQ
13716 $as_echo_n "(cached) " >&6
13717else
13718 if test "$cross_compiling" = yes; then :
6a29c58e
YQ
13719 case "$host_os" in
13720 # Guess yes on platforms where we know the result.
5e8754f9 13721 *-gnu* | freebsd* | netbsd* | openbsd* \
6a29c58e
YQ
13722 | hpux* | solaris* | cygwin* | mingw*)
13723 ac_cv_func_malloc_0_nonnull=yes ;;
13724 # If we don't know, assume the worst.
13725 *) ac_cv_func_malloc_0_nonnull=no ;;
13726 esac
13727
98399780
YQ
13728else
13729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13730/* end confdefs.h. */
13731#if defined STDC_HEADERS || defined HAVE_STDLIB_H
6a29c58e
YQ
13732 # include <stdlib.h>
13733 #else
13734 char *malloc ();
13735 #endif
98399780
YQ
13736
13737int
13738main ()
13739{
49e4877c
PA
13740char *p = malloc (0);
13741 int result = !p;
13742 free (p);
13743 return result;
98399780
YQ
13744 ;
13745 return 0;
13746}
6a29c58e 13747
98399780
YQ
13748_ACEOF
13749if ac_fn_c_try_run "$LINENO"; then :
13750 ac_cv_func_malloc_0_nonnull=yes
13751else
13752 ac_cv_func_malloc_0_nonnull=no
13753fi
13754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13755 conftest.$ac_objext conftest.beam conftest.$ac_ext
13756fi
13757
6a29c58e 13758
98399780
YQ
13759fi
13760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
13761$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6a29c58e 13762 if test $ac_cv_func_malloc_0_nonnull = yes; then :
98399780
YQ
13763 gl_cv_func_malloc_0_nonnull=1
13764else
13765 gl_cv_func_malloc_0_nonnull=0
13766fi
13767
13768
13769cat >>confdefs.h <<_ACEOF
13770#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
13771_ACEOF
13772
13773
13774
88b48903
WN
13775
13776
472fa5ee
SM
13777
13778
13779
8690e634
JK
13780 GNULIB_BTOWC=0;
13781 GNULIB_WCTOB=0;
13782 GNULIB_MBSINIT=0;
13783 GNULIB_MBRTOWC=0;
13784 GNULIB_MBRLEN=0;
13785 GNULIB_MBSRTOWCS=0;
13786 GNULIB_MBSNRTOWCS=0;
13787 GNULIB_WCRTOMB=0;
13788 GNULIB_WCSRTOMBS=0;
13789 GNULIB_WCSNRTOMBS=0;
13790 GNULIB_WCWIDTH=0;
13791 GNULIB_WMEMCHR=0;
13792 GNULIB_WMEMCMP=0;
13793 GNULIB_WMEMCPY=0;
13794 GNULIB_WMEMMOVE=0;
13795 GNULIB_WMEMSET=0;
13796 GNULIB_WCSLEN=0;
13797 GNULIB_WCSNLEN=0;
13798 GNULIB_WCSCPY=0;
13799 GNULIB_WCPCPY=0;
13800 GNULIB_WCSNCPY=0;
13801 GNULIB_WCPNCPY=0;
13802 GNULIB_WCSCAT=0;
13803 GNULIB_WCSNCAT=0;
13804 GNULIB_WCSCMP=0;
13805 GNULIB_WCSNCMP=0;
13806 GNULIB_WCSCASECMP=0;
13807 GNULIB_WCSNCASECMP=0;
13808 GNULIB_WCSCOLL=0;
13809 GNULIB_WCSXFRM=0;
13810 GNULIB_WCSDUP=0;
13811 GNULIB_WCSCHR=0;
13812 GNULIB_WCSRCHR=0;
13813 GNULIB_WCSCSPN=0;
13814 GNULIB_WCSSPN=0;
13815 GNULIB_WCSPBRK=0;
13816 GNULIB_WCSSTR=0;
13817 GNULIB_WCSTOK=0;
13818 GNULIB_WCSWIDTH=0;
13819 HAVE_BTOWC=1;
13820 HAVE_MBSINIT=1;
13821 HAVE_MBRTOWC=1;
13822 HAVE_MBRLEN=1;
13823 HAVE_MBSRTOWCS=1;
13824 HAVE_MBSNRTOWCS=1;
13825 HAVE_WCRTOMB=1;
13826 HAVE_WCSRTOMBS=1;
13827 HAVE_WCSNRTOMBS=1;
13828 HAVE_WMEMCHR=1;
13829 HAVE_WMEMCMP=1;
13830 HAVE_WMEMCPY=1;
13831 HAVE_WMEMMOVE=1;
13832 HAVE_WMEMSET=1;
13833 HAVE_WCSLEN=1;
13834 HAVE_WCSNLEN=1;
13835 HAVE_WCSCPY=1;
13836 HAVE_WCPCPY=1;
13837 HAVE_WCSNCPY=1;
13838 HAVE_WCPNCPY=1;
13839 HAVE_WCSCAT=1;
13840 HAVE_WCSNCAT=1;
13841 HAVE_WCSCMP=1;
13842 HAVE_WCSNCMP=1;
13843 HAVE_WCSCASECMP=1;
13844 HAVE_WCSNCASECMP=1;
13845 HAVE_WCSCOLL=1;
13846 HAVE_WCSXFRM=1;
13847 HAVE_WCSDUP=1;
13848 HAVE_WCSCHR=1;
13849 HAVE_WCSRCHR=1;
13850 HAVE_WCSCSPN=1;
13851 HAVE_WCSSPN=1;
13852 HAVE_WCSPBRK=1;
13853 HAVE_WCSSTR=1;
13854 HAVE_WCSTOK=1;
13855 HAVE_WCSWIDTH=1;
13856 HAVE_DECL_WCTOB=1;
13857 HAVE_DECL_WCWIDTH=1;
13858 REPLACE_MBSTATE_T=0;
13859 REPLACE_BTOWC=0;
13860 REPLACE_WCTOB=0;
13861 REPLACE_MBSINIT=0;
13862 REPLACE_MBRTOWC=0;
13863 REPLACE_MBRLEN=0;
13864 REPLACE_MBSRTOWCS=0;
13865 REPLACE_MBSNRTOWCS=0;
13866 REPLACE_WCRTOMB=0;
13867 REPLACE_WCSRTOMBS=0;
13868 REPLACE_WCSNRTOMBS=0;
13869 REPLACE_WCWIDTH=0;
13870 REPLACE_WCSWIDTH=0;
13871
13872
13873
13874
13875
13876
13877
13878
472fa5ee
SM
13879
13880
13881
13882
13883
13884
8690e634
JK
13885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
13886$as_echo_n "checking for a traditional japanese locale... " >&6; }
d0ac1c44 13887if ${gt_cv_locale_ja+:} false; then :
8690e634
JK
13888 $as_echo_n "(cached) " >&6
13889else
13890
13891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13892/* end confdefs.h. */
13893
13894#include <locale.h>
13895#include <time.h>
13896#if HAVE_LANGINFO_CODESET
13897# include <langinfo.h>
13898#endif
13899#include <stdlib.h>
13900#include <string.h>
13901struct tm t;
13902char buf[16];
13903int main ()
13904{
5e8754f9 13905 const char *p;
8690e634 13906 /* Check whether the given locale name is recognized by the system. */
5e8754f9 13907#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
13908 /* On native Windows, setlocale(category, "") looks at the system settings,
13909 not at the environment variables. Also, when an encoding suffix such
13910 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
13911 category of the locale to "C". */
13912 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
13913 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
13914 return 1;
5e8754f9 13915#else
8690e634 13916 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 13917#endif
8690e634
JK
13918 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
13919 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
13920 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
13921 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
13922 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
13923 some unit tests fail.
13924 On MirBSD 10, when an unsupported locale is specified, setlocale()
13925 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 13926#if HAVE_LANGINFO_CODESET
8690e634
JK
13927 {
13928 const char *cs = nl_langinfo (CODESET);
13929 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
13930 || strcmp (cs, "UTF-8") == 0)
13931 return 1;
13932 }
5e8754f9
SDJ
13933#endif
13934#ifdef __CYGWIN__
8690e634
JK
13935 /* On Cygwin, avoid locale names without encoding suffix, because the
13936 locale_charset() function relies on the encoding suffix. Note that
13937 LC_ALL is set on the command line. */
13938 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 13939#endif
8690e634
JK
13940 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
13941 on Cygwin 1.5.x. */
13942 if (MB_CUR_MAX == 1)
13943 return 1;
13944 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
13945 This excludes the UTF-8 encoding (except on MirBSD). */
5e8754f9
SDJ
13946 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
13947 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
13948 for (p = buf; *p != '\0'; p++)
13949 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
13950 return 1;
8690e634
JK
13951 return 0;
13952}
13953
13954_ACEOF
13955 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13956 (eval $ac_link) 2>&5
13957 ac_status=$?
13958 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13959 test $ac_status = 0; } && test -s conftest$ac_exeext; then
13960 case "$host_os" in
13961 # Handle native Windows specially, because there setlocale() interprets
13962 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
13963 # "fr" or "fra" as "French" or "French_France.1252",
13964 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
13965 # "ja" as "Japanese" or "Japanese_Japan.932",
13966 # and similar.
13967 mingw*)
13968 # Note that on native Windows, the Japanese locale is
13969 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
13970 # cannot use it here.
13971 gt_cv_locale_ja=none
13972 ;;
13973 *)
13974 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
13975 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
13976 # configure script would override the LC_ALL setting. Likewise for
13977 # LC_CTYPE, which is also set at the beginning of the configure script.
13978 # Test for the AIX locale name.
13979 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13980 gt_cv_locale_ja=ja_JP
13981 else
13982 # Test for the locale name with explicit encoding suffix.
13983 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13984 gt_cv_locale_ja=ja_JP.EUC-JP
13985 else
13986 # Test for the HP-UX, OSF/1, NetBSD locale name.
13987 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13988 gt_cv_locale_ja=ja_JP.eucJP
13989 else
13990 # Test for the IRIX, FreeBSD locale name.
13991 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13992 gt_cv_locale_ja=ja_JP.EUC
13993 else
13994 # Test for the Solaris 7 locale name.
13995 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13996 gt_cv_locale_ja=ja
13997 else
13998 # Special test for NetBSD 1.6.
13999 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14000 gt_cv_locale_ja=ja_JP.eucJP
14001 else
14002 # None found.
14003 gt_cv_locale_ja=none
14004 fi
14005 fi
14006 fi
14007 fi
14008 fi
14009 fi
14010 ;;
14011 esac
14012 fi
14013 rm -fr conftest*
14014
14015fi
14016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14017$as_echo "$gt_cv_locale_ja" >&6; }
14018 LOCALE_JA=$gt_cv_locale_ja
14019
14020
14021
14022
14023
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14025$as_echo_n "checking for a transitional chinese locale... " >&6; }
d0ac1c44 14026if ${gt_cv_locale_zh_CN+:} false; then :
8690e634
JK
14027 $as_echo_n "(cached) " >&6
14028else
14029
14030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14031/* end confdefs.h. */
14032
14033#include <locale.h>
14034#include <stdlib.h>
14035#include <time.h>
14036#if HAVE_LANGINFO_CODESET
14037# include <langinfo.h>
14038#endif
14039#include <stdlib.h>
14040#include <string.h>
14041struct tm t;
14042char buf[16];
14043int main ()
14044{
5e8754f9 14045 const char *p;
8690e634 14046 /* Check whether the given locale name is recognized by the system. */
5e8754f9 14047#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
14048 /* On native Windows, setlocale(category, "") looks at the system settings,
14049 not at the environment variables. Also, when an encoding suffix such
14050 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14051 category of the locale to "C". */
14052 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14053 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14054 return 1;
5e8754f9 14055#else
8690e634 14056 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 14057#endif
8690e634
JK
14058 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14059 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14060 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14061 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14062 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14063 some unit tests fail.
14064 On MirBSD 10, when an unsupported locale is specified, setlocale()
14065 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 14066#if HAVE_LANGINFO_CODESET
8690e634
JK
14067 {
14068 const char *cs = nl_langinfo (CODESET);
14069 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14070 || strcmp (cs, "UTF-8") == 0)
14071 return 1;
14072 }
5e8754f9
SDJ
14073#endif
14074#ifdef __CYGWIN__
8690e634
JK
14075 /* On Cygwin, avoid locale names without encoding suffix, because the
14076 locale_charset() function relies on the encoding suffix. Note that
14077 LC_ALL is set on the command line. */
14078 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 14079#endif
8690e634
JK
14080 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14081 This excludes the UTF-8 encoding (except on MirBSD). */
5e8754f9
SDJ
14082 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14083 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14084 for (p = buf; *p != '\0'; p++)
14085 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14086 return 1;
8690e634
JK
14087 /* Check whether a typical GB18030 multibyte sequence is recognized as a
14088 single wide character. This excludes the GB2312 and GBK encodings. */
14089 if (mblen ("\203\062\332\066", 5) != 4)
14090 return 1;
14091 return 0;
14092}
14093
14094_ACEOF
14095 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14096 (eval $ac_link) 2>&5
14097 ac_status=$?
14098 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14099 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14100 case "$host_os" in
14101 # Handle native Windows specially, because there setlocale() interprets
14102 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14103 # "fr" or "fra" as "French" or "French_France.1252",
14104 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14105 # "ja" as "Japanese" or "Japanese_Japan.932",
14106 # and similar.
14107 mingw*)
14108 # Test for the hypothetical native Windows locale name.
14109 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14110 gt_cv_locale_zh_CN=Chinese_China.54936
14111 else
14112 # None found.
14113 gt_cv_locale_zh_CN=none
14114 fi
14115 ;;
14116 solaris2.8)
14117 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
14118 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
14119 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
14120 gt_cv_locale_zh_CN=none
14121 ;;
14122 *)
14123 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14124 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14125 # configure script would override the LC_ALL setting. Likewise for
14126 # LC_CTYPE, which is also set at the beginning of the configure script.
14127 # Test for the locale name without encoding suffix.
14128 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14129 gt_cv_locale_zh_CN=zh_CN
14130 else
14131 # Test for the locale name with explicit encoding suffix.
14132 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14133 gt_cv_locale_zh_CN=zh_CN.GB18030
14134 else
14135 # None found.
14136 gt_cv_locale_zh_CN=none
14137 fi
14138 fi
14139 ;;
14140 esac
14141 else
14142 # If there was a link error, due to mblen(), the system is so old that
14143 # it certainly doesn't have a chinese locale.
14144 gt_cv_locale_zh_CN=none
14145 fi
14146 rm -fr conftest*
14147
14148fi
14149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
14150$as_echo "$gt_cv_locale_zh_CN" >&6; }
14151 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
14152
14153
14154
14155
14156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14157$as_echo_n "checking for a french Unicode locale... " >&6; }
d0ac1c44 14158if ${gt_cv_locale_fr_utf8+:} false; then :
8690e634
JK
14159 $as_echo_n "(cached) " >&6
14160else
14161
14162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14163/* end confdefs.h. */
14164
14165#include <locale.h>
14166#include <time.h>
14167#if HAVE_LANGINFO_CODESET
14168# include <langinfo.h>
14169#endif
14170#include <stdlib.h>
14171#include <string.h>
14172struct tm t;
14173char buf[16];
14174int main () {
14175 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
14176 imitates locale dependent behaviour by looking at the environment
14177 variables, and all locales use the UTF-8 encoding. */
14178#if !(defined __BEOS__ || defined __HAIKU__)
14179 /* Check whether the given locale name is recognized by the system. */
5e8754f9 14180# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
14181 /* On native Windows, setlocale(category, "") looks at the system settings,
14182 not at the environment variables. Also, when an encoding suffix such
14183 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14184 category of the locale to "C". */
14185 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14186 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14187 return 1;
14188# else
14189 if (setlocale (LC_ALL, "") == NULL) return 1;
14190# endif
14191 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14192 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14193 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14194 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14195 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14196 some unit tests fail. */
14197# if HAVE_LANGINFO_CODESET
14198 {
14199 const char *cs = nl_langinfo (CODESET);
14200 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14201 return 1;
14202 }
14203# endif
14204# ifdef __CYGWIN__
14205 /* On Cygwin, avoid locale names without encoding suffix, because the
14206 locale_charset() function relies on the encoding suffix. Note that
14207 LC_ALL is set on the command line. */
14208 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14209# endif
14210 /* Check whether in the abbreviation of the second month, the second
14211 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14212 two bytes long, with UTF-8 encoding. */
14213 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14214 if (strftime (buf, sizeof (buf), "%b", &t) < 4
14215 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14216 return 1;
14217#endif
14218#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
14219 /* Check whether the decimal separator is a comma.
14220 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14221 are nl_langinfo(RADIXCHAR) are both ".". */
14222 if (localeconv () ->decimal_point[0] != ',') return 1;
14223#endif
14224 return 0;
14225}
14226
14227_ACEOF
14228 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14229 (eval $ac_link) 2>&5
14230 ac_status=$?
14231 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14232 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14233 case "$host_os" in
14234 # Handle native Windows specially, because there setlocale() interprets
14235 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14236 # "fr" or "fra" as "French" or "French_France.1252",
14237 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14238 # "ja" as "Japanese" or "Japanese_Japan.932",
14239 # and similar.
14240 mingw*)
14241 # Test for the hypothetical native Windows locale name.
14242 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14243 gt_cv_locale_fr_utf8=French_France.65001
14244 else
14245 # None found.
14246 gt_cv_locale_fr_utf8=none
14247 fi
14248 ;;
14249 *)
14250 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14251 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14252 # configure script would override the LC_ALL setting. Likewise for
14253 # LC_CTYPE, which is also set at the beginning of the configure script.
14254 # Test for the usual locale name.
14255 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14256 gt_cv_locale_fr_utf8=fr_FR
14257 else
14258 # Test for the locale name with explicit encoding suffix.
14259 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14260 gt_cv_locale_fr_utf8=fr_FR.UTF-8
14261 else
14262 # Test for the Solaris 7 locale name.
14263 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14264 gt_cv_locale_fr_utf8=fr.UTF-8
14265 else
14266 # None found.
14267 gt_cv_locale_fr_utf8=none
14268 fi
14269 fi
14270 fi
14271 ;;
14272 esac
14273 fi
14274 rm -fr conftest*
14275
14276fi
14277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
14278$as_echo "$gt_cv_locale_fr_utf8" >&6; }
14279 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
14280
14281
14282
14283
14284
14285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
14286$as_echo_n "checking for a traditional french locale... " >&6; }
d0ac1c44 14287if ${gt_cv_locale_fr+:} false; then :
8690e634
JK
14288 $as_echo_n "(cached) " >&6
14289else
14290
14291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14292/* end confdefs.h. */
14293
14294#include <locale.h>
14295#include <time.h>
14296#if HAVE_LANGINFO_CODESET
14297# include <langinfo.h>
14298#endif
14299#include <stdlib.h>
14300#include <string.h>
14301struct tm t;
14302char buf[16];
14303int main () {
14304 /* Check whether the given locale name is recognized by the system. */
5e8754f9 14305#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
14306 /* On native Windows, setlocale(category, "") looks at the system settings,
14307 not at the environment variables. Also, when an encoding suffix such
14308 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14309 category of the locale to "C". */
14310 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14311 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14312 return 1;
5e8754f9 14313#else
8690e634 14314 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 14315#endif
8690e634
JK
14316 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14317 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14318 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14319 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14320 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14321 some unit tests fail.
14322 On MirBSD 10, when an unsupported locale is specified, setlocale()
14323 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 14324#if HAVE_LANGINFO_CODESET
8690e634
JK
14325 {
14326 const char *cs = nl_langinfo (CODESET);
14327 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14328 || strcmp (cs, "UTF-8") == 0)
14329 return 1;
14330 }
5e8754f9
SDJ
14331#endif
14332#ifdef __CYGWIN__
8690e634
JK
14333 /* On Cygwin, avoid locale names without encoding suffix, because the
14334 locale_charset() function relies on the encoding suffix. Note that
14335 LC_ALL is set on the command line. */
14336 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 14337#endif
8690e634
JK
14338 /* Check whether in the abbreviation of the second month, the second
14339 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
14340 one byte long. This excludes the UTF-8 encoding. */
14341 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14342 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
5e8754f9 14343#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8690e634
JK
14344 /* Check whether the decimal separator is a comma.
14345 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14346 are nl_langinfo(RADIXCHAR) are both ".". */
14347 if (localeconv () ->decimal_point[0] != ',') return 1;
7a6dbc2f 14348#endif
5e8754f9 14349 return 0;
8690e634
JK
14350}
14351
14352_ACEOF
14353 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14354 (eval $ac_link) 2>&5
14355 ac_status=$?
14356 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14357 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14358 case "$host_os" in
14359 # Handle native Windows specially, because there setlocale() interprets
14360 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14361 # "fr" or "fra" as "French" or "French_France.1252",
14362 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14363 # "ja" as "Japanese" or "Japanese_Japan.932",
14364 # and similar.
14365 mingw*)
14366 # Test for the native Windows locale name.
14367 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14368 gt_cv_locale_fr=French_France.1252
14369 else
14370 # None found.
14371 gt_cv_locale_fr=none
14372 fi
14373 ;;
14374 *)
14375 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14376 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14377 # configure script would override the LC_ALL setting. Likewise for
14378 # LC_CTYPE, which is also set at the beginning of the configure script.
14379 # Test for the usual locale name.
14380 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14381 gt_cv_locale_fr=fr_FR
14382 else
14383 # Test for the locale name with explicit encoding suffix.
14384 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14385 gt_cv_locale_fr=fr_FR.ISO-8859-1
14386 else
14387 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
14388 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14389 gt_cv_locale_fr=fr_FR.ISO8859-1
14390 else
14391 # Test for the HP-UX locale name.
14392 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14393 gt_cv_locale_fr=fr_FR.iso88591
14394 else
14395 # Test for the Solaris 7 locale name.
14396 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14397 gt_cv_locale_fr=fr
14398 else
14399 # None found.
14400 gt_cv_locale_fr=none
14401 fi
14402 fi
14403 fi
14404 fi
14405 fi
14406 ;;
14407 esac
14408 fi
14409 rm -fr conftest*
14410
14411fi
6ec2e0f5
SDJ
14412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
14413$as_echo "$gt_cv_locale_fr" >&6; }
14414 LOCALE_FR=$gt_cv_locale_fr
14415
14416
14417
14418
14419
14420
14421
472fa5ee
SM
14422
14423
14424
14425
14426
14427
14428 GNULIB_FFSL=0;
14429 GNULIB_FFSLL=0;
6ec2e0f5
SDJ
14430 GNULIB_MEMCHR=0;
14431 GNULIB_MEMMEM=0;
14432 GNULIB_MEMPCPY=0;
14433 GNULIB_MEMRCHR=0;
14434 GNULIB_RAWMEMCHR=0;
14435 GNULIB_STPCPY=0;
14436 GNULIB_STPNCPY=0;
14437 GNULIB_STRCHRNUL=0;
14438 GNULIB_STRDUP=0;
14439 GNULIB_STRNCAT=0;
14440 GNULIB_STRNDUP=0;
14441 GNULIB_STRNLEN=0;
14442 GNULIB_STRPBRK=0;
14443 GNULIB_STRSEP=0;
14444 GNULIB_STRSTR=0;
14445 GNULIB_STRCASESTR=0;
14446 GNULIB_STRTOK_R=0;
14447 GNULIB_MBSLEN=0;
14448 GNULIB_MBSNLEN=0;
14449 GNULIB_MBSCHR=0;
14450 GNULIB_MBSRCHR=0;
14451 GNULIB_MBSSTR=0;
14452 GNULIB_MBSCASECMP=0;
14453 GNULIB_MBSNCASECMP=0;
14454 GNULIB_MBSPCASECMP=0;
14455 GNULIB_MBSCASESTR=0;
14456 GNULIB_MBSCSPN=0;
14457 GNULIB_MBSPBRK=0;
14458 GNULIB_MBSSPN=0;
14459 GNULIB_MBSSEP=0;
14460 GNULIB_MBSTOK_R=0;
14461 GNULIB_STRERROR=0;
14462 GNULIB_STRERROR_R=0;
14463 GNULIB_STRSIGNAL=0;
14464 GNULIB_STRVERSCMP=0;
14465 HAVE_MBSLEN=0;
5e8754f9 14466 HAVE_FFSL=1;
6ec2e0f5
SDJ
14467 HAVE_FFSLL=1;
14468 HAVE_MEMCHR=1;
14469 HAVE_DECL_MEMMEM=1;
14470 HAVE_MEMPCPY=1;
14471 HAVE_DECL_MEMRCHR=1;
14472 HAVE_RAWMEMCHR=1;
14473 HAVE_STPCPY=1;
14474 HAVE_STPNCPY=1;
14475 HAVE_STRCHRNUL=1;
14476 HAVE_DECL_STRDUP=1;
14477 HAVE_DECL_STRNDUP=1;
14478 HAVE_DECL_STRNLEN=1;
14479 HAVE_STRPBRK=1;
14480 HAVE_STRSEP=1;
14481 HAVE_STRCASESTR=1;
14482 HAVE_DECL_STRTOK_R=1;
14483 HAVE_DECL_STRERROR_R=1;
14484 HAVE_DECL_STRSIGNAL=1;
14485 HAVE_STRVERSCMP=1;
14486 REPLACE_MEMCHR=0;
14487 REPLACE_MEMMEM=0;
14488 REPLACE_STPNCPY=0;
14489 REPLACE_STRDUP=0;
14490 REPLACE_STRSTR=0;
14491 REPLACE_STRCASESTR=0;
5e8754f9 14492 REPLACE_STRCHRNUL=0;
6ec2e0f5
SDJ
14493 REPLACE_STRERROR=0;
14494 REPLACE_STRERROR_R=0;
5e8754f9
SDJ
14495 REPLACE_STRNCAT=0;
14496 REPLACE_STRNDUP=0;
14497 REPLACE_STRNLEN=0;
6ec2e0f5 14498 REPLACE_STRSIGNAL=0;
5e8754f9 14499 REPLACE_STRTOK_R=0;
6ec2e0f5
SDJ
14500 UNDEFINE_STRTOK_R=0;
14501
14502
14503
14504
14505
14506 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
14507 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
14508 # irrelevant for anonymous mappings.
14509 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
d0ac1c44 14510if test "x$ac_cv_func_mmap" = xyes; then :
6ec2e0f5
SDJ
14511 gl_have_mmap=yes
14512else
14513 gl_have_mmap=no
14514fi
14515
14516
14517 # Try to allow MAP_ANONYMOUS.
14518 gl_have_mmap_anonymous=no
14519 if test $gl_have_mmap = yes; then
14520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
14521$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
14522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14523/* end confdefs.h. */
14524
14525#include <sys/mman.h>
14526#ifdef MAP_ANONYMOUS
14527 I cannot identify this map
14528#endif
14529
14530_ACEOF
14531if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14532 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14533 gl_have_mmap_anonymous=yes
14534fi
14535rm -f conftest*
14536
14537 if test $gl_have_mmap_anonymous != yes; then
14538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14539/* end confdefs.h. */
14540
14541#include <sys/mman.h>
14542#ifdef MAP_ANON
14543 I cannot identify this map
14544#endif
14545
14546_ACEOF
14547if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14548 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14549
14550$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
14551
14552 gl_have_mmap_anonymous=yes
14553fi
14554rm -f conftest*
14555
14556 fi
14557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
14558$as_echo "$gl_have_mmap_anonymous" >&6; }
14559 if test $gl_have_mmap_anonymous = yes; then
14560
14561$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
14562
14563 fi
14564 fi
14565
14566
472fa5ee
SM
14567 :
14568
14569
14570
14571
14572
14573
14574 :
14575
14576
14577
14578
6ec2e0f5
SDJ
14579
14580
14581
14582
14583 if test $HAVE_MEMCHR = 1; then
14584 # Detect platform-specific bugs in some versions of glibc:
14585 # memchr should not dereference anything with length 0
5e8754f9 14586 # http://bugzilla.redhat.com/499689
6ec2e0f5 14587 # memchr should not dereference overestimated length after a match
5e8754f9
SDJ
14588 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
14589 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
6ec2e0f5
SDJ
14590 # Assume that memchr works on platforms that lack mprotect.
14591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
14592$as_echo_n "checking whether memchr works... " >&6; }
d0ac1c44 14593if ${gl_cv_func_memchr_works+:} false; then :
6ec2e0f5
SDJ
14594 $as_echo_n "(cached) " >&6
14595else
14596 if test "$cross_compiling" = yes; then :
5e8754f9 14597 gl_cv_func_memchr_works="guessing no"
6ec2e0f5
SDJ
14598else
14599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14600/* end confdefs.h. */
14601
14602#include <string.h>
14603#if HAVE_SYS_MMAN_H
14604# include <fcntl.h>
14605# include <unistd.h>
14606# include <sys/types.h>
14607# include <sys/mman.h>
14608# ifndef MAP_FILE
14609# define MAP_FILE 0
14610# endif
14611#endif
14612
14613int
14614main ()
14615{
14616
14617 int result = 0;
14618 char *fence = NULL;
14619#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
14620# if HAVE_MAP_ANONYMOUS
14621 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
14622 const int fd = -1;
14623# else /* !HAVE_MAP_ANONYMOUS */
14624 const int flags = MAP_FILE | MAP_PRIVATE;
14625 int fd = open ("/dev/zero", O_RDONLY, 0666);
14626 if (fd >= 0)
14627# endif
14628 {
14629 int pagesize = getpagesize ();
14630 char *two_pages =
14631 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
14632 flags, fd, 0);
14633 if (two_pages != (char *)(-1)
14634 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
14635 fence = two_pages + pagesize;
14636 }
14637#endif
14638 if (fence)
14639 {
14640 if (memchr (fence, 0, 0))
14641 result |= 1;
14642 strcpy (fence - 9, "12345678");
14643 if (memchr (fence - 9, 0, 79) != fence - 1)
14644 result |= 2;
14645 if (memchr (fence - 1, 0, 3) != fence - 1)
14646 result |= 4;
14647 }
14648 return result;
14649
14650 ;
14651 return 0;
14652}
14653_ACEOF
14654if ac_fn_c_try_run "$LINENO"; then :
14655 gl_cv_func_memchr_works=yes
14656else
14657 gl_cv_func_memchr_works=no
14658fi
14659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14660 conftest.$ac_objext conftest.beam conftest.$ac_ext
14661fi
14662
14663fi
14664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
14665$as_echo "$gl_cv_func_memchr_works" >&6; }
5e8754f9
SDJ
14666 if test "$gl_cv_func_memchr_works" != yes; then
14667 REPLACE_MEMCHR=1
14668 fi
6ec2e0f5
SDJ
14669 fi
14670
472fa5ee
SM
14671
14672 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
d0ac1c44 14673if test "x$ac_cv_have_decl_memmem" = xyes; then :
6ec2e0f5
SDJ
14674 ac_have_decl=1
14675else
14676 ac_have_decl=0
14677fi
14678
14679cat >>confdefs.h <<_ACEOF
14680#define HAVE_DECL_MEMMEM $ac_have_decl
14681_ACEOF
14682
14683
14684
14685
14686
472fa5ee 14687
6ec2e0f5
SDJ
14688 for ac_func in memmem
14689do :
14690 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 14691if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
14692 cat >>confdefs.h <<_ACEOF
14693#define HAVE_MEMMEM 1
14694_ACEOF
14695
14696fi
14697done
14698
14699 if test $ac_cv_func_memmem = yes; then
14700 HAVE_MEMMEM=1
14701 else
14702 HAVE_MEMMEM=0
14703 fi
14704
472fa5ee
SM
14705 :
14706
14707
14708
14709
14710
6ec2e0f5
SDJ
14711 if test $ac_cv_have_decl_memmem = no; then
14712 HAVE_DECL_MEMMEM=0
14713 else
14714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
14715$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 14716if ${gl_cv_func_memmem_works_always+:} false; then :
6ec2e0f5
SDJ
14717 $as_echo_n "(cached) " >&6
14718else
14719 if test "$cross_compiling" = yes; then :
14720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14721/* end confdefs.h. */
14722
14723#ifdef __GNU_LIBRARY__
14724 #include <features.h>
14725 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
14726 || __GLIBC_MINOR__ > 12)) \
14727 || (__GLIBC__ > 2)) \
14728 || defined __UCLIBC__
14729 Lucky user
14730 #endif
14731#elif defined __CYGWIN__
14732 #include <cygwin/version.h>
14733 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
14734 Lucky user
14735 #endif
14736#else
14737 Lucky user
14738#endif
14739
14740_ACEOF
14741if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14742 $EGREP "Lucky user" >/dev/null 2>&1; then :
14743 gl_cv_func_memmem_works_always="guessing yes"
14744else
14745 gl_cv_func_memmem_works_always="guessing no"
14746fi
14747rm -f conftest*
14748
14749
14750else
14751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14752/* end confdefs.h. */
14753
14754#include <string.h> /* for memmem */
14755#define P "_EF_BF_BD"
14756#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
14757#define NEEDLE P P P P P
14758
14759int
14760main ()
14761{
14762
14763 int result = 0;
14764 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
14765 result |= 1;
14766 /* Check for empty needle behavior. */
14767 {
14768 const char *haystack = "AAA";
14769 if (memmem (haystack, 3, NULL, 0) != haystack)
14770 result |= 2;
14771 }
14772 return result;
14773
14774 ;
14775 return 0;
14776}
14777_ACEOF
14778if ac_fn_c_try_run "$LINENO"; then :
14779 gl_cv_func_memmem_works_always=yes
14780else
14781 gl_cv_func_memmem_works_always=no
14782fi
14783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14784 conftest.$ac_objext conftest.beam conftest.$ac_ext
14785fi
14786
14787
14788fi
14789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
14790$as_echo "$gl_cv_func_memmem_works_always" >&6; }
14791 case "$gl_cv_func_memmem_works_always" in
14792 *yes) ;;
14793 *)
14794 REPLACE_MEMMEM=1
14795 ;;
14796 esac
14797 fi
14798 :
14799
472fa5ee
SM
14800
14801 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
d0ac1c44 14802if test "x$ac_cv_have_decl_memrchr" = xyes; then :
6ec2e0f5
SDJ
14803 ac_have_decl=1
14804else
14805 ac_have_decl=0
14806fi
14807
14808cat >>confdefs.h <<_ACEOF
14809#define HAVE_DECL_MEMRCHR $ac_have_decl
14810_ACEOF
14811
14812
14813
14814
14815
14816
2d8adcbd
MM
14817
14818
472fa5ee
SM
14819
14820
14821
14822
6ec2e0f5
SDJ
14823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
14824$as_echo_n "checking for promoted mode_t type... " >&6; }
d0ac1c44 14825if ${gl_cv_promoted_mode_t+:} false; then :
6ec2e0f5
SDJ
14826 $as_echo_n "(cached) " >&6
14827else
14828
14829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14830/* end confdefs.h. */
14831#include <sys/types.h>
14832int
14833main ()
14834{
14835typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
14836 ;
14837 return 0;
14838}
14839_ACEOF
14840if ac_fn_c_try_compile "$LINENO"; then :
14841 gl_cv_promoted_mode_t='int'
14842else
14843 gl_cv_promoted_mode_t='mode_t'
14844fi
14845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14846
14847fi
14848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
14849$as_echo "$gl_cv_promoted_mode_t" >&6; }
14850
14851cat >>confdefs.h <<_ACEOF
14852#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
14853_ACEOF
14854
14855
14856
14857
14858
472fa5ee
SM
14859
14860
14861
6ec2e0f5
SDJ
14862 GNULIB_DPRINTF=0;
14863 GNULIB_FCLOSE=0;
14864 GNULIB_FDOPEN=0;
14865 GNULIB_FFLUSH=0;
14866 GNULIB_FGETC=0;
14867 GNULIB_FGETS=0;
14868 GNULIB_FOPEN=0;
14869 GNULIB_FPRINTF=0;
14870 GNULIB_FPRINTF_POSIX=0;
14871 GNULIB_FPURGE=0;
14872 GNULIB_FPUTC=0;
14873 GNULIB_FPUTS=0;
14874 GNULIB_FREAD=0;
14875 GNULIB_FREOPEN=0;
14876 GNULIB_FSCANF=0;
14877 GNULIB_FSEEK=0;
14878 GNULIB_FSEEKO=0;
14879 GNULIB_FTELL=0;
14880 GNULIB_FTELLO=0;
14881 GNULIB_FWRITE=0;
14882 GNULIB_GETC=0;
14883 GNULIB_GETCHAR=0;
14884 GNULIB_GETDELIM=0;
14885 GNULIB_GETLINE=0;
14886 GNULIB_OBSTACK_PRINTF=0;
14887 GNULIB_OBSTACK_PRINTF_POSIX=0;
14888 GNULIB_PCLOSE=0;
14889 GNULIB_PERROR=0;
14890 GNULIB_POPEN=0;
14891 GNULIB_PRINTF=0;
14892 GNULIB_PRINTF_POSIX=0;
14893 GNULIB_PUTC=0;
14894 GNULIB_PUTCHAR=0;
14895 GNULIB_PUTS=0;
14896 GNULIB_REMOVE=0;
14897 GNULIB_RENAME=0;
14898 GNULIB_RENAMEAT=0;
14899 GNULIB_SCANF=0;
14900 GNULIB_SNPRINTF=0;
14901 GNULIB_SPRINTF_POSIX=0;
14902 GNULIB_STDIO_H_NONBLOCKING=0;
14903 GNULIB_STDIO_H_SIGPIPE=0;
14904 GNULIB_TMPFILE=0;
14905 GNULIB_VASPRINTF=0;
14906 GNULIB_VFSCANF=0;
14907 GNULIB_VSCANF=0;
14908 GNULIB_VDPRINTF=0;
14909 GNULIB_VFPRINTF=0;
14910 GNULIB_VFPRINTF_POSIX=0;
14911 GNULIB_VPRINTF=0;
14912 GNULIB_VPRINTF_POSIX=0;
14913 GNULIB_VSNPRINTF=0;
14914 GNULIB_VSPRINTF_POSIX=0;
14915 HAVE_DECL_FPURGE=1;
14916 HAVE_DECL_FSEEKO=1;
14917 HAVE_DECL_FTELLO=1;
14918 HAVE_DECL_GETDELIM=1;
14919 HAVE_DECL_GETLINE=1;
14920 HAVE_DECL_OBSTACK_PRINTF=1;
14921 HAVE_DECL_SNPRINTF=1;
14922 HAVE_DECL_VSNPRINTF=1;
14923 HAVE_DPRINTF=1;
14924 HAVE_FSEEKO=1;
14925 HAVE_FTELLO=1;
14926 HAVE_PCLOSE=1;
14927 HAVE_POPEN=1;
14928 HAVE_RENAMEAT=1;
14929 HAVE_VASPRINTF=1;
14930 HAVE_VDPRINTF=1;
14931 REPLACE_DPRINTF=0;
14932 REPLACE_FCLOSE=0;
14933 REPLACE_FDOPEN=0;
14934 REPLACE_FFLUSH=0;
14935 REPLACE_FOPEN=0;
14936 REPLACE_FPRINTF=0;
14937 REPLACE_FPURGE=0;
14938 REPLACE_FREOPEN=0;
14939 REPLACE_FSEEK=0;
14940 REPLACE_FSEEKO=0;
14941 REPLACE_FTELL=0;
14942 REPLACE_FTELLO=0;
14943 REPLACE_GETDELIM=0;
14944 REPLACE_GETLINE=0;
14945 REPLACE_OBSTACK_PRINTF=0;
14946 REPLACE_PERROR=0;
14947 REPLACE_POPEN=0;
14948 REPLACE_PRINTF=0;
14949 REPLACE_REMOVE=0;
14950 REPLACE_RENAME=0;
14951 REPLACE_RENAMEAT=0;
14952 REPLACE_SNPRINTF=0;
14953 REPLACE_SPRINTF=0;
14954 REPLACE_STDIO_READ_FUNCS=0;
14955 REPLACE_STDIO_WRITE_FUNCS=0;
14956 REPLACE_TMPFILE=0;
14957 REPLACE_VASPRINTF=0;
14958 REPLACE_VDPRINTF=0;
14959 REPLACE_VFPRINTF=0;
14960 REPLACE_VPRINTF=0;
14961 REPLACE_VSNPRINTF=0;
14962 REPLACE_VSPRINTF=0;
14963
14964
14965
2d8adcbd
MM
14966
14967
14968
14969
5e8754f9
SDJ
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
472fa5ee 14995 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
d0ac1c44 14996if test "x$ac_cv_have_decl_setenv" = xyes; then :
6ec2e0f5
SDJ
14997 ac_have_decl=1
14998else
14999 ac_have_decl=0
15000fi
15001
15002cat >>confdefs.h <<_ACEOF
15003#define HAVE_DECL_SETENV $ac_have_decl
15004_ACEOF
15005
15006
15007
15008
15009
15010
472fa5ee
SM
15011
15012
15013
15014
15015 :
15016
15017
15018
15019
15020
6ec2e0f5
SDJ
15021 if test $ac_cv_have_decl_setenv = no; then
15022 HAVE_DECL_SETENV=0
15023 fi
15024
472fa5ee
SM
15025 :
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035 :
15036
6ec2e0f5
SDJ
15037
15038
15039
15040
15041 for ac_header in search.h
15042do :
15043 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
d0ac1c44 15044if test "x$ac_cv_header_search_h" = xyes; then :
6ec2e0f5
SDJ
15045 cat >>confdefs.h <<_ACEOF
15046#define HAVE_SEARCH_H 1
15047_ACEOF
15048
15049fi
15050
15051done
15052
15053 for ac_func in tsearch
15054do :
15055 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
d0ac1c44 15056if test "x$ac_cv_func_tsearch" = xyes; then :
6ec2e0f5
SDJ
15057 cat >>confdefs.h <<_ACEOF
15058#define HAVE_TSEARCH 1
15059_ACEOF
15060
15061fi
15062done
15063
15064
15065
15066
15067 GNULIB_PTHREAD_SIGMASK=0;
15068 GNULIB_RAISE=0;
15069 GNULIB_SIGNAL_H_SIGPIPE=0;
15070 GNULIB_SIGPROCMASK=0;
15071 GNULIB_SIGACTION=0;
15072 HAVE_POSIX_SIGNALBLOCKING=1;
15073 HAVE_PTHREAD_SIGMASK=1;
15074 HAVE_RAISE=1;
15075 HAVE_SIGSET_T=1;
15076 HAVE_SIGINFO_T=1;
15077 HAVE_SIGACTION=1;
15078 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
15079
15080 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
15081
15082 HAVE_SIGHANDLER_T=1;
15083 REPLACE_PTHREAD_SIGMASK=0;
15084 REPLACE_RAISE=0;
15085
15086
15087 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
15088 #include <signal.h>
15089 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
15090 #include <sys/types.h>
15091
15092"
d0ac1c44 15093if test "x$ac_cv_type_sigset_t" = xyes; then :
6ec2e0f5
SDJ
15094
15095cat >>confdefs.h <<_ACEOF
15096#define HAVE_SIGSET_T 1
15097_ACEOF
15098
15099gl_cv_type_sigset_t=yes
15100else
15101 gl_cv_type_sigset_t=no
15102fi
15103
15104 if test $gl_cv_type_sigset_t != yes; then
15105 HAVE_SIGSET_T=0
15106 fi
15107
15108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
15109$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
d0ac1c44 15110if ${ac_cv_type_uid_t+:} false; then :
6ec2e0f5
SDJ
15111 $as_echo_n "(cached) " >&6
15112else
15113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15114/* end confdefs.h. */
15115#include <sys/types.h>
15116
15117_ACEOF
15118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15119 $EGREP "uid_t" >/dev/null 2>&1; then :
15120 ac_cv_type_uid_t=yes
15121else
15122 ac_cv_type_uid_t=no
15123fi
15124rm -f conftest*
15125
15126fi
15127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
15128$as_echo "$ac_cv_type_uid_t" >&6; }
15129if test $ac_cv_type_uid_t = no; then
15130
15131$as_echo "#define uid_t int" >>confdefs.h
15132
15133
15134$as_echo "#define gid_t int" >>confdefs.h
15135
15136fi
15137
15138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
15139$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
d0ac1c44 15140if ${ac_cv_header_stdbool_h+:} false; then :
6ec2e0f5
SDJ
15141 $as_echo_n "(cached) " >&6
15142else
15143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15144/* end confdefs.h. */
15145
15146 #include <stdbool.h>
15147
15148 #ifdef __cplusplus
15149 typedef bool Bool;
15150 #else
15151 typedef _Bool Bool;
15152 #ifndef bool
15153 "error: bool is not defined"
15154 #endif
15155 #ifndef false
15156 "error: false is not defined"
15157 #endif
15158 #if false
15159 "error: false is not 0"
15160 #endif
15161 #ifndef true
15162 "error: true is not defined"
15163 #endif
15164 #if true != 1
15165 "error: true is not 1"
15166 #endif
15167 #endif
15168
15169 #ifndef __bool_true_false_are_defined
15170 "error: __bool_true_false_are_defined is not defined"
15171 #endif
15172
15173 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
15174
15175 char a[true == 1 ? 1 : -1];
15176 char b[false == 0 ? 1 : -1];
15177 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
15178 char d[(bool) 0.5 == true ? 1 : -1];
15179 /* See body of main program for 'e'. */
15180 char f[(Bool) 0.0 == false ? 1 : -1];
15181 char g[true];
15182 char h[sizeof (Bool)];
15183 char i[sizeof s.t];
15184 enum { j = false, k = true, l = false * true, m = true * 256 };
15185 /* The following fails for
15186 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
15187 Bool n[m];
15188 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
15189 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
15190 /* Catch a bug in an HP-UX C compiler. See
5e8754f9
SDJ
15191 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
15192 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
6ec2e0f5
SDJ
15193 */
15194 Bool q = true;
15195 Bool *pq = &q;
15196 bool *qq = &q;
15197
15198int
15199main ()
15200{
15201
15202 bool e = &s;
15203 *pq |= q; *pq |= ! q;
15204 *qq |= q; *qq |= ! q;
15205 /* Refer to every declared value, to avoid compiler optimizations. */
15206 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
15207 + !m + !n + !o + !p + !q + !pq + !qq);
15208
15209 ;
15210 return 0;
15211}
15212_ACEOF
15213if ac_fn_c_try_compile "$LINENO"; then :
15214 ac_cv_header_stdbool_h=yes
15215else
15216 ac_cv_header_stdbool_h=no
15217fi
15218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15219fi
15220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
15221$as_echo "$ac_cv_header_stdbool_h" >&6; }
15222 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
d0ac1c44 15223if test "x$ac_cv_type__Bool" = xyes; then :
6ec2e0f5
SDJ
15224
15225cat >>confdefs.h <<_ACEOF
15226#define HAVE__BOOL 1
15227_ACEOF
15228
15229
15230fi
15231
15232
15233
15234 REPLACE_NULL=0;
15235 HAVE_MAX_ALIGN_T=1;
15236 HAVE_WCHAR_T=1;
15237
15238
15239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
15240$as_echo_n "checking for wchar_t... " >&6; }
d0ac1c44 15241if ${gt_cv_c_wchar_t+:} false; then :
6ec2e0f5
SDJ
15242 $as_echo_n "(cached) " >&6
15243else
15244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15245/* end confdefs.h. */
15246#include <stddef.h>
15247 wchar_t foo = (wchar_t)'\0';
15248int
15249main ()
15250{
15251
15252 ;
15253 return 0;
15254}
15255_ACEOF
15256if ac_fn_c_try_compile "$LINENO"; then :
15257 gt_cv_c_wchar_t=yes
15258else
15259 gt_cv_c_wchar_t=no
15260fi
15261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15262fi
15263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
15264$as_echo "$gt_cv_c_wchar_t" >&6; }
15265 if test $gt_cv_c_wchar_t = yes; then
15266
15267$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
15268
15269 fi
15270
15271
15272
472fa5ee
SM
15273
15274
15275
15276
15277 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
d0ac1c44 15278if test "x$ac_cv_have_decl_strdup" = xyes; then :
6ec2e0f5
SDJ
15279 ac_have_decl=1
15280else
15281 ac_have_decl=0
15282fi
15283
15284cat >>confdefs.h <<_ACEOF
15285#define HAVE_DECL_STRDUP $ac_have_decl
15286_ACEOF
15287
15288
472fa5ee 15289
6ec2e0f5
SDJ
15290 REPLACE_STRERROR_0=0
15291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15292$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
d0ac1c44 15293if ${gl_cv_func_strerror_0_works+:} false; then :
6ec2e0f5
SDJ
15294 $as_echo_n "(cached) " >&6
15295else
15296 if test "$cross_compiling" = yes; then :
15297 case "$host_os" in
5e8754f9
SDJ
15298 # Guess yes on glibc systems.
15299 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15300 # If we don't know, assume the worst.
15301 *) gl_cv_func_strerror_0_works="guessing no" ;;
6ec2e0f5
SDJ
15302 esac
15303
15304else
15305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15306/* end confdefs.h. */
15307#include <string.h>
15308 #include <errno.h>
15309
15310int
15311main ()
15312{
15313int result = 0;
15314 char *str;
15315 errno = 0;
15316 str = strerror (0);
15317 if (!*str) result |= 1;
15318 if (errno) result |= 2;
15319 if (strstr (str, "nknown") || strstr (str, "ndefined"))
15320 result |= 4;
15321 return result;
15322 ;
15323 return 0;
15324}
15325_ACEOF
15326if ac_fn_c_try_run "$LINENO"; then :
15327 gl_cv_func_strerror_0_works=yes
15328else
15329 gl_cv_func_strerror_0_works=no
15330fi
15331rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15332 conftest.$ac_objext conftest.beam conftest.$ac_ext
15333fi
15334
15335
15336fi
15337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15338$as_echo "$gl_cv_func_strerror_0_works" >&6; }
15339 case "$gl_cv_func_strerror_0_works" in
15340 *yes) ;;
15341 *)
15342 REPLACE_STRERROR_0=1
15343
15344$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
15345
15346 ;;
15347 esac
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
5abebf3c
CB
15358 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
15359if test "x$ac_cv_func_strerror_r" = xyes; then :
15360
15361fi
15362
15363 if test $ac_cv_func_strerror_r = yes; then
15364 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
15366$as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
15367if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
15368 $as_echo_n "(cached) " >&6
15369else
15370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371/* end confdefs.h. */
15372#include <string.h>
15373 int strerror_r (int, char *, size_t);
15374
15375int
15376main ()
15377{
15378
15379 ;
15380 return 0;
15381}
15382_ACEOF
15383if ac_fn_c_try_compile "$LINENO"; then :
15384 gl_cv_func_strerror_r_posix_signature=yes
15385else
15386 gl_cv_func_strerror_r_posix_signature=no
15387fi
15388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15389
15390fi
15391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
15392$as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
15393 if test $gl_cv_func_strerror_r_posix_signature = yes; then
15394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
15395$as_echo_n "checking whether strerror_r works... " >&6; }
15396if ${gl_cv_func_strerror_r_works+:} false; then :
15397 $as_echo_n "(cached) " >&6
15398else
15399 if test "$cross_compiling" = yes; then :
15400
15401 case "$host_os" in
15402 # Guess no on AIX.
15403 aix*) gl_cv_func_strerror_r_works="guessing no";;
15404 # Guess no on HP-UX.
15405 hpux*) gl_cv_func_strerror_r_works="guessing no";;
15406 # Guess no on BSD variants.
15407 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
15408 # Guess yes otherwise.
15409 *) gl_cv_func_strerror_r_works="guessing yes";;
15410 esac
15411
15412else
15413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15414/* end confdefs.h. */
15415#include <errno.h>
15416 #include <string.h>
15417
15418int
15419main ()
15420{
15421int result = 0;
15422 char buf[79];
15423 if (strerror_r (EACCES, buf, 0) < 0)
15424 result |= 1;
15425 errno = 0;
15426 if (strerror_r (EACCES, buf, sizeof buf) != 0)
15427 result |= 2;
15428 strcpy (buf, "Unknown");
15429 if (strerror_r (0, buf, sizeof buf) != 0)
15430 result |= 4;
15431 if (errno)
15432 result |= 8;
15433 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
15434 result |= 0x10;
15435 errno = 0;
15436 *buf = 0;
15437 if (strerror_r (-3, buf, sizeof buf) < 0)
15438 result |= 0x20;
15439 if (errno)
15440 result |= 0x40;
15441 if (!*buf)
15442 result |= 0x80;
15443 return result;
15444
15445 ;
15446 return 0;
15447}
15448_ACEOF
15449if ac_fn_c_try_run "$LINENO"; then :
15450 gl_cv_func_strerror_r_works=yes
15451else
15452 gl_cv_func_strerror_r_works=no
15453fi
15454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15455 conftest.$ac_objext conftest.beam conftest.$ac_ext
15456fi
15457
15458
15459fi
15460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15461$as_echo "$gl_cv_func_strerror_r_works" >&6; }
15462 else
15463
15464 :
15465
15466
15467
15468
15469
15470 if test $ac_cv_func___xpg_strerror_r = yes; then
15471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
15472$as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
15473if ${gl_cv_func_strerror_r_works+:} false; then :
15474 $as_echo_n "(cached) " >&6
15475else
15476 if test "$cross_compiling" = yes; then :
15477 gl_cv_func_strerror_r_works="guessing no"
15478
15479else
15480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15481/* end confdefs.h. */
15482#include <errno.h>
15483 #include <string.h>
15484 extern
15485 #ifdef __cplusplus
15486 "C"
15487 #endif
15488 int __xpg_strerror_r(int, char *, size_t);
15489
15490int
15491main ()
15492{
15493int result = 0;
15494 char buf[256] = "^";
15495 char copy[256];
15496 char *str = strerror (-1);
15497 strcpy (copy, str);
15498 if (__xpg_strerror_r (-2, buf, 1) == 0)
15499 result |= 1;
15500 if (*buf)
15501 result |= 2;
15502 __xpg_strerror_r (-2, buf, 256);
15503 if (strcmp (str, copy))
15504 result |= 4;
15505 return result;
15506
15507 ;
15508 return 0;
15509}
15510_ACEOF
15511if ac_fn_c_try_run "$LINENO"; then :
15512 gl_cv_func_strerror_r_works=yes
15513else
15514 gl_cv_func_strerror_r_works=no
15515fi
15516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15517 conftest.$ac_objext conftest.beam conftest.$ac_ext
15518fi
15519
15520
15521fi
15522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15523$as_echo "$gl_cv_func_strerror_r_works" >&6; }
15524 fi
15525 fi
15526 fi
15527 fi
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
6ec2e0f5
SDJ
15548
15549
15550 if test $gl_cv_have_include_next = yes; then
15551 gl_cv_next_string_h='<'string.h'>'
15552 else
15553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
15554$as_echo_n "checking absolute name of <string.h>... " >&6; }
d0ac1c44 15555if ${gl_cv_next_string_h+:} false; then :
6ec2e0f5
SDJ
15556 $as_echo_n "(cached) " >&6
15557else
15558
15559
15560
15561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15562/* end confdefs.h. */
15563#include <string.h>
15564_ACEOF
15565 case "$host_os" in
15566 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15567 *) gl_absname_cpp="$ac_cpp" ;;
15568 esac
15569
15570 case "$host_os" in
15571 mingw*)
15572 gl_dirsep_regex='[/\\]'
15573 ;;
15574 *)
15575 gl_dirsep_regex='\/'
15576 ;;
15577 esac
15578 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15579 gl_header_literal_regex=`echo 'string.h' \
15580 | sed -e "$gl_make_literal_regex_sed"`
15581 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15582 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15583 s|^/[^/]|//&|
15584 p
15585 q
15586 }'
15587
15588 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15589 sed -n "$gl_absolute_header_sed"`
15590
15591 gl_header=$gl_cv_absolute_string_h
15592 gl_cv_next_string_h='"'$gl_header'"'
15593
15594
15595fi
15596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
15597$as_echo "$gl_cv_next_string_h" >&6; }
15598 fi
15599 NEXT_STRING_H=$gl_cv_next_string_h
15600
15601 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15602 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15603 gl_next_as_first_directive='<'string.h'>'
15604 else
15605 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15606 gl_next_as_first_directive=$gl_cv_next_string_h
15607 fi
15608 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
15609
15610
15611
15612
15613
15614
5e8754f9
SDJ
15615 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
15616 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15618$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15619if eval \${$as_gl_Symbol+:} false; then :
15620 $as_echo_n "(cached) " >&6
15621else
15622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15623/* end confdefs.h. */
15624#include <string.h>
15625
15626int
15627main ()
15628{
15629#undef $gl_func
15630 (void) $gl_func;
15631 ;
15632 return 0;
15633}
15634_ACEOF
15635if ac_fn_c_try_compile "$LINENO"; then :
15636 eval "$as_gl_Symbol=yes"
15637else
15638 eval "$as_gl_Symbol=no"
15639fi
15640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15641fi
15642eval ac_res=\$$as_gl_Symbol
15643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15644$as_echo "$ac_res" >&6; }
15645 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15646 cat >>confdefs.h <<_ACEOF
15647#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15648_ACEOF
6ec2e0f5 15649
5e8754f9
SDJ
15650 eval ac_cv_have_decl_$gl_func=yes
15651fi
15652 done
6ec2e0f5
SDJ
15653
15654
15655
15656
15657
5e8754f9 15658 if test "$gl_cv_func_memchr_works" != yes; then
6ec2e0f5
SDJ
15659 REPLACE_STRSTR=1
15660 else
15661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
15662$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 15663if ${gl_cv_func_strstr_works_always+:} false; then :
6ec2e0f5
SDJ
15664 $as_echo_n "(cached) " >&6
15665else
15666 if test "$cross_compiling" = yes; then :
15667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15668/* end confdefs.h. */
15669
15670#ifdef __GNU_LIBRARY__
15671 #include <features.h>
15672 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
15673 || defined __UCLIBC__
15674 Lucky user
15675 #endif
15676#elif defined __CYGWIN__
15677 #include <cygwin/version.h>
15678 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
15679 Lucky user
15680 #endif
15681#else
15682 Lucky user
15683#endif
15684
15685_ACEOF
15686if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15687 $EGREP "Lucky user" >/dev/null 2>&1; then :
15688 gl_cv_func_strstr_works_always="guessing yes"
15689else
15690 gl_cv_func_strstr_works_always="guessing no"
15691fi
15692rm -f conftest*
15693
15694
15695else
15696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15697/* end confdefs.h. */
15698
15699#include <string.h> /* for strstr */
15700#define P "_EF_BF_BD"
15701#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
15702#define NEEDLE P P P P P
15703
15704int
15705main ()
15706{
15707return !!strstr (HAYSTACK, NEEDLE);
15708
15709 ;
15710 return 0;
15711}
15712_ACEOF
15713if ac_fn_c_try_run "$LINENO"; then :
15714 gl_cv_func_strstr_works_always=yes
15715else
15716 gl_cv_func_strstr_works_always=no
15717fi
15718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15719 conftest.$ac_objext conftest.beam conftest.$ac_ext
15720fi
15721
15722
15723fi
15724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
15725$as_echo "$gl_cv_func_strstr_works_always" >&6; }
15726 case "$gl_cv_func_strstr_works_always" in
15727 *yes) ;;
15728 *)
15729 REPLACE_STRSTR=1
15730 ;;
15731 esac
15732 fi
15733
472fa5ee
SM
15734
15735 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
d0ac1c44 15736if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
6ec2e0f5
SDJ
15737 ac_have_decl=1
15738else
15739 ac_have_decl=0
15740fi
15741
15742cat >>confdefs.h <<_ACEOF
15743#define HAVE_DECL_STRTOK_R $ac_have_decl
15744_ACEOF
15745
472fa5ee 15746
6ec2e0f5
SDJ
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765 if test $gl_cv_have_include_next = yes; then
15766 gl_cv_next_sys_types_h='<'sys/types.h'>'
15767 else
15768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
15769$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
d0ac1c44 15770if ${gl_cv_next_sys_types_h+:} false; then :
6ec2e0f5
SDJ
15771 $as_echo_n "(cached) " >&6
15772else
15773
15774
15775
15776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15777/* end confdefs.h. */
15778#include <sys/types.h>
15779_ACEOF
15780 case "$host_os" in
15781 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15782 *) gl_absname_cpp="$ac_cpp" ;;
15783 esac
15784
15785 case "$host_os" in
15786 mingw*)
15787 gl_dirsep_regex='[/\\]'
15788 ;;
15789 *)
15790 gl_dirsep_regex='\/'
15791 ;;
15792 esac
15793 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15794 gl_header_literal_regex=`echo 'sys/types.h' \
15795 | sed -e "$gl_make_literal_regex_sed"`
15796 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15797 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15798 s|^/[^/]|//&|
15799 p
15800 q
15801 }'
15802
15803 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15804 sed -n "$gl_absolute_header_sed"`
15805
15806 gl_header=$gl_cv_absolute_sys_types_h
15807 gl_cv_next_sys_types_h='"'$gl_header'"'
15808
15809
15810fi
15811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
15812$as_echo "$gl_cv_next_sys_types_h" >&6; }
15813 fi
15814 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
15815
15816 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15817 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15818 gl_next_as_first_directive='<'sys/types.h'>'
15819 else
15820 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15821 gl_next_as_first_directive=$gl_cv_next_sys_types_h
15822 fi
15823 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
725e2999
JB
15836
15837
15838
15839
15840
15841
15842
5e8754f9
SDJ
15843 GNULIB_MKTIME=0;
15844 GNULIB_NANOSLEEP=0;
15845 GNULIB_STRPTIME=0;
15846 GNULIB_TIMEGM=0;
15847 GNULIB_TIME_R=0;
15848 GNULIB_TIME_RZ=0;
15849 HAVE_DECL_LOCALTIME_R=1;
15850 HAVE_NANOSLEEP=1;
15851 HAVE_STRPTIME=1;
15852 HAVE_TIMEGM=1;
15853 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
15854 REPLACE_MKTIME=GNULIB_PORTCHECK;
15855 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
15856 REPLACE_TIMEGM=GNULIB_PORTCHECK;
6ec2e0f5 15857
5e8754f9
SDJ
15858 : ${GNULIB_GETTIMEOFDAY=0};
15859 REPLACE_GMTIME=0;
15860 REPLACE_LOCALTIME=0;
6ec2e0f5
SDJ
15861
15862
15863
472fa5ee
SM
15864 :
15865
15866
15867
15868
15869
6ec2e0f5
SDJ
15870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
15871$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
d0ac1c44 15872if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
6ec2e0f5
SDJ
15873 $as_echo_n "(cached) " >&6
15874else
15875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15876/* end confdefs.h. */
15877#include <time.h>
15878
15879int
15880main ()
15881{
15882static struct timespec x; x.tv_sec = x.tv_nsec;
15883 ;
15884 return 0;
15885}
15886_ACEOF
15887if ac_fn_c_try_compile "$LINENO"; then :
15888 gl_cv_sys_struct_timespec_in_time_h=yes
15889else
15890 gl_cv_sys_struct_timespec_in_time_h=no
15891fi
15892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15893fi
15894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
15895$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
15896
15897 TIME_H_DEFINES_STRUCT_TIMESPEC=0
15898 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
15899 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
15900 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
15901 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
15902 TIME_H_DEFINES_STRUCT_TIMESPEC=1
15903 else
15904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
15905$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
d0ac1c44 15906if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
6ec2e0f5
SDJ
15907 $as_echo_n "(cached) " >&6
15908else
15909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15910/* end confdefs.h. */
15911#include <sys/time.h>
15912
15913int
15914main ()
15915{
15916static struct timespec x; x.tv_sec = x.tv_nsec;
15917 ;
15918 return 0;
15919}
15920_ACEOF
15921if ac_fn_c_try_compile "$LINENO"; then :
15922 gl_cv_sys_struct_timespec_in_sys_time_h=yes
15923else
15924 gl_cv_sys_struct_timespec_in_sys_time_h=no
15925fi
15926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15927fi
15928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
15929$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
15930 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
15931 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
15932 else
15933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
15934$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
d0ac1c44 15935if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
6ec2e0f5
SDJ
15936 $as_echo_n "(cached) " >&6
15937else
15938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15939/* end confdefs.h. */
15940#include <pthread.h>
15941
15942int
15943main ()
15944{
15945static struct timespec x; x.tv_sec = x.tv_nsec;
15946 ;
15947 return 0;
15948}
15949_ACEOF
15950if ac_fn_c_try_compile "$LINENO"; then :
15951 gl_cv_sys_struct_timespec_in_pthread_h=yes
15952else
15953 gl_cv_sys_struct_timespec_in_pthread_h=no
15954fi
15955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15956fi
15957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
15958$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
15959 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
15960 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
15961 else
15962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
15963$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
d0ac1c44 15964if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
6ec2e0f5
SDJ
15965 $as_echo_n "(cached) " >&6
15966else
15967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15968/* end confdefs.h. */
15969#include <unistd.h>
15970
15971int
15972main ()
15973{
15974static struct timespec x; x.tv_sec = x.tv_nsec;
15975 ;
15976 return 0;
15977}
15978_ACEOF
15979if ac_fn_c_try_compile "$LINENO"; then :
15980 gl_cv_sys_struct_timespec_in_unistd_h=yes
15981else
15982 gl_cv_sys_struct_timespec_in_unistd_h=no
15983fi
15984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15985fi
15986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
15987$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
15988 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
15989 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
15990 fi
15991 fi
15992 fi
15993 fi
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010 if test $gl_cv_have_include_next = yes; then
16011 gl_cv_next_time_h='<'time.h'>'
16012 else
16013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
16014$as_echo_n "checking absolute name of <time.h>... " >&6; }
d0ac1c44 16015if ${gl_cv_next_time_h+:} false; then :
6ec2e0f5
SDJ
16016 $as_echo_n "(cached) " >&6
16017else
16018
16019
16020
16021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16022/* end confdefs.h. */
16023#include <time.h>
16024_ACEOF
16025 case "$host_os" in
16026 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16027 *) gl_absname_cpp="$ac_cpp" ;;
16028 esac
16029
16030 case "$host_os" in
16031 mingw*)
16032 gl_dirsep_regex='[/\\]'
16033 ;;
16034 *)
16035 gl_dirsep_regex='\/'
16036 ;;
16037 esac
16038 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16039 gl_header_literal_regex=`echo 'time.h' \
16040 | sed -e "$gl_make_literal_regex_sed"`
16041 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16042 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16043 s|^/[^/]|//&|
16044 p
16045 q
16046 }'
16047
16048 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16049 sed -n "$gl_absolute_header_sed"`
16050
16051 gl_header=$gl_cv_absolute_time_h
16052 gl_cv_next_time_h='"'$gl_header'"'
16053
16054
16055fi
16056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
16057$as_echo "$gl_cv_next_time_h" >&6; }
16058 fi
16059 NEXT_TIME_H=$gl_cv_next_time_h
16060
16061 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16062 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16063 gl_next_as_first_directive='<'time.h'>'
16064 else
16065 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16066 gl_next_as_first_directive=$gl_cv_next_time_h
16067 fi
16068 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
16069
16070
16071
16072
16073
16074
16075
16076
472fa5ee
SM
16077
16078
16079
16080
f8e27d88
CB
16081
16082
16083
16084
16085
472fa5ee 16086 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
d0ac1c44 16087if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
6ec2e0f5
SDJ
16088 ac_have_decl=1
16089else
16090 ac_have_decl=0
16091fi
16092
16093cat >>confdefs.h <<_ACEOF
16094#define HAVE_DECL_UNSETENV $ac_have_decl
16095_ACEOF
16096
16097
472fa5ee 16098
6ec2e0f5
SDJ
16099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
16100$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
d0ac1c44 16101if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
6ec2e0f5
SDJ
16102 $as_echo_n "(cached) " >&6
16103else
16104 gl_cv_header_wchar_h_correct_inline=yes
16105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16106/* end confdefs.h. */
16107
16108 #define wcstod renamed_wcstod
16109/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16110 <wchar.h>.
16111 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16112 included before <wchar.h>. */
16113#include <stddef.h>
16114#include <stdio.h>
16115#include <time.h>
16116#include <wchar.h>
16117extern int zero (void);
16118int main () { return zero(); }
16119
16120_ACEOF
16121 save_ac_compile="$ac_compile"
16122 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
5e8754f9 16123 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6ec2e0f5
SDJ
16124 (eval $ac_compile) 2>&5
16125 ac_status=$?
16126 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16127 test $ac_status = 0; }; then
16128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16129/* end confdefs.h. */
16130
16131 #define wcstod renamed_wcstod
16132/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16133 <wchar.h>.
16134 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16135 included before <wchar.h>. */
16136#include <stddef.h>
16137#include <stdio.h>
16138#include <time.h>
16139#include <wchar.h>
16140int zero (void) { return 0; }
16141
16142_ACEOF
16143 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
5e8754f9 16144 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6ec2e0f5
SDJ
16145 (eval $ac_compile) 2>&5
16146 ac_status=$?
16147 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16148 test $ac_status = 0; }; then
16149 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
16150 :
16151 else
16152 gl_cv_header_wchar_h_correct_inline=no
16153 fi
16154 fi
16155 fi
16156 ac_compile="$save_ac_compile"
5e8754f9 16157 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
6ec2e0f5
SDJ
16158
16159fi
16160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
16161$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
16162 if test $gl_cv_header_wchar_h_correct_inline = no; then
d0ac1c44 16163 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
6ec2e0f5
SDJ
16164This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
16165C99 mode. You have four options:
16166 - Add the flag -fgnu89-inline to CC and reconfigure, or
16167 - Fix your include files, using parts of
5e8754f9 16168 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
6ec2e0f5
SDJ
16169 - Use a gcc version older than 4.3, or
16170 - Don't use the flags -std=c99 or -std=gnu99.
16171Configuration aborted." "$LINENO" 5
16172 fi
16173
16174
5e8754f9
SDJ
16175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
16176$as_echo_n "checking for wint_t... " >&6; }
16177if ${gt_cv_c_wint_t+:} false; then :
16178 $as_echo_n "(cached) " >&6
16179else
16180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16181/* end confdefs.h. */
6ec2e0f5 16182
5e8754f9
SDJ
16183/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16184 <wchar.h>.
16185 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
16186 before <wchar.h>. */
16187#include <stddef.h>
16188#include <stdio.h>
16189#include <time.h>
16190#include <wchar.h>
16191 wint_t foo = (wchar_t)'\0';
16192int
16193main ()
16194{
6ec2e0f5 16195
5e8754f9
SDJ
16196 ;
16197 return 0;
16198}
16199_ACEOF
16200if ac_fn_c_try_compile "$LINENO"; then :
16201 gt_cv_c_wint_t=yes
16202else
16203 gt_cv_c_wint_t=no
16204fi
16205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16206fi
16207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
16208$as_echo "$gt_cv_c_wint_t" >&6; }
16209 if test $gt_cv_c_wint_t = yes; then
6ec2e0f5 16210
5e8754f9 16211$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
6ec2e0f5
SDJ
16212
16213 fi
16214
16215
16216 GNULIB_ISWBLANK=0;
16217 GNULIB_WCTYPE=0;
16218 GNULIB_ISWCTYPE=0;
16219 GNULIB_WCTRANS=0;
16220 GNULIB_TOWCTRANS=0;
16221 HAVE_ISWBLANK=1;
16222 HAVE_WCTYPE_T=1;
16223 HAVE_WCTRANS_T=1;
16224 REPLACE_ISWBLANK=0;
16225
16226
16227
16228
472fa5ee
SM
16229
16230
16231
725e2999
JB
16232 if false; then
16233 GL_COND_LIBTOOL_TRUE=
16234 GL_COND_LIBTOOL_FALSE='#'
16235else
16236 GL_COND_LIBTOOL_TRUE='#'
16237 GL_COND_LIBTOOL_FALSE=
16238fi
16239
16240 gl_cond_libtool=false
16241 gl_libdeps=
16242 gl_ltlibdeps=
16243 gl_m4_base='import/m4'
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253 gl_source_base='import'
16254
16255
16256 if test $ac_cv_func_alloca_works = no; then
16257 :
16258 fi
16259
16260 # Define an additional variable used in the Makefile substitution.
16261 if test $ac_cv_working_alloca_h = yes; then
16262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
16263$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
16264if ${gl_cv_rpl_alloca+:} false; then :
16265 $as_echo_n "(cached) " >&6
16266else
16267
16268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16269/* end confdefs.h. */
16270
16271#if defined __GNUC__ || defined _AIX || defined _MSC_VER
16272 Need own alloca
16273#endif
16274
16275_ACEOF
16276if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16277 $EGREP "Need own alloca" >/dev/null 2>&1; then :
16278 gl_cv_rpl_alloca=yes
16279else
16280 gl_cv_rpl_alloca=no
16281fi
16282rm -f conftest*
16283
16284
16285fi
16286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
16287$as_echo "$gl_cv_rpl_alloca" >&6; }
16288 if test $gl_cv_rpl_alloca = yes; then
16289
16290$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16291
16292 ALLOCA_H=alloca.h
16293 else
16294 ALLOCA_H=
16295 fi
16296 else
16297 ALLOCA_H=alloca.h
16298 fi
16299
16300 if test -n "$ALLOCA_H"; then
16301 GL_GENERATE_ALLOCA_H_TRUE=
16302 GL_GENERATE_ALLOCA_H_FALSE='#'
16303else
16304 GL_GENERATE_ALLOCA_H_TRUE='#'
16305 GL_GENERATE_ALLOCA_H_FALSE=
16306fi
16307
16308
16309
16310
16311
16312
16313 :
16314
16315
16316
16317
16318
16319 if test $ac_cv_header_arpa_inet_h = yes; then
16320 HAVE_ARPA_INET_H=1
16321 else
16322 HAVE_ARPA_INET_H=0
16323 fi
16324
16325
16326
16327
16328
16329
16330
16331 :
16332
16333
16334
16335
16336
16337
16338
16339
16340 if test $gl_cv_have_include_next = yes; then
16341 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
16342 else
16343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
16344$as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
16345if ${gl_cv_next_arpa_inet_h+:} false; then :
16346 $as_echo_n "(cached) " >&6
16347else
16348
16349 if test $ac_cv_header_arpa_inet_h = yes; then
16350
16351
16352
16353
16354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16355/* end confdefs.h. */
16356#include <arpa/inet.h>
16357_ACEOF
16358 case "$host_os" in
16359 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16360 *) gl_absname_cpp="$ac_cpp" ;;
16361 esac
16362
16363 case "$host_os" in
16364 mingw*)
16365 gl_dirsep_regex='[/\\]'
16366 ;;
16367 *)
16368 gl_dirsep_regex='\/'
16369 ;;
16370 esac
16371 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16372 gl_header_literal_regex=`echo 'arpa/inet.h' \
16373 | sed -e "$gl_make_literal_regex_sed"`
16374 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16375 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16376 s|^/[^/]|//&|
16377 p
16378 q
16379 }'
6ec2e0f5 16380
725e2999
JB
16381 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16382 sed -n "$gl_absolute_header_sed"`
6ec2e0f5 16383
725e2999
JB
16384 gl_header=$gl_cv_absolute_arpa_inet_h
16385 gl_cv_next_arpa_inet_h='"'$gl_header'"'
16386 else
16387 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
16388 fi
6ec2e0f5
SDJ
16389
16390
725e2999
JB
16391fi
16392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
16393$as_echo "$gl_cv_next_arpa_inet_h" >&6; }
16394 fi
16395 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
6ec2e0f5 16396
725e2999
JB
16397 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16398 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16399 gl_next_as_first_directive='<'arpa/inet.h'>'
16400 else
16401 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16402 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
16403 fi
16404 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
6ec2e0f5
SDJ
16405
16406
16407
16408
16409
6ec2e0f5
SDJ
16410
16411
6ec2e0f5 16412
725e2999
JB
16413 for gl_func in inet_ntop inet_pton; do
16414 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16416$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16417if eval \${$as_gl_Symbol+:} false; then :
6ec2e0f5
SDJ
16418 $as_echo_n "(cached) " >&6
16419else
725e2999 16420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5
SDJ
16421/* end confdefs.h. */
16422
725e2999
JB
16423/* On some systems, this header is not self-consistent. */
16424#if !(defined __GLIBC__ || defined __UCLIBC__)
16425# include <sys/socket.h>
6ec2e0f5 16426#endif
725e2999
JB
16427#ifdef __TANDEM
16428# include <netdb.h>
16429#endif
16430#include <arpa/inet.h>
6ec2e0f5 16431
725e2999
JB
16432int
16433main ()
16434{
16435#undef $gl_func
16436 (void) $gl_func;
16437 ;
16438 return 0;
16439}
6ec2e0f5 16440_ACEOF
725e2999
JB
16441if ac_fn_c_try_compile "$LINENO"; then :
16442 eval "$as_gl_Symbol=yes"
6ec2e0f5 16443else
725e2999 16444 eval "$as_gl_Symbol=no"
6ec2e0f5 16445fi
725e2999 16446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 16447fi
725e2999
JB
16448eval ac_res=\$$as_gl_Symbol
16449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16450$as_echo "$ac_res" >&6; }
16451 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
16452 cat >>confdefs.h <<_ACEOF
16453#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
16454_ACEOF
6ec2e0f5 16455
725e2999 16456 eval ac_cv_have_decl_$gl_func=yes
6ec2e0f5 16457fi
725e2999
JB
16458 done
16459
6ec2e0f5
SDJ
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
16471
16472
16473
16474
16475 if test $ac_cv_func_canonicalize_file_name = no; then
16476 HAVE_CANONICALIZE_FILE_NAME=0
16477 if test $ac_cv_func_realpath = no; then
16478 HAVE_REALPATH=0
16479 else
16480 case "$gl_cv_func_realpath_works" in
5e8754f9
SDJ
16481 *yes) ;;
16482 *) REPLACE_REALPATH=1 ;;
6ec2e0f5
SDJ
16483 esac
16484 fi
16485 else
16486 case "$gl_cv_func_realpath_works" in
16487 *yes)
16488 ;;
16489 *)
16490 REPLACE_CANONICALIZE_FILE_NAME=1
16491 REPLACE_REALPATH=1
16492 ;;
16493 esac
16494 fi
16495
16496 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
16497
16498
16499
16500
16501
16502
16503
16504
16505 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
16506
16507 fi
16508
16509
16510cat >>confdefs.h <<_ACEOF
16511#define GNULIB_CANONICALIZE_LGPL 1
16512_ACEOF
16513
16514
16515
16516
16517
16518
16519
16520 GNULIB_CANONICALIZE_FILE_NAME=1
16521
16522
16523
16524
16525
16526$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
16527
16528
16529
16530
16531
16532
16533
16534
16535 GNULIB_REALPATH=1
16536
16537
16538
16539
16540
16541$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
16542
16543
16544
16545
16546
16547
16548
16549
16550 GNULIB_CHDIR=1
16551
16552
16553
16554
16555
16556$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
16557
16558
16559
16560
16561
16562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
16563$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
d0ac1c44 16564if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
6ec2e0f5
SDJ
16565 $as_echo_n "(cached) " >&6
16566else
16567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16568/* end confdefs.h. */
16569
16570/* Arrange to define PATH_MAX, like "pathmax.h" does. */
16571#if HAVE_UNISTD_H
16572# include <unistd.h>
16573#endif
16574#include <limits.h>
16575#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16576# include <sys/param.h>
16577#endif
16578#if !defined PATH_MAX && defined MAXPATHLEN
16579# define PATH_MAX MAXPATHLEN
16580#endif
16581#ifdef __hpux
16582# undef PATH_MAX
16583# define PATH_MAX 1024
16584#endif
5e8754f9 16585#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
16586# undef PATH_MAX
16587# define PATH_MAX 260
16588#endif
16589
16590#ifdef PATH_MAX
16591have_arbitrary_file_name_length_limit
16592#endif
16593_ACEOF
16594if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16595 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
16596 gl_cv_have_arbitrary_file_name_length_limit=yes
16597else
16598 gl_cv_have_arbitrary_file_name_length_limit=no
16599fi
16600rm -f conftest*
16601
16602fi
16603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
16604$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
16605
16606 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
16607
16608
16609
16610
16611
16612
16613
16614
16615 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
16616
16617 :
16618 fi
16619
16620
16621$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
16622
16623
16624
16625
16626
5e8754f9
SDJ
16627 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16628 REPLACE_CLOSE=1
16629 fi
6ec2e0f5
SDJ
16630
16631
16632
16633
16634
472fa5ee
SM
16635 :
16636
16637
16638
16639
16640
6ec2e0f5
SDJ
16641 if test $ac_cv_header_sys_socket_h != yes; then
16642 for ac_header in winsock2.h
16643do :
16644 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 16645if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
16646 cat >>confdefs.h <<_ACEOF
16647#define HAVE_WINSOCK2_H 1
16648_ACEOF
16649
16650fi
16651
16652done
16653
16654 fi
16655 if test "$ac_cv_header_winsock2_h" = yes; then
16656 HAVE_WINSOCK2_H=1
16657 UNISTD_H_HAVE_WINSOCK2_H=1
16658 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
16659 else
16660 HAVE_WINSOCK2_H=0
16661 fi
16662
16663
16664 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
16665 REPLACE_CLOSE=1
16666 fi
16667
16668
16669 if test $REPLACE_CLOSE = 0; then
16670
16671
16672
472fa5ee
SM
16673 :
16674
16675
16676
16677
16678
6ec2e0f5
SDJ
16679 if test $ac_cv_func_fchdir = no; then
16680 HAVE_FCHDIR=0
16681 fi
16682
16683 if test $HAVE_FCHDIR = 0; then
16684 REPLACE_CLOSE=1
16685 fi
16686 fi
16687
16688
16689 if test $REPLACE_CLOSE = 1; then
16690
16691
16692
16693
16694
16695
16696
16697
16698 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
16699
16700 fi
16701
16702
16703
16704
16705
16706 GNULIB_CLOSE=1
16707
16708
16709
16710
16711
16712$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
16713
16714
16715
16716
16717
16718
16719 for ac_func in closedir
16720do :
16721 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
d0ac1c44 16722if test "x$ac_cv_func_closedir" = xyes; then :
6ec2e0f5
SDJ
16723 cat >>confdefs.h <<_ACEOF
16724#define HAVE_CLOSEDIR 1
16725_ACEOF
16726
16727fi
16728done
16729
16730 if test $ac_cv_func_closedir = no; then
16731 HAVE_CLOSEDIR=0
16732 fi
16733
16734
16735
16736
472fa5ee
SM
16737 :
16738
16739
16740
16741
16742
6ec2e0f5
SDJ
16743 if test $ac_cv_func_fchdir = no; then
16744 HAVE_FCHDIR=0
16745 fi
16746
16747 if test $HAVE_FCHDIR = 0; then
16748 if test $HAVE_CLOSEDIR = 1; then
16749 REPLACE_CLOSEDIR=1
16750 fi
16751 fi
16752
16753 case $host_os,$HAVE_CLOSEDIR in
16754 os2*,1)
16755 REPLACE_CLOSEDIR=1;;
16756 esac
16757
16758 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
16759
16760
16761
16762
16763
16764
16765
16766
16767 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
16768
16769 fi
16770
16771
16772
16773
16774
16775 GNULIB_CLOSEDIR=1
16776
16777
16778
16779
16780
16781$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
16782
16783
16784
5e8754f9
SDJ
16785
16786 if test "x$datarootdir" = x; then
16787 datarootdir='${datadir}'
16788
16789 fi
16790 if test "x$docdir" = x; then
16791 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
16792
16793 fi
16794 if test "x$htmldir" = x; then
16795 htmldir='${docdir}'
16796
16797 fi
16798 if test "x$dvidir" = x; then
16799 dvidir='${docdir}'
16800
16801 fi
16802 if test "x$pdfdir" = x; then
16803 pdfdir='${docdir}'
16804
16805 fi
16806 if test "x$psdir" = x; then
16807 psdir='${docdir}'
16808
16809 fi
16810 if test "x$lispdir" = x; then
16811 lispdir='${datarootdir}/emacs/site-lisp'
16812
16813 fi
16814 if test "x$localedir" = x; then
16815 localedir='${datarootdir}/locale'
16816
16817 fi
16818 if test "x$runstatedir" = x; then
16819 runstatedir='${localstatedir}/run'
16820
16821 fi
16822
16823 pkglibexecdir='${libexecdir}/${PACKAGE}'
16824
16825
6ec2e0f5
SDJ
16826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
16827$as_echo_n "checking for d_ino member in directory struct... " >&6; }
d0ac1c44 16828if ${gl_cv_struct_dirent_d_ino+:} false; then :
6ec2e0f5
SDJ
16829 $as_echo_n "(cached) " >&6
16830else
16831 if test "$cross_compiling" = yes; then :
16832 case "$host_os" in
16833 # Guess yes on glibc systems with Linux kernel.
16834 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
16835 # If we don't know, assume the worst.
16836 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
16837 esac
16838
16839else
16840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16841/* end confdefs.h. */
16842#include <sys/types.h>
16843 #include <sys/stat.h>
16844 #include <dirent.h>
16845
16846int
16847main ()
16848{
16849DIR *dp = opendir (".");
16850 struct dirent *e;
16851 struct stat st;
16852 if (! dp)
16853 return 1;
16854 e = readdir (dp);
16855 if (! e)
5e8754f9 16856 return 2;
6ec2e0f5 16857 if (lstat (e->d_name, &st) != 0)
5e8754f9 16858 return 3;
6ec2e0f5 16859 if (e->d_ino != st.st_ino)
5e8754f9 16860 return 4;
6ec2e0f5
SDJ
16861 closedir (dp);
16862 return 0;
16863
16864 ;
16865 return 0;
16866}
16867_ACEOF
16868if ac_fn_c_try_run "$LINENO"; then :
16869 gl_cv_struct_dirent_d_ino=yes
16870else
16871 gl_cv_struct_dirent_d_ino=no
16872fi
16873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16874 conftest.$ac_objext conftest.beam conftest.$ac_ext
16875fi
16876
16877fi
16878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
16879$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
16880 case "$gl_cv_struct_dirent_d_ino" in
16881 *yes)
16882
16883$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
16884
16885 ;;
16886 esac
16887
16888
16889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
16890$as_echo_n "checking for d_type member in directory struct... " >&6; }
d0ac1c44 16891if ${gl_cv_struct_dirent_d_type+:} false; then :
6ec2e0f5
SDJ
16892 $as_echo_n "(cached) " >&6
16893else
16894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16895/* end confdefs.h. */
16896
16897#include <sys/types.h>
16898#include <dirent.h>
16899
16900int
16901main ()
16902{
16903struct dirent dp; dp.d_type = 0;
16904 ;
16905 return 0;
16906}
16907_ACEOF
16908if ac_fn_c_try_link "$LINENO"; then :
16909 gl_cv_struct_dirent_d_type=yes
16910else
16911 gl_cv_struct_dirent_d_type=no
16912fi
16913rm -f core conftest.err conftest.$ac_objext \
16914 conftest$ac_exeext conftest.$ac_ext
16915
16916
16917fi
16918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
16919$as_echo "$gl_cv_struct_dirent_d_type" >&6; }
16920 if test $gl_cv_struct_dirent_d_type = yes; then
16921
16922$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
16923
16924 fi
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
472fa5ee
SM
16936 :
16937
16938
16939
16940
16941
6ec2e0f5
SDJ
16942
16943
16944
16945 if test $gl_cv_have_include_next = yes; then
16946 gl_cv_next_dirent_h='<'dirent.h'>'
16947 else
16948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
16949$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
d0ac1c44 16950if ${gl_cv_next_dirent_h+:} false; then :
6ec2e0f5
SDJ
16951 $as_echo_n "(cached) " >&6
16952else
16953
16954 if test $ac_cv_header_dirent_h = yes; then
16955
16956
16957
16958
16959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16960/* end confdefs.h. */
16961#include <dirent.h>
16962_ACEOF
16963 case "$host_os" in
16964 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16965 *) gl_absname_cpp="$ac_cpp" ;;
16966 esac
16967
16968 case "$host_os" in
16969 mingw*)
16970 gl_dirsep_regex='[/\\]'
16971 ;;
16972 *)
16973 gl_dirsep_regex='\/'
16974 ;;
16975 esac
16976 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16977 gl_header_literal_regex=`echo 'dirent.h' \
16978 | sed -e "$gl_make_literal_regex_sed"`
16979 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16980 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16981 s|^/[^/]|//&|
16982 p
16983 q
16984 }'
16985
16986 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16987 sed -n "$gl_absolute_header_sed"`
16988
16989 gl_header=$gl_cv_absolute_dirent_h
16990 gl_cv_next_dirent_h='"'$gl_header'"'
16991 else
16992 gl_cv_next_dirent_h='<'dirent.h'>'
16993 fi
16994
16995
16996fi
16997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
16998$as_echo "$gl_cv_next_dirent_h" >&6; }
16999 fi
17000 NEXT_DIRENT_H=$gl_cv_next_dirent_h
17001
17002 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17003 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17004 gl_next_as_first_directive='<'dirent.h'>'
17005 else
17006 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17007 gl_next_as_first_directive=$gl_cv_next_dirent_h
17008 fi
17009 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
17010
17011
17012
17013
17014 if test $ac_cv_header_dirent_h = yes; then
17015 HAVE_DIRENT_H=1
17016 else
17017 HAVE_DIRENT_H=0
17018 fi
17019
17020
17021
5e8754f9
SDJ
17022 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
17023 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17025$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17026if eval \${$as_gl_Symbol+:} false; then :
17027 $as_echo_n "(cached) " >&6
17028else
17029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17030/* end confdefs.h. */
17031#include <dirent.h>
17032
17033int
17034main ()
17035{
17036#undef $gl_func
17037 (void) $gl_func;
17038 ;
17039 return 0;
17040}
17041_ACEOF
17042if ac_fn_c_try_compile "$LINENO"; then :
17043 eval "$as_gl_Symbol=yes"
17044else
17045 eval "$as_gl_Symbol=no"
17046fi
17047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17048fi
17049eval ac_res=\$$as_gl_Symbol
17050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17051$as_echo "$ac_res" >&6; }
17052 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17053 cat >>confdefs.h <<_ACEOF
17054#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17055_ACEOF
6ec2e0f5 17056
5e8754f9
SDJ
17057 eval ac_cv_have_decl_$gl_func=yes
17058fi
17059 done
6ec2e0f5
SDJ
17060
17061
17062
17063
17064
17065
17066
17067 for ac_func in dirfd
17068do :
17069 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
d0ac1c44 17070if test "x$ac_cv_func_dirfd" = xyes; then :
6ec2e0f5
SDJ
17071 cat >>confdefs.h <<_ACEOF
17072#define HAVE_DIRFD 1
17073_ACEOF
17074
17075fi
17076done
17077
17078 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
17079 #include <dirent.h>
17080"
d0ac1c44 17081if test "x$ac_cv_have_decl_dirfd" = xyes; then :
6ec2e0f5
SDJ
17082 ac_have_decl=1
17083else
17084 ac_have_decl=0
17085fi
17086
17087cat >>confdefs.h <<_ACEOF
17088#define HAVE_DECL_DIRFD $ac_have_decl
17089_ACEOF
17090
17091 if test $ac_cv_have_decl_dirfd = no; then
17092 HAVE_DECL_DIRFD=0
17093 fi
17094
17095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
17096$as_echo_n "checking whether dirfd is a macro... " >&6; }
d0ac1c44 17097if ${gl_cv_func_dirfd_macro+:} false; then :
6ec2e0f5
SDJ
17098 $as_echo_n "(cached) " >&6
17099else
17100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17101/* end confdefs.h. */
17102
17103#include <sys/types.h>
17104#include <dirent.h>
17105#ifdef dirfd
17106 dirent_header_defines_dirfd
17107#endif
17108_ACEOF
17109if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17110 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
17111 gl_cv_func_dirfd_macro=yes
17112else
17113 gl_cv_func_dirfd_macro=no
17114fi
17115rm -f conftest*
17116
17117fi
17118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
17119$as_echo "$gl_cv_func_dirfd_macro" >&6; }
17120
17121 # Use the replacement if we have no function or macro with that name,
17122 # or if OS/2 kLIBC whose dirfd() does not work.
17123 # Replace only if the system declares dirfd already.
17124 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
17125 no,no,*,yes | *,*,os2*,yes)
17126 REPLACE_DIRFD=1
17127
17128$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
17129;;
17130 esac
17131
17132 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
17133 || test $REPLACE_DIRFD = 1; then
17134
17135
17136
17137
17138
17139
17140
17141
17142 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
17143
17144
17145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
17146$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
d0ac1c44 17147if ${gl_cv_sys_dir_fd_member_name+:} false; then :
6ec2e0f5
SDJ
17148 $as_echo_n "(cached) " >&6
17149else
17150
17151 dirfd_save_CFLAGS=$CFLAGS
17152 for ac_expr in d_fd dd_fd; do
17153
17154 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
17155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17156/* end confdefs.h. */
17157
17158 #include <sys/types.h>
17159 #include <dirent.h>
17160int
17161main ()
17162{
17163DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
17164 ;
17165 return 0;
17166}
17167_ACEOF
17168if ac_fn_c_try_compile "$LINENO"; then :
17169 dir_fd_found=yes
17170
17171fi
17172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17173 CFLAGS=$dirfd_save_CFLAGS
17174 test "$dir_fd_found" = yes && break
17175 done
17176 test "$dir_fd_found" = yes || ac_expr=no_such_member
17177
17178 gl_cv_sys_dir_fd_member_name=$ac_expr
17179
17180
17181fi
17182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
17183$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
17184 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
17185
17186cat >>confdefs.h <<_ACEOF
17187#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
17188_ACEOF
17189
17190 fi
17191
17192
17193 fi
17194
17195
17196
17197
17198
17199 GNULIB_DIRFD=1
17200
17201
17202
17203
17204
17205$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
17216$as_echo_n "checking whether // is distinct from /... " >&6; }
d0ac1c44 17217if ${gl_cv_double_slash_root+:} false; then :
6ec2e0f5
SDJ
17218 $as_echo_n "(cached) " >&6
17219else
17220 if test x"$cross_compiling" = xyes ; then
17221 # When cross-compiling, there is no way to tell whether // is special
17222 # short of a list of hosts. However, the only known hosts to date
17223 # that have a distinct // are Apollo DomainOS (too old to port to),
17224 # Cygwin, and z/OS. If anyone knows of another system for which // has
17225 # special semantics and is distinct from /, please report it to
17226 # <bug-gnulib@gnu.org>.
17227 case $host in
17228 *-cygwin | i370-ibm-openedition)
17229 gl_cv_double_slash_root=yes ;;
17230 *)
17231 # Be optimistic and assume that / and // are the same when we
17232 # don't know.
17233 gl_cv_double_slash_root='unknown, assuming no' ;;
17234 esac
17235 else
17236 set x `ls -di / // 2>/dev/null`
17237 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
17238 gl_cv_double_slash_root=no
17239 else
17240 gl_cv_double_slash_root=yes
17241 fi
17242 fi
17243fi
17244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
17245$as_echo "$gl_cv_double_slash_root" >&6; }
17246 if test "$gl_cv_double_slash_root" = yes; then
8690e634 17247
6ec2e0f5 17248$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8690e634 17249
6ec2e0f5 17250 fi
8690e634
JK
17251
17252
17253
17254
5e8754f9
SDJ
17255 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17256 REPLACE_DUP=1
17257 fi
8690e634 17258
8690e634
JK
17259
17260
17261
472fa5ee
SM
17262 :
17263
17264
17265
17266
17267
6ec2e0f5
SDJ
17268 if test $ac_cv_func_fchdir = no; then
17269 HAVE_FCHDIR=0
17270 fi
8690e634 17271
6ec2e0f5
SDJ
17272 if test $HAVE_FCHDIR = 0; then
17273 REPLACE_DUP=1
17274 fi
8690e634 17275
6ec2e0f5
SDJ
17276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
17277$as_echo_n "checking whether dup works... " >&6; }
d0ac1c44 17278if ${gl_cv_func_dup_works+:} false; then :
6ec2e0f5 17279 $as_echo_n "(cached) " >&6
8690e634 17280else
6ec2e0f5 17281 if test "$cross_compiling" = yes; then :
5e8754f9 17282 gl_cv_func_dup_works='guessing yes'
6ec2e0f5
SDJ
17283else
17284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 17285/* end confdefs.h. */
6ec2e0f5
SDJ
17286#include <unistd.h>
17287 #include <fcntl.h>
17288 #include <errno.h>
17289int
17290main ()
17291{
17292/* On OS/2 kLIBC, dup does not work on a directory fd. */
17293 int fd = open (".", O_RDONLY);
17294 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
8690e634 17295
6ec2e0f5
SDJ
17296 ;
17297 return 0;
17298}
8690e634
JK
17299
17300_ACEOF
6ec2e0f5
SDJ
17301if ac_fn_c_try_run "$LINENO"; then :
17302 gl_cv_func_dup_works=yes
17303else
17304 gl_cv_func_dup_works=no
17305fi
17306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17307 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 17308fi
8690e634 17309
8690e634 17310
6ec2e0f5
SDJ
17311fi
17312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
17313$as_echo "$gl_cv_func_dup_works" >&6; }
17314 case "$gl_cv_func_dup_works" in
17315 *yes) ;;
17316 *)
17317 REPLACE_DUP=1
17318 ;;
17319 esac
8690e634 17320
6ec2e0f5 17321 if test $REPLACE_DUP = 1; then
8690e634 17322
8690e634 17323
8690e634 17324
8690e634 17325
8690e634 17326
6ec2e0f5
SDJ
17327
17328
17329
17330 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
17331
17332 :
8690e634
JK
17333 fi
17334
17335
8690e634
JK
17336
17337
17338
6ec2e0f5 17339 GNULIB_DUP=1
8690e634 17340
6ec2e0f5
SDJ
17341
17342
17343
17344
17345$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
17346
17347
17348
17349
17350
17351
17352
17353
17354$as_echo "#define HAVE_DUP2 1" >>confdefs.h
17355
17356
17357 if test $HAVE_DUP2 = 1; then
17358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
17359$as_echo_n "checking whether dup2 works... " >&6; }
d0ac1c44 17360if ${gl_cv_func_dup2_works+:} false; then :
8690e634
JK
17361 $as_echo_n "(cached) " >&6
17362else
17363 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
17364 case "$host_os" in
17365 mingw*) # on this platform, dup2 always returns 0 for success
17366 gl_cv_func_dup2_works="guessing no" ;;
17367 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
17368 gl_cv_func_dup2_works="guessing no" ;;
17369 aix* | freebsd*)
17370 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
17371 # not EBADF.
17372 gl_cv_func_dup2_works="guessing no" ;;
17373 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
17374 gl_cv_func_dup2_works="guessing no" ;;
17375 *-android*) # implemented using dup3(), which fails if oldfd == newfd
17376 gl_cv_func_dup2_works="guessing no" ;;
17377 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
17378 gl_cv_func_dup2_works="guessing no" ;;
17379 *) gl_cv_func_dup2_works="guessing yes" ;;
17380 esac
8690e634
JK
17381else
17382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17383/* end confdefs.h. */
17384
6ec2e0f5
SDJ
17385 #include <errno.h>
17386 #include <fcntl.h>
17387 #include <limits.h>
17388 #include <sys/resource.h>
17389 #include <unistd.h>
17390 #ifndef RLIM_SAVED_CUR
17391 # define RLIM_SAVED_CUR RLIM_INFINITY
17392 #endif
17393 #ifndef RLIM_SAVED_MAX
17394 # define RLIM_SAVED_MAX RLIM_INFINITY
17395 #endif
8690e634
JK
17396
17397int
17398main ()
17399{
6ec2e0f5
SDJ
17400int result = 0;
17401 int bad_fd = INT_MAX;
17402 struct rlimit rlim;
17403 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
17404 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
17405 && rlim.rlim_cur != RLIM_INFINITY
17406 && rlim.rlim_cur != RLIM_SAVED_MAX
17407 && rlim.rlim_cur != RLIM_SAVED_CUR)
17408 bad_fd = rlim.rlim_cur;
17409 #ifdef FD_CLOEXEC
17410 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
17411 result |= 1;
17412 #endif
17413 if (dup2 (1, 1) != 1)
17414 result |= 2;
17415 #ifdef FD_CLOEXEC
17416 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
17417 result |= 4;
17418 #endif
17419 close (0);
17420 if (dup2 (0, 0) != -1)
17421 result |= 8;
17422 /* Many gnulib modules require POSIX conformance of EBADF. */
17423 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
17424 result |= 16;
17425 /* Flush out some cygwin core dumps. */
17426 if (dup2 (2, -1) != -1 || errno != EBADF)
17427 result |= 32;
17428 dup2 (2, 255);
17429 dup2 (2, 256);
17430 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
17431 {
17432 int fd = open (".", O_RDONLY);
17433 if (fd == -1)
17434 result |= 64;
17435 else if (dup2 (fd, fd + 1) == -1)
17436 result |= 128;
17437
17438 close (fd);
17439 }
17440 return result;
8690e634
JK
17441 ;
17442 return 0;
17443}
6ec2e0f5 17444
8690e634
JK
17445_ACEOF
17446if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17447 gl_cv_func_dup2_works=yes
8690e634 17448else
6ec2e0f5 17449 gl_cv_func_dup2_works=no
8690e634
JK
17450fi
17451rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17452 conftest.$ac_objext conftest.beam conftest.$ac_ext
17453fi
17454
6ec2e0f5
SDJ
17455
17456fi
17457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
17458$as_echo "$gl_cv_func_dup2_works" >&6; }
17459 case "$gl_cv_func_dup2_works" in
17460 *yes) ;;
17461 *)
17462 REPLACE_DUP2=1
17463 for ac_func in setdtablesize
17464do :
17465 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
d0ac1c44 17466if test "x$ac_cv_func_setdtablesize" = xyes; then :
6ec2e0f5
SDJ
17467 cat >>confdefs.h <<_ACEOF
17468#define HAVE_SETDTABLESIZE 1
17469_ACEOF
17470
17471fi
17472done
17473
17474 ;;
17475 esac
17476 fi
17477
17478
17479
17480
472fa5ee
SM
17481 :
17482
17483
17484
17485
17486
6ec2e0f5
SDJ
17487 if test $ac_cv_func_fchdir = no; then
17488 HAVE_FCHDIR=0
8690e634
JK
17489 fi
17490
6ec2e0f5
SDJ
17491 if test $HAVE_FCHDIR = 0; then
17492 if test $HAVE_DUP2 = 1; then
17493 REPLACE_DUP2=1
17494 fi
17495 fi
8690e634 17496
8690e634 17497
6ec2e0f5 17498 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
8690e634
JK
17499
17500
17501
17502
8690e634 17503
8690e634 17504
6ec2e0f5
SDJ
17505
17506
17507 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
17508
17509
8690e634
JK
17510 fi
17511
8690e634 17512
8690e634 17513
8690e634
JK
17514
17515
6ec2e0f5
SDJ
17516 GNULIB_DUP2=1
17517
17518
17519
17520
17521
17522$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532 GNULIB_ENVIRON=1
17533
17534
17535
17536
17537
17538$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
17539
17540
17541
17542
17543
17544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
17545$as_echo_n "checking for error_at_line... " >&6; }
d0ac1c44 17546if ${ac_cv_lib_error_at_line+:} false; then :
6ec2e0f5 17547 $as_echo_n "(cached) " >&6
8690e634
JK
17548else
17549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17550/* end confdefs.h. */
6ec2e0f5 17551#include <error.h>
8690e634
JK
17552int
17553main ()
17554{
6ec2e0f5 17555error_at_line (0, 0, "", 0, "an error occurred");
8690e634
JK
17556 ;
17557 return 0;
17558}
17559_ACEOF
6ec2e0f5
SDJ
17560if ac_fn_c_try_link "$LINENO"; then :
17561 ac_cv_lib_error_at_line=yes
8690e634 17562else
6ec2e0f5 17563 ac_cv_lib_error_at_line=no
8690e634 17564fi
6ec2e0f5
SDJ
17565rm -f core conftest.err conftest.$ac_objext \
17566 conftest$ac_exeext conftest.$ac_ext
8690e634 17567fi
6ec2e0f5
SDJ
17568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
17569$as_echo "$ac_cv_lib_error_at_line" >&6; }
17570
17571 if test $ac_cv_lib_error_at_line = no; then
17572
17573
17574
17575
17576
17577
17578
17579
17580 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
17581
8690e634
JK
17582
17583
8690e634
JK
17584 :
17585
6ec2e0f5 17586 fi
6a29c58e 17587
6a29c58e 17588
d0ac1c44
SM
17589
17590
17591
d0ac1c44
SM
17592
17593
472fa5ee 17594 :
6a29c58e
YQ
17595
17596
3d99e817 17597
6ec2e0f5
SDJ
17598
17599
17600 if test $ac_cv_have_decl_fchdir = no; then
17601 HAVE_DECL_FCHDIR=0
17602 fi
17603
17604
17605 if test $HAVE_FCHDIR = 0; then
17606
17607
3d99e817
AK
17608
17609
17610
17611
17612
17613
6ec2e0f5 17614 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
3d99e817 17615
6ec2e0f5 17616 :
3d99e817 17617
6ec2e0f5 17618$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
3d99e817 17619
6ec2e0f5
SDJ
17620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
17621$as_echo_n "checking whether open can visit directories... " >&6; }
d0ac1c44 17622if ${gl_cv_func_open_directory_works+:} false; then :
6ec2e0f5
SDJ
17623 $as_echo_n "(cached) " >&6
17624else
17625 if test "$cross_compiling" = yes; then :
17626 case "$host_os" in
5e8754f9
SDJ
17627 # Guess yes on glibc systems.
17628 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
17629 # If we don't know, assume the worst.
17630 *) gl_cv_func_open_directory_works="guessing no" ;;
6ec2e0f5 17631 esac
3d99e817 17632
6ec2e0f5
SDJ
17633else
17634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17635/* end confdefs.h. */
17636#include <fcntl.h>
3d99e817 17637
6ec2e0f5
SDJ
17638int
17639main ()
17640{
17641return open(".", O_RDONLY) < 0;
17642 ;
17643 return 0;
17644}
3d99e817 17645_ACEOF
6ec2e0f5
SDJ
17646if ac_fn_c_try_run "$LINENO"; then :
17647 gl_cv_func_open_directory_works=yes
17648else
17649 gl_cv_func_open_directory_works=no
17650fi
17651rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17652 conftest.$ac_objext conftest.beam conftest.$ac_ext
17653fi
3d99e817
AK
17654
17655fi
6ec2e0f5
SDJ
17656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
17657$as_echo "$gl_cv_func_open_directory_works" >&6; }
17658 case "$gl_cv_func_open_directory_works" in
17659 *yes) ;;
17660 *)
3d99e817 17661
6ec2e0f5 17662$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
3d99e817 17663
6ec2e0f5
SDJ
17664 ;;
17665 esac
17666 fi
3d99e817 17667
3d99e817
AK
17668
17669
17670
0750520d 17671
0750520d 17672
6ec2e0f5 17673 GNULIB_FCHDIR=1
0750520d 17674
0750520d
PA
17675
17676
0750520d 17677
0750520d 17678
6ec2e0f5 17679$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
0750520d 17680
0750520d 17681
0750520d 17682
0750520d 17683
0750520d 17684
0750520d 17685
0750520d 17686
6ec2e0f5 17687
472fa5ee
SM
17688 :
17689
17690
17691
17692
17693
6ec2e0f5
SDJ
17694 if test $ac_cv_func_fcntl = no; then
17695
17696
17697
472fa5ee
SM
17698 :
17699
17700
17701
17702
17703
6ec2e0f5
SDJ
17704 if test $ac_cv_func_fcntl = no; then
17705 HAVE_FCNTL=0
17706 else
17707 REPLACE_FCNTL=1
17708 fi
17709
17710 else
17711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
17712$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
d0ac1c44 17713if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
0750520d 17714 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
17715else
17716 if test "$cross_compiling" = yes; then :
17717 case $host_os in
17718 aix* | cygwin* | haiku*)
17719 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
17720 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
17721 esac
0750520d
PA
17722else
17723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17724/* end confdefs.h. */
6ec2e0f5
SDJ
17725#include <errno.h>
17726 #include <fcntl.h>
17727 #include <limits.h>
17728 #include <sys/resource.h>
17729 #include <unistd.h>
17730 #ifndef RLIM_SAVED_CUR
17731 # define RLIM_SAVED_CUR RLIM_INFINITY
17732 #endif
17733 #ifndef RLIM_SAVED_MAX
17734 # define RLIM_SAVED_MAX RLIM_INFINITY
17735 #endif
0750520d 17736
6ec2e0f5
SDJ
17737int
17738main ()
17739{
17740int result = 0;
17741 int bad_fd = INT_MAX;
17742 struct rlimit rlim;
17743 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
17744 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
17745 && rlim.rlim_cur != RLIM_INFINITY
17746 && rlim.rlim_cur != RLIM_SAVED_MAX
17747 && rlim.rlim_cur != RLIM_SAVED_CUR)
17748 bad_fd = rlim.rlim_cur;
17749 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
17750 if (errno != EINVAL) result |= 2;
17751 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
17752 if (errno != EINVAL) result |= 8;
17753 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
17754 {
17755 int fd;
17756 fd = open (".", O_RDONLY);
17757 if (fd == -1)
17758 result |= 16;
17759 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
17760 result |= 32;
17761
17762 close (fd);
17763 }
17764 return result;
17765 ;
17766 return 0;
17767}
0750520d 17768_ACEOF
6ec2e0f5
SDJ
17769if ac_fn_c_try_run "$LINENO"; then :
17770 gl_cv_func_fcntl_f_dupfd_works=yes
0750520d 17771else
6ec2e0f5
SDJ
17772 gl_cv_func_fcntl_f_dupfd_works=no
17773fi
17774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17775 conftest.$ac_objext conftest.beam conftest.$ac_ext
0750520d 17776fi
0750520d
PA
17777
17778fi
6ec2e0f5
SDJ
17779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
17780$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
17781 case $gl_cv_func_fcntl_f_dupfd_works in
17782 *yes) ;;
17783 *)
0750520d 17784
0750520d 17785
472fa5ee
SM
17786 :
17787
17788
17789
17790
17791
6ec2e0f5
SDJ
17792 if test $ac_cv_func_fcntl = no; then
17793 HAVE_FCNTL=0
17794 else
17795 REPLACE_FCNTL=1
17796 fi
0750520d 17797
0750520d 17798
6ec2e0f5
SDJ
17799$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
17800 ;;
17801 esac
0750520d 17802
6ec2e0f5
SDJ
17803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
17804$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
d0ac1c44 17805if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
8690e634
JK
17806 $as_echo_n "(cached) " >&6
17807else
17808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17809/* end confdefs.h. */
17810
6ec2e0f5
SDJ
17811#include <fcntl.h>
17812#ifndef F_DUPFD_CLOEXEC
17813choke me
17814#endif
49e4877c 17815
6ec2e0f5
SDJ
17816int
17817main ()
17818{
8690e634 17819
6ec2e0f5
SDJ
17820 ;
17821 return 0;
17822}
17823_ACEOF
17824if ac_fn_c_try_compile "$LINENO"; then :
17825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17826/* end confdefs.h. */
8690e634 17827
6ec2e0f5
SDJ
17828#ifdef __linux__
17829/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
17830 it to support the semantics on older kernels that failed with EINVAL. */
17831choke me
17832#endif
8690e634
JK
17833
17834int
17835main ()
17836{
17837
8690e634
JK
17838 ;
17839 return 0;
17840}
17841_ACEOF
17842if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 17843 gl_cv_func_fcntl_f_dupfd_cloexec=yes
8690e634 17844else
6ec2e0f5 17845 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
8690e634
JK
17846fi
17847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
17848else
17849 gl_cv_func_fcntl_f_dupfd_cloexec=no
8690e634 17850fi
6ec2e0f5
SDJ
17851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17852fi
17853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
17854$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
17855 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
17856
17857
17858
472fa5ee
SM
17859 :
17860
17861
17862
17863
17864
6ec2e0f5
SDJ
17865 if test $ac_cv_func_fcntl = no; then
17866 HAVE_FCNTL=0
17867 else
17868 REPLACE_FCNTL=1
17869 fi
17870
17871 fi
17872 fi
17873
17874
17875
17876
472fa5ee
SM
17877 :
17878
17879
17880
17881
17882
6ec2e0f5
SDJ
17883 if test $ac_cv_func_fchdir = no; then
17884 HAVE_FCHDIR=0
17885 fi
17886
17887 if test $HAVE_FCHDIR = 0; then
17888
17889
17890
472fa5ee
SM
17891 :
17892
17893
17894
17895
17896
6ec2e0f5
SDJ
17897 if test $ac_cv_func_fcntl = no; then
17898 HAVE_FCNTL=0
17899 else
17900 REPLACE_FCNTL=1
17901 fi
17902
17903 fi
17904
17905
17906 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
17907
17908
17909
17910
17911
17912
17913
17914
17915 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
17916
17917 fi
8690e634 17918
8690e634
JK
17919
17920
8690e634
JK
17921
17922
6ec2e0f5 17923 GNULIB_FCNTL=1
8690e634 17924
8690e634
JK
17925
17926
8690e634 17927
8690e634 17928
6ec2e0f5
SDJ
17929$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
17930
8690e634 17931
8690e634 17932
63ce7108
TT
17933
17934
17935
17936
8690e634
JK
17937
17938
17939
17940
17941
17942
17943
17944 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 17945 gl_cv_next_fcntl_h='<'fcntl.h'>'
8690e634 17946 else
6ec2e0f5
SDJ
17947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
17948$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
d0ac1c44 17949if ${gl_cv_next_fcntl_h+:} false; then :
8690e634
JK
17950 $as_echo_n "(cached) " >&6
17951else
17952
4a626d0a
PA
17953
17954
17955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 17956/* end confdefs.h. */
6ec2e0f5 17957#include <fcntl.h>
8690e634 17958_ACEOF
4a626d0a
PA
17959 case "$host_os" in
17960 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17961 *) gl_absname_cpp="$ac_cpp" ;;
17962 esac
17963
17964 case "$host_os" in
17965 mingw*)
17966 gl_dirsep_regex='[/\\]'
17967 ;;
17968 *)
17969 gl_dirsep_regex='\/'
17970 ;;
17971 esac
17972 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 17973 gl_header_literal_regex=`echo 'fcntl.h' \
4a626d0a
PA
17974 | sed -e "$gl_make_literal_regex_sed"`
17975 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17976 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17977 s|^/[^/]|//&|
17978 p
17979 q
17980 }'
8690e634 17981
6ec2e0f5 17982 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 17983 sed -n "$gl_absolute_header_sed"`
c971b7fa 17984
6ec2e0f5
SDJ
17985 gl_header=$gl_cv_absolute_fcntl_h
17986 gl_cv_next_fcntl_h='"'$gl_header'"'
8690e634
JK
17987
17988
17989fi
6ec2e0f5
SDJ
17990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
17991$as_echo "$gl_cv_next_fcntl_h" >&6; }
8690e634 17992 fi
6ec2e0f5 17993 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
8690e634
JK
17994
17995 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17996 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 17997 gl_next_as_first_directive='<'fcntl.h'>'
8690e634
JK
17998 else
17999 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 18000 gl_next_as_first_directive=$gl_cv_next_fcntl_h
8690e634 18001 fi
6ec2e0f5 18002 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
8690e634
JK
18003
18004
18005
18006
18007
18008
6ec2e0f5
SDJ
18009
18010
18011
18012
5e8754f9
SDJ
18013 for gl_func in fcntl openat; do
18014 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18016$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18017if eval \${$as_gl_Symbol+:} false; then :
18018 $as_echo_n "(cached) " >&6
18019else
18020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18021/* end confdefs.h. */
18022#include <fcntl.h>
8690e634 18023
5e8754f9
SDJ
18024int
18025main ()
18026{
18027#undef $gl_func
18028 (void) $gl_func;
18029 ;
18030 return 0;
18031}
18032_ACEOF
18033if ac_fn_c_try_compile "$LINENO"; then :
18034 eval "$as_gl_Symbol=yes"
18035else
18036 eval "$as_gl_Symbol=no"
18037fi
18038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18039fi
18040eval ac_res=\$$as_gl_Symbol
18041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18042$as_echo "$ac_res" >&6; }
18043 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18044 cat >>confdefs.h <<_ACEOF
18045#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7a6dbc2f 18046_ACEOF
8690e634 18047
5e8754f9
SDJ
18048 eval ac_cv_have_decl_$gl_func=yes
18049fi
18050 done
18051
8690e634
JK
18052
18053
8839a007 18054
63ce7108 18055
63ce7108 18056
63ce7108 18057
6ec2e0f5
SDJ
18058 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
18059#include <dirent.h>
18060
18061"
d0ac1c44 18062if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
6ec2e0f5
SDJ
18063 ac_have_decl=1
18064else
18065 ac_have_decl=0
18066fi
18067
18068cat >>confdefs.h <<_ACEOF
18069#define HAVE_DECL_FDOPENDIR $ac_have_decl
63ce7108 18070_ACEOF
6ec2e0f5
SDJ
18071if test $ac_have_decl = 1; then :
18072
63ce7108 18073else
6ec2e0f5 18074 HAVE_DECL_FDOPENDIR=0
63ce7108 18075fi
63ce7108
TT
18076
18077
472fa5ee
SM
18078 :
18079
18080
18081
18082
18083
6ec2e0f5
SDJ
18084 if test $ac_cv_func_fdopendir = no; then
18085 HAVE_FDOPENDIR=0
18086 else
18087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
18088$as_echo_n "checking whether fdopendir works... " >&6; }
d0ac1c44 18089if ${gl_cv_func_fdopendir_works+:} false; then :
6ec2e0f5
SDJ
18090 $as_echo_n "(cached) " >&6
18091else
18092 if test "$cross_compiling" = yes; then :
18093 case "$host_os" in
18094 # Guess yes on glibc systems.
18095 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
18096 # If we don't know, assume the worst.
18097 *) gl_cv_func_fdopendir_works="guessing no" ;;
18098 esac
18099
63ce7108
TT
18100else
18101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18102/* end confdefs.h. */
18103
6ec2e0f5
SDJ
18104#include <dirent.h>
18105#include <fcntl.h>
18106#include <unistd.h>
18107#if !HAVE_DECL_FDOPENDIR
18108extern
18109# ifdef __cplusplus
18110"C"
18111# endif
18112DIR *fdopendir (int);
18113#endif
63ce7108
TT
18114
18115int
18116main ()
18117{
6ec2e0f5
SDJ
18118int result = 0;
18119 int fd = open ("conftest.c", O_RDONLY);
18120 if (fd < 0) result |= 1;
18121 if (fdopendir (fd)) result |= 2;
18122 if (close (fd)) result |= 4;
18123 return result;
63ce7108
TT
18124 ;
18125 return 0;
18126}
18127_ACEOF
18128if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 18129 gl_cv_func_fdopendir_works=yes
63ce7108 18130else
6ec2e0f5 18131 gl_cv_func_fdopendir_works=no
63ce7108
TT
18132fi
18133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18134 conftest.$ac_objext conftest.beam conftest.$ac_ext
18135fi
18136
63ce7108 18137fi
6ec2e0f5
SDJ
18138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
18139$as_echo "$gl_cv_func_fdopendir_works" >&6; }
18140 case "$gl_cv_func_fdopendir_works" in
63ce7108
TT
18141 *yes) ;;
18142 *)
6ec2e0f5 18143 REPLACE_FDOPENDIR=1
63ce7108
TT
18144 ;;
18145 esac
18146 fi
18147
6ec2e0f5 18148 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
09607c9e
TT
18149
18150
18151
4a626d0a
PA
18152
18153
18154
18155
18156
6ec2e0f5 18157 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
4a626d0a 18158
6ec2e0f5 18159 fi
4a626d0a
PA
18160
18161
18162
4a626d0a 18163
4a626d0a 18164
6ec2e0f5 18165 GNULIB_FDOPENDIR=1
4a626d0a
PA
18166
18167
18168
18169
18170
6ec2e0f5 18171$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
4a626d0a
PA
18172
18173
18174
18175
18176
6ec2e0f5
SDJ
18177cat >>confdefs.h <<_ACEOF
18178#define GNULIB_FDOPENDIR 1
18179_ACEOF
4a626d0a 18180
09607c9e 18181
09607c9e
TT
18182
18183
472fa5ee
SM
18184 :
18185
18186
18187
18188
18189
09607c9e 18190
6ec2e0f5
SDJ
18191
18192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
18193$as_echo_n "checking for flexible array member... " >&6; }
d0ac1c44 18194if ${ac_cv_c_flexmember+:} false; then :
09607c9e
TT
18195 $as_echo_n "(cached) " >&6
18196else
18197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18198/* end confdefs.h. */
6ec2e0f5
SDJ
18199#include <stdlib.h>
18200 #include <stdio.h>
18201 #include <stddef.h>
5e8754f9 18202 struct s { int n; double d[]; };
09607c9e
TT
18203int
18204main ()
18205{
6ec2e0f5
SDJ
18206int m = getchar ();
18207 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
18208 nbytes += sizeof (struct s) - 1;
18209 nbytes -= nbytes % sizeof (struct s);
18210 struct s *p = malloc (nbytes);
18211 p->d[0] = 0.0;
18212 return p->d != (double *) NULL;
09607c9e
TT
18213 ;
18214 return 0;
18215}
18216_ACEOF
18217if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 18218 ac_cv_c_flexmember=yes
09607c9e 18219else
6ec2e0f5 18220 ac_cv_c_flexmember=no
09607c9e
TT
18221fi
18222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18223fi
6ec2e0f5
SDJ
18224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
18225$as_echo "$ac_cv_c_flexmember" >&6; }
18226 if test $ac_cv_c_flexmember = yes; then
18227
18228$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
09607c9e 18229
09607c9e 18230 else
6ec2e0f5 18231 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
09607c9e 18232
6ec2e0f5
SDJ
18233 fi
18234
18235
18236
18237
18238 FLOAT_H=
18239 REPLACE_FLOAT_LDBL=0
18240 case "$host_os" in
18241 aix* | beos* | openbsd* | mirbsd* | irix*)
18242 FLOAT_H=float.h
18243 ;;
5e8754f9 18244 freebsd*)
6ec2e0f5
SDJ
18245 case "$host_cpu" in
18246 i[34567]86 )
18247 FLOAT_H=float.h
18248 ;;
18249 x86_64 )
18250 # On x86_64 systems, the C compiler may still be generating
18251 # 32-bit code.
18252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18253/* end confdefs.h. */
18254#if defined __LP64__ || defined __x86_64__ || defined __amd64__
5e8754f9
SDJ
18255 yes
18256 #endif
09607c9e 18257_ACEOF
5e8754f9
SDJ
18258if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18259 $EGREP "yes" >/dev/null 2>&1; then :
6ec2e0f5 18260
09607c9e 18261else
6ec2e0f5 18262 FLOAT_H=float.h
09607c9e 18263fi
5e8754f9
SDJ
18264rm -f conftest*
18265
6ec2e0f5
SDJ
18266 ;;
18267 esac
18268 ;;
18269 linux*)
18270 case "$host_cpu" in
18271 powerpc*)
18272 FLOAT_H=float.h
18273 ;;
18274 esac
18275 ;;
18276 esac
18277 case "$host_os" in
5e8754f9 18278 aix* | freebsd* | linux*)
6ec2e0f5
SDJ
18279 if test -n "$FLOAT_H"; then
18280 REPLACE_FLOAT_LDBL=1
18281 fi
18282 ;;
18283 esac
18284
18285 REPLACE_ITOLD=0
18286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
18287$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
d0ac1c44 18288if ${gl_cv_func_itold_works+:} false; then :
09607c9e
TT
18289 $as_echo_n "(cached) " >&6
18290else
09607c9e 18291
6ec2e0f5
SDJ
18292 if test "$cross_compiling" = yes; then :
18293 case "$host" in
18294 sparc*-*-linux*)
18295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18296/* end confdefs.h. */
18297#if defined __LP64__ || defined __arch64__
5e8754f9
SDJ
18298 yes
18299 #endif
09607c9e 18300_ACEOF
5e8754f9
SDJ
18301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18302 $EGREP "yes" >/dev/null 2>&1; then :
6ec2e0f5 18303 gl_cv_func_itold_works="guessing no"
09607c9e 18304else
6ec2e0f5 18305 gl_cv_func_itold_works="guessing yes"
09607c9e 18306fi
5e8754f9
SDJ
18307rm -f conftest*
18308
6ec2e0f5 18309 ;;
5e8754f9 18310 *) gl_cv_func_itold_works="guessing yes" ;;
6ec2e0f5
SDJ
18311 esac
18312
4a626d0a
PA
18313else
18314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18315/* end confdefs.h. */
4a626d0a 18316
6ec2e0f5
SDJ
18317int i = -1;
18318volatile long double ld;
18319int main ()
4a626d0a 18320{
6ec2e0f5
SDJ
18321 ld += i * 1.0L;
18322 if (ld > 0)
18323 return 1;
4a626d0a
PA
18324 return 0;
18325}
18326_ACEOF
6ec2e0f5
SDJ
18327if ac_fn_c_try_run "$LINENO"; then :
18328 gl_cv_func_itold_works=yes
4a626d0a 18329else
6ec2e0f5
SDJ
18330 gl_cv_func_itold_works=no
18331fi
18332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18333 conftest.$ac_objext conftest.beam conftest.$ac_ext
18334fi
09607c9e
TT
18335
18336
6ec2e0f5
SDJ
18337fi
18338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
18339$as_echo "$gl_cv_func_itold_works" >&6; }
18340 case "$gl_cv_func_itold_works" in
18341 *no)
18342 REPLACE_ITOLD=1
18343 FLOAT_H=float.h
18344 ;;
18345 esac
09607c9e 18346
6ec2e0f5 18347 if test -n "$FLOAT_H"; then
09607c9e
TT
18348
18349
18350
18351
18352
18353
18354
4a626d0a 18355
09607c9e 18356 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 18357 gl_cv_next_float_h='<'float.h'>'
09607c9e 18358 else
6ec2e0f5
SDJ
18359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
18360$as_echo_n "checking absolute name of <float.h>... " >&6; }
d0ac1c44 18361if ${gl_cv_next_float_h+:} false; then :
09607c9e
TT
18362 $as_echo_n "(cached) " >&6
18363else
18364
4a626d0a
PA
18365
18366
18367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e 18368/* end confdefs.h. */
6ec2e0f5 18369#include <float.h>
09607c9e 18370_ACEOF
4a626d0a
PA
18371 case "$host_os" in
18372 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18373 *) gl_absname_cpp="$ac_cpp" ;;
18374 esac
18375
18376 case "$host_os" in
18377 mingw*)
18378 gl_dirsep_regex='[/\\]'
18379 ;;
18380 *)
18381 gl_dirsep_regex='\/'
18382 ;;
18383 esac
18384 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 18385 gl_header_literal_regex=`echo 'float.h' \
4a626d0a
PA
18386 | sed -e "$gl_make_literal_regex_sed"`
18387 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18388 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18389 s|^/[^/]|//&|
18390 p
18391 q
18392 }'
09607c9e 18393
6ec2e0f5 18394 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 18395 sed -n "$gl_absolute_header_sed"`
09607c9e 18396
6ec2e0f5
SDJ
18397 gl_header=$gl_cv_absolute_float_h
18398 gl_cv_next_float_h='"'$gl_header'"'
09607c9e
TT
18399
18400
18401fi
6ec2e0f5
SDJ
18402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
18403$as_echo "$gl_cv_next_float_h" >&6; }
09607c9e 18404 fi
6ec2e0f5 18405 NEXT_FLOAT_H=$gl_cv_next_float_h
09607c9e
TT
18406
18407 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18408 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 18409 gl_next_as_first_directive='<'float.h'>'
09607c9e
TT
18410 else
18411 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 18412 gl_next_as_first_directive=$gl_cv_next_float_h
09607c9e 18413 fi
6ec2e0f5 18414 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
09607c9e
TT
18415
18416
18417
18418
6ec2e0f5 18419 fi
09607c9e 18420
6ec2e0f5
SDJ
18421 if test -n "$FLOAT_H"; then
18422 GL_GENERATE_FLOAT_H_TRUE=
18423 GL_GENERATE_FLOAT_H_FALSE='#'
3d99e817 18424else
6ec2e0f5
SDJ
18425 GL_GENERATE_FLOAT_H_TRUE='#'
18426 GL_GENERATE_FLOAT_H_FALSE=
3d99e817
AK
18427fi
18428
3d99e817 18429
09607c9e 18430
6ec2e0f5 18431 if test $REPLACE_FLOAT_LDBL = 1; then
8690e634 18432
8690e634 18433
8690e634 18434
8690e634 18435
8690e634 18436
6ec2e0f5
SDJ
18437
18438
18439
18440 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
18441
8690e634 18442 fi
6ec2e0f5 18443 if test $REPLACE_ITOLD = 1; then
8690e634
JK
18444
18445
18446
18447
18448
6ec2e0f5
SDJ
18449
18450
18451
18452 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
18453
8690e634
JK
18454 fi
18455
18456
18457
6ec2e0f5 18458
5e8754f9
SDJ
18459
18460 FNMATCH_H=
6ec2e0f5
SDJ
18461 gl_fnmatch_required_lowercase=`
18462 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
18463 `
5e8754f9
SDJ
18464 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
18465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
6ec2e0f5 18466$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
d0ac1c44 18467if eval \${$gl_fnmatch_cache_var+:} false; then :
8690e634 18468 $as_echo_n "(cached) " >&6
6ec2e0f5 18469else
5e8754f9
SDJ
18470 if test $gl_fnmatch_required = GNU; then
18471 gl_fnmatch_gnu_start=
18472 gl_fnmatch_gnu_end=
18473 else
18474 gl_fnmatch_gnu_start='#if 0'
18475 gl_fnmatch_gnu_end='#endif'
18476 fi
18477 if test "$cross_compiling" = yes; then :
6ec2e0f5 18478 eval "$gl_fnmatch_cache_var=\"guessing no\""
8690e634
JK
18479else
18480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18481/* end confdefs.h. */
6ec2e0f5 18482#include <fnmatch.h>
5e8754f9
SDJ
18483 static int
18484 y (char const *pattern, char const *string, int flags)
18485 {
18486 return fnmatch (pattern, string, flags) == 0;
18487 }
18488 static int
18489 n (char const *pattern, char const *string, int flags)
18490 {
18491 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
18492 }
8690e634 18493
8690e634
JK
18494int
18495main ()
18496{
6ec2e0f5 18497char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
5e8754f9
SDJ
18498 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
18499 static char const A_1[] = { 'A' - 1, 0 };
18500 static char const A01[] = { 'A' + 1, 0 };
18501 static char const a_1[] = { 'a' - 1, 0 };
18502 static char const a01[] = { 'a' + 1, 0 };
18503 static char const bs_1[] = { '\\\\' - 1, 0 };
18504 static char const bs01[] = { '\\\\' + 1, 0 };
18505 int result = 0;
18506 if (!n ("a*", "", 0))
18507 return 1;
18508 if (!y ("a*", "abc", 0))
18509 return 1;
18510 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
18511 return 1;
18512 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
18513 return 2;
18514 if (!y ("a\\\\bc", "abc", 0))
18515 return 3;
18516 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
18517 return 3;
18518 if (!y ("*x", ".x", 0))
18519 return 4;
18520 if (!n ("*x", ".x", FNM_PERIOD))
18521 return 4;
18522 if (!y (Apat, "\\\\", 0))
18523 return 5;
18524 if (!y (Apat, "A", 0))
18525 return 5;
18526 if (!y (apat, "\\\\", 0))
18527 return 5;
18528 if (!y (apat, "a", 0))
18529 return 5;
18530 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
18531 return 5;
18532 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
18533 return 5;
18534 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
18535 return 5;
18536 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
18537 return 5;
18538 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
18539 return 5;
18540 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
18541 return 5;
18542 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
18543 return 5;
18544 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
18545 return 5;
18546 $gl_fnmatch_gnu_start
18547 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
18548 result |= 8;
18549 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
18550 result |= 16;
18551 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
18552 result |= 32;
18553 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
18554 result |= 64;
18555 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
18556 result |= 64;
18557 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
18558 result |= 64;
18559 $gl_fnmatch_gnu_end
18560 return result;
8690e634
JK
18561
18562 ;
18563 return 0;
18564}
18565_ACEOF
6ec2e0f5
SDJ
18566if ac_fn_c_try_run "$LINENO"; then :
18567 eval "$gl_fnmatch_cache_var=yes"
8690e634 18568else
6ec2e0f5 18569 eval "$gl_fnmatch_cache_var=no"
8690e634 18570fi
6ec2e0f5
SDJ
18571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18572 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 18573fi
8690e634 18574
8690e634 18575
6ec2e0f5
SDJ
18576fi
18577eval ac_res=\$$gl_fnmatch_cache_var
18578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18579$as_echo "$ac_res" >&6; }
5e8754f9
SDJ
18580 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
18581 if test "$gl_fnmatch_result" = yes; then
18582 rm -f "$gl_source_base/fnmatch.h"
18583 else
18584 FNMATCH_H=fnmatch.h
8690e634
JK
18585 fi
18586
6ec2e0f5
SDJ
18587 if test -n "$FNMATCH_H"; then
18588 GL_GENERATE_FNMATCH_H_TRUE=
18589 GL_GENERATE_FNMATCH_H_FALSE='#'
18590else
18591 GL_GENERATE_FNMATCH_H_TRUE='#'
18592 GL_GENERATE_FNMATCH_H_FALSE=
18593fi
8690e634 18594
8690e634 18595
5e8754f9 18596 if test -n "$FNMATCH_H"; then
8690e634 18597
6ec2e0f5
SDJ
18598
18599
18600
18601
18602
6ec2e0f5
SDJ
18603
18604
7a6dbc2f 18605 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
6ec2e0f5 18606
6ec2e0f5
SDJ
18607
18608
5e8754f9
SDJ
18609cat >>confdefs.h <<_ACEOF
18610#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
18611_ACEOF
18612
18613
6ec2e0f5
SDJ
18614 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
18615"
d0ac1c44 18616if test "x$ac_cv_have_decl_isblank" = xyes; then :
6ec2e0f5 18617 ac_have_decl=1
8690e634 18618else
6ec2e0f5 18619 ac_have_decl=0
8690e634
JK
18620fi
18621
6ec2e0f5
SDJ
18622cat >>confdefs.h <<_ACEOF
18623#define HAVE_DECL_ISBLANK $ac_have_decl
18624_ACEOF
8690e634
JK
18625
18626
472fa5ee
SM
18627 :
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655 :
18656
18657
18658
18659
8690e634
JK
18660
18661
6ec2e0f5 18662 fi
8690e634
JK
18663
18664
18665
18666
18667
5e8754f9
SDJ
18668 if test -n "$FNMATCH_H"; then
18669
18670
18671
18672
472fa5ee
SM
18673
18674
18675
18676
5e8754f9 18677 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
472fa5ee
SM
18678
18679
18680
5e8754f9
SDJ
18681cat >>confdefs.h <<_ACEOF
18682#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
18683_ACEOF
472fa5ee
SM
18684
18685
5e8754f9
SDJ
18686 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
18687"
18688if test "x$ac_cv_have_decl_isblank" = xyes; then :
18689 ac_have_decl=1
18690else
18691 ac_have_decl=0
18692fi
472fa5ee 18693
5e8754f9
SDJ
18694cat >>confdefs.h <<_ACEOF
18695#define HAVE_DECL_ISBLANK $ac_have_decl
18696_ACEOF
472fa5ee
SM
18697
18698
5e8754f9 18699 :
472fa5ee
SM
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
98399780 18711
5e8754f9
SDJ
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727 :
18728
18729
18730
18731
18732
18733
18734 fi
18735
18736
18737
18738 FREXP_LIBM=
18739 if test $gl_cv_func_frexp_no_libm = no; then
18740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
18741$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
18742if ${gl_cv_func_frexp_in_libm+:} false; then :
18743 $as_echo_n "(cached) " >&6
6ec2e0f5 18744else
98399780 18745
5e8754f9
SDJ
18746 save_LIBS="$LIBS"
18747 LIBS="$LIBS -lm"
18748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18749/* end confdefs.h. */
18750#include <math.h>
18751 double x;
18752int
18753main ()
18754{
18755int e; return frexp (x, &e) > 0;
18756 ;
18757 return 0;
18758}
7a6dbc2f 18759_ACEOF
5e8754f9
SDJ
18760if ac_fn_c_try_link "$LINENO"; then :
18761 gl_cv_func_frexp_in_libm=yes
18762else
18763 gl_cv_func_frexp_in_libm=no
18764fi
18765rm -f core conftest.err conftest.$ac_objext \
18766 conftest$ac_exeext conftest.$ac_ext
18767 LIBS="$save_LIBS"
18768
18769fi
18770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
18771$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
18772 if test $gl_cv_func_frexp_in_libm = yes; then
18773 FREXP_LIBM=-lm
18774 fi
18775 fi
18776 if test $gl_cv_func_frexp_no_libm = yes \
18777 || test $gl_cv_func_frexp_in_libm = yes; then
18778 save_LIBS="$LIBS"
18779 LIBS="$LIBS $FREXP_LIBM"
18780
98399780
YQ
18781
18782
472fa5ee
SM
18783 :
18784
18785
18786
18787
18788
5e8754f9
SDJ
18789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
18790$as_echo_n "checking whether frexp works... " >&6; }
18791if ${gl_cv_func_frexp_works+:} false; then :
18792 $as_echo_n "(cached) " >&6
18793else
18794
18795 if test "$cross_compiling" = yes; then :
18796 case "$host_os" in
18797 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
18798 *) gl_cv_func_frexp_works="guessing yes";;
18799 esac
18800
18801else
18802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18803/* end confdefs.h. */
18804
18805#include <float.h>
18806#include <math.h>
18807#include <string.h>
18808#if HAVE_DECL_ALARM
18809# include <signal.h>
18810# include <unistd.h>
18811#endif
18812/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
18813 ICC 10.0 has a bug when optimizing the expression -zero.
18814 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
18815 to PowerPC on Mac OS X 10.5. */
18816#if defined __hpux || defined __sgi || defined __ICC
18817static double
18818compute_minus_zero (void)
18819{
18820 return -DBL_MIN * DBL_MIN;
18821}
18822# define minus_zero compute_minus_zero ()
18823#else
18824double minus_zero = -0.0;
18825#endif
18826int main()
18827{
18828 int result = 0;
18829 int i;
18830 volatile double x;
18831 double zero = 0.0;
18832#if HAVE_DECL_ALARM
18833 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
18834 number. Let the test fail in this case. */
18835 signal (SIGALRM, SIG_DFL);
18836 alarm (5);
18837#endif
18838 /* Test on denormalized numbers. */
18839 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
18840 ;
18841 if (x > 0.0)
18842 {
18843 int exp;
18844 double y = frexp (x, &exp);
18845 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
18846 On NetBSD: y = 0.75. Correct: y = 0.5. */
18847 if (y != 0.5)
18848 result |= 1;
18849 }
18850 /* Test on infinite numbers. */
18851 x = 1.0 / zero;
18852 {
18853 int exp;
18854 double y = frexp (x, &exp);
18855 if (y != x)
18856 result |= 2;
18857 }
18858 /* Test on negative zero. */
18859 x = minus_zero;
18860 {
18861 int exp;
18862 double y = frexp (x, &exp);
18863 if (memcmp (&y, &x, sizeof x))
18864 result |= 4;
18865 }
18866 return result;
18867}
18868_ACEOF
18869if ac_fn_c_try_run "$LINENO"; then :
18870 gl_cv_func_frexp_works=yes
18871else
18872 gl_cv_func_frexp_works=no
18873fi
18874rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18875 conftest.$ac_objext conftest.beam conftest.$ac_ext
18876fi
18877
98399780 18878
5e8754f9
SDJ
18879fi
18880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
18881$as_echo "$gl_cv_func_frexp_works" >&6; }
98399780 18882
5e8754f9
SDJ
18883 LIBS="$save_LIBS"
18884 case "$gl_cv_func_frexp_works" in
18885 *yes) gl_func_frexp=yes ;;
18886 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
18887 esac
18888 else
18889 gl_func_frexp=no
18890 fi
18891 if test $gl_func_frexp = yes; then
98399780 18892
5e8754f9 18893$as_echo "#define HAVE_FREXP 1" >>confdefs.h
98399780 18894
5e8754f9 18895 fi
98399780
YQ
18896
18897
5e8754f9 18898 if test $gl_func_frexp != yes; then
6a29c58e
YQ
18899
18900
18901
18902
6a29c58e
YQ
18903
18904
18905
18906
5e8754f9 18907 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
8690e634 18908
5e8754f9 18909 fi
8690e634 18910
8690e634 18911
8690e634 18912
8690e634 18913
8690e634 18914
5e8754f9 18915 GNULIB_FREXP=1
8690e634 18916
8690e634 18917
4a626d0a 18918
8690e634 18919
8690e634 18920
5e8754f9 18921$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
8690e634
JK
18922
18923
18924
18925
18926
63ce7108 18927
e26b6bb0
TT
18928
18929
18930
5e8754f9
SDJ
18931 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
18932"
18933if test "x$ac_cv_have_decl_frexpl" = xyes; then :
e26b6bb0 18934
5e8754f9
SDJ
18935else
18936 HAVE_DECL_FREXPL=0
18937fi
e26b6bb0
TT
18938
18939
5e8754f9
SDJ
18940 FREXPL_LIBM=
18941 if test $HAVE_DECL_FREXPL = 1; then
e26b6bb0 18942
5e8754f9
SDJ
18943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
18944$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
18945if ${gl_cv_func_frexpl_no_libm+:} false; then :
18946 $as_echo_n "(cached) " >&6
18947else
e26b6bb0 18948
5e8754f9
SDJ
18949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18950/* end confdefs.h. */
18951#include <math.h>
18952 long double x;
18953int
18954main ()
18955{
18956int e; return frexpl (x, &e) > 0;
18957 ;
18958 return 0;
18959}
18960_ACEOF
18961if ac_fn_c_try_link "$LINENO"; then :
18962 gl_cv_func_frexpl_no_libm=yes
18963else
18964 gl_cv_func_frexpl_no_libm=no
18965fi
18966rm -f core conftest.err conftest.$ac_objext \
18967 conftest$ac_exeext conftest.$ac_ext
e26b6bb0 18968
5e8754f9
SDJ
18969fi
18970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
18971$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
e26b6bb0 18972
5e8754f9
SDJ
18973 if test $gl_cv_func_frexpl_no_libm = no; then
18974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
18975$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
18976if ${gl_cv_func_frexpl_in_libm+:} false; then :
18977 $as_echo_n "(cached) " >&6
18978else
e26b6bb0 18979
5e8754f9
SDJ
18980 save_LIBS="$LIBS"
18981 LIBS="$LIBS -lm"
18982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18983/* end confdefs.h. */
18984#include <math.h>
18985 long double x;
18986int
18987main ()
18988{
18989int e; return frexpl (x, &e) > 0;
18990 ;
18991 return 0;
18992}
18993_ACEOF
18994if ac_fn_c_try_link "$LINENO"; then :
18995 gl_cv_func_frexpl_in_libm=yes
18996else
18997 gl_cv_func_frexpl_in_libm=no
18998fi
18999rm -f core conftest.err conftest.$ac_objext \
19000 conftest$ac_exeext conftest.$ac_ext
19001 LIBS="$save_LIBS"
e26b6bb0 19002
5e8754f9
SDJ
19003fi
19004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
19005$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
19006 if test $gl_cv_func_frexpl_in_libm = yes; then
19007 FREXPL_LIBM=-lm
19008 fi
19009 fi
19010 if test $gl_cv_func_frexpl_no_libm = yes \
19011 || test $gl_cv_func_frexpl_in_libm = yes; then
19012 save_LIBS="$LIBS"
19013 LIBS="$LIBS $FREXPL_LIBM"
18848e28 19014
18848e28 19015
5e8754f9
SDJ
19016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
19017$as_echo_n "checking whether frexpl works... " >&6; }
19018if ${gl_cv_func_frexpl_works+:} false; then :
19019 $as_echo_n "(cached) " >&6
19020else
18848e28 19021
5e8754f9 19022 if test "$cross_compiling" = yes; then :
18848e28 19023
5e8754f9
SDJ
19024 case "$host_os" in
19025 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
19026 gl_cv_func_frexpl_works="guessing no";;
19027 *) gl_cv_func_frexpl_works="guessing yes";;
19028 esac
18848e28 19029
5e8754f9
SDJ
19030else
19031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19032/* end confdefs.h. */
18848e28 19033
5e8754f9
SDJ
19034#include <float.h>
19035#include <math.h>
19036/* Override the values of <float.h>, like done in float.in.h. */
19037#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
19038# undef LDBL_MIN_EXP
19039# define LDBL_MIN_EXP (-16381)
19040#endif
19041#if defined __i386__ && defined __FreeBSD__
19042# undef LDBL_MIN_EXP
19043# define LDBL_MIN_EXP (-16381)
19044#endif
19045#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
19046# undef LDBL_MIN_EXP
19047# define LDBL_MIN_EXP DBL_MIN_EXP
19048#endif
19049#if defined __sgi && (LDBL_MANT_DIG >= 106)
19050# if defined __GNUC__
19051# undef LDBL_MIN_EXP
19052# define LDBL_MIN_EXP DBL_MIN_EXP
19053# endif
19054#endif
19055extern
19056#ifdef __cplusplus
19057"C"
19058#endif
19059long double frexpl (long double, int *);
19060int main()
19061{
19062 int result = 0;
19063 volatile long double x;
19064 /* Test on finite numbers that fails on AIX 5.1. */
19065 x = 16.0L;
19066 {
19067 int exp = -9999;
19068 frexpl (x, &exp);
19069 if (exp != 5)
19070 result |= 1;
19071 }
19072 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
19073 function returns an invalid (incorrectly normalized) value: it returns
19074 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
19075 but the correct result is
19076 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
19077 x = 1.01L;
19078 {
19079 int exp = -9999;
19080 long double y = frexpl (x, &exp);
19081 if (!(exp == 1 && y == 0.505L))
19082 result |= 2;
19083 }
19084 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
19085 LDBL_MAX_EXP = 16384.
19086 In the loop end test, we test x against Infinity, rather than comparing
19087 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
19088 {
19089 int i;
19090 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
19091 {
19092 int exp = -9999;
19093 frexpl (x, &exp);
19094 if (exp != i)
19095 {
19096 result |= 4;
19097 break;
19098 }
19099 }
19100 }
19101 /* Test on denormalized numbers. */
19102 {
19103 int i;
19104 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
19105 ;
19106 if (x > 0.0L)
19107 {
19108 int exp;
19109 long double y = frexpl (x, &exp);
19110 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
19111 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
19112 if (exp != LDBL_MIN_EXP - 1)
19113 result |= 8;
19114 }
19115 }
19116 /* Test on infinite numbers. */
19117 x = 1.0L / 0.0L;
19118 {
19119 int exp;
19120 long double y = frexpl (x, &exp);
19121 if (y != x)
19122 result |= 16;
19123 }
19124 return result;
19125}
19126_ACEOF
19127if ac_fn_c_try_run "$LINENO"; then :
19128 gl_cv_func_frexpl_works=yes
19129else
19130 gl_cv_func_frexpl_works=no
19131fi
19132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19133 conftest.$ac_objext conftest.beam conftest.$ac_ext
19134fi
18848e28
GF
19135
19136
5e8754f9
SDJ
19137fi
19138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
19139$as_echo "$gl_cv_func_frexpl_works" >&6; }
18848e28 19140
5e8754f9
SDJ
19141 LIBS="$save_LIBS"
19142 case "$gl_cv_func_frexpl_works" in
19143 *yes) gl_func_frexpl=yes ;;
19144 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
19145 esac
19146 else
19147 gl_func_frexpl=no
19148 fi
19149 if test $gl_func_frexpl = yes; then
18848e28 19150
5e8754f9 19151$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
18848e28 19152
5e8754f9
SDJ
19153 fi
19154 fi
19155 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
19156 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
18848e28 19157
5e8754f9
SDJ
19158 FREXPL_LIBM="$FREXP_LIBM"
19159 else
19160 FREXPL_LIBM=
19161 fi
19162 fi
18848e28 19163
18848e28 19164
6ec2e0f5 19165 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
18848e28 19166
18848e28 19167
18848e28 19168
18848e28
GF
19169
19170
18848e28 19171
18848e28 19172
18848e28 19173
6ec2e0f5 19174 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
18848e28
GF
19175
19176 fi
19177
19178
19179
19180
19181
6ec2e0f5 19182 GNULIB_FREXPL=1
18848e28
GF
19183
19184
19185
19186
19187
6ec2e0f5 19188$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
18848e28
GF
19189
19190
19191
19192
19193
19194
19195
5e8754f9
SDJ
19196 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19197 REPLACE_FSTAT=1
19198 fi
19199
19200
19201 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
19202 REPLACE_FSTAT=1
19203 fi
18848e28 19204
6a29c58e 19205
6a29c58e 19206
6a29c58e 19207
6ec2e0f5 19208
472fa5ee
SM
19209 :
19210
19211
19212
19213
19214
6ec2e0f5
SDJ
19215 if test $ac_cv_func_fchdir = no; then
19216 HAVE_FCHDIR=0
6a29c58e
YQ
19217 fi
19218
6ec2e0f5
SDJ
19219 if test $HAVE_FCHDIR = 0; then
19220 case "$gl_cv_func_open_directory_works" in
19221 *yes) ;;
19222 *)
19223 REPLACE_FSTAT=1
19224 ;;
19225 esac
19226 fi
6a29c58e
YQ
19227
19228
6ec2e0f5 19229 if test $REPLACE_FSTAT = 1; then
6a29c58e 19230
3d99e817
AK
19231
19232
19233
3d99e817
AK
19234
19235
19236
19237
6ec2e0f5 19238 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
3d99e817 19239
5e8754f9 19240 :
6ec2e0f5 19241 fi
3d99e817
AK
19242
19243
19244
19245
19246
6ec2e0f5 19247 GNULIB_FSTAT=1
3d99e817 19248
49e4877c 19249
49e4877c 19250
49e4877c 19251
49e4877c 19252
6ec2e0f5 19253$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
49e4877c 19254
6a29c58e
YQ
19255
19256
88b48903 19257
8690e634 19258
a512b375 19259
88b48903 19260
88b48903 19261
472fa5ee
SM
19262 :
19263
19264
19265
19266
19267
6ec2e0f5
SDJ
19268
19269 if test $ac_cv_func_fstatat = no; then
19270 HAVE_FSTATAT=0
19271 else
19272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
19273$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
d0ac1c44 19274if ${gl_cv_func_fstatat_zero_flag+:} false; then :
6ec2e0f5
SDJ
19275 $as_echo_n "(cached) " >&6
19276else
19277 if test "$cross_compiling" = yes; then :
19278 case "$host_os" in
19279 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
19280 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
19281 esac
88b48903 19282
8690e634
JK
19283else
19284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19285/* end confdefs.h. */
8690e634 19286
6ec2e0f5
SDJ
19287 #include <fcntl.h>
19288 #include <sys/stat.h>
19289 int
19290 main (void)
19291 {
19292 struct stat a;
19293 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
19294 }
19295
88b48903
WN
19296_ACEOF
19297if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19298 gl_cv_func_fstatat_zero_flag=yes
88b48903 19299else
6ec2e0f5 19300 gl_cv_func_fstatat_zero_flag=no
88b48903
WN
19301fi
19302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19303 conftest.$ac_objext conftest.beam conftest.$ac_ext
19304fi
19305
19306
19307fi
6ec2e0f5
SDJ
19308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
19309$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
88b48903 19310
6ec2e0f5
SDJ
19311 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
19312 *yes+*yes) ;;
5e8754f9
SDJ
19313 *) REPLACE_FSTATAT=1
19314 case $gl_cv_func_fstatat_zero_flag in
19315 *yes)
88b48903 19316
6ec2e0f5 19317$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
88b48903 19318
7a6dbc2f 19319 ;;
5e8754f9
SDJ
19320 esac
19321 ;;
6ec2e0f5
SDJ
19322 esac
19323 fi
88b48903 19324
6ec2e0f5 19325 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
88b48903
WN
19326
19327
19328
19329
19330
88b48903 19331
4a626d0a
PA
19332
19333
6ec2e0f5
SDJ
19334 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
19335
19336 fi
19337
19338
19339
4a626d0a 19340
6ec2e0f5
SDJ
19341
19342 GNULIB_FSTATAT=1
19343
19344
19345
19346
19347
19348$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
19349
19350
19351
19352
19353
19354
19355
19356
19357 gl_abort_bug=no
4a626d0a
PA
19358 case "$host_os" in
19359 mingw*)
6ec2e0f5 19360 gl_cv_func_getcwd_path_max=yes
4a626d0a
PA
19361 ;;
19362 *)
88b48903 19363
88b48903 19364
472fa5ee
SM
19365 :
19366
19367
19368
19369
19370
19371
19372
19373 :
19374
19375
19376
88b48903
WN
19377
19378
88b48903 19379
6ec2e0f5
SDJ
19380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
19381$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
d0ac1c44 19382if ${gl_cv_func_getcwd_path_max+:} false; then :
6ec2e0f5
SDJ
19383 $as_echo_n "(cached) " >&6
19384else
19385 # Arrange for deletion of the temporary directory this test creates.
19386 ac_clean_files="$ac_clean_files confdir3"
19387 if test "$cross_compiling" = yes; then :
b567ca63
SM
19388 # Cross-compilation guesses:
19389 case "$host_os" in
19390 aix*) # On AIX, it has the AIX bug.
19391 gl_cv_func_getcwd_path_max='no, it has the AIX bug' ;;
19392 gnu*) # On Hurd, it is 'yes'.
19393 gl_cv_func_getcwd_path_max=yes ;;
19394 linux* | kfreebsd*)
19395 # On older Linux+glibc it's 'no, but it is partly working',
19396 # on newer Linux+glibc it's 'yes'.
19397 # On Linux+musl libc, it's 'no, but it is partly working'.
19398 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
19399 gl_cv_func_getcwd_path_max='no, but it is partly working' ;;
19400 *) # If we don't know, assume the worst.
19401 gl_cv_func_getcwd_path_max=no ;;
5e8754f9 19402 esac
b567ca63 19403
6ec2e0f5
SDJ
19404else
19405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19406/* end confdefs.h. */
88b48903 19407
6ec2e0f5
SDJ
19408#include <errno.h>
19409#include <stdlib.h>
19410#if HAVE_UNISTD_H
19411# include <unistd.h>
19412#else
19413# include <direct.h>
19414#endif
19415#include <string.h>
19416#include <limits.h>
19417#include <sys/stat.h>
19418#include <sys/types.h>
19419#include <fcntl.h>
88b48903
WN
19420
19421
6ec2e0f5
SDJ
19422/* Arrange to define PATH_MAX, like "pathmax.h" does. */
19423#if HAVE_UNISTD_H
19424# include <unistd.h>
19425#endif
19426#include <limits.h>
19427#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19428# include <sys/param.h>
19429#endif
19430#if !defined PATH_MAX && defined MAXPATHLEN
19431# define PATH_MAX MAXPATHLEN
19432#endif
19433#ifdef __hpux
19434# undef PATH_MAX
19435# define PATH_MAX 1024
19436#endif
5e8754f9 19437#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
19438# undef PATH_MAX
19439# define PATH_MAX 260
19440#endif
88b48903 19441
88b48903 19442
6ec2e0f5
SDJ
19443#ifndef AT_FDCWD
19444# define AT_FDCWD 0
19445#endif
19446#ifdef ENAMETOOLONG
19447# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
19448#else
19449# define is_ENAMETOOLONG(x) 0
19450#endif
88b48903 19451
6ec2e0f5
SDJ
19452/* Use the getcwd function, not any macro. */
19453#undef getcwd
88b48903 19454
6ec2e0f5
SDJ
19455/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
19456#undef mkdir
88b48903 19457
6ec2e0f5
SDJ
19458#ifndef S_IRWXU
19459# define S_IRWXU 0700
19460#endif
88b48903 19461
6ec2e0f5
SDJ
19462/* The length of this name must be 8. */
19463#define DIR_NAME "confdir3"
19464#define DIR_NAME_LEN 8
19465#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
88b48903 19466
6ec2e0f5
SDJ
19467/* The length of "../". */
19468#define DOTDOTSLASH_LEN 3
88b48903 19469
6ec2e0f5
SDJ
19470/* Leftover bytes in the buffer, to work around library or OS bugs. */
19471#define BUF_SLOP 20
88b48903 19472
6ec2e0f5
SDJ
19473int
19474main ()
19475{
19476#ifndef PATH_MAX
19477 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
19478 at least not on a local file system. And if we were to start worrying
19479 about remote file systems, we'd have to enable the wrapper function
19480 all of the time, just to be safe. That's not worth the cost. */
19481 exit (0);
19482#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
19483 - DIR_NAME_SIZE - BUF_SLOP) \
19484 <= PATH_MAX)
19485 /* FIXME: Assuming there's a system for which this is true,
19486 this should be done in a compile test. */
19487 exit (0);
19488#else
19489 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
19490 + DIR_NAME_SIZE + BUF_SLOP];
19491 char *cwd = getcwd (buf, PATH_MAX);
19492 size_t initial_cwd_len;
19493 size_t cwd_len;
19494 int fail = 0;
19495 size_t n_chdirs = 0;
88b48903 19496
6ec2e0f5
SDJ
19497 if (cwd == NULL)
19498 exit (10);
88b48903 19499
6ec2e0f5 19500 cwd_len = initial_cwd_len = strlen (cwd);
88b48903 19501
6ec2e0f5
SDJ
19502 while (1)
19503 {
19504 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
19505 char *c = NULL;
19506
19507 cwd_len += DIR_NAME_SIZE;
19508 /* If mkdir or chdir fails, it could be that this system cannot create
19509 any file with an absolute name longer than PATH_MAX, such as cygwin.
19510 If so, leave fail as 0, because the current working directory can't
19511 be too long for getcwd if it can't even be created. For other
19512 errors, be pessimistic and consider that as a failure, too. */
19513 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
19514 {
19515 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19516 fail = 20;
19517 break;
19518 }
88b48903 19519
6ec2e0f5
SDJ
19520 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
19521 {
19522 struct stat sb;
88b48903 19523
6ec2e0f5
SDJ
19524 c = getcwd (buf, PATH_MAX);
19525 if (!c && errno == ENOENT)
19526 {
19527 fail = 11;
19528 break;
19529 }
19530 if (c)
19531 {
19532 fail = 31;
19533 break;
19534 }
19535 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19536 {
19537 fail = 21;
19538 break;
19539 }
88b48903 19540
6ec2e0f5
SDJ
19541 /* Our replacement needs to be able to stat() long ../../paths,
19542 so generate a path larger than PATH_MAX to check,
19543 avoiding the replacement if we can't stat(). */
19544 c = getcwd (buf, cwd_len + 1);
19545 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
19546 {
19547 fail = 32;
19548 break;
19549 }
19550 }
88b48903 19551
6ec2e0f5
SDJ
19552 if (dotdot_max <= cwd_len - initial_cwd_len)
19553 {
19554 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
19555 break;
19556 c = getcwd (buf, cwd_len + 1);
19557 if (!c)
19558 {
19559 if (! (errno == ERANGE || errno == ENOENT
19560 || is_ENAMETOOLONG (errno)))
19561 {
19562 fail = 22;
19563 break;
19564 }
19565 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
19566 {
19567 fail = 12;
19568 break;
19569 }
19570 }
19571 }
88b48903 19572
6ec2e0f5
SDJ
19573 if (c && strlen (c) != cwd_len)
19574 {
19575 fail = 23;
19576 break;
19577 }
19578 ++n_chdirs;
19579 }
88b48903 19580
6ec2e0f5
SDJ
19581 /* Leaving behind such a deep directory is not polite.
19582 So clean up here, right away, even though the driving
19583 shell script would also clean up. */
19584 {
19585 size_t i;
88b48903 19586
6ec2e0f5
SDJ
19587 /* Try rmdir first, in case the chdir failed. */
19588 rmdir (DIR_NAME);
19589 for (i = 0; i <= n_chdirs; i++)
19590 {
19591 if (chdir ("..") < 0)
19592 break;
19593 if (rmdir (DIR_NAME) != 0)
19594 break;
19595 }
19596 }
88b48903 19597
6ec2e0f5
SDJ
19598 exit (fail);
19599#endif
19600}
88b48903 19601
6ec2e0f5
SDJ
19602_ACEOF
19603if ac_fn_c_try_run "$LINENO"; then :
19604 gl_cv_func_getcwd_path_max=yes
19605else
19606 case $? in
5e8754f9
SDJ
19607 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
19608 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
19609 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
19610 *) gl_cv_func_getcwd_path_max=no;;
19611 esac
6ec2e0f5
SDJ
19612fi
19613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19614 conftest.$ac_objext conftest.beam conftest.$ac_ext
19615fi
88b48903 19616
88b48903 19617
6ec2e0f5
SDJ
19618fi
19619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
19620$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
88b48903 19621
6ec2e0f5
SDJ
19622 case "$gl_cv_func_getcwd_null" in
19623 *yes)
88b48903
WN
19624
19625
472fa5ee
SM
19626 :
19627
19628
19629
19630
19631
19632
19633 :
19634
19635
19636
19637
88b48903
WN
19638
19639
5e8754f9
SDJ
19640 for ac_func in getpagesize
19641do :
19642 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
19643if test "x$ac_cv_func_getpagesize" = xyes; then :
19644 cat >>confdefs.h <<_ACEOF
7a6dbc2f
SDJ
19645#define HAVE_GETPAGESIZE 1
19646_ACEOF
19647
5e8754f9
SDJ
19648fi
19649done
6ec2e0f5
SDJ
19650
19651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
19652$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
d0ac1c44 19653if ${gl_cv_func_getcwd_abort_bug+:} false; then :
88b48903
WN
19654 $as_echo_n "(cached) " >&6
19655else
6ec2e0f5
SDJ
19656 # Remove any remnants of a previous test.
19657 rm -rf confdir-14B---
19658 # Arrange for deletion of the temporary directory this test creates.
19659 ac_clean_files="$ac_clean_files confdir-14B---"
19660 if test "$cross_compiling" = yes; then :
19661 gl_cv_func_getcwd_abort_bug=yes
88b48903
WN
19662else
19663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19664/* end confdefs.h. */
6ec2e0f5
SDJ
19665
19666#include <errno.h>
19667#include <stdlib.h>
19668#if HAVE_UNISTD_H
19669# include <unistd.h>
19670#else /* on Windows with MSVC */
19671# include <direct.h>
19672#endif
19673#include <string.h>
19674#include <sys/stat.h>
19675
19676
19677/* Arrange to define PATH_MAX, like "pathmax.h" does. */
19678#if HAVE_UNISTD_H
19679# include <unistd.h>
19680#endif
19681#include <limits.h>
19682#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19683# include <sys/param.h>
19684#endif
19685#if !defined PATH_MAX && defined MAXPATHLEN
19686# define PATH_MAX MAXPATHLEN
19687#endif
19688#ifdef __hpux
19689# undef PATH_MAX
19690# define PATH_MAX 1024
19691#endif
5e8754f9 19692#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
19693# undef PATH_MAX
19694# define PATH_MAX 260
19695#endif
19696
19697
19698/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
19699#undef mkdir
19700
19701#ifndef S_IRWXU
19702# define S_IRWXU 0700
19703#endif
19704
19705/* FIXME: skip the run-test altogether on systems without getpagesize. */
19706#if ! HAVE_GETPAGESIZE
19707# define getpagesize() 0
19708#endif
19709
19710/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
19711 the 16kB pagesize on ia64 linux. Those conditions make the code below
19712 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
19713#define TARGET_LEN (5 * 1024)
88b48903
WN
19714
19715int
19716main ()
19717{
6ec2e0f5
SDJ
19718 char *cwd;
19719 size_t initial_cwd_len;
19720 int fail = 0;
19721
19722 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
19723 this relatively expensive and invasive test if that's not true. */
19724#ifdef PATH_MAX
19725 int bug_possible = PATH_MAX < getpagesize ();
19726#else
19727 int bug_possible = 0;
19728#endif
19729 if (! bug_possible)
19730 return 0;
8690e634 19731
6ec2e0f5
SDJ
19732 cwd = getcwd (NULL, 0);
19733 if (cwd == NULL)
19734 return 2;
19735
19736 initial_cwd_len = strlen (cwd);
19737 free (cwd);
19738
19739 if (1)
19740 {
19741 static char const dir_name[] = "confdir-14B---";
19742 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
19743 / sizeof dir_name);
19744 size_t d;
19745 for (d = 0; d < desired_depth; d++)
19746 {
19747 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
19748 {
19749 if (! (errno == ERANGE || errno == ENAMETOOLONG
19750 || errno == ENOENT))
19751 fail = 3; /* Unable to construct deep hierarchy. */
19752 break;
19753 }
19754 }
19755
19756 /* If libc has the bug in question, this invocation of getcwd
19757 results in a failed assertion. */
19758 cwd = getcwd (NULL, 0);
19759 if (cwd == NULL)
19760 fail = 4; /* getcwd didn't assert, but it failed for a long name
19761 where the answer could have been learned. */
19762 free (cwd);
19763
19764 /* Call rmdir first, in case the above chdir failed. */
19765 rmdir (dir_name);
19766 while (0 < d--)
19767 {
19768 if (chdir ("..") < 0)
19769 {
19770 fail = 5;
19771 break;
19772 }
19773 rmdir (dir_name);
19774 }
19775 }
19776
19777 return fail;
8690e634 19778}
6ec2e0f5 19779
8690e634
JK
19780_ACEOF
19781if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19782 gl_cv_func_getcwd_abort_bug=no
8690e634 19783else
5e8754f9
SDJ
19784 ret=$?
19785 if test $ret -ge 128 || test $ret = 4; then
19786 gl_cv_func_getcwd_abort_bug=yes
19787 else
19788 gl_cv_func_getcwd_abort_bug=no
19789 fi
8690e634
JK
19790fi
19791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19792 conftest.$ac_objext conftest.beam conftest.$ac_ext
19793fi
19794
19795
19796fi
6ec2e0f5
SDJ
19797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
19798$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
19799 if test $gl_cv_func_getcwd_abort_bug = yes; then :
19800 gl_abort_bug=yes
19801fi
19802
19803 ;;
19804 esac
19805 ;;
19806 esac
19807 case "$gl_cv_func_getcwd_path_max" in
19808 "no"|"no, it has the AIX bug") ;;
19809 *)
19810
19811$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
19812
19813 ;;
19814 esac
19815 case "$gl_cv_func_getcwd_path_max" in
19816 "no, but it is partly working")
19817
19818$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
19819
19820 ;;
19821 "yes, but with shorter paths")
19822
19823$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
19824
19825 ;;
19826 esac
19827
19828 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
19829 || test $gl_cv_func_getcwd_posix_signature != yes \
19830 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
19831 || test $gl_abort_bug = yes; then
19832 REPLACE_GETCWD=1
8690e634
JK
19833 fi
19834
6ec2e0f5 19835 if test $REPLACE_GETCWD = 1; then
8690e634
JK
19836
19837
8690e634
JK
19838
19839
19840
19841
19842
19843
6ec2e0f5 19844 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
8690e634
JK
19845
19846
8690e634
JK
19847
19848
6ec2e0f5
SDJ
19849 :
19850
19851 fi
19852
8690e634
JK
19853
19854cat >>confdefs.h <<_ACEOF
6ec2e0f5 19855#define GNULIB_GETCWD 1
8690e634
JK
19856_ACEOF
19857
19858
8690e634 19859
8690e634
JK
19860
19861
c971b7fa 19862
c971b7fa 19863
6ec2e0f5
SDJ
19864 GNULIB_GETCWD=1
19865
19866
19867
19868
19869
19870$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
19871
c971b7fa 19872
c971b7fa 19873
c971b7fa 19874
c971b7fa 19875
c971b7fa 19876
c971b7fa 19877
c971b7fa 19878
6ec2e0f5
SDJ
19879 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
19880 *yes,yes) ;;
19881 *)
19882 REPLACE_GETCWD=1
19883 ;;
19884 esac
c971b7fa 19885
6ec2e0f5 19886 if test $REPLACE_GETCWD = 1; then
c971b7fa 19887
c971b7fa
PA
19888
19889
c971b7fa
PA
19890
19891
c971b7fa 19892
c971b7fa 19893
c971b7fa 19894
6ec2e0f5 19895 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
c971b7fa 19896
6ec2e0f5 19897 fi
c971b7fa 19898
c971b7fa 19899
c971b7fa 19900
c971b7fa 19901
8690e634 19902
6ec2e0f5 19903 GNULIB_GETCWD=1
c971b7fa 19904
88b48903
WN
19905
19906
19907
88b48903 19908
6ec2e0f5 19909$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
88b48903 19910
88b48903
WN
19911
19912
19913
6ec2e0f5
SDJ
19914
19915
19916
472fa5ee
SM
19917 :
19918
19919
19920
19921
19922
19923
19924 :
19925
19926
19927
19928
6ec2e0f5
SDJ
19929
19930 if test $ac_cv_func_getdtablesize = yes &&
19931 test $ac_cv_have_decl_getdtablesize = yes; then
5e8754f9
SDJ
19932 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
19933 # up to an unchangeable hard limit; all other platforms correctly
19934 # require setrlimit before getdtablesize() can report a larger value.
6ec2e0f5
SDJ
19935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
19936$as_echo_n "checking whether getdtablesize works... " >&6; }
d0ac1c44 19937if ${gl_cv_func_getdtablesize_works+:} false; then :
88b48903
WN
19938 $as_echo_n "(cached) " >&6
19939else
5e8754f9 19940 if test "$cross_compiling" = yes; then :
88b48903 19941 case "$host_os" in
5e8754f9
SDJ
19942 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
19943 gl_cv_func_getdtablesize_works="guessing no" ;;
19944 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
19945 esac
88b48903
WN
19946else
19947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19948/* end confdefs.h. */
19949
5e8754f9 19950 #include <unistd.h>
6ec2e0f5
SDJ
19951int
19952main ()
88b48903 19953{
6ec2e0f5 19954int size = getdtablesize();
5e8754f9
SDJ
19955 if (dup2 (0, getdtablesize()) != -1)
19956 return 1;
19957 if (size != getdtablesize())
19958 return 2;
6ec2e0f5
SDJ
19959
19960 ;
19961 return 0;
88b48903
WN
19962}
19963_ACEOF
19964if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19965 gl_cv_func_getdtablesize_works=yes
88b48903 19966else
6ec2e0f5 19967 gl_cv_func_getdtablesize_works=no
88b48903
WN
19968fi
19969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19970 conftest.$ac_objext conftest.beam conftest.$ac_ext
19971fi
19972
19973
19974fi
6ec2e0f5
SDJ
19975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
19976$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
19977 case "$gl_cv_func_getdtablesize_works" in
5e8754f9 19978 *yes) ;;
6ec2e0f5 19979 *) REPLACE_GETDTABLESIZE=1 ;;
88b48903
WN
19980 esac
19981 else
6ec2e0f5 19982 HAVE_GETDTABLESIZE=0
88b48903
WN
19983 fi
19984
6ec2e0f5 19985 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
88b48903
WN
19986
19987
19988
19989
19990
19991
19992
19993
6ec2e0f5 19994 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
88b48903 19995
6ec2e0f5 19996 :
88b48903
WN
19997 fi
19998
19999
20000
20001
20002
6ec2e0f5 20003 GNULIB_GETDTABLESIZE=1
88b48903
WN
20004
20005
20006
88b48903 20007
88b48903 20008
6ec2e0f5 20009$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
88b48903 20010
88b48903 20011
88b48903 20012
88b48903 20013
88b48903 20014
88b48903 20015
88b48903 20016
88b48903
WN
20017
20018
472fa5ee
SM
20019 :
20020
20021
20022
20023
20024
6ec2e0f5
SDJ
20025 if test $ac_cv_have_decl_getlogin_r = no; then
20026 HAVE_DECL_GETLOGIN_R=0
20027 fi
88b48903 20028
88b48903 20029
472fa5ee
SM
20030 :
20031
20032
20033
20034
20035
6ec2e0f5
SDJ
20036 if test $ac_cv_func_getlogin_r = no; then
20037 HAVE_GETLOGIN_R=0
20038 else
20039 HAVE_GETLOGIN_R=1
20040
20041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
20042$as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
d0ac1c44 20043if ${gl_cv_func_getlogin_r_works+:} false; then :
6ec2e0f5
SDJ
20044 $as_echo_n "(cached) " >&6
20045else
88b48903 20046
6ec2e0f5 20047 case "$host_os" in
5e8754f9
SDJ
20048 # Guess no on OSF/1.
20049 osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
20050 # Guess yes otherwise.
20051 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
6ec2e0f5
SDJ
20052 esac
20053 if test "$cross_compiling" = yes; then :
20054 :
88b48903
WN
20055else
20056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20057/* end confdefs.h. */
20058
6ec2e0f5
SDJ
20059#include <stddef.h>
20060#include <unistd.h>
20061#if !HAVE_DECL_GETLOGIN_R
88b48903 20062extern
6ec2e0f5 20063# ifdef __cplusplus
88b48903 20064"C"
6ec2e0f5
SDJ
20065# endif
20066int getlogin_r (char *, size_t);
88b48903 20067#endif
6ec2e0f5
SDJ
20068int
20069main (void)
88b48903
WN
20070{
20071 int result = 0;
6ec2e0f5
SDJ
20072 char buf[100];
20073
20074 if (getlogin_r (buf, 0) == 0)
5e8754f9 20075 result |= 16;
6ec2e0f5 20076 if (getlogin_r (buf, 1) == 0)
5e8754f9 20077 result |= 17;
88b48903
WN
20078 return result;
20079}
20080_ACEOF
20081if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 20082 gl_cv_func_getlogin_r_works=yes
88b48903 20083else
5e8754f9
SDJ
20084 case $? in
20085 16 | 17) gl_cv_func_getlogin_r_works=no ;;
20086 esac
20087
88b48903
WN
20088fi
20089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20090 conftest.$ac_objext conftest.beam conftest.$ac_ext
20091fi
20092
20093
4a626d0a 20094fi
6ec2e0f5
SDJ
20095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
20096$as_echo "$gl_cv_func_getlogin_r_works" >&6; }
20097 case "$gl_cv_func_getlogin_r_works" in
20098 *yes) ;;
20099 *) REPLACE_GETLOGIN_R=1 ;;
20100 esac
20101 fi
20102
20103 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
20104
20105
20106
20107
20108
20109
20110
20111
20112 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
4a626d0a 20113
4a626d0a 20114
4a626d0a 20115
472fa5ee
SM
20116 :
20117
20118
20119
20120
20121
4a626d0a 20122
4a626d0a
PA
20123 fi
20124
20125
4a626d0a
PA
20126
20127
20128
6ec2e0f5 20129 GNULIB_GETLOGIN_R=1
4a626d0a
PA
20130
20131
20132
20133
20134
6ec2e0f5 20135$as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
4a626d0a 20136
4a626d0a
PA
20137
20138
20139
20140
472fa5ee
SM
20141 :
20142
20143
20144
20145
20146
20147
20148
20149
4a626d0a 20150
6ec2e0f5
SDJ
20151 ac_found=0
20152 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
20153"
d0ac1c44 20154if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
6ec2e0f5
SDJ
20155 ac_have_decl=1
20156else
20157 ac_have_decl=0
20158fi
20159
20160cat >>confdefs.h <<_ACEOF
20161#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
20162_ACEOF
20163if test $ac_have_decl = 1; then :
20164 ac_found=1
20165fi
20166
20167 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
20168"
d0ac1c44 20169if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
6ec2e0f5
SDJ
20170 ac_have_decl=1
20171else
20172 ac_have_decl=0
20173fi
20174
20175cat >>confdefs.h <<_ACEOF
20176#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
20177_ACEOF
20178if test $ac_have_decl = 1; then :
20179 ac_found=1
20180fi
4a626d0a 20181
6ec2e0f5
SDJ
20182 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
20183"
d0ac1c44 20184if test "x$ac_cv_have_decl___argv" = xyes; then :
6ec2e0f5
SDJ
20185 ac_have_decl=1
20186else
20187 ac_have_decl=0
20188fi
4a626d0a 20189
6ec2e0f5
SDJ
20190cat >>confdefs.h <<_ACEOF
20191#define HAVE_DECL___ARGV $ac_have_decl
20192_ACEOF
20193if test $ac_have_decl = 1; then :
20194 ac_found=1
20195fi
4a626d0a
PA
20196
20197
6ec2e0f5
SDJ
20198 # Incur the cost of this test only if none of the above worked.
20199 if test $ac_found = 0; then
20200 # On OpenBSD 5.1, using the global __progname variable appears to be
20201 # the only way to implement getprogname.
20202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
20203$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
d0ac1c44 20204if ${gl_cv_var___progname+:} false; then :
6ec2e0f5
SDJ
20205 $as_echo_n "(cached) " >&6
20206else
4a626d0a 20207
6ec2e0f5
SDJ
20208 gl_cv_var___progname=
20209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20210/* end confdefs.h. */
20211extern char *__progname;
20212int
20213main ()
20214{
20215return *__progname;
20216
20217 ;
20218 return 0;
20219}
20220_ACEOF
20221if ac_fn_c_try_link "$LINENO"; then :
20222 gl_cv_var___progname=yes
20223
20224fi
20225rm -f core conftest.err conftest.$ac_objext \
20226 conftest$ac_exeext conftest.$ac_ext
20227
20228
20229fi
20230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
20231$as_echo "$gl_cv_var___progname" >&6; }
20232 if test "$gl_cv_var___progname" = yes; then
20233
20234$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
20235
20236 fi
20237 fi
4a626d0a
PA
20238
20239
20240
20241
20242
20243
20244
20245
472fa5ee
SM
20246 :
20247
20248
20249
20250
20251
4a626d0a
PA
20252
20253 gl_gettimeofday_timezone=void
20254 if test $ac_cv_func_gettimeofday != yes; then
20255 HAVE_GETTIMEOFDAY=0
20256 else
20257
20258
20259
20260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
20261$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
d0ac1c44 20262if ${gl_cv_func_gettimeofday_clobber+:} false; then :
4a626d0a
PA
20263 $as_echo_n "(cached) " >&6
20264else
20265 if test "$cross_compiling" = yes; then :
20266 # When cross-compiling:
20267 case "$host_os" in
5e8754f9
SDJ
20268 # Guess all is fine on glibc systems.
20269 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
20270 # If we don't know, assume the worst.
20271 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
4a626d0a
PA
20272 esac
20273
20274else
20275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20276/* end confdefs.h. */
20277#include <string.h>
20278 #include <sys/time.h>
20279 #include <time.h>
20280 #include <stdlib.h>
20281
20282int
20283main ()
20284{
20285
20286 time_t t = 0;
20287 struct tm *lt;
20288 struct tm saved_lt;
20289 struct timeval tv;
20290 lt = localtime (&t);
20291 saved_lt = *lt;
20292 gettimeofday (&tv, NULL);
20293 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
20294
20295 ;
20296 return 0;
20297}
20298_ACEOF
20299if ac_fn_c_try_run "$LINENO"; then :
20300 gl_cv_func_gettimeofday_clobber=no
20301else
20302 gl_cv_func_gettimeofday_clobber=yes
20303fi
20304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20305 conftest.$ac_objext conftest.beam conftest.$ac_ext
20306fi
20307
20308fi
20309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
20310$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
20311
20312 case "$gl_cv_func_gettimeofday_clobber" in
20313 *yes)
20314 REPLACE_GETTIMEOFDAY=1
20315
7a6dbc2f
SDJ
20316 REPLACE_GMTIME=1
20317 REPLACE_LOCALTIME=1
4a626d0a 20318
5e8754f9
SDJ
20319
20320$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
20321
4a626d0a
PA
20322 ;;
20323 esac
20324
20325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
20326$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
d0ac1c44 20327if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
4a626d0a
PA
20328 $as_echo_n "(cached) " >&6
20329else
20330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20331/* end confdefs.h. */
20332#include <sys/time.h>
20333 struct timeval c;
20334 int gettimeofday (struct timeval *restrict, void *restrict);
20335
20336int
20337main ()
20338{
20339/* glibc uses struct timezone * rather than the POSIX void *
20340 if _GNU_SOURCE is defined. However, since the only portable
20341 use of gettimeofday uses NULL as the second parameter, and
20342 since the glibc definition is actually more typesafe, it is
20343 not worth wrapping this to get a compliant signature. */
20344 int (*f) (struct timeval *restrict, void *restrict)
20345 = gettimeofday;
20346 int x = f (&c, 0);
20347 return !(x | c.tv_sec | c.tv_usec);
20348
20349 ;
20350 return 0;
20351}
20352_ACEOF
20353if ac_fn_c_try_compile "$LINENO"; then :
20354 gl_cv_func_gettimeofday_posix_signature=yes
20355else
20356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20357/* end confdefs.h. */
20358#include <sys/time.h>
20359int gettimeofday (struct timeval *restrict, struct timezone *restrict);
20360
20361int
20362main ()
20363{
20364
20365 ;
20366 return 0;
20367}
20368_ACEOF
20369if ac_fn_c_try_compile "$LINENO"; then :
20370 gl_cv_func_gettimeofday_posix_signature=almost
20371else
20372 gl_cv_func_gettimeofday_posix_signature=no
20373fi
20374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20375fi
20376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20377fi
20378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
20379$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
20380 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
20381 gl_gettimeofday_timezone='struct timezone'
20382 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
20383 REPLACE_GETTIMEOFDAY=1
20384 fi
20385 if test $REPLACE_STRUCT_TIMEVAL = 1; then
20386 REPLACE_GETTIMEOFDAY=1
20387 fi
5e8754f9 20388
4a626d0a
PA
20389 fi
20390
20391cat >>confdefs.h <<_ACEOF
20392#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
20393_ACEOF
20394
88b48903 20395
4a626d0a 20396 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
88b48903 20397
88b48903 20398
88b48903 20399
88b48903
WN
20400
20401
88b48903
WN
20402
20403
20404
6ec2e0f5
SDJ
20405 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
20406
6ec2e0f5 20407
5e8754f9
SDJ
20408 for ac_header in sys/timeb.h
20409do :
20410 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
20411if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
20412 cat >>confdefs.h <<_ACEOF
20413#define HAVE_SYS_TIMEB_H 1
20414_ACEOF
6ec2e0f5 20415
5e8754f9 20416fi
6ec2e0f5 20417
5e8754f9 20418done
6ec2e0f5 20419
5e8754f9
SDJ
20420 for ac_func in _ftime
20421do :
20422 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
20423if test "x$ac_cv_func__ftime" = xyes; then :
20424 cat >>confdefs.h <<_ACEOF
20425#define HAVE__FTIME 1
20426_ACEOF
6ec2e0f5 20427
5e8754f9
SDJ
20428fi
20429done
6ec2e0f5
SDJ
20430
20431
5e8754f9 20432 fi
6ec2e0f5
SDJ
20433
20434
20435
6ec2e0f5
SDJ
20436
20437
5e8754f9 20438 GNULIB_GETTIMEOFDAY=1
6ec2e0f5
SDJ
20439
20440
20441
7a6dbc2f
SDJ
20442
20443
5e8754f9 20444$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
6ec2e0f5
SDJ
20445
20446
20447
5e8754f9
SDJ
20448 GLOB_H=
20449 for ac_header in glob.h
20450do :
20451 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
20452if test "x$ac_cv_header_glob_h" = xyes; then :
20453 cat >>confdefs.h <<_ACEOF
20454#define HAVE_GLOB_H 1
20455_ACEOF
6ec2e0f5 20456
5e8754f9
SDJ
20457else
20458 GLOB_H=glob.h
20459fi
6ec2e0f5 20460
5e8754f9 20461done
6ec2e0f5
SDJ
20462
20463
5e8754f9
SDJ
20464 if test -z "$GLOB_H"; then
20465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5
20466$as_echo_n "checking for GNU glob interface version 1... " >&6; }
20467if ${gl_cv_gnu_glob_interface_version_1+:} false; then :
6ec2e0f5
SDJ
20468 $as_echo_n "(cached) " >&6
20469else
20470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20471/* end confdefs.h. */
20472#include <gnu-versions.h>
5e8754f9 20473char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
6ec2e0f5
SDJ
20474_ACEOF
20475if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 20476 gl_cv_gnu_glob_interface_version_1=yes
6ec2e0f5 20477else
5e8754f9 20478 gl_cv_gnu_glob_interface_version_1=no
6ec2e0f5
SDJ
20479fi
20480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20481fi
5e8754f9
SDJ
20482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5
20483$as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; }
20484
20485 if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
20486 GLOB_H=glob.h
6ec2e0f5 20487 fi
5e8754f9 20488 fi
6ec2e0f5 20489
5e8754f9
SDJ
20490 if test -z "$GLOB_H"; then
20491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
6ec2e0f5 20492$as_echo_n "checking whether glob lists broken symlinks... " >&6; }
d0ac1c44 20493if ${gl_cv_glob_lists_symlinks+:} false; then :
6ec2e0f5
SDJ
20494 $as_echo_n "(cached) " >&6
20495else
5e8754f9
SDJ
20496 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
20497 gl_cv_glob_lists_symlinks=maybe
20498 else
20499 # If we can't make a symlink, then we cannot test this issue. Be
20500 # pessimistic about this.
20501 gl_cv_glob_lists_symlinks=no
20502 fi
20503
20504 if test $gl_cv_glob_lists_symlinks = maybe; then
20505 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
20506 gl_cv_glob_lists_symlinks=no
20507else
20508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20509/* end confdefs.h. */
5e8754f9 20510
6ec2e0f5 20511#include <stddef.h>
5e8754f9 20512#include <glob.h>
6ec2e0f5
SDJ
20513int
20514main ()
20515{
20516glob_t found;
5e8754f9 20517if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
6ec2e0f5
SDJ
20518 ;
20519 return 0;
20520}
4a626d0a 20521_ACEOF
6ec2e0f5
SDJ
20522if ac_fn_c_try_run "$LINENO"; then :
20523 gl_cv_glob_lists_symlinks=yes
20524else
20525 gl_cv_glob_lists_symlinks=no
20526fi
20527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20528 conftest.$ac_objext conftest.beam conftest.$ac_ext
20529fi
88b48903 20530
5e8754f9 20531 fi
4a626d0a 20532fi
6ec2e0f5
SDJ
20533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
20534$as_echo "$gl_cv_glob_lists_symlinks" >&6; }
88b48903 20535
5e8754f9
SDJ
20536 if test $gl_cv_glob_lists_symlinks = no; then
20537 GLOB_H=glob.h
6ec2e0f5
SDJ
20538 fi
20539 fi
4a626d0a 20540
5e8754f9 20541 rm -f conf$$-globtest
4a626d0a 20542
88b48903 20543
6ec2e0f5
SDJ
20544 if test -n "$GLOB_H"; then
20545 GL_GENERATE_GLOB_H_TRUE=
20546 GL_GENERATE_GLOB_H_FALSE='#'
20547else
20548 GL_GENERATE_GLOB_H_TRUE='#'
20549 GL_GENERATE_GLOB_H_FALSE=
20550fi
88b48903 20551
88b48903 20552
5e8754f9 20553 if test -n "$GLOB_H"; then
472fa5ee
SM
20554
20555
20556
20557
20558
20559
20560
20561
20562 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
20563
20564
20565
7a6dbc2f
SDJ
20566 :
20567
20568
20569
472fa5ee 20570
472fa5ee 20571
88b48903 20572
88b48903 20573
5e8754f9
SDJ
20574 if test $ac_cv_header_sys_cdefs_h = yes; then
20575 HAVE_SYS_CDEFS_H=1
20576 else
20577 HAVE_SYS_CDEFS_H=0
7a6dbc2f 20578 fi
88b48903
WN
20579
20580
725e2999
JB
20581 :
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593 fi
20594
20595 :
20596
20597
20598
20599
20600
20601
20602
20603
20604 HAVE_INET_NTOP=1
20605 INET_NTOP_LIB=
20606
20607
20608
20609
20610 :
20611
20612
20613
20614
20615
20616 if test $ac_cv_header_sys_socket_h != yes; then
20617 for ac_header in winsock2.h
20618do :
20619 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20620if test "x$ac_cv_header_winsock2_h" = xyes; then :
20621 cat >>confdefs.h <<_ACEOF
20622#define HAVE_WINSOCK2_H 1
20623_ACEOF
20624
20625fi
20626
20627done
20628
20629 fi
20630 if test "$ac_cv_header_winsock2_h" = yes; then
20631 HAVE_WINSOCK2_H=1
20632 UNISTD_H_HAVE_WINSOCK2_H=1
20633 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20634 else
20635 HAVE_WINSOCK2_H=0
20636 fi
20637
20638
20639 if test $HAVE_WINSOCK2_H = 1; then
20640 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
20641"
20642if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20643 ac_have_decl=1
20644else
20645 ac_have_decl=0
20646fi
20647
20648cat >>confdefs.h <<_ACEOF
20649#define HAVE_DECL_INET_NTOP $ac_have_decl
20650_ACEOF
20651
20652 if test $ac_cv_have_decl_inet_ntop = yes; then
20653 REPLACE_INET_NTOP=1
20654 INET_NTOP_LIB="-lws2_32"
20655 else
20656 HAVE_DECL_INET_NTOP=0
20657 HAVE_INET_NTOP=0
20658 fi
20659 else
20660 gl_save_LIBS=$LIBS
20661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
20662$as_echo_n "checking for library containing inet_ntop... " >&6; }
20663if ${ac_cv_search_inet_ntop+:} false; then :
20664 $as_echo_n "(cached) " >&6
20665else
20666 ac_func_search_save_LIBS=$LIBS
20667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20668/* end confdefs.h. */
20669
20670/* Override any GCC internal prototype to avoid an error.
20671 Use char because int might match the return type of a GCC
20672 builtin and then its argument prototype would still apply. */
20673#ifdef __cplusplus
20674extern "C"
20675#endif
20676char inet_ntop ();
20677int
20678main ()
20679{
20680return inet_ntop ();
20681 ;
20682 return 0;
20683}
20684_ACEOF
20685for ac_lib in '' nsl resolv; do
20686 if test -z "$ac_lib"; then
20687 ac_res="none required"
20688 else
20689 ac_res=-l$ac_lib
20690 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20691 fi
20692 if ac_fn_c_try_link "$LINENO"; then :
20693 ac_cv_search_inet_ntop=$ac_res
20694fi
20695rm -f core conftest.err conftest.$ac_objext \
20696 conftest$ac_exeext
20697 if ${ac_cv_search_inet_ntop+:} false; then :
20698 break
20699fi
20700done
20701if ${ac_cv_search_inet_ntop+:} false; then :
20702
20703else
20704 ac_cv_search_inet_ntop=no
20705fi
20706rm conftest.$ac_ext
20707LIBS=$ac_func_search_save_LIBS
20708fi
20709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
20710$as_echo "$ac_cv_search_inet_ntop" >&6; }
20711ac_res=$ac_cv_search_inet_ntop
20712if test "$ac_res" != no; then :
20713 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20714
20715else
20716 for ac_func in inet_ntop
20717do :
20718 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
20719if test "x$ac_cv_func_inet_ntop" = xyes; then :
20720 cat >>confdefs.h <<_ACEOF
20721#define HAVE_INET_NTOP 1
20722_ACEOF
20723
20724fi
20725done
20726
20727 if test $ac_cv_func_inet_ntop = no; then
20728 HAVE_INET_NTOP=0
20729 fi
20730
20731fi
20732
20733 LIBS=$gl_save_LIBS
20734
20735 if test "$ac_cv_search_inet_ntop" != "no" \
20736 && test "$ac_cv_search_inet_ntop" != "none required"; then
20737 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
20738 fi
20739
20740
20741 :
20742
20743
20744
20745
20746
20747 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
20748 #if HAVE_NETDB_H
20749 # include <netdb.h>
20750 #endif
20751
20752"
20753if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20754 ac_have_decl=1
20755else
20756 ac_have_decl=0
20757fi
20758
20759cat >>confdefs.h <<_ACEOF
20760#define HAVE_DECL_INET_NTOP $ac_have_decl
20761_ACEOF
20762
20763 if test $ac_cv_have_decl_inet_ntop = no; then
20764 HAVE_DECL_INET_NTOP=0
20765 fi
20766 fi
20767
20768
20769 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
20770
20771
20772
20773
20774
20775
20776
7a6dbc2f 20777
725e2999 20778 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
7a6dbc2f
SDJ
20779
20780
20781
7a6dbc2f 20782
725e2999 20783 fi
7a6dbc2f
SDJ
20784
20785
20786
20787
7a6dbc2f 20788
725e2999
JB
20789 GNULIB_INET_NTOP=1
20790
7a6dbc2f
SDJ
20791
20792
49e4877c
PA
20793
20794
88b48903
WN
20795
20796
20797
20798
20799 PRIPTR_PREFIX=
20800 if test -n "$STDINT_H"; then
20801 PRIPTR_PREFIX='"l"'
20802 else
20803 for glpfx in '' l ll I64; do
20804 case $glpfx in
20805 '') gltype1='int';;
20806 l) gltype1='long int';;
20807 ll) gltype1='long long int';;
20808 I64) gltype1='__int64';;
20809 esac
20810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20811/* end confdefs.h. */
20812#include <stdint.h>
20813 extern intptr_t foo;
20814 extern $gltype1 foo;
20815int
20816main ()
20817{
20818
20819 ;
20820 return 0;
20821}
20822_ACEOF
20823if ac_fn_c_try_compile "$LINENO"; then :
20824 PRIPTR_PREFIX='"'$glpfx'"'
20825fi
20826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20827 test -n "$PRIPTR_PREFIX" && break
20828 done
20829 fi
20830
20831
20832
20833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
20834$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
d0ac1c44 20835if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
88b48903
WN
20836 $as_echo_n "(cached) " >&6
20837else
20838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20839/* end confdefs.h. */
20840/* Work also in C++ mode. */
20841 #define __STDC_LIMIT_MACROS 1
20842
20843 /* Work if build is not clean. */
20844 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20845
20846 #include <limits.h>
20847 #if HAVE_STDINT_H
20848 #include <stdint.h>
20849 #endif
20850
20851 #if defined INT32_MAX && defined INTMAX_MAX
20852 #define CONDITION (INT32_MAX < INTMAX_MAX)
20853 #elif HAVE_LONG_LONG_INT
20854 #define CONDITION (sizeof (int) < sizeof (long long int))
20855 #else
20856 #define CONDITION 0
20857 #endif
20858 int test[CONDITION ? 1 : -1];
20859int
20860main ()
20861{
20862
20863 ;
20864 return 0;
20865}
20866_ACEOF
20867if ac_fn_c_try_compile "$LINENO"; then :
20868 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
20869else
20870 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
20871fi
20872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20873fi
20874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
20875$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
20876 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
20877 INT32_MAX_LT_INTMAX_MAX=1;
20878 else
20879 INT32_MAX_LT_INTMAX_MAX=0;
20880 fi
20881
20882
20883 if test $APPLE_UNIVERSAL_BUILD = 0; then
20884
20885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
20886$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
d0ac1c44 20887if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
88b48903
WN
20888 $as_echo_n "(cached) " >&6
20889else
20890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20891/* end confdefs.h. */
20892/* Work also in C++ mode. */
20893 #define __STDC_LIMIT_MACROS 1
20894
20895 /* Work if build is not clean. */
20896 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20897
20898 #include <limits.h>
20899 #if HAVE_STDINT_H
20900 #include <stdint.h>
20901 #endif
20902
20903 #if defined INT64_MAX
20904 #define CONDITION (INT64_MAX == LONG_MAX)
20905 #elif HAVE_LONG_LONG_INT
20906 #define CONDITION (sizeof (long long int) == sizeof (long int))
20907 #else
20908 #define CONDITION 0
20909 #endif
20910 int test[CONDITION ? 1 : -1];
20911int
20912main ()
20913{
20914
20915 ;
20916 return 0;
20917}
20918_ACEOF
20919if ac_fn_c_try_compile "$LINENO"; then :
20920 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
20921else
20922 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
20923fi
20924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20925fi
20926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
20927$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
20928 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
20929 INT64_MAX_EQ_LONG_MAX=1;
20930 else
20931 INT64_MAX_EQ_LONG_MAX=0;
20932 fi
20933
20934
20935 else
20936 INT64_MAX_EQ_LONG_MAX=-1
20937 fi
20938
20939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
20940$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
d0ac1c44 20941if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
88b48903
WN
20942 $as_echo_n "(cached) " >&6
20943else
20944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20945/* end confdefs.h. */
20946/* Work also in C++ mode. */
20947 #define __STDC_LIMIT_MACROS 1
20948
20949 /* Work if build is not clean. */
20950 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20951
20952 #include <limits.h>
20953 #if HAVE_STDINT_H
20954 #include <stdint.h>
20955 #endif
20956
20957 #if defined UINT32_MAX && defined UINTMAX_MAX
20958 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
20959 #elif HAVE_LONG_LONG_INT
20960 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
20961 #else
20962 #define CONDITION 0
20963 #endif
20964 int test[CONDITION ? 1 : -1];
20965int
20966main ()
20967{
20968
20969 ;
20970 return 0;
20971}
20972_ACEOF
20973if ac_fn_c_try_compile "$LINENO"; then :
20974 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
20975else
20976 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
20977fi
20978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20979fi
20980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
20981$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
20982 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
20983 UINT32_MAX_LT_UINTMAX_MAX=1;
20984 else
20985 UINT32_MAX_LT_UINTMAX_MAX=0;
20986 fi
20987
20988
20989 if test $APPLE_UNIVERSAL_BUILD = 0; then
20990
20991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
20992$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
d0ac1c44 20993if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
88b48903
WN
20994 $as_echo_n "(cached) " >&6
20995else
20996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20997/* end confdefs.h. */
20998/* Work also in C++ mode. */
20999 #define __STDC_LIMIT_MACROS 1
21000
21001 /* Work if build is not clean. */
21002 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21003
21004 #include <limits.h>
21005 #if HAVE_STDINT_H
21006 #include <stdint.h>
21007 #endif
21008
21009 #if defined UINT64_MAX
21010 #define CONDITION (UINT64_MAX == ULONG_MAX)
21011 #elif HAVE_LONG_LONG_INT
21012 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
21013 #else
21014 #define CONDITION 0
21015 #endif
21016 int test[CONDITION ? 1 : -1];
21017int
21018main ()
21019{
21020
21021 ;
21022 return 0;
21023}
21024_ACEOF
21025if ac_fn_c_try_compile "$LINENO"; then :
21026 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
21027else
21028 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
21029fi
21030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21031fi
21032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
21033$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
21034 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
21035 UINT64_MAX_EQ_ULONG_MAX=1;
21036 else
21037 UINT64_MAX_EQ_ULONG_MAX=0;
21038 fi
21039
21040
21041 else
21042 UINT64_MAX_EQ_ULONG_MAX=-1
21043 fi
21044
21045
21046
21047
21048
21049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
21050$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
d0ac1c44 21051if ${gl_cv_func_isnand_no_libm+:} false; then :
88b48903
WN
21052 $as_echo_n "(cached) " >&6
21053else
21054
21055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21056/* end confdefs.h. */
21057#include <math.h>
21058 #if __GNUC__ >= 4
21059 # undef isnand
21060 # define isnand(x) __builtin_isnan ((double)(x))
21061 #else
21062 # undef isnand
21063 # define isnand(x) isnan ((double)(x))
21064 #endif
21065 double x;
21066int
21067main ()
21068{
21069return isnand (x);
21070 ;
21071 return 0;
21072}
21073_ACEOF
21074if ac_fn_c_try_link "$LINENO"; then :
21075 gl_cv_func_isnand_no_libm=yes
21076else
21077 gl_cv_func_isnand_no_libm=no
21078fi
21079rm -f core conftest.err conftest.$ac_objext \
21080 conftest$ac_exeext conftest.$ac_ext
21081
21082fi
21083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
21084$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
21085
21086 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
21087 if test $gl_cv_func_isnand_no_libm = yes; then
21088
21089$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
21090
21091 fi
21092
21093 if test $gl_func_isnand_no_libm != yes; then
21094
21095
21096
21097
21098
21099
21100
21101
21102 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
21103
21104
21105
21106
21107 fi
21108
21109
21110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
21111$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
d0ac1c44 21112if ${gl_cv_func_isnanl_no_libm+:} false; then :
88b48903
WN
21113 $as_echo_n "(cached) " >&6
21114else
21115
21116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21117/* end confdefs.h. */
21118#include <math.h>
21119 #if __GNUC__ >= 4
21120 # undef isnanl
21121 # define isnanl(x) __builtin_isnanl ((long double)(x))
21122 #elif defined isnan
21123 # undef isnanl
21124 # define isnanl(x) isnan ((long double)(x))
21125 #endif
21126 long double x;
21127int
21128main ()
21129{
21130return isnanl (x);
21131 ;
21132 return 0;
21133}
21134_ACEOF
21135if ac_fn_c_try_link "$LINENO"; then :
21136 gl_cv_func_isnanl_no_libm=yes
21137else
21138 gl_cv_func_isnanl_no_libm=no
21139fi
21140rm -f core conftest.err conftest.$ac_objext \
21141 conftest$ac_exeext conftest.$ac_ext
21142
21143fi
21144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
21145$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
21146
21147 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
21148 if test $gl_func_isnanl_no_libm = yes; then
21149
21150
21151
21152
21153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
21154$as_echo_n "checking whether isnanl works... " >&6; }
d0ac1c44 21155if ${gl_cv_func_isnanl_works+:} false; then :
88b48903
WN
21156 $as_echo_n "(cached) " >&6
21157else
21158
21159 if test "$cross_compiling" = yes; then :
4a626d0a 21160 gl_cv_func_isnanl_works="guessing yes"
88b48903
WN
21161else
21162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21163/* end confdefs.h. */
21164
21165#include <float.h>
21166#include <limits.h>
21167#include <math.h>
21168#if __GNUC__ >= 4
21169# undef isnanl
21170# define isnanl(x) __builtin_isnanl ((long double)(x))
21171#elif defined isnan
21172# undef isnanl
21173# define isnanl(x) isnan ((long double)(x))
21174#endif
21175#define NWORDS \
21176 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21177typedef union { unsigned int word[NWORDS]; long double value; }
21178 memory_long_double;
21179/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
21180 runtime type conversion. */
21181#ifdef __sgi
21182static long double NaNl ()
21183{
21184 double zero = 0.0;
21185 return zero / zero;
21186}
21187#else
21188# define NaNl() (0.0L / 0.0L)
21189#endif
21190int main ()
21191{
21192 int result = 0;
21193
21194 if (!isnanl (NaNl ()))
21195 result |= 1;
21196
21197 {
21198 memory_long_double m;
21199 unsigned int i;
21200
21201 /* The isnanl function should be immune against changes in the sign bit and
21202 in the mantissa bits. The xor operation twiddles a bit that can only be
21203 a sign bit or a mantissa bit (since the exponent never extends to
21204 bit 31). */
21205 m.value = NaNl ();
21206 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
21207 for (i = 0; i < NWORDS; i++)
21208 m.word[i] |= 1;
21209 if (!isnanl (m.value))
21210 result |= 1;
21211 }
21212
21213#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
21214/* Representation of an 80-bit 'long double' as an initializer for a sequence
21215 of 'unsigned int' words. */
21216# ifdef WORDS_BIGENDIAN
21217# define LDBL80_WORDS(exponent,manthi,mantlo) \
21218 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
4a626d0a 21219 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
88b48903
WN
21220 (unsigned int) (mantlo) << 16 \
21221 }
21222# else
21223# define LDBL80_WORDS(exponent,manthi,mantlo) \
21224 { mantlo, manthi, exponent }
21225# endif
21226 { /* Quiet NaN. */
21227 static memory_long_double x =
21228 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
21229 if (!isnanl (x.value))
21230 result |= 2;
21231 }
21232 {
21233 /* Signalling NaN. */
21234 static memory_long_double x =
21235 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
21236 if (!isnanl (x.value))
21237 result |= 2;
21238 }
4a626d0a 21239 /* isnanl should return something even for noncanonical values. */
88b48903
WN
21240 { /* Pseudo-NaN. */
21241 static memory_long_double x =
21242 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
4a626d0a 21243 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
21244 result |= 4;
21245 }
21246 { /* Pseudo-Infinity. */
21247 static memory_long_double x =
21248 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
4a626d0a 21249 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
21250 result |= 8;
21251 }
21252 { /* Pseudo-Zero. */
21253 static memory_long_double x =
21254 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
4a626d0a 21255 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
21256 result |= 16;
21257 }
21258 { /* Unnormalized number. */
21259 static memory_long_double x =
21260 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
4a626d0a 21261 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
21262 result |= 32;
21263 }
21264 { /* Pseudo-Denormal. */
21265 static memory_long_double x =
21266 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
4a626d0a 21267 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
21268 result |= 64;
21269 }
21270#endif
21271
21272 return result;
21273}
21274_ACEOF
21275if ac_fn_c_try_run "$LINENO"; then :
21276 gl_cv_func_isnanl_works=yes
21277else
21278 gl_cv_func_isnanl_works=no
21279fi
21280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21281 conftest.$ac_objext conftest.beam conftest.$ac_ext
21282fi
21283
21284
21285fi
21286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
21287$as_echo "$gl_cv_func_isnanl_works" >&6; }
21288
21289 case "$gl_cv_func_isnanl_works" in
21290 *yes) ;;
21291 *) gl_func_isnanl_no_libm=no ;;
21292 esac
21293 fi
21294 if test $gl_func_isnanl_no_libm = yes; then
21295
21296$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
21297
21298 fi
21299
21300 if test $gl_func_isnanl_no_libm != yes; then
21301
21302
21303
21304
21305
21306
21307
21308
21309 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
21310
21311
21312
21313
5e8754f9 21314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
88b48903 21315$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
d0ac1c44 21316if ${gl_cv_cc_long_double_expbit0+:} false; then :
88b48903
WN
21317 $as_echo_n "(cached) " >&6
21318else
21319
21320 if test "$cross_compiling" = yes; then :
21321
21322 gl_cv_cc_long_double_expbit0="unknown"
21323
21324else
21325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21326/* end confdefs.h. */
21327
21328#include <float.h>
21329#include <stddef.h>
21330#include <stdio.h>
21331#include <string.h>
21332#define NWORDS \
21333 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21334typedef union { long double value; unsigned int word[NWORDS]; }
21335 memory_long_double;
21336static unsigned int ored_words[NWORDS];
21337static unsigned int anded_words[NWORDS];
21338static void add_to_ored_words (long double x)
21339{
21340 memory_long_double m;
21341 size_t i;
21342 /* Clear it first, in case
21343 sizeof (long double) < sizeof (memory_long_double). */
21344 memset (&m, 0, sizeof (memory_long_double));
21345 m.value = x;
21346 for (i = 0; i < NWORDS; i++)
21347 {
21348 ored_words[i] |= m.word[i];
21349 anded_words[i] &= m.word[i];
21350 }
21351}
21352int main ()
21353{
21354 size_t j;
21355 FILE *fp = fopen ("conftest.out", "w");
21356 if (fp == NULL)
21357 return 1;
21358 for (j = 0; j < NWORDS; j++)
21359 anded_words[j] = ~ (unsigned int) 0;
21360 add_to_ored_words (0.25L);
21361 add_to_ored_words (0.5L);
21362 add_to_ored_words (1.0L);
21363 add_to_ored_words (2.0L);
21364 add_to_ored_words (4.0L);
21365 /* Remove bits that are common (e.g. if representation of the first mantissa
21366 bit is explicit). */
21367 for (j = 0; j < NWORDS; j++)
21368 ored_words[j] &= ~anded_words[j];
21369 /* Now find the nonzero word. */
21370 for (j = 0; j < NWORDS; j++)
21371 if (ored_words[j] != 0)
21372 break;
21373 if (j < NWORDS)
21374 {
21375 size_t i;
21376 for (i = j + 1; i < NWORDS; i++)
21377 if (ored_words[i] != 0)
21378 {
21379 fprintf (fp, "unknown");
21380 return (fclose (fp) != 0);
21381 }
21382 for (i = 0; ; i++)
21383 if ((ored_words[j] >> i) & 1)
21384 {
21385 fprintf (fp, "word %d bit %d", (int) j, (int) i);
21386 return (fclose (fp) != 0);
21387 }
21388 }
21389 fprintf (fp, "unknown");
21390 return (fclose (fp) != 0);
21391}
21392
21393_ACEOF
21394if ac_fn_c_try_run "$LINENO"; then :
21395 gl_cv_cc_long_double_expbit0=`cat conftest.out`
21396else
21397 gl_cv_cc_long_double_expbit0="unknown"
21398fi
21399rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21400 conftest.$ac_objext conftest.beam conftest.$ac_ext
21401fi
21402
21403 rm -f conftest.out
21404
21405fi
21406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
21407$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
21408 case "$gl_cv_cc_long_double_expbit0" in
21409 word*bit*)
21410 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
21411 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
21412
21413cat >>confdefs.h <<_ACEOF
21414#define LDBL_EXPBIT0_WORD $word
21415_ACEOF
21416
21417
21418cat >>confdefs.h <<_ACEOF
21419#define LDBL_EXPBIT0_BIT $bit
21420_ACEOF
21421
21422 ;;
21423 esac
21424
21425
21426
21427 fi
21428
21429
21430
21431
88b48903
WN
21432
21433
5e8754f9 21434 :
472fa5ee
SM
21435
21436
21437
21438
21439
88b48903
WN
21440
21441
2196f55f 21442
49e4877c 21443
5e8754f9 21444 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
88b48903
WN
21445
21446
21447
5abebf3c
CB
21448 if test "$gl_threads_api" = posix; then
21449 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
21450 # pthread_rwlock_* functions.
21451 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
21452"
21453if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
21454
21455$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
21456
21457fi
21458
21459 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
21460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21461/* end confdefs.h. */
21462
21463 #include <pthread.h>
21464int
21465main ()
21466{
21467
21468#if __FreeBSD__ == 4
21469error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
21470#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
21471 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
21472error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
21473#else
21474int x = (int)PTHREAD_MUTEX_RECURSIVE;
21475return !x;
21476#endif
21477
21478 ;
21479 return 0;
21480}
21481_ACEOF
21482if ac_fn_c_try_compile "$LINENO"; then :
21483
21484$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
21485
21486fi
21487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21488 fi
21489 :
21490
21491
21492
21493cat >>confdefs.h <<_ACEOF
21494#define GNULIB_LOCK 1
21495_ACEOF
21496
21497
21498
21499
88b48903 21500
472fa5ee
SM
21501 :
21502
21503
21504
21505
21506
f45c62c4
YQ
21507 if test $ac_cv_func_lstat = yes; then
21508
5e8754f9
SDJ
21509 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
21510 *no)
f45c62c4
YQ
21511 REPLACE_LSTAT=1
21512 ;;
21513 esac
21514 else
21515 HAVE_LSTAT=0
21516 fi
21517
21518 if test $REPLACE_LSTAT = 1; then
21519
21520
21521
21522
21523
21524
21525
21526
21527 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
21528
21529 :
21530 fi
21531
21532
21533
21534
21535
21536 GNULIB_LSTAT=1
21537
21538
21539
21540
21541
21542$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
21543
21544
21545
21546
21547
21548
6a29c58e
YQ
21549 if test $gl_cv_func_malloc_posix = yes; then
21550
21551$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
21552
21553 else
21554 REPLACE_MALLOC=1
21555 fi
21556
21557 if test $REPLACE_MALLOC = 1; then
21558
21559
21560
21561
21562
21563
21564
21565
21566 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
21567
21568 fi
21569
21570
21571
21572
21573
21574 GNULIB_MALLOC_POSIX=1
21575
21576
21577
21578
21579
21580$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
21581
21582
21583
21584
21585
21586
88b48903
WN
21587
21588
21589
21590
21591
88b48903 21592
c971b7fa 21593
c971b7fa 21594
98399780 21595
472fa5ee
SM
21596 :
21597
21598
21599
21600
21601
98399780
YQ
21602
21603
21604
88b48903
WN
21605 if test $gl_cv_have_include_next = yes; then
21606 gl_cv_next_math_h='<'math.h'>'
21607 else
21608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
21609$as_echo_n "checking absolute name of <math.h>... " >&6; }
d0ac1c44 21610if ${gl_cv_next_math_h+:} false; then :
88b48903
WN
21611 $as_echo_n "(cached) " >&6
21612else
c971b7fa 21613
88b48903 21614 if test $ac_cv_header_math_h = yes; then
c971b7fa
PA
21615
21616
4a626d0a
PA
21617
21618
21619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 21620/* end confdefs.h. */
88b48903 21621#include <math.h>
8690e634 21622_ACEOF
4a626d0a
PA
21623 case "$host_os" in
21624 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21625 *) gl_absname_cpp="$ac_cpp" ;;
21626 esac
21627
21628 case "$host_os" in
21629 mingw*)
21630 gl_dirsep_regex='[/\\]'
21631 ;;
21632 *)
21633 gl_dirsep_regex='\/'
21634 ;;
21635 esac
21636 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21637 gl_header_literal_regex=`echo 'math.h' \
21638 | sed -e "$gl_make_literal_regex_sed"`
21639 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21640 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21641 s|^/[^/]|//&|
21642 p
21643 q
21644 }'
21645
21646 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21647 sed -n "$gl_absolute_header_sed"`
21648
21649 gl_header=$gl_cv_absolute_math_h
21650 gl_cv_next_math_h='"'$gl_header'"'
88b48903
WN
21651 else
21652 gl_cv_next_math_h='<'math.h'>'
21653 fi
8690e634 21654
c971b7fa 21655
88b48903
WN
21656fi
21657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
21658$as_echo "$gl_cv_next_math_h" >&6; }
21659 fi
21660 NEXT_MATH_H=$gl_cv_next_math_h
c971b7fa 21661
88b48903
WN
21662 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21663 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21664 gl_next_as_first_directive='<'math.h'>'
21665 else
21666 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21667 gl_next_as_first_directive=$gl_cv_next_math_h
21668 fi
21669 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
8690e634 21670
c971b7fa 21671
c971b7fa
PA
21672
21673
c971b7fa 21674
88b48903
WN
21675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
21676$as_echo_n "checking whether NAN macro works... " >&6; }
d0ac1c44 21677if ${gl_cv_header_math_nan_works+:} false; then :
c971b7fa
PA
21678 $as_echo_n "(cached) " >&6
21679else
8690e634
JK
21680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21681/* end confdefs.h. */
88b48903 21682#include <math.h>
c971b7fa
PA
21683int
21684main ()
21685{
88b48903
WN
21686/* Solaris 10 has a broken definition of NAN. Other platforms
21687 fail to provide NAN, or provide it only in C99 mode; this
21688 test only needs to fail when NAN is provided but wrong. */
21689 float f = 1.0f;
21690#ifdef NAN
21691 f = NAN;
21692#endif
21693 return f == 0;
c971b7fa
PA
21694 ;
21695 return 0;
21696}
21697_ACEOF
21698if ac_fn_c_try_compile "$LINENO"; then :
88b48903 21699 gl_cv_header_math_nan_works=yes
8690e634 21700else
88b48903 21701 gl_cv_header_math_nan_works=no
c971b7fa
PA
21702fi
21703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 21704fi
88b48903
WN
21705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
21706$as_echo "$gl_cv_header_math_nan_works" >&6; }
21707 if test $gl_cv_header_math_nan_works = no; then
21708 REPLACE_NAN=1
c971b7fa 21709 fi
88b48903
WN
21710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
21711$as_echo_n "checking whether HUGE_VAL works... " >&6; }
d0ac1c44 21712if ${gl_cv_header_math_huge_val_works+:} false; then :
c971b7fa
PA
21713 $as_echo_n "(cached) " >&6
21714else
8690e634 21715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 21716/* end confdefs.h. */
88b48903 21717#include <math.h>
c971b7fa
PA
21718int
21719main ()
21720{
88b48903
WN
21721/* Solaris 10 has a broken definition of HUGE_VAL. */
21722 double d = HUGE_VAL;
21723 return d == 0;
c971b7fa
PA
21724 ;
21725 return 0;
21726}
21727_ACEOF
21728if ac_fn_c_try_compile "$LINENO"; then :
88b48903 21729 gl_cv_header_math_huge_val_works=yes
8690e634 21730else
88b48903 21731 gl_cv_header_math_huge_val_works=no
c971b7fa
PA
21732fi
21733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 21734fi
88b48903
WN
21735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
21736$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
21737 if test $gl_cv_header_math_huge_val_works = no; then
21738 REPLACE_HUGE_VAL=1
8690e634 21739 fi
c971b7fa 21740
c971b7fa 21741
5e8754f9
SDJ
21742 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
21743 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21745$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21746if eval \${$as_gl_Symbol+:} false; then :
21747 $as_echo_n "(cached) " >&6
21748else
21749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21750/* end confdefs.h. */
21751#include <math.h>
21752int
21753main ()
21754{
21755#undef $gl_func
21756 (void) $gl_func;
21757 ;
21758 return 0;
21759}
21760_ACEOF
21761if ac_fn_c_try_compile "$LINENO"; then :
21762 eval "$as_gl_Symbol=yes"
21763else
21764 eval "$as_gl_Symbol=no"
21765fi
21766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21767fi
21768eval ac_res=\$$as_gl_Symbol
21769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21770$as_echo "$ac_res" >&6; }
21771 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
21772 cat >>confdefs.h <<_ACEOF
21773#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21774_ACEOF
c971b7fa 21775
5e8754f9
SDJ
21776 eval ac_cv_have_decl_$gl_func=yes
21777fi
21778 done
c971b7fa
PA
21779
21780
21781
21782
21783
c971b7fa 21784
c971b7fa 21785
c971b7fa 21786
c971b7fa
PA
21787
21788
c971b7fa 21789
472fa5ee
SM
21790 :
21791
21792
21793
21794
21795
21796
21797 :
21798
21799
21800
21801
8690e634
JK
21802
21803 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
21804
21805
21806
21807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21808$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 21809if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
c971b7fa
PA
21810 $as_echo_n "(cached) " >&6
21811else
8690e634
JK
21812
21813 case "$host_os" in
21814 # Guess no on AIX and OSF/1.
21815 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21816 # Guess yes otherwise.
21817 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21818 esac
21819 if test $LOCALE_JA != none; then
21820 if test "$cross_compiling" = yes; then :
21821 :
21822else
c971b7fa
PA
21823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21824/* end confdefs.h. */
c971b7fa 21825
8690e634
JK
21826#include <locale.h>
21827#include <string.h>
21828/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21829 <wchar.h>.
21830 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21831 included before <wchar.h>. */
21832#include <stddef.h>
21833#include <stdio.h>
21834#include <time.h>
21835#include <wchar.h>
21836int main ()
c971b7fa 21837{
8690e634
JK
21838 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21839 {
21840 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21841 mbstate_t state;
21842 wchar_t wc;
21843
21844 memset (&state, '\0', sizeof (mbstate_t));
21845 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21846 if (mbsinit (&state))
5e8754f9 21847 return 1;
8690e634 21848 }
c971b7fa
PA
21849 return 0;
21850}
21851_ACEOF
8690e634
JK
21852if ac_fn_c_try_run "$LINENO"; then :
21853 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 21854else
8690e634 21855 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa 21856fi
8690e634
JK
21857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21858 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 21859fi
c971b7fa 21860
8690e634 21861 fi
c971b7fa 21862
8690e634
JK
21863fi
21864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21865$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 21866
c971b7fa 21867
c971b7fa 21868
c971b7fa 21869
8690e634
JK
21870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21871$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 21872if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
21873 $as_echo_n "(cached) " >&6
21874else
21875
8690e634
JK
21876 case "$host_os" in
21877 # Guess no on Solaris 8.
21878 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21879 # Guess yes otherwise.
21880 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21881 esac
21882 if test $LOCALE_ZH_CN != none; then
21883 if test "$cross_compiling" = yes; then :
21884 :
21885else
21886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
21887/* end confdefs.h. */
21888
8690e634
JK
21889#include <locale.h>
21890#include <stdlib.h>
21891#include <string.h>
21892/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21893 <wchar.h>.
21894 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21895 included before <wchar.h>. */
21896#include <stddef.h>
21897#include <stdio.h>
21898#include <time.h>
21899#include <wchar.h>
21900int main ()
c971b7fa 21901{
8690e634
JK
21902 /* This fails on Solaris 8:
21903 mbrtowc returns 2, and sets wc to 0x00F0.
21904 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
21905 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21906 {
21907 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21908 mbstate_t state;
21909 wchar_t wc;
21910
21911 memset (&state, '\0', sizeof (mbstate_t));
21912 if (mbrtowc (&wc, input + 3, 6, &state) != 4
21913 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 21914 return 1;
8690e634 21915 }
c971b7fa
PA
21916 return 0;
21917}
21918_ACEOF
8690e634
JK
21919if ac_fn_c_try_run "$LINENO"; then :
21920 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 21921else
8690e634 21922 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 21923fi
8690e634
JK
21924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21925 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 21926fi
c971b7fa 21927
8690e634 21928 fi
c971b7fa 21929
8690e634
JK
21930fi
21931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21932$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
21933
21934 REPLACE_MBSTATE_T=0
21935 case "$gl_cv_func_mbrtowc_incomplete_state" in
21936 *yes) ;;
21937 *) REPLACE_MBSTATE_T=1 ;;
21938 esac
21939 case "$gl_cv_func_mbrtowc_sanitycheck" in
21940 *yes) ;;
21941 *) REPLACE_MBSTATE_T=1 ;;
21942 esac
c971b7fa 21943 else
8690e634 21944 REPLACE_MBSTATE_T=1
c971b7fa
PA
21945 fi
21946
21947
21948
472fa5ee
SM
21949 :
21950
21951
21952
21953
21954
8690e634
JK
21955 if test $ac_cv_func_mbrtowc = no; then
21956 HAVE_MBRTOWC=0
21957 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
21958/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21959 <wchar.h>.
21960 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21961 included before <wchar.h>. */
21962#include <stddef.h>
21963#include <stdio.h>
21964#include <time.h>
21965#include <wchar.h>
c971b7fa 21966
8690e634 21967"
d0ac1c44 21968if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
8690e634
JK
21969 ac_have_decl=1
21970else
21971 ac_have_decl=0
c971b7fa 21972fi
c971b7fa 21973
8690e634
JK
21974cat >>confdefs.h <<_ACEOF
21975#define HAVE_DECL_MBRTOWC $ac_have_decl
21976_ACEOF
c971b7fa 21977
8690e634
JK
21978 if test $ac_cv_have_decl_mbrtowc = yes; then
21979 REPLACE_MBRTOWC=1
21980 fi
21981 else
21982 if test $REPLACE_MBSTATE_T = 1; then
21983 REPLACE_MBRTOWC=1
21984 else
c971b7fa
PA
21985
21986
21987
8690e634
JK
21988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
21989$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
d0ac1c44 21990if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
8690e634 21991 $as_echo_n "(cached) " >&6
c971b7fa 21992else
c971b7fa 21993
8690e634
JK
21994 case "$host_os" in
21995 # Guess no on Solaris.
21996 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
21997 # Guess yes otherwise.
21998 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
21999 esac
22000 if test $LOCALE_FR_UTF8 != none; then
22001 if test "$cross_compiling" = yes; then :
22002 :
22003else
22004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
22005/* end confdefs.h. */
22006
8690e634
JK
22007#include <locale.h>
22008#include <stdlib.h>
22009#include <string.h>
22010/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22011 <wchar.h>.
22012 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22013 included before <wchar.h>. */
22014#include <stddef.h>
22015#include <stdio.h>
22016#include <time.h>
22017#include <wchar.h>
22018int main ()
22019{
22020 int result = 0;
22021
22022 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22023 {
22024 char input[] = "\303\237er";
22025 mbstate_t state;
22026 wchar_t wc;
22027 size_t ret;
22028
22029 memset (&state, '\0', sizeof (mbstate_t));
22030 wc = (wchar_t) 0xBADFACE;
22031 ret = mbrtowc (&wc, input, 5, &state);
22032 if (ret != 2)
22033 result |= 1;
22034 if (!mbsinit (&state))
22035 result |= 2;
c971b7fa 22036
8690e634
JK
22037 memset (&state, '\0', sizeof (mbstate_t));
22038 ret = mbrtowc (NULL, input, 5, &state);
22039 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
22040 result |= 4;
22041 if (!mbsinit (&state))
22042 result |= 8;
22043 }
22044 return result;
22045}
c971b7fa 22046_ACEOF
8690e634
JK
22047if ac_fn_c_try_run "$LINENO"; then :
22048 gl_cv_func_mbrtowc_null_arg1=yes
22049else
22050 gl_cv_func_mbrtowc_null_arg1=no
22051fi
22052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22053 conftest.$ac_objext conftest.beam conftest.$ac_ext
22054fi
c971b7fa 22055
8690e634 22056 fi
c971b7fa 22057
c971b7fa 22058fi
8690e634
JK
22059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
22060$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
c971b7fa 22061
c971b7fa 22062
c971b7fa 22063
c971b7fa 22064
8690e634
JK
22065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
22066$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
d0ac1c44 22067if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
8690e634
JK
22068 $as_echo_n "(cached) " >&6
22069else
c971b7fa 22070
8690e634
JK
22071 case "$host_os" in
22072 # Guess no on OSF/1.
22073 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
22074 # Guess yes otherwise.
22075 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
22076 esac
22077 if test $LOCALE_FR_UTF8 != none; then
22078 if test "$cross_compiling" = yes; then :
c971b7fa 22079 :
8690e634
JK
22080else
22081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22082/* end confdefs.h. */
22083
22084#include <locale.h>
22085#include <string.h>
22086/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22087 <wchar.h>.
22088 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22089 included before <wchar.h>. */
22090#include <stddef.h>
22091#include <stdio.h>
22092#include <time.h>
22093#include <wchar.h>
22094int main ()
22095{
22096 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22097 {
22098 mbstate_t state;
22099 wchar_t wc;
22100 int ret;
22101
22102 memset (&state, '\0', sizeof (mbstate_t));
22103 wc = (wchar_t) 0xBADFACE;
22104 mbrtowc (&wc, NULL, 5, &state);
22105 /* Check that wc was not modified. */
22106 if (wc != (wchar_t) 0xBADFACE)
5e8754f9 22107 return 1;
8690e634
JK
22108 }
22109 return 0;
22110}
22111_ACEOF
22112if ac_fn_c_try_run "$LINENO"; then :
22113 gl_cv_func_mbrtowc_null_arg2=yes
22114else
22115 gl_cv_func_mbrtowc_null_arg2=no
22116fi
22117rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22118 conftest.$ac_objext conftest.beam conftest.$ac_ext
22119fi
22120
22121 fi
22122
22123fi
22124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
22125$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
c971b7fa
PA
22126
22127
22128
22129
22130
22131
8690e634
JK
22132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
22133$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
d0ac1c44 22134if ${gl_cv_func_mbrtowc_retval+:} false; then :
8690e634
JK
22135 $as_echo_n "(cached) " >&6
22136else
22137
22138 case "$host_os" in
22139 # Guess no on HP-UX, Solaris, native Windows.
22140 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
22141 # Guess yes otherwise.
22142 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
22143 esac
22144 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
22145 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
22146 if test "$cross_compiling" = yes; then :
c971b7fa 22147 :
8690e634
JK
22148else
22149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22150/* end confdefs.h. */
c971b7fa 22151
8690e634
JK
22152#include <locale.h>
22153#include <string.h>
22154/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22155 <wchar.h>.
22156 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22157 included before <wchar.h>. */
22158#include <stddef.h>
22159#include <stdio.h>
22160#include <time.h>
22161#include <wchar.h>
22162int main ()
22163{
22164 int result = 0;
22165 int found_some_locale = 0;
22166 /* This fails on Solaris. */
22167 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22168 {
22169 char input[] = "B\303\274\303\237er"; /* "Büßer" */
22170 mbstate_t state;
22171 wchar_t wc;
22172
22173 memset (&state, '\0', sizeof (mbstate_t));
22174 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22175 {
22176 input[1] = '\0';
22177 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
22178 result |= 1;
22179 }
22180 found_some_locale = 1;
22181 }
22182 /* This fails on HP-UX 11.11. */
22183 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22184 {
22185 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22186 mbstate_t state;
22187 wchar_t wc;
22188
22189 memset (&state, '\0', sizeof (mbstate_t));
22190 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22191 {
22192 input[1] = '\0';
22193 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
22194 result |= 2;
22195 }
22196 found_some_locale = 1;
22197 }
22198 /* This fails on native Windows. */
22199 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
22200 {
22201 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
22202 mbstate_t state;
22203 wchar_t wc;
22204
22205 memset (&state, '\0', sizeof (mbstate_t));
22206 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22207 {
22208 input[3] = '\0';
22209 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22210 result |= 4;
22211 }
22212 found_some_locale = 1;
22213 }
22214 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
22215 {
22216 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
22217 mbstate_t state;
22218 wchar_t wc;
22219
22220 memset (&state, '\0', sizeof (mbstate_t));
22221 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22222 {
22223 input[3] = '\0';
22224 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22225 result |= 8;
22226 }
22227 found_some_locale = 1;
22228 }
22229 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
22230 {
22231 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
22232 mbstate_t state;
22233 wchar_t wc;
22234
22235 memset (&state, '\0', sizeof (mbstate_t));
22236 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22237 {
22238 input[3] = '\0';
22239 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22240 result |= 16;
22241 }
22242 found_some_locale = 1;
22243 }
22244 return (found_some_locale ? result : 77);
22245}
22246_ACEOF
22247if ac_fn_c_try_run "$LINENO"; then :
22248 gl_cv_func_mbrtowc_retval=yes
22249else
22250 if test $? != 77; then
22251 gl_cv_func_mbrtowc_retval=no
22252 fi
c971b7fa 22253
8690e634
JK
22254fi
22255rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22256 conftest.$ac_objext conftest.beam conftest.$ac_ext
22257fi
c971b7fa 22258
8690e634 22259 fi
c971b7fa 22260
8690e634
JK
22261fi
22262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
22263$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
c971b7fa
PA
22264
22265
22266
22267
8690e634
JK
22268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
22269$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
d0ac1c44 22270if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
c971b7fa
PA
22271 $as_echo_n "(cached) " >&6
22272else
8690e634
JK
22273
22274 case "$host_os" in
22275 # Guess no on Solaris 8 and 9.
22276 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
22277 # Guess yes otherwise.
22278 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
22279 esac
22280 if test $LOCALE_ZH_CN != none; then
22281 if test "$cross_compiling" = yes; then :
22282 :
c971b7fa
PA
22283else
22284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22285/* end confdefs.h. */
22286
8690e634 22287#include <locale.h>
c971b7fa 22288#include <string.h>
8690e634
JK
22289/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22290 <wchar.h>.
22291 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22292 included before <wchar.h>. */
22293#include <stddef.h>
22294#include <stdio.h>
22295#include <time.h>
22296#include <wchar.h>
22297int main ()
c971b7fa 22298{
8690e634
JK
22299 /* This fails on Solaris 8 and 9. */
22300 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
c971b7fa 22301 {
8690e634
JK
22302 mbstate_t state;
22303 wchar_t wc;
c971b7fa 22304
8690e634
JK
22305 memset (&state, '\0', sizeof (mbstate_t));
22306 if (mbrtowc (&wc, "", 1, &state) != 0)
5e8754f9 22307 return 1;
8690e634 22308 }
c971b7fa
PA
22309 return 0;
22310}
22311_ACEOF
22312if ac_fn_c_try_run "$LINENO"; then :
8690e634 22313 gl_cv_func_mbrtowc_nul_retval=yes
c971b7fa 22314else
8690e634 22315 gl_cv_func_mbrtowc_nul_retval=no
c971b7fa
PA
22316fi
22317rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22318 conftest.$ac_objext conftest.beam conftest.$ac_ext
22319fi
22320
8690e634
JK
22321 fi
22322
c971b7fa 22323fi
8690e634
JK
22324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
22325$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
22326
4a626d0a
PA
22327
22328
22329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
22330$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
d0ac1c44 22331if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
4a626d0a
PA
22332 $as_echo_n "(cached) " >&6
22333else
22334
22335 case "$host_os" in
5e8754f9
SDJ
22336 # Guess no on AIX and glibc systems.
22337 aix* | *-gnu*)
22338 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
22339 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
4a626d0a
PA
22340 esac
22341 if test "$cross_compiling" = yes; then :
22342 :
22343else
22344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22345/* end confdefs.h. */
22346
22347 #include <wchar.h>
22348 static wchar_t wc;
22349 static mbstate_t mbs;
22350 int
22351 main (void)
22352 {
49e4877c 22353 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
4a626d0a
PA
22354 }
22355_ACEOF
22356if ac_fn_c_try_run "$LINENO"; then :
4a626d0a 22357 gl_cv_func_mbrtowc_empty_input=yes
49e4877c
PA
22358else
22359 gl_cv_func_mbrtowc_empty_input=no
4a626d0a
PA
22360fi
22361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22362 conftest.$ac_objext conftest.beam conftest.$ac_ext
22363fi
22364
22365
22366fi
22367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
22368$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
22369
49e4877c 22370
5e8754f9 22371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
49e4877c 22372$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
d0ac1c44 22373if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
49e4877c
PA
22374 $as_echo_n "(cached) " >&6
22375else
22376
22377 gl_cv_C_locale_sans_EILSEQ="guessing no"
22378
22379 if test "$cross_compiling" = yes; then :
5e8754f9 22380 :
49e4877c
PA
22381else
22382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22383/* end confdefs.h. */
22384#include <limits.h>
22385 #include <locale.h>
22386 #include <wchar.h>
22387
22388int
22389main ()
22390{
22391
22392 int i;
22393 char *locale = setlocale (LC_ALL, "C");
22394 if (! locale)
5e8754f9 22395 return 1;
49e4877c
PA
22396 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
22397 {
22398 char c = i;
22399 wchar_t wc;
22400 mbstate_t mbs = { 0, };
22401 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
22402 if (1 < ss)
5e8754f9 22403 return 1;
49e4877c
PA
22404 }
22405 return 0;
22406
6ec2e0f5
SDJ
22407 ;
22408 return 0;
22409}
22410_ACEOF
22411if ac_fn_c_try_run "$LINENO"; then :
22412 gl_cv_C_locale_sans_EILSEQ=yes
22413else
22414 gl_cv_C_locale_sans_EILSEQ=no
22415fi
22416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22417 conftest.$ac_objext conftest.beam conftest.$ac_ext
22418fi
22419
22420fi
22421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
22422$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
22423
22424 case "$gl_cv_func_mbrtowc_null_arg1" in
22425 *yes) ;;
22426 *)
22427$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
22428
22429 REPLACE_MBRTOWC=1
22430 ;;
22431 esac
22432 case "$gl_cv_func_mbrtowc_null_arg2" in
22433 *yes) ;;
22434 *)
22435$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
22436
22437 REPLACE_MBRTOWC=1
22438 ;;
22439 esac
22440 case "$gl_cv_func_mbrtowc_retval" in
22441 *yes) ;;
22442 *)
22443$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
22444
22445 REPLACE_MBRTOWC=1
22446 ;;
22447 esac
22448 case "$gl_cv_func_mbrtowc_nul_retval" in
22449 *yes) ;;
22450 *)
22451$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
22452
22453 REPLACE_MBRTOWC=1
22454 ;;
22455 esac
22456 case "$gl_cv_func_mbrtowc_empty_input" in
22457 *yes) ;;
22458 *)
22459$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
22460
22461 REPLACE_MBRTOWC=1
22462 ;;
22463 esac
22464 case $gl_cv_C_locale_sans_EILSEQ in
22465 *yes) ;;
22466 *)
22467$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
22468
22469 REPLACE_MBRTOWC=1
22470 ;;
22471 esac
22472 fi
22473 fi
22474
22475 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
22476
22477
22478
22479
22480
22481
22482
22483
22484 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
22485
22486
22487 :
22488
22489 fi
22490
22491
22492
22493
22494
22495 GNULIB_MBRTOWC=1
22496
22497
22498
22499
22500
22501$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
472fa5ee
SM
22515 :
22516
22517
22518
22519
22520
22521
22522 :
22523
22524
22525
22526
6ec2e0f5
SDJ
22527
22528 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
22529
22530
22531
22532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22533$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 22534if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
6ec2e0f5
SDJ
22535 $as_echo_n "(cached) " >&6
22536else
22537
22538 case "$host_os" in
22539 # Guess no on AIX and OSF/1.
22540 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22541 # Guess yes otherwise.
22542 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22543 esac
22544 if test $LOCALE_JA != none; then
22545 if test "$cross_compiling" = yes; then :
22546 :
22547else
22548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22549/* end confdefs.h. */
22550
22551#include <locale.h>
22552#include <string.h>
22553/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22554 <wchar.h>.
22555 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22556 included before <wchar.h>. */
22557#include <stddef.h>
22558#include <stdio.h>
22559#include <time.h>
22560#include <wchar.h>
22561int main ()
22562{
22563 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22564 {
22565 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22566 mbstate_t state;
22567 wchar_t wc;
22568
22569 memset (&state, '\0', sizeof (mbstate_t));
22570 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22571 if (mbsinit (&state))
5e8754f9 22572 return 1;
6ec2e0f5
SDJ
22573 }
22574 return 0;
22575}
22576_ACEOF
22577if ac_fn_c_try_run "$LINENO"; then :
22578 gl_cv_func_mbrtowc_incomplete_state=yes
22579else
22580 gl_cv_func_mbrtowc_incomplete_state=no
22581fi
22582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22583 conftest.$ac_objext conftest.beam conftest.$ac_ext
22584fi
22585
22586 fi
22587
22588fi
22589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22590$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22591
22592
22593
22594
22595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22596$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 22597if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
6ec2e0f5
SDJ
22598 $as_echo_n "(cached) " >&6
22599else
22600
22601 case "$host_os" in
22602 # Guess no on Solaris 8.
22603 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22604 # Guess yes otherwise.
22605 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22606 esac
22607 if test $LOCALE_ZH_CN != none; then
22608 if test "$cross_compiling" = yes; then :
22609 :
22610else
22611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22612/* end confdefs.h. */
22613
22614#include <locale.h>
22615#include <stdlib.h>
22616#include <string.h>
22617/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22618 <wchar.h>.
22619 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22620 included before <wchar.h>. */
22621#include <stddef.h>
22622#include <stdio.h>
22623#include <time.h>
22624#include <wchar.h>
22625int main ()
22626{
22627 /* This fails on Solaris 8:
22628 mbrtowc returns 2, and sets wc to 0x00F0.
22629 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
22630 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22631 {
22632 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22633 mbstate_t state;
22634 wchar_t wc;
22635
22636 memset (&state, '\0', sizeof (mbstate_t));
22637 if (mbrtowc (&wc, input + 3, 6, &state) != 4
22638 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 22639 return 1;
6ec2e0f5 22640 }
49e4877c
PA
22641 return 0;
22642}
22643_ACEOF
22644if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 22645 gl_cv_func_mbrtowc_sanitycheck=yes
49e4877c 22646else
6ec2e0f5 22647 gl_cv_func_mbrtowc_sanitycheck=no
49e4877c
PA
22648fi
22649rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22650 conftest.$ac_objext conftest.beam conftest.$ac_ext
22651fi
22652
6ec2e0f5
SDJ
22653 fi
22654
49e4877c 22655fi
6ec2e0f5
SDJ
22656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22657$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
49e4877c 22658
6ec2e0f5
SDJ
22659 REPLACE_MBSTATE_T=0
22660 case "$gl_cv_func_mbrtowc_incomplete_state" in
22661 *yes) ;;
22662 *) REPLACE_MBSTATE_T=1 ;;
22663 esac
22664 case "$gl_cv_func_mbrtowc_sanitycheck" in
22665 *yes) ;;
22666 *) REPLACE_MBSTATE_T=1 ;;
22667 esac
22668 else
22669 REPLACE_MBSTATE_T=1
22670 fi
8690e634 22671
8690e634 22672
8690e634 22673
472fa5ee
SM
22674 :
22675
22676
22677
22678
22679
6ec2e0f5
SDJ
22680 if test $ac_cv_func_mbsinit = no; then
22681 HAVE_MBSINIT=0
22682 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
22683/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22684 <wchar.h>.
22685 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22686 included before <wchar.h>. */
22687#include <stddef.h>
22688#include <stdio.h>
22689#include <time.h>
22690#include <wchar.h>
8690e634 22691
6ec2e0f5 22692"
d0ac1c44 22693if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
6ec2e0f5
SDJ
22694 ac_have_decl=1
22695else
22696 ac_have_decl=0
22697fi
4a626d0a 22698
6ec2e0f5
SDJ
22699cat >>confdefs.h <<_ACEOF
22700#define HAVE_DECL_MBSINIT $ac_have_decl
22701_ACEOF
49e4877c 22702
6ec2e0f5
SDJ
22703 if test $ac_cv_have_decl_mbsinit = yes; then
22704 REPLACE_MBSINIT=1
22705 fi
22706 else
22707 if test $REPLACE_MBSTATE_T = 1; then
22708 REPLACE_MBSINIT=1
22709 else
22710 case "$host_os" in
22711 mingw*) REPLACE_MBSINIT=1 ;;
8690e634 22712 esac
c971b7fa
PA
22713 fi
22714 fi
22715
6ec2e0f5 22716 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
c971b7fa 22717
c971b7fa 22718
c971b7fa
PA
22719
22720
22721
22722
22723
22724
6ec2e0f5 22725 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
8690e634
JK
22726
22727
22728 :
c971b7fa 22729
a512b375 22730 fi
c971b7fa 22731
8690e634
JK
22732
22733
22734
22735
6ec2e0f5 22736 GNULIB_MBSINIT=1
8690e634
JK
22737
22738
22739
22740
8690e634 22741
6ec2e0f5 22742$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
8690e634
JK
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
c971b7fa 22754
472fa5ee
SM
22755 :
22756
22757
22758
22759
22760
22761
22762 :
22763
22764
22765
22766
c971b7fa 22767
8690e634 22768 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa 22769
8690e634
JK
22770
22771
22772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22773$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 22774if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
8690e634
JK
22775 $as_echo_n "(cached) " >&6
22776else
22777
22778 case "$host_os" in
22779 # Guess no on AIX and OSF/1.
22780 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22781 # Guess yes otherwise.
22782 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22783 esac
22784 if test $LOCALE_JA != none; then
22785 if test "$cross_compiling" = yes; then :
22786 :
c971b7fa
PA
22787else
22788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22789/* end confdefs.h. */
22790
8690e634
JK
22791#include <locale.h>
22792#include <string.h>
22793/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22794 <wchar.h>.
22795 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22796 included before <wchar.h>. */
22797#include <stddef.h>
22798#include <stdio.h>
22799#include <time.h>
22800#include <wchar.h>
22801int main ()
c971b7fa 22802{
8690e634 22803 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
c971b7fa 22804 {
8690e634
JK
22805 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22806 mbstate_t state;
22807 wchar_t wc;
22808
22809 memset (&state, '\0', sizeof (mbstate_t));
22810 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22811 if (mbsinit (&state))
5e8754f9 22812 return 1;
c971b7fa 22813 }
c971b7fa
PA
22814 return 0;
22815}
22816_ACEOF
22817if ac_fn_c_try_run "$LINENO"; then :
8690e634 22818 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 22819else
8690e634 22820 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa
PA
22821fi
22822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22823 conftest.$ac_objext conftest.beam conftest.$ac_ext
22824fi
22825
8690e634 22826 fi
c971b7fa
PA
22827
22828fi
8690e634
JK
22829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22830$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa
PA
22831
22832
c971b7fa
PA
22833
22834
8690e634
JK
22835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22836$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 22837if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
22838 $as_echo_n "(cached) " >&6
22839else
8690e634
JK
22840
22841 case "$host_os" in
22842 # Guess no on Solaris 8.
22843 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22844 # Guess yes otherwise.
22845 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22846 esac
22847 if test $LOCALE_ZH_CN != none; then
22848 if test "$cross_compiling" = yes; then :
22849 :
22850else
c971b7fa
PA
22851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22852/* end confdefs.h. */
8690e634
JK
22853
22854#include <locale.h>
22855#include <stdlib.h>
22856#include <string.h>
22857/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22858 <wchar.h>.
22859 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22860 included before <wchar.h>. */
c971b7fa 22861#include <stddef.h>
8690e634
JK
22862#include <stdio.h>
22863#include <time.h>
22864#include <wchar.h>
22865int main ()
c971b7fa 22866{
8690e634
JK
22867 /* This fails on Solaris 8:
22868 mbrtowc returns 2, and sets wc to 0x00F0.
22869 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
22870 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22871 {
22872 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22873 mbstate_t state;
22874 wchar_t wc;
22875
22876 memset (&state, '\0', sizeof (mbstate_t));
22877 if (mbrtowc (&wc, input + 3, 6, &state) != 4
22878 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 22879 return 1;
8690e634 22880 }
c971b7fa
PA
22881 return 0;
22882}
22883_ACEOF
8690e634
JK
22884if ac_fn_c_try_run "$LINENO"; then :
22885 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 22886else
8690e634 22887 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 22888fi
8690e634
JK
22889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22890 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 22891fi
c971b7fa 22892
8690e634
JK
22893 fi
22894
22895fi
22896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22897$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
c971b7fa 22898
8690e634
JK
22899 REPLACE_MBSTATE_T=0
22900 case "$gl_cv_func_mbrtowc_incomplete_state" in
22901 *yes) ;;
22902 *) REPLACE_MBSTATE_T=1 ;;
22903 esac
22904 case "$gl_cv_func_mbrtowc_sanitycheck" in
22905 *yes) ;;
22906 *) REPLACE_MBSTATE_T=1 ;;
22907 esac
22908 else
22909 REPLACE_MBSTATE_T=1
c971b7fa
PA
22910 fi
22911
c971b7fa 22912
8690e634 22913
472fa5ee
SM
22914 :
22915
22916
22917
22918
22919
6ec2e0f5
SDJ
22920 if test $ac_cv_func_mbsrtowcs = no; then
22921 HAVE_MBSRTOWCS=0
22922 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
8690e634
JK
22923/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22924 <wchar.h>.
22925 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22926 included before <wchar.h>. */
22927#include <stddef.h>
22928#include <stdio.h>
22929#include <time.h>
22930#include <wchar.h>
22931
22932"
d0ac1c44 22933if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
8690e634
JK
22934 ac_have_decl=1
22935else
22936 ac_have_decl=0
c971b7fa 22937fi
c971b7fa 22938
8690e634 22939cat >>confdefs.h <<_ACEOF
6ec2e0f5 22940#define HAVE_DECL_MBSRTOWCS $ac_have_decl
c971b7fa 22941_ACEOF
c971b7fa 22942
6ec2e0f5
SDJ
22943 if test $ac_cv_have_decl_mbsrtowcs = yes; then
22944 REPLACE_MBSRTOWCS=1
8690e634
JK
22945 fi
22946 else
22947 if test $REPLACE_MBSTATE_T = 1; then
6ec2e0f5 22948 REPLACE_MBSRTOWCS=1
8690e634 22949 else
6ec2e0f5
SDJ
22950
22951
22952
22953
22954
22955
22956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
22957$as_echo_n "checking whether mbsrtowcs works... " >&6; }
d0ac1c44 22958if ${gl_cv_func_mbsrtowcs_works+:} false; then :
6ec2e0f5
SDJ
22959 $as_echo_n "(cached) " >&6
22960else
22961
22962 case "$host_os" in
22963 # Guess no on HP-UX, Solaris, mingw.
22964 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
22965 # Guess yes otherwise.
22966 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
22967 esac
22968 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
22969 if test "$cross_compiling" = yes; then :
22970 :
22971else
22972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22973/* end confdefs.h. */
22974
22975#include <locale.h>
22976#include <string.h>
22977/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22978 <wchar.h>.
22979 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22980 included before <wchar.h>. */
22981#include <stddef.h>
22982#include <stdio.h>
22983#include <time.h>
22984#include <wchar.h>
22985int main ()
22986{
22987 int result = 0;
22988 /* Test whether the function supports a NULL destination argument.
22989 This fails on native Windows. */
22990 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
22991 {
22992 const char input[] = "\337er";
22993 const char *src = input;
22994 mbstate_t state;
22995
22996 memset (&state, '\0', sizeof (mbstate_t));
22997 if (mbsrtowcs (NULL, &src, 1, &state) != 3
22998 || src != input)
22999 result |= 1;
23000 }
23001 /* Test whether the function works when started with a conversion state
23002 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
23003 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23004 {
23005 const char input[] = "B\303\274\303\237er";
23006 mbstate_t state;
23007
23008 memset (&state, '\0', sizeof (mbstate_t));
23009 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23010 if (!mbsinit (&state))
23011 {
23012 const char *src = input + 2;
23013 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23014 result |= 2;
23015 }
23016 }
23017 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23018 {
23019 const char input[] = "<\306\374\313\334\270\354>";
23020 mbstate_t state;
23021
23022 memset (&state, '\0', sizeof (mbstate_t));
23023 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
23024 if (!mbsinit (&state))
23025 {
23026 const char *src = input + 4;
23027 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
23028 result |= 4;
23029 }
23030 }
23031 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23032 {
23033 const char input[] = "B\250\271\201\060\211\070er";
23034 mbstate_t state;
23035
23036 memset (&state, '\0', sizeof (mbstate_t));
23037 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23038 if (!mbsinit (&state))
23039 {
23040 const char *src = input + 2;
23041 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23042 result |= 8;
23043 }
23044 }
23045 return result;
23046}
23047_ACEOF
23048if ac_fn_c_try_run "$LINENO"; then :
23049 gl_cv_func_mbsrtowcs_works=yes
23050else
23051 gl_cv_func_mbsrtowcs_works=no
23052fi
23053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23054 conftest.$ac_objext conftest.beam conftest.$ac_ext
23055fi
23056
23057 fi
23058
23059fi
23060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
23061$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
23062
23063 case "$gl_cv_func_mbsrtowcs_works" in
23064 *yes) ;;
23065 *) REPLACE_MBSRTOWCS=1 ;;
8690e634
JK
23066 esac
23067 fi
23068 fi
c971b7fa 23069
6ec2e0f5 23070 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
c971b7fa
PA
23071
23072
23073
23074
23075
23076
23077
23078
6ec2e0f5
SDJ
23079 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
c971b7fa
PA
23090
23091
8690e634 23092 :
c971b7fa 23093
a512b375 23094 fi
c971b7fa 23095
c971b7fa 23096
c971b7fa 23097
c971b7fa
PA
23098
23099
6ec2e0f5 23100 GNULIB_MBSRTOWCS=1
c971b7fa 23101
c971b7fa
PA
23102
23103
23104
23105
6ec2e0f5 23106$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
c971b7fa
PA
23107
23108
c971b7fa 23109
c971b7fa 23110
6ec2e0f5 23111 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
c971b7fa
PA
23112
23113
23114
c971b7fa 23115
c971b7fa
PA
23116
23117
23118
23119
6ec2e0f5 23120 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
8690e634 23121
c971b7fa 23122
6ec2e0f5
SDJ
23123 for ac_header in bp-sym.h
23124do :
23125 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
d0ac1c44 23126if test "x$ac_cv_header_bp_sym_h" = xyes; then :
6ec2e0f5
SDJ
23127 cat >>confdefs.h <<_ACEOF
23128#define HAVE_BP_SYM_H 1
23129_ACEOF
c971b7fa 23130
6ec2e0f5 23131fi
c971b7fa 23132
6ec2e0f5
SDJ
23133done
23134
23135
23136 fi
23137
23138
23139
23140
23141
23142 GNULIB_MEMCHR=1
23143
23144
23145
23146
23147
23148$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
23149
23150
23151
23152
23153
23154 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
23155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
23156$as_echo_n "checking whether memmem works in linear time... " >&6; }
d0ac1c44 23157if ${gl_cv_func_memmem_works_fast+:} false; then :
8690e634
JK
23158 $as_echo_n "(cached) " >&6
23159else
6ec2e0f5
SDJ
23160 if test "$cross_compiling" = yes; then :
23161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23162/* end confdefs.h. */
23163
23164#include <features.h>
23165#ifdef __GNU_LIBRARY__
23166 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
23167 && !defined __UCLIBC__
23168 Lucky user
23169 #endif
23170#endif
23171#ifdef __CYGWIN__
23172 #include <cygwin/version.h>
23173 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
23174 Lucky user
23175 #endif
23176#endif
23177
23178_ACEOF
23179if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23180 $EGREP "Lucky user" >/dev/null 2>&1; then :
23181 gl_cv_func_memmem_works_fast="guessing yes"
23182else
23183 gl_cv_func_memmem_works_fast="guessing no"
23184fi
23185rm -f conftest*
23186
c971b7fa 23187
8690e634
JK
23188else
23189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 23190/* end confdefs.h. */
c971b7fa 23191
6ec2e0f5
SDJ
23192#include <signal.h> /* for signal */
23193#include <string.h> /* for memmem */
23194#include <stdlib.h> /* for malloc */
23195#include <unistd.h> /* for alarm */
23196static void quit (int sig) { _exit (sig + 128); }
23197
23198int
23199main ()
8690e634 23200{
8690e634 23201
6ec2e0f5
SDJ
23202 int result = 0;
23203 size_t m = 1000000;
23204 char *haystack = (char *) malloc (2 * m + 1);
23205 char *needle = (char *) malloc (m + 1);
23206 /* Failure to compile this test due to missing alarm is okay,
23207 since all such platforms (mingw) also lack memmem. */
23208 signal (SIGALRM, quit);
23209 alarm (5);
23210 /* Check for quadratic performance. */
23211 if (haystack && needle)
23212 {
23213 memset (haystack, 'A', 2 * m);
23214 haystack[2 * m] = 'B';
23215 memset (needle, 'A', m);
23216 needle[m] = 'B';
23217 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
23218 result |= 1;
23219 }
23220 return result;
23221
23222 ;
c971b7fa
PA
23223 return 0;
23224}
23225_ACEOF
8690e634 23226if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 23227 gl_cv_func_memmem_works_fast=yes
8690e634 23228else
6ec2e0f5 23229 gl_cv_func_memmem_works_fast=no
8690e634
JK
23230fi
23231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23232 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 23233fi
c971b7fa
PA
23234
23235
8690e634 23236fi
6ec2e0f5
SDJ
23237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
23238$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
23239 case "$gl_cv_func_memmem_works_fast" in
23240 *yes) ;;
23241 *)
23242 REPLACE_MEMMEM=1
23243 ;;
23244 esac
23245 fi
c971b7fa 23246
6ec2e0f5 23247 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
8690e634
JK
23248
23249
23250
6ec2e0f5
SDJ
23251
23252
23253
23254
23255
23256 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
23257
23258 fi
23259
23260
23261
23262
23263 for ac_func in memmem
23264do :
23265 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 23266if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
23267 cat >>confdefs.h <<_ACEOF
23268#define HAVE_MEMMEM 1
23269_ACEOF
23270
23271fi
23272done
23273
23274 if test $ac_cv_func_memmem = yes; then
23275 HAVE_MEMMEM=1
23276 else
23277 HAVE_MEMMEM=0
23278 fi
23279
472fa5ee
SM
23280 :
23281
23282
23283
23284
23285
6ec2e0f5
SDJ
23286 if test $ac_cv_have_decl_memmem = no; then
23287 HAVE_DECL_MEMMEM=0
23288 else
23289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
23290$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 23291if ${gl_cv_func_memmem_works_always+:} false; then :
c971b7fa
PA
23292 $as_echo_n "(cached) " >&6
23293else
6ec2e0f5
SDJ
23294 if test "$cross_compiling" = yes; then :
23295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23296/* end confdefs.h. */
23297
23298#ifdef __GNU_LIBRARY__
23299 #include <features.h>
23300 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
23301 || __GLIBC_MINOR__ > 12)) \
23302 || (__GLIBC__ > 2)) \
23303 || defined __UCLIBC__
23304 Lucky user
23305 #endif
23306#elif defined __CYGWIN__
23307 #include <cygwin/version.h>
23308 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
23309 Lucky user
23310 #endif
23311#else
23312 Lucky user
23313#endif
23314
23315_ACEOF
23316if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23317 $EGREP "Lucky user" >/dev/null 2>&1; then :
23318 gl_cv_func_memmem_works_always="guessing yes"
23319else
23320 gl_cv_func_memmem_works_always="guessing no"
23321fi
23322rm -f conftest*
23323
8690e634 23324
8690e634 23325else
c971b7fa
PA
23326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23327/* end confdefs.h. */
c971b7fa 23328
6ec2e0f5
SDJ
23329#include <string.h> /* for memmem */
23330#define P "_EF_BF_BD"
23331#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
23332#define NEEDLE P P P P P
23333
23334int
23335main ()
c971b7fa 23336{
8690e634 23337
6ec2e0f5
SDJ
23338 int result = 0;
23339 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
23340 result |= 1;
23341 /* Check for empty needle behavior. */
23342 {
23343 const char *haystack = "AAA";
23344 if (memmem (haystack, 3, NULL, 0) != haystack)
23345 result |= 2;
8690e634 23346 }
6ec2e0f5
SDJ
23347 return result;
23348
23349 ;
c971b7fa
PA
23350 return 0;
23351}
23352_ACEOF
8690e634 23353if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 23354 gl_cv_func_memmem_works_always=yes
c971b7fa 23355else
6ec2e0f5 23356 gl_cv_func_memmem_works_always=no
c971b7fa 23357fi
8690e634
JK
23358rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23359 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 23360fi
8690e634 23361
8690e634
JK
23362
23363fi
6ec2e0f5
SDJ
23364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
23365$as_echo "$gl_cv_func_memmem_works_always" >&6; }
23366 case "$gl_cv_func_memmem_works_always" in
8690e634 23367 *yes) ;;
6ec2e0f5
SDJ
23368 *)
23369 REPLACE_MEMMEM=1
23370 ;;
8690e634 23371 esac
c971b7fa 23372 fi
6ec2e0f5 23373 :
c971b7fa 23374
6ec2e0f5 23375 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
c971b7fa 23376
c971b7fa 23377
8690e634 23378
c971b7fa 23379
6ec2e0f5
SDJ
23380
23381
23382
23383
23384 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
23385
23386 fi
23387
23388
23389
23390
23391
23392 GNULIB_MEMMEM=1
23393
23394
23395
23396
23397
23398$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
23399
23400
23401
23402
23403
23404
23405
23406
23407
23408 for ac_func in mempcpy
23409do :
23410 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
d0ac1c44 23411if test "x$ac_cv_func_mempcpy" = xyes; then :
6ec2e0f5
SDJ
23412 cat >>confdefs.h <<_ACEOF
23413#define HAVE_MEMPCPY 1
8690e634 23414_ACEOF
c971b7fa 23415
6ec2e0f5
SDJ
23416fi
23417done
c971b7fa 23418
6ec2e0f5
SDJ
23419 if test $ac_cv_func_mempcpy = no; then
23420 HAVE_MEMPCPY=0
23421 fi
8690e634 23422
6ec2e0f5 23423 if test $HAVE_MEMPCPY = 0; then
8690e634
JK
23424
23425
23426
23427
8690e634 23428
6ec2e0f5
SDJ
23429
23430
23431
23432 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
23433
23434
8690e634 23435 :
c971b7fa 23436
6ec2e0f5 23437 fi
c971b7fa 23438
8690e634 23439
8690e634 23440
8690e634 23441
6ec2e0f5
SDJ
23442
23443 GNULIB_MEMPCPY=1
23444
23445
23446
23447
23448
23449$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
23450
23451
23452
23453
23454
23455
23456
23457
472fa5ee
SM
23458 :
23459
23460
23461
23462
23463
6ec2e0f5
SDJ
23464 if test $ac_cv_have_decl_memrchr = no; then
23465 HAVE_DECL_MEMRCHR=0
23466 fi
23467
23468 for ac_func in memrchr
23469do :
23470 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
d0ac1c44 23471if test "x$ac_cv_func_memrchr" = xyes; then :
6ec2e0f5
SDJ
23472 cat >>confdefs.h <<_ACEOF
23473#define HAVE_MEMRCHR 1
c971b7fa 23474_ACEOF
6ec2e0f5 23475
c971b7fa 23476fi
6ec2e0f5 23477done
8690e634 23478
8690e634 23479
6ec2e0f5 23480 if test $ac_cv_func_memrchr = no; then
8690e634 23481
6ec2e0f5
SDJ
23482
23483
23484
23485
23486
23487
23488
23489 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
23490
23491 :
c971b7fa
PA
23492 fi
23493
23494
c971b7fa 23495
c971b7fa 23496
c971b7fa 23497
6ec2e0f5
SDJ
23498 GNULIB_MEMRCHR=1
23499
23500
23501
23502
23503
23504$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
23505
23506
23507
23508
2d8adcbd 23509
8a99096f
SM
23510 :
23511
23512
23513
23514
23515
23516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
23517$as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
23518if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
23519 $as_echo_n "(cached) " >&6
23520else
23521 rm -rf conftest.dir
23522 if test "$cross_compiling" = yes; then :
23523 case "$host_os" in
5e8754f9
SDJ
23524 # Guess yes on glibc systems.
23525 *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
23526 # If we don't know, assume the worst.
23527 *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
8a99096f
SM
23528 esac
23529
23530else
23531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23532/* end confdefs.h. */
23533
23534# include <sys/types.h>
23535# include <sys/stat.h>
23536
23537int
23538main ()
23539{
23540return mkdir ("conftest.dir/", 0700);
23541 ;
23542 return 0;
23543}
23544_ACEOF
23545if ac_fn_c_try_run "$LINENO"; then :
23546 gl_cv_func_mkdir_trailing_slash_works=yes
23547else
23548 gl_cv_func_mkdir_trailing_slash_works=no
23549fi
23550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23551 conftest.$ac_objext conftest.beam conftest.$ac_ext
23552fi
23553
23554 rm -rf conftest.dir
23555
23556
23557fi
23558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
23559$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
23560 case "$gl_cv_func_mkdir_trailing_slash_works" in
23561 *yes) ;;
23562 *)
23563 REPLACE_MKDIR=1
23564 ;;
23565 esac
23566
23567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
23568$as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
23569if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
23570 $as_echo_n "(cached) " >&6
23571else
23572 rm -rf conftest.dir
23573 if test "$cross_compiling" = yes; then :
23574 case "$host_os" in
5e8754f9
SDJ
23575 # Guess yes on glibc systems.
23576 *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
23577 # If we don't know, assume the worst.
23578 *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
8a99096f
SM
23579 esac
23580
23581else
23582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23583/* end confdefs.h. */
23584
23585# include <sys/types.h>
23586# include <sys/stat.h>
23587
23588int
23589main ()
23590{
23591return !mkdir ("conftest.dir/./", 0700);
23592 ;
23593 return 0;
23594}
23595_ACEOF
23596if ac_fn_c_try_run "$LINENO"; then :
23597 gl_cv_func_mkdir_trailing_dot_works=yes
23598else
23599 gl_cv_func_mkdir_trailing_dot_works=no
23600fi
23601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23602 conftest.$ac_objext conftest.beam conftest.$ac_ext
23603fi
23604
23605 rm -rf conftest.dir
23606
23607
23608fi
23609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
23610$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
23611 case "$gl_cv_func_mkdir_trailing_dot_works" in
23612 *yes) ;;
23613 *)
23614 REPLACE_MKDIR=1
23615
23616$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
23617
23618 ;;
23619 esac
23620
23621 if test $REPLACE_MKDIR = 1; then
23622
23623
23624
23625
23626
23627
23628
23629
23630 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
23631
23632 fi
23633
23634
e8d8cce6
SM
23635 for ac_func in mkdtemp
23636do :
23637 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
23638if test "x$ac_cv_func_mkdtemp" = xyes; then :
23639 cat >>confdefs.h <<_ACEOF
23640#define HAVE_MKDTEMP 1
23641_ACEOF
23642
23643fi
23644done
23645
23646 if test $ac_cv_func_mkdtemp = no; then
23647 HAVE_MKDTEMP=0
23648 fi
23649
23650 if test $HAVE_MKDTEMP = 0; then
23651
23652
23653
23654
23655
23656
23657
23658
23659 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
23660
23661 :
23662
23663 fi
23664
23665
23666
23667
23668
23669 GNULIB_MKDTEMP=1
23670
23671
23672
23673
23674
23675$as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
23676
23677
23678
23679
23680
2d8adcbd
MM
23681
23682
b3279b60
TT
23683
23684
472fa5ee
SM
23685 :
23686
23687
23688
23689
23690
b3279b60
TT
23691 if test $ac_cv_func_mkostemp != yes; then
23692 HAVE_MKOSTEMP=0
23693 fi
2d8adcbd 23694
b3279b60 23695 if test $HAVE_MKOSTEMP = 0; then
2d8adcbd 23696
2d8adcbd 23697
2d8adcbd 23698
2d8adcbd 23699
2d8adcbd
MM
23700
23701
23702
23703
b3279b60 23704 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
2d8adcbd
MM
23705
23706
23707
b3279b60 23708 fi
2d8adcbd 23709
2d8adcbd 23710
b3279b60
TT
23711cat >>confdefs.h <<_ACEOF
23712#define GNULIB_MKOSTEMP 1
23713_ACEOF
2d8adcbd
MM
23714
23715
2d8adcbd
MM
23716
23717
23718
23719
23720
b3279b60 23721 GNULIB_MKOSTEMP=1
2d8adcbd
MM
23722
23723
23724
23725
23726
b3279b60 23727$as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
2d8adcbd
MM
23728
23729
23730
23731
6ec2e0f5
SDJ
23732 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23733
23734
23735
c971b7fa 23736
c971b7fa 23737
c971b7fa
PA
23738
23739
8690e634 23740
6ec2e0f5 23741 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
8690e634 23742
6ec2e0f5 23743 fi
8690e634 23744
6ec2e0f5 23745 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
8690e634
JK
23746
23747
23748
23749
23750
23751
8690e634
JK
23752
23753
6ec2e0f5 23754 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
8690e634 23755
a512b375 23756 fi
8690e634
JK
23757
23758
725e2999
JB
23759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
23760$as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
23761if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
23762 $as_echo_n "(cached) " >&6
23763else
23764
23765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23766/* end confdefs.h. */
23767#include <netinet/in.h>
23768int
23769main ()
23770{
23771
23772 ;
23773 return 0;
23774}
23775_ACEOF
23776if ac_fn_c_try_compile "$LINENO"; then :
23777 gl_cv_header_netinet_in_h_selfcontained=yes
23778else
23779 gl_cv_header_netinet_in_h_selfcontained=no
23780fi
23781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23782
23783fi
23784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
23785$as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
23786 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
23787 NETINET_IN_H=''
23788 else
23789 NETINET_IN_H='netinet/in.h'
23790 for ac_header in netinet/in.h
23791do :
23792 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
23793if test "x$ac_cv_header_netinet_in_h" = xyes; then :
23794 cat >>confdefs.h <<_ACEOF
23795#define HAVE_NETINET_IN_H 1
23796_ACEOF
23797
23798fi
23799
23800done
23801
23802
23803
23804
23805
23806
23807
23808 :
23809
23810
23811
23812
23813
23814
23815
23816
23817 if test $gl_cv_have_include_next = yes; then
23818 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
23819 else
23820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
23821$as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
23822if ${gl_cv_next_netinet_in_h+:} false; then :
23823 $as_echo_n "(cached) " >&6
23824else
23825
23826 if test $ac_cv_header_netinet_in_h = yes; then
23827
23828
23829
23830
23831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23832/* end confdefs.h. */
23833#include <netinet/in.h>
23834_ACEOF
23835 case "$host_os" in
23836 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23837 *) gl_absname_cpp="$ac_cpp" ;;
23838 esac
23839
23840 case "$host_os" in
23841 mingw*)
23842 gl_dirsep_regex='[/\\]'
23843 ;;
23844 *)
23845 gl_dirsep_regex='\/'
23846 ;;
23847 esac
23848 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23849 gl_header_literal_regex=`echo 'netinet/in.h' \
23850 | sed -e "$gl_make_literal_regex_sed"`
23851 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23852 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23853 s|^/[^/]|//&|
23854 p
23855 q
23856 }'
23857
23858 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23859 sed -n "$gl_absolute_header_sed"`
23860
23861 gl_header=$gl_cv_absolute_netinet_in_h
23862 gl_cv_next_netinet_in_h='"'$gl_header'"'
23863 else
23864 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
23865 fi
23866
23867
23868fi
23869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
23870$as_echo "$gl_cv_next_netinet_in_h" >&6; }
23871 fi
23872 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
23873
23874 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23875 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23876 gl_next_as_first_directive='<'netinet/in.h'>'
23877 else
23878 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23879 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
23880 fi
23881 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
23882
23883
23884
23885
23886 if test $ac_cv_header_netinet_in_h = yes; then
23887 HAVE_NETINET_IN_H=1
23888 else
23889 HAVE_NETINET_IN_H=0
23890 fi
23891
23892 fi
23893
23894 if test -n "$NETINET_IN_H"; then
23895 GL_GENERATE_NETINET_IN_H_TRUE=
23896 GL_GENERATE_NETINET_IN_H_FALSE='#'
23897else
23898 GL_GENERATE_NETINET_IN_H_TRUE='#'
23899 GL_GENERATE_NETINET_IN_H_FALSE=
23900fi
23901
23902
23903
23904
8690e634 23905
6ec2e0f5
SDJ
23906 case "$host_os" in
23907 mingw* | pw*)
23908 REPLACE_OPEN=1
23909 ;;
23910 *)
23911
472fa5ee
SM
23912 :
23913
23914
23915
23916
23917
6ec2e0f5
SDJ
23918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
23919$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
d0ac1c44 23920if ${gl_cv_func_open_slash+:} false; then :
6ec2e0f5
SDJ
23921 $as_echo_n "(cached) " >&6
23922else
23923 # Assume that if we have lstat, we can also check symlinks.
23924 if test $ac_cv_func_lstat = yes; then
23925 touch conftest.tmp
23926 ln -s conftest.tmp conftest.lnk
23927 fi
23928 if test "$cross_compiling" = yes; then :
8690e634 23929
6ec2e0f5
SDJ
23930 case "$host_os" in
23931 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
23932 gl_cv_func_open_slash="guessing no" ;;
23933 *)
23934 gl_cv_func_open_slash="guessing yes" ;;
23935 esac
8690e634 23936
6ec2e0f5
SDJ
23937else
23938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23939/* end confdefs.h. */
23940
23941#include <fcntl.h>
23942#if HAVE_UNISTD_H
23943# include <unistd.h>
23944#endif
23945int main ()
23946{
23947 int result = 0;
23948#if HAVE_LSTAT
23949 if (open ("conftest.lnk/", O_RDONLY) != -1)
23950 result |= 1;
23951#endif
23952 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
23953 result |= 2;
23954 return result;
23955}
23956_ACEOF
23957if ac_fn_c_try_run "$LINENO"; then :
23958 gl_cv_func_open_slash=yes
23959else
23960 gl_cv_func_open_slash=no
23961fi
23962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23963 conftest.$ac_objext conftest.beam conftest.$ac_ext
23964fi
8690e634 23965
6ec2e0f5 23966 rm -f conftest.sl conftest.tmp conftest.lnk
8690e634 23967
6ec2e0f5
SDJ
23968fi
23969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
23970$as_echo "$gl_cv_func_open_slash" >&6; }
23971 case "$gl_cv_func_open_slash" in
23972 *no)
8690e634 23973
6ec2e0f5 23974$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
8690e634 23975
6ec2e0f5
SDJ
23976 REPLACE_OPEN=1
23977 ;;
23978 esac
23979 ;;
23980 esac
8690e634 23981
6ec2e0f5 23982 if test $REPLACE_OPEN = 0; then
c971b7fa
PA
23983
23984
23985
472fa5ee
SM
23986 :
23987
23988
23989
23990
23991
6ec2e0f5
SDJ
23992 if test $ac_cv_func_fchdir = no; then
23993 HAVE_FCHDIR=0
23994 fi
c971b7fa 23995
6ec2e0f5
SDJ
23996 if test $HAVE_FCHDIR = 0; then
23997 REPLACE_OPEN=1
23998 fi
23999 fi
c971b7fa
PA
24000
24001
24002
6ec2e0f5 24003 if test $REPLACE_OPEN = 1; then
c971b7fa
PA
24004
24005
24006
24007
24008
c971b7fa
PA
24009
24010
c971b7fa 24011
6ec2e0f5 24012 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
c971b7fa 24013
c971b7fa
PA
24014
24015
6ec2e0f5
SDJ
24016 :
24017
a512b375 24018 fi
c971b7fa
PA
24019
24020
24021
24022
24023
6ec2e0f5 24024 GNULIB_OPEN=1
c971b7fa
PA
24025
24026
24027
24028
24029
6ec2e0f5 24030$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
c971b7fa
PA
24031
24032
24033
24034
24035
c971b7fa 24036
c971b7fa 24037
472fa5ee
SM
24038 :
24039
24040
24041
24042
24043
63ce7108 24044
5e8754f9
SDJ
24045 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
24046 yes+*yes)
6ec2e0f5
SDJ
24047 ;;
24048 yes+*)
24049 # Solaris 9 has *at functions, but uniformly mishandles trailing
24050 # slash in all of them.
24051 REPLACE_OPENAT=1
24052 ;;
24053 *)
24054 HAVE_OPENAT=0
24055 ;;
24056 esac
63ce7108 24057
6ec2e0f5 24058 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
63ce7108 24059
63ce7108 24060
63ce7108 24061
63ce7108 24062
63ce7108
TT
24063
24064
63ce7108 24065
63ce7108 24066
6ec2e0f5 24067 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
63ce7108
TT
24068
24069
24070
6ec2e0f5 24071 :
63ce7108 24072
6ec2e0f5 24073 fi
63ce7108
TT
24074
24075
6ec2e0f5
SDJ
24076cat >>confdefs.h <<_ACEOF
24077#define GNULIB_OPENAT 1
24078_ACEOF
63ce7108 24079
63ce7108 24080
63ce7108
TT
24081
24082
24083
24084
6ec2e0f5 24085 GNULIB_OPENAT=1
63ce7108 24086
63ce7108 24087
63ce7108 24088
63ce7108 24089
63ce7108 24090
6ec2e0f5 24091$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
63ce7108
TT
24092
24093
63ce7108 24094
63ce7108 24095
63ce7108 24096
63ce7108 24097
6ec2e0f5
SDJ
24098 for ac_func in opendir
24099do :
24100 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
d0ac1c44 24101if test "x$ac_cv_func_opendir" = xyes; then :
6ec2e0f5
SDJ
24102 cat >>confdefs.h <<_ACEOF
24103#define HAVE_OPENDIR 1
63ce7108 24104_ACEOF
6ec2e0f5 24105
63ce7108 24106fi
6ec2e0f5 24107done
63ce7108 24108
6ec2e0f5
SDJ
24109 if test $ac_cv_func_opendir = no; then
24110 HAVE_OPENDIR=0
24111 fi
63ce7108 24112
6ec2e0f5
SDJ
24113
24114
24115
472fa5ee
SM
24116 :
24117
24118
24119
24120
24121
6ec2e0f5
SDJ
24122 if test $ac_cv_func_fchdir = no; then
24123 HAVE_FCHDIR=0
63ce7108 24124 fi
63ce7108 24125
6ec2e0f5
SDJ
24126 if test $HAVE_FCHDIR = 0; then
24127 if test $HAVE_OPENDIR = 1; then
24128 REPLACE_OPENDIR=1
24129 fi
24130 fi
24131
24132 case $host_os,$HAVE_OPENDIR in
24133 os2*,1)
24134 REPLACE_OPENDIR=1;;
24135 esac
24136
24137 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
63ce7108
TT
24138
24139
24140
24141
24142
24143
24144
24145
6ec2e0f5 24146 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
63ce7108
TT
24147
24148 fi
24149
24150
24151
24152
24153
6ec2e0f5 24154 GNULIB_OPENDIR=1
63ce7108
TT
24155
24156
24157
24158
63ce7108 24159
6ec2e0f5 24160$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
63ce7108
TT
24161
24162
24163
24164
24165
472fa5ee
SM
24166 :
24167
24168
24169
24170
24171
63ce7108
TT
24172
24173
2196f55f
YQ
24174
24175
8424cc97
SM
24176
24177 for ac_func in rawmemchr
24178do :
24179 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
d0ac1c44 24180if test "x$ac_cv_func_rawmemchr" = xyes; then :
8424cc97
SM
24181 cat >>confdefs.h <<_ACEOF
24182#define HAVE_RAWMEMCHR 1
24183_ACEOF
24184
24185fi
24186done
24187
24188 if test $ac_cv_func_rawmemchr = no; then
24189 HAVE_RAWMEMCHR=0
24190 fi
24191
24192 if test $HAVE_RAWMEMCHR = 0; then
24193
24194
24195
24196
24197
24198
24199
24200
24201 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
24202
24203 :
24204 fi
24205
24206
24207
24208
24209
24210 GNULIB_RAWMEMCHR=1
24211
24212
24213
24214
24215
24216$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
24217
24218
24219
24220
24221
24222
6ec2e0f5
SDJ
24223 for ac_func in readdir
24224do :
24225 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
d0ac1c44 24226if test "x$ac_cv_func_readdir" = xyes; then :
6ec2e0f5
SDJ
24227 cat >>confdefs.h <<_ACEOF
24228#define HAVE_READDIR 1
24229_ACEOF
24230
24231fi
24232done
24233
24234 if test $ac_cv_func_readdir = no; then
24235 HAVE_READDIR=0
24236 fi
24237
24238 if test $HAVE_READDIR = 0; then
24239
24240
24241
24242
24243
24244
24245
24246
24247 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
24248
24249 fi
24250
24251
24252
24253
24254
24255 GNULIB_READDIR=1
24256
24257
24258
24259
24260
24261$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
24262
24263
24264
24265
24266
24267
472fa5ee
SM
24268 :
24269
24270
24271
24272
24273
2196f55f
YQ
24274 if test $ac_cv_func_readlink = no; then
24275 HAVE_READLINK=0
24276 else
24277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
24278$as_echo_n "checking whether readlink signature is correct... " >&6; }
d0ac1c44 24279if ${gl_cv_decl_readlink_works+:} false; then :
2196f55f
YQ
24280 $as_echo_n "(cached) " >&6
24281else
24282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24283/* end confdefs.h. */
24284#include <unistd.h>
24285 /* Cause compilation failure if original declaration has wrong type. */
24286 ssize_t readlink (const char *, char *, size_t);
24287int
24288main ()
24289{
24290
24291 ;
24292 return 0;
24293}
24294_ACEOF
24295if ac_fn_c_try_compile "$LINENO"; then :
24296 gl_cv_decl_readlink_works=yes
24297else
24298 gl_cv_decl_readlink_works=no
24299fi
24300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24301fi
24302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
24303$as_echo "$gl_cv_decl_readlink_works" >&6; }
24304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
24305$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
d0ac1c44 24306if ${gl_cv_func_readlink_works+:} false; then :
2196f55f
YQ
24307 $as_echo_n "(cached) " >&6
24308else
24309 # We have readlink, so assume ln -s works.
24310 ln -s conftest.no-such conftest.link
24311 ln -s conftest.link conftest.lnk2
24312 if test "$cross_compiling" = yes; then :
24313 case "$host_os" in
5e8754f9
SDJ
24314 # Guess yes on glibc systems.
24315 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
24316 # If we don't know, assume the worst.
24317 *) gl_cv_func_readlink_works="guessing no" ;;
2196f55f
YQ
24318 esac
24319
24320else
24321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24322/* end confdefs.h. */
24323#include <unistd.h>
24324
24325int
24326main ()
24327{
24328char buf[20];
24329 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
24330 ;
24331 return 0;
24332}
24333_ACEOF
24334if ac_fn_c_try_run "$LINENO"; then :
24335 gl_cv_func_readlink_works=yes
24336else
24337 gl_cv_func_readlink_works=no
24338fi
24339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24340 conftest.$ac_objext conftest.beam conftest.$ac_ext
24341fi
24342
24343 rm -f conftest.link conftest.lnk2
24344fi
24345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
24346$as_echo "$gl_cv_func_readlink_works" >&6; }
24347 case "$gl_cv_func_readlink_works" in
24348 *yes)
24349 if test "$gl_cv_decl_readlink_works" != yes; then
24350 REPLACE_READLINK=1
24351 fi
24352 ;;
24353 *)
24354
24355$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
24356
24357 REPLACE_READLINK=1
24358 ;;
24359 esac
24360 fi
24361
24362 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
24363
24364
24365
24366
24367
24368
24369
24370
24371 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
24372
24373
24374 :
24375
24376 fi
24377
24378
24379
24380
24381
24382 GNULIB_READLINK=1
24383
24384
24385
24386
24387
24388$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
24389
24390
24391
24392
6a29c58e
YQ
24393
24394
6ec2e0f5
SDJ
24395 if test $gl_cv_func_malloc_posix = yes; then
24396
24397$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
24398
24399 else
24400 REPLACE_REALLOC=1
24401 fi
24402
24403 if test $REPLACE_REALLOC = 1; then
24404
24405
24406
24407
24408
24409
24410
24411
24412 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
24413
24414 fi
24415
24416
24417
24418
24419
24420 GNULIB_REALLOC_POSIX=1
24421
24422
24423
24424
24425
24426$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
24427
24428
24429
24430
24431
24432
6a29c58e 24433
472fa5ee
SM
24434 :
24435
24436
24437
24438
24439
6a29c58e
YQ
24440
24441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
24442$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
d0ac1c44 24443if ${gl_cv_func_rename_slash_dst_works+:} false; then :
6a29c58e
YQ
24444 $as_echo_n "(cached) " >&6
24445else
24446 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
24447 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 24448 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
24449 # Assume that if we have lstat, we can also check symlinks.
24450 if test $ac_cv_func_lstat = yes; then
24451 ln -s conftest.f conftest.lnk
24452 fi
24453 if test "$cross_compiling" = yes; then :
24454 case "$host_os" in
5e8754f9
SDJ
24455 # Guess yes on glibc systems.
24456 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
24457 # If we don't know, assume the worst.
24458 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
6a29c58e
YQ
24459 esac
24460
24461else
24462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24463/* end confdefs.h. */
24464
24465# include <stdio.h>
24466# include <stdlib.h>
24467
24468int
24469main ()
24470{
24471int result = 0;
24472 if (rename ("conftest.f1", "conftest.f2/") == 0)
24473 result |= 1;
24474 if (rename ("conftest.d1", "conftest.d2/") != 0)
24475 result |= 2;
24476#if HAVE_LSTAT
24477 if (rename ("conftest.f", "conftest.lnk/") == 0)
24478 result |= 4;
24479#endif
24480 return result;
24481
24482 ;
24483 return 0;
24484}
24485_ACEOF
24486if ac_fn_c_try_run "$LINENO"; then :
24487 gl_cv_func_rename_slash_dst_works=yes
24488else
24489 gl_cv_func_rename_slash_dst_works=no
24490fi
24491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24492 conftest.$ac_objext conftest.beam conftest.$ac_ext
24493fi
24494
24495 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
24496
24497fi
24498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
24499$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
24500 case "$gl_cv_func_rename_slash_dst_works" in
24501 *yes) ;;
24502 *)
24503 REPLACE_RENAME=1
24504
24505$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
24506
24507 ;;
24508 esac
24509
24510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
24511$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
d0ac1c44 24512if ${gl_cv_func_rename_slash_src_works+:} false; then :
6a29c58e
YQ
24513 $as_echo_n "(cached) " >&6
24514else
24515 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
24516 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 24517 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
24518 # Assume that if we have lstat, we can also check symlinks.
24519 if test $ac_cv_func_lstat = yes; then
24520 ln -s conftest.f conftest.lnk
24521 fi
24522 if test "$cross_compiling" = yes; then :
24523 case "$host_os" in
5e8754f9
SDJ
24524 # Guess yes on glibc systems.
24525 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
24526 # If we don't know, assume the worst.
24527 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
6a29c58e
YQ
24528 esac
24529
24530else
24531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24532/* end confdefs.h. */
24533
24534# include <stdio.h>
24535# include <stdlib.h>
24536
24537int
24538main ()
24539{
24540int result = 0;
24541 if (rename ("conftest.f1/", "conftest.d3") == 0)
24542 result |= 1;
24543 if (rename ("conftest.d1/", "conftest.d2") != 0)
24544 result |= 2;
24545#if HAVE_LSTAT
24546 if (rename ("conftest.lnk/", "conftest.f") == 0)
24547 result |= 4;
24548#endif
24549 return result;
24550
24551 ;
24552 return 0;
24553}
24554_ACEOF
24555if ac_fn_c_try_run "$LINENO"; then :
24556 gl_cv_func_rename_slash_src_works=yes
24557else
24558 gl_cv_func_rename_slash_src_works=no
24559fi
24560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24561 conftest.$ac_objext conftest.beam conftest.$ac_ext
24562fi
24563
24564 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
24565
24566fi
24567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
24568$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
24569 case "$gl_cv_func_rename_slash_src_works" in
24570 *yes) ;;
24571 *)
24572 REPLACE_RENAME=1
24573
24574$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
24575
24576 ;;
24577 esac
24578
24579
472fa5ee
SM
24580 :
24581
24582
24583
24584
24585
6a29c58e
YQ
24586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
24587$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
d0ac1c44 24588if ${gl_cv_func_rename_link_works+:} false; then :
6a29c58e
YQ
24589 $as_echo_n "(cached) " >&6
24590else
24591 if test $ac_cv_func_link = yes; then
5e8754f9
SDJ
24592 rm -rf conftest.f conftest.f1
24593 if touch conftest.f && ln conftest.f conftest.f1 &&
6a29c58e
YQ
24594 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
24595 if test "$cross_compiling" = yes; then :
24596 case "$host_os" in
5e8754f9
SDJ
24597 # Guess yes on glibc systems.
24598 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
24599 # If we don't know, assume the worst.
24600 *) gl_cv_func_rename_link_works="guessing no" ;;
6a29c58e
YQ
24601 esac
24602
24603else
24604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24605/* end confdefs.h. */
24606
24607# include <stdio.h>
24608# include <stdlib.h>
24609# include <unistd.h>
24610
24611int
24612main ()
24613{
24614int result = 0;
24615 if (rename ("conftest.f", "conftest.f1"))
24616 result |= 1;
24617 if (unlink ("conftest.f1"))
24618 result |= 2;
5e8754f9 24619 if (rename ("conftest.f", "conftest.f"))
6a29c58e
YQ
24620 result |= 4;
24621 if (rename ("conftest.f1", "conftest.f1") == 0)
24622 result |= 8;
24623 return result;
24624
24625 ;
24626 return 0;
24627}
24628_ACEOF
24629if ac_fn_c_try_run "$LINENO"; then :
24630 gl_cv_func_rename_link_works=yes
24631else
24632 gl_cv_func_rename_link_works=no
24633fi
24634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24635 conftest.$ac_objext conftest.beam conftest.$ac_ext
24636fi
24637
24638 else
24639 gl_cv_func_rename_link_works="guessing no"
24640 fi
5e8754f9 24641 rm -rf conftest.f conftest.f1
6a29c58e
YQ
24642 else
24643 gl_cv_func_rename_link_works=yes
24644 fi
24645
24646fi
24647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
24648$as_echo "$gl_cv_func_rename_link_works" >&6; }
24649 case "$gl_cv_func_rename_link_works" in
24650 *yes) ;;
24651 *)
24652 REPLACE_RENAME=1
24653
24654$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
24655
24656 ;;
24657 esac
24658
24659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
24660$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
d0ac1c44 24661if ${gl_cv_func_rename_dest_works+:} false; then :
6a29c58e
YQ
24662 $as_echo_n "(cached) " >&6
24663else
24664 rm -rf conftest.f conftest.d1 conftest.d2
24665 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
d0ac1c44 24666 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
24667 if test "$cross_compiling" = yes; then :
24668 case "$host_os" in
5e8754f9
SDJ
24669 # Guess yes on glibc systems.
24670 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
24671 # If we don't know, assume the worst.
24672 *) gl_cv_func_rename_dest_works="guessing no" ;;
6a29c58e
YQ
24673 esac
24674
24675else
24676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24677/* end confdefs.h. */
24678
24679# include <stdio.h>
24680# include <stdlib.h>
24681
24682int
24683main ()
24684{
24685int result = 0;
24686 if (rename ("conftest.d1", "conftest.d2") != 0)
24687 result |= 1;
24688 if (rename ("conftest.d2", "conftest.f") == 0)
24689 result |= 2;
24690 return result;
24691
24692 ;
24693 return 0;
24694}
24695_ACEOF
24696if ac_fn_c_try_run "$LINENO"; then :
24697 gl_cv_func_rename_dest_works=yes
24698else
24699 gl_cv_func_rename_dest_works=no
24700fi
24701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24702 conftest.$ac_objext conftest.beam conftest.$ac_ext
24703fi
24704
24705 rm -rf conftest.f conftest.d1 conftest.d2
24706
24707fi
24708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
24709$as_echo "$gl_cv_func_rename_dest_works" >&6; }
24710 case "$gl_cv_func_rename_dest_works" in
24711 *yes) ;;
24712 *)
24713 REPLACE_RENAME=1
24714
24715$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
24716
24717 ;;
24718 esac
24719
24720 if test $REPLACE_RENAME = 1; then
24721
24722
24723
24724
24725
24726
24727
24728
24729 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
24730
24731 fi
24732
24733
24734
24735
24736
24737 GNULIB_RENAME=1
24738
24739
24740
24741
24742
24743$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
24744
24745
24746
24747
24748
24749
6ec2e0f5
SDJ
24750 for ac_func in rewinddir
24751do :
24752 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
d0ac1c44 24753if test "x$ac_cv_func_rewinddir" = xyes; then :
6ec2e0f5
SDJ
24754 cat >>confdefs.h <<_ACEOF
24755#define HAVE_REWINDDIR 1
24756_ACEOF
24757
24758fi
24759done
24760
24761 if test $ac_cv_func_rewinddir = no; then
24762 HAVE_REWINDDIR=0
24763 fi
24764
24765 if test $HAVE_REWINDDIR = 0; then
24766
24767
24768
24769
24770
24771
24772
24773
24774 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
24775
24776 fi
24777
24778
24779
24780
24781
24782 GNULIB_REWINDDIR=1
24783
24784
24785
24786
24787
24788$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
24789
24790
24791
24792
24793
24794
472fa5ee
SM
24795 :
24796
24797
24798
24799
24800
6a29c58e
YQ
24801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
24802$as_echo_n "checking whether rmdir works... " >&6; }
d0ac1c44 24803if ${gl_cv_func_rmdir_works+:} false; then :
6a29c58e
YQ
24804 $as_echo_n "(cached) " >&6
24805else
24806 mkdir conftest.dir
24807 touch conftest.file
24808 if test "$cross_compiling" = yes; then :
24809 case "$host_os" in
5e8754f9
SDJ
24810 # Guess yes on glibc systems.
24811 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
24812 # If we don't know, assume the worst.
24813 *) gl_cv_func_rmdir_works="guessing no" ;;
6a29c58e
YQ
24814 esac
24815
24816else
24817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24818/* end confdefs.h. */
24819#include <stdio.h>
24820 #include <errno.h>
24821 #if HAVE_UNISTD_H
24822 # include <unistd.h>
24823 #else /* on Windows with MSVC */
24824 # include <direct.h>
24825 #endif
24826
24827int
24828main ()
24829{
24830int result = 0;
24831 if (!rmdir ("conftest.file/"))
24832 result |= 1;
24833 else if (errno != ENOTDIR)
24834 result |= 2;
24835 if (!rmdir ("conftest.dir/./"))
24836 result |= 4;
24837 return result;
24838
24839 ;
24840 return 0;
24841}
24842_ACEOF
24843if ac_fn_c_try_run "$LINENO"; then :
24844 gl_cv_func_rmdir_works=yes
24845else
24846 gl_cv_func_rmdir_works=no
24847fi
24848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24849 conftest.$ac_objext conftest.beam conftest.$ac_ext
24850fi
24851
24852 rm -rf conftest.dir conftest.file
24853fi
24854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
24855$as_echo "$gl_cv_func_rmdir_works" >&6; }
24856 case "$gl_cv_func_rmdir_works" in
24857 *yes) ;;
24858 *)
24859 REPLACE_RMDIR=1
24860 ;;
24861 esac
24862
24863 if test $REPLACE_RMDIR = 1; then
24864
24865
24866
24867
24868
24869
24870
24871
24872 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
24873
24874 fi
24875
24876
24877
24878
24879
24880 GNULIB_RMDIR=1
24881
24882
24883
24884
24885
24886$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
24887
24888
24889
24890
0750520d 24891
472fa5ee
SM
24892 :
24893
24894
24895
24896
24897
24898
24899
24900
5e8754f9
SDJ
24901
24902
24903
24904 :
24905
24906
24907
24908
24909
24910 if test $ac_cv_func_secure_getenv = no; then
24911 HAVE_SECURE_GETENV=0
24912 fi
24913
24914 if test $HAVE_SECURE_GETENV = 0; then
24915
24916
24917
24918
24919
24920
24921
24922
24923 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
24924
24925
24926 for ac_func in __secure_getenv
24927do :
24928 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
24929if test "x$ac_cv_func___secure_getenv" = xyes; then :
24930 cat >>confdefs.h <<_ACEOF
24931#define HAVE___SECURE_GETENV 1
24932_ACEOF
24933
24934fi
24935done
24936
24937 if test $ac_cv_func___secure_getenv = no; then
24938 for ac_func in issetugid
24939do :
24940 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
24941if test "x$ac_cv_func_issetugid" = xyes; then :
24942 cat >>confdefs.h <<_ACEOF
24943#define HAVE_ISSETUGID 1
24944_ACEOF
24945
24946fi
24947done
24948
24949 fi
24950
24951 :
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967 fi
24968
24969
24970
24971
24972
24973 GNULIB_SECURE_GETENV=1
24974
24975
24976
24977
24978
24979$as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
24980
24981
24982
24983
24984
3d99e817
AK
24985 if test $ac_cv_func_setenv = no; then
24986 HAVE_SETENV=0
24987 else
24988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
24989$as_echo_n "checking whether setenv validates arguments... " >&6; }
d0ac1c44 24990if ${gl_cv_func_setenv_works+:} false; then :
3d99e817
AK
24991 $as_echo_n "(cached) " >&6
24992else
24993 if test "$cross_compiling" = yes; then :
24994 case "$host_os" in
5e8754f9
SDJ
24995 # Guess yes on glibc systems.
24996 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
24997 # If we don't know, assume the worst.
24998 *) gl_cv_func_setenv_works="guessing no" ;;
3d99e817
AK
24999 esac
25000
25001else
25002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25003/* end confdefs.h. */
25004
25005 #include <stdlib.h>
25006 #include <errno.h>
25007 #include <string.h>
25008
25009int
25010main ()
25011{
25012
25013 int result = 0;
25014 {
25015 if (setenv ("", "", 0) != -1)
25016 result |= 1;
25017 else if (errno != EINVAL)
25018 result |= 2;
25019 }
25020 {
25021 if (setenv ("a", "=", 1) != 0)
25022 result |= 4;
25023 else if (strcmp (getenv ("a"), "=") != 0)
25024 result |= 8;
25025 }
25026 return result;
25027
25028 ;
25029 return 0;
25030}
25031_ACEOF
25032if ac_fn_c_try_run "$LINENO"; then :
25033 gl_cv_func_setenv_works=yes
25034else
25035 gl_cv_func_setenv_works=no
25036fi
25037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25038 conftest.$ac_objext conftest.beam conftest.$ac_ext
25039fi
25040
25041fi
25042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
25043$as_echo "$gl_cv_func_setenv_works" >&6; }
25044 case "$gl_cv_func_setenv_works" in
25045 *yes) ;;
25046 *)
25047 REPLACE_SETENV=1
25048 ;;
25049 esac
25050 fi
25051
25052 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
25053
25054
25055
25056
25057
25058
25059
25060
25061 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
25062
25063 fi
25064
25065
25066
25067
25068
25069 GNULIB_SETENV=1
25070
25071
25072
25073
25074
25075$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
25076
25077
25078
25079
25080
0750520d
PA
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090 if test $gl_cv_have_include_next = yes; then
25091 gl_cv_next_signal_h='<'signal.h'>'
25092 else
25093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
25094$as_echo_n "checking absolute name of <signal.h>... " >&6; }
d0ac1c44 25095if ${gl_cv_next_signal_h+:} false; then :
0750520d
PA
25096 $as_echo_n "(cached) " >&6
25097else
25098
25099
25100
25101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25102/* end confdefs.h. */
25103#include <signal.h>
25104_ACEOF
25105 case "$host_os" in
25106 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25107 *) gl_absname_cpp="$ac_cpp" ;;
25108 esac
25109
25110 case "$host_os" in
25111 mingw*)
25112 gl_dirsep_regex='[/\\]'
25113 ;;
25114 *)
25115 gl_dirsep_regex='\/'
25116 ;;
25117 esac
25118 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25119 gl_header_literal_regex=`echo 'signal.h' \
25120 | sed -e "$gl_make_literal_regex_sed"`
25121 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25122 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25123 s|^/[^/]|//&|
25124 p
25125 q
25126 }'
25127
25128 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25129 sed -n "$gl_absolute_header_sed"`
25130
25131 gl_header=$gl_cv_absolute_signal_h
25132 gl_cv_next_signal_h='"'$gl_header'"'
25133
25134
25135fi
25136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
25137$as_echo "$gl_cv_next_signal_h" >&6; }
25138 fi
25139 NEXT_SIGNAL_H=$gl_cv_next_signal_h
25140
25141 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25142 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25143 gl_next_as_first_directive='<'signal.h'>'
25144 else
25145 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25146 gl_next_as_first_directive=$gl_cv_next_signal_h
25147 fi
25148 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
25149
25150
25151
25152
25153
25154# AIX declares sig_atomic_t to already include volatile, and C89 compilers
25155# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
25156 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
25157#include <signal.h>
25158
25159"
d0ac1c44 25160if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
0750520d
PA
25161
25162else
25163 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
25164fi
25165
25166
25167
25168
25169
25170
25171
25172 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
25173#include <signal.h>
25174
25175"
d0ac1c44 25176if test "x$ac_cv_type_sighandler_t" = xyes; then :
0750520d
PA
25177
25178else
25179 HAVE_SIGHANDLER_T=0
25180fi
25181
25182
25183
5e8754f9
SDJ
25184 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
25185 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25187$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25188if eval \${$as_gl_Symbol+:} false; then :
25189 $as_echo_n "(cached) " >&6
25190else
25191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25192/* end confdefs.h. */
25193#include <signal.h>
25194
25195int
25196main ()
25197{
25198#undef $gl_func
25199 (void) $gl_func;
25200 ;
25201 return 0;
25202}
25203_ACEOF
25204if ac_fn_c_try_compile "$LINENO"; then :
25205 eval "$as_gl_Symbol=yes"
25206else
25207 eval "$as_gl_Symbol=no"
25208fi
25209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25210fi
25211eval ac_res=\$$as_gl_Symbol
25212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25213$as_echo "$ac_res" >&6; }
25214 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25215 cat >>confdefs.h <<_ACEOF
25216#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25217_ACEOF
0750520d 25218
5e8754f9
SDJ
25219 eval ac_cv_have_decl_$gl_func=yes
25220fi
25221 done
0750520d
PA
25222
25223
725e2999
JB
25224 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
25225/* <sys/types.h> is not needed according to POSIX, but the
25226 <sys/socket.h> in i386-unknown-freebsd4.10 and
25227 powerpc-apple-darwin5.5 required it. */
25228#include <sys/types.h>
25229#if HAVE_SYS_SOCKET_H
25230# include <sys/socket.h>
25231#elif HAVE_WS2TCPIP_H
25232# include <ws2tcpip.h>
25233#endif
25234
25235"
25236if test "x$ac_cv_type_socklen_t" = xyes; then :
25237
25238else
25239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
25240$as_echo_n "checking for socklen_t equivalent... " >&6; }
25241 if ${gl_cv_socklen_t_equiv+:} false; then :
25242 $as_echo_n "(cached) " >&6
25243else
25244 # Systems have either "struct sockaddr *" or
25245 # "void *" as the second argument to getpeername
25246 gl_cv_socklen_t_equiv=
25247 for arg2 in "struct sockaddr" void; do
25248 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
25249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25250/* end confdefs.h. */
25251#include <sys/types.h>
25252 #include <sys/socket.h>
25253
25254 int getpeername (int, $arg2 *, $t *);
25255int
25256main ()
25257{
25258$t len;
25259 getpeername (0, 0, &len);
25260 ;
25261 return 0;
25262}
25263_ACEOF
25264if ac_fn_c_try_compile "$LINENO"; then :
25265 gl_cv_socklen_t_equiv="$t"
25266fi
25267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25268 test "$gl_cv_socklen_t_equiv" != "" && break
25269 done
25270 test "$gl_cv_socklen_t_equiv" != "" && break
25271 done
25272
25273fi
25274
25275 if test "$gl_cv_socklen_t_equiv" = ""; then
25276 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
25277 fi
25278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
25279$as_echo "$gl_cv_socklen_t_equiv" >&6; }
25280
25281cat >>confdefs.h <<_ACEOF
25282#define socklen_t $gl_cv_socklen_t_equiv
25283_ACEOF
25284
25285fi
25286
0750520d 25287
63ce7108
TT
25288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25289$as_echo_n "checking for ssize_t... " >&6; }
d0ac1c44 25290if ${gt_cv_ssize_t+:} false; then :
63ce7108
TT
25291 $as_echo_n "(cached) " >&6
25292else
25293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25294/* end confdefs.h. */
25295#include <sys/types.h>
25296int
25297main ()
25298{
25299int x = sizeof (ssize_t *) + sizeof (ssize_t);
25300 return !x;
25301 ;
25302 return 0;
25303}
25304_ACEOF
25305if ac_fn_c_try_compile "$LINENO"; then :
25306 gt_cv_ssize_t=yes
25307else
25308 gt_cv_ssize_t=no
25309fi
25310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25311fi
25312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25313$as_echo "$gt_cv_ssize_t" >&6; }
25314 if test $gt_cv_ssize_t = no; then
25315
25316$as_echo "#define ssize_t int" >>confdefs.h
25317
25318 fi
25319
25320
25321
25322
472fa5ee
SM
25323 :
25324
25325
25326
25327
25328
5e8754f9
SDJ
25329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
25330$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
25331if ${gl_cv_func_stat_dir_slash+:} false; then :
2196f55f
YQ
25332 $as_echo_n "(cached) " >&6
25333else
5e8754f9
SDJ
25334 if test "$cross_compiling" = yes; then :
25335 case $host_os in
25336 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
25337 *) gl_cv_func_stat_dir_slash="guessing yes";;
25338 esac
2196f55f
YQ
25339else
25340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25341/* end confdefs.h. */
25342#include <sys/stat.h>
25343
25344int
25345main ()
25346{
5e8754f9 25347struct stat st; return stat (".", &st) != stat ("./", &st);
2196f55f
YQ
25348 ;
25349 return 0;
25350}
25351_ACEOF
25352if ac_fn_c_try_run "$LINENO"; then :
5e8754f9 25353 gl_cv_func_stat_dir_slash=yes
2196f55f 25354else
5e8754f9 25355 gl_cv_func_stat_dir_slash=no
2196f55f
YQ
25356fi
25357rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25358 conftest.$ac_objext conftest.beam conftest.$ac_ext
25359fi
25360
25361fi
5e8754f9
SDJ
25362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
25363$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
25364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
25365$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
25366if ${gl_cv_func_stat_file_slash+:} false; then :
7a6dbc2f 25367 $as_echo_n "(cached) " >&6
2196f55f 25368else
5e8754f9
SDJ
25369 touch conftest.tmp
25370 # Assume that if we have lstat, we can also check symlinks.
25371 if test $ac_cv_func_lstat = yes; then
25372 ln -s conftest.tmp conftest.lnk
25373 fi
25374 if test "$cross_compiling" = yes; then :
25375 case "$host_os" in
25376 # Guess yes on glibc systems.
25377 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
25378 # If we don't know, assume the worst.
25379 *) gl_cv_func_stat_file_slash="guessing no" ;;
25380 esac
7a6dbc2f 25381
2196f55f 25382else
5e8754f9
SDJ
25383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25384/* end confdefs.h. */
25385#include <sys/stat.h>
7a6dbc2f 25386
5e8754f9
SDJ
25387int
25388main ()
25389{
25390int result = 0;
25391 struct stat st;
25392 if (!stat ("conftest.tmp/", &st))
25393 result |= 1;
25394#if HAVE_LSTAT
25395 if (!stat ("conftest.lnk/", &st))
25396 result |= 2;
25397#endif
25398 return result;
7a6dbc2f 25399
5e8754f9
SDJ
25400 ;
25401 return 0;
25402}
25403_ACEOF
25404if ac_fn_c_try_run "$LINENO"; then :
25405 gl_cv_func_stat_file_slash=yes
25406else
25407 gl_cv_func_stat_file_slash=no
2196f55f 25408fi
5e8754f9
SDJ
25409rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25410 conftest.$ac_objext conftest.beam conftest.$ac_ext
2196f55f 25411fi
2196f55f 25412
5e8754f9 25413 rm -f conftest.tmp conftest.lnk
7a6dbc2f 25414fi
5e8754f9
SDJ
25415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
25416$as_echo "$gl_cv_func_stat_file_slash" >&6; }
25417 case $gl_cv_func_stat_dir_slash in
25418 *no) REPLACE_STAT=1
2196f55f 25419
5e8754f9
SDJ
25420$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
25421;;
25422 esac
25423 case $gl_cv_func_stat_file_slash in
25424 *no) REPLACE_STAT=1
2196f55f 25425
5e8754f9
SDJ
25426$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
25427;;
25428 esac
2196f55f 25429
5e8754f9 25430 if test $REPLACE_STAT = 1; then
2196f55f
YQ
25431
25432
25433
25434
25435
25436
25437
2196f55f 25438
5e8754f9 25439 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
2196f55f 25440
5e8754f9
SDJ
25441 :
25442 fi
2196f55f
YQ
25443
25444
25445
25446
2196f55f 25447
5e8754f9 25448 GNULIB_STAT=1
2196f55f
YQ
25449
25450
25451
25452
2196f55f 25453
5e8754f9
SDJ
25454$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
25455
2196f55f
YQ
25456
25457
25458
725e2999
JB
25459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
25460$as_echo_n "checking for working stdalign.h... " >&6; }
25461if ${gl_cv_header_working_stdalign_h+:} false; then :
25462 $as_echo_n "(cached) " >&6
25463else
25464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25465/* end confdefs.h. */
25466#include <stdalign.h>
25467 #include <stddef.h>
25468
25469 /* Test that alignof yields a result consistent with offsetof.
25470 This catches GCC bug 52023
25471 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
25472 #ifdef __cplusplus
25473 template <class t> struct alignof_helper { char a; t b; };
25474 # define ao(type) offsetof (alignof_helper<type>, b)
25475 #else
25476 # define ao(type) offsetof (struct { char a; type b; }, b)
25477 #endif
25478 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
25479 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
25480 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
25481
25482 /* Test _Alignas only on platforms where gnulib can help. */
25483 #if \
25484 ((defined __cplusplus && 201103 <= __cplusplus) \
25485 || (defined __APPLE__ && defined __MACH__ \
25486 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
25487 : __GNUC__) \
25488 || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
25489 || __ICC || 0x5110 <= __SUNPRO_C \
25490 || 1300 <= _MSC_VER)
25491 struct alignas_test { char c; char alignas (8) alignas_8; };
25492 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
25493 ? 1 : -1];
25494 #endif
25495
25496int
25497main ()
25498{
25499
25500 ;
25501 return 0;
25502}
25503_ACEOF
25504if ac_fn_c_try_compile "$LINENO"; then :
25505 gl_cv_header_working_stdalign_h=yes
25506else
25507 gl_cv_header_working_stdalign_h=no
25508fi
25509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25510fi
25511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
25512$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
25513
25514 if test $gl_cv_header_working_stdalign_h = yes; then
25515 STDALIGN_H=''
25516 else
25517 STDALIGN_H='stdalign.h'
25518 fi
25519
25520
25521 if test -n "$STDALIGN_H"; then
25522 GL_GENERATE_STDALIGN_H_TRUE=
25523 GL_GENERATE_STDALIGN_H_FALSE='#'
25524else
25525 GL_GENERATE_STDALIGN_H_TRUE='#'
25526 GL_GENERATE_STDALIGN_H_FALSE=
25527fi
25528
25529
25530
2196f55f
YQ
25531
25532
63ce7108
TT
25533 # Define two additional variables used in the Makefile substitution.
25534
25535 if test "$ac_cv_header_stdbool_h" = yes; then
25536 STDBOOL_H=''
25537 else
25538 STDBOOL_H='stdbool.h'
25539 fi
25540
25541 if test -n "$STDBOOL_H"; then
25542 GL_GENERATE_STDBOOL_H_TRUE=
25543 GL_GENERATE_STDBOOL_H_FALSE='#'
25544else
25545 GL_GENERATE_STDBOOL_H_TRUE='#'
25546 GL_GENERATE_STDBOOL_H_FALSE=
25547fi
25548
25549
25550 if test "$ac_cv_type__Bool" = yes; then
25551 HAVE__BOOL=1
25552 else
25553 HAVE__BOOL=0
25554 fi
25555
25556
25557
25558
25559
25560 STDDEF_H=
4a626d0a
PA
25561 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
25562
25563"
d0ac1c44 25564if test "x$ac_cv_type_max_align_t" = xyes; then :
4a626d0a
PA
25565
25566else
25567 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
25568fi
25569
63ce7108
TT
25570 if test $gt_cv_c_wchar_t = no; then
25571 HAVE_WCHAR_T=0
25572 STDDEF_H=stddef.h
25573 fi
25574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25575$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
d0ac1c44 25576if ${gl_cv_decl_null_works+:} false; then :
63ce7108
TT
25577 $as_echo_n "(cached) " >&6
25578else
25579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25580/* end confdefs.h. */
25581#include <stddef.h>
25582 int test[2 * (sizeof NULL == sizeof (void *)) -1];
25583
25584int
25585main ()
25586{
25587
25588 ;
25589 return 0;
25590}
25591_ACEOF
25592if ac_fn_c_try_compile "$LINENO"; then :
25593 gl_cv_decl_null_works=yes
25594else
25595 gl_cv_decl_null_works=no
25596fi
25597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25598fi
25599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25600$as_echo "$gl_cv_decl_null_works" >&6; }
25601 if test $gl_cv_decl_null_works = no; then
25602 REPLACE_NULL=1
25603 STDDEF_H=stddef.h
25604 fi
25605
25606 if test -n "$STDDEF_H"; then
25607 GL_GENERATE_STDDEF_H_TRUE=
25608 GL_GENERATE_STDDEF_H_FALSE='#'
25609else
25610 GL_GENERATE_STDDEF_H_TRUE='#'
25611 GL_GENERATE_STDDEF_H_FALSE=
25612fi
25613
25614 if test -n "$STDDEF_H"; then
25615
25616
25617
25618
25619
25620
25621
25622
25623 if test $gl_cv_have_include_next = yes; then
25624 gl_cv_next_stddef_h='<'stddef.h'>'
25625 else
25626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25627$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
d0ac1c44 25628if ${gl_cv_next_stddef_h+:} false; then :
63ce7108
TT
25629 $as_echo_n "(cached) " >&6
25630else
25631
4a626d0a
PA
25632
25633
25634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
25635/* end confdefs.h. */
25636#include <stddef.h>
63ce7108 25637_ACEOF
4a626d0a
PA
25638 case "$host_os" in
25639 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25640 *) gl_absname_cpp="$ac_cpp" ;;
25641 esac
63ce7108 25642
4a626d0a
PA
25643 case "$host_os" in
25644 mingw*)
25645 gl_dirsep_regex='[/\\]'
25646 ;;
25647 *)
25648 gl_dirsep_regex='\/'
25649 ;;
25650 esac
25651 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25652 gl_header_literal_regex=`echo 'stddef.h' \
25653 | sed -e "$gl_make_literal_regex_sed"`
25654 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25655 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25656 s|^/[^/]|//&|
25657 p
25658 q
25659 }'
63ce7108 25660
4a626d0a
PA
25661 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25662 sed -n "$gl_absolute_header_sed"`
25663
25664 gl_header=$gl_cv_absolute_stddef_h
25665 gl_cv_next_stddef_h='"'$gl_header'"'
63ce7108
TT
25666
25667
25668fi
25669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25670$as_echo "$gl_cv_next_stddef_h" >&6; }
25671 fi
25672 NEXT_STDDEF_H=$gl_cv_next_stddef_h
25673
25674 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25675 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25676 gl_next_as_first_directive='<'stddef.h'>'
25677 else
25678 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25679 gl_next_as_first_directive=$gl_cv_next_stddef_h
25680 fi
25681 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25682
25683
25684
25685
25686 fi
25687
25688
25689
25690
49e4877c 25691 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
63ce7108
TT
25692
25693
25694
98399780
YQ
25695
25696
25697
25698
25699
4a626d0a
PA
25700
25701
6a29c58e
YQ
25702 if test $gl_cv_have_include_next = yes; then
25703 gl_cv_next_stdio_h='<'stdio.h'>'
25704 else
25705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25706$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
d0ac1c44 25707if ${gl_cv_next_stdio_h+:} false; then :
6a29c58e
YQ
25708 $as_echo_n "(cached) " >&6
25709else
25710
4a626d0a
PA
25711
25712
25713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6a29c58e
YQ
25714/* end confdefs.h. */
25715#include <stdio.h>
6a29c58e 25716_ACEOF
4a626d0a
PA
25717 case "$host_os" in
25718 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25719 *) gl_absname_cpp="$ac_cpp" ;;
25720 esac
25721
25722 case "$host_os" in
25723 mingw*)
25724 gl_dirsep_regex='[/\\]'
25725 ;;
25726 *)
25727 gl_dirsep_regex='\/'
25728 ;;
25729 esac
25730 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25731 gl_header_literal_regex=`echo 'stdio.h' \
25732 | sed -e "$gl_make_literal_regex_sed"`
25733 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25734 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25735 s|^/[^/]|//&|
25736 p
25737 q
25738 }'
6a29c58e 25739
4a626d0a
PA
25740 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25741 sed -n "$gl_absolute_header_sed"`
6a29c58e 25742
4a626d0a
PA
25743 gl_header=$gl_cv_absolute_stdio_h
25744 gl_cv_next_stdio_h='"'$gl_header'"'
6a29c58e
YQ
25745
25746
25747fi
25748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
25749$as_echo "$gl_cv_next_stdio_h" >&6; }
25750 fi
25751 NEXT_STDIO_H=$gl_cv_next_stdio_h
25752
25753 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25754 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25755 gl_next_as_first_directive='<'stdio.h'>'
25756 else
25757 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25758 gl_next_as_first_directive=$gl_cv_next_stdio_h
25759 fi
25760 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
25761
25762
25763
25764
25765
4a626d0a
PA
25766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
25767$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
d0ac1c44 25768if ${gl_cv_func_printf_attribute_flavor+:} false; then :
4a626d0a
PA
25769 $as_echo_n "(cached) " >&6
25770else
25771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25772/* end confdefs.h. */
25773
25774 #define __STDC_FORMAT_MACROS 1
25775 #include <stdio.h>
25776 #include <inttypes.h>
25777 /* For non-mingw systems, compilation will trivially succeed.
25778 For mingw, compilation will succeed for older mingw (system
25779 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
5e8754f9 25780 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
4a626d0a
PA
25781 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
25782 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
25783 #endif
25784
25785int
25786main ()
25787{
25788
25789 ;
25790 return 0;
25791}
25792_ACEOF
25793if ac_fn_c_try_compile "$LINENO"; then :
25794 gl_cv_func_printf_attribute_flavor=system
25795else
25796 gl_cv_func_printf_attribute_flavor=gnu
25797fi
25798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25799fi
25800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
25801$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
25802 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
25803
25804$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
25805
25806 fi
25807
6a29c58e
YQ
25808 GNULIB_FSCANF=1
25809
25810
25811cat >>confdefs.h <<_ACEOF
25812#define GNULIB_FSCANF 1
25813_ACEOF
25814
25815
25816 GNULIB_SCANF=1
25817
25818
25819cat >>confdefs.h <<_ACEOF
25820#define GNULIB_SCANF 1
25821_ACEOF
25822
25823
25824 GNULIB_FGETC=1
25825 GNULIB_GETC=1
25826 GNULIB_GETCHAR=1
25827 GNULIB_FGETS=1
25828 GNULIB_FREAD=1
25829
25830
25831 GNULIB_FPRINTF=1
25832 GNULIB_PRINTF=1
25833 GNULIB_VFPRINTF=1
25834 GNULIB_VPRINTF=1
25835 GNULIB_FPUTC=1
25836 GNULIB_PUTC=1
25837 GNULIB_PUTCHAR=1
25838 GNULIB_FPUTS=1
25839 GNULIB_PUTS=1
25840 GNULIB_FWRITE=1
25841
25842
25843
25844
5e8754f9
SDJ
25845 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
25846 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25848$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25849if eval \${$as_gl_Symbol+:} false; then :
25850 $as_echo_n "(cached) " >&6
25851else
25852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25853/* end confdefs.h. */
25854#include <stdio.h>
25855
25856int
25857main ()
25858{
25859#undef $gl_func
25860 (void) $gl_func;
25861 ;
25862 return 0;
25863}
25864_ACEOF
25865if ac_fn_c_try_compile "$LINENO"; then :
25866 eval "$as_gl_Symbol=yes"
25867else
25868 eval "$as_gl_Symbol=no"
25869fi
25870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25871fi
25872eval ac_res=\$$as_gl_Symbol
25873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25874$as_echo "$ac_res" >&6; }
25875 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25876 cat >>confdefs.h <<_ACEOF
25877#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25878_ACEOF
6a29c58e 25879
5e8754f9
SDJ
25880 eval ac_cv_have_decl_$gl_func=yes
25881fi
25882 done
6a29c58e
YQ
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
98399780
YQ
25895 if test $gl_cv_have_include_next = yes; then
25896 gl_cv_next_stdlib_h='<'stdlib.h'>'
25897 else
25898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
25899$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
d0ac1c44 25900if ${gl_cv_next_stdlib_h+:} false; then :
98399780
YQ
25901 $as_echo_n "(cached) " >&6
25902else
25903
4a626d0a
PA
25904
25905
25906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98399780
YQ
25907/* end confdefs.h. */
25908#include <stdlib.h>
98399780 25909_ACEOF
4a626d0a
PA
25910 case "$host_os" in
25911 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25912 *) gl_absname_cpp="$ac_cpp" ;;
25913 esac
25914
25915 case "$host_os" in
25916 mingw*)
25917 gl_dirsep_regex='[/\\]'
25918 ;;
25919 *)
25920 gl_dirsep_regex='\/'
25921 ;;
25922 esac
25923 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25924 gl_header_literal_regex=`echo 'stdlib.h' \
25925 | sed -e "$gl_make_literal_regex_sed"`
25926 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25927 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25928 s|^/[^/]|//&|
25929 p
25930 q
25931 }'
98399780 25932
4a626d0a
PA
25933 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25934 sed -n "$gl_absolute_header_sed"`
98399780 25935
4a626d0a
PA
25936 gl_header=$gl_cv_absolute_stdlib_h
25937 gl_cv_next_stdlib_h='"'$gl_header'"'
98399780
YQ
25938
25939
25940fi
25941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
25942$as_echo "$gl_cv_next_stdlib_h" >&6; }
25943 fi
25944 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
25945
25946 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25947 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25948 gl_next_as_first_directive='<'stdlib.h'>'
25949 else
25950 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25951 gl_next_as_first_directive=$gl_cv_next_stdlib_h
25952 fi
25953 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
25954
25955
25956
25957
25958
25959
5e8754f9
SDJ
25960 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
25961 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25963$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25964if eval \${$as_gl_Symbol+:} false; then :
25965 $as_echo_n "(cached) " >&6
25966else
25967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25968/* end confdefs.h. */
25969#include <stdlib.h>
25970#if HAVE_SYS_LOADAVG_H
25971# include <sys/loadavg.h>
25972#endif
25973#if HAVE_RANDOM_H
25974# include <random.h>
25975#endif
25976
25977int
25978main ()
25979{
25980#undef $gl_func
25981 (void) $gl_func;
25982 ;
25983 return 0;
25984}
25985_ACEOF
25986if ac_fn_c_try_compile "$LINENO"; then :
25987 eval "$as_gl_Symbol=yes"
25988else
25989 eval "$as_gl_Symbol=no"
25990fi
25991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25992fi
25993eval ac_res=\$$as_gl_Symbol
25994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25995$as_echo "$ac_res" >&6; }
25996 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25997 cat >>confdefs.h <<_ACEOF
25998#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25999_ACEOF
98399780 26000
5e8754f9
SDJ
26001 eval ac_cv_have_decl_$gl_func=yes
26002fi
26003 done
98399780
YQ
26004
26005
26006
26007
26008
26009
8424cc97
SM
26010 for ac_func in strchrnul
26011do :
26012 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
d0ac1c44 26013if test "x$ac_cv_func_strchrnul" = xyes; then :
8424cc97
SM
26014 cat >>confdefs.h <<_ACEOF
26015#define HAVE_STRCHRNUL 1
26016_ACEOF
26017
26018fi
26019done
26020
26021 if test $ac_cv_func_strchrnul = no; then
26022 HAVE_STRCHRNUL=0
26023 else
26024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
26025$as_echo_n "checking whether strchrnul works... " >&6; }
d0ac1c44 26026if ${gl_cv_func_strchrnul_works+:} false; then :
8424cc97
SM
26027 $as_echo_n "(cached) " >&6
26028else
26029 if test "$cross_compiling" = yes; then :
26030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26031/* end confdefs.h. */
26032
26033#if defined __CYGWIN__
26034 #include <cygwin/version.h>
26035 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
26036 Lucky user
26037 #endif
26038#else
26039 Lucky user
26040#endif
26041
26042_ACEOF
26043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26044 $EGREP "Lucky user" >/dev/null 2>&1; then :
26045 gl_cv_func_strchrnul_works="guessing yes"
26046else
26047 gl_cv_func_strchrnul_works="guessing no"
26048fi
26049rm -f conftest*
26050
26051
26052else
26053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26054/* end confdefs.h. */
26055
26056#include <string.h> /* for strchrnul */
26057
26058int
26059main ()
26060{
26061const char *buf = "a";
26062 return strchrnul (buf, 'b') != buf + 1;
26063
26064 ;
26065 return 0;
26066}
26067_ACEOF
26068if ac_fn_c_try_run "$LINENO"; then :
26069 gl_cv_func_strchrnul_works=yes
26070else
26071 gl_cv_func_strchrnul_works=no
26072fi
26073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26074 conftest.$ac_objext conftest.beam conftest.$ac_ext
26075fi
26076
26077
26078fi
26079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
26080$as_echo "$gl_cv_func_strchrnul_works" >&6; }
26081 case "$gl_cv_func_strchrnul_works" in
26082 *yes) ;;
26083 *) REPLACE_STRCHRNUL=1 ;;
26084 esac
26085 fi
26086
26087 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
26088
26089
26090
26091
26092
26093
26094
26095
26096 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
26097
26098 :
26099 fi
26100
26101
26102
26103
26104
26105 GNULIB_STRCHRNUL=1
26106
26107
26108
26109
26110
26111$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
26112
26113
26114
26115
26116
26117
26118
472fa5ee
SM
26119 :
26120
26121
26122
26123
26124
6ec2e0f5
SDJ
26125 if test $ac_cv_func_strdup = yes; then
26126 if test $gl_cv_func_malloc_posix != yes; then
26127 REPLACE_STRDUP=1
26128 fi
26129 fi
26130
472fa5ee
SM
26131 :
26132
26133
26134
26135
26136
6ec2e0f5
SDJ
26137 if test $ac_cv_have_decl_strdup = no; then
26138 HAVE_DECL_STRDUP=0
26139 fi
26140
26141 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
26142
26143
26144
26145
26146
26147
26148
26149
26150 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
26151
26152 :
26153 fi
26154
26155
26156
26157
26158
26159 GNULIB_STRDUP=1
26160
26161
26162
26163
26164
26165$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
26166
26167
26168
26169
26170
26171
26172
26173
5abebf3c
CB
26174
26175
6ec2e0f5
SDJ
26176 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
26178$as_echo_n "checking for working strerror function... " >&6; }
d0ac1c44 26179if ${gl_cv_func_working_strerror+:} false; then :
6ec2e0f5
SDJ
26180 $as_echo_n "(cached) " >&6
26181else
26182 if test "$cross_compiling" = yes; then :
26183 case "$host_os" in
5e8754f9
SDJ
26184 # Guess yes on glibc systems.
26185 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
26186 # If we don't know, assume the worst.
26187 *) gl_cv_func_working_strerror="guessing no" ;;
6ec2e0f5
SDJ
26188 esac
26189
26190else
26191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26192/* end confdefs.h. */
26193#include <string.h>
26194
26195int
26196main ()
26197{
26198if (!*strerror (-2)) return 1;
26199 ;
26200 return 0;
26201}
26202_ACEOF
26203if ac_fn_c_try_run "$LINENO"; then :
26204 gl_cv_func_working_strerror=yes
26205else
26206 gl_cv_func_working_strerror=no
26207fi
26208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26209 conftest.$ac_objext conftest.beam conftest.$ac_ext
26210fi
26211
26212
26213fi
26214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
26215$as_echo "$gl_cv_func_working_strerror" >&6; }
26216 case "$gl_cv_func_working_strerror" in
26217 *yes) ;;
26218 *)
26219 REPLACE_STRERROR=1
26220 ;;
26221 esac
26222
5abebf3c
CB
26223 case "$gl_cv_func_strerror_r_works" in
26224 *no) REPLACE_STRERROR=1 ;;
26225 esac
26226
6ec2e0f5
SDJ
26227 else
26228 REPLACE_STRERROR=1
26229 fi
26230
26231 if test $REPLACE_STRERROR = 1; then
26232
26233
26234
26235
26236
26237
26238
26239
26240 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
26241
26242 fi
26243
26244
26245cat >>confdefs.h <<_ACEOF
26246#define GNULIB_STRERROR 1
26247_ACEOF
26248
26249
26250
26251
26252
26253
26254
26255 GNULIB_STRERROR=1
26256
26257
26258
26259
26260
26261$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
26262
26263
26264
26265
26266
26267 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
26268
26269
26270
26271
26272
26273
26274
26275
26276 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
26277
26278
26279
26280
26281
472fa5ee
SM
26282 :
26283
26284
26285
26286
26287
6ec2e0f5
SDJ
26288 if test $ac_cv_header_sys_socket_h != yes; then
26289 for ac_header in winsock2.h
26290do :
26291 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 26292if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
26293 cat >>confdefs.h <<_ACEOF
26294#define HAVE_WINSOCK2_H 1
26295_ACEOF
26296
26297fi
26298
26299done
26300
26301 fi
26302 if test "$ac_cv_header_winsock2_h" = yes; then
26303 HAVE_WINSOCK2_H=1
26304 UNISTD_H_HAVE_WINSOCK2_H=1
26305 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26306 else
26307 HAVE_WINSOCK2_H=0
26308 fi
26309
26310
26311 fi
26312
26313
26314
26315
98399780 26316
5abebf3c
CB
26317
26318 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
26319if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
26320 HAVE_DECL_STRERROR_R=1
26321else
26322 HAVE_DECL_STRERROR_R=0
26323fi
26324
26325
26326cat >>confdefs.h <<_ACEOF
26327#define HAVE_DECL_STRERROR_R_ORIG $HAVE_DECL_STRERROR_R
26328_ACEOF
26329
26330
26331 if test $ac_cv_func_strerror_r = yes; then
26332 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26333 if test $gl_cv_func_strerror_r_posix_signature = yes; then
26334 case "$gl_cv_func_strerror_r_works" in
26335 *no) REPLACE_STRERROR_R=1 ;;
26336 esac
26337 else
26338 REPLACE_STRERROR_R=1
26339 fi
26340 else
26341 REPLACE_STRERROR_R=1
26342 fi
26343 fi
26344
26345 # Overwrite the findings of AC_FUNC_STRERROR_R (for code that uses that).
26346
26347
26348 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
26349
26350
26351
26352
26353
26354
26355
26356
26357 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
26358
26359
26360
26361 :
26362
26363
26364
26365
26366
26367
26368 :
26369
26370
26371
26372
26373
26374
26375 :
26376
26377
26378
26379
26380
26381
26382 fi
26383
26384
26385
26386
26387
26388 GNULIB_STRERROR_R=1
26389
26390
26391
26392
26393
26394$as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
26395
26396
26397
26398
26399
26400
26401
26402
63ce7108
TT
26403 if test $REPLACE_STRSTR = 0; then
26404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
26405$as_echo_n "checking whether strstr works in linear time... " >&6; }
d0ac1c44 26406if ${gl_cv_func_strstr_linear+:} false; then :
63ce7108
TT
26407 $as_echo_n "(cached) " >&6
26408else
26409 if test "$cross_compiling" = yes; then :
26410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26411/* end confdefs.h. */
26412
26413#include <features.h>
26414#ifdef __GNU_LIBRARY__
26415 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
26416 && !(defined __i386__ || defined __x86_64__) \
26417 && !defined __UCLIBC__
26418 Lucky user
26419 #endif
26420#endif
26421#ifdef __CYGWIN__
26422 #include <cygwin/version.h>
26423 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
26424 Lucky user
26425 #endif
26426#endif
26427
26428_ACEOF
26429if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26430 $EGREP "Lucky user" >/dev/null 2>&1; then :
26431 gl_cv_func_strstr_linear="guessing yes"
c971b7fa 26432else
63ce7108 26433 gl_cv_func_strstr_linear="guessing no"
c971b7fa
PA
26434fi
26435rm -f conftest*
26436
26437
26438else
26439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26440/* end confdefs.h. */
26441
49e4877c
PA
26442#ifdef __MVS__
26443/* z/OS does not deliver signals while strstr() is running (thanks to
26444 restrictions on its LE runtime), which prevents us from limiting the
26445 running time of this test. */
26446# error "This test does not work properly on z/OS"
26447#endif
c971b7fa 26448#include <signal.h> /* for signal */
63ce7108 26449#include <string.h> /* for strstr */
c971b7fa
PA
26450#include <stdlib.h> /* for malloc */
26451#include <unistd.h> /* for alarm */
49e4877c 26452static void quit (int sig) { _exit (sig + 128); }
c971b7fa
PA
26453
26454int
26455main ()
26456{
26457
26458 int result = 0;
26459 size_t m = 1000000;
63ce7108
TT
26460 char *haystack = (char *) malloc (2 * m + 2);
26461 char *needle = (char *) malloc (m + 2);
c971b7fa 26462 /* Failure to compile this test due to missing alarm is okay,
63ce7108 26463 since all such platforms (mingw) also have quadratic strstr. */
c971b7fa
PA
26464 signal (SIGALRM, quit);
26465 alarm (5);
26466 /* Check for quadratic performance. */
26467 if (haystack && needle)
26468 {
26469 memset (haystack, 'A', 2 * m);
26470 haystack[2 * m] = 'B';
63ce7108 26471 haystack[2 * m + 1] = 0;
c971b7fa
PA
26472 memset (needle, 'A', m);
26473 needle[m] = 'B';
63ce7108
TT
26474 needle[m + 1] = 0;
26475 if (!strstr (haystack, needle))
c971b7fa
PA
26476 result |= 1;
26477 }
26478 return result;
26479
26480 ;
26481 return 0;
26482}
26483_ACEOF
26484if ac_fn_c_try_run "$LINENO"; then :
63ce7108 26485 gl_cv_func_strstr_linear=yes
c971b7fa 26486else
63ce7108 26487 gl_cv_func_strstr_linear=no
c971b7fa
PA
26488fi
26489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26490 conftest.$ac_objext conftest.beam conftest.$ac_ext
26491fi
26492
26493
26494fi
63ce7108
TT
26495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
26496$as_echo "$gl_cv_func_strstr_linear" >&6; }
26497 case "$gl_cv_func_strstr_linear" in
40a73391
JK
26498 *yes) ;;
26499 *)
63ce7108 26500 REPLACE_STRSTR=1
40a73391
JK
26501 ;;
26502 esac
c971b7fa
PA
26503 fi
26504
63ce7108 26505 if test $REPLACE_STRSTR = 1; then
c971b7fa
PA
26506
26507
26508
26509
26510
26511
26512
26513
63ce7108 26514 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
c971b7fa 26515
a512b375 26516 fi
c971b7fa
PA
26517
26518
26519
5e8754f9 26520 if test "$gl_cv_func_memchr_works" != yes; then
63ce7108 26521 REPLACE_STRSTR=1
c971b7fa 26522 else
63ce7108
TT
26523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
26524$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 26525if ${gl_cv_func_strstr_works_always+:} false; then :
c971b7fa
PA
26526 $as_echo_n "(cached) " >&6
26527else
26528 if test "$cross_compiling" = yes; then :
63ce7108 26529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
26530/* end confdefs.h. */
26531
26532#ifdef __GNU_LIBRARY__
26533 #include <features.h>
63ce7108 26534 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
c971b7fa
PA
26535 || defined __UCLIBC__
26536 Lucky user
26537 #endif
26538#elif defined __CYGWIN__
26539 #include <cygwin/version.h>
26540 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
26541 Lucky user
26542 #endif
26543#else
26544 Lucky user
26545#endif
26546
26547_ACEOF
26548if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26549 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108 26550 gl_cv_func_strstr_works_always="guessing yes"
c971b7fa 26551else
63ce7108 26552 gl_cv_func_strstr_works_always="guessing no"
c971b7fa
PA
26553fi
26554rm -f conftest*
26555
26556
26557else
26558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26559/* end confdefs.h. */
26560
63ce7108 26561#include <string.h> /* for strstr */
c971b7fa
PA
26562#define P "_EF_BF_BD"
26563#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
26564#define NEEDLE P P P P P
26565
26566int
26567main ()
26568{
63ce7108 26569return !!strstr (HAYSTACK, NEEDLE);
c971b7fa
PA
26570
26571 ;
26572 return 0;
26573}
26574_ACEOF
26575if ac_fn_c_try_run "$LINENO"; then :
63ce7108 26576 gl_cv_func_strstr_works_always=yes
c971b7fa 26577else
63ce7108 26578 gl_cv_func_strstr_works_always=no
c971b7fa
PA
26579fi
26580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26581 conftest.$ac_objext conftest.beam conftest.$ac_ext
26582fi
26583
26584
26585fi
63ce7108
TT
26586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
26587$as_echo "$gl_cv_func_strstr_works_always" >&6; }
26588 case "$gl_cv_func_strstr_works_always" in
40a73391
JK
26589 *yes) ;;
26590 *)
63ce7108 26591 REPLACE_STRSTR=1
40a73391
JK
26592 ;;
26593 esac
c971b7fa 26594 fi
8839a007 26595
63ce7108 26596 if test $REPLACE_STRSTR = 1; then
8839a007 26597
8690e634
JK
26598
26599
8690e634
JK
26600
26601
26602
26603
26604
63ce7108 26605 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
8690e634 26606
8690e634
JK
26607 fi
26608
8690e634
JK
26609
26610
8690e634 26611
8690e634 26612
63ce7108 26613 GNULIB_STRSTR=1
8690e634
JK
26614
26615
26616
8690e634
JK
26617
26618
63ce7108 26619$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
8690e634
JK
26620
26621
26622
26623
26624
26625
26626
421693b0
PA
26627 for ac_func in strtok_r
26628do :
26629 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
d0ac1c44 26630if test "x$ac_cv_func_strtok_r" = xyes; then :
421693b0
PA
26631 cat >>confdefs.h <<_ACEOF
26632#define HAVE_STRTOK_R 1
26633_ACEOF
26634
26635fi
26636done
26637
26638 if test $ac_cv_func_strtok_r = yes; then
26639 HAVE_STRTOK_R=1
26640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
26641$as_echo_n "checking whether strtok_r works... " >&6; }
d0ac1c44 26642if ${gl_cv_func_strtok_r_works+:} false; then :
421693b0
PA
26643 $as_echo_n "(cached) " >&6
26644else
26645 if test "$cross_compiling" = yes; then :
5e8754f9
SDJ
26646
26647 case "$host_os" in
26648 # Guess no on glibc systems.
26649 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
26650 *) gl_cv_func_strtok_r_works="guessing yes";;
421693b0
PA
26651 esac
26652
26653else
26654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26655/* end confdefs.h. */
26656
26657 #ifndef __OPTIMIZE__
26658 # define __OPTIMIZE__ 1
26659 #endif
26660 #undef __OPTIMIZE_SIZE__
26661 #undef __NO_INLINE__
26662 #include <stdlib.h>
26663 #include <string.h>
26664
26665int
26666main ()
26667{
26668static const char dummy[] = "\177\01a";
26669 char delimiters[] = "xxxxxxxx";
26670 char *save_ptr = (char *) dummy;
26671 strtok_r (delimiters, "x", &save_ptr);
26672 strtok_r (NULL, "x", &save_ptr);
26673 return 0;
26674
26675 ;
26676 return 0;
26677}
26678
26679_ACEOF
26680if ac_fn_c_try_run "$LINENO"; then :
26681 gl_cv_func_strtok_r_works=yes
26682else
26683 gl_cv_func_strtok_r_works=no
26684fi
26685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26686 conftest.$ac_objext conftest.beam conftest.$ac_ext
26687fi
26688
26689
26690fi
26691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
26692$as_echo "$gl_cv_func_strtok_r_works" >&6; }
26693 case "$gl_cv_func_strtok_r_works" in
26694 *no)
26695 UNDEFINE_STRTOK_R=1
26696 ;;
26697 esac
26698 else
26699 HAVE_STRTOK_R=0
26700 fi
26701
472fa5ee
SM
26702 :
26703
26704
26705
26706
26707
421693b0
PA
26708 if test $ac_cv_have_decl_strtok_r = no; then
26709 HAVE_DECL_STRTOK_R=0
26710 fi
26711
26712 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
26713
26714
26715
26716
26717
26718
26719
26720
26721 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
26722
26723
26724 :
26725
26726 fi
26727
26728
26729
26730
26731
26732 GNULIB_STRTOK_R=1
26733
26734
26735
26736
26737
26738$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
26739
26740
26741
26742
26743
26744
26745
8690e634
JK
26746
26747
26748
26749
26750
8690e634 26751
09607c9e 26752
725e2999
JB
26753
26754
472fa5ee
SM
26755 :
26756
26757
26758
26759
26760
09607c9e
TT
26761
26762
26763
26764 if test $gl_cv_have_include_next = yes; then
26765 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26766 else
26767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26768$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 26769if ${gl_cv_next_sys_stat_h+:} false; then :
09607c9e
TT
26770 $as_echo_n "(cached) " >&6
26771else
26772
26773 if test $ac_cv_header_sys_stat_h = yes; then
26774
26775
4a626d0a
PA
26776
26777
26778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
26779/* end confdefs.h. */
26780#include <sys/stat.h>
09607c9e 26781_ACEOF
4a626d0a
PA
26782 case "$host_os" in
26783 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26784 *) gl_absname_cpp="$ac_cpp" ;;
26785 esac
26786
26787 case "$host_os" in
26788 mingw*)
26789 gl_dirsep_regex='[/\\]'
26790 ;;
26791 *)
26792 gl_dirsep_regex='\/'
26793 ;;
26794 esac
26795 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26796 gl_header_literal_regex=`echo 'sys/stat.h' \
26797 | sed -e "$gl_make_literal_regex_sed"`
26798 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26799 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26800 s|^/[^/]|//&|
26801 p
26802 q
26803 }'
26804
26805 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26806 sed -n "$gl_absolute_header_sed"`
26807
26808 gl_header=$gl_cv_absolute_sys_stat_h
26809 gl_cv_next_sys_stat_h='"'$gl_header'"'
09607c9e
TT
26810 else
26811 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26812 fi
26813
26814
26815fi
26816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26817$as_echo "$gl_cv_next_sys_stat_h" >&6; }
26818 fi
26819 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
26820
26821 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26822 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26823 gl_next_as_first_directive='<'sys/stat.h'>'
26824 else
26825 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26826 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26827 fi
26828 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
26829
26830
26831
26832
26833
26834
26835
26836
2196f55f 26837
09607c9e
TT
26838
26839
5e8754f9 26840 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
09607c9e 26841
5e8754f9 26842$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
09607c9e 26843
5e8754f9 26844 fi
09607c9e
TT
26845
26846 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26847 #include <sys/stat.h>
26848"
d0ac1c44 26849if test "x$ac_cv_type_nlink_t" = xyes; then :
09607c9e
TT
26850
26851else
26852
26853$as_echo "#define nlink_t int" >>confdefs.h
26854
26855fi
26856
26857
26858
5e8754f9
SDJ
26859 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
26860 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26862$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
26863if eval \${$as_gl_Symbol+:} false; then :
26864 $as_echo_n "(cached) " >&6
26865else
26866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26867/* end confdefs.h. */
26868#include <sys/stat.h>
26869
26870int
26871main ()
26872{
26873#undef $gl_func
26874 (void) $gl_func;
26875 ;
26876 return 0;
26877}
26878_ACEOF
26879if ac_fn_c_try_compile "$LINENO"; then :
26880 eval "$as_gl_Symbol=yes"
26881else
26882 eval "$as_gl_Symbol=no"
26883fi
26884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26885fi
26886eval ac_res=\$$as_gl_Symbol
26887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26888$as_echo "$ac_res" >&6; }
26889 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26890 cat >>confdefs.h <<_ACEOF
26891#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26892_ACEOF
09607c9e 26893
5e8754f9
SDJ
26894 eval ac_cv_have_decl_$gl_func=yes
26895fi
26896 done
09607c9e
TT
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
725e2999
JB
26908
26909
26910
26911
26912
26913
26914 :
26915
26916
26917
26918
26919
26920
26921
26922
26923 if test $gl_cv_have_include_next = yes; then
26924 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
26925 else
26926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
26927$as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
26928if ${gl_cv_next_sys_uio_h+:} false; then :
26929 $as_echo_n "(cached) " >&6
26930else
26931
26932 if test $ac_cv_header_sys_uio_h = yes; then
26933
26934
26935
26936
26937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26938/* end confdefs.h. */
26939#include <sys/uio.h>
26940_ACEOF
26941 case "$host_os" in
26942 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26943 *) gl_absname_cpp="$ac_cpp" ;;
26944 esac
26945
26946 case "$host_os" in
26947 mingw*)
26948 gl_dirsep_regex='[/\\]'
26949 ;;
26950 *)
26951 gl_dirsep_regex='\/'
26952 ;;
26953 esac
26954 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26955 gl_header_literal_regex=`echo 'sys/uio.h' \
26956 | sed -e "$gl_make_literal_regex_sed"`
26957 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26958 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26959 s|^/[^/]|//&|
26960 p
26961 q
26962 }'
26963
26964 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26965 sed -n "$gl_absolute_header_sed"`
26966
26967 gl_header=$gl_cv_absolute_sys_uio_h
26968 gl_cv_next_sys_uio_h='"'$gl_header'"'
26969 else
26970 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
26971 fi
26972
26973
26974fi
26975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
26976$as_echo "$gl_cv_next_sys_uio_h" >&6; }
26977 fi
26978 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
26979
26980 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26981 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26982 gl_next_as_first_directive='<'sys/uio.h'>'
26983 else
26984 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26985 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
26986 fi
26987 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
26988
26989
26990
26991
26992 if test $ac_cv_header_sys_uio_h = yes; then
26993 HAVE_SYS_UIO_H=1
26994 else
26995 HAVE_SYS_UIO_H=0
26996 fi
26997
26998
26999
27000
27001
2d8adcbd
MM
27002 :
27003
27004
27005
27006
09607c9e
TT
27007
27008
27009
8839a007
PA
27010
27011
27012
27013
09607c9e
TT
27014
27015
8839a007 27016
5abebf3c 27017
f8e27d88
CB
27018 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
27019"
27020if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
27021 ac_have_decl=1
27022else
27023 ac_have_decl=0
27024fi
27025
27026cat >>confdefs.h <<_ACEOF
27027#define HAVE_DECL_LOCALTIME_R $ac_have_decl
27028_ACEOF
27029
27030 if test $ac_cv_have_decl_localtime_r = no; then
27031 HAVE_DECL_LOCALTIME_R=0
27032 fi
27033
27034
27035 :
27036
27037
27038
27039
27040
27041 if test $ac_cv_func_localtime_r = yes; then
27042 HAVE_LOCALTIME_R=1
27043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
27044$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
27045if ${gl_cv_time_r_posix+:} false; then :
27046 $as_echo_n "(cached) " >&6
27047else
27048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27049/* end confdefs.h. */
27050#include <time.h>
27051int
27052main ()
27053{
27054/* We don't need to append 'restrict's to the argument types,
27055 even though the POSIX signature has the 'restrict's,
27056 since C99 says they can't affect type compatibility. */
27057 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
27058 if (ptr) return 0;
27059 /* Check the return type is a pointer.
27060 On HP-UX 10 it is 'int'. */
27061 *localtime_r (0, 0);
27062 ;
27063 return 0;
27064}
27065
27066_ACEOF
27067if ac_fn_c_try_compile "$LINENO"; then :
27068 gl_cv_time_r_posix=yes
27069else
27070 gl_cv_time_r_posix=no
27071fi
27072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27073
27074fi
27075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
27076$as_echo "$gl_cv_time_r_posix" >&6; }
27077 if test $gl_cv_time_r_posix = yes; then
27078 REPLACE_LOCALTIME_R=0
27079 else
27080 REPLACE_LOCALTIME_R=1
27081 fi
27082 else
27083 HAVE_LOCALTIME_R=0
27084 fi
27085
27086 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
27087
27088
27089
27090
27091
27092
27093
27094
27095 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
27096
27097
27098 :
27099
27100 fi
27101
27102
27103
27104
27105
27106 GNULIB_TIME_R=1
27107
27108
27109
27110
27111
27112$as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
27113
27114
27115
27116
27117
27118
27119
27120
27121
5abebf3c
CB
27122
27123
27124
472fa5ee
SM
27125 :
27126
27127
27128
27129
27130
8839a007
PA
27131
27132
27133
27134 if test $gl_cv_have_include_next = yes; then
27135 gl_cv_next_unistd_h='<'unistd.h'>'
27136 else
27137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27138$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
d0ac1c44 27139if ${gl_cv_next_unistd_h+:} false; then :
8839a007
PA
27140 $as_echo_n "(cached) " >&6
27141else
27142
27143 if test $ac_cv_header_unistd_h = yes; then
27144
27145
4a626d0a
PA
27146
27147
27148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8839a007
PA
27149/* end confdefs.h. */
27150#include <unistd.h>
8839a007 27151_ACEOF
4a626d0a
PA
27152 case "$host_os" in
27153 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27154 *) gl_absname_cpp="$ac_cpp" ;;
27155 esac
27156
27157 case "$host_os" in
27158 mingw*)
27159 gl_dirsep_regex='[/\\]'
27160 ;;
27161 *)
27162 gl_dirsep_regex='\/'
27163 ;;
27164 esac
27165 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27166 gl_header_literal_regex=`echo 'unistd.h' \
27167 | sed -e "$gl_make_literal_regex_sed"`
27168 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27169 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27170 s|^/[^/]|//&|
27171 p
27172 q
27173 }'
27174
27175 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27176 sed -n "$gl_absolute_header_sed"`
27177
27178 gl_header=$gl_cv_absolute_unistd_h
27179 gl_cv_next_unistd_h='"'$gl_header'"'
8839a007
PA
27180 else
27181 gl_cv_next_unistd_h='<'unistd.h'>'
27182 fi
27183
27184
27185fi
27186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27187$as_echo "$gl_cv_next_unistd_h" >&6; }
27188 fi
27189 NEXT_UNISTD_H=$gl_cv_next_unistd_h
27190
27191 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27192 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27193 gl_next_as_first_directive='<'unistd.h'>'
27194 else
27195 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27196 gl_next_as_first_directive=$gl_cv_next_unistd_h
27197 fi
27198 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
27199
27200
27201
27202
27203 if test $ac_cv_header_unistd_h = yes; then
27204 HAVE_UNISTD_H=1
27205 else
27206 HAVE_UNISTD_H=0
27207 fi
27208
27209
27210
27211
27212
27213
27214
5e8754f9
SDJ
27215 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
27216 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27218$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27219if eval \${$as_gl_Symbol+:} false; then :
27220 $as_echo_n "(cached) " >&6
27221else
27222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27223/* end confdefs.h. */
27224
27225#if HAVE_UNISTD_H
27226# include <unistd.h>
27227#endif
27228/* Some systems declare various items in the wrong headers. */
27229#if !(defined __GLIBC__ && !defined __UCLIBC__)
27230# include <fcntl.h>
27231# include <stdio.h>
27232# include <stdlib.h>
27233# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
27234# include <io.h>
27235# endif
27236#endif
27237
27238int
27239main ()
27240{
27241#undef $gl_func
27242 (void) $gl_func;
27243 ;
27244 return 0;
27245}
27246_ACEOF
27247if ac_fn_c_try_compile "$LINENO"; then :
27248 eval "$as_gl_Symbol=yes"
27249else
27250 eval "$as_gl_Symbol=no"
27251fi
27252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27253fi
27254eval ac_res=\$$as_gl_Symbol
27255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27256$as_echo "$ac_res" >&6; }
27257 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27258 cat >>confdefs.h <<_ACEOF
27259#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27260_ACEOF
8839a007 27261
5e8754f9
SDJ
27262 eval ac_cv_have_decl_$gl_func=yes
27263fi
27264 done
8839a007
PA
27265
27266
27267
27268
472fa5ee
SM
27269 :
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279 :
27280
8839a007 27281
6ec2e0f5
SDJ
27282
27283
27284
3d99e817
AK
27285 if test $ac_cv_have_decl_unsetenv = no; then
27286 HAVE_DECL_UNSETENV=0
27287 fi
27288 for ac_func in unsetenv
27289do :
27290 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
d0ac1c44 27291if test "x$ac_cv_func_unsetenv" = xyes; then :
3d99e817
AK
27292 cat >>confdefs.h <<_ACEOF
27293#define HAVE_UNSETENV 1
27294_ACEOF
27295
27296fi
27297done
27298
27299 if test $ac_cv_func_unsetenv = no; then
27300 HAVE_UNSETENV=0
27301 else
27302 HAVE_UNSETENV=1
27303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
27304$as_echo_n "checking for unsetenv() return type... " >&6; }
d0ac1c44 27305if ${gt_cv_func_unsetenv_ret+:} false; then :
3d99e817
AK
27306 $as_echo_n "(cached) " >&6
27307else
27308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27309/* end confdefs.h. */
27310
27311#undef _BSD
27312#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
27313#include <stdlib.h>
27314extern
27315#ifdef __cplusplus
27316"C"
27317#endif
27318int unsetenv (const char *name);
27319
27320int
27321main ()
27322{
27323
27324 ;
27325 return 0;
27326}
27327_ACEOF
27328if ac_fn_c_try_compile "$LINENO"; then :
27329 gt_cv_func_unsetenv_ret='int'
27330else
27331 gt_cv_func_unsetenv_ret='void'
27332fi
27333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27334fi
27335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
27336$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
27337 if test $gt_cv_func_unsetenv_ret = 'void'; then
27338
27339$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
27340
27341 REPLACE_UNSETENV=1
27342 fi
27343
27344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
27345$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
d0ac1c44 27346if ${gl_cv_func_unsetenv_works+:} false; then :
3d99e817
AK
27347 $as_echo_n "(cached) " >&6
27348else
27349 if test "$cross_compiling" = yes; then :
27350 case "$host_os" in
27351 # Guess yes on glibc systems.
27352 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
27353 # If we don't know, assume the worst.
27354 *) gl_cv_func_unsetenv_works="guessing no" ;;
27355 esac
27356
27357else
27358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27359/* end confdefs.h. */
27360
27361 #include <stdlib.h>
27362 #include <errno.h>
27363 extern char **environ;
27364
27365int
27366main ()
27367{
27368
27369 char entry1[] = "a=1";
27370 char entry2[] = "b=2";
27371 char *env[] = { entry1, entry2, NULL };
27372 if (putenv ((char *) "a=1")) return 1;
27373 if (putenv (entry2)) return 2;
27374 entry2[0] = 'a';
27375 unsetenv ("a");
27376 if (getenv ("a")) return 3;
27377 if (!unsetenv ("") || errno != EINVAL) return 4;
27378 entry2[0] = 'b';
27379 environ = env;
27380 if (!getenv ("a")) return 5;
27381 entry2[0] = 'a';
27382 unsetenv ("a");
27383 if (getenv ("a")) return 6;
27384
27385 ;
27386 return 0;
27387}
27388_ACEOF
27389if ac_fn_c_try_run "$LINENO"; then :
27390 gl_cv_func_unsetenv_works=yes
27391else
27392 gl_cv_func_unsetenv_works=no
27393fi
27394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27395 conftest.$ac_objext conftest.beam conftest.$ac_ext
27396fi
27397
27398fi
27399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
27400$as_echo "$gl_cv_func_unsetenv_works" >&6; }
27401 case "$gl_cv_func_unsetenv_works" in
27402 *yes) ;;
27403 *)
27404 REPLACE_UNSETENV=1
27405 ;;
27406 esac
27407 fi
27408
27409 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
27410
27411
27412
27413
27414
27415
27416
27417
27418 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
27419
27420
27421
27422
472fa5ee
SM
27423 :
27424
27425
27426
27427
27428
3d99e817
AK
27429
27430 fi
27431
27432
27433
27434
27435
27436 GNULIB_UNSETENV=1
27437
27438
27439
27440
27441
27442$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
27443
27444
27445
27446
27447
27448
8839a007
PA
27449
27450
27451
27452
27453
27454
472fa5ee
SM
27455 :
27456
27457
27458
27459
27460
8839a007 27461
8690e634
JK
27462
27463
27464 if test $gl_cv_have_include_next = yes; then
27465 gl_cv_next_wchar_h='<'wchar.h'>'
27466 else
27467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
27468$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
d0ac1c44 27469if ${gl_cv_next_wchar_h+:} false; then :
8690e634
JK
27470 $as_echo_n "(cached) " >&6
27471else
27472
27473 if test $ac_cv_header_wchar_h = yes; then
27474
27475
4a626d0a
PA
27476
27477
27478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
27479/* end confdefs.h. */
27480#include <wchar.h>
8690e634 27481_ACEOF
4a626d0a
PA
27482 case "$host_os" in
27483 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27484 *) gl_absname_cpp="$ac_cpp" ;;
27485 esac
27486
27487 case "$host_os" in
27488 mingw*)
27489 gl_dirsep_regex='[/\\]'
27490 ;;
27491 *)
27492 gl_dirsep_regex='\/'
27493 ;;
27494 esac
27495 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27496 gl_header_literal_regex=`echo 'wchar.h' \
27497 | sed -e "$gl_make_literal_regex_sed"`
27498 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27499 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27500 s|^/[^/]|//&|
27501 p
27502 q
27503 }'
27504
27505 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27506 sed -n "$gl_absolute_header_sed"`
27507
27508 gl_header=$gl_cv_absolute_wchar_h
27509 gl_cv_next_wchar_h='"'$gl_header'"'
8690e634
JK
27510 else
27511 gl_cv_next_wchar_h='<'wchar.h'>'
27512 fi
27513
27514
27515fi
27516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
27517$as_echo "$gl_cv_next_wchar_h" >&6; }
27518 fi
27519 NEXT_WCHAR_H=$gl_cv_next_wchar_h
27520
27521 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27522 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27523 gl_next_as_first_directive='<'wchar.h'>'
27524 else
27525 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27526 gl_next_as_first_directive=$gl_cv_next_wchar_h
27527 fi
27528 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
27529
27530
27531
27532
27533 if test $ac_cv_header_wchar_h = yes; then
27534 HAVE_WCHAR_H=1
27535 else
27536 HAVE_WCHAR_H=0
27537 fi
27538
c971b7fa
PA
27539
27540
27541
27542
8690e634
JK
27543 if test $gt_cv_c_wint_t = yes; then
27544 HAVE_WINT_T=1
27545 else
27546 HAVE_WINT_T=0
27547 fi
c971b7fa
PA
27548
27549
27550
5e8754f9
SDJ
27551 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
27552 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27554$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27555if eval \${$as_gl_Symbol+:} false; then :
27556 $as_echo_n "(cached) " >&6
27557else
27558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27559/* end confdefs.h. */
8690e634 27560
5e8754f9
SDJ
27561/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27562 <wchar.h>.
27563 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27564 included before <wchar.h>. */
27565#if !(defined __GLIBC__ && !defined __UCLIBC__)
27566# include <stddef.h>
27567# include <stdio.h>
27568# include <time.h>
27569#endif
27570#include <wchar.h>
c971b7fa 27571
5e8754f9
SDJ
27572int
27573main ()
27574{
27575#undef $gl_func
27576 (void) $gl_func;
27577 ;
27578 return 0;
27579}
27580_ACEOF
27581if ac_fn_c_try_compile "$LINENO"; then :
27582 eval "$as_gl_Symbol=yes"
27583else
27584 eval "$as_gl_Symbol=no"
27585fi
27586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27587fi
27588eval ac_res=\$$as_gl_Symbol
27589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27590$as_echo "$ac_res" >&6; }
27591 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27592 cat >>confdefs.h <<_ACEOF
27593#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27594_ACEOF
c971b7fa 27595
5e8754f9
SDJ
27596 eval ac_cv_have_decl_$gl_func=yes
27597fi
27598 done
8690e634
JK
27599
27600
27601
27602
27603
27604
27605
472fa5ee
SM
27606 :
27607
27608
27609
27610
27611
8690e634
JK
27612 if test $ac_cv_func_iswcntrl = yes; then
27613 HAVE_ISWCNTRL=1
27614 else
27615 HAVE_ISWCNTRL=0
27616 fi
27617
27618
27619
8690e634
JK
27620 if test $gt_cv_c_wint_t = yes; then
27621 HAVE_WINT_T=1
27622 else
27623 HAVE_WINT_T=0
27624 fi
27625
27626
27627
27628
27629
27630
c971b7fa 27631
8690e634 27632
472fa5ee
SM
27633 :
27634
27635
27636
27637
27638
c971b7fa
PA
27639
27640
27641
27642 if test $gl_cv_have_include_next = yes; then
8690e634 27643 gl_cv_next_wctype_h='<'wctype.h'>'
c971b7fa 27644 else
8690e634
JK
27645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
27646$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
d0ac1c44 27647if ${gl_cv_next_wctype_h+:} false; then :
c971b7fa
PA
27648 $as_echo_n "(cached) " >&6
27649else
27650
8690e634
JK
27651 if test $ac_cv_header_wctype_h = yes; then
27652
27653
4a626d0a
PA
27654
27655
27656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 27657/* end confdefs.h. */
8690e634 27658#include <wctype.h>
c971b7fa 27659_ACEOF
4a626d0a
PA
27660 case "$host_os" in
27661 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27662 *) gl_absname_cpp="$ac_cpp" ;;
27663 esac
27664
27665 case "$host_os" in
27666 mingw*)
27667 gl_dirsep_regex='[/\\]'
27668 ;;
27669 *)
27670 gl_dirsep_regex='\/'
27671 ;;
27672 esac
27673 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27674 gl_header_literal_regex=`echo 'wctype.h' \
27675 | sed -e "$gl_make_literal_regex_sed"`
27676 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27677 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27678 s|^/[^/]|//&|
27679 p
27680 q
27681 }'
27682
27683 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27684 sed -n "$gl_absolute_header_sed"`
27685
27686 gl_header=$gl_cv_absolute_wctype_h
27687 gl_cv_next_wctype_h='"'$gl_header'"'
8690e634
JK
27688 else
27689 gl_cv_next_wctype_h='<'wctype.h'>'
27690 fi
c971b7fa
PA
27691
27692
27693fi
8690e634
JK
27694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
27695$as_echo "$gl_cv_next_wctype_h" >&6; }
c971b7fa 27696 fi
8690e634 27697 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
c971b7fa
PA
27698
27699 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27700 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8690e634 27701 gl_next_as_first_directive='<'wctype.h'>'
c971b7fa
PA
27702 else
27703 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8690e634 27704 gl_next_as_first_directive=$gl_cv_next_wctype_h
c971b7fa 27705 fi
8690e634
JK
27706 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
27707
27708
27709
27710
27711 if test $ac_cv_header_wctype_h = yes; then
27712 if test $ac_cv_func_iswcntrl = yes; then
27713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
27714$as_echo_n "checking whether iswcntrl works... " >&6; }
d0ac1c44 27715if ${gl_cv_func_iswcntrl_works+:} false; then :
8690e634
JK
27716 $as_echo_n "(cached) " >&6
27717else
27718
27719 if test "$cross_compiling" = yes; then :
5e8754f9 27720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
27721/* end confdefs.h. */
27722#include <stdlib.h>
27723 #if __GNU_LIBRARY__ == 1
27724 Linux libc5 i18n is broken.
27725 #endif
27726int
27727main ()
27728{
27729
27730 ;
27731 return 0;
27732}
27733_ACEOF
27734if ac_fn_c_try_compile "$LINENO"; then :
27735 gl_cv_func_iswcntrl_works="guessing yes"
27736else
27737 gl_cv_func_iswcntrl_works="guessing no"
27738fi
27739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27740
27741else
27742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27743/* end confdefs.h. */
27744
27745 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27746 included before <wchar.h>.
27747 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27748 must be included before <wchar.h>. */
27749 #include <stddef.h>
27750 #include <stdio.h>
27751 #include <time.h>
27752 #include <wchar.h>
27753 #include <wctype.h>
27754 int main () { return iswprint ('x') == 0; }
27755
27756_ACEOF
27757if ac_fn_c_try_run "$LINENO"; then :
27758 gl_cv_func_iswcntrl_works=yes
27759else
27760 gl_cv_func_iswcntrl_works=no
27761fi
27762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27763 conftest.$ac_objext conftest.beam conftest.$ac_ext
27764fi
27765
27766
27767fi
27768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
27769$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
27770 fi
27771 HAVE_WCTYPE_H=1
27772 else
27773 HAVE_WCTYPE_H=0
27774 fi
27775
27776
27777 case "$gl_cv_func_iswcntrl_works" in
27778 *yes) REPLACE_ISWCNTRL=0 ;;
27779 *) REPLACE_ISWCNTRL=1 ;;
27780 esac
27781
27782
27783 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
27784 :
27785 fi
27786
27787 if test $REPLACE_ISWCNTRL = 1; then
27788 REPLACE_TOWLOWER=1
27789 else
27790 for ac_func in towlower
27791do :
27792 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
d0ac1c44 27793if test "x$ac_cv_func_towlower" = xyes; then :
8690e634
JK
27794 cat >>confdefs.h <<_ACEOF
27795#define HAVE_TOWLOWER 1
27796_ACEOF
27797
27798fi
27799done
27800
27801 if test $ac_cv_func_towlower = yes; then
27802 REPLACE_TOWLOWER=0
27803 else
27804 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27805 included before <wchar.h>.
27806 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27807 must be included before <wchar.h>. */
27808 #include <stddef.h>
27809 #include <stdio.h>
27810 #include <time.h>
27811 #include <wchar.h>
27812 #if HAVE_WCTYPE_H
27813 # include <wctype.h>
27814 #endif
27815
27816"
d0ac1c44 27817if test "x$ac_cv_have_decl_towlower" = xyes; then :
8690e634
JK
27818 ac_have_decl=1
27819else
27820 ac_have_decl=0
27821fi
27822
27823cat >>confdefs.h <<_ACEOF
27824#define HAVE_DECL_TOWLOWER $ac_have_decl
27825_ACEOF
27826
27827 if test $ac_cv_have_decl_towlower = yes; then
27828 REPLACE_TOWLOWER=1
27829 else
27830 REPLACE_TOWLOWER=0
27831 fi
27832 fi
27833 fi
27834
27835
27836 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
27837 :
27838 fi
27839
27840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
27841$as_echo_n "checking for wctype_t... " >&6; }
d0ac1c44 27842if ${gl_cv_type_wctype_t+:} false; then :
8690e634
JK
27843 $as_echo_n "(cached) " >&6
27844else
27845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27846/* end confdefs.h. */
27847/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27848 included before <wchar.h>.
27849 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27850 must be included before <wchar.h>. */
27851 #include <stddef.h>
27852 #include <stdio.h>
27853 #include <time.h>
27854 #include <wchar.h>
27855 #if HAVE_WCTYPE_H
27856 # include <wctype.h>
27857 #endif
27858 wctype_t a;
27859
27860int
27861main ()
27862{
27863
27864 ;
27865 return 0;
27866}
27867_ACEOF
27868if ac_fn_c_try_compile "$LINENO"; then :
27869 gl_cv_type_wctype_t=yes
27870else
27871 gl_cv_type_wctype_t=no
27872fi
27873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 27874
8690e634
JK
27875fi
27876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
27877$as_echo "$gl_cv_type_wctype_t" >&6; }
27878 if test $gl_cv_type_wctype_t = no; then
27879 HAVE_WCTYPE_T=0
27880 fi
27881
27882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
27883$as_echo_n "checking for wctrans_t... " >&6; }
d0ac1c44 27884if ${gl_cv_type_wctrans_t+:} false; then :
8690e634
JK
27885 $as_echo_n "(cached) " >&6
27886else
27887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27888/* end confdefs.h. */
27889/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27890 included before <wchar.h>.
27891 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27892 must be included before <wchar.h>. */
27893 #include <stddef.h>
27894 #include <stdio.h>
27895 #include <time.h>
27896 #include <wchar.h>
27897 #include <wctype.h>
27898 wctrans_t a;
c971b7fa 27899
8690e634
JK
27900int
27901main ()
27902{
c971b7fa 27903
8690e634
JK
27904 ;
27905 return 0;
27906}
27907_ACEOF
27908if ac_fn_c_try_compile "$LINENO"; then :
27909 gl_cv_type_wctrans_t=yes
27910else
27911 gl_cv_type_wctrans_t=no
27912fi
27913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 27914
8690e634
JK
27915fi
27916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
27917$as_echo "$gl_cv_type_wctrans_t" >&6; }
27918 if test $gl_cv_type_wctrans_t = no; then
27919 HAVE_WCTRANS_T=0
c971b7fa
PA
27920 fi
27921
27922
5e8754f9
SDJ
27923 for gl_func in wctype iswctype wctrans towctrans ; do
27924 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27926$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27927if eval \${$as_gl_Symbol+:} false; then :
27928 $as_echo_n "(cached) " >&6
27929else
27930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27931/* end confdefs.h. */
27932
27933/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27934 <wchar.h>.
27935 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27936 included before <wchar.h>. */
27937#if !(defined __GLIBC__ && !defined __UCLIBC__)
27938# include <stddef.h>
27939# include <stdio.h>
27940# include <time.h>
27941# include <wchar.h>
27942#endif
27943#include <wctype.h>
27944
27945int
27946main ()
27947{
27948#undef $gl_func
27949 (void) $gl_func;
27950 ;
27951 return 0;
27952}
27953_ACEOF
27954if ac_fn_c_try_compile "$LINENO"; then :
27955 eval "$as_gl_Symbol=yes"
27956else
27957 eval "$as_gl_Symbol=no"
27958fi
27959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27960fi
27961eval ac_res=\$$as_gl_Symbol
27962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27963$as_echo "$ac_res" >&6; }
27964 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27965 cat >>confdefs.h <<_ACEOF
27966#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27967_ACEOF
c971b7fa 27968
5e8754f9
SDJ
27969 eval ac_cv_have_decl_$gl_func=yes
27970fi
27971 done
c971b7fa
PA
27972
27973
27974 # End of code from modules
27975
27976
27977
27978
27979
27980
27981
27982
27983
27984 gltests_libdeps=
27985 gltests_ltlibdeps=
27986
27987
27988
27989
27990
27991
27992
27993
27994
27995 gl_source_base='tests'
27996 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
27997
27998 gl_module_indicator_condition=$gltests_WITNESS
27999
28000
28001
28002
28003
28004
28005
28006
28007
28008 LIBGNU_LIBDEPS="$gl_libdeps"
28009
28010 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
28011
28012
28013
d0ac1c44 28014am__api_version='1.15'
c971b7fa
PA
28015
28016# Find a good install program. We prefer a C program (faster),
28017# so one script is as good as another. But avoid the broken or
28018# incompatible versions:
28019# SysV /etc/install, /usr/sbin/install
28020# SunOS /usr/etc/install
28021# IRIX /sbin/install
28022# AIX /bin/install
28023# AmigaOS /C/install, which installs bootblocks on floppy discs
28024# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
28025# AFS /usr/afsws/bin/install, which mishandles nonexistent args
28026# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
28027# OS/2's system install, which has a completely different semantic
28028# ./install, which can be erroneously created by make from ./install.sh.
28029# Reject install programs that cannot install multiple files.
28030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
28031$as_echo_n "checking for a BSD-compatible install... " >&6; }
28032if test -z "$INSTALL"; then
d0ac1c44 28033if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
28034 $as_echo_n "(cached) " >&6
28035else
28036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28037for as_dir in $PATH
28038do
28039 IFS=$as_save_IFS
28040 test -z "$as_dir" && as_dir=.
28041 # Account for people who put trailing slashes in PATH elements.
28042case $as_dir/ in #((
28043 ./ | .// | /[cC]/* | \
28044 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
28045 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
28046 /usr/ucb/* ) ;;
28047 *)
28048 # OSF1 and SCO ODT 3.0 have their own names for install.
28049 # Don't use installbsd from OSF since it installs stuff as root
28050 # by default.
28051 for ac_prog in ginstall scoinst install; do
28052 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 28053 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
28054 if test $ac_prog = install &&
28055 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
28056 # AIX install. It has an incompatible calling convention.
28057 :
28058 elif test $ac_prog = install &&
28059 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
28060 # program-specific install script used by HP pwplus--don't use.
28061 :
28062 else
28063 rm -rf conftest.one conftest.two conftest.dir
28064 echo one > conftest.one
28065 echo two > conftest.two
28066 mkdir conftest.dir
28067 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
28068 test -s conftest.one && test -s conftest.two &&
28069 test -s conftest.dir/conftest.one &&
28070 test -s conftest.dir/conftest.two
28071 then
28072 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
28073 break 3
28074 fi
28075 fi
28076 fi
28077 done
28078 done
28079 ;;
28080esac
28081
28082 done
28083IFS=$as_save_IFS
28084
28085rm -rf conftest.one conftest.two conftest.dir
28086
28087fi
28088 if test "${ac_cv_path_install+set}" = set; then
28089 INSTALL=$ac_cv_path_install
28090 else
28091 # As a last resort, use the slow shell script. Don't cache a
28092 # value for INSTALL within a source directory, because that will
28093 # break other packages using the cache if that directory is
28094 # removed, or if the value is a relative name.
28095 INSTALL=$ac_install_sh
28096 fi
28097fi
28098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
28099$as_echo "$INSTALL" >&6; }
28100
28101# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
28102# It thinks the first close brace ends the variable substitution.
28103test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
28104
28105test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
28106
28107test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
28108
28109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
28110$as_echo_n "checking whether build environment is sane... " >&6; }
c971b7fa
PA
28111# Reject unsafe characters in $srcdir or the absolute working directory
28112# name. Accept space and tab only in the latter.
28113am_lf='
28114'
28115case `pwd` in
28116 *[\\\"\#\$\&\'\`$am_lf]*)
d0ac1c44 28117 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
c971b7fa
PA
28118esac
28119case $srcdir in
28120 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
d0ac1c44 28121 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
c971b7fa
PA
28122esac
28123
d0ac1c44 28124# Do 'set' in a subshell so we don't clobber the current shell's
c971b7fa
PA
28125# arguments. Must try -L first in case configure is actually a
28126# symlink; some systems play weird games with the mod time of symlinks
28127# (eg FreeBSD returns the mod time of the symlink's containing
28128# directory).
28129if (
d0ac1c44
SM
28130 am_has_slept=no
28131 for am_try in 1 2; do
28132 echo "timestamp, slept: $am_has_slept" > conftest.file
28133 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
28134 if test "$*" = "X"; then
28135 # -L didn't work.
28136 set X `ls -t "$srcdir/configure" conftest.file`
28137 fi
28138 if test "$*" != "X $srcdir/configure conftest.file" \
28139 && test "$*" != "X conftest.file $srcdir/configure"; then
28140
28141 # If neither matched, then we have a broken ls. This can happen
28142 # if, for instance, CONFIG_SHELL is bash and it inherits a
28143 # broken ls alias from the environment. This has actually
28144 # happened. Such a system could not be considered "sane".
28145 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
28146 alias in your environment" "$LINENO" 5
28147 fi
28148 if test "$2" = conftest.file || test $am_try -eq 2; then
28149 break
28150 fi
28151 # Just in case.
28152 sleep 1
28153 am_has_slept=yes
28154 done
c971b7fa
PA
28155 test "$2" = conftest.file
28156 )
28157then
28158 # Ok.
28159 :
28160else
d0ac1c44 28161 as_fn_error $? "newly created file is older than distributed files!
c971b7fa
PA
28162Check your system clock" "$LINENO" 5
28163fi
28164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28165$as_echo "yes" >&6; }
d0ac1c44
SM
28166# If we didn't sleep, we still need to ensure time stamps of config.status and
28167# generated files are strictly newer.
28168am_sleep_pid=
28169if grep 'slept: no' conftest.file >/dev/null 2>&1; then
28170 ( sleep 1 ) &
28171 am_sleep_pid=$!
28172fi
28173
28174rm -f conftest.file
28175
c971b7fa
PA
28176test "$program_prefix" != NONE &&
28177 program_transform_name="s&^&$program_prefix&;$program_transform_name"
28178# Use a double $ so make ignores it.
28179test "$program_suffix" != NONE &&
28180 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
28181# Double any \ or $.
28182# By default was `s,x,x', remove it if useless.
28183ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
28184program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
28185
c971b7fa
PA
28186if test x"${MISSING+set}" != xset; then
28187 case $am_aux_dir in
28188 *\ * | *\ *)
28189 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
28190 *)
28191 MISSING="\${SHELL} $am_aux_dir/missing" ;;
28192 esac
28193fi
28194# Use eval to expand $SHELL
d0ac1c44
SM
28195if eval "$MISSING --is-lightweight"; then
28196 am_missing_run="$MISSING "
c971b7fa
PA
28197else
28198 am_missing_run=
d0ac1c44
SM
28199 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
28200$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
c971b7fa
PA
28201fi
28202
d0ac1c44 28203if test x"${install_sh+set}" != xset; then
c971b7fa
PA
28204 case $am_aux_dir in
28205 *\ * | *\ *)
28206 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
28207 *)
28208 install_sh="\${SHELL} $am_aux_dir/install-sh"
28209 esac
28210fi
28211
d0ac1c44
SM
28212# Installed binaries are usually stripped using 'strip' when the user
28213# run "make install-strip". However 'strip' might not be the right
c971b7fa 28214# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 28215# will honor the 'STRIP' environment variable to overrule this program.
c971b7fa
PA
28216if test "$cross_compiling" != no; then
28217 if test -n "$ac_tool_prefix"; then
28218 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
28219set dummy ${ac_tool_prefix}strip; ac_word=$2
28220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28221$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 28222if ${ac_cv_prog_STRIP+:} false; then :
c971b7fa
PA
28223 $as_echo_n "(cached) " >&6
28224else
28225 if test -n "$STRIP"; then
28226 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
28227else
28228as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28229for as_dir in $PATH
28230do
28231 IFS=$as_save_IFS
28232 test -z "$as_dir" && as_dir=.
28233 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 28234 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
28235 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
28236 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28237 break 2
28238 fi
28239done
28240 done
28241IFS=$as_save_IFS
28242
28243fi
28244fi
28245STRIP=$ac_cv_prog_STRIP
28246if test -n "$STRIP"; then
28247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
28248$as_echo "$STRIP" >&6; }
28249else
28250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28251$as_echo "no" >&6; }
28252fi
28253
28254
28255fi
28256if test -z "$ac_cv_prog_STRIP"; then
28257 ac_ct_STRIP=$STRIP
28258 # Extract the first word of "strip", so it can be a program name with args.
28259set dummy strip; ac_word=$2
28260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28261$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 28262if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
c971b7fa
PA
28263 $as_echo_n "(cached) " >&6
28264else
28265 if test -n "$ac_ct_STRIP"; then
28266 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
28267else
28268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28269for as_dir in $PATH
28270do
28271 IFS=$as_save_IFS
28272 test -z "$as_dir" && as_dir=.
28273 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 28274 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
28275 ac_cv_prog_ac_ct_STRIP="strip"
28276 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28277 break 2
28278 fi
28279done
28280 done
28281IFS=$as_save_IFS
28282
28283fi
28284fi
28285ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
28286if test -n "$ac_ct_STRIP"; then
28287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
28288$as_echo "$ac_ct_STRIP" >&6; }
28289else
28290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28291$as_echo "no" >&6; }
28292fi
28293
28294 if test "x$ac_ct_STRIP" = x; then
28295 STRIP=":"
28296 else
28297 case $cross_compiling:$ac_tool_warned in
28298yes:)
28299{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28300$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28301ac_tool_warned=yes ;;
28302esac
28303 STRIP=$ac_ct_STRIP
28304 fi
28305else
28306 STRIP="$ac_cv_prog_STRIP"
28307fi
28308
28309fi
28310INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
28311
c971b7fa
PA
28312for ac_prog in gawk mawk nawk awk
28313do
28314 # Extract the first word of "$ac_prog", so it can be a program name with args.
28315set dummy $ac_prog; ac_word=$2
28316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28317$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 28318if ${ac_cv_prog_AWK+:} false; then :
c971b7fa
PA
28319 $as_echo_n "(cached) " >&6
28320else
28321 if test -n "$AWK"; then
28322 ac_cv_prog_AWK="$AWK" # Let the user override the test.
28323else
28324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28325for as_dir in $PATH
28326do
28327 IFS=$as_save_IFS
28328 test -z "$as_dir" && as_dir=.
28329 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 28330 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
28331 ac_cv_prog_AWK="$ac_prog"
28332 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28333 break 2
28334 fi
28335done
28336 done
28337IFS=$as_save_IFS
28338
28339fi
28340fi
28341AWK=$ac_cv_prog_AWK
28342if test -n "$AWK"; then
28343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
28344$as_echo "$AWK" >&6; }
28345else
28346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28347$as_echo "no" >&6; }
28348fi
28349
28350
28351 test -n "$AWK" && break
28352done
28353
28354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
28355$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
28356set x ${MAKE-make}
28357ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
d0ac1c44 28358if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
c971b7fa
PA
28359 $as_echo_n "(cached) " >&6
28360else
28361 cat >conftest.make <<\_ACEOF
28362SHELL = /bin/sh
28363all:
28364 @echo '@@@%%%=$(MAKE)=@@@%%%'
28365_ACEOF
d0ac1c44 28366# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
c971b7fa
PA
28367case `${MAKE-make} -f conftest.make 2>/dev/null` in
28368 *@@@%%%=?*=@@@%%%*)
28369 eval ac_cv_prog_make_${ac_make}_set=yes;;
28370 *)
28371 eval ac_cv_prog_make_${ac_make}_set=no;;
28372esac
28373rm -f conftest.make
28374fi
28375if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
28376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28377$as_echo "yes" >&6; }
28378 SET_MAKE=
28379else
28380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28381$as_echo "no" >&6; }
28382 SET_MAKE="MAKE=${MAKE-make}"
28383fi
28384
28385rm -rf .tst 2>/dev/null
28386mkdir .tst 2>/dev/null
28387if test -d .tst; then
28388 am__leading_dot=.
28389else
28390 am__leading_dot=_
28391fi
28392rmdir .tst 2>/dev/null
28393
28394DEPDIR="${am__leading_dot}deps"
28395
28396ac_config_commands="$ac_config_commands depfiles"
28397
28398
28399am_make=${MAKE-make}
28400cat > confinc << 'END'
28401am__doit:
28402 @echo this is the am__doit target
28403.PHONY: am__doit
28404END
28405# If we don't find an include directive, just comment out the code.
28406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
28407$as_echo_n "checking for style of include used by $am_make... " >&6; }
28408am__include="#"
28409am__quote=
28410_am_result=none
28411# First try GNU make style include.
28412echo "include confinc" > confmf
d0ac1c44 28413# Ignore all kinds of additional output from 'make'.
c971b7fa
PA
28414case `$am_make -s -f confmf 2> /dev/null` in #(
28415*the\ am__doit\ target*)
28416 am__include=include
28417 am__quote=
28418 _am_result=GNU
28419 ;;
28420esac
28421# Now try BSD make style include.
28422if test "$am__include" = "#"; then
28423 echo '.include "confinc"' > confmf
28424 case `$am_make -s -f confmf 2> /dev/null` in #(
28425 *the\ am__doit\ target*)
28426 am__include=.include
28427 am__quote="\""
28428 _am_result=BSD
28429 ;;
28430 esac
28431fi
28432
28433
28434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
28435$as_echo "$_am_result" >&6; }
28436rm -f confinc confmf
28437
28438# Check whether --enable-dependency-tracking was given.
28439if test "${enable_dependency_tracking+set}" = set; then :
28440 enableval=$enable_dependency_tracking;
28441fi
28442
28443if test "x$enable_dependency_tracking" != xno; then
28444 am_depcomp="$ac_aux_dir/depcomp"
28445 AMDEPBACKSLASH='\'
d0ac1c44 28446 am__nodep='_no'
c971b7fa
PA
28447fi
28448 if test "x$enable_dependency_tracking" != xno; then
28449 AMDEP_TRUE=
28450 AMDEP_FALSE='#'
28451else
28452 AMDEP_TRUE='#'
28453 AMDEP_FALSE=
28454fi
28455
28456
d0ac1c44
SM
28457# Check whether --enable-silent-rules was given.
28458if test "${enable_silent_rules+set}" = set; then :
28459 enableval=$enable_silent_rules;
28460fi
28461
28462case $enable_silent_rules in # (((
28463 yes) AM_DEFAULT_VERBOSITY=0;;
28464 no) AM_DEFAULT_VERBOSITY=1;;
28465 *) AM_DEFAULT_VERBOSITY=1;;
28466esac
28467am_make=${MAKE-make}
28468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
28469$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
28470if ${am_cv_make_support_nested_variables+:} false; then :
28471 $as_echo_n "(cached) " >&6
28472else
28473 if $as_echo 'TRUE=$(BAR$(V))
28474BAR0=false
28475BAR1=true
28476V=1
28477am__doit:
28478 @$(TRUE)
28479.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
28480 am_cv_make_support_nested_variables=yes
28481else
28482 am_cv_make_support_nested_variables=no
28483fi
28484fi
28485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
28486$as_echo "$am_cv_make_support_nested_variables" >&6; }
28487if test $am_cv_make_support_nested_variables = yes; then
28488 AM_V='$(V)'
28489 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
28490else
28491 AM_V=$AM_DEFAULT_VERBOSITY
28492 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
28493fi
28494AM_BACKSLASH='\'
28495
c971b7fa
PA
28496if test "`cd $srcdir && pwd`" != "`pwd`"; then
28497 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
28498 # is not polluted with repeated "-I."
28499 am__isrc=' -I$(srcdir)'
28500 # test to see if srcdir already configured
28501 if test -f $srcdir/config.status; then
d0ac1c44 28502 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
c971b7fa
PA
28503 fi
28504fi
28505
28506# test whether we have cygpath
28507if test -z "$CYGPATH_W"; then
28508 if (cygpath --version) >/dev/null 2>/dev/null; then
28509 CYGPATH_W='cygpath -w'
28510 else
28511 CYGPATH_W=echo
28512 fi
28513fi
28514
28515
28516# Define the identity of the package.
d0ac1c44
SM
28517 PACKAGE='libgnu'
28518 VERSION='UNUSED-VERSION'
c971b7fa
PA
28519
28520
28521# Some tools Automake needs.
28522
28523ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
28524
28525
28526AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
28527
28528
28529AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
28530
28531
28532AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
28533
28534
28535MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
28536
d0ac1c44
SM
28537# For better backward compatibility. To be removed once Automake 1.9.x
28538# dies out for good. For more background, see:
28539# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
28540# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
28541mkdir_p='$(MKDIR_P)'
28542
28543# We need awk for the "check" target (and possibly the TAP driver). The
28544# system "awk" is bad on some platforms.
28545# Always define AMTAR for backward compatibility. Yes, it's still used
28546# in the wild :-( We should find a proper way to deprecate it ...
28547AMTAR='$${TAR-tar}'
28548
28549
28550# We'll loop over all known methods to create a tar archive until one works.
28551_am_tools='gnutar pax cpio none'
c971b7fa 28552
d0ac1c44 28553am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
c971b7fa 28554
c971b7fa
PA
28555
28556
28557
28558
28559depcc="$CC" am_compiler_list=
28560
28561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
28562$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 28563if ${am_cv_CC_dependencies_compiler_type+:} false; then :
c971b7fa
PA
28564 $as_echo_n "(cached) " >&6
28565else
28566 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
28567 # We make a subdir and do the tests there. Otherwise we can end up
28568 # making bogus files that we don't know about and never remove. For
28569 # instance it was reported that on HP-UX the gcc test will end up
d0ac1c44
SM
28570 # making a dummy file named 'D' -- because '-MD' means "put the output
28571 # in D".
28572 rm -rf conftest.dir
c971b7fa
PA
28573 mkdir conftest.dir
28574 # Copy depcomp to subdir because otherwise we won't find it if we're
28575 # using a relative directory.
28576 cp "$am_depcomp" conftest.dir
28577 cd conftest.dir
28578 # We will build objects and dependencies in a subdirectory because
28579 # it helps to detect inapplicable dependency modes. For instance
28580 # both Tru64's cc and ICC support -MD to output dependencies as a
28581 # side effect of compilation, but ICC will put the dependencies in
28582 # the current directory while Tru64 will put them in the object
28583 # directory.
28584 mkdir sub
28585
28586 am_cv_CC_dependencies_compiler_type=none
28587 if test "$am_compiler_list" = ""; then
28588 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
28589 fi
28590 am__universal=false
28591 case " $depcc " in #(
28592 *\ -arch\ *\ -arch\ *) am__universal=true ;;
28593 esac
28594
28595 for depmode in $am_compiler_list; do
28596 # Setup a source with many dependencies, because some compilers
28597 # like to wrap large dependency lists on column 80 (with \), and
28598 # we should not choose a depcomp mode which is confused by this.
28599 #
28600 # We need to recreate these files for each test, as the compiler may
28601 # overwrite some of them when testing with obscure command lines.
28602 # This happens at least with the AIX C compiler.
28603 : > sub/conftest.c
28604 for i in 1 2 3 4 5 6; do
28605 echo '#include "conftst'$i'.h"' >> sub/conftest.c
d0ac1c44
SM
28606 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
28607 # Solaris 10 /bin/sh.
28608 echo '/* dummy */' > sub/conftst$i.h
c971b7fa
PA
28609 done
28610 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
28611
d0ac1c44 28612 # We check with '-c' and '-o' for the sake of the "dashmstdout"
c971b7fa 28613 # mode. It turns out that the SunPro C++ compiler does not properly
d0ac1c44
SM
28614 # handle '-M -o', and we need to detect this. Also, some Intel
28615 # versions had trouble with output in subdirs.
c971b7fa
PA
28616 am__obj=sub/conftest.${OBJEXT-o}
28617 am__minus_obj="-o $am__obj"
28618 case $depmode in
28619 gcc)
28620 # This depmode causes a compiler race in universal mode.
28621 test "$am__universal" = false || continue
28622 ;;
28623 nosideeffect)
d0ac1c44
SM
28624 # After this tag, mechanisms are not by side-effect, so they'll
28625 # only be used when explicitly requested.
c971b7fa
PA
28626 if test "x$enable_dependency_tracking" = xyes; then
28627 continue
28628 else
28629 break
28630 fi
28631 ;;
d0ac1c44
SM
28632 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
28633 # This compiler won't grok '-c -o', but also, the minuso test has
c971b7fa
PA
28634 # not run yet. These depmodes are late enough in the game, and
28635 # so weak that their functioning should not be impacted.
28636 am__obj=conftest.${OBJEXT-o}
28637 am__minus_obj=
28638 ;;
28639 none) break ;;
28640 esac
28641 if depmode=$depmode \
28642 source=sub/conftest.c object=$am__obj \
28643 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
28644 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
28645 >/dev/null 2>conftest.err &&
28646 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
28647 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
28648 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
28649 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
28650 # icc doesn't choke on unknown options, it will just issue warnings
28651 # or remarks (even with -Werror). So we grep stderr for any message
28652 # that says an option was ignored or not supported.
28653 # When given -MP, icc 7.0 and 7.1 complain thusly:
28654 # icc: Command line warning: ignoring option '-M'; no argument required
28655 # The diagnosis changed in icc 8.0:
28656 # icc: Command line remark: option '-MP' not supported
28657 if (grep 'ignoring option' conftest.err ||
28658 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
28659 am_cv_CC_dependencies_compiler_type=$depmode
28660 break
28661 fi
28662 fi
28663 done
28664
28665 cd ..
28666 rm -rf conftest.dir
28667else
28668 am_cv_CC_dependencies_compiler_type=none
28669fi
28670
28671fi
28672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
28673$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
28674CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
28675
28676 if
28677 test "x$enable_dependency_tracking" != xno \
28678 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
28679 am__fastdepCC_TRUE=
28680 am__fastdepCC_FALSE='#'
28681else
28682 am__fastdepCC_TRUE='#'
28683 am__fastdepCC_FALSE=
28684fi
28685
28686
28687
d0ac1c44
SM
28688# POSIX will say in a future version that running "rm -f" with no argument
28689# is OK; and we want to be able to make that assumption in our Makefile
28690# recipes. So use an aggressive probe to check that the usage we want is
28691# actually supported "in the wild" to an acceptable degree.
28692# See automake bug#10828.
28693# To make any issue more visible, cause the running configure to be aborted
28694# by default if the 'rm' program in use doesn't match our expectations; the
28695# user can still override this though.
28696if rm -f && rm -fr && rm -rf; then : OK; else
28697 cat >&2 <<'END'
28698Oops!
28699
28700Your 'rm' program seems unable to run without file operands specified
28701on the command line, even when the '-f' option is present. This is contrary
28702to the behaviour of most rm programs out there, and not conforming with
28703the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
28704
28705Please tell bug-automake@gnu.org about your system, including the value
28706of your $PATH and any error possibly output before this message. This
28707can help us improve future automake versions.
28708
28709END
28710 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
28711 echo 'Configuration will proceed anyway, since you have set the' >&2
28712 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
28713 echo >&2
28714 else
28715 cat >&2 <<'END'
28716Aborting the configuration process, to ensure you take notice of the issue.
28717
28718You can download and install GNU coreutils to get an 'rm' implementation
28719that behaves properly: <http://www.gnu.org/software/coreutils/>.
28720
28721If you want to complete the configuration process using your problematic
28722'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
28723to "yes", and re-run configure.
28724
28725END
28726 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
28727 fi
28728fi
28729
c971b7fa 28730
39be3c7e
SM
28731# Check whether --enable-silent-rules was given.
28732if test "${enable_silent_rules+set}" = set; then :
28733 enableval=$enable_silent_rules;
28734fi
28735
d0ac1c44
SM
28736case $enable_silent_rules in # (((
28737 yes) AM_DEFAULT_VERBOSITY=0;;
28738 no) AM_DEFAULT_VERBOSITY=1;;
28739 *) AM_DEFAULT_VERBOSITY=0;;
39be3c7e 28740esac
d0ac1c44
SM
28741am_make=${MAKE-make}
28742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
28743$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
28744if ${am_cv_make_support_nested_variables+:} false; then :
28745 $as_echo_n "(cached) " >&6
28746else
28747 if $as_echo 'TRUE=$(BAR$(V))
28748BAR0=false
28749BAR1=true
28750V=1
28751am__doit:
28752 @$(TRUE)
28753.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
28754 am_cv_make_support_nested_variables=yes
28755else
28756 am_cv_make_support_nested_variables=no
28757fi
28758fi
28759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
28760$as_echo "$am_cv_make_support_nested_variables" >&6; }
28761if test $am_cv_make_support_nested_variables = yes; then
28762 AM_V='$(V)'
28763 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
28764else
28765 AM_V=$AM_DEFAULT_VERBOSITY
28766 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
28767fi
39be3c7e
SM
28768AM_BACKSLASH='\'
28769
28770
c971b7fa
PA
28771# --------------------- #
28772# Checks for programs. #
28773# --------------------- #
28774
28775
28776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
28777$as_echo_n "checking whether ln -s works... " >&6; }
28778LN_S=$as_ln_s
28779if test "$LN_S" = "ln -s"; then
28780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28781$as_echo "yes" >&6; }
28782else
28783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
28784$as_echo "no, using $LN_S" >&6; }
28785fi
28786
28787if test -n "$ac_tool_prefix"; then
28788 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
28789set dummy ${ac_tool_prefix}ranlib; ac_word=$2
28790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28791$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 28792if ${ac_cv_prog_RANLIB+:} false; then :
c971b7fa
PA
28793 $as_echo_n "(cached) " >&6
28794else
28795 if test -n "$RANLIB"; then
28796 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
28797else
28798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28799for as_dir in $PATH
28800do
28801 IFS=$as_save_IFS
28802 test -z "$as_dir" && as_dir=.
28803 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 28804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
28805 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
28806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28807 break 2
28808 fi
28809done
28810 done
28811IFS=$as_save_IFS
28812
28813fi
28814fi
28815RANLIB=$ac_cv_prog_RANLIB
28816if test -n "$RANLIB"; then
28817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
28818$as_echo "$RANLIB" >&6; }
28819else
28820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28821$as_echo "no" >&6; }
28822fi
28823
28824
28825fi
28826if test -z "$ac_cv_prog_RANLIB"; then
28827 ac_ct_RANLIB=$RANLIB
28828 # Extract the first word of "ranlib", so it can be a program name with args.
28829set dummy ranlib; ac_word=$2
28830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28831$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 28832if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
28833 $as_echo_n "(cached) " >&6
28834else
28835 if test -n "$ac_ct_RANLIB"; then
28836 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
28837else
28838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28839for as_dir in $PATH
28840do
28841 IFS=$as_save_IFS
28842 test -z "$as_dir" && as_dir=.
28843 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 28844 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
28845 ac_cv_prog_ac_ct_RANLIB="ranlib"
28846 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28847 break 2
28848 fi
28849done
28850 done
28851IFS=$as_save_IFS
28852
28853fi
28854fi
28855ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
28856if test -n "$ac_ct_RANLIB"; then
28857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
28858$as_echo "$ac_ct_RANLIB" >&6; }
28859else
28860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28861$as_echo "no" >&6; }
28862fi
28863
28864 if test "x$ac_ct_RANLIB" = x; then
28865 RANLIB=":"
28866 else
28867 case $cross_compiling:$ac_tool_warned in
28868yes:)
28869{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28870$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28871ac_tool_warned=yes ;;
28872esac
28873 RANLIB=$ac_ct_RANLIB
28874 fi
28875else
28876 RANLIB="$ac_cv_prog_RANLIB"
28877fi
28878
28879
28880if test -n "$ac_tool_prefix"; then
28881 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
28882set dummy ${ac_tool_prefix}ar; ac_word=$2
28883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28884$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 28885if ${ac_cv_prog_AR+:} false; then :
c971b7fa
PA
28886 $as_echo_n "(cached) " >&6
28887else
28888 if test -n "$AR"; then
28889 ac_cv_prog_AR="$AR" # Let the user override the test.
28890else
28891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28892for as_dir in $PATH
28893do
28894 IFS=$as_save_IFS
28895 test -z "$as_dir" && as_dir=.
28896 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 28897 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
28898 ac_cv_prog_AR="${ac_tool_prefix}ar"
28899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28900 break 2
28901 fi
28902done
28903 done
28904IFS=$as_save_IFS
28905
28906fi
28907fi
28908AR=$ac_cv_prog_AR
28909if test -n "$AR"; then
28910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
28911$as_echo "$AR" >&6; }
28912else
28913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28914$as_echo "no" >&6; }
28915fi
28916
28917
28918fi
28919if test -z "$ac_cv_prog_AR"; then
28920 ac_ct_AR=$AR
28921 # Extract the first word of "ar", so it can be a program name with args.
28922set dummy ar; ac_word=$2
28923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28924$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 28925if ${ac_cv_prog_ac_ct_AR+:} false; then :
c971b7fa
PA
28926 $as_echo_n "(cached) " >&6
28927else
28928 if test -n "$ac_ct_AR"; then
28929 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
28930else
28931as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28932for as_dir in $PATH
28933do
28934 IFS=$as_save_IFS
28935 test -z "$as_dir" && as_dir=.
28936 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 28937 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
28938 ac_cv_prog_ac_ct_AR="ar"
28939 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28940 break 2
28941 fi
28942done
28943 done
28944IFS=$as_save_IFS
28945
28946fi
28947fi
28948ac_ct_AR=$ac_cv_prog_ac_ct_AR
28949if test -n "$ac_ct_AR"; then
28950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
28951$as_echo "$ac_ct_AR" >&6; }
28952else
28953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28954$as_echo "no" >&6; }
28955fi
28956
28957 if test "x$ac_ct_AR" = x; then
28958 AR=""
28959 else
28960 case $cross_compiling:$ac_tool_warned in
28961yes:)
28962{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28963$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28964ac_tool_warned=yes ;;
28965esac
28966 AR=$ac_ct_AR
28967 fi
28968else
28969 AR="$ac_cv_prog_AR"
28970fi
28971
28972
28973# ---------------------- #
28974# Checks for libraries. #
28975# ---------------------- #
28976
28977ac_config_files="$ac_config_files Makefile import/Makefile"
28978
28979ac_config_commands="$ac_config_commands default"
28980
28981cat >confcache <<\_ACEOF
28982# This file is a shell script that caches the results of configure
28983# tests run on this system so they can be shared between configure
28984# scripts and configure runs, see configure's option --config-cache.
28985# It is not useful on other systems. If it contains results you don't
28986# want to keep, you may remove or edit it.
28987#
28988# config.status only pays attention to the cache file if you give it
28989# the --recheck option to rerun configure.
28990#
28991# `ac_cv_env_foo' variables (set or unset) will be overridden when
28992# loading this file, other *unset* `ac_cv_foo' will be assigned the
28993# following values.
28994
28995_ACEOF
28996
28997# The following way of writing the cache mishandles newlines in values,
28998# but we know of no workaround that is simple, portable, and efficient.
28999# So, we kill variables containing newlines.
29000# Ultrix sh set writes to stderr and can't be redirected directly,
29001# and sets the high bit in the cache file unless we assign to the vars.
29002(
29003 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
29004 eval ac_val=\$$ac_var
29005 case $ac_val in #(
29006 *${as_nl}*)
29007 case $ac_var in #(
29008 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
29009$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
29010 esac
29011 case $ac_var in #(
29012 _ | IFS | as_nl) ;; #(
29013 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
29014 *) { eval $ac_var=; unset $ac_var;} ;;
29015 esac ;;
29016 esac
29017 done
29018
29019 (set) 2>&1 |
29020 case $as_nl`(ac_space=' '; set) 2>&1` in #(
29021 *${as_nl}ac_space=\ *)
29022 # `set' does not quote correctly, so add quotes: double-quote
29023 # substitution turns \\\\ into \\, and sed turns \\ into \.
29024 sed -n \
29025 "s/'/'\\\\''/g;
29026 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29027 ;; #(
29028 *)
29029 # `set' quotes correctly as required by POSIX, so do not add quotes.
29030 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
29031 ;;
29032 esac |
29033 sort
29034) |
29035 sed '
29036 /^ac_cv_env_/b end
29037 t clear
29038 :clear
29039 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29040 t end
29041 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29042 :end' >>confcache
29043if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
29044 if test -w "$cache_file"; then
d0ac1c44 29045 if test "x$cache_file" != "x/dev/null"; then
c971b7fa
PA
29046 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
29047$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
29048 if test ! -f "$cache_file" || test -h "$cache_file"; then
29049 cat confcache >"$cache_file"
29050 else
29051 case $cache_file in #(
29052 */* | ?:*)
29053 mv -f confcache "$cache_file"$$ &&
29054 mv -f "$cache_file"$$ "$cache_file" ;; #(
29055 *)
29056 mv -f confcache "$cache_file" ;;
29057 esac
29058 fi
29059 fi
c971b7fa
PA
29060 else
29061 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
29062$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
29063 fi
29064fi
29065rm -f confcache
29066
29067test "x$prefix" = xNONE && prefix=$ac_default_prefix
29068# Let make expand exec_prefix.
29069test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29070
29071DEFS=-DHAVE_CONFIG_H
29072
29073ac_libobjs=
29074ac_ltlibobjs=
29075for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
29076 # 1. Remove the extension, and $U if already installed.
29077 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
29078 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
29079 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
29080 # will be set to the directory where LIBOBJS objects are built.
29081 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
29082 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
29083done
29084LIBOBJS=$ac_libobjs
29085
29086LTLIBOBJS=$ac_ltlibobjs
29087
29088
29089if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 29090 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
c971b7fa
PA
29091Usually this means the macro was only invoked conditionally." "$LINENO" 5
29092fi
29093if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
d0ac1c44 29094 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
c971b7fa
PA
29095Usually this means the macro was only invoked conditionally." "$LINENO" 5
29096fi
8690e634 29097if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
d0ac1c44 29098 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
8690e634
JK
29099Usually this means the macro was only invoked conditionally." "$LINENO" 5
29100fi
18848e28 29101if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
d0ac1c44 29102 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
18848e28
GF
29103Usually this means the macro was only invoked conditionally." "$LINENO" 5
29104fi
88b48903 29105if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
d0ac1c44 29106 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
88b48903
WN
29107Usually this means the macro was only invoked conditionally." "$LINENO" 5
29108fi
8690e634 29109if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
d0ac1c44 29110 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
8690e634
JK
29111Usually this means the macro was only invoked conditionally." "$LINENO" 5
29112fi
6ec2e0f5 29113if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
d0ac1c44 29114 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
6ec2e0f5
SDJ
29115Usually this means the macro was only invoked conditionally." "$LINENO" 5
29116fi
49e4877c 29117if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 29118 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
29119Usually this means the macro was only invoked conditionally." "$LINENO" 5
29120fi
29121if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 29122 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
29123Usually this means the macro was only invoked conditionally." "$LINENO" 5
29124fi
c971b7fa 29125if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
d0ac1c44 29126 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
c971b7fa
PA
29127Usually this means the macro was only invoked conditionally." "$LINENO" 5
29128fi
88b48903
WN
29129
29130
725e2999
JB
29131if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
29132 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
29133Usually this means the macro was only invoked conditionally." "$LINENO" 5
29134fi
29135if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
29136 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
29137Usually this means the macro was only invoked conditionally." "$LINENO" 5
29138fi
8690e634 29139if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
d0ac1c44 29140 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
8690e634
JK
29141Usually this means the macro was only invoked conditionally." "$LINENO" 5
29142fi
c971b7fa 29143if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
d0ac1c44 29144 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
c971b7fa
PA
29145Usually this means the macro was only invoked conditionally." "$LINENO" 5
29146fi
29147
29148 gl_libobjs=
29149 gl_ltlibobjs=
29150 if test -n "$gl_LIBOBJS"; then
29151 # Remove the extension.
29152 sed_drop_objext='s/\.o$//;s/\.obj$//'
29153 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29154 gl_libobjs="$gl_libobjs $i.$ac_objext"
29155 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
29156 done
29157 fi
29158 gl_LIBOBJS=$gl_libobjs
29159
29160 gl_LTLIBOBJS=$gl_ltlibobjs
29161
29162
29163
29164 gltests_libobjs=
29165 gltests_ltlibobjs=
29166 if test -n "$gltests_LIBOBJS"; then
29167 # Remove the extension.
29168 sed_drop_objext='s/\.o$//;s/\.obj$//'
29169 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29170 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
29171 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
29172 done
29173 fi
29174 gltests_LIBOBJS=$gltests_libobjs
29175
29176 gltests_LTLIBOBJS=$gltests_ltlibobjs
29177
29178
d0ac1c44
SM
29179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
29180$as_echo_n "checking that generated files are newer than configure... " >&6; }
29181 if test -n "$am_sleep_pid"; then
29182 # Hide warnings about reused PIDs.
29183 wait $am_sleep_pid 2>/dev/null
29184 fi
29185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
29186$as_echo "done" >&6; }
c971b7fa 29187if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
d0ac1c44 29188 as_fn_error $? "conditional \"AMDEP\" was never defined.
c971b7fa
PA
29189Usually this means the macro was only invoked conditionally." "$LINENO" 5
29190fi
29191if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
d0ac1c44 29192 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
c971b7fa
PA
29193Usually this means the macro was only invoked conditionally." "$LINENO" 5
29194fi
29195 if test -n "$EXEEXT"; then
29196 am__EXEEXT_TRUE=
29197 am__EXEEXT_FALSE='#'
29198else
29199 am__EXEEXT_TRUE='#'
29200 am__EXEEXT_FALSE=
29201fi
29202
29203
d0ac1c44 29204: "${CONFIG_STATUS=./config.status}"
c971b7fa
PA
29205ac_write_fail=0
29206ac_clean_files_save=$ac_clean_files
29207ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29208{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29209$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29210as_write_fail=0
29211cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29212#! $SHELL
29213# Generated by $as_me.
29214# Run this file to recreate the current configuration.
29215# Compiler output produced by configure, useful for debugging
29216# configure, is in config.log if it exists.
29217
29218debug=false
29219ac_cs_recheck=false
29220ac_cs_silent=false
29221
29222SHELL=\${CONFIG_SHELL-$SHELL}
29223export SHELL
29224_ASEOF
29225cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29226## -------------------- ##
29227## M4sh Initialization. ##
29228## -------------------- ##
29229
29230# Be more Bourne compatible
29231DUALCASE=1; export DUALCASE # for MKS sh
29232if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29233 emulate sh
29234 NULLCMD=:
29235 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29236 # is contrary to our usage. Disable this feature.
29237 alias -g '${1+"$@"}'='"$@"'
29238 setopt NO_GLOB_SUBST
29239else
29240 case `(set -o) 2>/dev/null` in #(
29241 *posix*) :
29242 set -o posix ;; #(
29243 *) :
29244 ;;
29245esac
29246fi
29247
29248
29249as_nl='
29250'
29251export as_nl
29252# Printing a long string crashes Solaris 7 /usr/bin/printf.
29253as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29254as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29255as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29256# Prefer a ksh shell builtin over an external printf program on Solaris,
29257# but without wasting forks for bash or zsh.
29258if test -z "$BASH_VERSION$ZSH_VERSION" \
29259 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
29260 as_echo='print -r --'
29261 as_echo_n='print -rn --'
29262elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29263 as_echo='printf %s\n'
29264 as_echo_n='printf %s'
29265else
29266 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29267 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29268 as_echo_n='/usr/ucb/echo -n'
29269 else
29270 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29271 as_echo_n_body='eval
29272 arg=$1;
29273 case $arg in #(
29274 *"$as_nl"*)
29275 expr "X$arg" : "X\\(.*\\)$as_nl";
29276 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29277 esac;
29278 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29279 '
29280 export as_echo_n_body
29281 as_echo_n='sh -c $as_echo_n_body as_echo'
29282 fi
29283 export as_echo_body
29284 as_echo='sh -c $as_echo_body as_echo'
29285fi
29286
29287# The user is always right.
29288if test "${PATH_SEPARATOR+set}" != set; then
29289 PATH_SEPARATOR=:
29290 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29291 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29292 PATH_SEPARATOR=';'
29293 }
29294fi
29295
29296
29297# IFS
29298# We need space, tab and new line, in precisely that order. Quoting is
29299# there to prevent editors from complaining about space-tab.
29300# (If _AS_PATH_WALK were called with IFS unset, it would disable word
29301# splitting by setting IFS to empty value.)
29302IFS=" "" $as_nl"
29303
29304# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 29305as_myself=
c971b7fa
PA
29306case $0 in #((
29307 *[\\/]* ) as_myself=$0 ;;
29308 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29309for as_dir in $PATH
29310do
29311 IFS=$as_save_IFS
29312 test -z "$as_dir" && as_dir=.
29313 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29314 done
29315IFS=$as_save_IFS
29316
29317 ;;
29318esac
29319# We did not find ourselves, most probably we were run as `sh COMMAND'
29320# in which case we are not to be found in the path.
29321if test "x$as_myself" = x; then
29322 as_myself=$0
29323fi
29324if test ! -f "$as_myself"; then
29325 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29326 exit 1
29327fi
29328
29329# Unset variables that we do not need and which cause bugs (e.g. in
29330# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29331# suppresses any "Segmentation fault" message there. '((' could
29332# trigger a bug in pdksh 5.2.14.
29333for as_var in BASH_ENV ENV MAIL MAILPATH
29334do eval test x\${$as_var+set} = xset \
29335 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29336done
29337PS1='$ '
29338PS2='> '
29339PS4='+ '
29340
29341# NLS nuisances.
29342LC_ALL=C
29343export LC_ALL
29344LANGUAGE=C
29345export LANGUAGE
29346
29347# CDPATH.
29348(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29349
29350
d0ac1c44
SM
29351# as_fn_error STATUS ERROR [LINENO LOG_FD]
29352# ----------------------------------------
c971b7fa
PA
29353# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29354# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 29355# script with STATUS, using 1 if that was 0.
c971b7fa
PA
29356as_fn_error ()
29357{
d0ac1c44
SM
29358 as_status=$1; test $as_status -eq 0 && as_status=1
29359 if test "$4"; then
29360 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29361 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
c971b7fa 29362 fi
d0ac1c44 29363 $as_echo "$as_me: error: $2" >&2
c971b7fa
PA
29364 as_fn_exit $as_status
29365} # as_fn_error
29366
29367
29368# as_fn_set_status STATUS
29369# -----------------------
29370# Set $? to STATUS, without forking.
29371as_fn_set_status ()
29372{
29373 return $1
29374} # as_fn_set_status
29375
29376# as_fn_exit STATUS
29377# -----------------
29378# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29379as_fn_exit ()
29380{
29381 set +e
29382 as_fn_set_status $1
29383 exit $1
29384} # as_fn_exit
29385
29386# as_fn_unset VAR
29387# ---------------
29388# Portably unset VAR.
29389as_fn_unset ()
29390{
29391 { eval $1=; unset $1;}
29392}
29393as_unset=as_fn_unset
29394# as_fn_append VAR VALUE
29395# ----------------------
29396# Append the text in VALUE to the end of the definition contained in VAR. Take
29397# advantage of any shell optimizations that allow amortized linear growth over
29398# repeated appends, instead of the typical quadratic growth present in naive
29399# implementations.
29400if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29401 eval 'as_fn_append ()
29402 {
29403 eval $1+=\$2
29404 }'
29405else
29406 as_fn_append ()
29407 {
29408 eval $1=\$$1\$2
29409 }
29410fi # as_fn_append
29411
29412# as_fn_arith ARG...
29413# ------------------
29414# Perform arithmetic evaluation on the ARGs, and store the result in the
29415# global $as_val. Take advantage of shells that can avoid forks. The arguments
29416# must be portable across $(()) and expr.
29417if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29418 eval 'as_fn_arith ()
29419 {
29420 as_val=$(( $* ))
29421 }'
29422else
29423 as_fn_arith ()
29424 {
29425 as_val=`expr "$@" || test $? -eq 1`
29426 }
29427fi # as_fn_arith
29428
29429
29430if expr a : '\(a\)' >/dev/null 2>&1 &&
29431 test "X`expr 00001 : '.*\(...\)'`" = X001; then
29432 as_expr=expr
29433else
29434 as_expr=false
29435fi
29436
29437if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29438 as_basename=basename
29439else
29440 as_basename=false
29441fi
29442
29443if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29444 as_dirname=dirname
29445else
29446 as_dirname=false
29447fi
29448
29449as_me=`$as_basename -- "$0" ||
29450$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29451 X"$0" : 'X\(//\)$' \| \
29452 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29453$as_echo X/"$0" |
29454 sed '/^.*\/\([^/][^/]*\)\/*$/{
29455 s//\1/
29456 q
29457 }
29458 /^X\/\(\/\/\)$/{
29459 s//\1/
29460 q
29461 }
29462 /^X\/\(\/\).*/{
29463 s//\1/
29464 q
29465 }
29466 s/.*/./; q'`
29467
29468# Avoid depending upon Character Ranges.
29469as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29470as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29471as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29472as_cr_digits='0123456789'
29473as_cr_alnum=$as_cr_Letters$as_cr_digits
29474
29475ECHO_C= ECHO_N= ECHO_T=
29476case `echo -n x` in #(((((
29477-n*)
29478 case `echo 'xy\c'` in
29479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29480 xy) ECHO_C='\c';;
29481 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29482 ECHO_T=' ';;
29483 esac;;
29484*)
29485 ECHO_N='-n';;
29486esac
29487
29488rm -f conf$$ conf$$.exe conf$$.file
29489if test -d conf$$.dir; then
29490 rm -f conf$$.dir/conf$$.file
29491else
29492 rm -f conf$$.dir
29493 mkdir conf$$.dir 2>/dev/null
29494fi
29495if (echo >conf$$.file) 2>/dev/null; then
29496 if ln -s conf$$.file conf$$ 2>/dev/null; then
29497 as_ln_s='ln -s'
29498 # ... but there are two gotchas:
29499 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29500 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 29501 # In both cases, we have to default to `cp -pR'.
c971b7fa 29502 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 29503 as_ln_s='cp -pR'
c971b7fa
PA
29504 elif ln conf$$.file conf$$ 2>/dev/null; then
29505 as_ln_s=ln
29506 else
d0ac1c44 29507 as_ln_s='cp -pR'
c971b7fa
PA
29508 fi
29509else
d0ac1c44 29510 as_ln_s='cp -pR'
c971b7fa
PA
29511fi
29512rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29513rmdir conf$$.dir 2>/dev/null
29514
29515
29516# as_fn_mkdir_p
29517# -------------
29518# Create "$as_dir" as a directory, including parents if necessary.
29519as_fn_mkdir_p ()
29520{
29521
29522 case $as_dir in #(
29523 -*) as_dir=./$as_dir;;
29524 esac
29525 test -d "$as_dir" || eval $as_mkdir_p || {
29526 as_dirs=
29527 while :; do
29528 case $as_dir in #(
29529 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29530 *) as_qdir=$as_dir;;
29531 esac
29532 as_dirs="'$as_qdir' $as_dirs"
29533 as_dir=`$as_dirname -- "$as_dir" ||
29534$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29535 X"$as_dir" : 'X\(//\)[^/]' \| \
29536 X"$as_dir" : 'X\(//\)$' \| \
29537 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29538$as_echo X"$as_dir" |
29539 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29540 s//\1/
29541 q
29542 }
29543 /^X\(\/\/\)[^/].*/{
29544 s//\1/
29545 q
29546 }
29547 /^X\(\/\/\)$/{
29548 s//\1/
29549 q
29550 }
29551 /^X\(\/\).*/{
29552 s//\1/
29553 q
29554 }
29555 s/.*/./; q'`
29556 test -d "$as_dir" && break
29557 done
29558 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 29559 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
c971b7fa
PA
29560
29561
29562} # as_fn_mkdir_p
29563if mkdir -p . 2>/dev/null; then
29564 as_mkdir_p='mkdir -p "$as_dir"'
29565else
29566 test -d ./-p && rmdir ./-p
29567 as_mkdir_p=false
29568fi
29569
d0ac1c44
SM
29570
29571# as_fn_executable_p FILE
29572# -----------------------
29573# Test if FILE is an executable regular file.
29574as_fn_executable_p ()
29575{
29576 test -f "$1" && test -x "$1"
29577} # as_fn_executable_p
29578as_test_x='test -x'
29579as_executable_p=as_fn_executable_p
c971b7fa
PA
29580
29581# Sed expression to map a string onto a valid CPP name.
29582as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29583
29584# Sed expression to map a string onto a valid variable name.
29585as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29586
29587
29588exec 6>&1
29589## ----------------------------------- ##
29590## Main body of $CONFIG_STATUS script. ##
29591## ----------------------------------- ##
29592_ASEOF
29593test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29594
29595cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29596# Save the log message, to keep $0 and so on meaningful, and to
29597# report actual input values of CONFIG_FILES etc. instead of their
29598# values after options handling.
29599ac_log="
d0ac1c44
SM
29600This file was extended by libgnu $as_me UNUSED-VERSION, which was
29601generated by GNU Autoconf 2.69. Invocation command line was
c971b7fa
PA
29602
29603 CONFIG_FILES = $CONFIG_FILES
29604 CONFIG_HEADERS = $CONFIG_HEADERS
29605 CONFIG_LINKS = $CONFIG_LINKS
29606 CONFIG_COMMANDS = $CONFIG_COMMANDS
29607 $ $0 $@
29608
29609on `(hostname || uname -n) 2>/dev/null | sed 1q`
29610"
29611
29612_ACEOF
29613
29614case $ac_config_files in *"
29615"*) set x $ac_config_files; shift; ac_config_files=$*;;
29616esac
29617
29618case $ac_config_headers in *"
29619"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29620esac
29621
29622
29623cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29624# Files that config.status was made for.
29625config_files="$ac_config_files"
29626config_headers="$ac_config_headers"
29627config_commands="$ac_config_commands"
29628
29629_ACEOF
29630
29631cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29632ac_cs_usage="\
29633\`$as_me' instantiates files and other configuration actions
29634from templates according to the current configuration. Unless the files
29635and actions are specified as TAGs, all are instantiated by default.
29636
29637Usage: $0 [OPTION]... [TAG]...
29638
29639 -h, --help print this help, then exit
29640 -V, --version print version number and configuration settings, then exit
d0ac1c44 29641 --config print configuration, then exit
c971b7fa
PA
29642 -q, --quiet, --silent
29643 do not print progress messages
29644 -d, --debug don't remove temporary files
29645 --recheck update $as_me by reconfiguring in the same conditions
29646 --file=FILE[:TEMPLATE]
29647 instantiate the configuration file FILE
29648 --header=FILE[:TEMPLATE]
29649 instantiate the configuration header FILE
29650
29651Configuration files:
29652$config_files
29653
29654Configuration headers:
29655$config_headers
29656
29657Configuration commands:
29658$config_commands
29659
29660Report bugs to the package provider."
29661
29662_ACEOF
29663cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 29664ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
c971b7fa 29665ac_cs_version="\\
d0ac1c44
SM
29666libgnu config.status UNUSED-VERSION
29667configured by $0, generated by GNU Autoconf 2.69,
29668 with options \\"\$ac_cs_config\\"
c971b7fa 29669
d0ac1c44 29670Copyright (C) 2012 Free Software Foundation, Inc.
c971b7fa
PA
29671This config.status script is free software; the Free Software Foundation
29672gives unlimited permission to copy, distribute and modify it."
29673
29674ac_pwd='$ac_pwd'
29675srcdir='$srcdir'
29676INSTALL='$INSTALL'
29677MKDIR_P='$MKDIR_P'
29678AWK='$AWK'
29679test -n "\$AWK" || AWK=awk
29680_ACEOF
29681
29682cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29683# The default lists apply if the user does not specify any file.
29684ac_need_defaults=:
29685while test $# != 0
29686do
29687 case $1 in
d0ac1c44 29688 --*=?*)
c971b7fa
PA
29689 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29690 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29691 ac_shift=:
29692 ;;
d0ac1c44
SM
29693 --*=)
29694 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29695 ac_optarg=
29696 ac_shift=:
29697 ;;
c971b7fa
PA
29698 *)
29699 ac_option=$1
29700 ac_optarg=$2
29701 ac_shift=shift
29702 ;;
29703 esac
29704
29705 case $ac_option in
29706 # Handling of the options.
29707 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29708 ac_cs_recheck=: ;;
29709 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29710 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
29711 --config | --confi | --conf | --con | --co | --c )
29712 $as_echo "$ac_cs_config"; exit ;;
c971b7fa
PA
29713 --debug | --debu | --deb | --de | --d | -d )
29714 debug=: ;;
29715 --file | --fil | --fi | --f )
29716 $ac_shift
29717 case $ac_optarg in
29718 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 29719 '') as_fn_error $? "missing file argument" ;;
c971b7fa
PA
29720 esac
29721 as_fn_append CONFIG_FILES " '$ac_optarg'"
29722 ac_need_defaults=false;;
29723 --header | --heade | --head | --hea )
29724 $ac_shift
29725 case $ac_optarg in
29726 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29727 esac
29728 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29729 ac_need_defaults=false;;
29730 --he | --h)
29731 # Conflict between --help and --header
d0ac1c44 29732 as_fn_error $? "ambiguous option: \`$1'
c971b7fa
PA
29733Try \`$0 --help' for more information.";;
29734 --help | --hel | -h )
29735 $as_echo "$ac_cs_usage"; exit ;;
29736 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29737 | -silent | --silent | --silen | --sile | --sil | --si | --s)
29738 ac_cs_silent=: ;;
29739
29740 # This is an error.
d0ac1c44 29741 -*) as_fn_error $? "unrecognized option: \`$1'
c971b7fa
PA
29742Try \`$0 --help' for more information." ;;
29743
29744 *) as_fn_append ac_config_targets " $1"
29745 ac_need_defaults=false ;;
29746
29747 esac
29748 shift
29749done
29750
29751ac_configure_extra_args=
29752
29753if $ac_cs_silent; then
29754 exec 6>/dev/null
29755 ac_configure_extra_args="$ac_configure_extra_args --silent"
29756fi
29757
29758_ACEOF
29759cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29760if \$ac_cs_recheck; then
d0ac1c44 29761 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
c971b7fa
PA
29762 shift
29763 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
29764 CONFIG_SHELL='$SHELL'
29765 export CONFIG_SHELL
29766 exec "\$@"
29767fi
29768
29769_ACEOF
29770cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29771exec 5>>config.log
29772{
29773 echo
29774 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29775## Running $as_me. ##
29776_ASBOX
29777 $as_echo "$ac_log"
29778} >&5
29779
29780_ACEOF
29781cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29782#
29783# INIT-COMMANDS
29784#
29785AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
29786
29787_ACEOF
29788
29789cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29790
29791# Handling of arguments.
29792for ac_config_target in $ac_config_targets
29793do
29794 case $ac_config_target in
29795 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
29796 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29797 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29798 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
29799 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29800
d0ac1c44 29801 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c971b7fa
PA
29802 esac
29803done
29804
29805
29806# If the user did not use the arguments to specify the items to instantiate,
29807# then the envvar interface is used. Set only those that are not.
29808# We use the long form for the default assignment because of an extremely
29809# bizarre bug on SunOS 4.1.3.
29810if $ac_need_defaults; then
29811 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29812 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29813 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29814fi
29815
29816# Have a temporary directory for convenience. Make it in the build tree
29817# simply because there is no reason against having it here, and in addition,
29818# creating and moving files from /tmp can sometimes cause problems.
29819# Hook for its removal unless debugging.
29820# Note that there is a small window in which the directory will not be cleaned:
29821# after its creation but before its name has been assigned to `$tmp'.
29822$debug ||
29823{
d0ac1c44 29824 tmp= ac_tmp=
c971b7fa 29825 trap 'exit_status=$?
d0ac1c44
SM
29826 : "${ac_tmp:=$tmp}"
29827 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
c971b7fa
PA
29828' 0
29829 trap 'as_fn_exit 1' 1 2 13 15
29830}
29831# Create a (secure) tmp directory for tmp files.
29832
29833{
29834 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 29835 test -d "$tmp"
c971b7fa
PA
29836} ||
29837{
29838 tmp=./conf$$-$RANDOM
29839 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
29840} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
29841ac_tmp=$tmp
c971b7fa
PA
29842
29843# Set up the scripts for CONFIG_FILES section.
29844# No need to generate them if there are no CONFIG_FILES.
29845# This happens for instance with `./config.status config.h'.
29846if test -n "$CONFIG_FILES"; then
29847
29848
29849ac_cr=`echo X | tr X '\015'`
29850# On cygwin, bash can eat \r inside `` if the user requested igncr.
29851# But we know of no other shell where ac_cr would be empty at this
29852# point, so we can use a bashism as a fallback.
29853if test "x$ac_cr" = x; then
29854 eval ac_cr=\$\'\\r\'
29855fi
29856ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29857if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 29858 ac_cs_awk_cr='\\r'
c971b7fa
PA
29859else
29860 ac_cs_awk_cr=$ac_cr
29861fi
29862
d0ac1c44 29863echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
c971b7fa
PA
29864_ACEOF
29865
29866
29867{
29868 echo "cat >conf$$subs.awk <<_ACEOF" &&
29869 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29870 echo "_ACEOF"
29871} >conf$$subs.sh ||
d0ac1c44
SM
29872 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29873ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
c971b7fa
PA
29874ac_delim='%!_!# '
29875for ac_last_try in false false false false false :; do
29876 . ./conf$$subs.sh ||
d0ac1c44 29877 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
29878
29879 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29880 if test $ac_delim_n = $ac_delim_num; then
29881 break
29882 elif $ac_last_try; then
d0ac1c44 29883 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
29884 else
29885 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29886 fi
29887done
29888rm -f conf$$subs.sh
29889
29890cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 29891cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
c971b7fa
PA
29892_ACEOF
29893sed -n '
29894h
29895s/^/S["/; s/!.*/"]=/
29896p
29897g
29898s/^[^!]*!//
29899:repl
29900t repl
29901s/'"$ac_delim"'$//
29902t delim
29903:nl
29904h
d0ac1c44 29905s/\(.\{148\}\)..*/\1/
c971b7fa
PA
29906t more1
29907s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29908p
29909n
29910b repl
29911:more1
29912s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29913p
29914g
29915s/.\{148\}//
29916t nl
29917:delim
29918h
d0ac1c44 29919s/\(.\{148\}\)..*/\1/
c971b7fa
PA
29920t more2
29921s/["\\]/\\&/g; s/^/"/; s/$/"/
29922p
29923b
29924:more2
29925s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29926p
29927g
29928s/.\{148\}//
29929t delim
29930' <conf$$subs.awk | sed '
29931/^[^""]/{
29932 N
29933 s/\n//
29934}
29935' >>$CONFIG_STATUS || ac_write_fail=1
29936rm -f conf$$subs.awk
29937cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29938_ACAWK
d0ac1c44 29939cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
c971b7fa
PA
29940 for (key in S) S_is_set[key] = 1
29941 FS = "\a"
29942
29943}
29944{
29945 line = $ 0
29946 nfields = split(line, field, "@")
29947 substed = 0
29948 len = length(field[1])
29949 for (i = 2; i < nfields; i++) {
29950 key = field[i]
29951 keylen = length(key)
29952 if (S_is_set[key]) {
29953 value = S[key]
29954 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
29955 len += length(value) + length(field[++i])
29956 substed = 1
29957 } else
29958 len += 1 + keylen
29959 }
29960
29961 print line
29962}
29963
29964_ACAWK
29965_ACEOF
29966cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29967if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29968 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29969else
29970 cat
d0ac1c44
SM
29971fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
29972 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
c971b7fa
PA
29973_ACEOF
29974
d0ac1c44
SM
29975# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
29976# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
c971b7fa
PA
29977# trailing colons and then remove the whole line if VPATH becomes empty
29978# (actually we leave an empty line to preserve line numbers).
29979if test "x$srcdir" = x.; then
d0ac1c44
SM
29980 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
29981h
29982s///
29983s/^/:/
29984s/[ ]*$/:/
29985s/:\$(srcdir):/:/g
29986s/:\${srcdir}:/:/g
29987s/:@srcdir@:/:/g
29988s/^:*//
c971b7fa 29989s/:*$//
d0ac1c44
SM
29990x
29991s/\(=[ ]*\).*/\1/
29992G
29993s/\n//
c971b7fa
PA
29994s/^[^=]*=[ ]*$//
29995}'
29996fi
29997
29998cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29999fi # test -n "$CONFIG_FILES"
30000
30001# Set up the scripts for CONFIG_HEADERS section.
30002# No need to generate them if there are no CONFIG_HEADERS.
30003# This happens for instance with `./config.status Makefile'.
30004if test -n "$CONFIG_HEADERS"; then
d0ac1c44 30005cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
c971b7fa
PA
30006BEGIN {
30007_ACEOF
30008
30009# Transform confdefs.h into an awk script `defines.awk', embedded as
30010# here-document in config.status, that substitutes the proper values into
30011# config.h.in to produce config.h.
30012
30013# Create a delimiter string that does not exist in confdefs.h, to ease
30014# handling of long lines.
30015ac_delim='%!_!# '
30016for ac_last_try in false false :; do
d0ac1c44
SM
30017 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
30018 if test -z "$ac_tt"; then
c971b7fa
PA
30019 break
30020 elif $ac_last_try; then
d0ac1c44 30021 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
c971b7fa
PA
30022 else
30023 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
30024 fi
30025done
30026
30027# For the awk script, D is an array of macro values keyed by name,
30028# likewise P contains macro parameters if any. Preserve backslash
30029# newline sequences.
30030
30031ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
30032sed -n '
30033s/.\{148\}/&'"$ac_delim"'/g
30034t rset
30035:rset
30036s/^[ ]*#[ ]*define[ ][ ]*/ /
30037t def
30038d
30039:def
30040s/\\$//
30041t bsnl
30042s/["\\]/\\&/g
30043s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30044D["\1"]=" \3"/p
30045s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
30046d
30047:bsnl
30048s/["\\]/\\&/g
30049s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
30050D["\1"]=" \3\\\\\\n"\\/p
30051t cont
30052s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
30053t cont
30054d
30055:cont
30056n
30057s/.\{148\}/&'"$ac_delim"'/g
30058t clear
30059:clear
30060s/\\$//
30061t bsnlc
30062s/["\\]/\\&/g; s/^/"/; s/$/"/p
30063d
30064:bsnlc
30065s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
30066b cont
30067' <confdefs.h | sed '
30068s/'"$ac_delim"'/"\\\
30069"/g' >>$CONFIG_STATUS || ac_write_fail=1
30070
30071cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30072 for (key in D) D_is_set[key] = 1
30073 FS = "\a"
30074}
30075/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
30076 line = \$ 0
30077 split(line, arg, " ")
30078 if (arg[1] == "#") {
30079 defundef = arg[2]
30080 mac1 = arg[3]
30081 } else {
30082 defundef = substr(arg[1], 2)
30083 mac1 = arg[2]
30084 }
30085 split(mac1, mac2, "(") #)
30086 macro = mac2[1]
30087 prefix = substr(line, 1, index(line, defundef) - 1)
30088 if (D_is_set[macro]) {
30089 # Preserve the white space surrounding the "#".
30090 print prefix "define", macro P[macro] D[macro]
30091 next
30092 } else {
30093 # Replace #undef with comments. This is necessary, for example,
30094 # in the case of _POSIX_SOURCE, which is predefined and required
30095 # on some systems where configure will not decide to define it.
30096 if (defundef == "undef") {
30097 print "/*", prefix defundef, macro, "*/"
30098 next
30099 }
30100 }
30101}
30102{ print }
30103_ACAWK
30104_ACEOF
30105cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 30106 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
c971b7fa
PA
30107fi # test -n "$CONFIG_HEADERS"
30108
30109
30110eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
30111shift
30112for ac_tag
30113do
30114 case $ac_tag in
30115 :[FHLC]) ac_mode=$ac_tag; continue;;
30116 esac
30117 case $ac_mode$ac_tag in
30118 :[FHL]*:*);;
d0ac1c44 30119 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
c971b7fa
PA
30120 :[FH]-) ac_tag=-:-;;
30121 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
30122 esac
30123 ac_save_IFS=$IFS
30124 IFS=:
30125 set x $ac_tag
30126 IFS=$ac_save_IFS
30127 shift
30128 ac_file=$1
30129 shift
30130
30131 case $ac_mode in
30132 :L) ac_source=$1;;
30133 :[FH])
30134 ac_file_inputs=
30135 for ac_f
30136 do
30137 case $ac_f in
d0ac1c44 30138 -) ac_f="$ac_tmp/stdin";;
c971b7fa
PA
30139 *) # Look for the file first in the build tree, then in the source tree
30140 # (if the path is not absolute). The absolute path cannot be DOS-style,
30141 # because $ac_f cannot contain `:'.
30142 test -f "$ac_f" ||
30143 case $ac_f in
30144 [\\/$]*) false;;
30145 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30146 esac ||
d0ac1c44 30147 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
c971b7fa
PA
30148 esac
30149 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30150 as_fn_append ac_file_inputs " '$ac_f'"
30151 done
30152
30153 # Let's still pretend it is `configure' which instantiates (i.e., don't
30154 # use $as_me), people would be surprised to read:
30155 # /* config.h. Generated by config.status. */
30156 configure_input='Generated from '`
30157 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30158 `' by configure.'
30159 if test x"$ac_file" != x-; then
30160 configure_input="$ac_file. $configure_input"
30161 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
30162$as_echo "$as_me: creating $ac_file" >&6;}
30163 fi
30164 # Neutralize special characters interpreted by sed in replacement strings.
30165 case $configure_input in #(
30166 *\&* | *\|* | *\\* )
30167 ac_sed_conf_input=`$as_echo "$configure_input" |
30168 sed 's/[\\\\&|]/\\\\&/g'`;; #(
30169 *) ac_sed_conf_input=$configure_input;;
30170 esac
30171
30172 case $ac_tag in
d0ac1c44
SM
30173 *:-:* | *:-) cat >"$ac_tmp/stdin" \
30174 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
c971b7fa
PA
30175 esac
30176 ;;
30177 esac
30178
30179 ac_dir=`$as_dirname -- "$ac_file" ||
30180$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30181 X"$ac_file" : 'X\(//\)[^/]' \| \
30182 X"$ac_file" : 'X\(//\)$' \| \
30183 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30184$as_echo X"$ac_file" |
30185 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30186 s//\1/
30187 q
30188 }
30189 /^X\(\/\/\)[^/].*/{
30190 s//\1/
30191 q
30192 }
30193 /^X\(\/\/\)$/{
30194 s//\1/
30195 q
30196 }
30197 /^X\(\/\).*/{
30198 s//\1/
30199 q
30200 }
30201 s/.*/./; q'`
30202 as_dir="$ac_dir"; as_fn_mkdir_p
30203 ac_builddir=.
30204
30205case "$ac_dir" in
30206.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30207*)
30208 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30209 # A ".." for each directory in $ac_dir_suffix.
30210 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30211 case $ac_top_builddir_sub in
30212 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30213 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30214 esac ;;
30215esac
30216ac_abs_top_builddir=$ac_pwd
30217ac_abs_builddir=$ac_pwd$ac_dir_suffix
30218# for backward compatibility:
30219ac_top_builddir=$ac_top_build_prefix
30220
30221case $srcdir in
30222 .) # We are building in place.
30223 ac_srcdir=.
30224 ac_top_srcdir=$ac_top_builddir_sub
30225 ac_abs_top_srcdir=$ac_pwd ;;
30226 [\\/]* | ?:[\\/]* ) # Absolute name.
30227 ac_srcdir=$srcdir$ac_dir_suffix;
30228 ac_top_srcdir=$srcdir
30229 ac_abs_top_srcdir=$srcdir ;;
30230 *) # Relative name.
30231 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30232 ac_top_srcdir=$ac_top_build_prefix$srcdir
30233 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30234esac
30235ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30236
30237
30238 case $ac_mode in
30239 :F)
30240 #
30241 # CONFIG_FILE
30242 #
30243
30244 case $INSTALL in
30245 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30246 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30247 esac
30248 ac_MKDIR_P=$MKDIR_P
30249 case $MKDIR_P in
30250 [\\/$]* | ?:[\\/]* ) ;;
30251 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30252 esac
30253_ACEOF
30254
30255cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30256# If the template does not know about datarootdir, expand it.
30257# FIXME: This hack should be removed a few years after 2.60.
30258ac_datarootdir_hack=; ac_datarootdir_seen=
30259ac_sed_dataroot='
30260/datarootdir/ {
30261 p
30262 q
30263}
30264/@datadir@/p
30265/@docdir@/p
30266/@infodir@/p
30267/@localedir@/p
30268/@mandir@/p'
30269case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30270*datarootdir*) ac_datarootdir_seen=yes;;
30271*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30272 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30273$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30274_ACEOF
30275cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30276 ac_datarootdir_hack='
30277 s&@datadir@&$datadir&g
30278 s&@docdir@&$docdir&g
30279 s&@infodir@&$infodir&g
30280 s&@localedir@&$localedir&g
30281 s&@mandir@&$mandir&g
30282 s&\\\${datarootdir}&$datarootdir&g' ;;
30283esac
30284_ACEOF
30285
30286# Neutralize VPATH when `$srcdir' = `.'.
30287# Shell code in configure.ac might set extrasub.
30288# FIXME: do we really want to maintain this feature?
30289cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30290ac_sed_extra="$ac_vpsub
30291$extrasub
30292_ACEOF
30293cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30294:t
30295/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30296s|@configure_input@|$ac_sed_conf_input|;t t
30297s&@top_builddir@&$ac_top_builddir_sub&;t t
30298s&@top_build_prefix@&$ac_top_build_prefix&;t t
30299s&@srcdir@&$ac_srcdir&;t t
30300s&@abs_srcdir@&$ac_abs_srcdir&;t t
30301s&@top_srcdir@&$ac_top_srcdir&;t t
30302s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30303s&@builddir@&$ac_builddir&;t t
30304s&@abs_builddir@&$ac_abs_builddir&;t t
30305s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30306s&@INSTALL@&$ac_INSTALL&;t t
30307s&@MKDIR_P@&$ac_MKDIR_P&;t t
30308$ac_datarootdir_hack
30309"
d0ac1c44
SM
30310eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
30311 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
30312
30313test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
30314 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
30315 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
30316 "$ac_tmp/out"`; test -z "$ac_out"; } &&
c971b7fa 30317 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 30318which seems to be undefined. Please make sure it is defined" >&5
c971b7fa 30319$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 30320which seems to be undefined. Please make sure it is defined" >&2;}
c971b7fa 30321
d0ac1c44 30322 rm -f "$ac_tmp/stdin"
c971b7fa 30323 case $ac_file in
d0ac1c44
SM
30324 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
30325 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
c971b7fa 30326 esac \
d0ac1c44 30327 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
30328 ;;
30329 :H)
30330 #
30331 # CONFIG_HEADER
30332 #
30333 if test x"$ac_file" != x-; then
30334 {
30335 $as_echo "/* $configure_input */" \
d0ac1c44
SM
30336 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
30337 } >"$ac_tmp/config.h" \
30338 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30339 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
c971b7fa
PA
30340 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30341$as_echo "$as_me: $ac_file is unchanged" >&6;}
30342 else
30343 rm -f "$ac_file"
d0ac1c44
SM
30344 mv "$ac_tmp/config.h" "$ac_file" \
30345 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
30346 fi
30347 else
30348 $as_echo "/* $configure_input */" \
d0ac1c44
SM
30349 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
30350 || as_fn_error $? "could not create -" "$LINENO" 5
c971b7fa
PA
30351 fi
30352# Compute "$ac_file"'s index in $config_headers.
30353_am_arg="$ac_file"
30354_am_stamp_count=1
30355for _am_header in $config_headers :; do
30356 case $_am_header in
30357 $_am_arg | $_am_arg:* )
30358 break ;;
30359 * )
30360 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30361 esac
30362done
30363echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30364$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30365 X"$_am_arg" : 'X\(//\)[^/]' \| \
30366 X"$_am_arg" : 'X\(//\)$' \| \
30367 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30368$as_echo X"$_am_arg" |
30369 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30370 s//\1/
30371 q
30372 }
30373 /^X\(\/\/\)[^/].*/{
30374 s//\1/
30375 q
30376 }
30377 /^X\(\/\/\)$/{
30378 s//\1/
30379 q
30380 }
30381 /^X\(\/\).*/{
30382 s//\1/
30383 q
30384 }
30385 s/.*/./; q'`/stamp-h$_am_stamp_count
30386 ;;
30387
30388 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30389$as_echo "$as_me: executing $ac_file commands" >&6;}
30390 ;;
30391 esac
30392
30393
30394 case $ac_file$ac_mode in
30395 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
d0ac1c44 30396 # Older Autoconf quotes --file arguments for eval, but not when files
c971b7fa
PA
30397 # are listed without --file. Let's play safe and only enable the eval
30398 # if we detect the quoting.
30399 case $CONFIG_FILES in
30400 *\'*) eval set x "$CONFIG_FILES" ;;
30401 *) set x $CONFIG_FILES ;;
30402 esac
30403 shift
30404 for mf
30405 do
30406 # Strip MF so we end up with the name of the file.
30407 mf=`echo "$mf" | sed -e 's/:.*$//'`
30408 # Check whether this is an Automake generated Makefile or not.
d0ac1c44 30409 # We used to match only the files named 'Makefile.in', but
c971b7fa
PA
30410 # some people rename them; so instead we look at the file content.
30411 # Grep'ing the first line is not enough: some people post-process
30412 # each Makefile.in and add a new line on top of each file to say so.
30413 # Grep'ing the whole file is not good either: AIX grep has a line
30414 # limit of 2048, but all sed's we know have understand at least 4000.
30415 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30416 dirpart=`$as_dirname -- "$mf" ||
30417$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30418 X"$mf" : 'X\(//\)[^/]' \| \
30419 X"$mf" : 'X\(//\)$' \| \
30420 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30421$as_echo X"$mf" |
30422 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30423 s//\1/
30424 q
30425 }
30426 /^X\(\/\/\)[^/].*/{
30427 s//\1/
30428 q
30429 }
30430 /^X\(\/\/\)$/{
30431 s//\1/
30432 q
30433 }
30434 /^X\(\/\).*/{
30435 s//\1/
30436 q
30437 }
30438 s/.*/./; q'`
30439 else
30440 continue
30441 fi
30442 # Extract the definition of DEPDIR, am__include, and am__quote
d0ac1c44 30443 # from the Makefile without running 'make'.
c971b7fa
PA
30444 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30445 test -z "$DEPDIR" && continue
30446 am__include=`sed -n 's/^am__include = //p' < "$mf"`
d0ac1c44 30447 test -z "$am__include" && continue
c971b7fa 30448 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
c971b7fa
PA
30449 # Find all dependency output files, they are included files with
30450 # $(DEPDIR) in their names. We invoke sed twice because it is the
30451 # simplest approach to changing $(DEPDIR) to its actual value in the
30452 # expansion.
30453 for file in `sed -n "
30454 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
d0ac1c44 30455 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
c971b7fa
PA
30456 # Make sure the directory exists.
30457 test -f "$dirpart/$file" && continue
30458 fdir=`$as_dirname -- "$file" ||
30459$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30460 X"$file" : 'X\(//\)[^/]' \| \
30461 X"$file" : 'X\(//\)$' \| \
30462 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30463$as_echo X"$file" |
30464 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30465 s//\1/
30466 q
30467 }
30468 /^X\(\/\/\)[^/].*/{
30469 s//\1/
30470 q
30471 }
30472 /^X\(\/\/\)$/{
30473 s//\1/
30474 q
30475 }
30476 /^X\(\/\).*/{
30477 s//\1/
30478 q
30479 }
30480 s/.*/./; q'`
30481 as_dir=$dirpart/$fdir; as_fn_mkdir_p
30482 # echo "creating $dirpart/$file"
30483 echo '# dummy' > "$dirpart/$file"
30484 done
30485 done
30486}
30487 ;;
30488 "default":C)
30489case x$CONFIG_HEADERS in
30490xconfig.h:config.in)
30491echo > stamp-h ;;
30492esac
30493 ;;
30494
30495 esac
30496done # for ac_tag
30497
30498
30499as_fn_exit 0
30500_ACEOF
30501ac_clean_files=$ac_clean_files_save
30502
30503test $ac_write_fail = 0 ||
d0ac1c44 30504 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
30505
30506
30507# configure is writing to config.log, and then calls config.status.
30508# config.status does its own redirection, appending to config.log.
30509# Unfortunately, on DOS this fails, as config.log is still kept open
30510# by configure, so config.status won't be able to write to it; its
30511# output is simply discarded. So we exec the FD to /dev/null,
30512# effectively closing config.log, so it can be properly (re)opened and
30513# appended to by config.status. When coming back to configure, we
30514# need to make the FD available again.
30515if test "$no_create" != yes; then
30516 ac_cs_success=:
30517 ac_config_status_args=
30518 test "$silent" = yes &&
30519 ac_config_status_args="$ac_config_status_args --quiet"
30520 exec 5>/dev/null
30521 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30522 exec 5>>config.log
30523 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30524 # would make configure fail if this is the last instruction.
d0ac1c44 30525 $ac_cs_success || as_fn_exit 1
c971b7fa
PA
30526fi
30527if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30528 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30529$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30530fi
30531
30532
30533exit 0
This page took 2.229109 seconds and 4 git commands to generate.