Import the strerror_r-posix module and use it in GDB.
[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"
472fa5ee 3567gl_func_list="$gl_func_list pipe"
472fa5ee 3568gl_func_list="$gl_func_list iswcntrl"
c971b7fa
PA
3569# Check that the precious variables saved in the cache have kept the same
3570# value.
3571ac_cache_corrupted=false
3572for ac_var in $ac_precious_vars; do
3573 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3574 eval ac_new_set=\$ac_env_${ac_var}_set
3575 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3576 eval ac_new_val=\$ac_env_${ac_var}_value
3577 case $ac_old_set,$ac_new_set in
3578 set,)
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3580$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3581 ac_cache_corrupted=: ;;
3582 ,set)
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3584$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3585 ac_cache_corrupted=: ;;
3586 ,);;
3587 *)
3588 if test "x$ac_old_val" != "x$ac_new_val"; then
3589 # differences in whitespace do not lead to failure.
3590 ac_old_val_w=`echo x $ac_old_val`
3591 ac_new_val_w=`echo x $ac_new_val`
3592 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3594$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3595 ac_cache_corrupted=:
3596 else
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3598$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3599 eval $ac_var=\$ac_old_val
3600 fi
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3602$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3603 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3604$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3605 fi;;
3606 esac
3607 # Pass precious variables to config.status.
3608 if test "$ac_new_set" = set; then
3609 case $ac_new_val in
3610 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3611 *) ac_arg=$ac_var=$ac_new_val ;;
3612 esac
3613 case " $ac_configure_args " in
3614 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3615 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3616 esac
3617 fi
3618done
3619if $ac_cache_corrupted; then
3620 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3621$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3622 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3623$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 3624 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
c971b7fa
PA
3625fi
3626## -------------------- ##
3627## Main body of script. ##
3628## -------------------- ##
3629
3630ac_ext=c
3631ac_cpp='$CPP $CPPFLAGS'
3632ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3633ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3634ac_compiler_gnu=$ac_cv_c_compiler_gnu
3635
3636
d0ac1c44 3637
73cc7272
TT
3638
3639
3640
c971b7fa
PA
3641ac_config_headers="$ac_config_headers config.h:config.in"
3642
3643
5abebf3c
CB
3644
3645
c971b7fa
PA
3646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3647$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3648 # Check whether --enable-maintainer-mode was given.
3649if test "${enable_maintainer_mode+set}" = set; then :
3650 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3651else
3652 USE_MAINTAINER_MODE=no
3653fi
3654
3655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3656$as_echo "$USE_MAINTAINER_MODE" >&6; }
3657 if test $USE_MAINTAINER_MODE = yes; then
3658 MAINTAINER_MODE_TRUE=
3659 MAINTAINER_MODE_FALSE='#'
3660else
3661 MAINTAINER_MODE_TRUE='#'
3662 MAINTAINER_MODE_FALSE=
3663fi
3664
3665 MAINT=$MAINTAINER_MODE_TRUE
3666
3667
3668
3669ac_ext=c
3670ac_cpp='$CPP $CPPFLAGS'
3671ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3672ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3673ac_compiler_gnu=$ac_cv_c_compiler_gnu
3674if test -n "$ac_tool_prefix"; then
3675 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3676set dummy ${ac_tool_prefix}gcc; ac_word=$2
3677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3678$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3679if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3680 $as_echo_n "(cached) " >&6
3681else
3682 if test -n "$CC"; then
3683 ac_cv_prog_CC="$CC" # Let the user override the test.
3684else
3685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3686for as_dir in $PATH
3687do
3688 IFS=$as_save_IFS
3689 test -z "$as_dir" && as_dir=.
3690 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3691 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3692 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3694 break 2
3695 fi
3696done
3697 done
3698IFS=$as_save_IFS
3699
3700fi
3701fi
3702CC=$ac_cv_prog_CC
3703if test -n "$CC"; then
3704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3705$as_echo "$CC" >&6; }
3706else
3707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3708$as_echo "no" >&6; }
3709fi
3710
3711
3712fi
3713if test -z "$ac_cv_prog_CC"; then
3714 ac_ct_CC=$CC
3715 # Extract the first word of "gcc", so it can be a program name with args.
3716set dummy gcc; ac_word=$2
3717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3718$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3719if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
3720 $as_echo_n "(cached) " >&6
3721else
3722 if test -n "$ac_ct_CC"; then
3723 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3724else
3725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3726for as_dir in $PATH
3727do
3728 IFS=$as_save_IFS
3729 test -z "$as_dir" && as_dir=.
3730 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3732 ac_cv_prog_ac_ct_CC="gcc"
3733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3734 break 2
3735 fi
3736done
3737 done
3738IFS=$as_save_IFS
3739
3740fi
3741fi
3742ac_ct_CC=$ac_cv_prog_ac_ct_CC
3743if test -n "$ac_ct_CC"; then
3744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3745$as_echo "$ac_ct_CC" >&6; }
3746else
3747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3748$as_echo "no" >&6; }
3749fi
3750
3751 if test "x$ac_ct_CC" = x; then
3752 CC=""
3753 else
3754 case $cross_compiling:$ac_tool_warned in
3755yes:)
3756{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3757$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3758ac_tool_warned=yes ;;
3759esac
3760 CC=$ac_ct_CC
3761 fi
3762else
3763 CC="$ac_cv_prog_CC"
3764fi
3765
3766if test -z "$CC"; then
3767 if test -n "$ac_tool_prefix"; then
3768 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3769set dummy ${ac_tool_prefix}cc; ac_word=$2
3770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3772if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3773 $as_echo_n "(cached) " >&6
3774else
3775 if test -n "$CC"; then
3776 ac_cv_prog_CC="$CC" # Let the user override the test.
3777else
3778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3779for as_dir in $PATH
3780do
3781 IFS=$as_save_IFS
3782 test -z "$as_dir" && as_dir=.
3783 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3785 ac_cv_prog_CC="${ac_tool_prefix}cc"
3786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3787 break 2
3788 fi
3789done
3790 done
3791IFS=$as_save_IFS
3792
3793fi
3794fi
3795CC=$ac_cv_prog_CC
3796if test -n "$CC"; then
3797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3798$as_echo "$CC" >&6; }
3799else
3800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3801$as_echo "no" >&6; }
3802fi
3803
3804
3805 fi
3806fi
3807if test -z "$CC"; then
3808 # Extract the first word of "cc", so it can be a program name with args.
3809set dummy cc; ac_word=$2
3810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3811$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3812if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3813 $as_echo_n "(cached) " >&6
3814else
3815 if test -n "$CC"; then
3816 ac_cv_prog_CC="$CC" # Let the user override the test.
3817else
3818 ac_prog_rejected=no
3819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3820for as_dir in $PATH
3821do
3822 IFS=$as_save_IFS
3823 test -z "$as_dir" && as_dir=.
3824 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3826 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3827 ac_prog_rejected=yes
3828 continue
3829 fi
3830 ac_cv_prog_CC="cc"
3831 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3832 break 2
3833 fi
3834done
3835 done
3836IFS=$as_save_IFS
3837
3838if test $ac_prog_rejected = yes; then
3839 # We found a bogon in the path, so make sure we never use it.
3840 set dummy $ac_cv_prog_CC
3841 shift
3842 if test $# != 0; then
3843 # We chose a different compiler from the bogus one.
3844 # However, it has the same basename, so the bogon will be chosen
3845 # first if we set CC to just the basename; use the full file name.
3846 shift
3847 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3848 fi
3849fi
3850fi
3851fi
3852CC=$ac_cv_prog_CC
3853if test -n "$CC"; then
3854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3855$as_echo "$CC" >&6; }
3856else
3857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858$as_echo "no" >&6; }
3859fi
3860
3861
3862fi
3863if test -z "$CC"; then
3864 if test -n "$ac_tool_prefix"; then
3865 for ac_prog in cl.exe
3866 do
3867 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3868set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3870$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3871if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3872 $as_echo_n "(cached) " >&6
3873else
3874 if test -n "$CC"; then
3875 ac_cv_prog_CC="$CC" # Let the user override the test.
3876else
3877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3878for as_dir in $PATH
3879do
3880 IFS=$as_save_IFS
3881 test -z "$as_dir" && as_dir=.
3882 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3884 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3886 break 2
3887 fi
3888done
3889 done
3890IFS=$as_save_IFS
3891
3892fi
3893fi
3894CC=$ac_cv_prog_CC
3895if test -n "$CC"; then
3896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3897$as_echo "$CC" >&6; }
3898else
3899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3900$as_echo "no" >&6; }
3901fi
3902
3903
3904 test -n "$CC" && break
3905 done
3906fi
3907if test -z "$CC"; then
3908 ac_ct_CC=$CC
3909 for ac_prog in cl.exe
3910do
3911 # Extract the first word of "$ac_prog", so it can be a program name with args.
3912set dummy $ac_prog; ac_word=$2
3913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3914$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3915if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
3916 $as_echo_n "(cached) " >&6
3917else
3918 if test -n "$ac_ct_CC"; then
3919 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3920else
3921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3922for as_dir in $PATH
3923do
3924 IFS=$as_save_IFS
3925 test -z "$as_dir" && as_dir=.
3926 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3928 ac_cv_prog_ac_ct_CC="$ac_prog"
3929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3930 break 2
3931 fi
3932done
3933 done
3934IFS=$as_save_IFS
3935
3936fi
3937fi
3938ac_ct_CC=$ac_cv_prog_ac_ct_CC
3939if test -n "$ac_ct_CC"; then
3940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3941$as_echo "$ac_ct_CC" >&6; }
3942else
3943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3944$as_echo "no" >&6; }
3945fi
3946
3947
3948 test -n "$ac_ct_CC" && break
3949done
3950
3951 if test "x$ac_ct_CC" = x; then
3952 CC=""
3953 else
3954 case $cross_compiling:$ac_tool_warned in
3955yes:)
3956{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3957$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3958ac_tool_warned=yes ;;
3959esac
3960 CC=$ac_ct_CC
3961 fi
3962fi
3963
3964fi
3965
3966
3967test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3969as_fn_error $? "no acceptable C compiler found in \$PATH
3970See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
3971
3972# Provide some information about the compiler.
3973$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3974set X $ac_compile
3975ac_compiler=$2
5e8754f9 3976for ac_option in --version -v -V -qversion; do
c971b7fa
PA
3977 { { ac_try="$ac_compiler $ac_option >&5"
3978case "(($ac_try" in
3979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3980 *) ac_try_echo=$ac_try;;
3981esac
3982eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3983$as_echo "$ac_try_echo"; } >&5
3984 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3985 ac_status=$?
3986 if test -s conftest.err; then
3987 sed '10a\
3988... rest of stderr output deleted ...
3989 10q' conftest.err >conftest.er1
3990 cat conftest.er1 >&5
c971b7fa 3991 fi
d0ac1c44 3992 rm -f conftest.er1 conftest.err
c971b7fa
PA
3993 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3994 test $ac_status = 0; }
3995done
3996
3997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3998/* end confdefs.h. */
d0ac1c44 3999
c971b7fa
PA
4000int
4001main ()
4002{
c971b7fa
PA
4003
4004 ;
4005 return 0;
4006}
4007_ACEOF
4008ac_clean_files_save=$ac_clean_files
d0ac1c44 4009ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
c971b7fa
PA
4010# Try to create an executable without -o first, disregard a.out.
4011# It will help us diagnose broken compilers, and finding out an intuition
4012# of exeext.
d0ac1c44
SM
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4014$as_echo_n "checking whether the C compiler works... " >&6; }
c971b7fa
PA
4015ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4016
4017# The possible output files:
4018ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4019
4020ac_rmfiles=
4021for ac_file in $ac_files
4022do
4023 case $ac_file in
4024 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4025 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4026 esac
4027done
4028rm -f $ac_rmfiles
4029
4030if { { ac_try="$ac_link_default"
4031case "(($ac_try" in
4032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4033 *) ac_try_echo=$ac_try;;
4034esac
4035eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4036$as_echo "$ac_try_echo"; } >&5
4037 (eval "$ac_link_default") 2>&5
4038 ac_status=$?
4039 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4040 test $ac_status = 0; }; then :
4041 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4042# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4043# in a Makefile. We should not override ac_cv_exeext if it was cached,
4044# so that the user can short-circuit this test for compilers unknown to
4045# Autoconf.
4046for ac_file in $ac_files ''
4047do
4048 test -f "$ac_file" || continue
4049 case $ac_file in
4050 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4051 ;;
4052 [ab].out )
4053 # We found the default executable, but exeext='' is most
4054 # certainly right.
4055 break;;
4056 *.* )
4057 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4058 then :; else
4059 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4060 fi
4061 # We set ac_cv_exeext here because the later test for it is not
4062 # safe: cross compilers may not add the suffix if given an `-o'
4063 # argument, so we may need to know it at that point already.
4064 # Even if this section looks crufty: it has the advantage of
4065 # actually working.
4066 break;;
4067 * )
4068 break;;
4069 esac
4070done
4071test "$ac_cv_exeext" = no && ac_cv_exeext=
4072
4073else
4074 ac_file=''
4075fi
c971b7fa 4076if test -z "$ac_file"; then :
d0ac1c44
SM
4077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4078$as_echo "no" >&6; }
4079$as_echo "$as_me: failed program was:" >&5
c971b7fa
PA
4080sed 's/^/| /' conftest.$ac_ext >&5
4081
4082{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4084as_fn_error 77 "C compiler cannot create executables
4085See \`config.log' for more details" "$LINENO" 5; }
4086else
4087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4088$as_echo "yes" >&6; }
c971b7fa 4089fi
d0ac1c44
SM
4090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4091$as_echo_n "checking for C compiler default output file name... " >&6; }
4092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4093$as_echo "$ac_file" >&6; }
c971b7fa
PA
4094ac_exeext=$ac_cv_exeext
4095
d0ac1c44 4096rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
c971b7fa 4097ac_clean_files=$ac_clean_files_save
c971b7fa
PA
4098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4099$as_echo_n "checking for suffix of executables... " >&6; }
4100if { { ac_try="$ac_link"
4101case "(($ac_try" in
4102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4103 *) ac_try_echo=$ac_try;;
4104esac
4105eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4106$as_echo "$ac_try_echo"; } >&5
4107 (eval "$ac_link") 2>&5
4108 ac_status=$?
4109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4110 test $ac_status = 0; }; then :
4111 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4112# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4113# work properly (i.e., refer to `conftest.exe'), while it won't with
4114# `rm'.
4115for ac_file in conftest.exe conftest conftest.*; do
4116 test -f "$ac_file" || continue
4117 case $ac_file in
4118 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4119 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4120 break;;
4121 * ) break;;
4122 esac
4123done
4124else
4125 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4127as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4128See \`config.log' for more details" "$LINENO" 5; }
c971b7fa 4129fi
d0ac1c44 4130rm -f conftest conftest$ac_cv_exeext
c971b7fa
PA
4131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4132$as_echo "$ac_cv_exeext" >&6; }
4133
4134rm -f conftest.$ac_ext
4135EXEEXT=$ac_cv_exeext
4136ac_exeext=$EXEEXT
d0ac1c44
SM
4137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4138/* end confdefs.h. */
4139#include <stdio.h>
4140int
4141main ()
4142{
4143FILE *f = fopen ("conftest.out", "w");
4144 return ferror (f) || fclose (f) != 0;
4145
4146 ;
4147 return 0;
4148}
4149_ACEOF
4150ac_clean_files="$ac_clean_files conftest.out"
4151# Check that the compiler produces executables we can run. If not, either
4152# the compiler is broken, or we cross compile.
4153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4154$as_echo_n "checking whether we are cross compiling... " >&6; }
4155if test "$cross_compiling" != yes; then
4156 { { ac_try="$ac_link"
4157case "(($ac_try" in
4158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4159 *) ac_try_echo=$ac_try;;
4160esac
4161eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4162$as_echo "$ac_try_echo"; } >&5
4163 (eval "$ac_link") 2>&5
4164 ac_status=$?
4165 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4166 test $ac_status = 0; }
4167 if { ac_try='./conftest$ac_cv_exeext'
4168 { { case "(($ac_try" in
4169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4170 *) ac_try_echo=$ac_try;;
4171esac
4172eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4173$as_echo "$ac_try_echo"; } >&5
4174 (eval "$ac_try") 2>&5
4175 ac_status=$?
4176 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4177 test $ac_status = 0; }; }; then
4178 cross_compiling=no
4179 else
4180 if test "$cross_compiling" = maybe; then
4181 cross_compiling=yes
4182 else
4183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4184$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4185as_fn_error $? "cannot run C compiled programs.
4186If you meant to cross compile, use \`--host'.
4187See \`config.log' for more details" "$LINENO" 5; }
4188 fi
4189 fi
4190fi
4191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4192$as_echo "$cross_compiling" >&6; }
4193
4194rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4195ac_clean_files=$ac_clean_files_save
c971b7fa
PA
4196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4197$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 4198if ${ac_cv_objext+:} false; then :
c971b7fa
PA
4199 $as_echo_n "(cached) " >&6
4200else
4201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4202/* end confdefs.h. */
4203
4204int
4205main ()
4206{
4207
4208 ;
4209 return 0;
4210}
4211_ACEOF
4212rm -f conftest.o conftest.obj
4213if { { ac_try="$ac_compile"
4214case "(($ac_try" in
4215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4216 *) ac_try_echo=$ac_try;;
4217esac
4218eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4219$as_echo "$ac_try_echo"; } >&5
4220 (eval "$ac_compile") 2>&5
4221 ac_status=$?
4222 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4223 test $ac_status = 0; }; then :
4224 for ac_file in conftest.o conftest.obj conftest.*; do
4225 test -f "$ac_file" || continue;
4226 case $ac_file in
4227 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4228 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4229 break;;
4230 esac
4231done
4232else
4233 $as_echo "$as_me: failed program was:" >&5
4234sed 's/^/| /' conftest.$ac_ext >&5
4235
4236{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4237$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4238as_fn_error $? "cannot compute suffix of object files: cannot compile
4239See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
4240fi
4241rm -f conftest.$ac_cv_objext conftest.$ac_ext
4242fi
4243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4244$as_echo "$ac_cv_objext" >&6; }
4245OBJEXT=$ac_cv_objext
4246ac_objext=$OBJEXT
4247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4248$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 4249if ${ac_cv_c_compiler_gnu+:} false; then :
c971b7fa
PA
4250 $as_echo_n "(cached) " >&6
4251else
4252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4253/* end confdefs.h. */
4254
4255int
4256main ()
4257{
4258#ifndef __GNUC__
4259 choke me
4260#endif
4261
4262 ;
4263 return 0;
4264}
4265_ACEOF
4266if ac_fn_c_try_compile "$LINENO"; then :
4267 ac_compiler_gnu=yes
4268else
4269 ac_compiler_gnu=no
4270fi
4271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4272ac_cv_c_compiler_gnu=$ac_compiler_gnu
4273
4274fi
4275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4276$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4277if test $ac_compiler_gnu = yes; then
4278 GCC=yes
4279else
4280 GCC=
4281fi
4282ac_test_CFLAGS=${CFLAGS+set}
4283ac_save_CFLAGS=$CFLAGS
4284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4285$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 4286if ${ac_cv_prog_cc_g+:} false; then :
c971b7fa
PA
4287 $as_echo_n "(cached) " >&6
4288else
4289 ac_save_c_werror_flag=$ac_c_werror_flag
4290 ac_c_werror_flag=yes
4291 ac_cv_prog_cc_g=no
4292 CFLAGS="-g"
4293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4294/* end confdefs.h. */
4295
4296int
4297main ()
4298{
4299
4300 ;
4301 return 0;
4302}
4303_ACEOF
4304if ac_fn_c_try_compile "$LINENO"; then :
4305 ac_cv_prog_cc_g=yes
4306else
4307 CFLAGS=""
4308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4309/* end confdefs.h. */
4310
4311int
4312main ()
4313{
4314
4315 ;
4316 return 0;
4317}
4318_ACEOF
4319if ac_fn_c_try_compile "$LINENO"; then :
4320
4321else
4322 ac_c_werror_flag=$ac_save_c_werror_flag
4323 CFLAGS="-g"
4324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4325/* end confdefs.h. */
4326
4327int
4328main ()
4329{
4330
4331 ;
4332 return 0;
4333}
4334_ACEOF
4335if ac_fn_c_try_compile "$LINENO"; then :
4336 ac_cv_prog_cc_g=yes
4337fi
4338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4339fi
4340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4341fi
4342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4343 ac_c_werror_flag=$ac_save_c_werror_flag
4344fi
4345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4346$as_echo "$ac_cv_prog_cc_g" >&6; }
4347if test "$ac_test_CFLAGS" = set; then
4348 CFLAGS=$ac_save_CFLAGS
4349elif test $ac_cv_prog_cc_g = yes; then
4350 if test "$GCC" = yes; then
4351 CFLAGS="-g -O2"
4352 else
4353 CFLAGS="-g"
4354 fi
4355else
4356 if test "$GCC" = yes; then
4357 CFLAGS="-O2"
4358 else
4359 CFLAGS=
4360 fi
4361fi
5e8754f9
SDJ
4362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4363$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4364if ${ac_cv_prog_cc_c89+:} false; then :
c971b7fa
PA
4365 $as_echo_n "(cached) " >&6
4366else
5e8754f9 4367 ac_cv_prog_cc_c89=no
c971b7fa
PA
4368ac_save_CC=$CC
4369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4370/* end confdefs.h. */
4371#include <stdarg.h>
4372#include <stdio.h>
5e8754f9
SDJ
4373struct stat;
4374/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4375struct buf { int x; };
4376FILE * (*rcsopen) (struct buf *, struct stat *, int);
4377static char *e (p, i)
4378 char **p;
4379 int i;
7a6dbc2f 4380{
5e8754f9 4381 return p[i];
c971b7fa 4382}
5e8754f9 4383static char *f (char * (*g) (char **, int), char **p, ...)
7a6dbc2f 4384{
5e8754f9
SDJ
4385 char *s;
4386 va_list v;
4387 va_start (v,p);
4388 s = g (p, va_arg (v,int));
4389 va_end (v);
4390 return s;
7a6dbc2f 4391}
7a6dbc2f 4392
5e8754f9
SDJ
4393/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4394 function prototypes and stuff, but not '\xHH' hex character constants.
4395 These don't provoke an error unfortunately, instead are silently treated
4396 as 'x'. The following induces an error, until -std is added to get
4397 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4398 array size at least. It's necessary to write '\x00'==0 to get something
4399 that's true only with -std. */
4400int osf4_cc_array ['\x00' == 0 ? 1 : -1];
7a6dbc2f 4401
5e8754f9
SDJ
4402/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4403 inside strings and character constants. */
4404#define FOO(x) 'x'
4405int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
c971b7fa 4406
5e8754f9
SDJ
4407int test (int i, double x);
4408struct s1 {int (*f) (int a);};
4409struct s2 {int (*f) (double a);};
4410int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4411int argc;
4412char **argv;
c971b7fa
PA
4413int
4414main ()
4415{
5e8754f9 4416return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
c971b7fa
PA
4417 ;
4418 return 0;
4419}
4420_ACEOF
5e8754f9
SDJ
4421for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4422 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c971b7fa
PA
4423do
4424 CC="$ac_save_CC $ac_arg"
4425 if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 4426 ac_cv_prog_cc_c89=$ac_arg
c971b7fa
PA
4427fi
4428rm -f core conftest.err conftest.$ac_objext
5e8754f9 4429 test "x$ac_cv_prog_cc_c89" != "xno" && break
c971b7fa
PA
4430done
4431rm -f conftest.$ac_ext
4432CC=$ac_save_CC
4433
4434fi
4435# AC_CACHE_VAL
5e8754f9 4436case "x$ac_cv_prog_cc_c89" in
c971b7fa
PA
4437 x)
4438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4439$as_echo "none needed" >&6; } ;;
4440 xno)
4441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4442$as_echo "unsupported" >&6; } ;;
4443 *)
5e8754f9
SDJ
4444 CC="$CC $ac_cv_prog_cc_c89"
4445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4446$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
c971b7fa 4447esac
5e8754f9 4448if test "x$ac_cv_prog_cc_c89" != xno; then :
7a6dbc2f 4449
5e8754f9 4450fi
7a6dbc2f 4451
5e8754f9
SDJ
4452ac_ext=c
4453ac_cpp='$CPP $CPPFLAGS'
4454ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4455ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4456ac_compiler_gnu=$ac_cv_c_compiler_gnu
7a6dbc2f 4457
5e8754f9
SDJ
4458ac_aux_dir=
4459for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4460 if test -f "$ac_dir/install-sh"; then
4461 ac_aux_dir=$ac_dir
4462 ac_install_sh="$ac_aux_dir/install-sh -c"
4463 break
4464 elif test -f "$ac_dir/install.sh"; then
4465 ac_aux_dir=$ac_dir
4466 ac_install_sh="$ac_aux_dir/install.sh -c"
4467 break
4468 elif test -f "$ac_dir/shtool"; then
4469 ac_aux_dir=$ac_dir
4470 ac_install_sh="$ac_aux_dir/shtool install -c"
4471 break
4472 fi
4473done
4474if test -z "$ac_aux_dir"; then
4475 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4476fi
7a6dbc2f 4477
5e8754f9
SDJ
4478# These three variables are undocumented and unsupported,
4479# and are intended to be withdrawn in a future Autoconf release.
4480# They can cause serious problems if a builder's source tree is in a directory
4481# whose full name contains unusual characters.
4482ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4483ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4484ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
7a6dbc2f 4485
7a6dbc2f 4486
5e8754f9
SDJ
4487# Expand $ac_aux_dir to an absolute path.
4488am_aux_dir=`cd "$ac_aux_dir" && pwd`
7a6dbc2f 4489
5e8754f9
SDJ
4490ac_ext=c
4491ac_cpp='$CPP $CPPFLAGS'
4492ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4493ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4494ac_compiler_gnu=$ac_cv_c_compiler_gnu
4495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4496$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4497if ${am_cv_prog_cc_c_o+:} false; then :
d0ac1c44
SM
4498 $as_echo_n "(cached) " >&6
4499else
5e8754f9 4500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d0ac1c44
SM
4501/* end confdefs.h. */
4502
4503int
4504main ()
4505{
5e8754f9 4506
d0ac1c44
SM
4507 ;
4508 return 0;
4509}
4510_ACEOF
5e8754f9
SDJ
4511 # Make sure it works both with $CC and with simple cc.
4512 # Following AC_PROG_CC_C_O, we do the test twice because some
4513 # compilers refuse to overwrite an existing .o file with -o,
4514 # though they will create one.
4515 am_cv_prog_cc_c_o=yes
4516 for am_i in 1 2; do
4517 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4518 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4519 ac_status=$?
4520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4521 (exit $ac_status); } \
4522 && test -f conftest2.$ac_objext; then
4523 : OK
4524 else
4525 am_cv_prog_cc_c_o=no
4526 break
4527 fi
4528 done
4529 rm -f core conftest*
4530 unset am_i
4531fi
4532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4533$as_echo "$am_cv_prog_cc_c_o" >&6; }
4534if test "$am_cv_prog_cc_c_o" != yes; then
4535 # Losing compiler, so override with the script.
4536 # FIXME: It is wrong to rewrite CC.
4537 # But if we don't then we get into trouble of one sort or another.
4538 # A longer-term fix would be to have automake use am__CC in this case,
4539 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4540 CC="$am_aux_dir/compile $CC"
7a6dbc2f 4541fi
d0ac1c44
SM
4542ac_ext=c
4543ac_cpp='$CPP $CPPFLAGS'
4544ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4545ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4546ac_compiler_gnu=$ac_cv_c_compiler_gnu
4547
4548
5e8754f9 4549
c971b7fa
PA
4550ac_ext=c
4551ac_cpp='$CPP $CPPFLAGS'
4552ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4553ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4554ac_compiler_gnu=$ac_cv_c_compiler_gnu
4555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4556$as_echo_n "checking how to run the C preprocessor... " >&6; }
4557# On Suns, sometimes $CPP names a directory.
4558if test -n "$CPP" && test -d "$CPP"; then
4559 CPP=
4560fi
4561if test -z "$CPP"; then
d0ac1c44 4562 if ${ac_cv_prog_CPP+:} false; then :
c971b7fa
PA
4563 $as_echo_n "(cached) " >&6
4564else
4565 # Double quotes because CPP needs to be expanded
4566 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4567 do
4568 ac_preproc_ok=false
4569for ac_c_preproc_warn_flag in '' yes
4570do
4571 # Use a header file that comes with gcc, so configuring glibc
4572 # with a fresh cross-compiler works.
4573 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4574 # <limits.h> exists even on freestanding compilers.
4575 # On the NeXT, cc -E runs the code through the compiler's parser,
4576 # not just through cpp. "Syntax error" is here to catch this case.
4577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4578/* end confdefs.h. */
4579#ifdef __STDC__
4580# include <limits.h>
4581#else
4582# include <assert.h>
4583#endif
4584 Syntax error
4585_ACEOF
4586if ac_fn_c_try_cpp "$LINENO"; then :
4587
4588else
4589 # Broken: fails on valid input.
4590continue
4591fi
d0ac1c44 4592rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4593
4594 # OK, works on sane cases. Now check whether nonexistent headers
4595 # can be detected and how.
4596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4597/* end confdefs.h. */
4598#include <ac_nonexistent.h>
4599_ACEOF
4600if ac_fn_c_try_cpp "$LINENO"; then :
4601 # Broken: success on invalid input.
4602continue
4603else
4604 # Passes both tests.
4605ac_preproc_ok=:
4606break
4607fi
d0ac1c44 4608rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4609
4610done
4611# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4612rm -f conftest.i conftest.err conftest.$ac_ext
c971b7fa
PA
4613if $ac_preproc_ok; then :
4614 break
4615fi
4616
4617 done
4618 ac_cv_prog_CPP=$CPP
4619
4620fi
4621 CPP=$ac_cv_prog_CPP
4622else
4623 ac_cv_prog_CPP=$CPP
4624fi
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4626$as_echo "$CPP" >&6; }
4627ac_preproc_ok=false
4628for ac_c_preproc_warn_flag in '' yes
4629do
4630 # Use a header file that comes with gcc, so configuring glibc
4631 # with a fresh cross-compiler works.
4632 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4633 # <limits.h> exists even on freestanding compilers.
4634 # On the NeXT, cc -E runs the code through the compiler's parser,
4635 # not just through cpp. "Syntax error" is here to catch this case.
4636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4637/* end confdefs.h. */
4638#ifdef __STDC__
4639# include <limits.h>
4640#else
4641# include <assert.h>
4642#endif
4643 Syntax error
4644_ACEOF
4645if ac_fn_c_try_cpp "$LINENO"; then :
4646
4647else
4648 # Broken: fails on valid input.
4649continue
4650fi
d0ac1c44 4651rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4652
4653 # OK, works on sane cases. Now check whether nonexistent headers
4654 # can be detected and how.
4655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4656/* end confdefs.h. */
4657#include <ac_nonexistent.h>
4658_ACEOF
4659if ac_fn_c_try_cpp "$LINENO"; then :
4660 # Broken: success on invalid input.
4661continue
4662else
4663 # Passes both tests.
4664ac_preproc_ok=:
4665break
4666fi
d0ac1c44 4667rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4668
4669done
4670# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4671rm -f conftest.i conftest.err conftest.$ac_ext
c971b7fa
PA
4672if $ac_preproc_ok; then :
4673
4674else
4675 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4677as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4678See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
4679fi
4680
4681ac_ext=c
4682ac_cpp='$CPP $CPPFLAGS'
4683ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4684ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4685ac_compiler_gnu=$ac_cv_c_compiler_gnu
4686
4687
4688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4689$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4690if ${ac_cv_path_GREP+:} false; then :
c971b7fa
PA
4691 $as_echo_n "(cached) " >&6
4692else
4693 if test -z "$GREP"; then
4694 ac_path_GREP_found=false
4695 # Loop through the user's path and test for each of PROGNAME-LIST
4696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4698do
4699 IFS=$as_save_IFS
4700 test -z "$as_dir" && as_dir=.
4701 for ac_prog in grep ggrep; do
4702 for ac_exec_ext in '' $ac_executable_extensions; do
4703 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4704 as_fn_executable_p "$ac_path_GREP" || continue
c971b7fa
PA
4705# Check for GNU ac_path_GREP and select it if it is found.
4706 # Check for GNU $ac_path_GREP
4707case `"$ac_path_GREP" --version 2>&1` in
4708*GNU*)
4709 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4710*)
4711 ac_count=0
4712 $as_echo_n 0123456789 >"conftest.in"
4713 while :
4714 do
4715 cat "conftest.in" "conftest.in" >"conftest.tmp"
4716 mv "conftest.tmp" "conftest.in"
4717 cp "conftest.in" "conftest.nl"
4718 $as_echo 'GREP' >> "conftest.nl"
4719 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4720 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4721 as_fn_arith $ac_count + 1 && ac_count=$as_val
4722 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4723 # Best one so far, save it but keep looking for a better one
4724 ac_cv_path_GREP="$ac_path_GREP"
4725 ac_path_GREP_max=$ac_count
4726 fi
4727 # 10*(2^10) chars as input seems more than enough
4728 test $ac_count -gt 10 && break
4729 done
4730 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4731esac
4732
4733 $ac_path_GREP_found && break 3
4734 done
4735 done
4736 done
4737IFS=$as_save_IFS
4738 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4739 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
c971b7fa
PA
4740 fi
4741else
4742 ac_cv_path_GREP=$GREP
4743fi
4744
4745fi
4746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4747$as_echo "$ac_cv_path_GREP" >&6; }
4748 GREP="$ac_cv_path_GREP"
4749
4750
4751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4752$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4753if ${ac_cv_path_EGREP+:} false; then :
c971b7fa
PA
4754 $as_echo_n "(cached) " >&6
4755else
4756 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4757 then ac_cv_path_EGREP="$GREP -E"
4758 else
4759 if test -z "$EGREP"; then
4760 ac_path_EGREP_found=false
4761 # Loop through the user's path and test for each of PROGNAME-LIST
4762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4763for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4764do
4765 IFS=$as_save_IFS
4766 test -z "$as_dir" && as_dir=.
4767 for ac_prog in egrep; do
4768 for ac_exec_ext in '' $ac_executable_extensions; do
4769 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4770 as_fn_executable_p "$ac_path_EGREP" || continue
c971b7fa
PA
4771# Check for GNU ac_path_EGREP and select it if it is found.
4772 # Check for GNU $ac_path_EGREP
4773case `"$ac_path_EGREP" --version 2>&1` in
4774*GNU*)
4775 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4776*)
4777 ac_count=0
4778 $as_echo_n 0123456789 >"conftest.in"
4779 while :
4780 do
4781 cat "conftest.in" "conftest.in" >"conftest.tmp"
4782 mv "conftest.tmp" "conftest.in"
4783 cp "conftest.in" "conftest.nl"
4784 $as_echo 'EGREP' >> "conftest.nl"
4785 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4786 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4787 as_fn_arith $ac_count + 1 && ac_count=$as_val
4788 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4789 # Best one so far, save it but keep looking for a better one
4790 ac_cv_path_EGREP="$ac_path_EGREP"
4791 ac_path_EGREP_max=$ac_count
4792 fi
4793 # 10*(2^10) chars as input seems more than enough
4794 test $ac_count -gt 10 && break
4795 done
4796 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4797esac
4798
4799 $ac_path_EGREP_found && break 3
4800 done
4801 done
4802 done
4803IFS=$as_save_IFS
4804 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4805 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
c971b7fa
PA
4806 fi
4807else
4808 ac_cv_path_EGREP=$EGREP
4809fi
4810
4811 fi
4812fi
4813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4814$as_echo "$ac_cv_path_EGREP" >&6; }
4815 EGREP="$ac_cv_path_EGREP"
4816
4817
4818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4819$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4820if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
4821 $as_echo_n "(cached) " >&6
4822else
4823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4824/* end confdefs.h. */
4825#include <stdlib.h>
4826#include <stdarg.h>
4827#include <string.h>
4828#include <float.h>
4829
4830int
4831main ()
4832{
4833
4834 ;
4835 return 0;
4836}
4837_ACEOF
4838if ac_fn_c_try_compile "$LINENO"; then :
4839 ac_cv_header_stdc=yes
4840else
4841 ac_cv_header_stdc=no
4842fi
4843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4844
4845if test $ac_cv_header_stdc = yes; then
4846 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4848/* end confdefs.h. */
4849#include <string.h>
4850
4851_ACEOF
4852if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4853 $EGREP "memchr" >/dev/null 2>&1; then :
4854
4855else
4856 ac_cv_header_stdc=no
4857fi
4858rm -f conftest*
4859
4860fi
4861
4862if test $ac_cv_header_stdc = yes; then
4863 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4865/* end confdefs.h. */
4866#include <stdlib.h>
4867
4868_ACEOF
4869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4870 $EGREP "free" >/dev/null 2>&1; then :
4871
4872else
4873 ac_cv_header_stdc=no
4874fi
4875rm -f conftest*
4876
4877fi
4878
4879if test $ac_cv_header_stdc = yes; then
4880 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4881 if test "$cross_compiling" = yes; then :
4882 :
4883else
4884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4885/* end confdefs.h. */
4886#include <ctype.h>
4887#include <stdlib.h>
4888#if ((' ' & 0x0FF) == 0x020)
4889# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4890# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4891#else
4892# define ISLOWER(c) \
4893 (('a' <= (c) && (c) <= 'i') \
4894 || ('j' <= (c) && (c) <= 'r') \
4895 || ('s' <= (c) && (c) <= 'z'))
4896# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4897#endif
4898
4899#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4900int
4901main ()
4902{
4903 int i;
4904 for (i = 0; i < 256; i++)
4905 if (XOR (islower (i), ISLOWER (i))
4906 || toupper (i) != TOUPPER (i))
4907 return 2;
4908 return 0;
4909}
4910_ACEOF
4911if ac_fn_c_try_run "$LINENO"; then :
4912
4913else
4914 ac_cv_header_stdc=no
4915fi
4916rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4917 conftest.$ac_objext conftest.beam conftest.$ac_ext
4918fi
4919
4920fi
4921fi
4922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4923$as_echo "$ac_cv_header_stdc" >&6; }
4924if test $ac_cv_header_stdc = yes; then
4925
4926$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4927
4928fi
4929
4930# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4931for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4932 inttypes.h stdint.h unistd.h
4933do :
4934 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4935ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4936"
d0ac1c44 4937if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c971b7fa
PA
4938 cat >>confdefs.h <<_ACEOF
4939#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4940_ACEOF
4941
4942fi
4943
4944done
4945
4946
4947
c971b7fa 4948 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4949if test "x$ac_cv_header_minix_config_h" = xyes; then :
c971b7fa
PA
4950 MINIX=yes
4951else
4952 MINIX=
4953fi
4954
4955
4956 if test "$MINIX" = yes; then
4957
4958$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4959
4960
4961$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4962
4963
4964$as_echo "#define _MINIX 1" >>confdefs.h
4965
c971b7fa 4966
4a626d0a 4967$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
c971b7fa 4968
4a626d0a 4969 fi
c971b7fa
PA
4970
4971
4972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4973$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4974if ${ac_cv_safe_to_define___extensions__+:} false; then :
c971b7fa
PA
4975 $as_echo_n "(cached) " >&6
4976else
4977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4978/* end confdefs.h. */
4979
4980# define __EXTENSIONS__ 1
4981 $ac_includes_default
4982int
4983main ()
4984{
4985
4986 ;
4987 return 0;
4988}
4989_ACEOF
4990if ac_fn_c_try_compile "$LINENO"; then :
4991 ac_cv_safe_to_define___extensions__=yes
4992else
4993 ac_cv_safe_to_define___extensions__=no
4994fi
4995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4996fi
4997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4998$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4999 test $ac_cv_safe_to_define___extensions__ = yes &&
5000 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5001
5002 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5003
5004 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5005
5006 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5007
5008 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5009
49e4877c
PA
5010 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5011
5012 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5013
5014 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5015
5016 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5017
5018 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5019
5020 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5021
5022 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5023
c971b7fa
PA
5024 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5025
4a626d0a
PA
5026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5027$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
d0ac1c44 5028if ${ac_cv_should_define__xopen_source+:} false; then :
4a626d0a
PA
5029 $as_echo_n "(cached) " >&6
5030else
5031 ac_cv_should_define__xopen_source=no
5032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5033/* end confdefs.h. */
5034
5035 #include <wchar.h>
5036 mbstate_t x;
5037int
5038main ()
5039{
5040
5041 ;
5042 return 0;
5043}
5044_ACEOF
5045if ac_fn_c_try_compile "$LINENO"; then :
5046
5047else
5048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5049/* end confdefs.h. */
5050
5051 #define _XOPEN_SOURCE 500
5052 #include <wchar.h>
5053 mbstate_t x;
5054int
5055main ()
5056{
5057
5058 ;
5059 return 0;
5060}
5061_ACEOF
5062if ac_fn_c_try_compile "$LINENO"; then :
5063 ac_cv_should_define__xopen_source=yes
5064fi
d0ac1c44
SM
5065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5066fi
5067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5068fi
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5070$as_echo "$ac_cv_should_define__xopen_source" >&6; }
5071 test $ac_cv_should_define__xopen_source = yes &&
5072 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5085$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5086if ${gl_cv_c_amsterdam_compiler+:} false; then :
5087 $as_echo_n "(cached) " >&6
5088else
5089
5090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5091/* end confdefs.h. */
5092
5093#ifdef __ACK__
5094Amsterdam
5095#endif
5096
5097_ACEOF
5098if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5099 $EGREP "Amsterdam" >/dev/null 2>&1; then :
5100 gl_cv_c_amsterdam_compiler=yes
5101else
5102 gl_cv_c_amsterdam_compiler=no
5103fi
5104rm -f conftest*
5105
5106
5107fi
5108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5109$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5110
5111 if test $gl_cv_c_amsterdam_compiler = yes; then
5112 if test -z "$AR"; then
5113 AR='cc -c.a'
5114 fi
5115 if test -z "$ARFLAGS"; then
5116 ARFLAGS='-o'
5117 fi
5118 else
5e8754f9
SDJ
5119 if test -n "$ac_tool_prefix"; then
5120 for ac_prog in ar lib "link -lib"
5121 do
5122 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5123set dummy $ac_tool_prefix$ac_prog; ac_word=$2
d0ac1c44
SM
5124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5125$as_echo_n "checking for $ac_word... " >&6; }
5126if ${ac_cv_prog_AR+:} false; then :
5127 $as_echo_n "(cached) " >&6
5128else
5129 if test -n "$AR"; then
5130 ac_cv_prog_AR="$AR" # Let the user override the test.
5131else
5132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5133for as_dir in $PATH
5134do
5135 IFS=$as_save_IFS
5136 test -z "$as_dir" && as_dir=.
5137 for ac_exec_ext in '' $ac_executable_extensions; do
5138 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5e8754f9 5139 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
d0ac1c44
SM
5140 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5141 break 2
5142 fi
5143done
5144 done
5145IFS=$as_save_IFS
5146
5147fi
4a626d0a 5148fi
d0ac1c44
SM
5149AR=$ac_cv_prog_AR
5150if test -n "$AR"; then
5151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5152$as_echo "$AR" >&6; }
5153else
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5155$as_echo "no" >&6; }
4a626d0a 5156fi
c971b7fa 5157
49e4877c 5158
5e8754f9
SDJ
5159 test -n "$AR" && break
5160 done
d0ac1c44 5161fi
5e8754f9 5162if test -z "$AR"; then
d0ac1c44 5163 ac_ct_AR=$AR
5e8754f9
SDJ
5164 for ac_prog in ar lib "link -lib"
5165do
5166 # Extract the first word of "$ac_prog", so it can be a program name with args.
5167set dummy $ac_prog; ac_word=$2
d0ac1c44
SM
5168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5169$as_echo_n "checking for $ac_word... " >&6; }
5170if ${ac_cv_prog_ac_ct_AR+:} false; then :
5171 $as_echo_n "(cached) " >&6
5172else
5173 if test -n "$ac_ct_AR"; then
5174 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5175else
5176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5177for as_dir in $PATH
5178do
5179 IFS=$as_save_IFS
5180 test -z "$as_dir" && as_dir=.
5181 for ac_exec_ext in '' $ac_executable_extensions; do
5182 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5e8754f9 5183 ac_cv_prog_ac_ct_AR="$ac_prog"
d0ac1c44
SM
5184 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5185 break 2
5186 fi
5187done
5188 done
5189IFS=$as_save_IFS
49e4877c 5190
d0ac1c44
SM
5191fi
5192fi
5193ac_ct_AR=$ac_cv_prog_ac_ct_AR
5194if test -n "$ac_ct_AR"; then
5195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5196$as_echo "$ac_ct_AR" >&6; }
5197else
5198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5199$as_echo "no" >&6; }
5200fi
49e4877c 5201
5e8754f9
SDJ
5202
5203 test -n "$ac_ct_AR" && break
5204done
5205
d0ac1c44 5206 if test "x$ac_ct_AR" = x; then
5e8754f9 5207 AR="false"
d0ac1c44
SM
5208 else
5209 case $cross_compiling:$ac_tool_warned in
5210yes:)
5211{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5212$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5213ac_tool_warned=yes ;;
5214esac
5215 AR=$ac_ct_AR
5216 fi
d0ac1c44 5217fi
c971b7fa 5218
5e8754f9 5219: ${AR=ar}
c971b7fa 5220
5e8754f9
SDJ
5221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
5222$as_echo_n "checking the archiver ($AR) interface... " >&6; }
5223if ${am_cv_ar_interface+:} false; then :
c971b7fa
PA
5224 $as_echo_n "(cached) " >&6
5225else
5e8754f9
SDJ
5226 ac_ext=c
5227ac_cpp='$CPP $CPPFLAGS'
5228ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5229ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5230ac_compiler_gnu=$ac_cv_c_compiler_gnu
5231
5232 am_cv_ar_interface=ar
5233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5234/* end confdefs.h. */
5235int some_variable = 0;
5236_ACEOF
5237if ac_fn_c_try_compile "$LINENO"; then :
5238 am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
5239 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5240 (eval $am_ar_try) 2>&5
5241 ac_status=$?
5242 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5243 test $ac_status = 0; }
5244 if test "$ac_status" -eq 0; then
5245 am_cv_ar_interface=ar
5246 else
5247 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
5248 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5249 (eval $am_ar_try) 2>&5
5250 ac_status=$?
5251 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5252 test $ac_status = 0; }
5253 if test "$ac_status" -eq 0; then
5254 am_cv_ar_interface=lib
5255 else
5256 am_cv_ar_interface=unknown
5257 fi
5258 fi
5259 rm -f conftest.lib libconftest.a
5260
5261fi
5262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5263 ac_ext=c
5264ac_cpp='$CPP $CPPFLAGS'
5265ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5266ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5267ac_compiler_gnu=$ac_cv_c_compiler_gnu
5268
5269fi
5270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
5271$as_echo "$am_cv_ar_interface" >&6; }
5272
5273case $am_cv_ar_interface in
5274ar)
5275 ;;
5276lib)
5277 # Microsoft lib, so override with the ar-lib wrapper script.
5278 # FIXME: It is wrong to rewrite AR.
5279 # But if we don't then we get into trouble of one sort or another.
5280 # A longer-term fix would be to have automake use am__AR in this case,
5281 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
5282 # similar.
5283 AR="$am_aux_dir/ar-lib $AR"
5284 ;;
5285unknown)
5286 as_fn_error $? "could not determine $AR interface" "$LINENO" 5
5287 ;;
5288esac
5289
5290 fi
5291
5292 if test -n "$ac_tool_prefix"; then
5293 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5294set dummy ${ac_tool_prefix}ar; ac_word=$2
5295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5296$as_echo_n "checking for $ac_word... " >&6; }
5297if ${ac_cv_prog_AR+:} false; then :
5298 $as_echo_n "(cached) " >&6
5299else
5300 if test -n "$AR"; then
5301 ac_cv_prog_AR="$AR" # Let the user override the test.
5302else
5303as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5304for as_dir in $PATH
5305do
5306 IFS=$as_save_IFS
5307 test -z "$as_dir" && as_dir=.
5308 for ac_exec_ext in '' $ac_executable_extensions; do
5309 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5310 ac_cv_prog_AR="${ac_tool_prefix}ar"
5311 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5312 break 2
5313 fi
5314done
5315 done
5316IFS=$as_save_IFS
5317
5318fi
5319fi
5320AR=$ac_cv_prog_AR
5321if test -n "$AR"; then
5322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5323$as_echo "$AR" >&6; }
5324else
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5326$as_echo "no" >&6; }
5327fi
5328
5329
5330fi
5331if test -z "$ac_cv_prog_AR"; then
5332 ac_ct_AR=$AR
5333 # Extract the first word of "ar", so it can be a program name with args.
5334set dummy ar; ac_word=$2
5335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5336$as_echo_n "checking for $ac_word... " >&6; }
5337if ${ac_cv_prog_ac_ct_AR+:} false; then :
5338 $as_echo_n "(cached) " >&6
5339else
5340 if test -n "$ac_ct_AR"; then
5341 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5342else
5343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5344for as_dir in $PATH
5345do
5346 IFS=$as_save_IFS
5347 test -z "$as_dir" && as_dir=.
5348 for ac_exec_ext in '' $ac_executable_extensions; do
5349 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5350 ac_cv_prog_ac_ct_AR="ar"
5351 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5352 break 2
5353 fi
5354done
5355 done
5356IFS=$as_save_IFS
5357
5358fi
5359fi
5360ac_ct_AR=$ac_cv_prog_ac_ct_AR
5361if test -n "$ac_ct_AR"; then
5362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5363$as_echo "$ac_ct_AR" >&6; }
5364else
5365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5366$as_echo "no" >&6; }
5367fi
5368
5369 if test "x$ac_ct_AR" = x; then
5370 AR="ar"
5371 else
5372 case $cross_compiling:$ac_tool_warned in
5373yes:)
5374{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5375$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5376ac_tool_warned=yes ;;
5377esac
5378 AR=$ac_ct_AR
5379 fi
5380else
5381 AR="$ac_cv_prog_AR"
5382fi
5383
5384 if test -z "$ARFLAGS"; then
5385 ARFLAGS='cr'
5386 fi
5387
c971b7fa 5388
5e8754f9
SDJ
5389
5390 if test -z "$RANLIB"; then
5391 if test $gl_cv_c_amsterdam_compiler = yes; then
5392 RANLIB=':'
5393 else
5394 if test -n "$ac_tool_prefix"; then
5395 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5396set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5398$as_echo_n "checking for $ac_word... " >&6; }
5399if ${ac_cv_prog_RANLIB+:} false; then :
5400 $as_echo_n "(cached) " >&6
5401else
5402 if test -n "$RANLIB"; then
5403 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5404else
5405as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5406for as_dir in $PATH
5407do
5408 IFS=$as_save_IFS
5409 test -z "$as_dir" && as_dir=.
5410 for ac_exec_ext in '' $ac_executable_extensions; do
5411 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5412 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5413 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5414 break 2
5415 fi
5416done
5417 done
5418IFS=$as_save_IFS
5419
5420fi
5421fi
5422RANLIB=$ac_cv_prog_RANLIB
5423if test -n "$RANLIB"; then
5424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5425$as_echo "$RANLIB" >&6; }
5426else
5427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5428$as_echo "no" >&6; }
5429fi
c971b7fa
PA
5430
5431
5432fi
5433if test -z "$ac_cv_prog_RANLIB"; then
5434 ac_ct_RANLIB=$RANLIB
5435 # Extract the first word of "ranlib", so it can be a program name with args.
5436set dummy ranlib; ac_word=$2
5437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5438$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5439if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
5440 $as_echo_n "(cached) " >&6
5441else
5442 if test -n "$ac_ct_RANLIB"; then
5443 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5444else
5445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5446for as_dir in $PATH
5447do
5448 IFS=$as_save_IFS
5449 test -z "$as_dir" && as_dir=.
5450 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5452 ac_cv_prog_ac_ct_RANLIB="ranlib"
5453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5454 break 2
5455 fi
5456done
5457 done
5458IFS=$as_save_IFS
5459
5460fi
5461fi
5462ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5463if test -n "$ac_ct_RANLIB"; then
5464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5465$as_echo "$ac_ct_RANLIB" >&6; }
5466else
5467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5468$as_echo "no" >&6; }
5469fi
5470
5471 if test "x$ac_ct_RANLIB" = x; then
5472 RANLIB=":"
5473 else
5474 case $cross_compiling:$ac_tool_warned in
5475yes:)
5476{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5477$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5478ac_tool_warned=yes ;;
5479esac
5480 RANLIB=$ac_ct_RANLIB
5481 fi
5482else
5483 RANLIB="$ac_cv_prog_RANLIB"
5484fi
5485
5486 fi
5487 fi
5488
5489
5abebf3c 5490
4a626d0a
PA
5491# Make sure we can run config.sub.
5492$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 5493 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4a626d0a
PA
5494
5495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5496$as_echo_n "checking build system type... " >&6; }
d0ac1c44 5497if ${ac_cv_build+:} false; then :
4a626d0a
PA
5498 $as_echo_n "(cached) " >&6
5499else
5500 ac_build_alias=$build_alias
5501test "x$ac_build_alias" = x &&
5502 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5503test "x$ac_build_alias" = x &&
d0ac1c44 5504 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4a626d0a 5505ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 5506 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4a626d0a
PA
5507
5508fi
5509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5510$as_echo "$ac_cv_build" >&6; }
5511case $ac_cv_build in
5512*-*-*) ;;
d0ac1c44 5513*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4a626d0a
PA
5514esac
5515build=$ac_cv_build
5516ac_save_IFS=$IFS; IFS='-'
5517set x $ac_cv_build
5518shift
5519build_cpu=$1
5520build_vendor=$2
5521shift; shift
5522# Remember, the first character of IFS is used to create $*,
5523# except with old shells:
5524build_os=$*
5525IFS=$ac_save_IFS
5526case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5527
5528
5529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5530$as_echo_n "checking host system type... " >&6; }
d0ac1c44 5531if ${ac_cv_host+:} false; then :
4a626d0a
PA
5532 $as_echo_n "(cached) " >&6
5533else
5534 if test "x$host_alias" = x; then
5535 ac_cv_host=$ac_cv_build
5536else
5537 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 5538 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4a626d0a
PA
5539fi
5540
5541fi
5542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5543$as_echo "$ac_cv_host" >&6; }
5544case $ac_cv_host in
5545*-*-*) ;;
d0ac1c44 5546*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4a626d0a
PA
5547esac
5548host=$ac_cv_host
5549ac_save_IFS=$IFS; IFS='-'
5550set x $ac_cv_host
5551shift
5552host_cpu=$1
5553host_vendor=$2
5554shift; shift
5555# Remember, the first character of IFS is used to create $*,
5556# except with old shells:
5557host_os=$*
5558IFS=$ac_save_IFS
5559case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5560
5561
c971b7fa
PA
5562
5563
88b48903
WN
5564
5565 # IEEE behaviour is the default on all CPUs except Alpha and SH
5566 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5567 # and the GCC 4.1.2 manual).
5568 case "$host_cpu" in
5569 alpha*)
5570 # On Alpha systems, a compiler option provides the behaviour.
5571 # See the ieee(3) manual page, also available at
5e8754f9 5572 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
88b48903
WN
5573 if test -n "$GCC"; then
5574 # GCC has the option -mieee.
5575 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
5576 CPPFLAGS="$CPPFLAGS -mieee"
5577 else
5578 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
5579 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
5580 CPPFLAGS="$CPPFLAGS -ieee"
5581 fi
5582 ;;
5583 sh*)
5584 if test -n "$GCC"; then
5585 # GCC has the option -mieee.
5586 CPPFLAGS="$CPPFLAGS -mieee"
5587 fi
5588 ;;
5589 esac
5590
2196f55f
YQ
5591# Check whether --enable-largefile was given.
5592if test "${enable_largefile+set}" = set; then :
5593 enableval=$enable_largefile;
5594fi
5595
5596if test "$enable_largefile" != no; then
5597
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5599$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 5600if ${ac_cv_sys_largefile_CC+:} false; then :
2196f55f
YQ
5601 $as_echo_n "(cached) " >&6
5602else
5603 ac_cv_sys_largefile_CC=no
5604 if test "$GCC" != yes; then
5605 ac_save_CC=$CC
5606 while :; do
5607 # IRIX 6.2 and later do not support large files by default,
5608 # so use the C compiler's -n32 option if that helps.
5609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5610/* end confdefs.h. */
5611#include <sys/types.h>
5612 /* Check that off_t can represent 2**63 - 1 correctly.
5613 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5614 since some C++ compilers masquerading as C compilers
5615 incorrectly reject 9223372036854775807. */
5616#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5617 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5618 && LARGE_OFF_T % 2147483647 == 1)
5619 ? 1 : -1];
5620int
5621main ()
5622{
5623
5624 ;
5625 return 0;
5626}
5627_ACEOF
5628 if ac_fn_c_try_compile "$LINENO"; then :
5629 break
5630fi
5631rm -f core conftest.err conftest.$ac_objext
5632 CC="$CC -n32"
5633 if ac_fn_c_try_compile "$LINENO"; then :
5634 ac_cv_sys_largefile_CC=' -n32'; break
5635fi
5636rm -f core conftest.err conftest.$ac_objext
5637 break
5638 done
5639 CC=$ac_save_CC
5640 rm -f conftest.$ac_ext
5641 fi
5642fi
5643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5644$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5645 if test "$ac_cv_sys_largefile_CC" != no; then
5646 CC=$CC$ac_cv_sys_largefile_CC
5647 fi
5648
5649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5650$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 5651if ${ac_cv_sys_file_offset_bits+:} false; then :
2196f55f
YQ
5652 $as_echo_n "(cached) " >&6
5653else
5654 while :; do
5655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5656/* end confdefs.h. */
5657#include <sys/types.h>
5658 /* Check that off_t can represent 2**63 - 1 correctly.
5659 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5660 since some C++ compilers masquerading as C compilers
5661 incorrectly reject 9223372036854775807. */
5662#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5663 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5664 && LARGE_OFF_T % 2147483647 == 1)
5665 ? 1 : -1];
5666int
5667main ()
5668{
5669
5670 ;
5671 return 0;
5672}
5673_ACEOF
5674if ac_fn_c_try_compile "$LINENO"; then :
5675 ac_cv_sys_file_offset_bits=no; break
5676fi
5677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5679/* end confdefs.h. */
5680#define _FILE_OFFSET_BITS 64
5681#include <sys/types.h>
5682 /* Check that off_t can represent 2**63 - 1 correctly.
5683 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5684 since some C++ compilers masquerading as C compilers
5685 incorrectly reject 9223372036854775807. */
5686#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5687 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5688 && LARGE_OFF_T % 2147483647 == 1)
5689 ? 1 : -1];
5690int
5691main ()
5692{
5693
5694 ;
5695 return 0;
5696}
5697_ACEOF
5698if ac_fn_c_try_compile "$LINENO"; then :
5699 ac_cv_sys_file_offset_bits=64; break
5700fi
5701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5702 ac_cv_sys_file_offset_bits=unknown
5703 break
5704done
5705fi
5706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5707$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5708case $ac_cv_sys_file_offset_bits in #(
5709 no | unknown) ;;
5710 *)
5711cat >>confdefs.h <<_ACEOF
5712#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5713_ACEOF
5714;;
5715esac
5716rm -rf conftest*
5717 if test $ac_cv_sys_file_offset_bits = unknown; then
5718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5719$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 5720if ${ac_cv_sys_large_files+:} false; then :
2196f55f
YQ
5721 $as_echo_n "(cached) " >&6
5722else
5723 while :; do
5724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5725/* end confdefs.h. */
5726#include <sys/types.h>
5727 /* Check that off_t can represent 2**63 - 1 correctly.
5728 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5729 since some C++ compilers masquerading as C compilers
5730 incorrectly reject 9223372036854775807. */
5731#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5732 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5733 && LARGE_OFF_T % 2147483647 == 1)
5734 ? 1 : -1];
5735int
5736main ()
5737{
5738
5739 ;
5740 return 0;
5741}
5742_ACEOF
5743if ac_fn_c_try_compile "$LINENO"; then :
5744 ac_cv_sys_large_files=no; break
5745fi
5746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5748/* end confdefs.h. */
5749#define _LARGE_FILES 1
5750#include <sys/types.h>
5751 /* Check that off_t can represent 2**63 - 1 correctly.
5752 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5753 since some C++ compilers masquerading as C compilers
5754 incorrectly reject 9223372036854775807. */
5755#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5756 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5757 && LARGE_OFF_T % 2147483647 == 1)
5758 ? 1 : -1];
5759int
5760main ()
5761{
5762
5763 ;
5764 return 0;
5765}
5766_ACEOF
5767if ac_fn_c_try_compile "$LINENO"; then :
5768 ac_cv_sys_large_files=1; break
5769fi
5770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5771 ac_cv_sys_large_files=unknown
5772 break
5773done
5774fi
5775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5776$as_echo "$ac_cv_sys_large_files" >&6; }
5777case $ac_cv_sys_large_files in #(
5778 no | unknown) ;;
5779 *)
5780cat >>confdefs.h <<_ACEOF
5781#define _LARGE_FILES $ac_cv_sys_large_files
5782_ACEOF
5783;;
5784esac
5785rm -rf conftest*
5786 fi
5787
5788
4a626d0a
PA
5789$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
5790
2196f55f
YQ
5791fi
5792
88b48903
WN
5793
5794
5abebf3c
CB
5795
5796
5797
5798 # Check whether --enable-threads was given.
5799if test "${enable_threads+set}" = set; then :
5800 enableval=$enable_threads; gl_use_threads=$enableval
5801else
5802 if test -n "$gl_use_threads_default"; then
5803 gl_use_threads="$gl_use_threads_default"
5804 else
5805 case "$host_os" in
5806 osf*) gl_use_threads=no ;;
5807 cygwin*)
5808 case `uname -r` in
5809 1.[0-5].*) gl_use_threads=no ;;
5810 *) gl_use_threads=yes ;;
5811 esac
5812 ;;
5813 *) gl_use_threads=yes ;;
5814 esac
5815 fi
5816
5817fi
5818
5819 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
5820 # For using <pthread.h>:
5821 case "$host_os" in
5822 osf*)
5823 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
5824 # groks <pthread.h>. cc also understands the flag -pthread, but
5825 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
5826 # 2. putting a flag into CPPFLAGS that has an effect on the linker
5827 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
5828 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
5829 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
5830 ;;
5831 esac
5832 # Some systems optimize for single-threaded programs by default, and
5833 # need special flags to disable these optimizations. For example, the
5834 # definition of 'errno' in <errno.h>.
5835 case "$host_os" in
5836 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
5837 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
5838 esac
5839 fi
5840
5841
5842
49e4877c
PA
5843 # Pre-early section.
5844
5845
5846
5abebf3c 5847
4a626d0a 5848 # Code from module absolute-header:
8690e634
JK
5849 # Code from module alloca:
5850 # Code from module alloca-opt:
725e2999 5851 # Code from module arpa_inet:
6ec2e0f5
SDJ
5852 # Code from module assure:
5853 # Code from module at-internal:
98399780 5854 # Code from module canonicalize-lgpl:
6a29c58e 5855 # Code from module chdir:
6ec2e0f5
SDJ
5856 # Code from module chdir-long:
5857 # Code from module cloexec:
5858 # Code from module close:
5859 # Code from module closedir:
5e8754f9 5860 # Code from module configmake:
6ec2e0f5
SDJ
5861 # Code from module d-ino:
5862 # Code from module d-type:
e26b6bb0 5863 # Code from module dirent:
18848e28 5864 # Code from module dirfd:
6a29c58e 5865 # Code from module dirname-lgpl:
2196f55f 5866 # Code from module dosname:
6a29c58e 5867 # Code from module double-slash-root:
6ec2e0f5
SDJ
5868 # Code from module dup:
5869 # Code from module dup2:
3d99e817 5870 # Code from module environ:
18848e28 5871 # Code from module errno:
6ec2e0f5
SDJ
5872 # Code from module error:
5873 # Code from module exitfail:
c971b7fa 5874 # Code from module extensions:
a512b375 5875 # Code from module extern-inline:
6ec2e0f5
SDJ
5876 # Code from module fchdir:
5877 # Code from module fcntl:
5878 # Code from module fcntl-h:
5879 # Code from module fd-hook:
5880 # Code from module fdopendir:
5881 # Code from module filename:
5882 # Code from module filenamecat-lgpl:
49e4877c 5883 # Code from module flexmember:
88b48903 5884 # Code from module float:
8690e634
JK
5885 # Code from module fnmatch:
5886 # Code from module fnmatch-gnu:
88b48903
WN
5887 # Code from module fpieee:
5888
5889 # Code from module fpucw:
5890 # Code from module frexp:
5891 # Code from module frexpl:
6ec2e0f5
SDJ
5892 # Code from module fstat:
5893 # Code from module fstatat:
5894 # Code from module getcwd:
5895 # Code from module getcwd-lgpl:
5896 # Code from module getdtablesize:
5897 # Code from module getlogin_r:
5898 # Code from module getprogname:
5899 # Code from module gettext-h:
4a626d0a 5900 # Code from module gettimeofday:
6ec2e0f5 5901 # Code from module glob:
49e4877c 5902 # Code from module hard-locale:
5abebf3c 5903 # Code from module havelib:
c971b7fa 5904 # Code from module include_next:
725e2999 5905 # Code from module inet_ntop:
6ec2e0f5 5906 # Code from module intprops:
c971b7fa
PA
5907 # Code from module inttypes:
5908 # Code from module inttypes-incomplete:
88b48903
WN
5909 # Code from module isnand-nolibm:
5910 # Code from module isnanl-nolibm:
2196f55f
YQ
5911 # Code from module largefile:
5912
49e4877c 5913 # Code from module limits-h:
8690e634 5914 # Code from module localcharset:
5abebf3c 5915 # Code from module lock:
f45c62c4 5916 # Code from module lstat:
6a29c58e 5917 # Code from module malloc-posix:
98399780 5918 # Code from module malloca:
88b48903 5919 # Code from module math:
8690e634
JK
5920 # Code from module mbrtowc:
5921 # Code from module mbsinit:
5922 # Code from module mbsrtowcs:
c971b7fa
PA
5923 # Code from module memchr:
5924 # Code from module memmem:
5925 # Code from module memmem-simple:
6ec2e0f5
SDJ
5926 # Code from module mempcpy:
5927 # Code from module memrchr:
8a99096f 5928 # Code from module mkdir:
e8d8cce6 5929 # Code from module mkdtemp:
b3279b60 5930 # Code from module mkostemp:
6ec2e0f5
SDJ
5931 # Code from module msvc-inval:
5932 # Code from module msvc-nothrow:
c971b7fa 5933 # Code from module multiarch:
725e2999 5934 # Code from module netinet_in:
98399780 5935 # Code from module nocrash:
6ec2e0f5
SDJ
5936 # Code from module open:
5937 # Code from module openat:
5938 # Code from module openat-die:
5939 # Code from module openat-h:
5940 # Code from module opendir:
38ec2207 5941 # Code from module pathmax:
8424cc97 5942 # Code from module rawmemchr:
6ec2e0f5 5943 # Code from module readdir:
2196f55f 5944 # Code from module readlink:
6ec2e0f5 5945 # Code from module realloc-posix:
6a29c58e 5946 # Code from module rename:
6ec2e0f5 5947 # Code from module rewinddir:
6a29c58e
YQ
5948 # Code from module rmdir:
5949 # Code from module same-inode:
6ec2e0f5 5950 # Code from module save-cwd:
5e8754f9 5951 # Code from module secure_getenv:
3d99e817 5952 # Code from module setenv:
0750520d 5953 # Code from module signal-h:
98399780 5954 # Code from module snippet/_Noreturn:
c971b7fa
PA
5955 # Code from module snippet/arg-nonnull:
5956 # Code from module snippet/c++defs:
5957 # Code from module snippet/warn-on-use:
725e2999 5958 # Code from module socklen:
8839a007 5959 # Code from module ssize_t:
2196f55f 5960 # Code from module stat:
725e2999 5961 # Code from module stdalign:
8690e634 5962 # Code from module stdbool:
c971b7fa
PA
5963 # Code from module stddef:
5964 # Code from module stdint:
6a29c58e 5965 # Code from module stdio:
98399780 5966 # Code from module stdlib:
8424cc97 5967 # Code from module strchrnul:
6ec2e0f5 5968 # Code from module strdup-posix:
8690e634 5969 # Code from module streq:
6ec2e0f5
SDJ
5970 # Code from module strerror:
5971 # Code from module strerror-override:
5abebf3c 5972 # Code from module strerror_r-posix:
c971b7fa 5973 # Code from module string:
8690e634 5974 # Code from module strnlen1:
63ce7108
TT
5975 # Code from module strstr:
5976 # Code from module strstr-simple:
421693b0 5977 # Code from module strtok_r:
725e2999 5978 # Code from module sys_socket:
09607c9e 5979 # Code from module sys_stat:
4a626d0a 5980 # Code from module sys_time:
8839a007 5981 # Code from module sys_types:
725e2999 5982 # Code from module sys_uio:
2d8adcbd 5983 # Code from module tempname:
5abebf3c
CB
5984 # Code from module threadlib:
5985
5986
5987
09607c9e 5988 # Code from module time:
8839a007 5989 # Code from module unistd:
6ec2e0f5 5990 # Code from module unistd-safer:
3d99e817 5991 # Code from module unsetenv:
c971b7fa 5992 # Code from module update-copyright:
8690e634
JK
5993 # Code from module verify:
5994 # Code from module wchar:
5995 # Code from module wctype-h:
c971b7fa 5996
5e8754f9
SDJ
5997ac_ext=c
5998ac_cpp='$CPP $CPPFLAGS'
5999ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6000ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6001ac_compiler_gnu=$ac_cv_c_compiler_gnu
6002if test -n "$ac_tool_prefix"; then
6003 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
6004set dummy ${ac_tool_prefix}gcc; ac_word=$2
6005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6006$as_echo_n "checking for $ac_word... " >&6; }
6007if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
6008 $as_echo_n "(cached) " >&6
6009else
5e8754f9
SDJ
6010 if test -n "$CC"; then
6011 ac_cv_prog_CC="$CC" # Let the user override the test.
c971b7fa 6012else
5e8754f9
SDJ
6013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6014for as_dir in $PATH
6015do
6016 IFS=$as_save_IFS
6017 test -z "$as_dir" && as_dir=.
6018 for ac_exec_ext in '' $ac_executable_extensions; do
6019 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6020 ac_cv_prog_CC="${ac_tool_prefix}gcc"
6021 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6022 break 2
6023 fi
6024done
6025 done
6026IFS=$as_save_IFS
c971b7fa 6027
5e8754f9
SDJ
6028fi
6029fi
6030CC=$ac_cv_prog_CC
6031if test -n "$CC"; then
6032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6033$as_echo "$CC" >&6; }
7a6dbc2f 6034else
5e8754f9
SDJ
6035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6036$as_echo "no" >&6; }
6037fi
c971b7fa 6038
c971b7fa 6039
7a6dbc2f 6040fi
5e8754f9
SDJ
6041if test -z "$ac_cv_prog_CC"; then
6042 ac_ct_CC=$CC
6043 # Extract the first word of "gcc", so it can be a program name with args.
6044set dummy gcc; ac_word=$2
6045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6046$as_echo_n "checking for $ac_word... " >&6; }
6047if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
6048 $as_echo_n "(cached) " >&6
6049else
5e8754f9
SDJ
6050 if test -n "$ac_ct_CC"; then
6051 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
c971b7fa 6052else
5e8754f9
SDJ
6053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6054for as_dir in $PATH
6055do
6056 IFS=$as_save_IFS
6057 test -z "$as_dir" && as_dir=.
6058 for ac_exec_ext in '' $ac_executable_extensions; do
6059 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6060 ac_cv_prog_ac_ct_CC="gcc"
6061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6062 break 2
6063 fi
6064done
6065 done
6066IFS=$as_save_IFS
6067
c971b7fa 6068fi
c971b7fa 6069fi
5e8754f9
SDJ
6070ac_ct_CC=$ac_cv_prog_ac_ct_CC
6071if test -n "$ac_ct_CC"; then
6072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6073$as_echo "$ac_ct_CC" >&6; }
6074else
6075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6076$as_echo "no" >&6; }
6077fi
7a6dbc2f 6078
5e8754f9
SDJ
6079 if test "x$ac_ct_CC" = x; then
6080 CC=""
6081 else
6082 case $cross_compiling:$ac_tool_warned in
6083yes:)
6084{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6085$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6086ac_tool_warned=yes ;;
6087esac
6088 CC=$ac_ct_CC
6089 fi
6090else
6091 CC="$ac_cv_prog_CC"
c971b7fa 6092fi
7a6dbc2f 6093
5e8754f9
SDJ
6094if test -z "$CC"; then
6095 if test -n "$ac_tool_prefix"; then
6096 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
6097set dummy ${ac_tool_prefix}cc; ac_word=$2
6098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6099$as_echo_n "checking for $ac_word... " >&6; }
6100if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
6101 $as_echo_n "(cached) " >&6
6102else
5e8754f9
SDJ
6103 if test -n "$CC"; then
6104 ac_cv_prog_CC="$CC" # Let the user override the test.
c971b7fa 6105else
5e8754f9
SDJ
6106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6107for as_dir in $PATH
6108do
6109 IFS=$as_save_IFS
6110 test -z "$as_dir" && as_dir=.
6111 for ac_exec_ext in '' $ac_executable_extensions; do
6112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6113 ac_cv_prog_CC="${ac_tool_prefix}cc"
6114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6115 break 2
6116 fi
6117done
6118 done
6119IFS=$as_save_IFS
6120
7a6dbc2f 6121fi
7a6dbc2f 6122fi
5e8754f9
SDJ
6123CC=$ac_cv_prog_CC
6124if test -n "$CC"; then
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6126$as_echo "$CC" >&6; }
c971b7fa 6127else
5e8754f9
SDJ
6128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6129$as_echo "no" >&6; }
6130fi
7a6dbc2f
SDJ
6131
6132
5e8754f9
SDJ
6133 fi
6134fi
6135if test -z "$CC"; then
6136 # Extract the first word of "cc", so it can be a program name with args.
6137set dummy cc; ac_word=$2
6138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6139$as_echo_n "checking for $ac_word... " >&6; }
6140if ${ac_cv_prog_CC+:} false; then :
7a6dbc2f
SDJ
6141 $as_echo_n "(cached) " >&6
6142else
5e8754f9
SDJ
6143 if test -n "$CC"; then
6144 ac_cv_prog_CC="$CC" # Let the user override the test.
7a6dbc2f 6145else
5e8754f9
SDJ
6146 ac_prog_rejected=no
6147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6148for as_dir in $PATH
6149do
6150 IFS=$as_save_IFS
6151 test -z "$as_dir" && as_dir=.
6152 for ac_exec_ext in '' $ac_executable_extensions; do
6153 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6154 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
6155 ac_prog_rejected=yes
6156 continue
6157 fi
6158 ac_cv_prog_CC="cc"
6159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6160 break 2
6161 fi
6162done
6163 done
6164IFS=$as_save_IFS
6165
6166if test $ac_prog_rejected = yes; then
6167 # We found a bogon in the path, so make sure we never use it.
6168 set dummy $ac_cv_prog_CC
6169 shift
6170 if test $# != 0; then
6171 # We chose a different compiler from the bogus one.
6172 # However, it has the same basename, so the bogon will be chosen
6173 # first if we set CC to just the basename; use the full file name.
6174 shift
6175 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
6176 fi
6177fi
6178fi
6179fi
6180CC=$ac_cv_prog_CC
6181if test -n "$CC"; then
6182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6183$as_echo "$CC" >&6; }
6184else
6185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6186$as_echo "no" >&6; }
c971b7fa 6187fi
7a6dbc2f 6188
7a6dbc2f 6189
c971b7fa 6190fi
5e8754f9
SDJ
6191if test -z "$CC"; then
6192 if test -n "$ac_tool_prefix"; then
6193 for ac_prog in cl.exe
6194 do
6195 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6196set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6198$as_echo_n "checking for $ac_word... " >&6; }
6199if ${ac_cv_prog_CC+:} false; then :
6200 $as_echo_n "(cached) " >&6
6201else
6202 if test -n "$CC"; then
6203 ac_cv_prog_CC="$CC" # Let the user override the test.
6204else
6205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6206for as_dir in $PATH
6207do
6208 IFS=$as_save_IFS
6209 test -z "$as_dir" && as_dir=.
6210 for ac_exec_ext in '' $ac_executable_extensions; do
6211 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6212 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6213 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6214 break 2
6215 fi
6216done
7a6dbc2f 6217 done
5e8754f9
SDJ
6218IFS=$as_save_IFS
6219
6220fi
6221fi
6222CC=$ac_cv_prog_CC
6223if test -n "$CC"; then
6224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6225$as_echo "$CC" >&6; }
6226else
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6228$as_echo "no" >&6; }
c971b7fa 6229fi
7a6dbc2f 6230
5e8754f9
SDJ
6231
6232 test -n "$CC" && break
6233 done
6234fi
6235if test -z "$CC"; then
6236 ac_ct_CC=$CC
6237 for ac_prog in cl.exe
6238do
6239 # Extract the first word of "$ac_prog", so it can be a program name with args.
6240set dummy $ac_prog; ac_word=$2
6241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6242$as_echo_n "checking for $ac_word... " >&6; }
6243if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
6244 $as_echo_n "(cached) " >&6
6245else
5e8754f9
SDJ
6246 if test -n "$ac_ct_CC"; then
6247 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6248else
6249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6250for as_dir in $PATH
6251do
6252 IFS=$as_save_IFS
6253 test -z "$as_dir" && as_dir=.
6254 for ac_exec_ext in '' $ac_executable_extensions; do
6255 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6256 ac_cv_prog_ac_ct_CC="$ac_prog"
6257 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6258 break 2
6259 fi
6260done
6261 done
6262IFS=$as_save_IFS
6263
6264fi
6265fi
6266ac_ct_CC=$ac_cv_prog_ac_ct_CC
6267if test -n "$ac_ct_CC"; then
6268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6269$as_echo "$ac_ct_CC" >&6; }
6270else
6271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6272$as_echo "no" >&6; }
6273fi
6274
6275
6276 test -n "$ac_ct_CC" && break
6277done
6278
6279 if test "x$ac_ct_CC" = x; then
6280 CC=""
6281 else
6282 case $cross_compiling:$ac_tool_warned in
6283yes:)
6284{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6285$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6286ac_tool_warned=yes ;;
6287esac
6288 CC=$ac_ct_CC
6289 fi
6290fi
6291
6292fi
6293
6294
6295test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6296$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6297as_fn_error $? "no acceptable C compiler found in \$PATH
6298See \`config.log' for more details" "$LINENO" 5; }
6299
6300# Provide some information about the compiler.
6301$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
6302set X $ac_compile
6303ac_compiler=$2
6304for ac_option in --version -v -V -qversion; do
6305 { { ac_try="$ac_compiler $ac_option >&5"
6306case "(($ac_try" in
6307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6308 *) ac_try_echo=$ac_try;;
6309esac
6310eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6311$as_echo "$ac_try_echo"; } >&5
6312 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6313 ac_status=$?
6314 if test -s conftest.err; then
6315 sed '10a\
6316... rest of stderr output deleted ...
6317 10q' conftest.err >conftest.er1
6318 cat conftest.er1 >&5
6319 fi
6320 rm -f conftest.er1 conftest.err
6321 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6322 test $ac_status = 0; }
6323done
6324
6325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6326$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
6327if ${ac_cv_c_compiler_gnu+:} false; then :
6328 $as_echo_n "(cached) " >&6
7a6dbc2f
SDJ
6329else
6330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6331/* end confdefs.h. */
c971b7fa 6332
c971b7fa 6333int
5e8754f9 6334main ()
c971b7fa 6335{
5e8754f9
SDJ
6336#ifndef __GNUC__
6337 choke me
6338#endif
6339
6340 ;
6341 return 0;
c971b7fa
PA
6342}
6343_ACEOF
5e8754f9
SDJ
6344if ac_fn_c_try_compile "$LINENO"; then :
6345 ac_compiler_gnu=yes
7a6dbc2f 6346else
5e8754f9 6347 ac_compiler_gnu=no
c971b7fa 6348fi
5e8754f9
SDJ
6349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6350ac_cv_c_compiler_gnu=$ac_compiler_gnu
c971b7fa
PA
6351
6352fi
5e8754f9
SDJ
6353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6354$as_echo "$ac_cv_c_compiler_gnu" >&6; }
6355if test $ac_compiler_gnu = yes; then
6356 GCC=yes
6357else
6358 GCC=
d0ac1c44 6359fi
5e8754f9
SDJ
6360ac_test_CFLAGS=${CFLAGS+set}
6361ac_save_CFLAGS=$CFLAGS
6362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6363$as_echo_n "checking whether $CC accepts -g... " >&6; }
6364if ${ac_cv_prog_cc_g+:} false; then :
6365 $as_echo_n "(cached) " >&6
6366else
6367 ac_save_c_werror_flag=$ac_c_werror_flag
6368 ac_c_werror_flag=yes
6369 ac_cv_prog_cc_g=no
6370 CFLAGS="-g"
6371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6372/* end confdefs.h. */
d0ac1c44 6373
5e8754f9
SDJ
6374int
6375main ()
6376{
c971b7fa 6377
5e8754f9
SDJ
6378 ;
6379 return 0;
6380}
6381_ACEOF
6382if ac_fn_c_try_compile "$LINENO"; then :
6383 ac_cv_prog_cc_g=yes
6384else
6385 CFLAGS=""
6386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6387/* end confdefs.h. */
c971b7fa 6388
5e8754f9
SDJ
6389int
6390main ()
6391{
c971b7fa 6392
5e8754f9
SDJ
6393 ;
6394 return 0;
6395}
6396_ACEOF
6397if ac_fn_c_try_compile "$LINENO"; then :
c971b7fa 6398
5e8754f9
SDJ
6399else
6400 ac_c_werror_flag=$ac_save_c_werror_flag
6401 CFLAGS="-g"
6402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6403/* end confdefs.h. */
c971b7fa 6404
5e8754f9
SDJ
6405int
6406main ()
6407{
c971b7fa 6408
5e8754f9
SDJ
6409 ;
6410 return 0;
6411}
7a6dbc2f 6412_ACEOF
5e8754f9
SDJ
6413if ac_fn_c_try_compile "$LINENO"; then :
6414 ac_cv_prog_cc_g=yes
c971b7fa 6415fi
5e8754f9
SDJ
6416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6417fi
6418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6419fi
6420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6421 ac_c_werror_flag=$ac_save_c_werror_flag
6422fi
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6424$as_echo "$ac_cv_prog_cc_g" >&6; }
6425if test "$ac_test_CFLAGS" = set; then
6426 CFLAGS=$ac_save_CFLAGS
6427elif test $ac_cv_prog_cc_g = yes; then
6428 if test "$GCC" = yes; then
6429 CFLAGS="-g -O2"
6430 else
6431 CFLAGS="-g"
6432 fi
6433else
6434 if test "$GCC" = yes; then
6435 CFLAGS="-O2"
6436 else
6437 CFLAGS=
6438 fi
6439fi
6440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6441$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6442if ${ac_cv_prog_cc_c89+:} false; then :
6443 $as_echo_n "(cached) " >&6
6444else
6445 ac_cv_prog_cc_c89=no
6446ac_save_CC=$CC
6447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6448/* end confdefs.h. */
6449#include <stdarg.h>
6450#include <stdio.h>
6451struct stat;
6452/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6453struct buf { int x; };
6454FILE * (*rcsopen) (struct buf *, struct stat *, int);
6455static char *e (p, i)
6456 char **p;
6457 int i;
6458{
6459 return p[i];
6460}
6461static char *f (char * (*g) (char **, int), char **p, ...)
6462{
6463 char *s;
6464 va_list v;
6465 va_start (v,p);
6466 s = g (p, va_arg (v,int));
6467 va_end (v);
6468 return s;
6469}
c971b7fa 6470
5e8754f9
SDJ
6471/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6472 function prototypes and stuff, but not '\xHH' hex character constants.
6473 These don't provoke an error unfortunately, instead are silently treated
6474 as 'x'. The following induces an error, until -std is added to get
6475 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6476 array size at least. It's necessary to write '\x00'==0 to get something
6477 that's true only with -std. */
6478int osf4_cc_array ['\x00' == 0 ? 1 : -1];
c971b7fa 6479
5e8754f9
SDJ
6480/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6481 inside strings and character constants. */
6482#define FOO(x) 'x'
6483int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
c971b7fa 6484
5e8754f9
SDJ
6485int test (int i, double x);
6486struct s1 {int (*f) (int a);};
6487struct s2 {int (*f) (double a);};
6488int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6489int argc;
6490char **argv;
6491int
6492main ()
6493{
6494return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6495 ;
6496 return 0;
6497}
6498_ACEOF
6499for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6500 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6501do
6502 CC="$ac_save_CC $ac_arg"
6503 if ac_fn_c_try_compile "$LINENO"; then :
6504 ac_cv_prog_cc_c89=$ac_arg
6505fi
6506rm -f core conftest.err conftest.$ac_objext
6507 test "x$ac_cv_prog_cc_c89" != "xno" && break
6508done
6509rm -f conftest.$ac_ext
6510CC=$ac_save_CC
c971b7fa 6511
5e8754f9
SDJ
6512fi
6513# AC_CACHE_VAL
6514case "x$ac_cv_prog_cc_c89" in
6515 x)
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6517$as_echo "none needed" >&6; } ;;
6518 xno)
6519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6520$as_echo "unsupported" >&6; } ;;
6521 *)
6522 CC="$CC $ac_cv_prog_cc_c89"
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6524$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6525esac
6526if test "x$ac_cv_prog_cc_c89" != xno; then :
c971b7fa 6527
5e8754f9 6528fi
c971b7fa 6529
5e8754f9
SDJ
6530ac_ext=c
6531ac_cpp='$CPP $CPPFLAGS'
6532ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6533ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6534ac_compiler_gnu=$ac_cv_c_compiler_gnu
d0ac1c44 6535
5e8754f9
SDJ
6536ac_ext=c
6537ac_cpp='$CPP $CPPFLAGS'
6538ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6539ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6540ac_compiler_gnu=$ac_cv_c_compiler_gnu
6541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6542$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
6543if ${am_cv_prog_cc_c_o+:} false; then :
6544 $as_echo_n "(cached) " >&6
6545else
6546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6547/* end confdefs.h. */
d0ac1c44 6548
5e8754f9
SDJ
6549int
6550main ()
6551{
d0ac1c44 6552
5e8754f9
SDJ
6553 ;
6554 return 0;
6555}
6556_ACEOF
6557 # Make sure it works both with $CC and with simple cc.
6558 # Following AC_PROG_CC_C_O, we do the test twice because some
6559 # compilers refuse to overwrite an existing .o file with -o,
6560 # though they will create one.
6561 am_cv_prog_cc_c_o=yes
6562 for am_i in 1 2; do
6563 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6564 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6565 ac_status=$?
6566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6567 (exit $ac_status); } \
6568 && test -f conftest2.$ac_objext; then
6569 : OK
6570 else
6571 am_cv_prog_cc_c_o=no
6572 break
6573 fi
6574 done
6575 rm -f core conftest*
6576 unset am_i
6577fi
6578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6579$as_echo "$am_cv_prog_cc_c_o" >&6; }
6580if test "$am_cv_prog_cc_c_o" != yes; then
6581 # Losing compiler, so override with the script.
6582 # FIXME: It is wrong to rewrite CC.
6583 # But if we don't then we get into trouble of one sort or another.
6584 # A longer-term fix would be to have automake use am__CC in this case,
6585 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6586 CC="$am_aux_dir/compile $CC"
6587fi
6588ac_ext=c
6589ac_cpp='$CPP $CPPFLAGS'
6590ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6591ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6592ac_compiler_gnu=$ac_cv_c_compiler_gnu
d0ac1c44 6593
7a6dbc2f 6594
5e8754f9 6595am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
7a6dbc2f
SDJ
6596
6597
5e8754f9
SDJ
6598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6599$as_echo_n "checking target system type... " >&6; }
6600if ${ac_cv_target+:} false; then :
c971b7fa
PA
6601 $as_echo_n "(cached) " >&6
6602else
5e8754f9
SDJ
6603 if test "x$target_alias" = x; then
6604 ac_cv_target=$ac_cv_host
6605else
6606 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6607 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
c971b7fa 6608fi
c971b7fa 6609
5e8754f9
SDJ
6610fi
6611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6612$as_echo "$ac_cv_target" >&6; }
6613case $ac_cv_target in
6614*-*-*) ;;
6615*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6616esac
6617target=$ac_cv_target
6618ac_save_IFS=$IFS; IFS='-'
6619set x $ac_cv_target
6620shift
6621target_cpu=$1
6622target_vendor=$2
6623shift; shift
6624# Remember, the first character of IFS is used to create $*,
6625# except with old shells:
6626target_os=$*
6627IFS=$ac_save_IFS
6628case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
c971b7fa
PA
6629
6630
5e8754f9
SDJ
6631# The aliases save the names the user supplied, while $host etc.
6632# will get canonicalized.
6633test -n "$target_alias" &&
6634 test "$program_prefix$program_suffix$program_transform_name" = \
6635 NONENONEs,x,x, &&
6636 program_prefix=${target_alias}-
7a6dbc2f 6637
73cc7272
TT
6638# The tests for host and target for $enable_largefile require
6639# canonical names.
6640
6641
6642
6643# As the $enable_largefile decision depends on --enable-plugins we must set it
6644# even in directories otherwise not depending on the $plugins option.
6645
6646
6647 maybe_plugins=no
6648 for ac_header in dlfcn.h
6649do :
6650 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
6651"
6652if test "x$ac_cv_header_dlfcn_h" = xyes; then :
6653 cat >>confdefs.h <<_ACEOF
6654#define HAVE_DLFCN_H 1
6655_ACEOF
6656 maybe_plugins=yes
6657fi
6658
6659done
6660
6661 for ac_header in windows.h
6662do :
6663 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
6664"
6665if test "x$ac_cv_header_windows_h" = xyes; then :
6666 cat >>confdefs.h <<_ACEOF
6667#define HAVE_WINDOWS_H 1
6668_ACEOF
6669 maybe_plugins=yes
6670fi
6671
6672done
6673
6674
6675 # Check whether --enable-plugins was given.
6676if test "${enable_plugins+set}" = set; then :
6677 enableval=$enable_plugins; case "${enableval}" in
6678 no) plugins=no ;;
6679 *) plugins=yes
6680 if test "$maybe_plugins" != "yes" ; then
6681 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
6682 fi ;;
6683 esac
6684else
6685 plugins=$maybe_plugins
6686
6687fi
6688
6689 if test "$plugins" = "yes"; then
6690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
6691$as_echo_n "checking for library containing dlsym... " >&6; }
6692if ${ac_cv_search_dlsym+:} false; then :
6693 $as_echo_n "(cached) " >&6
6694else
6695 ac_func_search_save_LIBS=$LIBS
6696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6697/* end confdefs.h. */
6698
6699/* Override any GCC internal prototype to avoid an error.
6700 Use char because int might match the return type of a GCC
6701 builtin and then its argument prototype would still apply. */
6702#ifdef __cplusplus
6703extern "C"
6704#endif
6705char dlsym ();
6706int
6707main ()
6708{
6709return dlsym ();
6710 ;
6711 return 0;
6712}
6713_ACEOF
6714for ac_lib in '' dl; do
6715 if test -z "$ac_lib"; then
6716 ac_res="none required"
6717 else
6718 ac_res=-l$ac_lib
6719 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6720 fi
6721 if ac_fn_c_try_link "$LINENO"; then :
6722 ac_cv_search_dlsym=$ac_res
6723fi
6724rm -f core conftest.err conftest.$ac_objext \
6725 conftest$ac_exeext
6726 if ${ac_cv_search_dlsym+:} false; then :
6727 break
6728fi
6729done
6730if ${ac_cv_search_dlsym+:} false; then :
6731
6732else
6733 ac_cv_search_dlsym=no
6734fi
6735rm conftest.$ac_ext
6736LIBS=$ac_func_search_save_LIBS
6737fi
6738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
6739$as_echo "$ac_cv_search_dlsym" >&6; }
6740ac_res=$ac_cv_search_dlsym
6741if test "$ac_res" != no; then :
6742 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6743
6744fi
6745
6746 fi
6747
6748
6749case "${host}" in
6750 sparc-*-solaris*|i[3-7]86-*-solaris*)
6751 # On native 32bit sparc and ia32 solaris, large-file and procfs support
6752 # are mutually exclusive; and without procfs support, the bfd/ elf module
6753 # cannot provide certain routines such as elfcore_write_prpsinfo
6754 # or elfcore_write_prstatus. So unless the user explicitly requested
6755 # large-file support through the --enable-largefile switch, disable
6756 # large-file support in favor of procfs support.
6757 test "${target}" = "${host}" -a "x$plugins" = xno \
6758 && : ${enable_largefile="no"}
6759 ;;
6760esac
6761
6762# Check whether --enable-largefile was given.
6763if test "${enable_largefile+set}" = set; then :
6764 enableval=$enable_largefile;
6765fi
6766
6767if test "$enable_largefile" != no; then
6768
6769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6770$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6771if ${ac_cv_sys_largefile_CC+:} false; then :
6772 $as_echo_n "(cached) " >&6
6773else
6774 ac_cv_sys_largefile_CC=no
6775 if test "$GCC" != yes; then
6776 ac_save_CC=$CC
6777 while :; do
6778 # IRIX 6.2 and later do not support large files by default,
6779 # so use the C compiler's -n32 option if that helps.
6780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6781/* end confdefs.h. */
6782#include <sys/types.h>
6783 /* Check that off_t can represent 2**63 - 1 correctly.
6784 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6785 since some C++ compilers masquerading as C compilers
6786 incorrectly reject 9223372036854775807. */
6787#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6788 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6789 && LARGE_OFF_T % 2147483647 == 1)
6790 ? 1 : -1];
6791int
6792main ()
6793{
6794
6795 ;
6796 return 0;
6797}
6798_ACEOF
6799 if ac_fn_c_try_compile "$LINENO"; then :
6800 break
6801fi
6802rm -f core conftest.err conftest.$ac_objext
6803 CC="$CC -n32"
6804 if ac_fn_c_try_compile "$LINENO"; then :
6805 ac_cv_sys_largefile_CC=' -n32'; break
6806fi
6807rm -f core conftest.err conftest.$ac_objext
6808 break
6809 done
6810 CC=$ac_save_CC
6811 rm -f conftest.$ac_ext
6812 fi
6813fi
6814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6815$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6816 if test "$ac_cv_sys_largefile_CC" != no; then
6817 CC=$CC$ac_cv_sys_largefile_CC
6818 fi
6819
6820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6821$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6822if ${ac_cv_sys_file_offset_bits+:} false; then :
6823 $as_echo_n "(cached) " >&6
6824else
6825 while :; do
6826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6827/* end confdefs.h. */
6828#include <sys/types.h>
6829 /* Check that off_t can represent 2**63 - 1 correctly.
6830 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6831 since some C++ compilers masquerading as C compilers
6832 incorrectly reject 9223372036854775807. */
6833#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6834 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6835 && LARGE_OFF_T % 2147483647 == 1)
6836 ? 1 : -1];
6837int
6838main ()
6839{
6840
6841 ;
6842 return 0;
6843}
6844_ACEOF
6845if ac_fn_c_try_compile "$LINENO"; then :
6846 ac_cv_sys_file_offset_bits=no; break
6847fi
6848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6850/* end confdefs.h. */
6851#define _FILE_OFFSET_BITS 64
6852#include <sys/types.h>
6853 /* Check that off_t can represent 2**63 - 1 correctly.
6854 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6855 since some C++ compilers masquerading as C compilers
6856 incorrectly reject 9223372036854775807. */
6857#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6858 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6859 && LARGE_OFF_T % 2147483647 == 1)
6860 ? 1 : -1];
6861int
6862main ()
6863{
6864
6865 ;
6866 return 0;
6867}
6868_ACEOF
6869if ac_fn_c_try_compile "$LINENO"; then :
6870 ac_cv_sys_file_offset_bits=64; break
6871fi
6872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6873 ac_cv_sys_file_offset_bits=unknown
6874 break
6875done
6876fi
6877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6878$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6879case $ac_cv_sys_file_offset_bits in #(
6880 no | unknown) ;;
6881 *)
6882cat >>confdefs.h <<_ACEOF
6883#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6884_ACEOF
6885;;
6886esac
6887rm -rf conftest*
6888 if test $ac_cv_sys_file_offset_bits = unknown; then
6889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6890$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6891if ${ac_cv_sys_large_files+:} false; then :
6892 $as_echo_n "(cached) " >&6
6893else
6894 while :; do
6895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6896/* end confdefs.h. */
6897#include <sys/types.h>
6898 /* Check that off_t can represent 2**63 - 1 correctly.
6899 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6900 since some C++ compilers masquerading as C compilers
6901 incorrectly reject 9223372036854775807. */
6902#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6903 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6904 && LARGE_OFF_T % 2147483647 == 1)
6905 ? 1 : -1];
6906int
6907main ()
6908{
6909
6910 ;
6911 return 0;
6912}
6913_ACEOF
6914if ac_fn_c_try_compile "$LINENO"; then :
6915 ac_cv_sys_large_files=no; break
6916fi
6917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6919/* end confdefs.h. */
6920#define _LARGE_FILES 1
6921#include <sys/types.h>
6922 /* Check that off_t can represent 2**63 - 1 correctly.
6923 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6924 since some C++ compilers masquerading as C compilers
6925 incorrectly reject 9223372036854775807. */
6926#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6927 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6928 && LARGE_OFF_T % 2147483647 == 1)
6929 ? 1 : -1];
6930int
6931main ()
6932{
6933
6934 ;
6935 return 0;
6936}
6937_ACEOF
6938if ac_fn_c_try_compile "$LINENO"; then :
6939 ac_cv_sys_large_files=1; break
6940fi
6941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6942 ac_cv_sys_large_files=unknown
6943 break
6944done
6945fi
6946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6947$as_echo "$ac_cv_sys_large_files" >&6; }
6948case $ac_cv_sys_large_files in #(
6949 no | unknown) ;;
6950 *)
6951cat >>confdefs.h <<_ACEOF
6952#define _LARGE_FILES $ac_cv_sys_large_files
6953_ACEOF
6954;;
6955esac
6956rm -rf conftest*
6957 fi
6958
6959
6960$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6961
6962fi
6963
6964
6965
6966ac_aux_dir=
6967for ac_dir in .. "$srcdir"/..; do
6968 if test -f "$ac_dir/install-sh"; then
6969 ac_aux_dir=$ac_dir
6970 ac_install_sh="$ac_aux_dir/install-sh -c"
6971 break
6972 elif test -f "$ac_dir/install.sh"; then
6973 ac_aux_dir=$ac_dir
6974 ac_install_sh="$ac_aux_dir/install.sh -c"
6975 break
6976 elif test -f "$ac_dir/shtool"; then
6977 ac_aux_dir=$ac_dir
6978 ac_install_sh="$ac_aux_dir/shtool install -c"
6979 break
6980 fi
6981done
6982if test -z "$ac_aux_dir"; then
6983 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
6984fi
6985
6986# These three variables are undocumented and unsupported,
6987# and are intended to be withdrawn in a future Autoconf release.
6988# They can cause serious problems if a builder's source tree is in a directory
6989# whose full name contains unusual characters.
6990ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6991ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6992ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6993
6994
6995
7a6dbc2f
SDJ
6996
6997
6998
6999
7000
7001
5e8754f9
SDJ
7002 LIBC_FATAL_STDERR_=1
7003 export LIBC_FATAL_STDERR_
7a6dbc2f 7004
5e8754f9
SDJ
7005ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7006if test "x$ac_cv_type_size_t" = xyes; then :
7a6dbc2f 7007
5e8754f9 7008else
7a6dbc2f 7009
5e8754f9
SDJ
7010cat >>confdefs.h <<_ACEOF
7011#define size_t unsigned int
7012_ACEOF
7a6dbc2f 7013
5e8754f9 7014fi
7a6dbc2f 7015
5e8754f9
SDJ
7016# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7017# for constant arguments. Useless!
7018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7019$as_echo_n "checking for working alloca.h... " >&6; }
7020if ${ac_cv_working_alloca_h+:} false; then :
c971b7fa 7021 $as_echo_n "(cached) " >&6
7a6dbc2f 7022else
5e8754f9
SDJ
7023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7024/* end confdefs.h. */
7025#include <alloca.h>
7026int
7027main ()
7028{
7029char *p = (char *) alloca (2 * sizeof (int));
7030 if (p) return 0;
7031 ;
7032 return 0;
7033}
7034_ACEOF
7035if ac_fn_c_try_link "$LINENO"; then :
7036 ac_cv_working_alloca_h=yes
7037else
7038 ac_cv_working_alloca_h=no
7039fi
7040rm -f core conftest.err conftest.$ac_objext \
7041 conftest$ac_exeext conftest.$ac_ext
7042fi
7043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7044$as_echo "$ac_cv_working_alloca_h" >&6; }
7045if test $ac_cv_working_alloca_h = yes; then
7a6dbc2f 7046
5e8754f9
SDJ
7047$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7048
7049fi
7a6dbc2f 7050
5e8754f9
SDJ
7051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7052$as_echo_n "checking for alloca... " >&6; }
7053if ${ac_cv_func_alloca_works+:} false; then :
7054 $as_echo_n "(cached) " >&6
c971b7fa
PA
7055else
7056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7057/* end confdefs.h. */
5e8754f9
SDJ
7058#ifdef __GNUC__
7059# define alloca __builtin_alloca
7060#else
7061# ifdef _MSC_VER
7062# include <malloc.h>
7063# define alloca _alloca
7064# else
7065# ifdef HAVE_ALLOCA_H
7066# include <alloca.h>
7067# else
7068# ifdef _AIX
7069 #pragma alloca
7070# else
7071# ifndef alloca /* predefined by HP cc +Olibcalls */
7072void *alloca (size_t);
7073# endif
7074# endif
7075# endif
7076# endif
7077#endif
7a6dbc2f 7078
5e8754f9
SDJ
7079int
7080main ()
7a6dbc2f 7081{
5e8754f9
SDJ
7082char *p = (char *) alloca (1);
7083 if (p) return 0;
7084 ;
7085 return 0;
7a6dbc2f 7086}
c971b7fa 7087_ACEOF
5e8754f9
SDJ
7088if ac_fn_c_try_link "$LINENO"; then :
7089 ac_cv_func_alloca_works=yes
c971b7fa 7090else
5e8754f9 7091 ac_cv_func_alloca_works=no
7a6dbc2f 7092fi
5e8754f9
SDJ
7093rm -f core conftest.err conftest.$ac_objext \
7094 conftest$ac_exeext conftest.$ac_ext
c0fc7f8b 7095fi
5e8754f9
SDJ
7096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7097$as_echo "$ac_cv_func_alloca_works" >&6; }
98399780 7098
5e8754f9 7099if test $ac_cv_func_alloca_works = yes; then
98399780 7100
5e8754f9 7101$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
472fa5ee 7102
5e8754f9
SDJ
7103else
7104 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7105# that cause trouble. Some versions do not even contain alloca or
7106# contain a buggy version. If you still want to use their alloca,
7107# use ar to extract alloca.o from them instead of compiling alloca.c.
472fa5ee
SM
7108
7109
7110
7111
7112
5e8754f9 7113ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
472fa5ee 7114
5e8754f9 7115$as_echo "#define C_ALLOCA 1" >>confdefs.h
472fa5ee
SM
7116
7117
5e8754f9
SDJ
7118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7119$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7120if ${ac_cv_os_cray+:} false; then :
7121 $as_echo_n "(cached) " >&6
7122else
7123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7124/* end confdefs.h. */
7125#if defined CRAY && ! defined CRAY2
7126webecray
7127#else
7128wenotbecray
7129#endif
472fa5ee 7130
5e8754f9
SDJ
7131_ACEOF
7132if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7133 $EGREP "webecray" >/dev/null 2>&1; then :
7134 ac_cv_os_cray=yes
7135else
7136 ac_cv_os_cray=no
7137fi
7138rm -f conftest*
472fa5ee 7139
5e8754f9
SDJ
7140fi
7141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7142$as_echo "$ac_cv_os_cray" >&6; }
7143if test $ac_cv_os_cray = yes; then
7144 for ac_func in _getb67 GETB67 getb67; do
7145 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7146ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7147if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
472fa5ee 7148
5e8754f9
SDJ
7149cat >>confdefs.h <<_ACEOF
7150#define CRAY_STACKSEG_END $ac_func
7151_ACEOF
472fa5ee 7152
5e8754f9
SDJ
7153 break
7154fi
472fa5ee 7155
5e8754f9
SDJ
7156 done
7157fi
472fa5ee 7158
5e8754f9
SDJ
7159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7160$as_echo_n "checking stack direction for C alloca... " >&6; }
7161if ${ac_cv_c_stack_direction+:} false; then :
7162 $as_echo_n "(cached) " >&6
7163else
7164 if test "$cross_compiling" = yes; then :
7165 ac_cv_c_stack_direction=0
7166else
7167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7168/* end confdefs.h. */
7169$ac_includes_default
7170int
7171find_stack_direction (int *addr, int depth)
7172{
7173 int dir, dummy = 0;
7174 if (! addr)
7175 addr = &dummy;
7176 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7177 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7178 return dir + dummy;
7179}
472fa5ee 7180
5e8754f9
SDJ
7181int
7182main (int argc, char **argv)
7183{
7184 return find_stack_direction (0, argc + !argv + 20) < 0;
7185}
7186_ACEOF
7187if ac_fn_c_try_run "$LINENO"; then :
7188 ac_cv_c_stack_direction=1
7189else
7190 ac_cv_c_stack_direction=-1
7191fi
7192rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7193 conftest.$ac_objext conftest.beam conftest.$ac_ext
7194fi
472fa5ee 7195
5e8754f9
SDJ
7196fi
7197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7198$as_echo "$ac_cv_c_stack_direction" >&6; }
7199cat >>confdefs.h <<_ACEOF
7200#define STACK_DIRECTION $ac_cv_c_stack_direction
7201_ACEOF
472fa5ee 7202
98399780 7203
5e8754f9 7204fi
98399780
YQ
7205
7206
725e2999
JB
7207 GNULIB_INET_NTOP=0;
7208 GNULIB_INET_PTON=0;
7209 HAVE_DECL_INET_NTOP=1;
7210 HAVE_DECL_INET_PTON=1;
7211 REPLACE_INET_NTOP=0;
7212 REPLACE_INET_PTON=0;
7213
7214
7215
7216
7217
7218 for ac_header in $gl_header_list
7219do :
7220 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7221ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7222if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7223 cat >>confdefs.h <<_ACEOF
7224#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7225_ACEOF
7226
7227fi
7228
7229done
7230
7231
7232
7233
7234
7235
7236
7237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7238$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7239if ${gl_cv_have_include_next+:} false; then :
7240 $as_echo_n "(cached) " >&6
7241else
7242 rm -rf conftestd1a conftestd1b conftestd2
7243 mkdir conftestd1a conftestd1b conftestd2
7244 cat <<EOF > conftestd1a/conftest.h
7245#define DEFINED_IN_CONFTESTD1
7246#include_next <conftest.h>
7247#ifdef DEFINED_IN_CONFTESTD2
7248int foo;
7249#else
7250#error "include_next doesn't work"
7251#endif
7252EOF
7253 cat <<EOF > conftestd1b/conftest.h
7254#define DEFINED_IN_CONFTESTD1
7255#include <stdio.h>
7256#include_next <conftest.h>
7257#ifdef DEFINED_IN_CONFTESTD2
7258int foo;
7259#else
7260#error "include_next doesn't work"
7261#endif
7262EOF
7263 cat <<EOF > conftestd2/conftest.h
7264#ifndef DEFINED_IN_CONFTESTD1
7265#error "include_next test doesn't work"
7266#endif
7267#define DEFINED_IN_CONFTESTD2
7268EOF
7269 gl_save_CPPFLAGS="$CPPFLAGS"
7270 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7272/* end confdefs.h. */
7273#include <conftest.h>
7274_ACEOF
7275if ac_fn_c_try_compile "$LINENO"; then :
7276 gl_cv_have_include_next=yes
7277else
7278 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7280/* end confdefs.h. */
7281#include <conftest.h>
7282_ACEOF
7283if ac_fn_c_try_compile "$LINENO"; then :
7284 gl_cv_have_include_next=buggy
7285else
7286 gl_cv_have_include_next=no
7287fi
7288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7289
7290fi
7291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7292 CPPFLAGS="$gl_save_CPPFLAGS"
7293 rm -rf conftestd1a conftestd1b conftestd2
7294
7295fi
7296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7297$as_echo "$gl_cv_have_include_next" >&6; }
7298 PRAGMA_SYSTEM_HEADER=
7299 if test $gl_cv_have_include_next = yes; then
7300 INCLUDE_NEXT=include_next
7301 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7302 if test -n "$GCC"; then
7303 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7304 fi
7305 else
7306 if test $gl_cv_have_include_next = buggy; then
7307 INCLUDE_NEXT=include
7308 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7309 else
7310 INCLUDE_NEXT=include
7311 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7312 fi
7313 fi
7314
7315
7316
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7318$as_echo_n "checking whether system header files limit the line length... " >&6; }
7319if ${gl_cv_pragma_columns+:} false; then :
7320 $as_echo_n "(cached) " >&6
7321else
7322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7323/* end confdefs.h. */
7324
7325#ifdef __TANDEM
7326choke me
7327#endif
7328
7329_ACEOF
7330if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7331 $EGREP "choke me" >/dev/null 2>&1; then :
7332 gl_cv_pragma_columns=yes
7333else
7334 gl_cv_pragma_columns=no
7335fi
7336rm -f conftest*
7337
7338
7339fi
7340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7341$as_echo "$gl_cv_pragma_columns" >&6; }
7342 if test $gl_cv_pragma_columns = yes; then
7343 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7344 else
7345 PRAGMA_COLUMNS=
7346 fi
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356 :
7357
7358
7359
7360
7361
7362 if test $ac_cv_header_features_h = yes; then
7363 HAVE_FEATURES_H=1
7364 else
7365 HAVE_FEATURES_H=0
7366 fi
7367
7368
7369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7370$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7371if test -z "$MKDIR_P"; then
7372 if ${ac_cv_path_mkdir+:} false; then :
7373 $as_echo_n "(cached) " >&6
7374else
7375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7376for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7377do
7378 IFS=$as_save_IFS
7379 test -z "$as_dir" && as_dir=.
7380 for ac_prog in mkdir gmkdir; do
7381 for ac_exec_ext in '' $ac_executable_extensions; do
7382 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7383 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7384 'mkdir (GNU coreutils) '* | \
7385 'mkdir (coreutils) '* | \
7386 'mkdir (fileutils) '4.1*)
7387 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7388 break 3;;
7389 esac
7390 done
7391 done
7392 done
7393IFS=$as_save_IFS
7394
7395fi
7396
7397 test -d ./--version && rmdir ./--version
7398 if test "${ac_cv_path_mkdir+set}" = set; then
7399 MKDIR_P="$ac_cv_path_mkdir -p"
7400 else
7401 # As a last resort, use the slow shell script. Don't cache a
7402 # value for MKDIR_P within a source directory, because that will
7403 # break other packages using the cache if that directory is
7404 # removed, or if the value is a relative name.
7405 MKDIR_P="$ac_install_sh -d"
7406 fi
7407fi
7408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7409$as_echo "$MKDIR_P" >&6; }
7410
7411
5e8754f9
SDJ
7412 GNULIB__EXIT=0;
7413 GNULIB_ATOLL=0;
7414 GNULIB_CALLOC_POSIX=0;
7415 GNULIB_CANONICALIZE_FILE_NAME=0;
7416 GNULIB_GETLOADAVG=0;
7417 GNULIB_GETSUBOPT=0;
7418 GNULIB_GRANTPT=0;
7419 GNULIB_MALLOC_POSIX=0;
7420 GNULIB_MBTOWC=0;
7421 GNULIB_MKDTEMP=0;
7422 GNULIB_MKOSTEMP=0;
7423 GNULIB_MKOSTEMPS=0;
7424 GNULIB_MKSTEMP=0;
7425 GNULIB_MKSTEMPS=0;
7426 GNULIB_POSIX_OPENPT=0;
7427 GNULIB_PTSNAME=0;
7428 GNULIB_PTSNAME_R=0;
7429 GNULIB_PUTENV=0;
7430 GNULIB_QSORT_R=0;
7431 GNULIB_RANDOM=0;
7432 GNULIB_RANDOM_R=0;
7433 GNULIB_REALLOC_POSIX=0;
7434 GNULIB_REALPATH=0;
7435 GNULIB_RPMATCH=0;
7436 GNULIB_SECURE_GETENV=0;
7437 GNULIB_SETENV=0;
7438 GNULIB_STRTOD=0;
7439 GNULIB_STRTOLL=0;
7440 GNULIB_STRTOULL=0;
7441 GNULIB_SYSTEM_POSIX=0;
7442 GNULIB_UNLOCKPT=0;
7443 GNULIB_UNSETENV=0;
7444 GNULIB_WCTOMB=0;
7445 HAVE__EXIT=1;
7446 HAVE_ATOLL=1;
7447 HAVE_CANONICALIZE_FILE_NAME=1;
7448 HAVE_DECL_GETLOADAVG=1;
7449 HAVE_GETSUBOPT=1;
7450 HAVE_GRANTPT=1;
7451 HAVE_MKDTEMP=1;
7452 HAVE_MKOSTEMP=1;
7453 HAVE_MKOSTEMPS=1;
7454 HAVE_MKSTEMP=1;
7455 HAVE_MKSTEMPS=1;
7456 HAVE_POSIX_OPENPT=1;
7457 HAVE_PTSNAME=1;
7458 HAVE_PTSNAME_R=1;
7459 HAVE_QSORT_R=1;
7460 HAVE_RANDOM=1;
7461 HAVE_RANDOM_H=1;
7462 HAVE_RANDOM_R=1;
7463 HAVE_REALPATH=1;
7464 HAVE_RPMATCH=1;
7465 HAVE_SECURE_GETENV=1;
7466 HAVE_SETENV=1;
7467 HAVE_DECL_SETENV=1;
7468 HAVE_STRTOD=1;
7469 HAVE_STRTOLL=1;
7470 HAVE_STRTOULL=1;
7471 HAVE_STRUCT_RANDOM_DATA=1;
7472 HAVE_SYS_LOADAVG_H=0;
7473 HAVE_UNLOCKPT=1;
7474 HAVE_DECL_UNSETENV=1;
7475 REPLACE_CALLOC=0;
7476 REPLACE_CANONICALIZE_FILE_NAME=0;
7477 REPLACE_MALLOC=0;
7478 REPLACE_MBTOWC=0;
7479 REPLACE_MKSTEMP=0;
7480 REPLACE_PTSNAME=0;
7481 REPLACE_PTSNAME_R=0;
7482 REPLACE_PUTENV=0;
7483 REPLACE_QSORT_R=0;
7484 REPLACE_RANDOM_R=0;
7485 REPLACE_REALLOC=0;
7486 REPLACE_REALPATH=0;
7487 REPLACE_SETENV=0;
7488 REPLACE_STRTOD=0;
7489 REPLACE_UNSETENV=0;
7490 REPLACE_WCTOMB=0;
6ec2e0f5
SDJ
7491
7492
7493
7494
472fa5ee 7495
5e8754f9
SDJ
7496 for ac_func in $gl_func_list
7497do :
7498 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7499ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7500if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7501 cat >>confdefs.h <<_ACEOF
7502#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7503_ACEOF
472fa5ee 7504
5e8754f9
SDJ
7505fi
7506done
472fa5ee
SM
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
472fa5ee
SM
7521
7522
7523
5e8754f9
SDJ
7524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7525$as_echo_n "checking whether // is distinct from /... " >&6; }
7526if ${gl_cv_double_slash_root+:} false; then :
7527 $as_echo_n "(cached) " >&6
7528else
7529 if test x"$cross_compiling" = xyes ; then
7530 # When cross-compiling, there is no way to tell whether // is special
7531 # short of a list of hosts. However, the only known hosts to date
7532 # that have a distinct // are Apollo DomainOS (too old to port to),
7533 # Cygwin, and z/OS. If anyone knows of another system for which // has
7534 # special semantics and is distinct from /, please report it to
7535 # <bug-gnulib@gnu.org>.
7536 case $host in
7537 *-cygwin | i370-ibm-openedition)
7538 gl_cv_double_slash_root=yes ;;
7539 *)
7540 # Be optimistic and assume that / and // are the same when we
7541 # don't know.
7542 gl_cv_double_slash_root='unknown, assuming no' ;;
7543 esac
7544 else
7545 set x `ls -di / // 2>/dev/null`
7546 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7547 gl_cv_double_slash_root=no
7548 else
7549 gl_cv_double_slash_root=yes
7550 fi
7551 fi
7552fi
7553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7554$as_echo "$gl_cv_double_slash_root" >&6; }
7555 if test "$gl_cv_double_slash_root" = yes; then
6ec2e0f5 7556
5e8754f9 7557$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6ec2e0f5 7558
5e8754f9 7559 fi
6ec2e0f5 7560
6ec2e0f5 7561
6ec2e0f5
SDJ
7562
7563
7564
7565
7566
7567
5e8754f9 7568 :
6ec2e0f5 7569
472fa5ee
SM
7570
7571
7572
7573
5e8754f9
SDJ
7574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
7575$as_echo_n "checking whether realpath works... " >&6; }
7576if ${gl_cv_func_realpath_works+:} false; then :
7577 $as_echo_n "(cached) " >&6
7578else
472fa5ee 7579
5e8754f9
SDJ
7580 touch conftest.a
7581 mkdir conftest.d
7582 if test "$cross_compiling" = yes; then :
7583 case "$host_os" in
7584 # Guess yes on glibc systems.
7585 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
7586 # If we don't know, assume the worst.
7587 *) gl_cv_func_realpath_works="guessing no" ;;
7588 esac
472fa5ee 7589
5e8754f9
SDJ
7590else
7591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7592/* end confdefs.h. */
e26b6bb0
TT
7593
7594
7595
5e8754f9
SDJ
7596#include <stdlib.h>
7597#if defined __MACH__ && defined __APPLE__
7598/* Avoid a crash on Mac OS X. */
7599#include <mach/mach.h>
7600#include <mach/mach_error.h>
7601#include <mach/thread_status.h>
7602#include <mach/exception.h>
7603#include <mach/task.h>
7604#include <pthread.h>
7605/* The exception port on which our thread listens. */
7606static mach_port_t our_exception_port;
7607/* The main function of the thread listening for exceptions of type
7608 EXC_BAD_ACCESS. */
7609static void *
7610mach_exception_thread (void *arg)
7611{
7612 /* Buffer for a message to be received. */
7613 struct {
7614 mach_msg_header_t head;
7615 mach_msg_body_t msgh_body;
7616 char data[1024];
7617 } msg;
7618 mach_msg_return_t retval;
7619 /* Wait for a message on the exception port. */
7620 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
7621 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
7622 if (retval != MACH_MSG_SUCCESS)
7623 abort ();
7624 exit (1);
7625}
7626static void
7627nocrash_init (void)
7628{
7629 mach_port_t self = mach_task_self ();
7630 /* Allocate a port on which the thread shall listen for exceptions. */
7631 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
7632 == KERN_SUCCESS) {
7633 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
7634 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
7635 MACH_MSG_TYPE_MAKE_SEND)
7636 == KERN_SUCCESS) {
7637 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
7638 for us. */
7639 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
7640 /* Create the thread listening on the exception port. */
7641 pthread_attr_t attr;
7642 pthread_t thread;
7643 if (pthread_attr_init (&attr) == 0
7644 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
7645 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
7646 pthread_attr_destroy (&attr);
7647 /* Replace the exception port info for these exceptions with our own.
7648 Note that we replace the exception port for the entire task, not only
7649 for a particular thread. This has the effect that when our exception
7650 port gets the message, the thread specific exception port has already
7651 been asked, and we don't need to bother about it.
7652 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
7653 task_set_exception_ports (self, mask, our_exception_port,
7654 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
7655 }
7656 }
7657 }
7658}
7659#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7660/* Avoid a crash on native Windows. */
7661#define WIN32_LEAN_AND_MEAN
7662#include <windows.h>
7663#include <winerror.h>
7664static LONG WINAPI
7665exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
7666{
7667 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
7668 {
7669 case EXCEPTION_ACCESS_VIOLATION:
7670 case EXCEPTION_IN_PAGE_ERROR:
7671 case EXCEPTION_STACK_OVERFLOW:
7672 case EXCEPTION_GUARD_PAGE:
7673 case EXCEPTION_PRIV_INSTRUCTION:
7674 case EXCEPTION_ILLEGAL_INSTRUCTION:
7675 case EXCEPTION_DATATYPE_MISALIGNMENT:
7676 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
7677 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
7678 exit (1);
7679 }
7680 return EXCEPTION_CONTINUE_SEARCH;
7681}
7682static void
7683nocrash_init (void)
7684{
7685 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
7686}
e26b6bb0 7687#else
5e8754f9
SDJ
7688/* Avoid a crash on POSIX systems. */
7689#include <signal.h>
7690#include <unistd.h>
7691/* A POSIX signal handler. */
7692static void
7693exception_handler (int sig)
7694{
7695 _exit (1);
7696}
7697static void
7698nocrash_init (void)
7699{
7700#ifdef SIGSEGV
7701 signal (SIGSEGV, exception_handler);
88b48903 7702#endif
5e8754f9
SDJ
7703#ifdef SIGBUS
7704 signal (SIGBUS, exception_handler);
88b48903 7705#endif
5e8754f9 7706}
88b48903 7707#endif
88b48903 7708
5e8754f9
SDJ
7709 #include <stdlib.h>
7710 #include <string.h>
88b48903 7711
5e8754f9
SDJ
7712int
7713main ()
7714{
88b48903 7715
5e8754f9
SDJ
7716 int result = 0;
7717 {
7718 char *name = realpath ("conftest.a", NULL);
7719 if (!(name && *name == '/'))
7720 result |= 1;
7721 free (name);
7722 }
7723 {
7724 char *name = realpath ("conftest.b/../conftest.a", NULL);
7725 if (name != NULL)
7726 result |= 2;
7727 free (name);
7728 }
7729 {
7730 char *name = realpath ("conftest.a/", NULL);
7731 if (name != NULL)
7732 result |= 4;
7733 free (name);
7734 }
7735 {
7736 char *name1 = realpath (".", NULL);
7737 char *name2 = realpath ("conftest.d//./..", NULL);
7738 if (! name1 || ! name2 || strcmp (name1, name2))
7739 result |= 8;
7740 free (name1);
7741 free (name2);
7742 }
7743 return result;
88b48903 7744
5e8754f9
SDJ
7745 ;
7746 return 0;
7747}
88b48903
WN
7748
7749_ACEOF
5e8754f9
SDJ
7750if ac_fn_c_try_run "$LINENO"; then :
7751 gl_cv_func_realpath_works=yes
88b48903 7752else
5e8754f9
SDJ
7753 gl_cv_func_realpath_works=no
7754fi
7755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7756 conftest.$ac_objext conftest.beam conftest.$ac_ext
88b48903 7757fi
88b48903 7758
5e8754f9 7759 rm -rf conftest.a conftest.d
88b48903
WN
7760
7761fi
5e8754f9
SDJ
7762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
7763$as_echo "$gl_cv_func_realpath_works" >&6; }
7764 case "$gl_cv_func_realpath_works" in
7765 *yes)
88b48903 7766
5e8754f9 7767$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
88b48903 7768
5e8754f9
SDJ
7769 ;;
7770 esac
88b48903
WN
7771
7772
e26b6bb0 7773
e26b6bb0 7774
3d99e817 7775
472fa5ee
SM
7776
7777
7778
7779
5e8754f9 7780 :
472fa5ee
SM
7781
7782
3d99e817 7783
3d99e817 7784
3d99e817 7785
3d99e817 7786
3d99e817 7787
3d99e817
AK
7788
7789
3d99e817
AK
7790
7791
7792
18848e28 7793
18848e28 7794
5e8754f9 7795 :
18848e28 7796
18848e28
GF
7797
7798
18848e28
GF
7799
7800
7801
7802
5e8754f9
SDJ
7803 GNULIB_CHDIR=0;
7804 GNULIB_CHOWN=0;
7805 GNULIB_CLOSE=0;
7806 GNULIB_DUP=0;
7807 GNULIB_DUP2=0;
7808 GNULIB_DUP3=0;
7809 GNULIB_ENVIRON=0;
7810 GNULIB_EUIDACCESS=0;
7811 GNULIB_FACCESSAT=0;
7812 GNULIB_FCHDIR=0;
7813 GNULIB_FCHOWNAT=0;
7814 GNULIB_FDATASYNC=0;
7815 GNULIB_FSYNC=0;
7816 GNULIB_FTRUNCATE=0;
7817 GNULIB_GETCWD=0;
7818 GNULIB_GETDOMAINNAME=0;
7819 GNULIB_GETDTABLESIZE=0;
7820 GNULIB_GETGROUPS=0;
7821 GNULIB_GETHOSTNAME=0;
7822 GNULIB_GETLOGIN=0;
7823 GNULIB_GETLOGIN_R=0;
7824 GNULIB_GETPAGESIZE=0;
7825 GNULIB_GETUSERSHELL=0;
7826 GNULIB_GROUP_MEMBER=0;
7827 GNULIB_ISATTY=0;
7828 GNULIB_LCHOWN=0;
7829 GNULIB_LINK=0;
7830 GNULIB_LINKAT=0;
7831 GNULIB_LSEEK=0;
7832 GNULIB_PIPE=0;
7833 GNULIB_PIPE2=0;
7834 GNULIB_PREAD=0;
7835 GNULIB_PWRITE=0;
7836 GNULIB_READ=0;
7837 GNULIB_READLINK=0;
7838 GNULIB_READLINKAT=0;
7839 GNULIB_RMDIR=0;
7840 GNULIB_SETHOSTNAME=0;
7841 GNULIB_SLEEP=0;
7842 GNULIB_SYMLINK=0;
7843 GNULIB_SYMLINKAT=0;
7844 GNULIB_TTYNAME_R=0;
7845 GNULIB_UNISTD_H_NONBLOCKING=0;
7846 GNULIB_UNISTD_H_SIGPIPE=0;
7847 GNULIB_UNLINK=0;
7848 GNULIB_UNLINKAT=0;
7849 GNULIB_USLEEP=0;
7850 GNULIB_WRITE=0;
7851 HAVE_CHOWN=1;
7852 HAVE_DUP2=1;
7853 HAVE_DUP3=1;
7854 HAVE_EUIDACCESS=1;
7855 HAVE_FACCESSAT=1;
7856 HAVE_FCHDIR=1;
7857 HAVE_FCHOWNAT=1;
7858 HAVE_FDATASYNC=1;
7859 HAVE_FSYNC=1;
7860 HAVE_FTRUNCATE=1;
7861 HAVE_GETDTABLESIZE=1;
7862 HAVE_GETGROUPS=1;
7863 HAVE_GETHOSTNAME=1;
7864 HAVE_GETLOGIN=1;
7865 HAVE_GETPAGESIZE=1;
7866 HAVE_GROUP_MEMBER=1;
7867 HAVE_LCHOWN=1;
7868 HAVE_LINK=1;
7869 HAVE_LINKAT=1;
7870 HAVE_PIPE=1;
7871 HAVE_PIPE2=1;
7872 HAVE_PREAD=1;
7873 HAVE_PWRITE=1;
7874 HAVE_READLINK=1;
7875 HAVE_READLINKAT=1;
7876 HAVE_SETHOSTNAME=1;
7877 HAVE_SLEEP=1;
7878 HAVE_SYMLINK=1;
7879 HAVE_SYMLINKAT=1;
7880 HAVE_UNLINKAT=1;
7881 HAVE_USLEEP=1;
7882 HAVE_DECL_ENVIRON=1;
7883 HAVE_DECL_FCHDIR=1;
7884 HAVE_DECL_FDATASYNC=1;
7885 HAVE_DECL_GETDOMAINNAME=1;
7886 HAVE_DECL_GETLOGIN_R=1;
7887 HAVE_DECL_GETPAGESIZE=1;
7888 HAVE_DECL_GETUSERSHELL=1;
7889 HAVE_DECL_SETHOSTNAME=1;
7890 HAVE_DECL_TTYNAME_R=1;
7891 HAVE_OS_H=0;
7892 HAVE_SYS_PARAM_H=0;
7893 REPLACE_CHOWN=0;
7894 REPLACE_CLOSE=0;
7895 REPLACE_DUP=0;
7896 REPLACE_DUP2=0;
7897 REPLACE_FCHOWNAT=0;
7898 REPLACE_FTRUNCATE=0;
7899 REPLACE_GETCWD=0;
7900 REPLACE_GETDOMAINNAME=0;
7901 REPLACE_GETDTABLESIZE=0;
7902 REPLACE_GETLOGIN_R=0;
7903 REPLACE_GETGROUPS=0;
7904 REPLACE_GETPAGESIZE=0;
7905 REPLACE_ISATTY=0;
7906 REPLACE_LCHOWN=0;
7907 REPLACE_LINK=0;
7908 REPLACE_LINKAT=0;
7909 REPLACE_LSEEK=0;
7910 REPLACE_PREAD=0;
7911 REPLACE_PWRITE=0;
7912 REPLACE_READ=0;
7913 REPLACE_READLINK=0;
7914 REPLACE_READLINKAT=0;
7915 REPLACE_RMDIR=0;
7916 REPLACE_SLEEP=0;
7917 REPLACE_SYMLINK=0;
7918 REPLACE_SYMLINKAT=0;
7919 REPLACE_TTYNAME_R=0;
7920 REPLACE_UNLINK=0;
7921 REPLACE_UNLINKAT=0;
7922 REPLACE_USLEEP=0;
7923 REPLACE_WRITE=0;
7924 UNISTD_H_HAVE_WINSOCK2_H=0;
7925 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
18848e28
GF
7926
7927
7928
7929
18848e28 7930
4a626d0a
PA
7931
7932
18848e28 7933
4a626d0a 7934
5e8754f9 7935 :
4a626d0a 7936
4a626d0a
PA
7937
7938
18848e28 7939
18848e28
GF
7940
7941
7942
7943
18848e28 7944
18848e28
GF
7945
7946
18848e28 7947
18848e28 7948
18848e28 7949
18848e28 7950
18848e28 7951
5e8754f9 7952 :
18848e28 7953
18848e28 7954
18848e28 7955
18848e28 7956
18848e28 7957
5e8754f9
SDJ
7958 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7959 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
18848e28 7960
5e8754f9 7961$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
18848e28 7962
5e8754f9
SDJ
7963 else
7964 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
18848e28
GF
7965 fi
7966
7967
18848e28 7968
18848e28 7969
18848e28 7970
18848e28 7971
18848e28 7972
18848e28 7973
18848e28 7974
18848e28 7975
18848e28 7976
18848e28 7977
18848e28 7978
5e8754f9
SDJ
7979 GNULIB_OPENDIR=0;
7980 GNULIB_READDIR=0;
7981 GNULIB_REWINDDIR=0;
7982 GNULIB_CLOSEDIR=0;
7983 GNULIB_DIRFD=0;
7984 GNULIB_FDOPENDIR=0;
7985 GNULIB_SCANDIR=0;
7986 GNULIB_ALPHASORT=0;
7987 HAVE_OPENDIR=1;
7988 HAVE_READDIR=1;
7989 HAVE_REWINDDIR=1;
7990 HAVE_CLOSEDIR=1;
7991 HAVE_DECL_DIRFD=1;
7992 HAVE_DECL_FDOPENDIR=1;
7993 HAVE_FDOPENDIR=1;
7994 HAVE_SCANDIR=1;
7995 HAVE_ALPHASORT=1;
7996 REPLACE_OPENDIR=0;
7997 REPLACE_CLOSEDIR=0;
7998 REPLACE_DIRFD=0;
7999 REPLACE_FDOPENDIR=0;
18848e28 8000
18848e28
GF
8001
8002
63ce7108
TT
8003
8004
8005
8006
8007
8008
8009
8010
5e8754f9 8011 :
63ce7108 8012
472fa5ee
SM
8013
8014
8015
8016
8017
472fa5ee 8018
5e8754f9
SDJ
8019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
8020$as_echo_n "checking if environ is properly declared... " >&6; }
8021 if ${gt_cv_var_environ_declaration+:} false; then :
8022 $as_echo_n "(cached) " >&6
8023else
472fa5ee 8024
5e8754f9
SDJ
8025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8026/* end confdefs.h. */
8027#if HAVE_UNISTD_H
8028 #include <unistd.h>
8029 #endif
8030 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
8031 #include <stdlib.h>
472fa5ee 8032
5e8754f9
SDJ
8033 extern struct { int foo; } environ;
8034int
8035main ()
8036{
8037environ.foo = 1;
8038 ;
8039 return 0;
8040}
8041_ACEOF
8042if ac_fn_c_try_compile "$LINENO"; then :
8043 gt_cv_var_environ_declaration=no
8044else
8045 gt_cv_var_environ_declaration=yes
8046fi
8047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8048fi
472fa5ee 8049
5e8754f9
SDJ
8050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
8051$as_echo "$gt_cv_var_environ_declaration" >&6; }
8052 if test $gt_cv_var_environ_declaration = yes; then
472fa5ee 8053
5e8754f9 8054$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
472fa5ee 8055
5e8754f9 8056 fi
472fa5ee
SM
8057
8058
5e8754f9
SDJ
8059 if test $gt_cv_var_environ_declaration != yes; then
8060 HAVE_DECL_ENVIRON=0
8061 fi
472fa5ee
SM
8062
8063
8064
5e8754f9
SDJ
8065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8066$as_echo_n "checking for complete errno.h... " >&6; }
8067if ${gl_cv_header_errno_h_complete+:} false; then :
6ec2e0f5
SDJ
8068 $as_echo_n "(cached) " >&6
8069else
7a6dbc2f 8070
5e8754f9 8071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 8072/* end confdefs.h. */
63ce7108 8073
5e8754f9
SDJ
8074#include <errno.h>
8075#if !defined ETXTBSY
8076booboo
8077#endif
8078#if !defined ENOMSG
8079booboo
8080#endif
8081#if !defined EIDRM
8082booboo
8083#endif
8084#if !defined ENOLINK
8085booboo
8086#endif
8087#if !defined EPROTO
8088booboo
8089#endif
8090#if !defined EMULTIHOP
8091booboo
8092#endif
8093#if !defined EBADMSG
8094booboo
8095#endif
8096#if !defined EOVERFLOW
8097booboo
8098#endif
8099#if !defined ENOTSUP
8100booboo
8101#endif
8102#if !defined ENETRESET
8103booboo
8104#endif
8105#if !defined ECONNABORTED
8106booboo
8107#endif
8108#if !defined ESTALE
8109booboo
8110#endif
8111#if !defined EDQUOT
8112booboo
8113#endif
8114#if !defined ECANCELED
8115booboo
8116#endif
8117#if !defined EOWNERDEAD
8118booboo
8119#endif
8120#if !defined ENOTRECOVERABLE
8121booboo
8122#endif
8123#if !defined EILSEQ
8124booboo
8125#endif
6ec2e0f5 8126
6ec2e0f5 8127_ACEOF
5e8754f9
SDJ
8128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8129 $EGREP "booboo" >/dev/null 2>&1; then :
8130 gl_cv_header_errno_h_complete=no
6ec2e0f5 8131else
5e8754f9 8132 gl_cv_header_errno_h_complete=yes
6ec2e0f5 8133fi
5e8754f9 8134rm -f conftest*
6ec2e0f5 8135
6ec2e0f5
SDJ
8136
8137fi
5e8754f9
SDJ
8138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8139$as_echo "$gl_cv_header_errno_h_complete" >&6; }
8140 if test $gl_cv_header_errno_h_complete = yes; then
8141 ERRNO_H=''
8142 else
472fa5ee
SM
8143
8144
8145
8146
8147
8148
8149
8150
7a6dbc2f 8151 if test $gl_cv_have_include_next = yes; then
5e8754f9 8152 gl_cv_next_errno_h='<'errno.h'>'
7a6dbc2f 8153 else
5e8754f9
SDJ
8154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8155$as_echo_n "checking absolute name of <errno.h>... " >&6; }
8156if ${gl_cv_next_errno_h+:} false; then :
7a6dbc2f
SDJ
8157 $as_echo_n "(cached) " >&6
8158else
472fa5ee 8159
472fa5ee
SM
8160
8161
7a6dbc2f
SDJ
8162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8163/* end confdefs.h. */
5e8754f9 8164#include <errno.h>
7a6dbc2f
SDJ
8165_ACEOF
8166 case "$host_os" in
8167 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8168 *) gl_absname_cpp="$ac_cpp" ;;
8169 esac
472fa5ee 8170
7a6dbc2f
SDJ
8171 case "$host_os" in
8172 mingw*)
8173 gl_dirsep_regex='[/\\]'
8174 ;;
8175 *)
8176 gl_dirsep_regex='\/'
8177 ;;
8178 esac
8179 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5e8754f9 8180 gl_header_literal_regex=`echo 'errno.h' \
7a6dbc2f
SDJ
8181 | sed -e "$gl_make_literal_regex_sed"`
8182 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8183 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8184 s|^/[^/]|//&|
8185 p
8186 q
8187 }'
8188
5e8754f9 8189 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7a6dbc2f
SDJ
8190 sed -n "$gl_absolute_header_sed"`
8191
5e8754f9
SDJ
8192 gl_header=$gl_cv_absolute_errno_h
8193 gl_cv_next_errno_h='"'$gl_header'"'
7a6dbc2f
SDJ
8194
8195
8196fi
5e8754f9
SDJ
8197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8198$as_echo "$gl_cv_next_errno_h" >&6; }
7a6dbc2f 8199 fi
5e8754f9 8200 NEXT_ERRNO_H=$gl_cv_next_errno_h
7a6dbc2f
SDJ
8201
8202 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8203 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5e8754f9 8204 gl_next_as_first_directive='<'errno.h'>'
7a6dbc2f
SDJ
8205 else
8206 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5e8754f9 8207 gl_next_as_first_directive=$gl_cv_next_errno_h
7a6dbc2f 8208 fi
5e8754f9 8209 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7a6dbc2f
SDJ
8210
8211
8212
8213
5e8754f9 8214 ERRNO_H='errno.h'
7a6dbc2f
SDJ
8215 fi
8216
5e8754f9
SDJ
8217 if test -n "$ERRNO_H"; then
8218 GL_GENERATE_ERRNO_H_TRUE=
8219 GL_GENERATE_ERRNO_H_FALSE='#'
7a6dbc2f 8220else
5e8754f9
SDJ
8221 GL_GENERATE_ERRNO_H_TRUE='#'
8222 GL_GENERATE_ERRNO_H_FALSE=
7a6dbc2f
SDJ
8223fi
8224
8225
5e8754f9
SDJ
8226 if test -n "$ERRNO_H"; then
8227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8228$as_echo_n "checking for EMULTIHOP value... " >&6; }
8229if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
8230 $as_echo_n "(cached) " >&6
8231else
7a6dbc2f 8232
5e8754f9
SDJ
8233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8234/* end confdefs.h. */
7a6dbc2f 8235
5e8754f9
SDJ
8236#include <errno.h>
8237#ifdef EMULTIHOP
8238yes
8239#endif
7a6dbc2f 8240
7a6dbc2f 8241_ACEOF
5e8754f9
SDJ
8242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8243 $EGREP "yes" >/dev/null 2>&1; then :
8244 gl_cv_header_errno_h_EMULTIHOP=yes
7a6dbc2f 8245else
5e8754f9 8246 gl_cv_header_errno_h_EMULTIHOP=no
7a6dbc2f 8247fi
5e8754f9 8248rm -f conftest*
7a6dbc2f 8249
5e8754f9
SDJ
8250 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8252/* end confdefs.h. */
7a6dbc2f 8253
5e8754f9
SDJ
8254#define _XOPEN_SOURCE_EXTENDED 1
8255#include <errno.h>
8256#ifdef EMULTIHOP
8257yes
8258#endif
7a6dbc2f 8259
5e8754f9
SDJ
8260_ACEOF
8261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8262 $EGREP "yes" >/dev/null 2>&1; then :
8263 gl_cv_header_errno_h_EMULTIHOP=hidden
8264fi
8265rm -f conftest*
7a6dbc2f 8266
5e8754f9
SDJ
8267 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8268 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
8269#define _XOPEN_SOURCE_EXTENDED 1
8270#include <errno.h>
8271/* The following two lines are a workaround against an autoconf-2.52 bug. */
8272#include <stdio.h>
8273#include <stdlib.h>
8274"; then :
7a6dbc2f 8275
5e8754f9 8276fi
7a6dbc2f 8277
5e8754f9
SDJ
8278 fi
8279 fi
7a6dbc2f 8280
5e8754f9
SDJ
8281fi
8282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8283$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8284 case $gl_cv_header_errno_h_EMULTIHOP in
8285 yes | no)
8286 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8287 ;;
8288 *)
8289 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8290 ;;
8291 esac
7a6dbc2f
SDJ
8292
8293
5e8754f9 8294 fi
7a6dbc2f
SDJ
8295
8296
5e8754f9
SDJ
8297 if test -n "$ERRNO_H"; then
8298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8299$as_echo_n "checking for ENOLINK value... " >&6; }
8300if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
8301 $as_echo_n "(cached) " >&6
8302else
7a6dbc2f 8303
5e8754f9
SDJ
8304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8305/* end confdefs.h. */
7a6dbc2f 8306
5e8754f9
SDJ
8307#include <errno.h>
8308#ifdef ENOLINK
8309yes
8310#endif
7a6dbc2f 8311
5e8754f9
SDJ
8312_ACEOF
8313if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8314 $EGREP "yes" >/dev/null 2>&1; then :
8315 gl_cv_header_errno_h_ENOLINK=yes
8316else
8317 gl_cv_header_errno_h_ENOLINK=no
8318fi
8319rm -f conftest*
7a6dbc2f 8320
5e8754f9
SDJ
8321 if test $gl_cv_header_errno_h_ENOLINK = no; then
8322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8323/* end confdefs.h. */
7a6dbc2f 8324
5e8754f9
SDJ
8325#define _XOPEN_SOURCE_EXTENDED 1
8326#include <errno.h>
8327#ifdef ENOLINK
8328yes
8329#endif
7a6dbc2f 8330
5e8754f9
SDJ
8331_ACEOF
8332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8333 $EGREP "yes" >/dev/null 2>&1; then :
8334 gl_cv_header_errno_h_ENOLINK=hidden
8335fi
8336rm -f conftest*
7a6dbc2f 8337
5e8754f9
SDJ
8338 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8339 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
8340#define _XOPEN_SOURCE_EXTENDED 1
8341#include <errno.h>
8342/* The following two lines are a workaround against an autoconf-2.52 bug. */
8343#include <stdio.h>
8344#include <stdlib.h>
8345"; then :
7a6dbc2f 8346
5e8754f9 8347fi
7a6dbc2f 8348
5e8754f9
SDJ
8349 fi
8350 fi
7a6dbc2f 8351
5e8754f9
SDJ
8352fi
8353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8354$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
8355 case $gl_cv_header_errno_h_ENOLINK in
8356 yes | no)
8357 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8358 ;;
8359 *)
8360 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8361 ;;
8362 esac
7a6dbc2f
SDJ
8363
8364
5e8754f9 8365 fi
7a6dbc2f
SDJ
8366
8367
5e8754f9
SDJ
8368 if test -n "$ERRNO_H"; then
8369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8370$as_echo_n "checking for EOVERFLOW value... " >&6; }
8371if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
8372 $as_echo_n "(cached) " >&6
8373else
7a6dbc2f 8374
5e8754f9
SDJ
8375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8376/* end confdefs.h. */
7a6dbc2f 8377
5e8754f9
SDJ
8378#include <errno.h>
8379#ifdef EOVERFLOW
8380yes
8381#endif
7a6dbc2f 8382
5e8754f9
SDJ
8383_ACEOF
8384if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8385 $EGREP "yes" >/dev/null 2>&1; then :
8386 gl_cv_header_errno_h_EOVERFLOW=yes
8387else
8388 gl_cv_header_errno_h_EOVERFLOW=no
8389fi
8390rm -f conftest*
7a6dbc2f 8391
5e8754f9
SDJ
8392 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8394/* end confdefs.h. */
7a6dbc2f 8395
5e8754f9
SDJ
8396#define _XOPEN_SOURCE_EXTENDED 1
8397#include <errno.h>
8398#ifdef EOVERFLOW
8399yes
8400#endif
7a6dbc2f 8401
5e8754f9
SDJ
8402_ACEOF
8403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8404 $EGREP "yes" >/dev/null 2>&1; then :
8405 gl_cv_header_errno_h_EOVERFLOW=hidden
8406fi
8407rm -f conftest*
7a6dbc2f 8408
5e8754f9
SDJ
8409 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8410 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
8411#define _XOPEN_SOURCE_EXTENDED 1
8412#include <errno.h>
8413/* The following two lines are a workaround against an autoconf-2.52 bug. */
8414#include <stdio.h>
8415#include <stdlib.h>
8416"; then :
7a6dbc2f 8417
5e8754f9 8418fi
7a6dbc2f 8419
5e8754f9
SDJ
8420 fi
8421 fi
7a6dbc2f 8422
5e8754f9
SDJ
8423fi
8424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8425$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8426 case $gl_cv_header_errno_h_EOVERFLOW in
8427 yes | no)
8428 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8429 ;;
8430 *)
8431 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8432 ;;
8433 esac
7a6dbc2f
SDJ
8434
8435
5e8754f9 8436 fi
7a6dbc2f
SDJ
8437
8438
7a6dbc2f
SDJ
8439
8440
5abebf3c 8441$as_echo "#define HAVE_DECL_STRERROR_R 1" >>confdefs.h
7a6dbc2f 8442
5e8754f9 8443
5abebf3c 8444$as_echo "#define HAVE_STRERROR_R 1" >>confdefs.h
7a6dbc2f
SDJ
8445
8446
5abebf3c 8447$as_echo "#define STRERROR_R_CHAR_P 0" >>confdefs.h
7a6dbc2f 8448
7a6dbc2f
SDJ
8449
8450
73cc7272
TT
8451 XGETTEXT_EXTRA_OPTIONS=
8452
8453
7a6dbc2f
SDJ
8454
8455
8456
5e8754f9
SDJ
8457 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8458if test "x$ac_cv_have_decl_fchdir" = xyes; then :
8459 ac_have_decl=1
7a6dbc2f 8460else
5e8754f9
SDJ
8461 ac_have_decl=0
8462fi
7a6dbc2f 8463
5e8754f9
SDJ
8464cat >>confdefs.h <<_ACEOF
8465#define HAVE_DECL_FCHDIR $ac_have_decl
8466_ACEOF
7a6dbc2f 8467
7a6dbc2f 8468
7a6dbc2f 8469
5e8754f9
SDJ
8470 GNULIB_FCNTL=0;
8471 GNULIB_NONBLOCKING=0;
8472 GNULIB_OPEN=0;
8473 GNULIB_OPENAT=0;
8474 HAVE_FCNTL=1;
8475 HAVE_OPENAT=1;
8476 REPLACE_FCNTL=0;
8477 REPLACE_OPEN=0;
8478 REPLACE_OPENAT=0;
7a6dbc2f 8479
7a6dbc2f 8480
7a6dbc2f
SDJ
8481
8482
7a6dbc2f 8483
7a6dbc2f 8484
7a6dbc2f 8485
7a6dbc2f
SDJ
8486
8487
8488
7a6dbc2f 8489
7a6dbc2f 8490
7a6dbc2f 8491
7a6dbc2f 8492
7a6dbc2f 8493
5e8754f9 8494 :
7a6dbc2f
SDJ
8495
8496
8497
8498
8499
8500
5e8754f9 8501 :
7a6dbc2f 8502
7a6dbc2f 8503
7a6dbc2f
SDJ
8504
8505
7a6dbc2f 8506
5e8754f9
SDJ
8507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8508$as_echo_n "checking for working fcntl.h... " >&6; }
8509if ${gl_cv_header_working_fcntl_h+:} false; then :
88b48903
WN
8510 $as_echo_n "(cached) " >&6
8511else
5e8754f9
SDJ
8512 if test "$cross_compiling" = yes; then :
8513 gl_cv_header_working_fcntl_h=cross-compiling
8514else
8515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903 8516/* end confdefs.h. */
5e8754f9
SDJ
8517#include <sys/types.h>
8518 #include <sys/stat.h>
8519 #if HAVE_UNISTD_H
8520 # include <unistd.h>
8521 #else /* on Windows with MSVC */
8522 # include <io.h>
8523 # include <stdlib.h>
8524 # defined sleep(n) _sleep ((n) * 1000)
8525 #endif
8526 #include <fcntl.h>
8527 #ifndef O_NOATIME
8528 #define O_NOATIME 0
8529 #endif
8530 #ifndef O_NOFOLLOW
8531 #define O_NOFOLLOW 0
8532 #endif
8533 static int const constants[] =
8534 {
8535 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8536 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8537 };
8538
8539int
88b48903
WN
8540main ()
8541{
5e8754f9
SDJ
8542
8543 int result = !constants;
8544 #if HAVE_SYMLINK
8545 {
8546 static char const sym[] = "conftest.sym";
8547 if (symlink ("/dev/null", sym) != 0)
8548 result |= 2;
8549 else
8550 {
8551 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8552 if (fd >= 0)
8553 {
8554 close (fd);
8555 result |= 4;
8556 }
8557 }
8558 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8559 result |= 2;
8560 else
8561 {
8562 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8563 if (fd >= 0)
8564 {
8565 close (fd);
8566 result |= 4;
8567 }
8568 }
8569 unlink (sym);
8570 }
8571 #endif
8572 {
8573 static char const file[] = "confdefs.h";
8574 int fd = open (file, O_RDONLY | O_NOATIME);
8575 if (fd < 0)
8576 result |= 8;
8577 else
8578 {
8579 struct stat st0;
8580 if (fstat (fd, &st0) != 0)
8581 result |= 16;
8582 else
8583 {
8584 char c;
8585 sleep (1);
8586 if (read (fd, &c, 1) != 1)
8587 result |= 24;
8588 else
8589 {
8590 if (close (fd) != 0)
8591 result |= 32;
8592 else
8593 {
8594 struct stat st1;
8595 if (stat (file, &st1) != 0)
8596 result |= 40;
8597 else
8598 if (st0.st_atime != st1.st_atime)
8599 result |= 64;
8600 }
8601 }
8602 }
8603 }
8604 }
8605 return result;
88b48903
WN
8606 ;
8607 return 0;
8608}
8609_ACEOF
5e8754f9
SDJ
8610if ac_fn_c_try_run "$LINENO"; then :
8611 gl_cv_header_working_fcntl_h=yes
88b48903 8612else
5e8754f9
SDJ
8613 case $? in #(
8614 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8615 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8616 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8617 *) gl_cv_header_working_fcntl_h='no';;
8618 esac
88b48903 8619fi
5e8754f9
SDJ
8620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8621 conftest.$ac_objext conftest.beam conftest.$ac_ext
8622fi
8623
8624fi
8625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8626$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
8627
8628 case $gl_cv_header_working_fcntl_h in #(
8629 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8630 *) ac_val=1;;
8631 esac
8632
8633cat >>confdefs.h <<_ACEOF
8634#define HAVE_WORKING_O_NOATIME $ac_val
8635_ACEOF
8636
8637
8638 case $gl_cv_header_working_fcntl_h in #(
8639 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8640 *) ac_val=1;;
8641 esac
8642
8643cat >>confdefs.h <<_ACEOF
8644#define HAVE_WORKING_O_NOFOLLOW $ac_val
8645_ACEOF
8646
8647
8648ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
8649if test "x$ac_cv_type_pid_t" = xyes; then :
8650
8651else
8652
8653cat >>confdefs.h <<_ACEOF
8654#define pid_t int
8655_ACEOF
8656
8657fi
8658
8659ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
8660if test "x$ac_cv_type_mode_t" = xyes; then :
8661
8662else
8663
8664cat >>confdefs.h <<_ACEOF
8665#define mode_t int
8666_ACEOF
8667
8668fi
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
8683$as_echo_n "checking for mbstate_t... " >&6; }
8684if ${ac_cv_type_mbstate_t+:} false; then :
8685 $as_echo_n "(cached) " >&6
8686else
8687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8688/* end confdefs.h. */
8689$ac_includes_default
8690/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8691 <wchar.h>.
8692 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8693 included before <wchar.h>. */
8694#include <stddef.h>
8695#include <stdio.h>
8696#include <time.h>
8697#include <wchar.h>
8698int
8699main ()
8700{
8701mbstate_t x; return sizeof x;
8702 ;
8703 return 0;
8704}
8705_ACEOF
8706if ac_fn_c_try_compile "$LINENO"; then :
8707 ac_cv_type_mbstate_t=yes
8708else
8709 ac_cv_type_mbstate_t=no
8710fi
8711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8712fi
8713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
8714$as_echo "$ac_cv_type_mbstate_t" >&6; }
8715 if test $ac_cv_type_mbstate_t = yes; then
8716
8717$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
8718
8719 else
8720
8721$as_echo "#define mbstate_t int" >>confdefs.h
8722
8723 fi
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
8766 GNULIB_ACOSF=0;
8767 GNULIB_ACOSL=0;
8768 GNULIB_ASINF=0;
8769 GNULIB_ASINL=0;
8770 GNULIB_ATANF=0;
8771 GNULIB_ATANL=0;
8772 GNULIB_ATAN2F=0;
8773 GNULIB_CBRT=0;
8774 GNULIB_CBRTF=0;
8775 GNULIB_CBRTL=0;
8776 GNULIB_CEIL=0;
8777 GNULIB_CEILF=0;
8778 GNULIB_CEILL=0;
8779 GNULIB_COPYSIGN=0;
8780 GNULIB_COPYSIGNF=0;
8781 GNULIB_COPYSIGNL=0;
8782 GNULIB_COSF=0;
8783 GNULIB_COSL=0;
8784 GNULIB_COSHF=0;
8785 GNULIB_EXPF=0;
8786 GNULIB_EXPL=0;
8787 GNULIB_EXP2=0;
8788 GNULIB_EXP2F=0;
8789 GNULIB_EXP2L=0;
8790 GNULIB_EXPM1=0;
8791 GNULIB_EXPM1F=0;
8792 GNULIB_EXPM1L=0;
8793 GNULIB_FABSF=0;
8794 GNULIB_FABSL=0;
8795 GNULIB_FLOOR=0;
8796 GNULIB_FLOORF=0;
8797 GNULIB_FLOORL=0;
8798 GNULIB_FMA=0;
8799 GNULIB_FMAF=0;
8800 GNULIB_FMAL=0;
8801 GNULIB_FMOD=0;
8802 GNULIB_FMODF=0;
8803 GNULIB_FMODL=0;
8804 GNULIB_FREXPF=0;
8805 GNULIB_FREXP=0;
8806 GNULIB_FREXPL=0;
8807 GNULIB_HYPOT=0;
8808 GNULIB_HYPOTF=0;
8809 GNULIB_HYPOTL=0;
8810 GNULIB_ILOGB=0;
8811 GNULIB_ILOGBF=0;
8812 GNULIB_ILOGBL=0;
8813 GNULIB_ISFINITE=0;
8814 GNULIB_ISINF=0;
8815 GNULIB_ISNAN=0;
8816 GNULIB_ISNANF=0;
8817 GNULIB_ISNAND=0;
8818 GNULIB_ISNANL=0;
8819 GNULIB_LDEXPF=0;
8820 GNULIB_LDEXPL=0;
8821 GNULIB_LOG=0;
8822 GNULIB_LOGF=0;
8823 GNULIB_LOGL=0;
8824 GNULIB_LOG10=0;
8825 GNULIB_LOG10F=0;
8826 GNULIB_LOG10L=0;
8827 GNULIB_LOG1P=0;
8828 GNULIB_LOG1PF=0;
8829 GNULIB_LOG1PL=0;
8830 GNULIB_LOG2=0;
8831 GNULIB_LOG2F=0;
8832 GNULIB_LOG2L=0;
8833 GNULIB_LOGB=0;
8834 GNULIB_LOGBF=0;
8835 GNULIB_LOGBL=0;
8836 GNULIB_MODF=0;
8837 GNULIB_MODFF=0;
8838 GNULIB_MODFL=0;
8839 GNULIB_POWF=0;
8840 GNULIB_REMAINDER=0;
8841 GNULIB_REMAINDERF=0;
8842 GNULIB_REMAINDERL=0;
8843 GNULIB_RINT=0;
8844 GNULIB_RINTF=0;
8845 GNULIB_RINTL=0;
8846 GNULIB_ROUND=0;
8847 GNULIB_ROUNDF=0;
8848 GNULIB_ROUNDL=0;
8849 GNULIB_SIGNBIT=0;
8850 GNULIB_SINF=0;
8851 GNULIB_SINL=0;
8852 GNULIB_SINHF=0;
8853 GNULIB_SQRTF=0;
8854 GNULIB_SQRTL=0;
8855 GNULIB_TANF=0;
8856 GNULIB_TANL=0;
8857 GNULIB_TANHF=0;
8858 GNULIB_TRUNC=0;
8859 GNULIB_TRUNCF=0;
8860 GNULIB_TRUNCL=0;
8861 HAVE_ACOSF=1;
8862 HAVE_ACOSL=1;
8863 HAVE_ASINF=1;
8864 HAVE_ASINL=1;
8865 HAVE_ATANF=1;
8866 HAVE_ATANL=1;
8867 HAVE_ATAN2F=1;
8868 HAVE_CBRT=1;
8869 HAVE_CBRTF=1;
8870 HAVE_CBRTL=1;
8871 HAVE_COPYSIGN=1;
8872 HAVE_COPYSIGNL=1;
8873 HAVE_COSF=1;
8874 HAVE_COSL=1;
8875 HAVE_COSHF=1;
8876 HAVE_EXPF=1;
8877 HAVE_EXPL=1;
8878 HAVE_EXPM1=1;
8879 HAVE_EXPM1F=1;
8880 HAVE_FABSF=1;
8881 HAVE_FABSL=1;
8882 HAVE_FMA=1;
8883 HAVE_FMAF=1;
8884 HAVE_FMAL=1;
8885 HAVE_FMODF=1;
8886 HAVE_FMODL=1;
8887 HAVE_FREXPF=1;
8888 HAVE_HYPOTF=1;
8889 HAVE_HYPOTL=1;
8890 HAVE_ILOGB=1;
8891 HAVE_ILOGBF=1;
8892 HAVE_ILOGBL=1;
8893 HAVE_ISNANF=1;
8894 HAVE_ISNAND=1;
8895 HAVE_ISNANL=1;
8896 HAVE_LDEXPF=1;
8897 HAVE_LOGF=1;
8898 HAVE_LOGL=1;
8899 HAVE_LOG10F=1;
8900 HAVE_LOG10L=1;
8901 HAVE_LOG1P=1;
8902 HAVE_LOG1PF=1;
8903 HAVE_LOG1PL=1;
8904 HAVE_LOGBF=1;
8905 HAVE_LOGBL=1;
8906 HAVE_MODFF=1;
8907 HAVE_MODFL=1;
8908 HAVE_POWF=1;
8909 HAVE_REMAINDER=1;
8910 HAVE_REMAINDERF=1;
8911 HAVE_RINT=1;
8912 HAVE_RINTL=1;
8913 HAVE_SINF=1;
8914 HAVE_SINL=1;
8915 HAVE_SINHF=1;
8916 HAVE_SQRTF=1;
8917 HAVE_SQRTL=1;
8918 HAVE_TANF=1;
8919 HAVE_TANL=1;
8920 HAVE_TANHF=1;
8921 HAVE_DECL_ACOSL=1;
8922 HAVE_DECL_ASINL=1;
8923 HAVE_DECL_ATANL=1;
8924 HAVE_DECL_CBRTF=1;
8925 HAVE_DECL_CBRTL=1;
8926 HAVE_DECL_CEILF=1;
8927 HAVE_DECL_CEILL=1;
8928 HAVE_DECL_COPYSIGNF=1;
8929 HAVE_DECL_COSL=1;
8930 HAVE_DECL_EXPL=1;
8931 HAVE_DECL_EXP2=1;
8932 HAVE_DECL_EXP2F=1;
8933 HAVE_DECL_EXP2L=1;
8934 HAVE_DECL_EXPM1L=1;
8935 HAVE_DECL_FLOORF=1;
8936 HAVE_DECL_FLOORL=1;
8937 HAVE_DECL_FREXPL=1;
8938 HAVE_DECL_LDEXPL=1;
8939 HAVE_DECL_LOGL=1;
8940 HAVE_DECL_LOG10L=1;
8941 HAVE_DECL_LOG2=1;
8942 HAVE_DECL_LOG2F=1;
8943 HAVE_DECL_LOG2L=1;
8944 HAVE_DECL_LOGB=1;
8945 HAVE_DECL_REMAINDER=1;
8946 HAVE_DECL_REMAINDERL=1;
8947 HAVE_DECL_RINTF=1;
8948 HAVE_DECL_ROUND=1;
8949 HAVE_DECL_ROUNDF=1;
8950 HAVE_DECL_ROUNDL=1;
8951 HAVE_DECL_SINL=1;
8952 HAVE_DECL_SQRTL=1;
8953 HAVE_DECL_TANL=1;
8954 HAVE_DECL_TRUNC=1;
8955 HAVE_DECL_TRUNCF=1;
8956 HAVE_DECL_TRUNCL=1;
8957 REPLACE_CBRTF=0;
8958 REPLACE_CBRTL=0;
8959 REPLACE_CEIL=0;
8960 REPLACE_CEILF=0;
8961 REPLACE_CEILL=0;
8962 REPLACE_EXPM1=0;
8963 REPLACE_EXPM1F=0;
8964 REPLACE_EXP2=0;
8965 REPLACE_EXP2L=0;
8966 REPLACE_FABSL=0;
8967 REPLACE_FLOOR=0;
8968 REPLACE_FLOORF=0;
8969 REPLACE_FLOORL=0;
8970 REPLACE_FMA=0;
8971 REPLACE_FMAF=0;
8972 REPLACE_FMAL=0;
8973 REPLACE_FMOD=0;
8974 REPLACE_FMODF=0;
8975 REPLACE_FMODL=0;
8976 REPLACE_FREXPF=0;
8977 REPLACE_FREXP=0;
8978 REPLACE_FREXPL=0;
8979 REPLACE_HUGE_VAL=0;
8980 REPLACE_HYPOT=0;
8981 REPLACE_HYPOTF=0;
8982 REPLACE_HYPOTL=0;
8983 REPLACE_ILOGB=0;
8984 REPLACE_ILOGBF=0;
8985 REPLACE_ISFINITE=0;
8986 REPLACE_ISINF=0;
8987 REPLACE_ISNAN=0;
8988 REPLACE_LDEXPL=0;
8989 REPLACE_LOG=0;
8990 REPLACE_LOGF=0;
8991 REPLACE_LOGL=0;
8992 REPLACE_LOG10=0;
8993 REPLACE_LOG10F=0;
8994 REPLACE_LOG10L=0;
8995 REPLACE_LOG1P=0;
8996 REPLACE_LOG1PF=0;
8997 REPLACE_LOG1PL=0;
8998 REPLACE_LOG2=0;
8999 REPLACE_LOG2F=0;
9000 REPLACE_LOG2L=0;
9001 REPLACE_LOGB=0;
9002 REPLACE_LOGBF=0;
9003 REPLACE_LOGBL=0;
9004 REPLACE_MODF=0;
9005 REPLACE_MODFF=0;
9006 REPLACE_MODFL=0;
9007 REPLACE_NAN=0;
9008 REPLACE_REMAINDER=0;
9009 REPLACE_REMAINDERF=0;
9010 REPLACE_REMAINDERL=0;
9011 REPLACE_ROUND=0;
9012 REPLACE_ROUNDF=0;
9013 REPLACE_ROUNDL=0;
9014 REPLACE_SIGNBIT=0;
9015 REPLACE_SIGNBIT_USING_GCC=0;
9016 REPLACE_SQRTL=0;
9017 REPLACE_TRUNC=0;
9018 REPLACE_TRUNCF=0;
9019 REPLACE_TRUNCL=0;
88b48903 9020
472fa5ee 9021
5e8754f9
SDJ
9022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
9023$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
9024if ${gl_cv_func_frexp_no_libm+:} false; then :
7a6dbc2f 9025 $as_echo_n "(cached) " >&6
4a626d0a 9026else
88b48903 9027
5e8754f9 9028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7a6dbc2f
SDJ
9029/* end confdefs.h. */
9030#include <math.h>
5e8754f9 9031 double x;
7a6dbc2f
SDJ
9032int
9033main ()
9034{
5e8754f9 9035int e; return frexp (x, &e) > 0;
7a6dbc2f
SDJ
9036 ;
9037 return 0;
9038}
4a626d0a 9039_ACEOF
7a6dbc2f 9040if ac_fn_c_try_link "$LINENO"; then :
5e8754f9 9041 gl_cv_func_frexp_no_libm=yes
7a6dbc2f 9042else
5e8754f9 9043 gl_cv_func_frexp_no_libm=no
7a6dbc2f
SDJ
9044fi
9045rm -f core conftest.err conftest.$ac_objext \
9046 conftest$ac_exeext conftest.$ac_ext
88b48903 9047
7a6dbc2f 9048fi
5e8754f9
SDJ
9049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
9050$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
88b48903 9051
472fa5ee 9052
5e8754f9
SDJ
9053 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
9054if test "x$ac_cv_have_decl_alarm" = xyes; then :
9055 ac_have_decl=1
7a6dbc2f 9056else
5e8754f9
SDJ
9057 ac_have_decl=0
9058fi
7a6dbc2f 9059
5e8754f9
SDJ
9060cat >>confdefs.h <<_ACEOF
9061#define HAVE_DECL_ALARM $ac_have_decl
9062_ACEOF
7a6dbc2f 9063
7a6dbc2f 9064
5e8754f9
SDJ
9065
9066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9067$as_echo_n "checking whether long double and double are the same... " >&6; }
9068if ${gl_cv_long_double_equals_double+:} false; then :
9069 $as_echo_n "(cached) " >&6
88b48903
WN
9070else
9071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9072/* end confdefs.h. */
9073#include <float.h>
5e8754f9
SDJ
9074int
9075main ()
88b48903 9076{
5e8754f9
SDJ
9077typedef int check[sizeof (long double) == sizeof (double)
9078 && LDBL_MANT_DIG == DBL_MANT_DIG
9079 && LDBL_MAX_EXP == DBL_MAX_EXP
9080 && LDBL_MIN_EXP == DBL_MIN_EXP
9081 ? 1 : -1];
9082
9083 ;
9084 return 0;
88b48903
WN
9085}
9086_ACEOF
5e8754f9
SDJ
9087if ac_fn_c_try_compile "$LINENO"; then :
9088 gl_cv_long_double_equals_double=yes
88b48903 9089else
5e8754f9 9090 gl_cv_long_double_equals_double=no
88b48903 9091fi
5e8754f9 9092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
88b48903
WN
9093
9094fi
5e8754f9
SDJ
9095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9096$as_echo "$gl_cv_long_double_equals_double" >&6; }
9097 if test $gl_cv_long_double_equals_double = yes; then
7a6dbc2f 9098
5e8754f9 9099$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
7a6dbc2f 9100
5e8754f9
SDJ
9101 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9102 else
9103 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
88b48903
WN
9104 fi
9105
9106
4a626d0a 9107
6ec2e0f5
SDJ
9108 GNULIB_FCHMODAT=0;
9109 GNULIB_FSTAT=0;
9110 GNULIB_FSTATAT=0;
9111 GNULIB_FUTIMENS=0;
9112 GNULIB_LCHMOD=0;
9113 GNULIB_LSTAT=0;
9114 GNULIB_MKDIRAT=0;
9115 GNULIB_MKFIFO=0;
9116 GNULIB_MKFIFOAT=0;
9117 GNULIB_MKNOD=0;
9118 GNULIB_MKNODAT=0;
9119 GNULIB_STAT=0;
9120 GNULIB_UTIMENSAT=0;
9121 HAVE_FCHMODAT=1;
9122 HAVE_FSTATAT=1;
9123 HAVE_FUTIMENS=1;
9124 HAVE_LCHMOD=1;
9125 HAVE_LSTAT=1;
9126 HAVE_MKDIRAT=1;
9127 HAVE_MKFIFO=1;
9128 HAVE_MKFIFOAT=1;
9129 HAVE_MKNOD=1;
9130 HAVE_MKNODAT=1;
9131 HAVE_UTIMENSAT=1;
9132 REPLACE_FSTAT=0;
9133 REPLACE_FSTATAT=0;
9134 REPLACE_FUTIMENS=0;
9135 REPLACE_LSTAT=0;
9136 REPLACE_MKDIR=0;
9137 REPLACE_MKFIFO=0;
9138 REPLACE_MKNOD=0;
9139 REPLACE_STAT=0;
9140 REPLACE_UTIMENSAT=0;
9141
9142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
9143$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
d0ac1c44 9144if ${ac_cv_header_stat_broken+:} false; then :
6ec2e0f5
SDJ
9145 $as_echo_n "(cached) " >&6
9146else
9147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9148/* end confdefs.h. */
9149#include <sys/types.h>
9150#include <sys/stat.h>
9151
9152#if defined S_ISBLK && defined S_IFDIR
9153extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
9154#endif
9155
9156#if defined S_ISBLK && defined S_IFCHR
9157extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
9158#endif
9159
9160#if defined S_ISLNK && defined S_IFREG
9161extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
9162#endif
9163
9164#if defined S_ISSOCK && defined S_IFREG
9165extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
9166#endif
4a626d0a 9167
4a626d0a
PA
9168_ACEOF
9169if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
9170 ac_cv_header_stat_broken=no
9171else
9172 ac_cv_header_stat_broken=yes
4a626d0a
PA
9173fi
9174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9175fi
9176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
9177$as_echo "$ac_cv_header_stat_broken" >&6; }
9178if test $ac_cv_header_stat_broken = yes; then
9179
9180$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
4a626d0a
PA
9181
9182fi
4a626d0a 9183
4a626d0a
PA
9184
9185
4a626d0a
PA
9186
9187
472fa5ee
SM
9188
9189
9190
6ec2e0f5
SDJ
9191 case "$host_os" in
9192 mingw*)
9193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
9194$as_echo_n "checking for 64-bit off_t... " >&6; }
d0ac1c44 9195if ${gl_cv_type_off_t_64+:} false; then :
6ec2e0f5
SDJ
9196 $as_echo_n "(cached) " >&6
9197else
9198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9199/* end confdefs.h. */
9200#include <sys/types.h>
9201 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
9202
9203int
9204main ()
9205{
9206
9207 ;
9208 return 0;
9209}
9210_ACEOF
9211if ac_fn_c_try_compile "$LINENO"; then :
9212 gl_cv_type_off_t_64=yes
9213else
9214 gl_cv_type_off_t_64=no
9215fi
9216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4a626d0a 9217
6ec2e0f5
SDJ
9218fi
9219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
9220$as_echo "$gl_cv_type_off_t_64" >&6; }
9221 if test $gl_cv_type_off_t_64 = no; then
9222 WINDOWS_64_BIT_OFF_T=1
9223 else
7a6dbc2f
SDJ
9224 WINDOWS_64_BIT_OFF_T=0
9225 fi
5e8754f9 9226 WINDOWS_64_BIT_ST_SIZE=1
6ec2e0f5
SDJ
9227 ;;
9228 *)
9229 WINDOWS_64_BIT_OFF_T=0
9230 WINDOWS_64_BIT_ST_SIZE=0
9231 ;;
9232 esac
4a626d0a
PA
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
472fa5ee
SM
9245 :
9246
9247
9248
9249
9250
4a626d0a
PA
9251
9252
9253
9254 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9255 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a 9256 else
6ec2e0f5
SDJ
9257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
9258$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 9259if ${gl_cv_next_sys_stat_h+:} false; then :
4a626d0a
PA
9260 $as_echo_n "(cached) " >&6
9261else
9262
6ec2e0f5 9263 if test $ac_cv_header_sys_stat_h = yes; then
4a626d0a
PA
9264
9265
9266
9267
9268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9269/* end confdefs.h. */
6ec2e0f5 9270#include <sys/stat.h>
4a626d0a
PA
9271_ACEOF
9272 case "$host_os" in
9273 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9274 *) gl_absname_cpp="$ac_cpp" ;;
9275 esac
9276
9277 case "$host_os" in
9278 mingw*)
9279 gl_dirsep_regex='[/\\]'
9280 ;;
9281 *)
9282 gl_dirsep_regex='\/'
9283 ;;
9284 esac
9285 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9286 gl_header_literal_regex=`echo 'sys/stat.h' \
4a626d0a
PA
9287 | sed -e "$gl_make_literal_regex_sed"`
9288 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9289 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9290 s|^/[^/]|//&|
9291 p
9292 q
9293 }'
9294
6ec2e0f5 9295 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
9296 sed -n "$gl_absolute_header_sed"`
9297
6ec2e0f5
SDJ
9298 gl_header=$gl_cv_absolute_sys_stat_h
9299 gl_cv_next_sys_stat_h='"'$gl_header'"'
4a626d0a 9300 else
6ec2e0f5 9301 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a
PA
9302 fi
9303
9304
9305fi
6ec2e0f5
SDJ
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
9307$as_echo "$gl_cv_next_sys_stat_h" >&6; }
4a626d0a 9308 fi
6ec2e0f5 9309 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
4a626d0a
PA
9310
9311 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9312 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 9313 gl_next_as_first_directive='<'sys/stat.h'>'
4a626d0a
PA
9314 else
9315 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 9316 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
4a626d0a 9317 fi
6ec2e0f5 9318 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
4a626d0a
PA
9319
9320
9321
9322
9323
4a626d0a
PA
9324
9325
9326
9327
9328
4a626d0a 9329
5e8754f9 9330 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
4a626d0a 9331
5e8754f9 9332$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
4a626d0a 9333
5e8754f9 9334 fi
4a626d0a 9335
6ec2e0f5
SDJ
9336 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
9337 #include <sys/stat.h>
9338"
d0ac1c44 9339if test "x$ac_cv_type_nlink_t" = xyes; then :
6ec2e0f5
SDJ
9340
9341else
4a626d0a 9342
6ec2e0f5
SDJ
9343$as_echo "#define nlink_t int" >>confdefs.h
9344
9345fi
9346
9347
9348
5e8754f9
SDJ
9349 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
9350 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9352$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9353if eval \${$as_gl_Symbol+:} false; then :
9354 $as_echo_n "(cached) " >&6
9355else
9356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9357/* end confdefs.h. */
9358#include <sys/stat.h>
9359
9360int
9361main ()
9362{
9363#undef $gl_func
9364 (void) $gl_func;
9365 ;
9366 return 0;
9367}
9368_ACEOF
9369if ac_fn_c_try_compile "$LINENO"; then :
9370 eval "$as_gl_Symbol=yes"
9371else
9372 eval "$as_gl_Symbol=no"
9373fi
9374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9375fi
9376eval ac_res=\$$as_gl_Symbol
9377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9378$as_echo "$ac_res" >&6; }
9379 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9380 cat >>confdefs.h <<_ACEOF
9381#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9382_ACEOF
4a626d0a 9383
5e8754f9
SDJ
9384 eval ac_cv_have_decl_$gl_func=yes
9385fi
9386 done
6ec2e0f5
SDJ
9387
9388
9389
5e8754f9 9390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
6ec2e0f5 9391$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
d0ac1c44 9392if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
4a626d0a
PA
9393 $as_echo_n "(cached) " >&6
9394else
6ec2e0f5
SDJ
9395 rm -f conftest.sym conftest.file
9396 echo >conftest.file
9397 if test "$cross_compiling" = yes; then :
9398 case "$host_os" in
5e8754f9 9399 *-gnu*)
6ec2e0f5
SDJ
9400 # Guess yes on glibc systems.
9401 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
9402 *)
9403 # If we don't know, assume the worst.
9404 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
9405 esac
4a626d0a 9406
6ec2e0f5
SDJ
9407else
9408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9409/* end confdefs.h. */
9410$ac_includes_default
4a626d0a
PA
9411int
9412main ()
9413{
6ec2e0f5
SDJ
9414struct stat sbuf;
9415 if (symlink ("conftest.file", "conftest.sym") != 0)
9416 return 1;
9417 /* Linux will dereference the symlink and fail, as required by
9418 POSIX. That is better in the sense that it means we will not
9419 have to compile and use the lstat wrapper. */
9420 return lstat ("conftest.sym/", &sbuf) == 0;
4a626d0a
PA
9421
9422 ;
9423 return 0;
9424}
9425_ACEOF
6ec2e0f5
SDJ
9426if ac_fn_c_try_run "$LINENO"; then :
9427 gl_cv_func_lstat_dereferences_slashed_symlink=yes
4a626d0a 9428else
6ec2e0f5
SDJ
9429 gl_cv_func_lstat_dereferences_slashed_symlink=no
9430fi
9431rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9432 conftest.$ac_objext conftest.beam conftest.$ac_ext
4a626d0a 9433fi
6ec2e0f5
SDJ
9434
9435 rm -f conftest.sym conftest.file
4a626d0a
PA
9436
9437fi
6ec2e0f5
SDJ
9438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9439$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9440 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
9441 *yes)
4a626d0a 9442
6ec2e0f5
SDJ
9443cat >>confdefs.h <<_ACEOF
9444#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9445_ACEOF
4a626d0a 9446
6ec2e0f5
SDJ
9447 ;;
9448 esac
9449
9450
9451
9452
9453
472fa5ee
SM
9454
9455
9456
9457 :
9458
9459
9460
9461
9462
6ec2e0f5
SDJ
9463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
9464$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
d0ac1c44 9465if ${gl_cv_func_getcwd_null+:} false; then :
4a626d0a 9466 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
9467else
9468 if test "$cross_compiling" = yes; then :
9469 case "$host_os" in
5e8754f9
SDJ
9470 # Guess yes on glibc systems.
9471 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
9472 # Guess yes on Cygwin.
9473 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
9474 # If we don't know, assume the worst.
9475 *) gl_cv_func_getcwd_null="guessing no";;
6ec2e0f5
SDJ
9476 esac
9477
4a626d0a
PA
9478else
9479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9480/* end confdefs.h. */
9481
6ec2e0f5
SDJ
9482# include <stdlib.h>
9483# if HAVE_UNISTD_H
9484# include <unistd.h>
9485# else /* on Windows with MSVC */
9486# include <direct.h>
9487# endif
9488# ifndef getcwd
9489 char *getcwd ();
9490# endif
9491
9492int
9493main ()
9494{
9495
5e8754f9 9496#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
9497/* mingw cwd does not start with '/', but getcwd does allocate.
9498 However, mingw fails to honor non-zero size. */
9499#else
9500 if (chdir ("/") != 0)
9501 return 1;
9502 else
9503 {
9504 char *f = getcwd (NULL, 0);
9505 if (! f)
9506 return 2;
9507 if (f[0] != '/')
5e8754f9 9508 return 3;
6ec2e0f5 9509 if (f[1] != '\0')
5e8754f9 9510 return 4;
6ec2e0f5
SDJ
9511 free (f);
9512 return 0;
9513 }
4a626d0a 9514#endif
4a626d0a 9515
6ec2e0f5
SDJ
9516 ;
9517 return 0;
9518}
9519_ACEOF
9520if ac_fn_c_try_run "$LINENO"; then :
9521 gl_cv_func_getcwd_null=yes
9522else
9523 gl_cv_func_getcwd_null=no
9524fi
9525rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9526 conftest.$ac_objext conftest.beam conftest.$ac_ext
9527fi
9528
9529fi
9530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
9531$as_echo "$gl_cv_func_getcwd_null" >&6; }
9532
9533
9534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
9535$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
d0ac1c44 9536if ${gl_cv_func_getcwd_posix_signature+:} false; then :
6ec2e0f5
SDJ
9537 $as_echo_n "(cached) " >&6
9538else
9539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9540/* end confdefs.h. */
9541#include <unistd.h>
4a626d0a
PA
9542int
9543main ()
9544{
6ec2e0f5
SDJ
9545extern
9546 #ifdef __cplusplus
9547 "C"
9548 #endif
9549 char *getcwd (char *, size_t);
9550
4a626d0a
PA
9551 ;
9552 return 0;
9553}
6ec2e0f5 9554
4a626d0a
PA
9555_ACEOF
9556if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9557 gl_cv_func_getcwd_posix_signature=yes
4a626d0a 9558else
6ec2e0f5 9559 gl_cv_func_getcwd_posix_signature=no
4a626d0a
PA
9560fi
9561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 9562
4a626d0a 9563fi
6ec2e0f5
SDJ
9564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
9565$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
9566
472fa5ee
SM
9567
9568 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
d0ac1c44 9569if test "x$ac_cv_have_decl_getcwd" = xyes; then :
6ec2e0f5
SDJ
9570 ac_have_decl=1
9571else
9572 ac_have_decl=0
9573fi
9574
9575cat >>confdefs.h <<_ACEOF
9576#define HAVE_DECL_GETCWD $ac_have_decl
4a626d0a
PA
9577_ACEOF
9578
6ec2e0f5
SDJ
9579
9580
472fa5ee
SM
9581
9582
9583
9584
9585
9586 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
d0ac1c44 9587if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
6ec2e0f5
SDJ
9588 ac_have_decl=1
9589else
9590 ac_have_decl=0
4a626d0a 9591fi
4a626d0a 9592
6ec2e0f5
SDJ
9593cat >>confdefs.h <<_ACEOF
9594#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
9595_ACEOF
9596
472fa5ee
SM
9597
9598
9599 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
d0ac1c44 9600if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
6ec2e0f5
SDJ
9601 ac_have_decl=1
9602else
9603 ac_have_decl=0
9604fi
9605
9606cat >>confdefs.h <<_ACEOF
9607#define HAVE_DECL_GETLOGIN_R $ac_have_decl
9608_ACEOF
9609
9610
9611
472fa5ee
SM
9612
9613
9614
9615
9616
9617 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
d0ac1c44 9618if test "x$ac_cv_have_decl_getlogin" = xyes; then :
6ec2e0f5
SDJ
9619 ac_have_decl=1
9620else
9621 ac_have_decl=0
9622fi
9623
9624cat >>confdefs.h <<_ACEOF
9625#define HAVE_DECL_GETLOGIN $ac_have_decl
9626_ACEOF
9627
9628
9629
9630
7a6dbc2f
SDJ
9631
9632
6ec2e0f5 9633
472fa5ee
SM
9634
9635
9636
9637
9638
6ec2e0f5
SDJ
9639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
9640$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
d0ac1c44 9641if ${ac_cv_c_restrict+:} false; then :
6ec2e0f5
SDJ
9642 $as_echo_n "(cached) " >&6
9643else
9644 ac_cv_c_restrict=no
9645 # The order here caters to the fact that C++ does not require restrict.
9646 for ac_kw in __restrict __restrict__ _Restrict restrict; do
9647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9648/* end confdefs.h. */
9649typedef int *int_ptr;
5e8754f9
SDJ
9650 int foo (int_ptr $ac_kw ip) { return ip[0]; }
9651 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
9652 int bar (int ip[$ac_kw]) { return ip[0]; }
6ec2e0f5
SDJ
9653
9654int
9655main ()
9656{
9657int s[1];
5e8754f9
SDJ
9658 int *$ac_kw t = s;
9659 t[0] = 0;
9660 return foo (t) + bar (t);
6ec2e0f5
SDJ
9661
9662 ;
9663 return 0;
9664}
9665_ACEOF
9666if ac_fn_c_try_compile "$LINENO"; then :
9667 ac_cv_c_restrict=$ac_kw
9668fi
9669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9670 test "$ac_cv_c_restrict" != no && break
9671 done
9672
9673fi
9674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
9675$as_echo "$ac_cv_c_restrict" >&6; }
9676
9677 case $ac_cv_c_restrict in
9678 restrict) ;;
9679 no) $as_echo "#define restrict /**/" >>confdefs.h
9680 ;;
9681 *) cat >>confdefs.h <<_ACEOF
9682#define restrict $ac_cv_c_restrict
9683_ACEOF
9684 ;;
9685 esac
4a626d0a
PA
9686
9687
5e8754f9
SDJ
9688 GNULIB_GETTIMEOFDAY=0;
9689 HAVE_GETTIMEOFDAY=1;
9690 HAVE_STRUCT_TIMEVAL=1;
9691 HAVE_SYS_TIME_H=1;
9692 HAVE_TIMEZONE_T=0;
9693 REPLACE_GETTIMEOFDAY=0;
9694 REPLACE_STRUCT_TIMEVAL=0;
9695
9696
4a626d0a
PA
9697
9698
88b48903 9699
49e4877c
PA
9700
9701
9702
9703
9704
472fa5ee
SM
9705 :
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717 :
9718
9719
49e4877c
PA
9720
9721
9722
9723
9724
9725
9726 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9727 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c 9728 else
6ec2e0f5
SDJ
9729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
9730$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
d0ac1c44 9731if ${gl_cv_next_sys_time_h+:} false; then :
49e4877c
PA
9732 $as_echo_n "(cached) " >&6
9733else
9734
6ec2e0f5 9735 if test $ac_cv_header_sys_time_h = yes; then
49e4877c
PA
9736
9737
9738
9739
9740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9741/* end confdefs.h. */
6ec2e0f5 9742#include <sys/time.h>
49e4877c
PA
9743_ACEOF
9744 case "$host_os" in
9745 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9746 *) gl_absname_cpp="$ac_cpp" ;;
9747 esac
9748
9749 case "$host_os" in
9750 mingw*)
9751 gl_dirsep_regex='[/\\]'
9752 ;;
9753 *)
9754 gl_dirsep_regex='\/'
9755 ;;
9756 esac
9757 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9758 gl_header_literal_regex=`echo 'sys/time.h' \
49e4877c
PA
9759 | sed -e "$gl_make_literal_regex_sed"`
9760 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9761 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9762 s|^/[^/]|//&|
9763 p
9764 q
9765 }'
9766
6ec2e0f5 9767 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
49e4877c
PA
9768 sed -n "$gl_absolute_header_sed"`
9769
6ec2e0f5
SDJ
9770 gl_header=$gl_cv_absolute_sys_time_h
9771 gl_cv_next_sys_time_h='"'$gl_header'"'
49e4877c 9772 else
6ec2e0f5 9773 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c
PA
9774 fi
9775
9776
9777fi
6ec2e0f5
SDJ
9778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
9779$as_echo "$gl_cv_next_sys_time_h" >&6; }
49e4877c 9780 fi
6ec2e0f5 9781 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
49e4877c
PA
9782
9783 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9784 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 9785 gl_next_as_first_directive='<'sys/time.h'>'
49e4877c
PA
9786 else
9787 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 9788 gl_next_as_first_directive=$gl_cv_next_sys_time_h
49e4877c 9789 fi
6ec2e0f5 9790 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
49e4877c
PA
9791
9792
9793
9794
9795
6ec2e0f5
SDJ
9796 if test $ac_cv_header_sys_time_h != yes; then
9797 HAVE_SYS_TIME_H=0
9798 fi
9799
9800
9801
9802
9803
472fa5ee
SM
9804 :
9805
9806
9807
9808
9809
6ec2e0f5
SDJ
9810 if test $ac_cv_header_sys_socket_h != yes; then
9811 for ac_header in winsock2.h
9812do :
9813 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 9814if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
9815 cat >>confdefs.h <<_ACEOF
9816#define HAVE_WINSOCK2_H 1
9817_ACEOF
9818
9819fi
9820
9821done
9822
9823 fi
9824 if test "$ac_cv_header_winsock2_h" = yes; then
9825 HAVE_WINSOCK2_H=1
9826 UNISTD_H_HAVE_WINSOCK2_H=1
9827 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9828 else
9829 HAVE_WINSOCK2_H=0
9830 fi
9831
9832
9833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
9834$as_echo_n "checking for struct timeval... " >&6; }
d0ac1c44 9835if ${gl_cv_sys_struct_timeval+:} false; then :
6ec2e0f5
SDJ
9836 $as_echo_n "(cached) " >&6
9837else
9838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9839/* end confdefs.h. */
9840#if HAVE_SYS_TIME_H
9841 #include <sys/time.h>
9842 #endif
9843 #include <time.h>
9844 #if HAVE_WINSOCK2_H
9845 # include <winsock2.h>
9846 #endif
9847
49e4877c
PA
9848int
9849main ()
9850{
6ec2e0f5 9851static struct timeval x; x.tv_sec = x.tv_usec;
49e4877c
PA
9852 ;
9853 return 0;
9854}
9855_ACEOF
9856if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9857 gl_cv_sys_struct_timeval=yes
49e4877c 9858else
6ec2e0f5 9859 gl_cv_sys_struct_timeval=no
49e4877c
PA
9860fi
9861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49e4877c 9862
49e4877c 9863fi
6ec2e0f5
SDJ
9864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
9865$as_echo "$gl_cv_sys_struct_timeval" >&6; }
9866 if test $gl_cv_sys_struct_timeval != yes; then
9867 HAVE_STRUCT_TIMEVAL=0
9868 else
9869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
9870$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
d0ac1c44 9871if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
8690e634
JK
9872 $as_echo_n "(cached) " >&6
9873else
6ec2e0f5 9874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9875/* end confdefs.h. */
6ec2e0f5
SDJ
9876#if HAVE_SYS_TIME_H
9877 #include <sys/time.h>
9878 #endif
9879 #include <time.h>
9880 #if HAVE_WINSOCK2_H
9881 # include <winsock2.h>
9882 #endif
8690e634 9883
8690e634
JK
9884int
9885main ()
9886{
6ec2e0f5
SDJ
9887static struct timeval x;
9888 typedef int verify_tv_sec_type[
9889 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
9890 ];
9891
8690e634
JK
9892 ;
9893 return 0;
9894}
8690e634 9895_ACEOF
6ec2e0f5
SDJ
9896if ac_fn_c_try_compile "$LINENO"; then :
9897 gl_cv_sys_struct_timeval_tv_sec=yes
8690e634 9898else
6ec2e0f5 9899 gl_cv_sys_struct_timeval_tv_sec=no
8690e634 9900fi
6ec2e0f5 9901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9902
6ec2e0f5 9903fi
725e2999
JB
9904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
9905$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
9906 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
9907 REPLACE_STRUCT_TIMEVAL=1
9908 fi
9909 fi
9910
9911
9912 for gl_func in gettimeofday; do
9913 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9915$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
9916if eval \${$as_gl_Symbol+:} false; then :
9917 $as_echo_n "(cached) " >&6
9918else
9919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9920/* end confdefs.h. */
9921
9922#if HAVE_SYS_TIME_H
9923# include <sys/time.h>
9924#endif
9925#include <time.h>
9926
9927int
9928main ()
9929{
9930#undef $gl_func
9931 (void) $gl_func;
9932 ;
9933 return 0;
9934}
9935_ACEOF
9936if ac_fn_c_try_compile "$LINENO"; then :
9937 eval "$as_gl_Symbol=yes"
9938else
9939 eval "$as_gl_Symbol=no"
9940fi
9941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9942fi
9943eval ac_res=\$$as_gl_Symbol
9944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9945$as_echo "$ac_res" >&6; }
9946 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
9947 cat >>confdefs.h <<_ACEOF
9948#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9949_ACEOF
9950
9951 eval ac_cv_have_decl_$gl_func=yes
9952fi
9953 done
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
9980 GNULIB_SOCKET=0;
9981 GNULIB_CONNECT=0;
9982 GNULIB_ACCEPT=0;
9983 GNULIB_BIND=0;
9984 GNULIB_GETPEERNAME=0;
9985 GNULIB_GETSOCKNAME=0;
9986 GNULIB_GETSOCKOPT=0;
9987 GNULIB_LISTEN=0;
9988 GNULIB_RECV=0;
9989 GNULIB_SEND=0;
9990 GNULIB_RECVFROM=0;
9991 GNULIB_SENDTO=0;
9992 GNULIB_SETSOCKOPT=0;
9993 GNULIB_SHUTDOWN=0;
9994 GNULIB_ACCEPT4=0;
9995 HAVE_STRUCT_SOCKADDR_STORAGE=1;
9996 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
9997
9998 HAVE_SA_FAMILY_T=1;
9999 HAVE_ACCEPT4=1;
10000
10001
10002 :
10003
10004
10005
10006
10007
10008 if test $ac_cv_header_sys_socket_h = no; then
10009 for ac_header in ws2tcpip.h
10010do :
10011 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
10012if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
10013 cat >>confdefs.h <<_ACEOF
10014#define HAVE_WS2TCPIP_H 1
10015_ACEOF
10016
10017fi
10018
10019done
10020
10021 fi
10022
10023
10024
10025
10026
10027 case "$host_os" in
10028 osf*)
10029
10030$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
10031
10032 ;;
10033 esac
10034
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
10036$as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
10037if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
10038 $as_echo_n "(cached) " >&6
10039else
10040
10041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10042/* end confdefs.h. */
10043#include <sys/socket.h>
10044int
10045main ()
10046{
10047
10048 ;
10049 return 0;
10050}
10051_ACEOF
10052if ac_fn_c_try_compile "$LINENO"; then :
10053 gl_cv_header_sys_socket_h_selfcontained=yes
10054else
10055 gl_cv_header_sys_socket_h_selfcontained=no
10056fi
10057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10058
10059fi
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
10061$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
10062 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
10063 for ac_func in shutdown
10064do :
10065 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
10066if test "x$ac_cv_func_shutdown" = xyes; then :
10067 cat >>confdefs.h <<_ACEOF
10068#define HAVE_SHUTDOWN 1
10069_ACEOF
10070
10071fi
10072done
10073
10074 if test $ac_cv_func_shutdown = yes; then
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
10076$as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
10077if ${gl_cv_header_sys_socket_h_shut+:} false; then :
10078 $as_echo_n "(cached) " >&6
10079else
10080
10081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10082/* end confdefs.h. */
10083#include <sys/socket.h>
10084int
10085main ()
10086{
10087int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
10088 ;
10089 return 0;
10090}
10091_ACEOF
10092if ac_fn_c_try_compile "$LINENO"; then :
10093 gl_cv_header_sys_socket_h_shut=yes
10094else
10095 gl_cv_header_sys_socket_h_shut=no
10096fi
10097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10098
10099fi
10100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
10101$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
10102 if test $gl_cv_header_sys_socket_h_shut = no; then
10103 SYS_SOCKET_H='sys/socket.h'
10104 fi
10105 fi
10106 fi
10107 # We need to check for ws2tcpip.h now.
10108
10109
10110
10111
10112
10113
10114
10115
10116 :
10117
10118
10119
10120
10121
10122
10123
10124
10125 if test $gl_cv_have_include_next = yes; then
10126 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
10127 else
10128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
10129$as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
10130if ${gl_cv_next_sys_socket_h+:} false; then :
10131 $as_echo_n "(cached) " >&6
10132else
10133
10134 if test $ac_cv_header_sys_socket_h = yes; then
10135
10136
10137
10138
10139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10140/* end confdefs.h. */
10141#include <sys/socket.h>
10142_ACEOF
10143 case "$host_os" in
10144 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10145 *) gl_absname_cpp="$ac_cpp" ;;
10146 esac
10147
10148 case "$host_os" in
10149 mingw*)
10150 gl_dirsep_regex='[/\\]'
10151 ;;
10152 *)
10153 gl_dirsep_regex='\/'
10154 ;;
10155 esac
10156 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10157 gl_header_literal_regex=`echo 'sys/socket.h' \
10158 | sed -e "$gl_make_literal_regex_sed"`
10159 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10160 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10161 s|^/[^/]|//&|
10162 p
10163 q
10164 }'
10165
10166 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10167 sed -n "$gl_absolute_header_sed"`
10168
10169 gl_header=$gl_cv_absolute_sys_socket_h
10170 gl_cv_next_sys_socket_h='"'$gl_header'"'
10171 else
10172 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
10173 fi
10174
10175
10176fi
10177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
10178$as_echo "$gl_cv_next_sys_socket_h" >&6; }
10179 fi
10180 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
10181
10182 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10183 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10184 gl_next_as_first_directive='<'sys/socket.h'>'
10185 else
10186 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10187 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
10188 fi
10189 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
10190
10191
10192
10193
10194 if test $ac_cv_header_sys_socket_h = yes; then
10195 HAVE_SYS_SOCKET_H=1
10196 HAVE_WS2TCPIP_H=0
10197 else
10198 HAVE_SYS_SOCKET_H=0
10199 if test $ac_cv_header_ws2tcpip_h = yes; then
10200 HAVE_WS2TCPIP_H=1
10201 else
10202 HAVE_WS2TCPIP_H=0
10203 fi
10204 fi
10205
10206
10207
10208 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
10209 /* sys/types.h is not needed according to POSIX, but the
10210 sys/socket.h in i386-unknown-freebsd4.10 and
10211 powerpc-apple-darwin5.5 required it. */
10212#include <sys/types.h>
10213#ifdef HAVE_SYS_SOCKET_H
10214#include <sys/socket.h>
10215#endif
10216#ifdef HAVE_WS2TCPIP_H
10217#include <ws2tcpip.h>
10218#endif
10219
10220"
10221if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10222
10223cat >>confdefs.h <<_ACEOF
10224#define HAVE_STRUCT_SOCKADDR_STORAGE 1
10225_ACEOF
10226
10227
10228fi
10229ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
10230 /* sys/types.h is not needed according to POSIX, but the
10231 sys/socket.h in i386-unknown-freebsd4.10 and
10232 powerpc-apple-darwin5.5 required it. */
10233#include <sys/types.h>
10234#ifdef HAVE_SYS_SOCKET_H
10235#include <sys/socket.h>
10236#endif
10237#ifdef HAVE_WS2TCPIP_H
10238#include <ws2tcpip.h>
10239#endif
10240
10241"
10242if test "x$ac_cv_type_sa_family_t" = xyes; then :
10243
10244cat >>confdefs.h <<_ACEOF
10245#define HAVE_SA_FAMILY_T 1
10246_ACEOF
10247
10248
10249fi
10250
10251 if test $ac_cv_type_struct_sockaddr_storage = no; then
10252 HAVE_STRUCT_SOCKADDR_STORAGE=0
10253 fi
10254 if test $ac_cv_type_sa_family_t = no; then
10255 HAVE_SA_FAMILY_T=0
10256 fi
10257 if test $ac_cv_type_struct_sockaddr_storage != no; then
10258 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10259 #ifdef HAVE_SYS_SOCKET_H
10260 #include <sys/socket.h>
10261 #endif
10262 #ifdef HAVE_WS2TCPIP_H
10263 #include <ws2tcpip.h>
10264 #endif
10265
10266"
10267if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10268
10269cat >>confdefs.h <<_ACEOF
10270#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10271_ACEOF
10272
10273
10274else
10275 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
10276fi
10277
10278 fi
10279 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
10280 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
10281 SYS_SOCKET_H='sys/socket.h'
10282 fi
10283
10284
10285
10286
10287 :
10288
10289
10290
10291
10292
10293 if test $ac_cv_header_sys_socket_h != yes; then
10294 for ac_header in winsock2.h
10295do :
10296 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
10297if test "x$ac_cv_header_winsock2_h" = xyes; then :
10298 cat >>confdefs.h <<_ACEOF
10299#define HAVE_WINSOCK2_H 1
10300_ACEOF
10301
10302fi
10303
10304done
10305
10306 fi
10307 if test "$ac_cv_header_winsock2_h" = yes; then
10308 HAVE_WINSOCK2_H=1
10309 UNISTD_H_HAVE_WINSOCK2_H=1
10310 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
10311 else
10312 HAVE_WINSOCK2_H=0
8690e634
JK
10313 fi
10314
10315
725e2999
JB
10316
10317
10318 for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do
5e8754f9
SDJ
10319 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10321$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10322if eval \${$as_gl_Symbol+:} false; then :
8690e634 10323 $as_echo_n "(cached) " >&6
8690e634
JK
10324else
10325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10326/* end confdefs.h. */
7a6dbc2f 10327
725e2999
JB
10328/* Some systems require prerequisite headers. */
10329#include <sys/types.h>
10330#include <sys/socket.h>
8690e634 10331
5e8754f9
SDJ
10332int
10333main ()
10334{
10335#undef $gl_func
10336 (void) $gl_func;
10337 ;
10338 return 0;
10339}
10340_ACEOF
10341if ac_fn_c_try_compile "$LINENO"; then :
10342 eval "$as_gl_Symbol=yes"
7a6dbc2f 10343else
5e8754f9
SDJ
10344 eval "$as_gl_Symbol=no"
10345fi
10346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 10347fi
5e8754f9
SDJ
10348eval ac_res=\$$as_gl_Symbol
10349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10350$as_echo "$ac_res" >&6; }
10351 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
10352 cat >>confdefs.h <<_ACEOF
10353#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10354_ACEOF
7a6dbc2f 10355
5e8754f9
SDJ
10356 eval ac_cv_have_decl_$gl_func=yes
10357fi
10358 done
8690e634 10359
8690e634 10360
8690e634
JK
10361
10362
10363
10364
10365
10366
88b48903 10367
8690e634 10368
725e2999
JB
10369 :
10370
10371
10372
8690e634 10373
8690e634
JK
10374
10375
725e2999
JB
10376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
10377$as_echo_n "checking for IPv4 sockets... " >&6; }
10378 if ${gl_cv_socket_ipv4+:} false; then :
10379 $as_echo_n "(cached) " >&6
10380else
10381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10382/* end confdefs.h. */
10383#include <sys/types.h>
10384#ifdef HAVE_SYS_SOCKET_H
10385#include <sys/socket.h>
10386#endif
10387#ifdef HAVE_NETINET_IN_H
10388#include <netinet/in.h>
10389#endif
10390#ifdef HAVE_WINSOCK2_H
10391#include <winsock2.h>
10392#endif
10393int
10394main ()
10395{
10396int x = AF_INET; struct in_addr y; struct sockaddr_in z;
10397 if (&x && &y && &z) return 0;
10398 ;
10399 return 0;
10400}
10401_ACEOF
10402if ac_fn_c_try_compile "$LINENO"; then :
10403 gl_cv_socket_ipv4=yes
10404else
10405 gl_cv_socket_ipv4=no
10406fi
10407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10408fi
10409
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
10411$as_echo "$gl_cv_socket_ipv4" >&6; }
10412 if test $gl_cv_socket_ipv4 = yes; then
8690e634 10413
725e2999 10414$as_echo "#define HAVE_IPV4 1" >>confdefs.h
8690e634 10415
725e2999 10416 fi
8690e634 10417
725e2999
JB
10418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
10419$as_echo_n "checking for IPv6 sockets... " >&6; }
10420 if ${gl_cv_socket_ipv6+:} false; then :
10421 $as_echo_n "(cached) " >&6
10422else
10423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10424/* end confdefs.h. */
10425#include <sys/types.h>
10426#ifdef HAVE_SYS_SOCKET_H
10427#include <sys/socket.h>
10428#endif
10429#ifdef HAVE_NETINET_IN_H
10430#include <netinet/in.h>
10431#endif
10432#ifdef HAVE_WINSOCK2_H
10433#include <winsock2.h>
10434#endif
10435#ifdef HAVE_WS2TCPIP_H
10436#include <ws2tcpip.h>
10437#endif
10438int
10439main ()
10440{
10441int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
10442 if (&x && &y && &z) return 0;
10443 ;
10444 return 0;
10445}
10446_ACEOF
10447if ac_fn_c_try_compile "$LINENO"; then :
10448 gl_cv_socket_ipv6=yes
10449else
10450 gl_cv_socket_ipv6=no
10451fi
10452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10453fi
49e4877c 10454
725e2999
JB
10455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
10456$as_echo "$gl_cv_socket_ipv6" >&6; }
10457 if test $gl_cv_socket_ipv6 = yes; then
49e4877c 10458
725e2999 10459$as_echo "#define HAVE_IPV6 1" >>confdefs.h
8690e634 10460
725e2999 10461 fi
8690e634 10462
472fa5ee
SM
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475 :
10476
10477
10478
10479
10480
8690e634
JK
10481
10482
10483
10484 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 10485 gl_cv_next_limits_h='<'limits.h'>'
8690e634 10486 else
6ec2e0f5
SDJ
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
10488$as_echo_n "checking absolute name of <limits.h>... " >&6; }
d0ac1c44 10489if ${gl_cv_next_limits_h+:} false; then :
8690e634
JK
10490 $as_echo_n "(cached) " >&6
10491else
10492
6ec2e0f5 10493 if test $ac_cv_header_limits_h = yes; then
8690e634
JK
10494
10495
4a626d0a
PA
10496
10497
10498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 10499/* end confdefs.h. */
6ec2e0f5 10500#include <limits.h>
8690e634 10501_ACEOF
4a626d0a
PA
10502 case "$host_os" in
10503 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10504 *) gl_absname_cpp="$ac_cpp" ;;
10505 esac
10506
10507 case "$host_os" in
10508 mingw*)
10509 gl_dirsep_regex='[/\\]'
10510 ;;
10511 *)
10512 gl_dirsep_regex='\/'
10513 ;;
10514 esac
10515 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 10516 gl_header_literal_regex=`echo 'limits.h' \
4a626d0a
PA
10517 | sed -e "$gl_make_literal_regex_sed"`
10518 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10519 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10520 s|^/[^/]|//&|
10521 p
10522 q
10523 }'
10524
6ec2e0f5 10525 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
10526 sed -n "$gl_absolute_header_sed"`
10527
6ec2e0f5
SDJ
10528 gl_header=$gl_cv_absolute_limits_h
10529 gl_cv_next_limits_h='"'$gl_header'"'
8690e634 10530 else
6ec2e0f5 10531 gl_cv_next_limits_h='<'limits.h'>'
8690e634
JK
10532 fi
10533
5e8754f9 10534
7a6dbc2f 10535fi
5e8754f9
SDJ
10536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
10537$as_echo "$gl_cv_next_limits_h" >&6; }
10538 fi
10539 NEXT_LIMITS_H=$gl_cv_next_limits_h
10540
10541 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10542 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10543 gl_next_as_first_directive='<'limits.h'>'
10544 else
10545 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10546 gl_next_as_first_directive=$gl_cv_next_limits_h
10547 fi
10548 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
7a6dbc2f 10549
7a6dbc2f
SDJ
10550
10551
5e8754f9
SDJ
10552
10553
10554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
10555$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
10556if ${gl_cv_header_limits_width+:} false; then :
6ec2e0f5
SDJ
10557 $as_echo_n "(cached) " >&6
10558else
10559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10560/* end confdefs.h. */
5e8754f9
SDJ
10561#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
10562 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
10563 #endif
10564 #include <limits.h>
10565 int ullw = ULLONG_WIDTH;
6ec2e0f5
SDJ
10566int
10567main ()
10568{
10569
10570 ;
10571 return 0;
10572}
10573_ACEOF
10574if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 10575 gl_cv_header_limits_width=yes
6ec2e0f5 10576else
5e8754f9 10577 gl_cv_header_limits_width=no
6ec2e0f5
SDJ
10578fi
10579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10580fi
5e8754f9
SDJ
10581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
10582$as_echo "$gl_cv_header_limits_width" >&6; }
10583 if test "$gl_cv_header_limits_width" = yes; then
10584 LIMITS_H=
8690e634 10585 else
5e8754f9 10586 LIMITS_H=limits.h
8690e634
JK
10587 fi
10588
5e8754f9
SDJ
10589 if test -n "$LIMITS_H"; then
10590 GL_GENERATE_LIMITS_H_TRUE=
10591 GL_GENERATE_LIMITS_H_FALSE='#'
10592else
10593 GL_GENERATE_LIMITS_H_TRUE='#'
10594 GL_GENERATE_LIMITS_H_FALSE=
10595fi
10596
8690e634 10597
6ec2e0f5
SDJ
10598
10599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
10600$as_echo_n "checking for unsigned long long int... " >&6; }
d0ac1c44 10601if ${ac_cv_type_unsigned_long_long_int+:} false; then :
8690e634
JK
10602 $as_echo_n "(cached) " >&6
10603else
6ec2e0f5
SDJ
10604 ac_cv_type_unsigned_long_long_int=yes
10605 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8690e634
JK
10606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10607/* end confdefs.h. */
10608
6ec2e0f5
SDJ
10609 /* For now, do not test the preprocessor; as of 2007 there are too many
10610 implementations with broken preprocessors. Perhaps this can
10611 be revisited in 2012. In the meantime, code should not expect
10612 #if to work with literals wider than 32 bits. */
10613 /* Test literals. */
10614 long long int ll = 9223372036854775807ll;
10615 long long int nll = -9223372036854775807LL;
10616 unsigned long long int ull = 18446744073709551615ULL;
10617 /* Test constant expressions. */
10618 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
10619 ? 1 : -1)];
10620 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
10621 ? 1 : -1)];
10622 int i = 63;
10623int
10624main ()
10625{
10626/* Test availability of runtime routines for shift and division. */
10627 long long int llmax = 9223372036854775807ll;
10628 unsigned long long int ullmax = 18446744073709551615ull;
10629 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
10630 | (llmax / ll) | (llmax % ll)
10631 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
10632 | (ullmax / ull) | (ullmax % ull));
10633 ;
10634 return 0;
10635}
8690e634 10636
6ec2e0f5
SDJ
10637_ACEOF
10638if ac_fn_c_try_link "$LINENO"; then :
8690e634 10639
6ec2e0f5
SDJ
10640else
10641 ac_cv_type_unsigned_long_long_int=no
10642fi
10643rm -f core conftest.err conftest.$ac_objext \
10644 conftest$ac_exeext conftest.$ac_ext
10645 fi
10646fi
10647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
10648$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
10649 if test $ac_cv_type_unsigned_long_long_int = yes; then
8690e634 10650
6ec2e0f5 10651$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8690e634 10652
6ec2e0f5 10653 fi
8690e634 10654
8690e634 10655
8690e634 10656
6ec2e0f5
SDJ
10657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
10658$as_echo_n "checking for long long int... " >&6; }
d0ac1c44 10659if ${ac_cv_type_long_long_int+:} false; then :
6ec2e0f5
SDJ
10660 $as_echo_n "(cached) " >&6
10661else
10662 ac_cv_type_long_long_int=yes
10663 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
10664 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
10665 if test $ac_cv_type_long_long_int = yes; then
10666 if test "$cross_compiling" = yes; then :
10667 :
8690e634
JK
10668else
10669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10670/* end confdefs.h. */
6ec2e0f5
SDJ
10671#include <limits.h>
10672 #ifndef LLONG_MAX
10673 # define HALF \
10674 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
10675 # define LLONG_MAX (HALF - 1 + HALF)
10676 #endif
8690e634
JK
10677int
10678main ()
10679{
6ec2e0f5
SDJ
10680long long int n = 1;
10681 int i;
10682 for (i = 0; ; i++)
10683 {
10684 long long int m = n << i;
10685 if (m >> i != n)
10686 return 1;
10687 if (LLONG_MAX / 2 < m)
10688 break;
10689 }
10690 return 0;
8690e634
JK
10691 ;
10692 return 0;
10693}
10694_ACEOF
10695if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5
SDJ
10696
10697else
10698 ac_cv_type_long_long_int=no
8690e634
JK
10699fi
10700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10701 conftest.$ac_objext conftest.beam conftest.$ac_ext
10702fi
10703
6ec2e0f5
SDJ
10704 fi
10705 fi
8690e634 10706fi
6ec2e0f5
SDJ
10707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
10708$as_echo "$ac_cv_type_long_long_int" >&6; }
10709 if test $ac_cv_type_long_long_int = yes; then
49e4877c 10710
6ec2e0f5 10711$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
49e4877c 10712
6ec2e0f5 10713 fi
49e4877c 10714
49e4877c
PA
10715
10716
49e4877c
PA
10717
10718
49e4877c 10719
472fa5ee
SM
10720
10721
10722
10723
10724
10725
6ec2e0f5
SDJ
10726 gl_cv_c_multiarch=no
10727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10728/* end confdefs.h. */
10729#ifndef __APPLE_CC__
10730 not a universal capable compiler
10731 #endif
10732 typedef int dummy;
49e4877c 10733
49e4877c
PA
10734_ACEOF
10735if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
10736
10737 arch=
10738 prev=
10739 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10740 if test -n "$prev"; then
10741 case $word in
10742 i?86 | x86_64 | ppc | ppc64)
10743 if test -z "$arch" || test "$arch" = "$word"; then
10744 arch="$word"
10745 else
10746 gl_cv_c_multiarch=yes
10747 fi
10748 ;;
10749 esac
10750 prev=
10751 else
10752 if test "x$word" = "x-arch"; then
10753 prev=arch
10754 fi
10755 fi
10756 done
10757
49e4877c
PA
10758fi
10759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
10760 if test $gl_cv_c_multiarch = yes; then
10761 APPLE_UNIVERSAL_BUILD=1
10762 else
10763 APPLE_UNIVERSAL_BUILD=0
10764 fi
49e4877c 10765
49e4877c 10766
49e4877c
PA
10767
10768
49e4877c 10769
49e4877c 10770
49e4877c 10771
6ec2e0f5
SDJ
10772 if test $ac_cv_type_long_long_int = yes; then
10773 HAVE_LONG_LONG_INT=1
10774 else
10775 HAVE_LONG_LONG_INT=0
10776 fi
49e4877c 10777
49e4877c 10778
6ec2e0f5
SDJ
10779 if test $ac_cv_type_unsigned_long_long_int = yes; then
10780 HAVE_UNSIGNED_LONG_LONG_INT=1
8690e634 10781 else
6ec2e0f5
SDJ
10782 HAVE_UNSIGNED_LONG_LONG_INT=0
10783 fi
8690e634 10784
8690e634 10785
8690e634 10786
472fa5ee
SM
10787 :
10788
10789
10790
10791
10792
6ec2e0f5
SDJ
10793 if test $ac_cv_header_wchar_h = yes; then
10794 HAVE_WCHAR_H=1
10795 else
10796 HAVE_WCHAR_H=0
10797 fi
8690e634
JK
10798
10799
6ec2e0f5
SDJ
10800 if test $ac_cv_header_inttypes_h = yes; then
10801 HAVE_INTTYPES_H=1
10802 else
10803 HAVE_INTTYPES_H=0
10804 fi
8690e634
JK
10805
10806
6ec2e0f5
SDJ
10807 if test $ac_cv_header_sys_types_h = yes; then
10808 HAVE_SYS_TYPES_H=1
10809 else
10810 HAVE_SYS_TYPES_H=0
10811 fi
8690e634 10812
8690e634 10813
8690e634 10814
8690e634 10815
8690e634 10816
8690e634
JK
10817
10818
8690e634 10819
472fa5ee
SM
10820 :
10821
10822
10823
10824
10825
8690e634 10826
6ec2e0f5
SDJ
10827
10828
10829 if test $gl_cv_have_include_next = yes; then
10830 gl_cv_next_stdint_h='<'stdint.h'>'
10831 else
10832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
10833$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
d0ac1c44 10834if ${gl_cv_next_stdint_h+:} false; then :
8690e634
JK
10835 $as_echo_n "(cached) " >&6
10836else
8690e634 10837
6ec2e0f5 10838 if test $ac_cv_header_stdint_h = yes; then
8690e634 10839
8690e634 10840
8690e634 10841
6ec2e0f5
SDJ
10842
10843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10844/* end confdefs.h. */
10845#include <stdint.h>
8690e634 10846_ACEOF
6ec2e0f5
SDJ
10847 case "$host_os" in
10848 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10849 *) gl_absname_cpp="$ac_cpp" ;;
10850 esac
8690e634 10851
6ec2e0f5
SDJ
10852 case "$host_os" in
10853 mingw*)
10854 gl_dirsep_regex='[/\\]'
10855 ;;
10856 *)
10857 gl_dirsep_regex='\/'
10858 ;;
10859 esac
10860 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10861 gl_header_literal_regex=`echo 'stdint.h' \
10862 | sed -e "$gl_make_literal_regex_sed"`
10863 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10864 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10865 s|^/[^/]|//&|
10866 p
10867 q
10868 }'
10869
10870 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10871 sed -n "$gl_absolute_header_sed"`
10872
10873 gl_header=$gl_cv_absolute_stdint_h
10874 gl_cv_next_stdint_h='"'$gl_header'"'
10875 else
10876 gl_cv_next_stdint_h='<'stdint.h'>'
10877 fi
10878
10879
10880fi
10881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
10882$as_echo "$gl_cv_next_stdint_h" >&6; }
10883 fi
10884 NEXT_STDINT_H=$gl_cv_next_stdint_h
10885
10886 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10887 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10888 gl_next_as_first_directive='<'stdint.h'>'
10889 else
10890 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10891 gl_next_as_first_directive=$gl_cv_next_stdint_h
10892 fi
10893 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
8690e634
JK
10894
10895
10896
10897
6ec2e0f5
SDJ
10898 if test $ac_cv_header_stdint_h = yes; then
10899 HAVE_STDINT_H=1
10900 else
10901 HAVE_STDINT_H=0
10902 fi
10903
10904
10905 if test $ac_cv_header_stdint_h = yes; then
10906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
10907$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
d0ac1c44 10908if ${gl_cv_header_working_stdint_h+:} false; then :
8690e634
JK
10909 $as_echo_n "(cached) " >&6
10910else
6ec2e0f5
SDJ
10911 gl_cv_header_working_stdint_h=no
10912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
10913/* end confdefs.h. */
10914
6ec2e0f5
SDJ
10915
10916#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10917#define __STDC_CONSTANT_MACROS 1
10918#define __STDC_LIMIT_MACROS 1
10919#include <stdint.h>
10920/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
10921#if !(defined WCHAR_MIN && defined WCHAR_MAX)
10922#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
10923#endif
10924
10925
8690e634
JK
10926 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10927 included before <wchar.h>. */
10928 #include <stddef.h>
10929 #include <signal.h>
10930 #if HAVE_WCHAR_H
10931 # include <stdio.h>
10932 # include <time.h>
10933 # include <wchar.h>
10934 #endif
10935
8690e634 10936
6ec2e0f5
SDJ
10937#ifdef INT8_MAX
10938int8_t a1 = INT8_MAX;
10939int8_t a1min = INT8_MIN;
10940#endif
10941#ifdef INT16_MAX
10942int16_t a2 = INT16_MAX;
10943int16_t a2min = INT16_MIN;
10944#endif
10945#ifdef INT32_MAX
10946int32_t a3 = INT32_MAX;
10947int32_t a3min = INT32_MIN;
10948#endif
10949#ifdef INT64_MAX
10950int64_t a4 = INT64_MAX;
10951int64_t a4min = INT64_MIN;
10952#endif
10953#ifdef UINT8_MAX
10954uint8_t b1 = UINT8_MAX;
10955#else
10956typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
10957#endif
10958#ifdef UINT16_MAX
10959uint16_t b2 = UINT16_MAX;
10960#endif
10961#ifdef UINT32_MAX
10962uint32_t b3 = UINT32_MAX;
10963#endif
10964#ifdef UINT64_MAX
10965uint64_t b4 = UINT64_MAX;
10966#endif
10967int_least8_t c1 = INT8_C (0x7f);
10968int_least8_t c1max = INT_LEAST8_MAX;
10969int_least8_t c1min = INT_LEAST8_MIN;
10970int_least16_t c2 = INT16_C (0x7fff);
10971int_least16_t c2max = INT_LEAST16_MAX;
10972int_least16_t c2min = INT_LEAST16_MIN;
10973int_least32_t c3 = INT32_C (0x7fffffff);
10974int_least32_t c3max = INT_LEAST32_MAX;
10975int_least32_t c3min = INT_LEAST32_MIN;
10976int_least64_t c4 = INT64_C (0x7fffffffffffffff);
10977int_least64_t c4max = INT_LEAST64_MAX;
10978int_least64_t c4min = INT_LEAST64_MIN;
10979uint_least8_t d1 = UINT8_C (0xff);
10980uint_least8_t d1max = UINT_LEAST8_MAX;
10981uint_least16_t d2 = UINT16_C (0xffff);
10982uint_least16_t d2max = UINT_LEAST16_MAX;
10983uint_least32_t d3 = UINT32_C (0xffffffff);
10984uint_least32_t d3max = UINT_LEAST32_MAX;
10985uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
10986uint_least64_t d4max = UINT_LEAST64_MAX;
10987int_fast8_t e1 = INT_FAST8_MAX;
10988int_fast8_t e1min = INT_FAST8_MIN;
10989int_fast16_t e2 = INT_FAST16_MAX;
10990int_fast16_t e2min = INT_FAST16_MIN;
10991int_fast32_t e3 = INT_FAST32_MAX;
10992int_fast32_t e3min = INT_FAST32_MIN;
10993int_fast64_t e4 = INT_FAST64_MAX;
10994int_fast64_t e4min = INT_FAST64_MIN;
10995uint_fast8_t f1 = UINT_FAST8_MAX;
10996uint_fast16_t f2 = UINT_FAST16_MAX;
10997uint_fast32_t f3 = UINT_FAST32_MAX;
10998uint_fast64_t f4 = UINT_FAST64_MAX;
10999#ifdef INTPTR_MAX
11000intptr_t g = INTPTR_MAX;
11001intptr_t gmin = INTPTR_MIN;
11002#endif
11003#ifdef UINTPTR_MAX
11004uintptr_t h = UINTPTR_MAX;
11005#endif
11006intmax_t i = INTMAX_MAX;
11007uintmax_t j = UINTMAX_MAX;
8690e634 11008
6ec2e0f5
SDJ
11009/* Check that SIZE_MAX has the correct type, if possible. */
11010#if 201112 <= __STDC_VERSION__
11011int k = _Generic (SIZE_MAX, size_t: 0);
11012#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
11013 || (0x5110 <= __SUNPRO_C && !__STDC__))
11014extern size_t k;
11015extern __typeof__ (SIZE_MAX) k;
11016#endif
8690e634 11017
6ec2e0f5
SDJ
11018#include <limits.h> /* for CHAR_BIT */
11019#define TYPE_MINIMUM(t) \
11020 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
11021#define TYPE_MAXIMUM(t) \
11022 ((t) ((t) 0 < (t) -1 \
11023 ? (t) -1 \
11024 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
11025struct s {
11026 int check_PTRDIFF:
11027 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
11028 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
11029 ? 1 : -1;
11030 /* Detect bug in FreeBSD 6.0 / ia64. */
11031 int check_SIG_ATOMIC:
11032 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
11033 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
11034 ? 1 : -1;
11035 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
11036 int check_WCHAR:
11037 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
11038 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
11039 ? 1 : -1;
11040 /* Detect bug in mingw. */
11041 int check_WINT:
11042 WINT_MIN == TYPE_MINIMUM (wint_t)
11043 && WINT_MAX == TYPE_MAXIMUM (wint_t)
11044 ? 1 : -1;
8690e634 11045
6ec2e0f5
SDJ
11046 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
11047 int check_UINT8_C:
11048 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
11049 int check_UINT16_C:
11050 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
8690e634 11051
6ec2e0f5
SDJ
11052 /* Detect bugs in OpenBSD 3.9 stdint.h. */
11053#ifdef UINT8_MAX
11054 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
11055#endif
11056#ifdef UINT16_MAX
11057 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
11058#endif
11059#ifdef UINT32_MAX
11060 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
11061#endif
11062#ifdef UINT64_MAX
11063 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
11064#endif
11065 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
11066 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
11067 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
11068 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
11069 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
11070 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
11071 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
11072 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
11073 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
11074 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
11075 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
11076};
8690e634 11077
8690e634
JK
11078int
11079main ()
11080{
11081
11082 ;
11083 return 0;
11084}
11085_ACEOF
11086if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11087 if test "$cross_compiling" = yes; then :
5e8754f9 11088 gl_cv_header_working_stdint_h=yes
8690e634 11089
6ec2e0f5
SDJ
11090else
11091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11092/* end confdefs.h. */
8690e634 11093
8690e634 11094
6ec2e0f5
SDJ
11095#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
11096#define __STDC_CONSTANT_MACROS 1
11097#define __STDC_LIMIT_MACROS 1
11098#include <stdint.h>
8690e634 11099
8690e634
JK
11100
11101 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11102 included before <wchar.h>. */
11103 #include <stddef.h>
11104 #include <signal.h>
11105 #if HAVE_WCHAR_H
11106 # include <stdio.h>
11107 # include <time.h>
11108 # include <wchar.h>
11109 #endif
11110
8690e634 11111
6ec2e0f5
SDJ
11112#include <stdio.h>
11113#include <string.h>
11114#define MVAL(macro) MVAL1(macro)
11115#define MVAL1(expression) #expression
11116static const char *macro_values[] =
11117 {
11118#ifdef INT8_MAX
11119 MVAL (INT8_MAX),
11120#endif
11121#ifdef INT16_MAX
11122 MVAL (INT16_MAX),
11123#endif
11124#ifdef INT32_MAX
11125 MVAL (INT32_MAX),
11126#endif
11127#ifdef INT64_MAX
11128 MVAL (INT64_MAX),
11129#endif
11130#ifdef UINT8_MAX
11131 MVAL (UINT8_MAX),
11132#endif
11133#ifdef UINT16_MAX
11134 MVAL (UINT16_MAX),
11135#endif
11136#ifdef UINT32_MAX
11137 MVAL (UINT32_MAX),
11138#endif
11139#ifdef UINT64_MAX
11140 MVAL (UINT64_MAX),
11141#endif
11142 NULL
11143 };
11144
11145int
11146main ()
11147{
11148
11149 const char **mv;
11150 for (mv = macro_values; *mv != NULL; mv++)
11151 {
11152 const char *value = *mv;
11153 /* Test whether it looks like a cast expression. */
11154 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
11155 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
11156 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
11157 || strncmp (value, "((int)"/*)*/, 6) == 0
11158 || strncmp (value, "((signed short)"/*)*/, 15) == 0
11159 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
11160 return mv - macro_values + 1;
11161 }
11162 return 0;
11163
11164 ;
8690e634
JK
11165 return 0;
11166}
11167_ACEOF
6ec2e0f5
SDJ
11168if ac_fn_c_try_run "$LINENO"; then :
11169 gl_cv_header_working_stdint_h=yes
8690e634 11170fi
6ec2e0f5
SDJ
11171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11172 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 11173fi
8690e634
JK
11174
11175
6ec2e0f5
SDJ
11176fi
11177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 11178
6ec2e0f5
SDJ
11179fi
11180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
11181$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8690e634
JK
11182 fi
11183
6ec2e0f5
SDJ
11184 HAVE_C99_STDINT_H=0
11185 HAVE_SYS_BITYPES_H=0
11186 HAVE_SYS_INTTYPES_H=0
11187 STDINT_H=stdint.h
5e8754f9
SDJ
11188 if test "$gl_cv_header_working_stdint_h" = yes; then
11189 HAVE_C99_STDINT_H=1
11190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
6ec2e0f5 11191$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
d0ac1c44 11192if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
6ec2e0f5 11193 $as_echo_n "(cached) " >&6
49e4877c 11194else
6ec2e0f5 11195 gl_cv_header_stdint_predates_cxx11_h=yes
5e8754f9 11196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 11197/* end confdefs.h. */
49e4877c
PA
11198
11199
6ec2e0f5
SDJ
11200#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
11201#include <stdint.h>
49e4877c
PA
11202
11203
6ec2e0f5
SDJ
11204 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11205 included before <wchar.h>. */
11206 #include <stddef.h>
11207 #include <signal.h>
11208 #if HAVE_WCHAR_H
11209 # include <stdio.h>
11210 # include <time.h>
11211 # include <wchar.h>
11212 #endif
49e4877c 11213
8690e634 11214
6ec2e0f5
SDJ
11215intmax_t im = INTMAX_MAX;
11216int32_t i32 = INT32_C (0x7fffffff);
8690e634 11217
6ec2e0f5
SDJ
11218int
11219main ()
11220{
8690e634 11221
6ec2e0f5
SDJ
11222 ;
11223 return 0;
11224}
11225_ACEOF
11226if ac_fn_c_try_compile "$LINENO"; then :
11227 gl_cv_header_stdint_predates_cxx11_h=no
11228fi
11229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11230fi
11231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
11232$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
8690e634 11233
5e8754f9 11234 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
8690e634 11235
6ec2e0f5 11236$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
8690e634
JK
11237
11238
6ec2e0f5 11239$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
8690e634 11240
5e8754f9
SDJ
11241 fi
11242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
6ec2e0f5 11243$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
d0ac1c44 11244if ${gl_cv_header_stdint_width+:} false; then :
6ec2e0f5
SDJ
11245 $as_echo_n "(cached) " >&6
11246else
11247 gl_cv_header_stdint_width=no
5e8754f9 11248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5 11249/* end confdefs.h. */
8690e634 11250
5e8754f9
SDJ
11251 /* Work if build is not clean. */
11252 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
11253 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
11254 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
11255 #endif
11256 #include <stdint.h>
8690e634 11257
6ec2e0f5
SDJ
11258 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11259 included before <wchar.h>. */
11260 #include <stddef.h>
11261 #include <signal.h>
11262 #if HAVE_WCHAR_H
11263 # include <stdio.h>
11264 # include <time.h>
11265 # include <wchar.h>
11266 #endif
8690e634 11267
5e8754f9 11268 int iw = UINTMAX_WIDTH;
8690e634 11269
6ec2e0f5
SDJ
11270int
11271main ()
11272{
8690e634 11273
6ec2e0f5
SDJ
11274 ;
11275 return 0;
11276}
11277_ACEOF
11278if ac_fn_c_try_compile "$LINENO"; then :
11279 gl_cv_header_stdint_width=yes
11280fi
11281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11282fi
11283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
11284$as_echo "$gl_cv_header_stdint_width" >&6; }
5e8754f9
SDJ
11285 if test "$gl_cv_header_stdint_width" = yes; then
11286 STDINT_H=
11287 fi
11288 else
11289 for ac_header in sys/inttypes.h sys/bitypes.h
6ec2e0f5
SDJ
11290do :
11291 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11292ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 11293if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6ec2e0f5
SDJ
11294 cat >>confdefs.h <<_ACEOF
11295#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11296_ACEOF
8690e634 11297
6ec2e0f5 11298fi
8690e634 11299
6ec2e0f5 11300done
8690e634 11301
5e8754f9
SDJ
11302 if test $ac_cv_header_sys_inttypes_h = yes; then
11303 HAVE_SYS_INTTYPES_H=1
11304 fi
11305 if test $ac_cv_header_sys_bitypes_h = yes; then
11306 HAVE_SYS_BITYPES_H=1
11307 fi
8690e634
JK
11308
11309
6ec2e0f5 11310 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634
JK
11311
11312
6ec2e0f5
SDJ
11313 for gltype in ptrdiff_t size_t ; do
11314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11315$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 11316if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
8690e634
JK
11317 $as_echo_n "(cached) " >&6
11318else
6ec2e0f5
SDJ
11319 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11320 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11321 included before <wchar.h>. */
11322 #include <stddef.h>
11323 #include <signal.h>
11324 #if HAVE_WCHAR_H
11325 # include <stdio.h>
11326 # include <time.h>
11327 # include <wchar.h>
11328 #endif
8690e634 11329
6ec2e0f5 11330#include <limits.h>"; then :
4a626d0a 11331
6ec2e0f5
SDJ
11332else
11333 result=unknown
11334fi
4a626d0a 11335
6ec2e0f5 11336 eval gl_cv_bitsizeof_${gltype}=\$result
4a626d0a 11337
6ec2e0f5
SDJ
11338fi
11339eval ac_res=\$gl_cv_bitsizeof_${gltype}
11340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11341$as_echo "$ac_res" >&6; }
11342 eval result=\$gl_cv_bitsizeof_${gltype}
11343 if test $result = unknown; then
11344 result=0
11345 fi
11346 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11347 cat >>confdefs.h <<_ACEOF
11348#define BITSIZEOF_${GLTYPE} $result
11349_ACEOF
4a626d0a 11350
6ec2e0f5
SDJ
11351 eval BITSIZEOF_${GLTYPE}=\$result
11352 done
4a626d0a 11353
8690e634 11354
6ec2e0f5 11355 fi
8690e634 11356
8690e634 11357
6ec2e0f5
SDJ
11358 for gltype in sig_atomic_t wchar_t wint_t ; do
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11360$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 11361if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
6ec2e0f5
SDJ
11362 $as_echo_n "(cached) " >&6
11363else
11364 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11365 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11366 included before <wchar.h>. */
11367 #include <stddef.h>
11368 #include <signal.h>
11369 #if HAVE_WCHAR_H
11370 # include <stdio.h>
11371 # include <time.h>
11372 # include <wchar.h>
11373 #endif
8690e634 11374
6ec2e0f5
SDJ
11375#include <limits.h>"; then :
11376
11377else
11378 result=unknown
11379fi
8690e634 11380
6ec2e0f5 11381 eval gl_cv_bitsizeof_${gltype}=\$result
8690e634 11382
6ec2e0f5
SDJ
11383fi
11384eval ac_res=\$gl_cv_bitsizeof_${gltype}
11385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11386$as_echo "$ac_res" >&6; }
11387 eval result=\$gl_cv_bitsizeof_${gltype}
11388 if test $result = unknown; then
11389 result=0
11390 fi
11391 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11392 cat >>confdefs.h <<_ACEOF
11393#define BITSIZEOF_${GLTYPE} $result
11394_ACEOF
8690e634 11395
6ec2e0f5
SDJ
11396 eval BITSIZEOF_${GLTYPE}=\$result
11397 done
8690e634
JK
11398
11399
11400
11401
6ec2e0f5
SDJ
11402 for gltype in sig_atomic_t wchar_t wint_t ; do
11403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
11404$as_echo_n "checking whether $gltype is signed... " >&6; }
d0ac1c44 11405if eval \${gl_cv_type_${gltype}_signed+:} false; then :
8690e634
JK
11406 $as_echo_n "(cached) " >&6
11407else
11408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11409/* end confdefs.h. */
8690e634 11410
6ec2e0f5
SDJ
11411 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11412 included before <wchar.h>. */
11413 #include <stddef.h>
11414 #include <signal.h>
11415 #if HAVE_WCHAR_H
11416 # include <stdio.h>
11417 # include <time.h>
11418 # include <wchar.h>
11419 #endif
11420
11421 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8690e634
JK
11422int
11423main ()
11424{
6ec2e0f5 11425
8690e634
JK
11426 ;
11427 return 0;
11428}
11429_ACEOF
11430if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11431 result=yes
8690e634 11432else
6ec2e0f5 11433 result=no
8690e634
JK
11434fi
11435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11436 eval gl_cv_type_${gltype}_signed=\$result
11437
8690e634 11438fi
6ec2e0f5 11439eval ac_res=\$gl_cv_type_${gltype}_signed
8690e634
JK
11440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11441$as_echo "$ac_res" >&6; }
6ec2e0f5
SDJ
11442 eval result=\$gl_cv_type_${gltype}_signed
11443 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11444 if test "$result" = yes; then
11445 cat >>confdefs.h <<_ACEOF
11446#define HAVE_SIGNED_${GLTYPE} 1
8690e634
JK
11447_ACEOF
11448
6ec2e0f5
SDJ
11449 eval HAVE_SIGNED_${GLTYPE}=1
11450 else
11451 eval HAVE_SIGNED_${GLTYPE}=0
11452 fi
11453 done
8690e634 11454
8690e634 11455
6ec2e0f5
SDJ
11456 gl_cv_type_ptrdiff_t_signed=yes
11457 gl_cv_type_size_t_signed=no
11458 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634 11459
8690e634 11460
6ec2e0f5
SDJ
11461 for gltype in ptrdiff_t size_t ; do
11462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11463$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 11464if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
11465 $as_echo_n "(cached) " >&6
11466else
6ec2e0f5
SDJ
11467 eval gl_cv_type_${gltype}_suffix=no
11468 eval result=\$gl_cv_type_${gltype}_signed
11469 if test "$result" = yes; then
11470 glsufu=
11471 else
11472 glsufu=u
11473 fi
11474 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11475 case $glsuf in
11476 '') gltype1='int';;
11477 l) gltype1='long int';;
11478 ll) gltype1='long long int';;
11479 i64) gltype1='__int64';;
11480 u) gltype1='unsigned int';;
11481 ul) gltype1='unsigned long int';;
11482 ull) gltype1='unsigned long long int';;
11483 ui64)gltype1='unsigned __int64';;
11484 esac
11485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
11486/* end confdefs.h. */
11487
6ec2e0f5
SDJ
11488 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11489 included before <wchar.h>. */
11490 #include <stddef.h>
11491 #include <signal.h>
11492 #if HAVE_WCHAR_H
11493 # include <stdio.h>
11494 # include <time.h>
11495 # include <wchar.h>
11496 #endif
8690e634 11497
6ec2e0f5
SDJ
11498 extern $gltype foo;
11499 extern $gltype1 foo;
8690e634
JK
11500int
11501main ()
11502{
11503
11504 ;
11505 return 0;
11506}
11507_ACEOF
11508if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11509 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634
JK
11510fi
11511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11512 eval result=\$gl_cv_type_${gltype}_suffix
11513 test "$result" != no && break
11514 done
8690e634 11515fi
6ec2e0f5
SDJ
11516eval ac_res=\$gl_cv_type_${gltype}_suffix
11517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11518$as_echo "$ac_res" >&6; }
11519 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11520 eval result=\$gl_cv_type_${gltype}_suffix
11521 test "$result" = no && result=
11522 eval ${GLTYPE}_SUFFIX=\$result
11523 cat >>confdefs.h <<_ACEOF
11524#define ${GLTYPE}_SUFFIX $result
8690e634
JK
11525_ACEOF
11526
6ec2e0f5 11527 done
8690e634
JK
11528
11529
6ec2e0f5 11530 fi
8690e634 11531
6ec2e0f5
SDJ
11532
11533 for gltype in sig_atomic_t wchar_t wint_t ; do
11534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11535$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 11536if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
11537 $as_echo_n "(cached) " >&6
11538else
6ec2e0f5
SDJ
11539 eval gl_cv_type_${gltype}_suffix=no
11540 eval result=\$gl_cv_type_${gltype}_signed
11541 if test "$result" = yes; then
11542 glsufu=
11543 else
11544 glsufu=u
11545 fi
11546 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11547 case $glsuf in
11548 '') gltype1='int';;
11549 l) gltype1='long int';;
11550 ll) gltype1='long long int';;
11551 i64) gltype1='__int64';;
11552 u) gltype1='unsigned int';;
11553 ul) gltype1='unsigned long int';;
11554 ull) gltype1='unsigned long long int';;
11555 ui64)gltype1='unsigned __int64';;
11556 esac
11557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 11558/* end confdefs.h. */
88b48903 11559
6ec2e0f5
SDJ
11560 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11561 included before <wchar.h>. */
11562 #include <stddef.h>
11563 #include <signal.h>
11564 #if HAVE_WCHAR_H
11565 # include <stdio.h>
11566 # include <time.h>
11567 # include <wchar.h>
11568 #endif
88b48903 11569
6ec2e0f5
SDJ
11570 extern $gltype foo;
11571 extern $gltype1 foo;
88b48903
WN
11572int
11573main ()
11574{
88b48903
WN
11575
11576 ;
11577 return 0;
11578}
11579_ACEOF
11580if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 11581 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634 11582fi
88b48903 11583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
11584 eval result=\$gl_cv_type_${gltype}_suffix
11585 test "$result" != no && break
11586 done
8690e634 11587fi
6ec2e0f5
SDJ
11588eval ac_res=\$gl_cv_type_${gltype}_suffix
11589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11590$as_echo "$ac_res" >&6; }
11591 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11592 eval result=\$gl_cv_type_${gltype}_suffix
11593 test "$result" = no && result=
11594 eval ${GLTYPE}_SUFFIX=\$result
11595 cat >>confdefs.h <<_ACEOF
11596#define ${GLTYPE}_SUFFIX $result
88b48903 11597_ACEOF
8690e634 11598
6ec2e0f5 11599 done
8690e634
JK
11600
11601
11602
5e8754f9 11603 if test $BITSIZEOF_WINT_T -lt 32; then
6ec2e0f5
SDJ
11604 BITSIZEOF_WINT_T=32
11605 fi
8690e634 11606
5e8754f9 11607 fi
7a6dbc2f 11608
5e8754f9
SDJ
11609 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
11610 LIMITS_H=limits.h
6ec2e0f5
SDJ
11611 if test -n "$LIMITS_H"; then
11612 GL_GENERATE_LIMITS_H_TRUE=
11613 GL_GENERATE_LIMITS_H_FALSE='#'
88b48903 11614else
6ec2e0f5
SDJ
11615 GL_GENERATE_LIMITS_H_TRUE='#'
11616 GL_GENERATE_LIMITS_H_FALSE=
88b48903 11617fi
8690e634
JK
11618
11619
11620
11621
11622
6ec2e0f5
SDJ
11623
11624 if test -n "$STDINT_H"; then
11625 GL_GENERATE_STDINT_H_TRUE=
11626 GL_GENERATE_STDINT_H_FALSE='#'
11627else
11628 GL_GENERATE_STDINT_H_TRUE='#'
11629 GL_GENERATE_STDINT_H_FALSE=
88b48903 11630fi
8690e634 11631
8690e634
JK
11632
11633
11634
6ec2e0f5 11635
472fa5ee
SM
11636
11637
11638
6ec2e0f5
SDJ
11639 GNULIB_IMAXABS=0;
11640 GNULIB_IMAXDIV=0;
11641 GNULIB_STRTOIMAX=0;
11642 GNULIB_STRTOUMAX=0;
11643 HAVE_DECL_IMAXABS=1;
11644 HAVE_DECL_IMAXDIV=1;
11645 HAVE_DECL_STRTOIMAX=1;
11646 HAVE_DECL_STRTOUMAX=1;
11647 REPLACE_STRTOIMAX=0;
11648 REPLACE_STRTOUMAX=0;
11649 INT32_MAX_LT_INTMAX_MAX=1;
11650 INT64_MAX_EQ_LONG_MAX='defined _LP64';
11651 PRI_MACROS_BROKEN=0;
11652 PRIPTR_PREFIX=__PRIPTR_PREFIX;
11653 UINT32_MAX_LT_UINTMAX_MAX=1;
11654 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
11655
11656
11657
11658
472fa5ee
SM
11659 :
11660
11661
11662
11663
11664
11665
11666
6ec2e0f5
SDJ
11667
11668
11669
11670
11671
11672
472fa5ee
SM
11673 :
11674
11675
11676
6ec2e0f5
SDJ
11677
11678
11679
11680
11681
11682 if test $gl_cv_have_include_next = yes; then
11683 gl_cv_next_inttypes_h='<'inttypes.h'>'
11684 else
11685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
11686$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
d0ac1c44 11687if ${gl_cv_next_inttypes_h+:} false; then :
6ec2e0f5 11688 $as_echo_n "(cached) " >&6
88b48903 11689else
8690e634 11690
6ec2e0f5 11691 if test $ac_cv_header_inttypes_h = yes; then
8690e634
JK
11692
11693
8690e634
JK
11694
11695
6ec2e0f5
SDJ
11696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11697/* end confdefs.h. */
11698#include <inttypes.h>
88b48903 11699_ACEOF
6ec2e0f5
SDJ
11700 case "$host_os" in
11701 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11702 *) gl_absname_cpp="$ac_cpp" ;;
11703 esac
8690e634 11704
6ec2e0f5
SDJ
11705 case "$host_os" in
11706 mingw*)
11707 gl_dirsep_regex='[/\\]'
11708 ;;
11709 *)
11710 gl_dirsep_regex='\/'
88b48903
WN
11711 ;;
11712 esac
6ec2e0f5
SDJ
11713 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11714 gl_header_literal_regex=`echo 'inttypes.h' \
11715 | sed -e "$gl_make_literal_regex_sed"`
11716 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11717 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11718 s|^/[^/]|//&|
11719 p
11720 q
11721 }'
8690e634 11722
6ec2e0f5
SDJ
11723 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11724 sed -n "$gl_absolute_header_sed"`
8690e634 11725
6ec2e0f5
SDJ
11726 gl_header=$gl_cv_absolute_inttypes_h
11727 gl_cv_next_inttypes_h='"'$gl_header'"'
11728 else
11729 gl_cv_next_inttypes_h='<'inttypes.h'>'
11730 fi
88b48903 11731
88b48903 11732
88b48903 11733fi
6ec2e0f5
SDJ
11734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
11735$as_echo "$gl_cv_next_inttypes_h" >&6; }
11736 fi
11737 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
88b48903 11738
6ec2e0f5
SDJ
11739 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11740 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11741 gl_next_as_first_directive='<'inttypes.h'>'
11742 else
11743 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11744 gl_next_as_first_directive=$gl_cv_next_inttypes_h
11745 fi
11746 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
88b48903 11747
6ec2e0f5
SDJ
11748
11749
11750
11751
11752
11753
11754
5e8754f9
SDJ
11755 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
11756 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11758$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11759if eval \${$as_gl_Symbol+:} false; then :
11760 $as_echo_n "(cached) " >&6
11761else
11762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11763/* end confdefs.h. */
11764#include <inttypes.h>
11765
11766int
11767main ()
11768{
11769#undef $gl_func
11770 (void) $gl_func;
11771 ;
11772 return 0;
11773}
11774_ACEOF
11775if ac_fn_c_try_compile "$LINENO"; then :
11776 eval "$as_gl_Symbol=yes"
11777else
11778 eval "$as_gl_Symbol=no"
11779fi
11780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11781fi
11782eval ac_res=\$$as_gl_Symbol
11783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11784$as_echo "$ac_res" >&6; }
11785 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11786 cat >>confdefs.h <<_ACEOF
11787#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11788_ACEOF
6ec2e0f5 11789
5e8754f9
SDJ
11790 eval ac_cv_have_decl_$gl_func=yes
11791fi
11792 done
6ec2e0f5
SDJ
11793
11794
11795
11796 for ac_header in inttypes.h
11797do :
11798 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
d0ac1c44 11799if test "x$ac_cv_header_inttypes_h" = xyes; then :
6ec2e0f5
SDJ
11800 cat >>confdefs.h <<_ACEOF
11801#define HAVE_INTTYPES_H 1
11802_ACEOF
11803
11804fi
11805
11806done
11807
11808 if test $ac_cv_header_inttypes_h = yes; then
11809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
11810$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
d0ac1c44 11811if ${gt_cv_inttypes_pri_broken+:} false; then :
6ec2e0f5
SDJ
11812 $as_echo_n "(cached) " >&6
11813else
11814
11815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11816/* end confdefs.h. */
11817
11818#include <inttypes.h>
11819#ifdef PRId32
11820char *p = PRId32;
11821#endif
11822
11823int
11824main ()
11825{
11826
11827 ;
11828 return 0;
11829}
11830_ACEOF
11831if ac_fn_c_try_compile "$LINENO"; then :
11832 gt_cv_inttypes_pri_broken=no
11833else
11834 gt_cv_inttypes_pri_broken=yes
11835fi
11836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11837
11838fi
11839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
11840$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
11841 fi
11842 if test "$gt_cv_inttypes_pri_broken" = yes; then
11843
11844cat >>confdefs.h <<_ACEOF
11845#define PRI_MACROS_BROKEN 1
11846_ACEOF
11847
11848 PRI_MACROS_BROKEN=1
11849 else
11850 PRI_MACROS_BROKEN=0
11851 fi
11852
11853
11854
11855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
11856$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
d0ac1c44 11857if ${gl_cv_cc_double_expbit0+:} false; then :
6ec2e0f5
SDJ
11858 $as_echo_n "(cached) " >&6
11859else
11860
11861 if test "$cross_compiling" = yes; then :
11862
11863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11864/* end confdefs.h. */
11865
11866#if defined arm || defined __arm || defined __arm__
11867 mixed_endianness
11868#endif
11869
11870_ACEOF
11871if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11872 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
11873 gl_cv_cc_double_expbit0="unknown"
11874else
11875
11876 :
d0ac1c44 11877if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
11878 $as_echo_n "(cached) " >&6
11879else
11880 ac_cv_c_bigendian=unknown
11881 # See if we're dealing with a universal compiler.
11882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11883/* end confdefs.h. */
11884#ifndef __APPLE_CC__
11885 not a universal capable compiler
11886 #endif
11887 typedef int dummy;
11888
11889_ACEOF
11890if ac_fn_c_try_compile "$LINENO"; then :
11891
11892 # Check for potential -arch flags. It is not universal unless
11893 # there are at least two -arch flags with different values.
11894 ac_arch=
11895 ac_prev=
11896 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11897 if test -n "$ac_prev"; then
11898 case $ac_word in
11899 i?86 | x86_64 | ppc | ppc64)
11900 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11901 ac_arch=$ac_word
11902 else
11903 ac_cv_c_bigendian=universal
11904 break
11905 fi
11906 ;;
11907 esac
11908 ac_prev=
11909 elif test "x$ac_word" = "x-arch"; then
11910 ac_prev=arch
11911 fi
11912 done
11913fi
11914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11915 if test $ac_cv_c_bigendian = unknown; then
11916 # See if sys/param.h defines the BYTE_ORDER macro.
11917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11918/* end confdefs.h. */
11919#include <sys/types.h>
11920 #include <sys/param.h>
11921
11922int
11923main ()
11924{
11925#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11926 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11927 && LITTLE_ENDIAN)
11928 bogus endian macros
11929 #endif
11930
11931 ;
11932 return 0;
11933}
11934_ACEOF
11935if ac_fn_c_try_compile "$LINENO"; then :
11936 # It does; now see whether it defined to BIG_ENDIAN or not.
11937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11938/* end confdefs.h. */
11939#include <sys/types.h>
11940 #include <sys/param.h>
11941
11942int
11943main ()
11944{
11945#if BYTE_ORDER != BIG_ENDIAN
11946 not big endian
11947 #endif
11948
11949 ;
11950 return 0;
11951}
11952_ACEOF
11953if ac_fn_c_try_compile "$LINENO"; then :
11954 ac_cv_c_bigendian=yes
11955else
11956 ac_cv_c_bigendian=no
11957fi
11958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11959fi
11960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11961 fi
11962 if test $ac_cv_c_bigendian = unknown; then
11963 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11965/* end confdefs.h. */
11966#include <limits.h>
11967
11968int
88b48903
WN
11969main ()
11970{
11971#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11972 bogus endian macros
11973 #endif
11974
11975 ;
11976 return 0;
11977}
11978_ACEOF
11979if ac_fn_c_try_compile "$LINENO"; then :
11980 # It does; now see whether it defined to _BIG_ENDIAN or not.
11981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11982/* end confdefs.h. */
11983#include <limits.h>
11984
11985int
11986main ()
11987{
11988#ifndef _BIG_ENDIAN
11989 not big endian
11990 #endif
11991
11992 ;
11993 return 0;
11994}
11995_ACEOF
11996if ac_fn_c_try_compile "$LINENO"; then :
11997 ac_cv_c_bigendian=yes
11998else
11999 ac_cv_c_bigendian=no
12000fi
12001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12002fi
12003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12004 fi
12005 if test $ac_cv_c_bigendian = unknown; then
12006 # Compile a test program.
12007 if test "$cross_compiling" = yes; then :
12008 # Try to guess by grepping values from an object file.
12009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12010/* end confdefs.h. */
12011short int ascii_mm[] =
12012 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12013 short int ascii_ii[] =
12014 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12015 int use_ascii (int i) {
12016 return ascii_mm[i] + ascii_ii[i];
12017 }
12018 short int ebcdic_ii[] =
12019 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12020 short int ebcdic_mm[] =
12021 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12022 int use_ebcdic (int i) {
12023 return ebcdic_mm[i] + ebcdic_ii[i];
12024 }
12025 extern int foo;
12026
12027int
12028main ()
12029{
12030return use_ascii (foo) == use_ebcdic (foo);
12031 ;
12032 return 0;
12033}
12034_ACEOF
12035if ac_fn_c_try_compile "$LINENO"; then :
12036 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12037 ac_cv_c_bigendian=yes
12038 fi
12039 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12040 if test "$ac_cv_c_bigendian" = unknown; then
12041 ac_cv_c_bigendian=no
12042 else
12043 # finding both strings is unlikely to happen, but who knows?
12044 ac_cv_c_bigendian=unknown
12045 fi
12046 fi
12047fi
12048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12049else
12050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12051/* end confdefs.h. */
12052$ac_includes_default
12053int
12054main ()
12055{
12056
12057 /* Are we little or big endian? From Harbison&Steele. */
12058 union
12059 {
12060 long int l;
12061 char c[sizeof (long int)];
12062 } u;
12063 u.l = 1;
12064 return u.c[sizeof (long int) - 1] == 1;
12065
12066 ;
12067 return 0;
12068}
12069_ACEOF
12070if ac_fn_c_try_run "$LINENO"; then :
12071 ac_cv_c_bigendian=no
12072else
12073 ac_cv_c_bigendian=yes
12074fi
12075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12076 conftest.$ac_objext conftest.beam conftest.$ac_ext
12077fi
12078
12079 fi
12080fi
6ec2e0f5 12081:
88b48903
WN
12082 case $ac_cv_c_bigendian in #(
12083 yes)
6ec2e0f5 12084 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
88b48903 12085 no)
6ec2e0f5 12086 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
88b48903
WN
12087 universal)
12088
12089$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12090
12091 ;; #(
12092 *)
6ec2e0f5 12093 gl_cv_cc_double_expbit0="unknown" ;;
88b48903
WN
12094 esac
12095
12096
6ec2e0f5
SDJ
12097fi
12098rm -f conftest*
88b48903 12099
2196f55f 12100
2196f55f
YQ
12101else
12102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12103/* end confdefs.h. */
2196f55f 12104
6ec2e0f5
SDJ
12105#include <float.h>
12106#include <stddef.h>
12107#include <stdio.h>
12108#include <string.h>
12109#define NWORDS \
12110 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
12111typedef union { double value; unsigned int word[NWORDS]; } memory_double;
12112static unsigned int ored_words[NWORDS];
12113static unsigned int anded_words[NWORDS];
12114static void add_to_ored_words (double x)
2196f55f 12115{
6ec2e0f5
SDJ
12116 memory_double m;
12117 size_t i;
12118 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
12119 memset (&m, 0, sizeof (memory_double));
12120 m.value = x;
12121 for (i = 0; i < NWORDS; i++)
12122 {
12123 ored_words[i] |= m.word[i];
12124 anded_words[i] &= m.word[i];
12125 }
2196f55f 12126}
6ec2e0f5 12127int main ()
88b48903 12128{
6ec2e0f5
SDJ
12129 size_t j;
12130 FILE *fp = fopen ("conftest.out", "w");
12131 if (fp == NULL)
12132 return 1;
12133 for (j = 0; j < NWORDS; j++)
12134 anded_words[j] = ~ (unsigned int) 0;
12135 add_to_ored_words (0.25);
12136 add_to_ored_words (0.5);
12137 add_to_ored_words (1.0);
12138 add_to_ored_words (2.0);
12139 add_to_ored_words (4.0);
12140 /* Remove bits that are common (e.g. if representation of the first mantissa
12141 bit is explicit). */
12142 for (j = 0; j < NWORDS; j++)
12143 ored_words[j] &= ~anded_words[j];
12144 /* Now find the nonzero word. */
12145 for (j = 0; j < NWORDS; j++)
12146 if (ored_words[j] != 0)
12147 break;
12148 if (j < NWORDS)
12149 {
12150 size_t i;
12151 for (i = j + 1; i < NWORDS; i++)
12152 if (ored_words[i] != 0)
12153 {
12154 fprintf (fp, "unknown");
12155 return (fclose (fp) != 0);
12156 }
12157 for (i = 0; ; i++)
12158 if ((ored_words[j] >> i) & 1)
12159 {
12160 fprintf (fp, "word %d bit %d", (int) j, (int) i);
12161 return (fclose (fp) != 0);
12162 }
12163 }
12164 fprintf (fp, "unknown");
12165 return (fclose (fp) != 0);
88b48903 12166}
6ec2e0f5 12167
88b48903 12168_ACEOF
6ec2e0f5
SDJ
12169if ac_fn_c_try_run "$LINENO"; then :
12170 gl_cv_cc_double_expbit0=`cat conftest.out`
88b48903 12171else
6ec2e0f5 12172 gl_cv_cc_double_expbit0="unknown"
88b48903 12173fi
6ec2e0f5
SDJ
12174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12175 conftest.$ac_objext conftest.beam conftest.$ac_ext
12176fi
12177
12178 rm -f conftest.out
88b48903
WN
12179
12180fi
6ec2e0f5
SDJ
12181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
12182$as_echo "$gl_cv_cc_double_expbit0" >&6; }
12183 case "$gl_cv_cc_double_expbit0" in
12184 word*bit*)
12185 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
12186 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
88b48903 12187
6ec2e0f5
SDJ
12188cat >>confdefs.h <<_ACEOF
12189#define DBL_EXPBIT0_WORD $word
12190_ACEOF
88b48903 12191
88b48903 12192
6ec2e0f5
SDJ
12193cat >>confdefs.h <<_ACEOF
12194#define DBL_EXPBIT0_BIT $bit
12195_ACEOF
88b48903 12196
6ec2e0f5
SDJ
12197 ;;
12198 esac
88b48903
WN
12199
12200
6ec2e0f5
SDJ
12201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12202$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 12203if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
12204 $as_echo_n "(cached) " >&6
12205else
12206 ac_cv_c_bigendian=unknown
12207 # See if we're dealing with a universal compiler.
12208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12209/* end confdefs.h. */
12210#ifndef __APPLE_CC__
12211 not a universal capable compiler
12212 #endif
12213 typedef int dummy;
88b48903 12214
6ec2e0f5
SDJ
12215_ACEOF
12216if ac_fn_c_try_compile "$LINENO"; then :
88b48903 12217
6ec2e0f5
SDJ
12218 # Check for potential -arch flags. It is not universal unless
12219 # there are at least two -arch flags with different values.
12220 ac_arch=
12221 ac_prev=
12222 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12223 if test -n "$ac_prev"; then
12224 case $ac_word in
12225 i?86 | x86_64 | ppc | ppc64)
12226 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12227 ac_arch=$ac_word
12228 else
12229 ac_cv_c_bigendian=universal
12230 break
12231 fi
12232 ;;
12233 esac
12234 ac_prev=
12235 elif test "x$ac_word" = "x-arch"; then
12236 ac_prev=arch
12237 fi
12238 done
12239fi
12240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12241 if test $ac_cv_c_bigendian = unknown; then
12242 # See if sys/param.h defines the BYTE_ORDER macro.
12243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12244/* end confdefs.h. */
12245#include <sys/types.h>
12246 #include <sys/param.h>
88b48903 12247
6ec2e0f5
SDJ
12248int
12249main ()
12250{
12251#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12252 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12253 && LITTLE_ENDIAN)
12254 bogus endian macros
12255 #endif
88b48903 12256
6ec2e0f5
SDJ
12257 ;
12258 return 0;
12259}
12260_ACEOF
12261if ac_fn_c_try_compile "$LINENO"; then :
12262 # It does; now see whether it defined to BIG_ENDIAN or not.
12263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903
WN
12264/* end confdefs.h. */
12265#include <sys/types.h>
6ec2e0f5 12266 #include <sys/param.h>
8690e634
JK
12267
12268int
12269main ()
12270{
6ec2e0f5
SDJ
12271#if BYTE_ORDER != BIG_ENDIAN
12272 not big endian
12273 #endif
8690e634 12274
8690e634
JK
12275 ;
12276 return 0;
12277}
12278_ACEOF
6ec2e0f5
SDJ
12279if ac_fn_c_try_compile "$LINENO"; then :
12280 ac_cv_c_bigendian=yes
8690e634 12281else
6ec2e0f5 12282 ac_cv_c_bigendian=no
8690e634 12283fi
6ec2e0f5 12284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 12285fi
6ec2e0f5
SDJ
12286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12287 fi
12288 if test $ac_cv_c_bigendian = unknown; then
12289 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12291/* end confdefs.h. */
12292#include <limits.h>
12293
12294int
12295main ()
12296{
12297#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12298 bogus endian macros
12299 #endif
12300
12301 ;
12302 return 0;
12303}
12304_ACEOF
12305if ac_fn_c_try_compile "$LINENO"; then :
12306 # It does; now see whether it defined to _BIG_ENDIAN or not.
12307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12308/* end confdefs.h. */
12309#include <limits.h>
8690e634 12310
6ec2e0f5
SDJ
12311int
12312main ()
12313{
12314#ifndef _BIG_ENDIAN
12315 not big endian
12316 #endif
12317
12318 ;
12319 return 0;
12320}
12321_ACEOF
12322if ac_fn_c_try_compile "$LINENO"; then :
12323 ac_cv_c_bigendian=yes
12324else
12325 ac_cv_c_bigendian=no
8690e634 12326fi
6ec2e0f5
SDJ
12327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12328fi
12329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12330 fi
12331 if test $ac_cv_c_bigendian = unknown; then
12332 # Compile a test program.
12333 if test "$cross_compiling" = yes; then :
12334 # Try to guess by grepping values from an object file.
12335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12336/* end confdefs.h. */
12337short int ascii_mm[] =
12338 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12339 short int ascii_ii[] =
12340 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12341 int use_ascii (int i) {
12342 return ascii_mm[i] + ascii_ii[i];
12343 }
12344 short int ebcdic_ii[] =
12345 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12346 short int ebcdic_mm[] =
12347 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12348 int use_ebcdic (int i) {
12349 return ebcdic_mm[i] + ebcdic_ii[i];
12350 }
12351 extern int foo;
8690e634 12352
6ec2e0f5
SDJ
12353int
12354main ()
12355{
12356return use_ascii (foo) == use_ebcdic (foo);
12357 ;
12358 return 0;
12359}
12360_ACEOF
12361if ac_fn_c_try_compile "$LINENO"; then :
12362 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12363 ac_cv_c_bigendian=yes
12364 fi
12365 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12366 if test "$ac_cv_c_bigendian" = unknown; then
12367 ac_cv_c_bigendian=no
12368 else
12369 # finding both strings is unlikely to happen, but who knows?
12370 ac_cv_c_bigendian=unknown
12371 fi
12372 fi
12373fi
12374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12375else
12376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12377/* end confdefs.h. */
12378$ac_includes_default
12379int
12380main ()
12381{
8690e634 12382
6ec2e0f5
SDJ
12383 /* Are we little or big endian? From Harbison&Steele. */
12384 union
12385 {
12386 long int l;
12387 char c[sizeof (long int)];
12388 } u;
12389 u.l = 1;
12390 return u.c[sizeof (long int) - 1] == 1;
12391
12392 ;
12393 return 0;
12394}
8690e634 12395_ACEOF
6ec2e0f5
SDJ
12396if ac_fn_c_try_run "$LINENO"; then :
12397 ac_cv_c_bigendian=no
12398else
12399 ac_cv_c_bigendian=yes
12400fi
12401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12402 conftest.$ac_objext conftest.beam conftest.$ac_ext
12403fi
12404
12405 fi
12406fi
12407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12408$as_echo "$ac_cv_c_bigendian" >&6; }
12409 case $ac_cv_c_bigendian in #(
12410 yes)
12411 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12412;; #(
12413 no)
12414 ;; #(
12415 universal)
8690e634 12416
6ec2e0f5 12417$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8690e634 12418
6ec2e0f5
SDJ
12419 ;; #(
12420 *)
d0ac1c44 12421 as_fn_error $? "unknown endianness
6ec2e0f5
SDJ
12422 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12423 esac
8690e634 12424
6ec2e0f5
SDJ
12425
12426
12427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12428$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 12429if ${am_cv_langinfo_codeset+:} false; then :
6ec2e0f5
SDJ
12430 $as_echo_n "(cached) " >&6
12431else
12432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12433/* end confdefs.h. */
12434#include <langinfo.h>
12435int
12436main ()
12437{
12438char* cs = nl_langinfo(CODESET); return !cs;
12439 ;
12440 return 0;
12441}
8690e634 12442_ACEOF
6ec2e0f5
SDJ
12443if ac_fn_c_try_link "$LINENO"; then :
12444 am_cv_langinfo_codeset=yes
12445else
12446 am_cv_langinfo_codeset=no
12447fi
12448rm -f core conftest.err conftest.$ac_objext \
12449 conftest$ac_exeext conftest.$ac_ext
12450
12451fi
12452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12453$as_echo "$am_cv_langinfo_codeset" >&6; }
12454 if test $am_cv_langinfo_codeset = yes; then
12455
12456$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8690e634 12457
6ec2e0f5 12458 fi
8690e634 12459
472fa5ee 12460
5e8754f9
SDJ
12461 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
12462if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
12463 ac_have_decl=1
12464else
12465 ac_have_decl=0
12466fi
12467
12468cat >>confdefs.h <<_ACEOF
12469#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
12470_ACEOF
12471
12472
12473
5abebf3c
CB
12474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
12475$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
12476if ${ac_cv_gnu_library_2_1+:} false; then :
12477 $as_echo_n "(cached) " >&6
12478else
12479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12480/* end confdefs.h. */
12481
12482#include <features.h>
12483#ifdef __GNU_LIBRARY__
12484 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
12485 Lucky GNU user
12486 #endif
12487#endif
12488#ifdef __UCLIBC__
12489 Lucky user
12490#endif
12491
12492_ACEOF
12493if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12494 $EGREP "Lucky" >/dev/null 2>&1; then :
12495 ac_cv_gnu_library_2_1=yes
12496else
12497 ac_cv_gnu_library_2_1=no
12498fi
12499rm -f conftest*
12500
12501
12502
12503fi
12504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
12505$as_echo "$ac_cv_gnu_library_2_1" >&6; }
12506
12507 GLIBC21="$ac_cv_gnu_library_2_1"
12508
12509
12510
12511 if test "X$prefix" = "XNONE"; then
12512 acl_final_prefix="$ac_default_prefix"
12513 else
12514 acl_final_prefix="$prefix"
12515 fi
12516 if test "X$exec_prefix" = "XNONE"; then
12517 acl_final_exec_prefix='${prefix}'
12518 else
12519 acl_final_exec_prefix="$exec_prefix"
12520 fi
12521 acl_save_prefix="$prefix"
12522 prefix="$acl_final_prefix"
12523 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
12524 prefix="$acl_save_prefix"
12525
12526
12527
12528# Check whether --with-gnu-ld was given.
12529if test "${with_gnu_ld+set}" = set; then :
12530 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
12531else
12532 with_gnu_ld=no
12533fi
12534
12535# Prepare PATH_SEPARATOR.
12536# The user is always right.
12537if test "${PATH_SEPARATOR+set}" != set; then
12538 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
12539 # contains only /bin. Note that ksh looks also at the FPATH variable,
12540 # so we have to set that as well for the test.
12541 PATH_SEPARATOR=:
12542 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
12543 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
12544 || PATH_SEPARATOR=';'
12545 }
12546fi
12547
12548ac_prog=ld
12549if test "$GCC" = yes; then
12550 # Check if gcc -print-prog-name=ld gives a path.
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
12552$as_echo_n "checking for ld used by $CC... " >&6; }
12553 case $host in
12554 *-*-mingw*)
12555 # gcc leaves a trailing carriage return which upsets mingw
12556 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
12557 *)
12558 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
12559 esac
12560 case $ac_prog in
12561 # Accept absolute paths.
12562 [\\/]* | ?:[\\/]*)
12563 re_direlt='/[^/][^/]*/\.\./'
12564 # Canonicalize the pathname of ld
12565 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
12566 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
12567 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
12568 done
12569 test -z "$LD" && LD="$ac_prog"
12570 ;;
12571 "")
12572 # If it fails, then pretend we aren't using GCC.
12573 ac_prog=ld
12574 ;;
12575 *)
12576 # If it is relative, then search for the first ld in PATH.
12577 with_gnu_ld=unknown
12578 ;;
12579 esac
12580elif test "$with_gnu_ld" = yes; then
12581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
12582$as_echo_n "checking for GNU ld... " >&6; }
12583else
12584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
12585$as_echo_n "checking for non-GNU ld... " >&6; }
12586fi
12587if ${acl_cv_path_LD+:} false; then :
12588 $as_echo_n "(cached) " >&6
12589else
12590 if test -z "$LD"; then
12591 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
12592 for ac_dir in $PATH; do
12593 IFS="$acl_save_ifs"
12594 test -z "$ac_dir" && ac_dir=.
12595 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
12596 acl_cv_path_LD="$ac_dir/$ac_prog"
12597 # Check to see if the program is GNU ld. I'd rather use --version,
12598 # but apparently some variants of GNU ld only accept -v.
12599 # Break only if it was the GNU/non-GNU ld that we prefer.
12600 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
12601 *GNU* | *'with BFD'*)
12602 test "$with_gnu_ld" != no && break
12603 ;;
12604 *)
12605 test "$with_gnu_ld" != yes && break
12606 ;;
12607 esac
12608 fi
12609 done
12610 IFS="$acl_save_ifs"
12611else
12612 acl_cv_path_LD="$LD" # Let the user override the test with a path.
12613fi
12614fi
12615
12616LD="$acl_cv_path_LD"
12617if test -n "$LD"; then
12618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
12619$as_echo "$LD" >&6; }
12620else
12621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12622$as_echo "no" >&6; }
12623fi
12624test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
12625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
12626$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
12627if ${acl_cv_prog_gnu_ld+:} false; then :
12628 $as_echo_n "(cached) " >&6
12629else
12630 # I'd rather use --version here, but apparently some GNU lds only accept -v.
12631case `$LD -v 2>&1 </dev/null` in
12632*GNU* | *'with BFD'*)
12633 acl_cv_prog_gnu_ld=yes
12634 ;;
12635*)
12636 acl_cv_prog_gnu_ld=no
12637 ;;
12638esac
12639fi
12640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
12641$as_echo "$acl_cv_prog_gnu_ld" >&6; }
12642with_gnu_ld=$acl_cv_prog_gnu_ld
12643
12644
12645
12646
12647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
12648$as_echo_n "checking for shared library run path origin... " >&6; }
12649if ${acl_cv_rpath+:} false; then :
12650 $as_echo_n "(cached) " >&6
12651else
12652
12653 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
12654 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
12655 . ./conftest.sh
12656 rm -f ./conftest.sh
12657 acl_cv_rpath=done
12658
12659fi
12660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
12661$as_echo "$acl_cv_rpath" >&6; }
12662 wl="$acl_cv_wl"
12663 acl_libext="$acl_cv_libext"
12664 acl_shlibext="$acl_cv_shlibext"
12665 acl_libname_spec="$acl_cv_libname_spec"
12666 acl_library_names_spec="$acl_cv_library_names_spec"
12667 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
12668 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
12669 acl_hardcode_direct="$acl_cv_hardcode_direct"
12670 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
12671 # Check whether --enable-rpath was given.
12672if test "${enable_rpath+set}" = set; then :
12673 enableval=$enable_rpath; :
12674else
12675 enable_rpath=yes
12676fi
12677
12678
12679
12680
12681 acl_libdirstem=lib
12682 acl_libdirstem2=
12683 case "$host_os" in
12684 solaris*)
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
12686$as_echo_n "checking for 64-bit host... " >&6; }
12687if ${gl_cv_solaris_64bit+:} false; then :
12688 $as_echo_n "(cached) " >&6
12689else
12690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12691/* end confdefs.h. */
12692
12693#ifdef _LP64
12694sixtyfour bits
12695#endif
12696
12697_ACEOF
12698if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12699 $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
12700 gl_cv_solaris_64bit=yes
12701else
12702 gl_cv_solaris_64bit=no
12703fi
12704rm -f conftest*
12705
12706
12707fi
12708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
12709$as_echo "$gl_cv_solaris_64bit" >&6; }
12710 if test $gl_cv_solaris_64bit = yes; then
12711 acl_libdirstem=lib/64
12712 case "$host_cpu" in
12713 sparc*) acl_libdirstem2=lib/sparcv9 ;;
12714 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
12715 esac
12716 fi
12717 ;;
12718 *)
12719 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
12720 if test -n "$searchpath"; then
12721 acl_save_IFS="${IFS= }"; IFS=":"
12722 for searchdir in $searchpath; do
12723 if test -d "$searchdir"; then
12724 case "$searchdir" in
12725 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
12726 */../ | */.. )
12727 # Better ignore directories of this form. They are misleading.
12728 ;;
12729 *) searchdir=`cd "$searchdir" && pwd`
12730 case "$searchdir" in
12731 */lib64 ) acl_libdirstem=lib64 ;;
12732 esac ;;
12733 esac
12734 fi
12735 done
12736 IFS="$acl_save_IFS"
12737 fi
12738 ;;
12739 esac
12740 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
12741
12742
12743
12744 gl_threads_api=none
12745 LIBTHREAD=
12746 LTLIBTHREAD=
12747 LIBMULTITHREAD=
12748 LTLIBMULTITHREAD=
12749 if test "$gl_use_threads" != no; then
12750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
12751$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
12752if ${gl_cv_have_weak+:} false; then :
12753 $as_echo_n "(cached) " >&6
12754else
12755 gl_cv_have_weak=no
12756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12757/* end confdefs.h. */
12758extern void xyzzy ();
12759#pragma weak xyzzy
12760int
12761main ()
12762{
12763xyzzy();
12764 ;
12765 return 0;
12766}
12767_ACEOF
12768if ac_fn_c_try_link "$LINENO"; then :
12769 gl_cv_have_weak=maybe
12770fi
12771rm -f core conftest.err conftest.$ac_objext \
12772 conftest$ac_exeext conftest.$ac_ext
12773 if test $gl_cv_have_weak = maybe; then
12774 if test "$cross_compiling" = yes; then :
12775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12776/* end confdefs.h. */
12777#ifdef __ELF__
12778 Extensible Linking Format
12779 #endif
12780
12781_ACEOF
12782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12783 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
12784 gl_cv_have_weak="guessing yes"
12785else
12786 gl_cv_have_weak="guessing no"
12787fi
12788rm -f conftest*
12789
12790
12791else
12792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12793/* end confdefs.h. */
12794
12795#include <stdio.h>
12796#pragma weak fputs
12797int main ()
12798{
12799 return (fputs == NULL);
12800}
12801_ACEOF
12802if ac_fn_c_try_run "$LINENO"; then :
12803 gl_cv_have_weak=yes
12804else
12805 gl_cv_have_weak=no
12806fi
12807rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12808 conftest.$ac_objext conftest.beam conftest.$ac_ext
12809fi
12810
12811 fi
12812
12813fi
12814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
12815$as_echo "$gl_cv_have_weak" >&6; }
12816 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
12817 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
12818 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
12819 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
12820if test "x$ac_cv_header_pthread_h" = xyes; then :
12821 gl_have_pthread_h=yes
12822else
12823 gl_have_pthread_h=no
12824fi
12825
12826
12827 if test "$gl_have_pthread_h" = yes; then
12828 # Other possible tests:
12829 # -lpthreads (FSU threads, PCthreads)
12830 # -lgthreads
12831 gl_have_pthread=
12832 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
12833 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
12834 # the second one only in libpthread, and lock.c needs it.
12835 #
12836 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
12837 # needs -pthread for some reason. See:
12838 # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html
12839 save_LIBS=$LIBS
12840 for gl_pthread in '' '-pthread'; do
12841 LIBS="$LIBS $gl_pthread"
12842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12843/* end confdefs.h. */
12844#include <pthread.h>
12845 pthread_mutex_t m;
12846 pthread_mutexattr_t ma;
12847
12848int
12849main ()
12850{
12851pthread_mutex_lock (&m);
12852 pthread_mutexattr_init (&ma);
12853 ;
12854 return 0;
12855}
12856_ACEOF
12857if ac_fn_c_try_link "$LINENO"; then :
12858 gl_have_pthread=yes
12859 LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread
12860 LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread
12861fi
12862rm -f core conftest.err conftest.$ac_objext \
12863 conftest$ac_exeext conftest.$ac_ext
12864 LIBS=$save_LIBS
12865 test -n "$gl_have_pthread" && break
12866 done
12867
12868 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
12869 # since it is defined as a macro on OSF/1.)
12870 if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then
12871 # The program links fine without libpthread. But it may actually
12872 # need to link with libpthread in order to create multiple threads.
12873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12874$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
12875if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
12876 $as_echo_n "(cached) " >&6
12877else
12878 ac_check_lib_save_LIBS=$LIBS
12879LIBS="-lpthread $LIBS"
12880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12881/* end confdefs.h. */
12882
12883/* Override any GCC internal prototype to avoid an error.
12884 Use char because int might match the return type of a GCC
12885 builtin and then its argument prototype would still apply. */
12886#ifdef __cplusplus
12887extern "C"
12888#endif
12889char pthread_kill ();
12890int
12891main ()
12892{
12893return pthread_kill ();
12894 ;
12895 return 0;
12896}
12897_ACEOF
12898if ac_fn_c_try_link "$LINENO"; then :
12899 ac_cv_lib_pthread_pthread_kill=yes
12900else
12901 ac_cv_lib_pthread_pthread_kill=no
12902fi
12903rm -f core conftest.err conftest.$ac_objext \
12904 conftest$ac_exeext conftest.$ac_ext
12905LIBS=$ac_check_lib_save_LIBS
12906fi
12907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12908$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
12909if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
12910 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
12911 # On Solaris and HP-UX, most pthread functions exist also in libc.
12912 # Therefore pthread_in_use() needs to actually try to create a
12913 # thread: pthread_create from libc will fail, whereas
12914 # pthread_create will actually create a thread.
12915 case "$host_os" in
12916 solaris* | hpux*)
12917
12918$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
12919
12920 esac
12921
12922fi
12923
12924 elif test -z "$gl_have_pthread"; then
12925 # Some library is needed. Try libpthread and libc_r.
12926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
12927$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
12928if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
12929 $as_echo_n "(cached) " >&6
12930else
12931 ac_check_lib_save_LIBS=$LIBS
12932LIBS="-lpthread $LIBS"
12933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12934/* end confdefs.h. */
12935
12936/* Override any GCC internal prototype to avoid an error.
12937 Use char because int might match the return type of a GCC
12938 builtin and then its argument prototype would still apply. */
12939#ifdef __cplusplus
12940extern "C"
12941#endif
12942char pthread_kill ();
12943int
12944main ()
12945{
12946return pthread_kill ();
12947 ;
12948 return 0;
12949}
12950_ACEOF
12951if ac_fn_c_try_link "$LINENO"; then :
12952 ac_cv_lib_pthread_pthread_kill=yes
12953else
12954 ac_cv_lib_pthread_pthread_kill=no
12955fi
12956rm -f core conftest.err conftest.$ac_objext \
12957 conftest$ac_exeext conftest.$ac_ext
12958LIBS=$ac_check_lib_save_LIBS
12959fi
12960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
12961$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
12962if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
12963 gl_have_pthread=yes
12964 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
12965 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
12966fi
12967
12968 if test -z "$gl_have_pthread"; then
12969 # For FreeBSD 4.
12970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
12971$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
12972if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
12973 $as_echo_n "(cached) " >&6
12974else
12975 ac_check_lib_save_LIBS=$LIBS
12976LIBS="-lc_r $LIBS"
12977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12978/* end confdefs.h. */
12979
12980/* Override any GCC internal prototype to avoid an error.
12981 Use char because int might match the return type of a GCC
12982 builtin and then its argument prototype would still apply. */
12983#ifdef __cplusplus
12984extern "C"
12985#endif
12986char pthread_kill ();
12987int
12988main ()
12989{
12990return pthread_kill ();
12991 ;
12992 return 0;
12993}
12994_ACEOF
12995if ac_fn_c_try_link "$LINENO"; then :
12996 ac_cv_lib_c_r_pthread_kill=yes
12997else
12998 ac_cv_lib_c_r_pthread_kill=no
12999fi
13000rm -f core conftest.err conftest.$ac_objext \
13001 conftest$ac_exeext conftest.$ac_ext
13002LIBS=$ac_check_lib_save_LIBS
13003fi
13004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
13005$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
13006if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
13007 gl_have_pthread=yes
13008 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
13009 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
13010fi
13011
13012 fi
13013 fi
13014 if test -n "$gl_have_pthread"; then
13015 gl_threads_api=posix
13016
13017$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
13018
13019 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13020 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13021
13022$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
13023
13024 LIBTHREAD=
13025 LTLIBTHREAD=
13026 fi
13027 fi
13028 fi
13029 fi
13030 fi
13031 if test -z "$gl_have_pthread"; then
13032 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
13033 gl_have_solaristhread=
13034 gl_save_LIBS="$LIBS"
13035 LIBS="$LIBS -lthread"
13036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13037/* end confdefs.h. */
13038
13039#include <thread.h>
13040#include <synch.h>
13041
13042int
13043main ()
13044{
13045thr_self();
13046 ;
13047 return 0;
13048}
13049_ACEOF
13050if ac_fn_c_try_link "$LINENO"; then :
13051 gl_have_solaristhread=yes
13052fi
13053rm -f core conftest.err conftest.$ac_objext \
13054 conftest$ac_exeext conftest.$ac_ext
13055 LIBS="$gl_save_LIBS"
13056 if test -n "$gl_have_solaristhread"; then
13057 gl_threads_api=solaris
13058 LIBTHREAD=-lthread
13059 LTLIBTHREAD=-lthread
13060 LIBMULTITHREAD="$LIBTHREAD"
13061 LTLIBMULTITHREAD="$LTLIBTHREAD"
13062
13063$as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
13064
13065 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13066
13067$as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
13068
13069 LIBTHREAD=
13070 LTLIBTHREAD=
13071 fi
13072 fi
13073 fi
13074 fi
13075 if test "$gl_use_threads" = pth; then
13076 gl_save_CPPFLAGS="$CPPFLAGS"
13077
13078
13079
13080
13081
13082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
13083$as_echo_n "checking how to link with libpth... " >&6; }
13084if ${ac_cv_libpth_libs+:} false; then :
13085 $as_echo_n "(cached) " >&6
13086else
13087
13088
13089
13090
13091
13092
13093
13094
13095 use_additional=yes
13096
13097 acl_save_prefix="$prefix"
13098 prefix="$acl_final_prefix"
13099 acl_save_exec_prefix="$exec_prefix"
13100 exec_prefix="$acl_final_exec_prefix"
13101
13102 eval additional_includedir=\"$includedir\"
13103 eval additional_libdir=\"$libdir\"
13104
13105 exec_prefix="$acl_save_exec_prefix"
13106 prefix="$acl_save_prefix"
13107
13108
13109# Check whether --with-libpth-prefix was given.
13110if test "${with_libpth_prefix+set}" = set; then :
13111 withval=$with_libpth_prefix;
13112 if test "X$withval" = "Xno"; then
13113 use_additional=no
13114 else
13115 if test "X$withval" = "X"; then
13116
13117 acl_save_prefix="$prefix"
13118 prefix="$acl_final_prefix"
13119 acl_save_exec_prefix="$exec_prefix"
13120 exec_prefix="$acl_final_exec_prefix"
13121
13122 eval additional_includedir=\"$includedir\"
13123 eval additional_libdir=\"$libdir\"
13124
13125 exec_prefix="$acl_save_exec_prefix"
13126 prefix="$acl_save_prefix"
13127
13128 else
13129 additional_includedir="$withval/include"
13130 additional_libdir="$withval/$acl_libdirstem"
13131 if test "$acl_libdirstem2" != "$acl_libdirstem" \
13132 && ! test -d "$withval/$acl_libdirstem"; then
13133 additional_libdir="$withval/$acl_libdirstem2"
13134 fi
13135 fi
13136 fi
13137
13138fi
13139
13140 LIBPTH=
13141 LTLIBPTH=
13142 INCPTH=
13143 LIBPTH_PREFIX=
13144 HAVE_LIBPTH=
13145 rpathdirs=
13146 ltrpathdirs=
13147 names_already_handled=
13148 names_next_round='pth '
13149 while test -n "$names_next_round"; do
13150 names_this_round="$names_next_round"
13151 names_next_round=
13152 for name in $names_this_round; do
13153 already_handled=
13154 for n in $names_already_handled; do
13155 if test "$n" = "$name"; then
13156 already_handled=yes
13157 break
13158 fi
13159 done
13160 if test -z "$already_handled"; then
13161 names_already_handled="$names_already_handled $name"
13162 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
13163 eval value=\"\$HAVE_LIB$uppername\"
13164 if test -n "$value"; then
13165 if test "$value" = yes; then
13166 eval value=\"\$LIB$uppername\"
13167 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
13168 eval value=\"\$LTLIB$uppername\"
13169 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
13170 else
13171 :
13172 fi
13173 else
13174 found_dir=
13175 found_la=
13176 found_so=
13177 found_a=
13178 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
13179 if test -n "$acl_shlibext"; then
13180 shrext=".$acl_shlibext" # typically: shrext=.so
13181 else
13182 shrext=
13183 fi
13184 if test $use_additional = yes; then
13185 dir="$additional_libdir"
13186 if test -n "$acl_shlibext"; then
13187 if test -f "$dir/$libname$shrext"; then
13188 found_dir="$dir"
13189 found_so="$dir/$libname$shrext"
13190 else
13191 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13192 ver=`(cd "$dir" && \
13193 for f in "$libname$shrext".*; do echo "$f"; done \
13194 | sed -e "s,^$libname$shrext\\\\.,," \
13195 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13196 | sed 1q ) 2>/dev/null`
13197 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13198 found_dir="$dir"
13199 found_so="$dir/$libname$shrext.$ver"
13200 fi
13201 else
13202 eval library_names=\"$acl_library_names_spec\"
13203 for f in $library_names; do
13204 if test -f "$dir/$f"; then
13205 found_dir="$dir"
13206 found_so="$dir/$f"
13207 break
13208 fi
13209 done
13210 fi
13211 fi
13212 fi
13213 if test "X$found_dir" = "X"; then
13214 if test -f "$dir/$libname.$acl_libext"; then
13215 found_dir="$dir"
13216 found_a="$dir/$libname.$acl_libext"
13217 fi
13218 fi
13219 if test "X$found_dir" != "X"; then
13220 if test -f "$dir/$libname.la"; then
13221 found_la="$dir/$libname.la"
13222 fi
13223 fi
13224 fi
13225 if test "X$found_dir" = "X"; then
13226 for x in $LDFLAGS $LTLIBPTH; do
13227
13228 acl_save_prefix="$prefix"
13229 prefix="$acl_final_prefix"
13230 acl_save_exec_prefix="$exec_prefix"
13231 exec_prefix="$acl_final_exec_prefix"
13232 eval x=\"$x\"
13233 exec_prefix="$acl_save_exec_prefix"
13234 prefix="$acl_save_prefix"
13235
13236 case "$x" in
13237 -L*)
13238 dir=`echo "X$x" | sed -e 's/^X-L//'`
13239 if test -n "$acl_shlibext"; then
13240 if test -f "$dir/$libname$shrext"; then
13241 found_dir="$dir"
13242 found_so="$dir/$libname$shrext"
13243 else
13244 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
13245 ver=`(cd "$dir" && \
13246 for f in "$libname$shrext".*; do echo "$f"; done \
13247 | sed -e "s,^$libname$shrext\\\\.,," \
13248 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
13249 | sed 1q ) 2>/dev/null`
13250 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
13251 found_dir="$dir"
13252 found_so="$dir/$libname$shrext.$ver"
13253 fi
13254 else
13255 eval library_names=\"$acl_library_names_spec\"
13256 for f in $library_names; do
13257 if test -f "$dir/$f"; then
13258 found_dir="$dir"
13259 found_so="$dir/$f"
13260 break
13261 fi
13262 done
13263 fi
13264 fi
13265 fi
13266 if test "X$found_dir" = "X"; then
13267 if test -f "$dir/$libname.$acl_libext"; then
13268 found_dir="$dir"
13269 found_a="$dir/$libname.$acl_libext"
13270 fi
13271 fi
13272 if test "X$found_dir" != "X"; then
13273 if test -f "$dir/$libname.la"; then
13274 found_la="$dir/$libname.la"
13275 fi
13276 fi
13277 ;;
13278 esac
13279 if test "X$found_dir" != "X"; then
13280 break
13281 fi
13282 done
13283 fi
13284 if test "X$found_dir" != "X"; then
13285 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
13286 if test "X$found_so" != "X"; then
13287 if test "$enable_rpath" = no \
13288 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
13289 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
13290 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13291 else
13292 haveit=
13293 for x in $ltrpathdirs; do
13294 if test "X$x" = "X$found_dir"; then
13295 haveit=yes
13296 break
13297 fi
13298 done
13299 if test -z "$haveit"; then
13300 ltrpathdirs="$ltrpathdirs $found_dir"
13301 fi
13302 if test "$acl_hardcode_direct" = yes; then
13303 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13304 else
13305 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
13306 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13307 haveit=
13308 for x in $rpathdirs; do
13309 if test "X$x" = "X$found_dir"; then
13310 haveit=yes
13311 break
13312 fi
13313 done
13314 if test -z "$haveit"; then
13315 rpathdirs="$rpathdirs $found_dir"
13316 fi
13317 else
13318 haveit=
13319 for x in $LDFLAGS $LIBPTH; do
13320
13321 acl_save_prefix="$prefix"
13322 prefix="$acl_final_prefix"
13323 acl_save_exec_prefix="$exec_prefix"
13324 exec_prefix="$acl_final_exec_prefix"
13325 eval x=\"$x\"
13326 exec_prefix="$acl_save_exec_prefix"
13327 prefix="$acl_save_prefix"
13328
13329 if test "X$x" = "X-L$found_dir"; then
13330 haveit=yes
13331 break
13332 fi
13333 done
13334 if test -z "$haveit"; then
13335 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
13336 fi
13337 if test "$acl_hardcode_minus_L" != no; then
13338 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
13339 else
13340 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
13341 fi
13342 fi
13343 fi
13344 fi
13345 else
13346 if test "X$found_a" != "X"; then
13347 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
13348 else
13349 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
13350 fi
13351 fi
13352 additional_includedir=
13353 case "$found_dir" in
13354 */$acl_libdirstem | */$acl_libdirstem/)
13355 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
13356 if test "$name" = 'pth'; then
13357 LIBPTH_PREFIX="$basedir"
13358 fi
13359 additional_includedir="$basedir/include"
13360 ;;
13361 */$acl_libdirstem2 | */$acl_libdirstem2/)
13362 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
13363 if test "$name" = 'pth'; then
13364 LIBPTH_PREFIX="$basedir"
13365 fi
13366 additional_includedir="$basedir/include"
13367 ;;
13368 esac
13369 if test "X$additional_includedir" != "X"; then
13370 if test "X$additional_includedir" != "X/usr/include"; then
13371 haveit=
13372 if test "X$additional_includedir" = "X/usr/local/include"; then
13373 if test -n "$GCC"; then
13374 case $host_os in
13375 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13376 esac
13377 fi
13378 fi
13379 if test -z "$haveit"; then
13380 for x in $CPPFLAGS $INCPTH; do
13381
13382 acl_save_prefix="$prefix"
13383 prefix="$acl_final_prefix"
13384 acl_save_exec_prefix="$exec_prefix"
13385 exec_prefix="$acl_final_exec_prefix"
13386 eval x=\"$x\"
13387 exec_prefix="$acl_save_exec_prefix"
13388 prefix="$acl_save_prefix"
13389
13390 if test "X$x" = "X-I$additional_includedir"; then
13391 haveit=yes
13392 break
13393 fi
13394 done
13395 if test -z "$haveit"; then
13396 if test -d "$additional_includedir"; then
13397 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
13398 fi
13399 fi
13400 fi
13401 fi
13402 fi
13403 if test -n "$found_la"; then
13404 save_libdir="$libdir"
13405 case "$found_la" in
13406 */* | *\\*) . "$found_la" ;;
13407 *) . "./$found_la" ;;
13408 esac
13409 libdir="$save_libdir"
13410 for dep in $dependency_libs; do
13411 case "$dep" in
13412 -L*)
13413 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13414 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
13415 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
13416 haveit=
13417 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
13418 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
13419 if test -n "$GCC"; then
13420 case $host_os in
13421 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13422 esac
13423 fi
13424 fi
13425 if test -z "$haveit"; then
13426 haveit=
13427 for x in $LDFLAGS $LIBPTH; do
13428
13429 acl_save_prefix="$prefix"
13430 prefix="$acl_final_prefix"
13431 acl_save_exec_prefix="$exec_prefix"
13432 exec_prefix="$acl_final_exec_prefix"
13433 eval x=\"$x\"
13434 exec_prefix="$acl_save_exec_prefix"
13435 prefix="$acl_save_prefix"
13436
13437 if test "X$x" = "X-L$additional_libdir"; then
13438 haveit=yes
13439 break
13440 fi
13441 done
13442 if test -z "$haveit"; then
13443 if test -d "$additional_libdir"; then
13444 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
13445 fi
13446 fi
13447 haveit=
13448 for x in $LDFLAGS $LTLIBPTH; do
13449
13450 acl_save_prefix="$prefix"
13451 prefix="$acl_final_prefix"
13452 acl_save_exec_prefix="$exec_prefix"
13453 exec_prefix="$acl_final_exec_prefix"
13454 eval x=\"$x\"
13455 exec_prefix="$acl_save_exec_prefix"
13456 prefix="$acl_save_prefix"
13457
13458 if test "X$x" = "X-L$additional_libdir"; then
13459 haveit=yes
13460 break
13461 fi
13462 done
13463 if test -z "$haveit"; then
13464 if test -d "$additional_libdir"; then
13465 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
13466 fi
13467 fi
13468 fi
13469 fi
13470 ;;
13471 -R*)
13472 dir=`echo "X$dep" | sed -e 's/^X-R//'`
13473 if test "$enable_rpath" != no; then
13474 haveit=
13475 for x in $rpathdirs; do
13476 if test "X$x" = "X$dir"; then
13477 haveit=yes
13478 break
13479 fi
13480 done
13481 if test -z "$haveit"; then
13482 rpathdirs="$rpathdirs $dir"
13483 fi
13484 haveit=
13485 for x in $ltrpathdirs; do
13486 if test "X$x" = "X$dir"; then
13487 haveit=yes
13488 break
13489 fi
13490 done
13491 if test -z "$haveit"; then
13492 ltrpathdirs="$ltrpathdirs $dir"
13493 fi
13494 fi
13495 ;;
13496 -l*)
13497 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13498 ;;
13499 *.la)
13500 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13501 ;;
13502 *)
13503 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
13504 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
13505 ;;
13506 esac
13507 done
13508 fi
13509 else
13510 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
13511 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
13512 fi
13513 fi
13514 fi
13515 done
13516 done
13517 if test "X$rpathdirs" != "X"; then
13518 if test -n "$acl_hardcode_libdir_separator"; then
13519 alldirs=
13520 for found_dir in $rpathdirs; do
13521 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
13522 done
13523 acl_save_libdir="$libdir"
13524 libdir="$alldirs"
13525 eval flag=\"$acl_hardcode_libdir_flag_spec\"
13526 libdir="$acl_save_libdir"
13527 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
13528 else
13529 for found_dir in $rpathdirs; do
13530 acl_save_libdir="$libdir"
13531 libdir="$found_dir"
13532 eval flag=\"$acl_hardcode_libdir_flag_spec\"
13533 libdir="$acl_save_libdir"
13534 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
13535 done
13536 fi
13537 fi
13538 if test "X$ltrpathdirs" != "X"; then
13539 for found_dir in $ltrpathdirs; do
13540 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
13541 done
13542 fi
13543
13544
13545
13546
13547
13548
13549 ac_cv_libpth_libs="$LIBPTH"
13550 ac_cv_libpth_ltlibs="$LTLIBPTH"
13551 ac_cv_libpth_cppflags="$INCPTH"
13552 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
13553
13554fi
13555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
13556$as_echo "$ac_cv_libpth_libs" >&6; }
13557 LIBPTH="$ac_cv_libpth_libs"
13558 LTLIBPTH="$ac_cv_libpth_ltlibs"
13559 INCPTH="$ac_cv_libpth_cppflags"
13560 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
13561
13562 for element in $INCPTH; do
13563 haveit=
13564 for x in $CPPFLAGS; do
13565
13566 acl_save_prefix="$prefix"
13567 prefix="$acl_final_prefix"
13568 acl_save_exec_prefix="$exec_prefix"
13569 exec_prefix="$acl_final_exec_prefix"
13570 eval x=\"$x\"
13571 exec_prefix="$acl_save_exec_prefix"
13572 prefix="$acl_save_prefix"
13573
13574 if test "X$x" = "X$element"; then
13575 haveit=yes
13576 break
13577 fi
13578 done
13579 if test -z "$haveit"; then
13580 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13581 fi
13582 done
13583
13584
13585
13586
13587 HAVE_LIBPTH=yes
13588
13589
13590
13591 gl_have_pth=
13592 gl_save_LIBS="$LIBS"
13593 LIBS="$LIBS $LIBPTH"
13594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13595/* end confdefs.h. */
13596#include <pth.h>
13597int
13598main ()
13599{
13600pth_self();
13601 ;
13602 return 0;
13603}
13604_ACEOF
13605if ac_fn_c_try_link "$LINENO"; then :
13606 gl_have_pth=yes
13607fi
13608rm -f core conftest.err conftest.$ac_objext \
13609 conftest$ac_exeext conftest.$ac_ext
13610 LIBS="$gl_save_LIBS"
13611 if test -n "$gl_have_pth"; then
13612 gl_threads_api=pth
13613 LIBTHREAD="$LIBPTH"
13614 LTLIBTHREAD="$LTLIBPTH"
13615 LIBMULTITHREAD="$LIBTHREAD"
13616 LTLIBMULTITHREAD="$LTLIBTHREAD"
13617
13618$as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
13619
13620 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
13621 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
13622
13623$as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
13624
13625 LIBTHREAD=
13626 LTLIBTHREAD=
13627 fi
13628 fi
13629 else
13630 CPPFLAGS="$gl_save_CPPFLAGS"
13631 fi
13632 fi
13633 if test -z "$gl_have_pthread"; then
13634 case "$gl_use_threads" in
13635 yes | windows | win32) # The 'win32' is for backward compatibility.
13636 if { case "$host_os" in
13637 mingw*) true;;
13638 *) false;;
13639 esac
13640 }; then
13641 gl_threads_api=windows
13642
13643$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
13644
13645 fi
13646 ;;
13647 esac
13648 fi
13649 fi
13650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
13651$as_echo_n "checking for multithread API to use... " >&6; }
13652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
13653$as_echo "$gl_threads_api" >&6; }
13654
5e8754f9 13655
5e8754f9 13656
5e8754f9
SDJ
13657
13658
13659
5e8754f9 13660
5e8754f9
SDJ
13661
13662
13663
f45c62c4
YQ
13664
13665
472fa5ee
SM
13666
13667
13668
6ec2e0f5
SDJ
13669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
13670$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
d0ac1c44 13671if ${gl_cv_func_malloc_posix+:} false; then :
f45c62c4
YQ
13672 $as_echo_n "(cached) " >&6
13673else
f45c62c4 13674
6ec2e0f5 13675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f45c62c4 13676/* end confdefs.h. */
6ec2e0f5 13677
f45c62c4
YQ
13678int
13679main ()
13680{
5e8754f9 13681#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
13682 choke me
13683 #endif
f45c62c4
YQ
13684
13685 ;
13686 return 0;
13687}
13688_ACEOF
6ec2e0f5
SDJ
13689if ac_fn_c_try_compile "$LINENO"; then :
13690 gl_cv_func_malloc_posix=yes
f45c62c4 13691else
6ec2e0f5 13692 gl_cv_func_malloc_posix=no
f45c62c4 13693fi
6ec2e0f5 13694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6a29c58e
YQ
13695
13696fi
13697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
13698$as_echo "$gl_cv_func_malloc_posix" >&6; }
13699
13700
13701
13702 for ac_header in stdlib.h
98399780
YQ
13703do :
13704 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
d0ac1c44 13705if test "x$ac_cv_header_stdlib_h" = xyes; then :
98399780
YQ
13706 cat >>confdefs.h <<_ACEOF
13707#define HAVE_STDLIB_H 1
13708_ACEOF
13709
13710fi
13711
13712done
13713
6a29c58e 13714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
98399780 13715$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
d0ac1c44 13716if ${ac_cv_func_malloc_0_nonnull+:} false; then :
98399780
YQ
13717 $as_echo_n "(cached) " >&6
13718else
13719 if test "$cross_compiling" = yes; then :
6a29c58e
YQ
13720 case "$host_os" in
13721 # Guess yes on platforms where we know the result.
5e8754f9 13722 *-gnu* | freebsd* | netbsd* | openbsd* \
6a29c58e
YQ
13723 | hpux* | solaris* | cygwin* | mingw*)
13724 ac_cv_func_malloc_0_nonnull=yes ;;
13725 # If we don't know, assume the worst.
13726 *) ac_cv_func_malloc_0_nonnull=no ;;
13727 esac
13728
98399780
YQ
13729else
13730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13731/* end confdefs.h. */
13732#if defined STDC_HEADERS || defined HAVE_STDLIB_H
6a29c58e
YQ
13733 # include <stdlib.h>
13734 #else
13735 char *malloc ();
13736 #endif
98399780
YQ
13737
13738int
13739main ()
13740{
49e4877c
PA
13741char *p = malloc (0);
13742 int result = !p;
13743 free (p);
13744 return result;
98399780
YQ
13745 ;
13746 return 0;
13747}
6a29c58e 13748
98399780
YQ
13749_ACEOF
13750if ac_fn_c_try_run "$LINENO"; then :
13751 ac_cv_func_malloc_0_nonnull=yes
13752else
13753 ac_cv_func_malloc_0_nonnull=no
13754fi
13755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13756 conftest.$ac_objext conftest.beam conftest.$ac_ext
13757fi
13758
6a29c58e 13759
98399780
YQ
13760fi
13761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
13762$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6a29c58e 13763 if test $ac_cv_func_malloc_0_nonnull = yes; then :
98399780
YQ
13764 gl_cv_func_malloc_0_nonnull=1
13765else
13766 gl_cv_func_malloc_0_nonnull=0
13767fi
13768
13769
13770cat >>confdefs.h <<_ACEOF
13771#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
13772_ACEOF
13773
13774
13775
88b48903
WN
13776
13777
472fa5ee
SM
13778
13779
13780
8690e634
JK
13781 GNULIB_BTOWC=0;
13782 GNULIB_WCTOB=0;
13783 GNULIB_MBSINIT=0;
13784 GNULIB_MBRTOWC=0;
13785 GNULIB_MBRLEN=0;
13786 GNULIB_MBSRTOWCS=0;
13787 GNULIB_MBSNRTOWCS=0;
13788 GNULIB_WCRTOMB=0;
13789 GNULIB_WCSRTOMBS=0;
13790 GNULIB_WCSNRTOMBS=0;
13791 GNULIB_WCWIDTH=0;
13792 GNULIB_WMEMCHR=0;
13793 GNULIB_WMEMCMP=0;
13794 GNULIB_WMEMCPY=0;
13795 GNULIB_WMEMMOVE=0;
13796 GNULIB_WMEMSET=0;
13797 GNULIB_WCSLEN=0;
13798 GNULIB_WCSNLEN=0;
13799 GNULIB_WCSCPY=0;
13800 GNULIB_WCPCPY=0;
13801 GNULIB_WCSNCPY=0;
13802 GNULIB_WCPNCPY=0;
13803 GNULIB_WCSCAT=0;
13804 GNULIB_WCSNCAT=0;
13805 GNULIB_WCSCMP=0;
13806 GNULIB_WCSNCMP=0;
13807 GNULIB_WCSCASECMP=0;
13808 GNULIB_WCSNCASECMP=0;
13809 GNULIB_WCSCOLL=0;
13810 GNULIB_WCSXFRM=0;
13811 GNULIB_WCSDUP=0;
13812 GNULIB_WCSCHR=0;
13813 GNULIB_WCSRCHR=0;
13814 GNULIB_WCSCSPN=0;
13815 GNULIB_WCSSPN=0;
13816 GNULIB_WCSPBRK=0;
13817 GNULIB_WCSSTR=0;
13818 GNULIB_WCSTOK=0;
13819 GNULIB_WCSWIDTH=0;
13820 HAVE_BTOWC=1;
13821 HAVE_MBSINIT=1;
13822 HAVE_MBRTOWC=1;
13823 HAVE_MBRLEN=1;
13824 HAVE_MBSRTOWCS=1;
13825 HAVE_MBSNRTOWCS=1;
13826 HAVE_WCRTOMB=1;
13827 HAVE_WCSRTOMBS=1;
13828 HAVE_WCSNRTOMBS=1;
13829 HAVE_WMEMCHR=1;
13830 HAVE_WMEMCMP=1;
13831 HAVE_WMEMCPY=1;
13832 HAVE_WMEMMOVE=1;
13833 HAVE_WMEMSET=1;
13834 HAVE_WCSLEN=1;
13835 HAVE_WCSNLEN=1;
13836 HAVE_WCSCPY=1;
13837 HAVE_WCPCPY=1;
13838 HAVE_WCSNCPY=1;
13839 HAVE_WCPNCPY=1;
13840 HAVE_WCSCAT=1;
13841 HAVE_WCSNCAT=1;
13842 HAVE_WCSCMP=1;
13843 HAVE_WCSNCMP=1;
13844 HAVE_WCSCASECMP=1;
13845 HAVE_WCSNCASECMP=1;
13846 HAVE_WCSCOLL=1;
13847 HAVE_WCSXFRM=1;
13848 HAVE_WCSDUP=1;
13849 HAVE_WCSCHR=1;
13850 HAVE_WCSRCHR=1;
13851 HAVE_WCSCSPN=1;
13852 HAVE_WCSSPN=1;
13853 HAVE_WCSPBRK=1;
13854 HAVE_WCSSTR=1;
13855 HAVE_WCSTOK=1;
13856 HAVE_WCSWIDTH=1;
13857 HAVE_DECL_WCTOB=1;
13858 HAVE_DECL_WCWIDTH=1;
13859 REPLACE_MBSTATE_T=0;
13860 REPLACE_BTOWC=0;
13861 REPLACE_WCTOB=0;
13862 REPLACE_MBSINIT=0;
13863 REPLACE_MBRTOWC=0;
13864 REPLACE_MBRLEN=0;
13865 REPLACE_MBSRTOWCS=0;
13866 REPLACE_MBSNRTOWCS=0;
13867 REPLACE_WCRTOMB=0;
13868 REPLACE_WCSRTOMBS=0;
13869 REPLACE_WCSNRTOMBS=0;
13870 REPLACE_WCWIDTH=0;
13871 REPLACE_WCSWIDTH=0;
13872
13873
13874
13875
13876
13877
13878
13879
472fa5ee
SM
13880
13881
13882
13883
13884
13885
8690e634
JK
13886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
13887$as_echo_n "checking for a traditional japanese locale... " >&6; }
d0ac1c44 13888if ${gt_cv_locale_ja+:} false; then :
8690e634
JK
13889 $as_echo_n "(cached) " >&6
13890else
13891
13892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13893/* end confdefs.h. */
13894
13895#include <locale.h>
13896#include <time.h>
13897#if HAVE_LANGINFO_CODESET
13898# include <langinfo.h>
13899#endif
13900#include <stdlib.h>
13901#include <string.h>
13902struct tm t;
13903char buf[16];
13904int main ()
13905{
5e8754f9 13906 const char *p;
8690e634 13907 /* Check whether the given locale name is recognized by the system. */
5e8754f9 13908#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
13909 /* On native Windows, setlocale(category, "") looks at the system settings,
13910 not at the environment variables. Also, when an encoding suffix such
13911 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
13912 category of the locale to "C". */
13913 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
13914 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
13915 return 1;
5e8754f9 13916#else
8690e634 13917 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 13918#endif
8690e634
JK
13919 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
13920 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
13921 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
13922 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
13923 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
13924 some unit tests fail.
13925 On MirBSD 10, when an unsupported locale is specified, setlocale()
13926 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 13927#if HAVE_LANGINFO_CODESET
8690e634
JK
13928 {
13929 const char *cs = nl_langinfo (CODESET);
13930 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
13931 || strcmp (cs, "UTF-8") == 0)
13932 return 1;
13933 }
5e8754f9
SDJ
13934#endif
13935#ifdef __CYGWIN__
8690e634
JK
13936 /* On Cygwin, avoid locale names without encoding suffix, because the
13937 locale_charset() function relies on the encoding suffix. Note that
13938 LC_ALL is set on the command line. */
13939 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 13940#endif
8690e634
JK
13941 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
13942 on Cygwin 1.5.x. */
13943 if (MB_CUR_MAX == 1)
13944 return 1;
13945 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
13946 This excludes the UTF-8 encoding (except on MirBSD). */
5e8754f9
SDJ
13947 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
13948 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
13949 for (p = buf; *p != '\0'; p++)
13950 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
13951 return 1;
8690e634
JK
13952 return 0;
13953}
13954
13955_ACEOF
13956 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
13957 (eval $ac_link) 2>&5
13958 ac_status=$?
13959 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13960 test $ac_status = 0; } && test -s conftest$ac_exeext; then
13961 case "$host_os" in
13962 # Handle native Windows specially, because there setlocale() interprets
13963 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
13964 # "fr" or "fra" as "French" or "French_France.1252",
13965 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
13966 # "ja" as "Japanese" or "Japanese_Japan.932",
13967 # and similar.
13968 mingw*)
13969 # Note that on native Windows, the Japanese locale is
13970 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
13971 # cannot use it here.
13972 gt_cv_locale_ja=none
13973 ;;
13974 *)
13975 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
13976 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
13977 # configure script would override the LC_ALL setting. Likewise for
13978 # LC_CTYPE, which is also set at the beginning of the configure script.
13979 # Test for the AIX locale name.
13980 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13981 gt_cv_locale_ja=ja_JP
13982 else
13983 # Test for the locale name with explicit encoding suffix.
13984 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13985 gt_cv_locale_ja=ja_JP.EUC-JP
13986 else
13987 # Test for the HP-UX, OSF/1, NetBSD locale name.
13988 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13989 gt_cv_locale_ja=ja_JP.eucJP
13990 else
13991 # Test for the IRIX, FreeBSD locale name.
13992 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13993 gt_cv_locale_ja=ja_JP.EUC
13994 else
13995 # Test for the Solaris 7 locale name.
13996 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
13997 gt_cv_locale_ja=ja
13998 else
13999 # Special test for NetBSD 1.6.
14000 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14001 gt_cv_locale_ja=ja_JP.eucJP
14002 else
14003 # None found.
14004 gt_cv_locale_ja=none
14005 fi
14006 fi
14007 fi
14008 fi
14009 fi
14010 fi
14011 ;;
14012 esac
14013 fi
14014 rm -fr conftest*
14015
14016fi
14017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14018$as_echo "$gt_cv_locale_ja" >&6; }
14019 LOCALE_JA=$gt_cv_locale_ja
14020
14021
14022
14023
14024
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14026$as_echo_n "checking for a transitional chinese locale... " >&6; }
d0ac1c44 14027if ${gt_cv_locale_zh_CN+:} false; then :
8690e634
JK
14028 $as_echo_n "(cached) " >&6
14029else
14030
14031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14032/* end confdefs.h. */
14033
14034#include <locale.h>
14035#include <stdlib.h>
14036#include <time.h>
14037#if HAVE_LANGINFO_CODESET
14038# include <langinfo.h>
14039#endif
14040#include <stdlib.h>
14041#include <string.h>
14042struct tm t;
14043char buf[16];
14044int main ()
14045{
5e8754f9 14046 const char *p;
8690e634 14047 /* Check whether the given locale name is recognized by the system. */
5e8754f9 14048#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
14049 /* On native Windows, setlocale(category, "") looks at the system settings,
14050 not at the environment variables. Also, when an encoding suffix such
14051 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14052 category of the locale to "C". */
14053 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14054 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14055 return 1;
5e8754f9 14056#else
8690e634 14057 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 14058#endif
8690e634
JK
14059 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14060 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14061 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14062 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14063 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14064 some unit tests fail.
14065 On MirBSD 10, when an unsupported locale is specified, setlocale()
14066 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 14067#if HAVE_LANGINFO_CODESET
8690e634
JK
14068 {
14069 const char *cs = nl_langinfo (CODESET);
14070 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14071 || strcmp (cs, "UTF-8") == 0)
14072 return 1;
14073 }
5e8754f9
SDJ
14074#endif
14075#ifdef __CYGWIN__
8690e634
JK
14076 /* On Cygwin, avoid locale names without encoding suffix, because the
14077 locale_charset() function relies on the encoding suffix. Note that
14078 LC_ALL is set on the command line. */
14079 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 14080#endif
8690e634
JK
14081 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14082 This excludes the UTF-8 encoding (except on MirBSD). */
5e8754f9
SDJ
14083 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14084 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14085 for (p = buf; *p != '\0'; p++)
14086 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14087 return 1;
8690e634
JK
14088 /* Check whether a typical GB18030 multibyte sequence is recognized as a
14089 single wide character. This excludes the GB2312 and GBK encodings. */
14090 if (mblen ("\203\062\332\066", 5) != 4)
14091 return 1;
14092 return 0;
14093}
14094
14095_ACEOF
14096 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14097 (eval $ac_link) 2>&5
14098 ac_status=$?
14099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14100 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14101 case "$host_os" in
14102 # Handle native Windows specially, because there setlocale() interprets
14103 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14104 # "fr" or "fra" as "French" or "French_France.1252",
14105 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14106 # "ja" as "Japanese" or "Japanese_Japan.932",
14107 # and similar.
14108 mingw*)
14109 # Test for the hypothetical native Windows locale name.
14110 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14111 gt_cv_locale_zh_CN=Chinese_China.54936
14112 else
14113 # None found.
14114 gt_cv_locale_zh_CN=none
14115 fi
14116 ;;
14117 solaris2.8)
14118 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
14119 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
14120 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
14121 gt_cv_locale_zh_CN=none
14122 ;;
14123 *)
14124 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14125 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14126 # configure script would override the LC_ALL setting. Likewise for
14127 # LC_CTYPE, which is also set at the beginning of the configure script.
14128 # Test for the locale name without encoding suffix.
14129 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14130 gt_cv_locale_zh_CN=zh_CN
14131 else
14132 # Test for the locale name with explicit encoding suffix.
14133 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14134 gt_cv_locale_zh_CN=zh_CN.GB18030
14135 else
14136 # None found.
14137 gt_cv_locale_zh_CN=none
14138 fi
14139 fi
14140 ;;
14141 esac
14142 else
14143 # If there was a link error, due to mblen(), the system is so old that
14144 # it certainly doesn't have a chinese locale.
14145 gt_cv_locale_zh_CN=none
14146 fi
14147 rm -fr conftest*
14148
14149fi
14150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
14151$as_echo "$gt_cv_locale_zh_CN" >&6; }
14152 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
14153
14154
14155
14156
14157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14158$as_echo_n "checking for a french Unicode locale... " >&6; }
d0ac1c44 14159if ${gt_cv_locale_fr_utf8+:} false; then :
8690e634
JK
14160 $as_echo_n "(cached) " >&6
14161else
14162
14163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14164/* end confdefs.h. */
14165
14166#include <locale.h>
14167#include <time.h>
14168#if HAVE_LANGINFO_CODESET
14169# include <langinfo.h>
14170#endif
14171#include <stdlib.h>
14172#include <string.h>
14173struct tm t;
14174char buf[16];
14175int main () {
14176 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
14177 imitates locale dependent behaviour by looking at the environment
14178 variables, and all locales use the UTF-8 encoding. */
14179#if !(defined __BEOS__ || defined __HAIKU__)
14180 /* Check whether the given locale name is recognized by the system. */
5e8754f9 14181# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
14182 /* On native Windows, setlocale(category, "") looks at the system settings,
14183 not at the environment variables. Also, when an encoding suffix such
14184 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14185 category of the locale to "C". */
14186 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14187 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14188 return 1;
14189# else
14190 if (setlocale (LC_ALL, "") == NULL) return 1;
14191# endif
14192 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14193 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14194 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14195 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14196 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14197 some unit tests fail. */
14198# if HAVE_LANGINFO_CODESET
14199 {
14200 const char *cs = nl_langinfo (CODESET);
14201 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14202 return 1;
14203 }
14204# endif
14205# ifdef __CYGWIN__
14206 /* On Cygwin, avoid locale names without encoding suffix, because the
14207 locale_charset() function relies on the encoding suffix. Note that
14208 LC_ALL is set on the command line. */
14209 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14210# endif
14211 /* Check whether in the abbreviation of the second month, the second
14212 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14213 two bytes long, with UTF-8 encoding. */
14214 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14215 if (strftime (buf, sizeof (buf), "%b", &t) < 4
14216 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14217 return 1;
14218#endif
14219#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
14220 /* Check whether the decimal separator is a comma.
14221 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14222 are nl_langinfo(RADIXCHAR) are both ".". */
14223 if (localeconv () ->decimal_point[0] != ',') return 1;
14224#endif
14225 return 0;
14226}
14227
14228_ACEOF
14229 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14230 (eval $ac_link) 2>&5
14231 ac_status=$?
14232 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14233 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14234 case "$host_os" in
14235 # Handle native Windows specially, because there setlocale() interprets
14236 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14237 # "fr" or "fra" as "French" or "French_France.1252",
14238 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14239 # "ja" as "Japanese" or "Japanese_Japan.932",
14240 # and similar.
14241 mingw*)
14242 # Test for the hypothetical native Windows locale name.
14243 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14244 gt_cv_locale_fr_utf8=French_France.65001
14245 else
14246 # None found.
14247 gt_cv_locale_fr_utf8=none
14248 fi
14249 ;;
14250 *)
14251 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14252 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14253 # configure script would override the LC_ALL setting. Likewise for
14254 # LC_CTYPE, which is also set at the beginning of the configure script.
14255 # Test for the usual locale name.
14256 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14257 gt_cv_locale_fr_utf8=fr_FR
14258 else
14259 # Test for the locale name with explicit encoding suffix.
14260 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14261 gt_cv_locale_fr_utf8=fr_FR.UTF-8
14262 else
14263 # Test for the Solaris 7 locale name.
14264 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14265 gt_cv_locale_fr_utf8=fr.UTF-8
14266 else
14267 # None found.
14268 gt_cv_locale_fr_utf8=none
14269 fi
14270 fi
14271 fi
14272 ;;
14273 esac
14274 fi
14275 rm -fr conftest*
14276
14277fi
14278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
14279$as_echo "$gt_cv_locale_fr_utf8" >&6; }
14280 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
14281
14282
14283
14284
14285
14286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
14287$as_echo_n "checking for a traditional french locale... " >&6; }
d0ac1c44 14288if ${gt_cv_locale_fr+:} false; then :
8690e634
JK
14289 $as_echo_n "(cached) " >&6
14290else
14291
14292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14293/* end confdefs.h. */
14294
14295#include <locale.h>
14296#include <time.h>
14297#if HAVE_LANGINFO_CODESET
14298# include <langinfo.h>
14299#endif
14300#include <stdlib.h>
14301#include <string.h>
14302struct tm t;
14303char buf[16];
14304int main () {
14305 /* Check whether the given locale name is recognized by the system. */
5e8754f9 14306#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8690e634
JK
14307 /* On native Windows, setlocale(category, "") looks at the system settings,
14308 not at the environment variables. Also, when an encoding suffix such
14309 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14310 category of the locale to "C". */
14311 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14312 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14313 return 1;
5e8754f9 14314#else
8690e634 14315 if (setlocale (LC_ALL, "") == NULL) return 1;
5e8754f9 14316#endif
8690e634
JK
14317 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14318 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14319 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14320 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14321 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14322 some unit tests fail.
14323 On MirBSD 10, when an unsupported locale is specified, setlocale()
14324 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
5e8754f9 14325#if HAVE_LANGINFO_CODESET
8690e634
JK
14326 {
14327 const char *cs = nl_langinfo (CODESET);
14328 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14329 || strcmp (cs, "UTF-8") == 0)
14330 return 1;
14331 }
5e8754f9
SDJ
14332#endif
14333#ifdef __CYGWIN__
8690e634
JK
14334 /* On Cygwin, avoid locale names without encoding suffix, because the
14335 locale_charset() function relies on the encoding suffix. Note that
14336 LC_ALL is set on the command line. */
14337 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
5e8754f9 14338#endif
8690e634
JK
14339 /* Check whether in the abbreviation of the second month, the second
14340 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
14341 one byte long. This excludes the UTF-8 encoding. */
14342 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14343 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
5e8754f9 14344#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8690e634
JK
14345 /* Check whether the decimal separator is a comma.
14346 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14347 are nl_langinfo(RADIXCHAR) are both ".". */
14348 if (localeconv () ->decimal_point[0] != ',') return 1;
7a6dbc2f 14349#endif
5e8754f9 14350 return 0;
8690e634
JK
14351}
14352
14353_ACEOF
14354 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14355 (eval $ac_link) 2>&5
14356 ac_status=$?
14357 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14358 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14359 case "$host_os" in
14360 # Handle native Windows specially, because there setlocale() interprets
14361 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14362 # "fr" or "fra" as "French" or "French_France.1252",
14363 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14364 # "ja" as "Japanese" or "Japanese_Japan.932",
14365 # and similar.
14366 mingw*)
14367 # Test for the native Windows locale name.
14368 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14369 gt_cv_locale_fr=French_France.1252
14370 else
14371 # None found.
14372 gt_cv_locale_fr=none
14373 fi
14374 ;;
14375 *)
14376 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14377 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14378 # configure script would override the LC_ALL setting. Likewise for
14379 # LC_CTYPE, which is also set at the beginning of the configure script.
14380 # Test for the usual locale name.
14381 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14382 gt_cv_locale_fr=fr_FR
14383 else
14384 # Test for the locale name with explicit encoding suffix.
14385 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14386 gt_cv_locale_fr=fr_FR.ISO-8859-1
14387 else
14388 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
14389 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14390 gt_cv_locale_fr=fr_FR.ISO8859-1
14391 else
14392 # Test for the HP-UX locale name.
14393 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14394 gt_cv_locale_fr=fr_FR.iso88591
14395 else
14396 # Test for the Solaris 7 locale name.
14397 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14398 gt_cv_locale_fr=fr
14399 else
14400 # None found.
14401 gt_cv_locale_fr=none
14402 fi
14403 fi
14404 fi
14405 fi
14406 fi
14407 ;;
14408 esac
14409 fi
14410 rm -fr conftest*
14411
14412fi
6ec2e0f5
SDJ
14413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
14414$as_echo "$gt_cv_locale_fr" >&6; }
14415 LOCALE_FR=$gt_cv_locale_fr
14416
14417
14418
14419
14420
14421
14422
472fa5ee
SM
14423
14424
14425
14426
14427
14428
14429 GNULIB_FFSL=0;
14430 GNULIB_FFSLL=0;
6ec2e0f5
SDJ
14431 GNULIB_MEMCHR=0;
14432 GNULIB_MEMMEM=0;
14433 GNULIB_MEMPCPY=0;
14434 GNULIB_MEMRCHR=0;
14435 GNULIB_RAWMEMCHR=0;
14436 GNULIB_STPCPY=0;
14437 GNULIB_STPNCPY=0;
14438 GNULIB_STRCHRNUL=0;
14439 GNULIB_STRDUP=0;
14440 GNULIB_STRNCAT=0;
14441 GNULIB_STRNDUP=0;
14442 GNULIB_STRNLEN=0;
14443 GNULIB_STRPBRK=0;
14444 GNULIB_STRSEP=0;
14445 GNULIB_STRSTR=0;
14446 GNULIB_STRCASESTR=0;
14447 GNULIB_STRTOK_R=0;
14448 GNULIB_MBSLEN=0;
14449 GNULIB_MBSNLEN=0;
14450 GNULIB_MBSCHR=0;
14451 GNULIB_MBSRCHR=0;
14452 GNULIB_MBSSTR=0;
14453 GNULIB_MBSCASECMP=0;
14454 GNULIB_MBSNCASECMP=0;
14455 GNULIB_MBSPCASECMP=0;
14456 GNULIB_MBSCASESTR=0;
14457 GNULIB_MBSCSPN=0;
14458 GNULIB_MBSPBRK=0;
14459 GNULIB_MBSSPN=0;
14460 GNULIB_MBSSEP=0;
14461 GNULIB_MBSTOK_R=0;
14462 GNULIB_STRERROR=0;
14463 GNULIB_STRERROR_R=0;
14464 GNULIB_STRSIGNAL=0;
14465 GNULIB_STRVERSCMP=0;
14466 HAVE_MBSLEN=0;
5e8754f9 14467 HAVE_FFSL=1;
6ec2e0f5
SDJ
14468 HAVE_FFSLL=1;
14469 HAVE_MEMCHR=1;
14470 HAVE_DECL_MEMMEM=1;
14471 HAVE_MEMPCPY=1;
14472 HAVE_DECL_MEMRCHR=1;
14473 HAVE_RAWMEMCHR=1;
14474 HAVE_STPCPY=1;
14475 HAVE_STPNCPY=1;
14476 HAVE_STRCHRNUL=1;
14477 HAVE_DECL_STRDUP=1;
14478 HAVE_DECL_STRNDUP=1;
14479 HAVE_DECL_STRNLEN=1;
14480 HAVE_STRPBRK=1;
14481 HAVE_STRSEP=1;
14482 HAVE_STRCASESTR=1;
14483 HAVE_DECL_STRTOK_R=1;
14484 HAVE_DECL_STRERROR_R=1;
14485 HAVE_DECL_STRSIGNAL=1;
14486 HAVE_STRVERSCMP=1;
14487 REPLACE_MEMCHR=0;
14488 REPLACE_MEMMEM=0;
14489 REPLACE_STPNCPY=0;
14490 REPLACE_STRDUP=0;
14491 REPLACE_STRSTR=0;
14492 REPLACE_STRCASESTR=0;
5e8754f9 14493 REPLACE_STRCHRNUL=0;
6ec2e0f5
SDJ
14494 REPLACE_STRERROR=0;
14495 REPLACE_STRERROR_R=0;
5e8754f9
SDJ
14496 REPLACE_STRNCAT=0;
14497 REPLACE_STRNDUP=0;
14498 REPLACE_STRNLEN=0;
6ec2e0f5 14499 REPLACE_STRSIGNAL=0;
5e8754f9 14500 REPLACE_STRTOK_R=0;
6ec2e0f5
SDJ
14501 UNDEFINE_STRTOK_R=0;
14502
14503
14504
14505
14506
14507 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
14508 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
14509 # irrelevant for anonymous mappings.
14510 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
d0ac1c44 14511if test "x$ac_cv_func_mmap" = xyes; then :
6ec2e0f5
SDJ
14512 gl_have_mmap=yes
14513else
14514 gl_have_mmap=no
14515fi
14516
14517
14518 # Try to allow MAP_ANONYMOUS.
14519 gl_have_mmap_anonymous=no
14520 if test $gl_have_mmap = yes; then
14521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
14522$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
14523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14524/* end confdefs.h. */
14525
14526#include <sys/mman.h>
14527#ifdef MAP_ANONYMOUS
14528 I cannot identify this map
14529#endif
14530
14531_ACEOF
14532if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14533 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14534 gl_have_mmap_anonymous=yes
14535fi
14536rm -f conftest*
14537
14538 if test $gl_have_mmap_anonymous != yes; then
14539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14540/* end confdefs.h. */
14541
14542#include <sys/mman.h>
14543#ifdef MAP_ANON
14544 I cannot identify this map
14545#endif
14546
14547_ACEOF
14548if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14549 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14550
14551$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
14552
14553 gl_have_mmap_anonymous=yes
14554fi
14555rm -f conftest*
14556
14557 fi
14558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
14559$as_echo "$gl_have_mmap_anonymous" >&6; }
14560 if test $gl_have_mmap_anonymous = yes; then
14561
14562$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
14563
14564 fi
14565 fi
14566
14567
472fa5ee
SM
14568 :
14569
14570
14571
14572
14573
14574
14575 :
14576
14577
14578
14579
6ec2e0f5
SDJ
14580
14581
14582
14583
14584 if test $HAVE_MEMCHR = 1; then
14585 # Detect platform-specific bugs in some versions of glibc:
14586 # memchr should not dereference anything with length 0
5e8754f9 14587 # http://bugzilla.redhat.com/499689
6ec2e0f5 14588 # memchr should not dereference overestimated length after a match
5e8754f9
SDJ
14589 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
14590 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
6ec2e0f5
SDJ
14591 # Assume that memchr works on platforms that lack mprotect.
14592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
14593$as_echo_n "checking whether memchr works... " >&6; }
d0ac1c44 14594if ${gl_cv_func_memchr_works+:} false; then :
6ec2e0f5
SDJ
14595 $as_echo_n "(cached) " >&6
14596else
14597 if test "$cross_compiling" = yes; then :
5e8754f9 14598 gl_cv_func_memchr_works="guessing no"
6ec2e0f5
SDJ
14599else
14600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14601/* end confdefs.h. */
14602
14603#include <string.h>
14604#if HAVE_SYS_MMAN_H
14605# include <fcntl.h>
14606# include <unistd.h>
14607# include <sys/types.h>
14608# include <sys/mman.h>
14609# ifndef MAP_FILE
14610# define MAP_FILE 0
14611# endif
14612#endif
14613
14614int
14615main ()
14616{
14617
14618 int result = 0;
14619 char *fence = NULL;
14620#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
14621# if HAVE_MAP_ANONYMOUS
14622 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
14623 const int fd = -1;
14624# else /* !HAVE_MAP_ANONYMOUS */
14625 const int flags = MAP_FILE | MAP_PRIVATE;
14626 int fd = open ("/dev/zero", O_RDONLY, 0666);
14627 if (fd >= 0)
14628# endif
14629 {
14630 int pagesize = getpagesize ();
14631 char *two_pages =
14632 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
14633 flags, fd, 0);
14634 if (two_pages != (char *)(-1)
14635 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
14636 fence = two_pages + pagesize;
14637 }
14638#endif
14639 if (fence)
14640 {
14641 if (memchr (fence, 0, 0))
14642 result |= 1;
14643 strcpy (fence - 9, "12345678");
14644 if (memchr (fence - 9, 0, 79) != fence - 1)
14645 result |= 2;
14646 if (memchr (fence - 1, 0, 3) != fence - 1)
14647 result |= 4;
14648 }
14649 return result;
14650
14651 ;
14652 return 0;
14653}
14654_ACEOF
14655if ac_fn_c_try_run "$LINENO"; then :
14656 gl_cv_func_memchr_works=yes
14657else
14658 gl_cv_func_memchr_works=no
14659fi
14660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14661 conftest.$ac_objext conftest.beam conftest.$ac_ext
14662fi
14663
14664fi
14665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
14666$as_echo "$gl_cv_func_memchr_works" >&6; }
5e8754f9
SDJ
14667 if test "$gl_cv_func_memchr_works" != yes; then
14668 REPLACE_MEMCHR=1
14669 fi
6ec2e0f5
SDJ
14670 fi
14671
472fa5ee
SM
14672
14673 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
d0ac1c44 14674if test "x$ac_cv_have_decl_memmem" = xyes; then :
6ec2e0f5
SDJ
14675 ac_have_decl=1
14676else
14677 ac_have_decl=0
14678fi
14679
14680cat >>confdefs.h <<_ACEOF
14681#define HAVE_DECL_MEMMEM $ac_have_decl
14682_ACEOF
14683
14684
14685
14686
14687
472fa5ee 14688
6ec2e0f5
SDJ
14689 for ac_func in memmem
14690do :
14691 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 14692if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
14693 cat >>confdefs.h <<_ACEOF
14694#define HAVE_MEMMEM 1
14695_ACEOF
14696
14697fi
14698done
14699
14700 if test $ac_cv_func_memmem = yes; then
14701 HAVE_MEMMEM=1
14702 else
14703 HAVE_MEMMEM=0
14704 fi
14705
472fa5ee
SM
14706 :
14707
14708
14709
14710
14711
6ec2e0f5
SDJ
14712 if test $ac_cv_have_decl_memmem = no; then
14713 HAVE_DECL_MEMMEM=0
14714 else
14715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
14716$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 14717if ${gl_cv_func_memmem_works_always+:} false; then :
6ec2e0f5
SDJ
14718 $as_echo_n "(cached) " >&6
14719else
14720 if test "$cross_compiling" = yes; then :
14721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14722/* end confdefs.h. */
14723
14724#ifdef __GNU_LIBRARY__
14725 #include <features.h>
14726 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
14727 || __GLIBC_MINOR__ > 12)) \
14728 || (__GLIBC__ > 2)) \
14729 || defined __UCLIBC__
14730 Lucky user
14731 #endif
14732#elif defined __CYGWIN__
14733 #include <cygwin/version.h>
14734 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
14735 Lucky user
14736 #endif
14737#else
14738 Lucky user
14739#endif
14740
14741_ACEOF
14742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14743 $EGREP "Lucky user" >/dev/null 2>&1; then :
14744 gl_cv_func_memmem_works_always="guessing yes"
14745else
14746 gl_cv_func_memmem_works_always="guessing no"
14747fi
14748rm -f conftest*
14749
14750
14751else
14752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14753/* end confdefs.h. */
14754
14755#include <string.h> /* for memmem */
14756#define P "_EF_BF_BD"
14757#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
14758#define NEEDLE P P P P P
14759
14760int
14761main ()
14762{
14763
14764 int result = 0;
14765 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
14766 result |= 1;
14767 /* Check for empty needle behavior. */
14768 {
14769 const char *haystack = "AAA";
14770 if (memmem (haystack, 3, NULL, 0) != haystack)
14771 result |= 2;
14772 }
14773 return result;
14774
14775 ;
14776 return 0;
14777}
14778_ACEOF
14779if ac_fn_c_try_run "$LINENO"; then :
14780 gl_cv_func_memmem_works_always=yes
14781else
14782 gl_cv_func_memmem_works_always=no
14783fi
14784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14785 conftest.$ac_objext conftest.beam conftest.$ac_ext
14786fi
14787
14788
14789fi
14790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
14791$as_echo "$gl_cv_func_memmem_works_always" >&6; }
14792 case "$gl_cv_func_memmem_works_always" in
14793 *yes) ;;
14794 *)
14795 REPLACE_MEMMEM=1
14796 ;;
14797 esac
14798 fi
14799 :
14800
472fa5ee
SM
14801
14802 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
d0ac1c44 14803if test "x$ac_cv_have_decl_memrchr" = xyes; then :
6ec2e0f5
SDJ
14804 ac_have_decl=1
14805else
14806 ac_have_decl=0
14807fi
14808
14809cat >>confdefs.h <<_ACEOF
14810#define HAVE_DECL_MEMRCHR $ac_have_decl
14811_ACEOF
14812
14813
14814
14815
14816
14817
2d8adcbd
MM
14818
14819
472fa5ee
SM
14820
14821
14822
14823
6ec2e0f5
SDJ
14824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
14825$as_echo_n "checking for promoted mode_t type... " >&6; }
d0ac1c44 14826if ${gl_cv_promoted_mode_t+:} false; then :
6ec2e0f5
SDJ
14827 $as_echo_n "(cached) " >&6
14828else
14829
14830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14831/* end confdefs.h. */
14832#include <sys/types.h>
14833int
14834main ()
14835{
14836typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
14837 ;
14838 return 0;
14839}
14840_ACEOF
14841if ac_fn_c_try_compile "$LINENO"; then :
14842 gl_cv_promoted_mode_t='int'
14843else
14844 gl_cv_promoted_mode_t='mode_t'
14845fi
14846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14847
14848fi
14849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
14850$as_echo "$gl_cv_promoted_mode_t" >&6; }
14851
14852cat >>confdefs.h <<_ACEOF
14853#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
14854_ACEOF
14855
14856
14857
14858
14859
472fa5ee
SM
14860
14861
14862
6ec2e0f5
SDJ
14863 GNULIB_DPRINTF=0;
14864 GNULIB_FCLOSE=0;
14865 GNULIB_FDOPEN=0;
14866 GNULIB_FFLUSH=0;
14867 GNULIB_FGETC=0;
14868 GNULIB_FGETS=0;
14869 GNULIB_FOPEN=0;
14870 GNULIB_FPRINTF=0;
14871 GNULIB_FPRINTF_POSIX=0;
14872 GNULIB_FPURGE=0;
14873 GNULIB_FPUTC=0;
14874 GNULIB_FPUTS=0;
14875 GNULIB_FREAD=0;
14876 GNULIB_FREOPEN=0;
14877 GNULIB_FSCANF=0;
14878 GNULIB_FSEEK=0;
14879 GNULIB_FSEEKO=0;
14880 GNULIB_FTELL=0;
14881 GNULIB_FTELLO=0;
14882 GNULIB_FWRITE=0;
14883 GNULIB_GETC=0;
14884 GNULIB_GETCHAR=0;
14885 GNULIB_GETDELIM=0;
14886 GNULIB_GETLINE=0;
14887 GNULIB_OBSTACK_PRINTF=0;
14888 GNULIB_OBSTACK_PRINTF_POSIX=0;
14889 GNULIB_PCLOSE=0;
14890 GNULIB_PERROR=0;
14891 GNULIB_POPEN=0;
14892 GNULIB_PRINTF=0;
14893 GNULIB_PRINTF_POSIX=0;
14894 GNULIB_PUTC=0;
14895 GNULIB_PUTCHAR=0;
14896 GNULIB_PUTS=0;
14897 GNULIB_REMOVE=0;
14898 GNULIB_RENAME=0;
14899 GNULIB_RENAMEAT=0;
14900 GNULIB_SCANF=0;
14901 GNULIB_SNPRINTF=0;
14902 GNULIB_SPRINTF_POSIX=0;
14903 GNULIB_STDIO_H_NONBLOCKING=0;
14904 GNULIB_STDIO_H_SIGPIPE=0;
14905 GNULIB_TMPFILE=0;
14906 GNULIB_VASPRINTF=0;
14907 GNULIB_VFSCANF=0;
14908 GNULIB_VSCANF=0;
14909 GNULIB_VDPRINTF=0;
14910 GNULIB_VFPRINTF=0;
14911 GNULIB_VFPRINTF_POSIX=0;
14912 GNULIB_VPRINTF=0;
14913 GNULIB_VPRINTF_POSIX=0;
14914 GNULIB_VSNPRINTF=0;
14915 GNULIB_VSPRINTF_POSIX=0;
14916 HAVE_DECL_FPURGE=1;
14917 HAVE_DECL_FSEEKO=1;
14918 HAVE_DECL_FTELLO=1;
14919 HAVE_DECL_GETDELIM=1;
14920 HAVE_DECL_GETLINE=1;
14921 HAVE_DECL_OBSTACK_PRINTF=1;
14922 HAVE_DECL_SNPRINTF=1;
14923 HAVE_DECL_VSNPRINTF=1;
14924 HAVE_DPRINTF=1;
14925 HAVE_FSEEKO=1;
14926 HAVE_FTELLO=1;
14927 HAVE_PCLOSE=1;
14928 HAVE_POPEN=1;
14929 HAVE_RENAMEAT=1;
14930 HAVE_VASPRINTF=1;
14931 HAVE_VDPRINTF=1;
14932 REPLACE_DPRINTF=0;
14933 REPLACE_FCLOSE=0;
14934 REPLACE_FDOPEN=0;
14935 REPLACE_FFLUSH=0;
14936 REPLACE_FOPEN=0;
14937 REPLACE_FPRINTF=0;
14938 REPLACE_FPURGE=0;
14939 REPLACE_FREOPEN=0;
14940 REPLACE_FSEEK=0;
14941 REPLACE_FSEEKO=0;
14942 REPLACE_FTELL=0;
14943 REPLACE_FTELLO=0;
14944 REPLACE_GETDELIM=0;
14945 REPLACE_GETLINE=0;
14946 REPLACE_OBSTACK_PRINTF=0;
14947 REPLACE_PERROR=0;
14948 REPLACE_POPEN=0;
14949 REPLACE_PRINTF=0;
14950 REPLACE_REMOVE=0;
14951 REPLACE_RENAME=0;
14952 REPLACE_RENAMEAT=0;
14953 REPLACE_SNPRINTF=0;
14954 REPLACE_SPRINTF=0;
14955 REPLACE_STDIO_READ_FUNCS=0;
14956 REPLACE_STDIO_WRITE_FUNCS=0;
14957 REPLACE_TMPFILE=0;
14958 REPLACE_VASPRINTF=0;
14959 REPLACE_VDPRINTF=0;
14960 REPLACE_VFPRINTF=0;
14961 REPLACE_VPRINTF=0;
14962 REPLACE_VSNPRINTF=0;
14963 REPLACE_VSPRINTF=0;
14964
14965
14966
2d8adcbd
MM
14967
14968
14969
14970
5e8754f9
SDJ
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
472fa5ee 14996 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
d0ac1c44 14997if test "x$ac_cv_have_decl_setenv" = xyes; then :
6ec2e0f5
SDJ
14998 ac_have_decl=1
14999else
15000 ac_have_decl=0
15001fi
15002
15003cat >>confdefs.h <<_ACEOF
15004#define HAVE_DECL_SETENV $ac_have_decl
15005_ACEOF
15006
15007
15008
15009
15010
15011
472fa5ee
SM
15012
15013
15014
15015
15016 :
15017
15018
15019
15020
15021
6ec2e0f5
SDJ
15022 if test $ac_cv_have_decl_setenv = no; then
15023 HAVE_DECL_SETENV=0
15024 fi
15025
472fa5ee
SM
15026 :
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036 :
15037
6ec2e0f5
SDJ
15038
15039
15040
15041
15042 for ac_header in search.h
15043do :
15044 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
d0ac1c44 15045if test "x$ac_cv_header_search_h" = xyes; then :
6ec2e0f5
SDJ
15046 cat >>confdefs.h <<_ACEOF
15047#define HAVE_SEARCH_H 1
15048_ACEOF
15049
15050fi
15051
15052done
15053
15054 for ac_func in tsearch
15055do :
15056 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
d0ac1c44 15057if test "x$ac_cv_func_tsearch" = xyes; then :
6ec2e0f5
SDJ
15058 cat >>confdefs.h <<_ACEOF
15059#define HAVE_TSEARCH 1
15060_ACEOF
15061
15062fi
15063done
15064
15065
15066
15067
15068 GNULIB_PTHREAD_SIGMASK=0;
15069 GNULIB_RAISE=0;
15070 GNULIB_SIGNAL_H_SIGPIPE=0;
15071 GNULIB_SIGPROCMASK=0;
15072 GNULIB_SIGACTION=0;
15073 HAVE_POSIX_SIGNALBLOCKING=1;
15074 HAVE_PTHREAD_SIGMASK=1;
15075 HAVE_RAISE=1;
15076 HAVE_SIGSET_T=1;
15077 HAVE_SIGINFO_T=1;
15078 HAVE_SIGACTION=1;
15079 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
15080
15081 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
15082
15083 HAVE_SIGHANDLER_T=1;
15084 REPLACE_PTHREAD_SIGMASK=0;
15085 REPLACE_RAISE=0;
15086
15087
15088 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
15089 #include <signal.h>
15090 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
15091 #include <sys/types.h>
15092
15093"
d0ac1c44 15094if test "x$ac_cv_type_sigset_t" = xyes; then :
6ec2e0f5
SDJ
15095
15096cat >>confdefs.h <<_ACEOF
15097#define HAVE_SIGSET_T 1
15098_ACEOF
15099
15100gl_cv_type_sigset_t=yes
15101else
15102 gl_cv_type_sigset_t=no
15103fi
15104
15105 if test $gl_cv_type_sigset_t != yes; then
15106 HAVE_SIGSET_T=0
15107 fi
15108
15109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
15110$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
d0ac1c44 15111if ${ac_cv_type_uid_t+:} false; then :
6ec2e0f5
SDJ
15112 $as_echo_n "(cached) " >&6
15113else
15114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15115/* end confdefs.h. */
15116#include <sys/types.h>
15117
15118_ACEOF
15119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15120 $EGREP "uid_t" >/dev/null 2>&1; then :
15121 ac_cv_type_uid_t=yes
15122else
15123 ac_cv_type_uid_t=no
15124fi
15125rm -f conftest*
15126
15127fi
15128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
15129$as_echo "$ac_cv_type_uid_t" >&6; }
15130if test $ac_cv_type_uid_t = no; then
15131
15132$as_echo "#define uid_t int" >>confdefs.h
15133
15134
15135$as_echo "#define gid_t int" >>confdefs.h
15136
15137fi
15138
15139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
15140$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
d0ac1c44 15141if ${ac_cv_header_stdbool_h+:} false; then :
6ec2e0f5
SDJ
15142 $as_echo_n "(cached) " >&6
15143else
15144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15145/* end confdefs.h. */
15146
15147 #include <stdbool.h>
15148
15149 #ifdef __cplusplus
15150 typedef bool Bool;
15151 #else
15152 typedef _Bool Bool;
15153 #ifndef bool
15154 "error: bool is not defined"
15155 #endif
15156 #ifndef false
15157 "error: false is not defined"
15158 #endif
15159 #if false
15160 "error: false is not 0"
15161 #endif
15162 #ifndef true
15163 "error: true is not defined"
15164 #endif
15165 #if true != 1
15166 "error: true is not 1"
15167 #endif
15168 #endif
15169
15170 #ifndef __bool_true_false_are_defined
15171 "error: __bool_true_false_are_defined is not defined"
15172 #endif
15173
15174 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
15175
15176 char a[true == 1 ? 1 : -1];
15177 char b[false == 0 ? 1 : -1];
15178 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
15179 char d[(bool) 0.5 == true ? 1 : -1];
15180 /* See body of main program for 'e'. */
15181 char f[(Bool) 0.0 == false ? 1 : -1];
15182 char g[true];
15183 char h[sizeof (Bool)];
15184 char i[sizeof s.t];
15185 enum { j = false, k = true, l = false * true, m = true * 256 };
15186 /* The following fails for
15187 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
15188 Bool n[m];
15189 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
15190 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
15191 /* Catch a bug in an HP-UX C compiler. See
5e8754f9
SDJ
15192 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
15193 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
6ec2e0f5
SDJ
15194 */
15195 Bool q = true;
15196 Bool *pq = &q;
15197 bool *qq = &q;
15198
15199int
15200main ()
15201{
15202
15203 bool e = &s;
15204 *pq |= q; *pq |= ! q;
15205 *qq |= q; *qq |= ! q;
15206 /* Refer to every declared value, to avoid compiler optimizations. */
15207 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
15208 + !m + !n + !o + !p + !q + !pq + !qq);
15209
15210 ;
15211 return 0;
15212}
15213_ACEOF
15214if ac_fn_c_try_compile "$LINENO"; then :
15215 ac_cv_header_stdbool_h=yes
15216else
15217 ac_cv_header_stdbool_h=no
15218fi
15219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15220fi
15221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
15222$as_echo "$ac_cv_header_stdbool_h" >&6; }
15223 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
d0ac1c44 15224if test "x$ac_cv_type__Bool" = xyes; then :
6ec2e0f5
SDJ
15225
15226cat >>confdefs.h <<_ACEOF
15227#define HAVE__BOOL 1
15228_ACEOF
15229
15230
15231fi
15232
15233
15234
15235 REPLACE_NULL=0;
15236 HAVE_MAX_ALIGN_T=1;
15237 HAVE_WCHAR_T=1;
15238
15239
15240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
15241$as_echo_n "checking for wchar_t... " >&6; }
d0ac1c44 15242if ${gt_cv_c_wchar_t+:} false; then :
6ec2e0f5
SDJ
15243 $as_echo_n "(cached) " >&6
15244else
15245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15246/* end confdefs.h. */
15247#include <stddef.h>
15248 wchar_t foo = (wchar_t)'\0';
15249int
15250main ()
15251{
15252
15253 ;
15254 return 0;
15255}
15256_ACEOF
15257if ac_fn_c_try_compile "$LINENO"; then :
15258 gt_cv_c_wchar_t=yes
15259else
15260 gt_cv_c_wchar_t=no
15261fi
15262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15263fi
15264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
15265$as_echo "$gt_cv_c_wchar_t" >&6; }
15266 if test $gt_cv_c_wchar_t = yes; then
15267
15268$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
15269
15270 fi
15271
15272
15273
472fa5ee
SM
15274
15275
15276
15277
15278 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
d0ac1c44 15279if test "x$ac_cv_have_decl_strdup" = xyes; then :
6ec2e0f5
SDJ
15280 ac_have_decl=1
15281else
15282 ac_have_decl=0
15283fi
15284
15285cat >>confdefs.h <<_ACEOF
15286#define HAVE_DECL_STRDUP $ac_have_decl
15287_ACEOF
15288
15289
472fa5ee 15290
6ec2e0f5
SDJ
15291 REPLACE_STRERROR_0=0
15292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15293$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
d0ac1c44 15294if ${gl_cv_func_strerror_0_works+:} false; then :
6ec2e0f5
SDJ
15295 $as_echo_n "(cached) " >&6
15296else
15297 if test "$cross_compiling" = yes; then :
15298 case "$host_os" in
5e8754f9
SDJ
15299 # Guess yes on glibc systems.
15300 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15301 # If we don't know, assume the worst.
15302 *) gl_cv_func_strerror_0_works="guessing no" ;;
6ec2e0f5
SDJ
15303 esac
15304
15305else
15306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15307/* end confdefs.h. */
15308#include <string.h>
15309 #include <errno.h>
15310
15311int
15312main ()
15313{
15314int result = 0;
15315 char *str;
15316 errno = 0;
15317 str = strerror (0);
15318 if (!*str) result |= 1;
15319 if (errno) result |= 2;
15320 if (strstr (str, "nknown") || strstr (str, "ndefined"))
15321 result |= 4;
15322 return result;
15323 ;
15324 return 0;
15325}
15326_ACEOF
15327if ac_fn_c_try_run "$LINENO"; then :
15328 gl_cv_func_strerror_0_works=yes
15329else
15330 gl_cv_func_strerror_0_works=no
15331fi
15332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15333 conftest.$ac_objext conftest.beam conftest.$ac_ext
15334fi
15335
15336
15337fi
15338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15339$as_echo "$gl_cv_func_strerror_0_works" >&6; }
15340 case "$gl_cv_func_strerror_0_works" in
15341 *yes) ;;
15342 *)
15343 REPLACE_STRERROR_0=1
15344
15345$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
15346
15347 ;;
15348 esac
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
5abebf3c
CB
15359 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
15360if test "x$ac_cv_func_strerror_r" = xyes; then :
15361
15362fi
15363
15364 if test $ac_cv_func_strerror_r = yes; then
15365 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
15366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
15367$as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
15368if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
15369 $as_echo_n "(cached) " >&6
15370else
15371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15372/* end confdefs.h. */
15373#include <string.h>
15374 int strerror_r (int, char *, size_t);
15375
15376int
15377main ()
15378{
15379
15380 ;
15381 return 0;
15382}
15383_ACEOF
15384if ac_fn_c_try_compile "$LINENO"; then :
15385 gl_cv_func_strerror_r_posix_signature=yes
15386else
15387 gl_cv_func_strerror_r_posix_signature=no
15388fi
15389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15390
15391fi
15392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
15393$as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
15394 if test $gl_cv_func_strerror_r_posix_signature = yes; then
15395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
15396$as_echo_n "checking whether strerror_r works... " >&6; }
15397if ${gl_cv_func_strerror_r_works+:} false; then :
15398 $as_echo_n "(cached) " >&6
15399else
15400 if test "$cross_compiling" = yes; then :
15401
15402 case "$host_os" in
15403 # Guess no on AIX.
15404 aix*) gl_cv_func_strerror_r_works="guessing no";;
15405 # Guess no on HP-UX.
15406 hpux*) gl_cv_func_strerror_r_works="guessing no";;
15407 # Guess no on BSD variants.
15408 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
15409 # Guess yes otherwise.
15410 *) gl_cv_func_strerror_r_works="guessing yes";;
15411 esac
15412
15413else
15414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15415/* end confdefs.h. */
15416#include <errno.h>
15417 #include <string.h>
15418
15419int
15420main ()
15421{
15422int result = 0;
15423 char buf[79];
15424 if (strerror_r (EACCES, buf, 0) < 0)
15425 result |= 1;
15426 errno = 0;
15427 if (strerror_r (EACCES, buf, sizeof buf) != 0)
15428 result |= 2;
15429 strcpy (buf, "Unknown");
15430 if (strerror_r (0, buf, sizeof buf) != 0)
15431 result |= 4;
15432 if (errno)
15433 result |= 8;
15434 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
15435 result |= 0x10;
15436 errno = 0;
15437 *buf = 0;
15438 if (strerror_r (-3, buf, sizeof buf) < 0)
15439 result |= 0x20;
15440 if (errno)
15441 result |= 0x40;
15442 if (!*buf)
15443 result |= 0x80;
15444 return result;
15445
15446 ;
15447 return 0;
15448}
15449_ACEOF
15450if ac_fn_c_try_run "$LINENO"; then :
15451 gl_cv_func_strerror_r_works=yes
15452else
15453 gl_cv_func_strerror_r_works=no
15454fi
15455rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15456 conftest.$ac_objext conftest.beam conftest.$ac_ext
15457fi
15458
15459
15460fi
15461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15462$as_echo "$gl_cv_func_strerror_r_works" >&6; }
15463 else
15464
15465 :
15466
15467
15468
15469
15470
15471 if test $ac_cv_func___xpg_strerror_r = yes; then
15472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
15473$as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
15474if ${gl_cv_func_strerror_r_works+:} false; then :
15475 $as_echo_n "(cached) " >&6
15476else
15477 if test "$cross_compiling" = yes; then :
15478 gl_cv_func_strerror_r_works="guessing no"
15479
15480else
15481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15482/* end confdefs.h. */
15483#include <errno.h>
15484 #include <string.h>
15485 extern
15486 #ifdef __cplusplus
15487 "C"
15488 #endif
15489 int __xpg_strerror_r(int, char *, size_t);
15490
15491int
15492main ()
15493{
15494int result = 0;
15495 char buf[256] = "^";
15496 char copy[256];
15497 char *str = strerror (-1);
15498 strcpy (copy, str);
15499 if (__xpg_strerror_r (-2, buf, 1) == 0)
15500 result |= 1;
15501 if (*buf)
15502 result |= 2;
15503 __xpg_strerror_r (-2, buf, 256);
15504 if (strcmp (str, copy))
15505 result |= 4;
15506 return result;
15507
15508 ;
15509 return 0;
15510}
15511_ACEOF
15512if ac_fn_c_try_run "$LINENO"; then :
15513 gl_cv_func_strerror_r_works=yes
15514else
15515 gl_cv_func_strerror_r_works=no
15516fi
15517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15518 conftest.$ac_objext conftest.beam conftest.$ac_ext
15519fi
15520
15521
15522fi
15523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
15524$as_echo "$gl_cv_func_strerror_r_works" >&6; }
15525 fi
15526 fi
15527 fi
15528 fi
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
6ec2e0f5
SDJ
15549
15550
15551 if test $gl_cv_have_include_next = yes; then
15552 gl_cv_next_string_h='<'string.h'>'
15553 else
15554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
15555$as_echo_n "checking absolute name of <string.h>... " >&6; }
d0ac1c44 15556if ${gl_cv_next_string_h+:} false; then :
6ec2e0f5
SDJ
15557 $as_echo_n "(cached) " >&6
15558else
15559
15560
15561
15562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15563/* end confdefs.h. */
15564#include <string.h>
15565_ACEOF
15566 case "$host_os" in
15567 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15568 *) gl_absname_cpp="$ac_cpp" ;;
15569 esac
15570
15571 case "$host_os" in
15572 mingw*)
15573 gl_dirsep_regex='[/\\]'
15574 ;;
15575 *)
15576 gl_dirsep_regex='\/'
15577 ;;
15578 esac
15579 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15580 gl_header_literal_regex=`echo 'string.h' \
15581 | sed -e "$gl_make_literal_regex_sed"`
15582 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15583 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15584 s|^/[^/]|//&|
15585 p
15586 q
15587 }'
15588
15589 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15590 sed -n "$gl_absolute_header_sed"`
15591
15592 gl_header=$gl_cv_absolute_string_h
15593 gl_cv_next_string_h='"'$gl_header'"'
15594
15595
15596fi
15597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
15598$as_echo "$gl_cv_next_string_h" >&6; }
15599 fi
15600 NEXT_STRING_H=$gl_cv_next_string_h
15601
15602 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15603 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15604 gl_next_as_first_directive='<'string.h'>'
15605 else
15606 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15607 gl_next_as_first_directive=$gl_cv_next_string_h
15608 fi
15609 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
15610
15611
15612
15613
15614
15615
5e8754f9
SDJ
15616 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
15617 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15619$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15620if eval \${$as_gl_Symbol+:} false; then :
15621 $as_echo_n "(cached) " >&6
15622else
15623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15624/* end confdefs.h. */
15625#include <string.h>
15626
15627int
15628main ()
15629{
15630#undef $gl_func
15631 (void) $gl_func;
15632 ;
15633 return 0;
15634}
15635_ACEOF
15636if ac_fn_c_try_compile "$LINENO"; then :
15637 eval "$as_gl_Symbol=yes"
15638else
15639 eval "$as_gl_Symbol=no"
15640fi
15641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15642fi
15643eval ac_res=\$$as_gl_Symbol
15644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15645$as_echo "$ac_res" >&6; }
15646 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15647 cat >>confdefs.h <<_ACEOF
15648#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15649_ACEOF
6ec2e0f5 15650
5e8754f9
SDJ
15651 eval ac_cv_have_decl_$gl_func=yes
15652fi
15653 done
6ec2e0f5
SDJ
15654
15655
15656
15657
15658
5e8754f9 15659 if test "$gl_cv_func_memchr_works" != yes; then
6ec2e0f5
SDJ
15660 REPLACE_STRSTR=1
15661 else
15662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
15663$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 15664if ${gl_cv_func_strstr_works_always+:} false; then :
6ec2e0f5
SDJ
15665 $as_echo_n "(cached) " >&6
15666else
15667 if test "$cross_compiling" = yes; then :
15668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15669/* end confdefs.h. */
15670
15671#ifdef __GNU_LIBRARY__
15672 #include <features.h>
15673 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
15674 || defined __UCLIBC__
15675 Lucky user
15676 #endif
15677#elif defined __CYGWIN__
15678 #include <cygwin/version.h>
15679 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
15680 Lucky user
15681 #endif
15682#else
15683 Lucky user
15684#endif
15685
15686_ACEOF
15687if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15688 $EGREP "Lucky user" >/dev/null 2>&1; then :
15689 gl_cv_func_strstr_works_always="guessing yes"
15690else
15691 gl_cv_func_strstr_works_always="guessing no"
15692fi
15693rm -f conftest*
15694
15695
15696else
15697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15698/* end confdefs.h. */
15699
15700#include <string.h> /* for strstr */
15701#define P "_EF_BF_BD"
15702#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
15703#define NEEDLE P P P P P
15704
15705int
15706main ()
15707{
15708return !!strstr (HAYSTACK, NEEDLE);
15709
15710 ;
15711 return 0;
15712}
15713_ACEOF
15714if ac_fn_c_try_run "$LINENO"; then :
15715 gl_cv_func_strstr_works_always=yes
15716else
15717 gl_cv_func_strstr_works_always=no
15718fi
15719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15720 conftest.$ac_objext conftest.beam conftest.$ac_ext
15721fi
15722
15723
15724fi
15725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
15726$as_echo "$gl_cv_func_strstr_works_always" >&6; }
15727 case "$gl_cv_func_strstr_works_always" in
15728 *yes) ;;
15729 *)
15730 REPLACE_STRSTR=1
15731 ;;
15732 esac
15733 fi
15734
472fa5ee
SM
15735
15736 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
d0ac1c44 15737if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
6ec2e0f5
SDJ
15738 ac_have_decl=1
15739else
15740 ac_have_decl=0
15741fi
15742
15743cat >>confdefs.h <<_ACEOF
15744#define HAVE_DECL_STRTOK_R $ac_have_decl
15745_ACEOF
15746
472fa5ee 15747
6ec2e0f5
SDJ
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766 if test $gl_cv_have_include_next = yes; then
15767 gl_cv_next_sys_types_h='<'sys/types.h'>'
15768 else
15769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
15770$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
d0ac1c44 15771if ${gl_cv_next_sys_types_h+:} false; then :
6ec2e0f5
SDJ
15772 $as_echo_n "(cached) " >&6
15773else
15774
15775
15776
15777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15778/* end confdefs.h. */
15779#include <sys/types.h>
15780_ACEOF
15781 case "$host_os" in
15782 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15783 *) gl_absname_cpp="$ac_cpp" ;;
15784 esac
15785
15786 case "$host_os" in
15787 mingw*)
15788 gl_dirsep_regex='[/\\]'
15789 ;;
15790 *)
15791 gl_dirsep_regex='\/'
15792 ;;
15793 esac
15794 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15795 gl_header_literal_regex=`echo 'sys/types.h' \
15796 | sed -e "$gl_make_literal_regex_sed"`
15797 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15798 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15799 s|^/[^/]|//&|
15800 p
15801 q
15802 }'
15803
15804 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15805 sed -n "$gl_absolute_header_sed"`
15806
15807 gl_header=$gl_cv_absolute_sys_types_h
15808 gl_cv_next_sys_types_h='"'$gl_header'"'
15809
15810
15811fi
15812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
15813$as_echo "$gl_cv_next_sys_types_h" >&6; }
15814 fi
15815 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
15816
15817 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15818 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15819 gl_next_as_first_directive='<'sys/types.h'>'
15820 else
15821 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15822 gl_next_as_first_directive=$gl_cv_next_sys_types_h
15823 fi
15824 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
725e2999
JB
15837
15838
15839
15840
15841
15842
15843
5e8754f9
SDJ
15844 GNULIB_MKTIME=0;
15845 GNULIB_NANOSLEEP=0;
15846 GNULIB_STRPTIME=0;
15847 GNULIB_TIMEGM=0;
15848 GNULIB_TIME_R=0;
15849 GNULIB_TIME_RZ=0;
15850 HAVE_DECL_LOCALTIME_R=1;
15851 HAVE_NANOSLEEP=1;
15852 HAVE_STRPTIME=1;
15853 HAVE_TIMEGM=1;
15854 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
15855 REPLACE_MKTIME=GNULIB_PORTCHECK;
15856 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
15857 REPLACE_TIMEGM=GNULIB_PORTCHECK;
6ec2e0f5 15858
5e8754f9
SDJ
15859 : ${GNULIB_GETTIMEOFDAY=0};
15860 REPLACE_GMTIME=0;
15861 REPLACE_LOCALTIME=0;
6ec2e0f5
SDJ
15862
15863
15864
472fa5ee
SM
15865 :
15866
15867
15868
15869
15870
6ec2e0f5
SDJ
15871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
15872$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
d0ac1c44 15873if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
6ec2e0f5
SDJ
15874 $as_echo_n "(cached) " >&6
15875else
15876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15877/* end confdefs.h. */
15878#include <time.h>
15879
15880int
15881main ()
15882{
15883static struct timespec x; x.tv_sec = x.tv_nsec;
15884 ;
15885 return 0;
15886}
15887_ACEOF
15888if ac_fn_c_try_compile "$LINENO"; then :
15889 gl_cv_sys_struct_timespec_in_time_h=yes
15890else
15891 gl_cv_sys_struct_timespec_in_time_h=no
15892fi
15893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15894fi
15895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
15896$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
15897
15898 TIME_H_DEFINES_STRUCT_TIMESPEC=0
15899 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
15900 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
15901 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
15902 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
15903 TIME_H_DEFINES_STRUCT_TIMESPEC=1
15904 else
15905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
15906$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
d0ac1c44 15907if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
6ec2e0f5
SDJ
15908 $as_echo_n "(cached) " >&6
15909else
15910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15911/* end confdefs.h. */
15912#include <sys/time.h>
15913
15914int
15915main ()
15916{
15917static struct timespec x; x.tv_sec = x.tv_nsec;
15918 ;
15919 return 0;
15920}
15921_ACEOF
15922if ac_fn_c_try_compile "$LINENO"; then :
15923 gl_cv_sys_struct_timespec_in_sys_time_h=yes
15924else
15925 gl_cv_sys_struct_timespec_in_sys_time_h=no
15926fi
15927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15928fi
15929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
15930$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
15931 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
15932 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
15933 else
15934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
15935$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
d0ac1c44 15936if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
6ec2e0f5
SDJ
15937 $as_echo_n "(cached) " >&6
15938else
15939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15940/* end confdefs.h. */
15941#include <pthread.h>
15942
15943int
15944main ()
15945{
15946static struct timespec x; x.tv_sec = x.tv_nsec;
15947 ;
15948 return 0;
15949}
15950_ACEOF
15951if ac_fn_c_try_compile "$LINENO"; then :
15952 gl_cv_sys_struct_timespec_in_pthread_h=yes
15953else
15954 gl_cv_sys_struct_timespec_in_pthread_h=no
15955fi
15956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15957fi
15958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
15959$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
15960 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
15961 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
15962 else
15963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
15964$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
d0ac1c44 15965if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
6ec2e0f5
SDJ
15966 $as_echo_n "(cached) " >&6
15967else
15968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15969/* end confdefs.h. */
15970#include <unistd.h>
15971
15972int
15973main ()
15974{
15975static struct timespec x; x.tv_sec = x.tv_nsec;
15976 ;
15977 return 0;
15978}
15979_ACEOF
15980if ac_fn_c_try_compile "$LINENO"; then :
15981 gl_cv_sys_struct_timespec_in_unistd_h=yes
15982else
15983 gl_cv_sys_struct_timespec_in_unistd_h=no
15984fi
15985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15986fi
15987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
15988$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
15989 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
15990 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
15991 fi
15992 fi
15993 fi
15994 fi
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011 if test $gl_cv_have_include_next = yes; then
16012 gl_cv_next_time_h='<'time.h'>'
16013 else
16014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
16015$as_echo_n "checking absolute name of <time.h>... " >&6; }
d0ac1c44 16016if ${gl_cv_next_time_h+:} false; then :
6ec2e0f5
SDJ
16017 $as_echo_n "(cached) " >&6
16018else
16019
16020
16021
16022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16023/* end confdefs.h. */
16024#include <time.h>
16025_ACEOF
16026 case "$host_os" in
16027 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16028 *) gl_absname_cpp="$ac_cpp" ;;
16029 esac
16030
16031 case "$host_os" in
16032 mingw*)
16033 gl_dirsep_regex='[/\\]'
16034 ;;
16035 *)
16036 gl_dirsep_regex='\/'
16037 ;;
16038 esac
16039 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16040 gl_header_literal_regex=`echo 'time.h' \
16041 | sed -e "$gl_make_literal_regex_sed"`
16042 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16043 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16044 s|^/[^/]|//&|
16045 p
16046 q
16047 }'
16048
16049 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16050 sed -n "$gl_absolute_header_sed"`
16051
16052 gl_header=$gl_cv_absolute_time_h
16053 gl_cv_next_time_h='"'$gl_header'"'
16054
16055
16056fi
16057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
16058$as_echo "$gl_cv_next_time_h" >&6; }
16059 fi
16060 NEXT_TIME_H=$gl_cv_next_time_h
16061
16062 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16063 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16064 gl_next_as_first_directive='<'time.h'>'
16065 else
16066 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16067 gl_next_as_first_directive=$gl_cv_next_time_h
16068 fi
16069 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
16070
16071
16072
16073
16074
16075
16076
16077
472fa5ee
SM
16078
16079
16080
16081
16082 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
d0ac1c44 16083if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
6ec2e0f5
SDJ
16084 ac_have_decl=1
16085else
16086 ac_have_decl=0
16087fi
16088
16089cat >>confdefs.h <<_ACEOF
16090#define HAVE_DECL_UNSETENV $ac_have_decl
16091_ACEOF
16092
16093
472fa5ee 16094
6ec2e0f5
SDJ
16095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
16096$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
d0ac1c44 16097if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
6ec2e0f5
SDJ
16098 $as_echo_n "(cached) " >&6
16099else
16100 gl_cv_header_wchar_h_correct_inline=yes
16101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16102/* end confdefs.h. */
16103
16104 #define wcstod renamed_wcstod
16105/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16106 <wchar.h>.
16107 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16108 included before <wchar.h>. */
16109#include <stddef.h>
16110#include <stdio.h>
16111#include <time.h>
16112#include <wchar.h>
16113extern int zero (void);
16114int main () { return zero(); }
16115
16116_ACEOF
16117 save_ac_compile="$ac_compile"
16118 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
5e8754f9 16119 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6ec2e0f5
SDJ
16120 (eval $ac_compile) 2>&5
16121 ac_status=$?
16122 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16123 test $ac_status = 0; }; then
16124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16125/* end confdefs.h. */
16126
16127 #define wcstod renamed_wcstod
16128/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16129 <wchar.h>.
16130 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16131 included before <wchar.h>. */
16132#include <stddef.h>
16133#include <stdio.h>
16134#include <time.h>
16135#include <wchar.h>
16136int zero (void) { return 0; }
16137
16138_ACEOF
16139 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
5e8754f9 16140 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6ec2e0f5
SDJ
16141 (eval $ac_compile) 2>&5
16142 ac_status=$?
16143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16144 test $ac_status = 0; }; then
16145 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
16146 :
16147 else
16148 gl_cv_header_wchar_h_correct_inline=no
16149 fi
16150 fi
16151 fi
16152 ac_compile="$save_ac_compile"
5e8754f9 16153 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
6ec2e0f5
SDJ
16154
16155fi
16156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
16157$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
16158 if test $gl_cv_header_wchar_h_correct_inline = no; then
d0ac1c44 16159 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
6ec2e0f5
SDJ
16160This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
16161C99 mode. You have four options:
16162 - Add the flag -fgnu89-inline to CC and reconfigure, or
16163 - Fix your include files, using parts of
5e8754f9 16164 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
6ec2e0f5
SDJ
16165 - Use a gcc version older than 4.3, or
16166 - Don't use the flags -std=c99 or -std=gnu99.
16167Configuration aborted." "$LINENO" 5
16168 fi
16169
16170
5e8754f9
SDJ
16171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
16172$as_echo_n "checking for wint_t... " >&6; }
16173if ${gt_cv_c_wint_t+:} false; then :
16174 $as_echo_n "(cached) " >&6
16175else
16176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16177/* end confdefs.h. */
6ec2e0f5 16178
5e8754f9
SDJ
16179/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16180 <wchar.h>.
16181 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
16182 before <wchar.h>. */
16183#include <stddef.h>
16184#include <stdio.h>
16185#include <time.h>
16186#include <wchar.h>
16187 wint_t foo = (wchar_t)'\0';
16188int
16189main ()
16190{
6ec2e0f5 16191
5e8754f9
SDJ
16192 ;
16193 return 0;
16194}
16195_ACEOF
16196if ac_fn_c_try_compile "$LINENO"; then :
16197 gt_cv_c_wint_t=yes
16198else
16199 gt_cv_c_wint_t=no
16200fi
16201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16202fi
16203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
16204$as_echo "$gt_cv_c_wint_t" >&6; }
16205 if test $gt_cv_c_wint_t = yes; then
6ec2e0f5 16206
5e8754f9 16207$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
6ec2e0f5
SDJ
16208
16209 fi
16210
16211
16212 GNULIB_ISWBLANK=0;
16213 GNULIB_WCTYPE=0;
16214 GNULIB_ISWCTYPE=0;
16215 GNULIB_WCTRANS=0;
16216 GNULIB_TOWCTRANS=0;
16217 HAVE_ISWBLANK=1;
16218 HAVE_WCTYPE_T=1;
16219 HAVE_WCTRANS_T=1;
16220 REPLACE_ISWBLANK=0;
16221
16222
16223
16224
472fa5ee
SM
16225
16226
16227
725e2999
JB
16228 if false; then
16229 GL_COND_LIBTOOL_TRUE=
16230 GL_COND_LIBTOOL_FALSE='#'
16231else
16232 GL_COND_LIBTOOL_TRUE='#'
16233 GL_COND_LIBTOOL_FALSE=
16234fi
16235
16236 gl_cond_libtool=false
16237 gl_libdeps=
16238 gl_ltlibdeps=
16239 gl_m4_base='import/m4'
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249 gl_source_base='import'
16250
16251
16252 if test $ac_cv_func_alloca_works = no; then
16253 :
16254 fi
16255
16256 # Define an additional variable used in the Makefile substitution.
16257 if test $ac_cv_working_alloca_h = yes; then
16258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
16259$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
16260if ${gl_cv_rpl_alloca+:} false; then :
16261 $as_echo_n "(cached) " >&6
16262else
16263
16264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16265/* end confdefs.h. */
16266
16267#if defined __GNUC__ || defined _AIX || defined _MSC_VER
16268 Need own alloca
16269#endif
16270
16271_ACEOF
16272if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16273 $EGREP "Need own alloca" >/dev/null 2>&1; then :
16274 gl_cv_rpl_alloca=yes
16275else
16276 gl_cv_rpl_alloca=no
16277fi
16278rm -f conftest*
16279
16280
16281fi
16282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
16283$as_echo "$gl_cv_rpl_alloca" >&6; }
16284 if test $gl_cv_rpl_alloca = yes; then
16285
16286$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16287
16288 ALLOCA_H=alloca.h
16289 else
16290 ALLOCA_H=
16291 fi
16292 else
16293 ALLOCA_H=alloca.h
16294 fi
16295
16296 if test -n "$ALLOCA_H"; then
16297 GL_GENERATE_ALLOCA_H_TRUE=
16298 GL_GENERATE_ALLOCA_H_FALSE='#'
16299else
16300 GL_GENERATE_ALLOCA_H_TRUE='#'
16301 GL_GENERATE_ALLOCA_H_FALSE=
16302fi
16303
16304
16305
16306
16307
16308
16309 :
16310
16311
16312
16313
16314
16315 if test $ac_cv_header_arpa_inet_h = yes; then
16316 HAVE_ARPA_INET_H=1
16317 else
16318 HAVE_ARPA_INET_H=0
16319 fi
16320
16321
16322
16323
16324
16325
16326
16327 :
16328
16329
16330
16331
16332
16333
16334
16335
16336 if test $gl_cv_have_include_next = yes; then
16337 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
16338 else
16339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
16340$as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
16341if ${gl_cv_next_arpa_inet_h+:} false; then :
16342 $as_echo_n "(cached) " >&6
16343else
16344
16345 if test $ac_cv_header_arpa_inet_h = yes; then
16346
16347
16348
16349
16350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16351/* end confdefs.h. */
16352#include <arpa/inet.h>
16353_ACEOF
16354 case "$host_os" in
16355 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16356 *) gl_absname_cpp="$ac_cpp" ;;
16357 esac
16358
16359 case "$host_os" in
16360 mingw*)
16361 gl_dirsep_regex='[/\\]'
16362 ;;
16363 *)
16364 gl_dirsep_regex='\/'
16365 ;;
16366 esac
16367 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16368 gl_header_literal_regex=`echo 'arpa/inet.h' \
16369 | sed -e "$gl_make_literal_regex_sed"`
16370 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16371 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16372 s|^/[^/]|//&|
16373 p
16374 q
16375 }'
6ec2e0f5 16376
725e2999
JB
16377 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16378 sed -n "$gl_absolute_header_sed"`
6ec2e0f5 16379
725e2999
JB
16380 gl_header=$gl_cv_absolute_arpa_inet_h
16381 gl_cv_next_arpa_inet_h='"'$gl_header'"'
16382 else
16383 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
16384 fi
6ec2e0f5
SDJ
16385
16386
725e2999
JB
16387fi
16388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
16389$as_echo "$gl_cv_next_arpa_inet_h" >&6; }
16390 fi
16391 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
6ec2e0f5 16392
725e2999
JB
16393 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16394 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16395 gl_next_as_first_directive='<'arpa/inet.h'>'
16396 else
16397 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16398 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
16399 fi
16400 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
6ec2e0f5
SDJ
16401
16402
16403
16404
16405
6ec2e0f5
SDJ
16406
16407
6ec2e0f5 16408
725e2999
JB
16409 for gl_func in inet_ntop inet_pton; do
16410 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
16411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
16412$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
16413if eval \${$as_gl_Symbol+:} false; then :
6ec2e0f5
SDJ
16414 $as_echo_n "(cached) " >&6
16415else
725e2999 16416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ec2e0f5
SDJ
16417/* end confdefs.h. */
16418
725e2999
JB
16419/* On some systems, this header is not self-consistent. */
16420#if !(defined __GLIBC__ || defined __UCLIBC__)
16421# include <sys/socket.h>
6ec2e0f5 16422#endif
725e2999
JB
16423#ifdef __TANDEM
16424# include <netdb.h>
16425#endif
16426#include <arpa/inet.h>
6ec2e0f5 16427
725e2999
JB
16428int
16429main ()
16430{
16431#undef $gl_func
16432 (void) $gl_func;
16433 ;
16434 return 0;
16435}
6ec2e0f5 16436_ACEOF
725e2999
JB
16437if ac_fn_c_try_compile "$LINENO"; then :
16438 eval "$as_gl_Symbol=yes"
6ec2e0f5 16439else
725e2999 16440 eval "$as_gl_Symbol=no"
6ec2e0f5 16441fi
725e2999 16442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 16443fi
725e2999
JB
16444eval ac_res=\$$as_gl_Symbol
16445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16446$as_echo "$ac_res" >&6; }
16447 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
16448 cat >>confdefs.h <<_ACEOF
16449#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
16450_ACEOF
6ec2e0f5 16451
725e2999 16452 eval ac_cv_have_decl_$gl_func=yes
6ec2e0f5 16453fi
725e2999
JB
16454 done
16455
6ec2e0f5
SDJ
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
16467
16468
16469
16470
16471 if test $ac_cv_func_canonicalize_file_name = no; then
16472 HAVE_CANONICALIZE_FILE_NAME=0
16473 if test $ac_cv_func_realpath = no; then
16474 HAVE_REALPATH=0
16475 else
16476 case "$gl_cv_func_realpath_works" in
5e8754f9
SDJ
16477 *yes) ;;
16478 *) REPLACE_REALPATH=1 ;;
6ec2e0f5
SDJ
16479 esac
16480 fi
16481 else
16482 case "$gl_cv_func_realpath_works" in
16483 *yes)
16484 ;;
16485 *)
16486 REPLACE_CANONICALIZE_FILE_NAME=1
16487 REPLACE_REALPATH=1
16488 ;;
16489 esac
16490 fi
16491
16492 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
16493
16494
16495
16496
16497
16498
16499
16500
16501 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
16502
16503 fi
16504
16505
16506cat >>confdefs.h <<_ACEOF
16507#define GNULIB_CANONICALIZE_LGPL 1
16508_ACEOF
16509
16510
16511
16512
16513
16514
16515
16516 GNULIB_CANONICALIZE_FILE_NAME=1
16517
16518
16519
16520
16521
16522$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
16523
16524
16525
16526
16527
16528
16529
16530
16531 GNULIB_REALPATH=1
16532
16533
16534
16535
16536
16537$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
16538
16539
16540
16541
16542
16543
16544
16545
16546 GNULIB_CHDIR=1
16547
16548
16549
16550
16551
16552$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
16553
16554
16555
16556
16557
16558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
16559$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
d0ac1c44 16560if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
6ec2e0f5
SDJ
16561 $as_echo_n "(cached) " >&6
16562else
16563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16564/* end confdefs.h. */
16565
16566/* Arrange to define PATH_MAX, like "pathmax.h" does. */
16567#if HAVE_UNISTD_H
16568# include <unistd.h>
16569#endif
16570#include <limits.h>
16571#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16572# include <sys/param.h>
16573#endif
16574#if !defined PATH_MAX && defined MAXPATHLEN
16575# define PATH_MAX MAXPATHLEN
16576#endif
16577#ifdef __hpux
16578# undef PATH_MAX
16579# define PATH_MAX 1024
16580#endif
5e8754f9 16581#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
16582# undef PATH_MAX
16583# define PATH_MAX 260
16584#endif
16585
16586#ifdef PATH_MAX
16587have_arbitrary_file_name_length_limit
16588#endif
16589_ACEOF
16590if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16591 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
16592 gl_cv_have_arbitrary_file_name_length_limit=yes
16593else
16594 gl_cv_have_arbitrary_file_name_length_limit=no
16595fi
16596rm -f conftest*
16597
16598fi
16599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
16600$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
16601
16602 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
16603
16604
16605
16606
16607
16608
16609
16610
16611 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
16612
16613 :
16614 fi
16615
16616
16617$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
16618
16619
16620
16621
16622
5e8754f9
SDJ
16623 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16624 REPLACE_CLOSE=1
16625 fi
6ec2e0f5
SDJ
16626
16627
16628
16629
16630
472fa5ee
SM
16631 :
16632
16633
16634
16635
16636
6ec2e0f5
SDJ
16637 if test $ac_cv_header_sys_socket_h != yes; then
16638 for ac_header in winsock2.h
16639do :
16640 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 16641if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
16642 cat >>confdefs.h <<_ACEOF
16643#define HAVE_WINSOCK2_H 1
16644_ACEOF
16645
16646fi
16647
16648done
16649
16650 fi
16651 if test "$ac_cv_header_winsock2_h" = yes; then
16652 HAVE_WINSOCK2_H=1
16653 UNISTD_H_HAVE_WINSOCK2_H=1
16654 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
16655 else
16656 HAVE_WINSOCK2_H=0
16657 fi
16658
16659
16660 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
16661 REPLACE_CLOSE=1
16662 fi
16663
16664
16665 if test $REPLACE_CLOSE = 0; then
16666
16667
16668
472fa5ee
SM
16669 :
16670
16671
16672
16673
16674
6ec2e0f5
SDJ
16675 if test $ac_cv_func_fchdir = no; then
16676 HAVE_FCHDIR=0
16677 fi
16678
16679 if test $HAVE_FCHDIR = 0; then
16680 REPLACE_CLOSE=1
16681 fi
16682 fi
16683
16684
16685 if test $REPLACE_CLOSE = 1; then
16686
16687
16688
16689
16690
16691
16692
16693
16694 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
16695
16696 fi
16697
16698
16699
16700
16701
16702 GNULIB_CLOSE=1
16703
16704
16705
16706
16707
16708$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
16709
16710
16711
16712
16713
16714
16715 for ac_func in closedir
16716do :
16717 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
d0ac1c44 16718if test "x$ac_cv_func_closedir" = xyes; then :
6ec2e0f5
SDJ
16719 cat >>confdefs.h <<_ACEOF
16720#define HAVE_CLOSEDIR 1
16721_ACEOF
16722
16723fi
16724done
16725
16726 if test $ac_cv_func_closedir = no; then
16727 HAVE_CLOSEDIR=0
16728 fi
16729
16730
16731
16732
472fa5ee
SM
16733 :
16734
16735
16736
16737
16738
6ec2e0f5
SDJ
16739 if test $ac_cv_func_fchdir = no; then
16740 HAVE_FCHDIR=0
16741 fi
16742
16743 if test $HAVE_FCHDIR = 0; then
16744 if test $HAVE_CLOSEDIR = 1; then
16745 REPLACE_CLOSEDIR=1
16746 fi
16747 fi
16748
16749 case $host_os,$HAVE_CLOSEDIR in
16750 os2*,1)
16751 REPLACE_CLOSEDIR=1;;
16752 esac
16753
16754 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
16755
16756
16757
16758
16759
16760
16761
16762
16763 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
16764
16765 fi
16766
16767
16768
16769
16770
16771 GNULIB_CLOSEDIR=1
16772
16773
16774
16775
16776
16777$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
16778
16779
16780
5e8754f9
SDJ
16781
16782 if test "x$datarootdir" = x; then
16783 datarootdir='${datadir}'
16784
16785 fi
16786 if test "x$docdir" = x; then
16787 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
16788
16789 fi
16790 if test "x$htmldir" = x; then
16791 htmldir='${docdir}'
16792
16793 fi
16794 if test "x$dvidir" = x; then
16795 dvidir='${docdir}'
16796
16797 fi
16798 if test "x$pdfdir" = x; then
16799 pdfdir='${docdir}'
16800
16801 fi
16802 if test "x$psdir" = x; then
16803 psdir='${docdir}'
16804
16805 fi
16806 if test "x$lispdir" = x; then
16807 lispdir='${datarootdir}/emacs/site-lisp'
16808
16809 fi
16810 if test "x$localedir" = x; then
16811 localedir='${datarootdir}/locale'
16812
16813 fi
16814 if test "x$runstatedir" = x; then
16815 runstatedir='${localstatedir}/run'
16816
16817 fi
16818
16819 pkglibexecdir='${libexecdir}/${PACKAGE}'
16820
16821
6ec2e0f5
SDJ
16822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
16823$as_echo_n "checking for d_ino member in directory struct... " >&6; }
d0ac1c44 16824if ${gl_cv_struct_dirent_d_ino+:} false; then :
6ec2e0f5
SDJ
16825 $as_echo_n "(cached) " >&6
16826else
16827 if test "$cross_compiling" = yes; then :
16828 case "$host_os" in
16829 # Guess yes on glibc systems with Linux kernel.
16830 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
16831 # If we don't know, assume the worst.
16832 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
16833 esac
16834
16835else
16836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16837/* end confdefs.h. */
16838#include <sys/types.h>
16839 #include <sys/stat.h>
16840 #include <dirent.h>
16841
16842int
16843main ()
16844{
16845DIR *dp = opendir (".");
16846 struct dirent *e;
16847 struct stat st;
16848 if (! dp)
16849 return 1;
16850 e = readdir (dp);
16851 if (! e)
5e8754f9 16852 return 2;
6ec2e0f5 16853 if (lstat (e->d_name, &st) != 0)
5e8754f9 16854 return 3;
6ec2e0f5 16855 if (e->d_ino != st.st_ino)
5e8754f9 16856 return 4;
6ec2e0f5
SDJ
16857 closedir (dp);
16858 return 0;
16859
16860 ;
16861 return 0;
16862}
16863_ACEOF
16864if ac_fn_c_try_run "$LINENO"; then :
16865 gl_cv_struct_dirent_d_ino=yes
16866else
16867 gl_cv_struct_dirent_d_ino=no
16868fi
16869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16870 conftest.$ac_objext conftest.beam conftest.$ac_ext
16871fi
16872
16873fi
16874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
16875$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
16876 case "$gl_cv_struct_dirent_d_ino" in
16877 *yes)
16878
16879$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
16880
16881 ;;
16882 esac
16883
16884
16885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
16886$as_echo_n "checking for d_type member in directory struct... " >&6; }
d0ac1c44 16887if ${gl_cv_struct_dirent_d_type+:} false; then :
6ec2e0f5
SDJ
16888 $as_echo_n "(cached) " >&6
16889else
16890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16891/* end confdefs.h. */
16892
16893#include <sys/types.h>
16894#include <dirent.h>
16895
16896int
16897main ()
16898{
16899struct dirent dp; dp.d_type = 0;
16900 ;
16901 return 0;
16902}
16903_ACEOF
16904if ac_fn_c_try_link "$LINENO"; then :
16905 gl_cv_struct_dirent_d_type=yes
16906else
16907 gl_cv_struct_dirent_d_type=no
16908fi
16909rm -f core conftest.err conftest.$ac_objext \
16910 conftest$ac_exeext conftest.$ac_ext
16911
16912
16913fi
16914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
16915$as_echo "$gl_cv_struct_dirent_d_type" >&6; }
16916 if test $gl_cv_struct_dirent_d_type = yes; then
16917
16918$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
16919
16920 fi
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
472fa5ee
SM
16932 :
16933
16934
16935
16936
16937
6ec2e0f5
SDJ
16938
16939
16940
16941 if test $gl_cv_have_include_next = yes; then
16942 gl_cv_next_dirent_h='<'dirent.h'>'
16943 else
16944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
16945$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
d0ac1c44 16946if ${gl_cv_next_dirent_h+:} false; then :
6ec2e0f5
SDJ
16947 $as_echo_n "(cached) " >&6
16948else
16949
16950 if test $ac_cv_header_dirent_h = yes; then
16951
16952
16953
16954
16955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16956/* end confdefs.h. */
16957#include <dirent.h>
16958_ACEOF
16959 case "$host_os" in
16960 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16961 *) gl_absname_cpp="$ac_cpp" ;;
16962 esac
16963
16964 case "$host_os" in
16965 mingw*)
16966 gl_dirsep_regex='[/\\]'
16967 ;;
16968 *)
16969 gl_dirsep_regex='\/'
16970 ;;
16971 esac
16972 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16973 gl_header_literal_regex=`echo 'dirent.h' \
16974 | sed -e "$gl_make_literal_regex_sed"`
16975 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16976 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16977 s|^/[^/]|//&|
16978 p
16979 q
16980 }'
16981
16982 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16983 sed -n "$gl_absolute_header_sed"`
16984
16985 gl_header=$gl_cv_absolute_dirent_h
16986 gl_cv_next_dirent_h='"'$gl_header'"'
16987 else
16988 gl_cv_next_dirent_h='<'dirent.h'>'
16989 fi
16990
16991
16992fi
16993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
16994$as_echo "$gl_cv_next_dirent_h" >&6; }
16995 fi
16996 NEXT_DIRENT_H=$gl_cv_next_dirent_h
16997
16998 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16999 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17000 gl_next_as_first_directive='<'dirent.h'>'
17001 else
17002 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17003 gl_next_as_first_directive=$gl_cv_next_dirent_h
17004 fi
17005 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
17006
17007
17008
17009
17010 if test $ac_cv_header_dirent_h = yes; then
17011 HAVE_DIRENT_H=1
17012 else
17013 HAVE_DIRENT_H=0
17014 fi
17015
17016
17017
5e8754f9
SDJ
17018 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
17019 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17021$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17022if eval \${$as_gl_Symbol+:} false; then :
17023 $as_echo_n "(cached) " >&6
17024else
17025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17026/* end confdefs.h. */
17027#include <dirent.h>
17028
17029int
17030main ()
17031{
17032#undef $gl_func
17033 (void) $gl_func;
17034 ;
17035 return 0;
17036}
17037_ACEOF
17038if ac_fn_c_try_compile "$LINENO"; then :
17039 eval "$as_gl_Symbol=yes"
17040else
17041 eval "$as_gl_Symbol=no"
17042fi
17043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17044fi
17045eval ac_res=\$$as_gl_Symbol
17046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17047$as_echo "$ac_res" >&6; }
17048 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17049 cat >>confdefs.h <<_ACEOF
17050#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17051_ACEOF
6ec2e0f5 17052
5e8754f9
SDJ
17053 eval ac_cv_have_decl_$gl_func=yes
17054fi
17055 done
6ec2e0f5
SDJ
17056
17057
17058
17059
17060
17061
17062
17063 for ac_func in dirfd
17064do :
17065 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
d0ac1c44 17066if test "x$ac_cv_func_dirfd" = xyes; then :
6ec2e0f5
SDJ
17067 cat >>confdefs.h <<_ACEOF
17068#define HAVE_DIRFD 1
17069_ACEOF
17070
17071fi
17072done
17073
17074 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
17075 #include <dirent.h>
17076"
d0ac1c44 17077if test "x$ac_cv_have_decl_dirfd" = xyes; then :
6ec2e0f5
SDJ
17078 ac_have_decl=1
17079else
17080 ac_have_decl=0
17081fi
17082
17083cat >>confdefs.h <<_ACEOF
17084#define HAVE_DECL_DIRFD $ac_have_decl
17085_ACEOF
17086
17087 if test $ac_cv_have_decl_dirfd = no; then
17088 HAVE_DECL_DIRFD=0
17089 fi
17090
17091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
17092$as_echo_n "checking whether dirfd is a macro... " >&6; }
d0ac1c44 17093if ${gl_cv_func_dirfd_macro+:} false; then :
6ec2e0f5
SDJ
17094 $as_echo_n "(cached) " >&6
17095else
17096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17097/* end confdefs.h. */
17098
17099#include <sys/types.h>
17100#include <dirent.h>
17101#ifdef dirfd
17102 dirent_header_defines_dirfd
17103#endif
17104_ACEOF
17105if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17106 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
17107 gl_cv_func_dirfd_macro=yes
17108else
17109 gl_cv_func_dirfd_macro=no
17110fi
17111rm -f conftest*
17112
17113fi
17114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
17115$as_echo "$gl_cv_func_dirfd_macro" >&6; }
17116
17117 # Use the replacement if we have no function or macro with that name,
17118 # or if OS/2 kLIBC whose dirfd() does not work.
17119 # Replace only if the system declares dirfd already.
17120 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
17121 no,no,*,yes | *,*,os2*,yes)
17122 REPLACE_DIRFD=1
17123
17124$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
17125;;
17126 esac
17127
17128 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
17129 || test $REPLACE_DIRFD = 1; then
17130
17131
17132
17133
17134
17135
17136
17137
17138 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
17139
17140
17141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
17142$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
d0ac1c44 17143if ${gl_cv_sys_dir_fd_member_name+:} false; then :
6ec2e0f5
SDJ
17144 $as_echo_n "(cached) " >&6
17145else
17146
17147 dirfd_save_CFLAGS=$CFLAGS
17148 for ac_expr in d_fd dd_fd; do
17149
17150 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
17151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17152/* end confdefs.h. */
17153
17154 #include <sys/types.h>
17155 #include <dirent.h>
17156int
17157main ()
17158{
17159DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
17160 ;
17161 return 0;
17162}
17163_ACEOF
17164if ac_fn_c_try_compile "$LINENO"; then :
17165 dir_fd_found=yes
17166
17167fi
17168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17169 CFLAGS=$dirfd_save_CFLAGS
17170 test "$dir_fd_found" = yes && break
17171 done
17172 test "$dir_fd_found" = yes || ac_expr=no_such_member
17173
17174 gl_cv_sys_dir_fd_member_name=$ac_expr
17175
17176
17177fi
17178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
17179$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
17180 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
17181
17182cat >>confdefs.h <<_ACEOF
17183#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
17184_ACEOF
17185
17186 fi
17187
17188
17189 fi
17190
17191
17192
17193
17194
17195 GNULIB_DIRFD=1
17196
17197
17198
17199
17200
17201$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
17212$as_echo_n "checking whether // is distinct from /... " >&6; }
d0ac1c44 17213if ${gl_cv_double_slash_root+:} false; then :
6ec2e0f5
SDJ
17214 $as_echo_n "(cached) " >&6
17215else
17216 if test x"$cross_compiling" = xyes ; then
17217 # When cross-compiling, there is no way to tell whether // is special
17218 # short of a list of hosts. However, the only known hosts to date
17219 # that have a distinct // are Apollo DomainOS (too old to port to),
17220 # Cygwin, and z/OS. If anyone knows of another system for which // has
17221 # special semantics and is distinct from /, please report it to
17222 # <bug-gnulib@gnu.org>.
17223 case $host in
17224 *-cygwin | i370-ibm-openedition)
17225 gl_cv_double_slash_root=yes ;;
17226 *)
17227 # Be optimistic and assume that / and // are the same when we
17228 # don't know.
17229 gl_cv_double_slash_root='unknown, assuming no' ;;
17230 esac
17231 else
17232 set x `ls -di / // 2>/dev/null`
17233 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
17234 gl_cv_double_slash_root=no
17235 else
17236 gl_cv_double_slash_root=yes
17237 fi
17238 fi
17239fi
17240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
17241$as_echo "$gl_cv_double_slash_root" >&6; }
17242 if test "$gl_cv_double_slash_root" = yes; then
8690e634 17243
6ec2e0f5 17244$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8690e634 17245
6ec2e0f5 17246 fi
8690e634
JK
17247
17248
17249
17250
5e8754f9
SDJ
17251 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17252 REPLACE_DUP=1
17253 fi
8690e634 17254
8690e634
JK
17255
17256
17257
472fa5ee
SM
17258 :
17259
17260
17261
17262
17263
6ec2e0f5
SDJ
17264 if test $ac_cv_func_fchdir = no; then
17265 HAVE_FCHDIR=0
17266 fi
8690e634 17267
6ec2e0f5
SDJ
17268 if test $HAVE_FCHDIR = 0; then
17269 REPLACE_DUP=1
17270 fi
8690e634 17271
6ec2e0f5
SDJ
17272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
17273$as_echo_n "checking whether dup works... " >&6; }
d0ac1c44 17274if ${gl_cv_func_dup_works+:} false; then :
6ec2e0f5 17275 $as_echo_n "(cached) " >&6
8690e634 17276else
6ec2e0f5 17277 if test "$cross_compiling" = yes; then :
5e8754f9 17278 gl_cv_func_dup_works='guessing yes'
6ec2e0f5
SDJ
17279else
17280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 17281/* end confdefs.h. */
6ec2e0f5
SDJ
17282#include <unistd.h>
17283 #include <fcntl.h>
17284 #include <errno.h>
17285int
17286main ()
17287{
17288/* On OS/2 kLIBC, dup does not work on a directory fd. */
17289 int fd = open (".", O_RDONLY);
17290 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
8690e634 17291
6ec2e0f5
SDJ
17292 ;
17293 return 0;
17294}
8690e634
JK
17295
17296_ACEOF
6ec2e0f5
SDJ
17297if ac_fn_c_try_run "$LINENO"; then :
17298 gl_cv_func_dup_works=yes
17299else
17300 gl_cv_func_dup_works=no
17301fi
17302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17303 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 17304fi
8690e634 17305
8690e634 17306
6ec2e0f5
SDJ
17307fi
17308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
17309$as_echo "$gl_cv_func_dup_works" >&6; }
17310 case "$gl_cv_func_dup_works" in
17311 *yes) ;;
17312 *)
17313 REPLACE_DUP=1
17314 ;;
17315 esac
8690e634 17316
6ec2e0f5 17317 if test $REPLACE_DUP = 1; then
8690e634 17318
8690e634 17319
8690e634 17320
8690e634 17321
8690e634 17322
6ec2e0f5
SDJ
17323
17324
17325
17326 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
17327
17328 :
8690e634
JK
17329 fi
17330
17331
8690e634
JK
17332
17333
17334
6ec2e0f5 17335 GNULIB_DUP=1
8690e634 17336
6ec2e0f5
SDJ
17337
17338
17339
17340
17341$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
17342
17343
17344
17345
17346
17347
17348
17349
17350$as_echo "#define HAVE_DUP2 1" >>confdefs.h
17351
17352
17353 if test $HAVE_DUP2 = 1; then
17354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
17355$as_echo_n "checking whether dup2 works... " >&6; }
d0ac1c44 17356if ${gl_cv_func_dup2_works+:} false; then :
8690e634
JK
17357 $as_echo_n "(cached) " >&6
17358else
17359 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
17360 case "$host_os" in
17361 mingw*) # on this platform, dup2 always returns 0 for success
17362 gl_cv_func_dup2_works="guessing no" ;;
17363 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
17364 gl_cv_func_dup2_works="guessing no" ;;
17365 aix* | freebsd*)
17366 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
17367 # not EBADF.
17368 gl_cv_func_dup2_works="guessing no" ;;
17369 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
17370 gl_cv_func_dup2_works="guessing no" ;;
17371 *-android*) # implemented using dup3(), which fails if oldfd == newfd
17372 gl_cv_func_dup2_works="guessing no" ;;
17373 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
17374 gl_cv_func_dup2_works="guessing no" ;;
17375 *) gl_cv_func_dup2_works="guessing yes" ;;
17376 esac
8690e634
JK
17377else
17378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17379/* end confdefs.h. */
17380
6ec2e0f5
SDJ
17381 #include <errno.h>
17382 #include <fcntl.h>
17383 #include <limits.h>
17384 #include <sys/resource.h>
17385 #include <unistd.h>
17386 #ifndef RLIM_SAVED_CUR
17387 # define RLIM_SAVED_CUR RLIM_INFINITY
17388 #endif
17389 #ifndef RLIM_SAVED_MAX
17390 # define RLIM_SAVED_MAX RLIM_INFINITY
17391 #endif
8690e634
JK
17392
17393int
17394main ()
17395{
6ec2e0f5
SDJ
17396int result = 0;
17397 int bad_fd = INT_MAX;
17398 struct rlimit rlim;
17399 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
17400 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
17401 && rlim.rlim_cur != RLIM_INFINITY
17402 && rlim.rlim_cur != RLIM_SAVED_MAX
17403 && rlim.rlim_cur != RLIM_SAVED_CUR)
17404 bad_fd = rlim.rlim_cur;
17405 #ifdef FD_CLOEXEC
17406 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
17407 result |= 1;
17408 #endif
17409 if (dup2 (1, 1) != 1)
17410 result |= 2;
17411 #ifdef FD_CLOEXEC
17412 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
17413 result |= 4;
17414 #endif
17415 close (0);
17416 if (dup2 (0, 0) != -1)
17417 result |= 8;
17418 /* Many gnulib modules require POSIX conformance of EBADF. */
17419 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
17420 result |= 16;
17421 /* Flush out some cygwin core dumps. */
17422 if (dup2 (2, -1) != -1 || errno != EBADF)
17423 result |= 32;
17424 dup2 (2, 255);
17425 dup2 (2, 256);
17426 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
17427 {
17428 int fd = open (".", O_RDONLY);
17429 if (fd == -1)
17430 result |= 64;
17431 else if (dup2 (fd, fd + 1) == -1)
17432 result |= 128;
17433
17434 close (fd);
17435 }
17436 return result;
8690e634
JK
17437 ;
17438 return 0;
17439}
6ec2e0f5 17440
8690e634
JK
17441_ACEOF
17442if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17443 gl_cv_func_dup2_works=yes
8690e634 17444else
6ec2e0f5 17445 gl_cv_func_dup2_works=no
8690e634
JK
17446fi
17447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17448 conftest.$ac_objext conftest.beam conftest.$ac_ext
17449fi
17450
6ec2e0f5
SDJ
17451
17452fi
17453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
17454$as_echo "$gl_cv_func_dup2_works" >&6; }
17455 case "$gl_cv_func_dup2_works" in
17456 *yes) ;;
17457 *)
17458 REPLACE_DUP2=1
17459 for ac_func in setdtablesize
17460do :
17461 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
d0ac1c44 17462if test "x$ac_cv_func_setdtablesize" = xyes; then :
6ec2e0f5
SDJ
17463 cat >>confdefs.h <<_ACEOF
17464#define HAVE_SETDTABLESIZE 1
17465_ACEOF
17466
17467fi
17468done
17469
17470 ;;
17471 esac
17472 fi
17473
17474
17475
17476
472fa5ee
SM
17477 :
17478
17479
17480
17481
17482
6ec2e0f5
SDJ
17483 if test $ac_cv_func_fchdir = no; then
17484 HAVE_FCHDIR=0
8690e634
JK
17485 fi
17486
6ec2e0f5
SDJ
17487 if test $HAVE_FCHDIR = 0; then
17488 if test $HAVE_DUP2 = 1; then
17489 REPLACE_DUP2=1
17490 fi
17491 fi
8690e634 17492
8690e634 17493
6ec2e0f5 17494 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
8690e634
JK
17495
17496
17497
17498
8690e634 17499
8690e634 17500
6ec2e0f5
SDJ
17501
17502
17503 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
17504
17505
8690e634
JK
17506 fi
17507
8690e634 17508
8690e634 17509
8690e634
JK
17510
17511
6ec2e0f5
SDJ
17512 GNULIB_DUP2=1
17513
17514
17515
17516
17517
17518$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528 GNULIB_ENVIRON=1
17529
17530
17531
17532
17533
17534$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
17535
17536
17537
17538
17539
17540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
17541$as_echo_n "checking for error_at_line... " >&6; }
d0ac1c44 17542if ${ac_cv_lib_error_at_line+:} false; then :
6ec2e0f5 17543 $as_echo_n "(cached) " >&6
8690e634
JK
17544else
17545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17546/* end confdefs.h. */
6ec2e0f5 17547#include <error.h>
8690e634
JK
17548int
17549main ()
17550{
6ec2e0f5 17551error_at_line (0, 0, "", 0, "an error occurred");
8690e634
JK
17552 ;
17553 return 0;
17554}
17555_ACEOF
6ec2e0f5
SDJ
17556if ac_fn_c_try_link "$LINENO"; then :
17557 ac_cv_lib_error_at_line=yes
8690e634 17558else
6ec2e0f5 17559 ac_cv_lib_error_at_line=no
8690e634 17560fi
6ec2e0f5
SDJ
17561rm -f core conftest.err conftest.$ac_objext \
17562 conftest$ac_exeext conftest.$ac_ext
8690e634 17563fi
6ec2e0f5
SDJ
17564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
17565$as_echo "$ac_cv_lib_error_at_line" >&6; }
17566
17567 if test $ac_cv_lib_error_at_line = no; then
17568
17569
17570
17571
17572
17573
17574
17575
17576 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
17577
8690e634
JK
17578
17579
8690e634
JK
17580 :
17581
6ec2e0f5 17582 fi
6a29c58e 17583
6a29c58e 17584
73cc7272
TT
17585 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
17586
17587
17588
17589 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
17590
17591
d0ac1c44
SM
17592
17593
17594
d0ac1c44
SM
17595
17596
472fa5ee 17597 :
6a29c58e
YQ
17598
17599
3d99e817 17600
6ec2e0f5
SDJ
17601
17602
17603 if test $ac_cv_have_decl_fchdir = no; then
17604 HAVE_DECL_FCHDIR=0
17605 fi
17606
17607
17608 if test $HAVE_FCHDIR = 0; then
17609
17610
3d99e817
AK
17611
17612
17613
17614
17615
17616
6ec2e0f5 17617 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
3d99e817 17618
6ec2e0f5 17619 :
3d99e817 17620
6ec2e0f5 17621$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
3d99e817 17622
6ec2e0f5
SDJ
17623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
17624$as_echo_n "checking whether open can visit directories... " >&6; }
d0ac1c44 17625if ${gl_cv_func_open_directory_works+:} false; then :
6ec2e0f5
SDJ
17626 $as_echo_n "(cached) " >&6
17627else
17628 if test "$cross_compiling" = yes; then :
17629 case "$host_os" in
5e8754f9
SDJ
17630 # Guess yes on glibc systems.
17631 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
17632 # If we don't know, assume the worst.
17633 *) gl_cv_func_open_directory_works="guessing no" ;;
6ec2e0f5 17634 esac
3d99e817 17635
6ec2e0f5
SDJ
17636else
17637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17638/* end confdefs.h. */
17639#include <fcntl.h>
3d99e817 17640
6ec2e0f5
SDJ
17641int
17642main ()
17643{
17644return open(".", O_RDONLY) < 0;
17645 ;
17646 return 0;
17647}
3d99e817 17648_ACEOF
6ec2e0f5
SDJ
17649if ac_fn_c_try_run "$LINENO"; then :
17650 gl_cv_func_open_directory_works=yes
17651else
17652 gl_cv_func_open_directory_works=no
17653fi
17654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17655 conftest.$ac_objext conftest.beam conftest.$ac_ext
17656fi
3d99e817
AK
17657
17658fi
6ec2e0f5
SDJ
17659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
17660$as_echo "$gl_cv_func_open_directory_works" >&6; }
17661 case "$gl_cv_func_open_directory_works" in
17662 *yes) ;;
17663 *)
3d99e817 17664
6ec2e0f5 17665$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
3d99e817 17666
6ec2e0f5
SDJ
17667 ;;
17668 esac
17669 fi
3d99e817 17670
3d99e817
AK
17671
17672
17673
0750520d 17674
0750520d 17675
6ec2e0f5 17676 GNULIB_FCHDIR=1
0750520d 17677
0750520d
PA
17678
17679
0750520d 17680
0750520d 17681
6ec2e0f5 17682$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
0750520d 17683
0750520d 17684
0750520d 17685
0750520d 17686
0750520d 17687
0750520d 17688
0750520d 17689
6ec2e0f5 17690
472fa5ee
SM
17691 :
17692
17693
17694
17695
17696
6ec2e0f5
SDJ
17697 if test $ac_cv_func_fcntl = no; then
17698
17699
17700
472fa5ee
SM
17701 :
17702
17703
17704
17705
17706
6ec2e0f5
SDJ
17707 if test $ac_cv_func_fcntl = no; then
17708 HAVE_FCNTL=0
17709 else
17710 REPLACE_FCNTL=1
17711 fi
17712
17713 else
17714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
17715$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
d0ac1c44 17716if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
0750520d 17717 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
17718else
17719 if test "$cross_compiling" = yes; then :
17720 case $host_os in
17721 aix* | cygwin* | haiku*)
17722 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
17723 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
17724 esac
0750520d
PA
17725else
17726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17727/* end confdefs.h. */
6ec2e0f5
SDJ
17728#include <errno.h>
17729 #include <fcntl.h>
17730 #include <limits.h>
17731 #include <sys/resource.h>
17732 #include <unistd.h>
17733 #ifndef RLIM_SAVED_CUR
17734 # define RLIM_SAVED_CUR RLIM_INFINITY
17735 #endif
17736 #ifndef RLIM_SAVED_MAX
17737 # define RLIM_SAVED_MAX RLIM_INFINITY
17738 #endif
0750520d 17739
6ec2e0f5
SDJ
17740int
17741main ()
17742{
17743int result = 0;
17744 int bad_fd = INT_MAX;
17745 struct rlimit rlim;
17746 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
17747 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
17748 && rlim.rlim_cur != RLIM_INFINITY
17749 && rlim.rlim_cur != RLIM_SAVED_MAX
17750 && rlim.rlim_cur != RLIM_SAVED_CUR)
17751 bad_fd = rlim.rlim_cur;
17752 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
17753 if (errno != EINVAL) result |= 2;
17754 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
17755 if (errno != EINVAL) result |= 8;
17756 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
17757 {
17758 int fd;
17759 fd = open (".", O_RDONLY);
17760 if (fd == -1)
17761 result |= 16;
17762 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
17763 result |= 32;
17764
17765 close (fd);
17766 }
17767 return result;
17768 ;
17769 return 0;
17770}
0750520d 17771_ACEOF
6ec2e0f5
SDJ
17772if ac_fn_c_try_run "$LINENO"; then :
17773 gl_cv_func_fcntl_f_dupfd_works=yes
0750520d 17774else
6ec2e0f5
SDJ
17775 gl_cv_func_fcntl_f_dupfd_works=no
17776fi
17777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17778 conftest.$ac_objext conftest.beam conftest.$ac_ext
0750520d 17779fi
0750520d
PA
17780
17781fi
6ec2e0f5
SDJ
17782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
17783$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
17784 case $gl_cv_func_fcntl_f_dupfd_works in
17785 *yes) ;;
17786 *)
0750520d 17787
0750520d 17788
472fa5ee
SM
17789 :
17790
17791
17792
17793
17794
6ec2e0f5
SDJ
17795 if test $ac_cv_func_fcntl = no; then
17796 HAVE_FCNTL=0
17797 else
17798 REPLACE_FCNTL=1
17799 fi
0750520d 17800
0750520d 17801
6ec2e0f5
SDJ
17802$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
17803 ;;
17804 esac
0750520d 17805
6ec2e0f5
SDJ
17806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
17807$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
d0ac1c44 17808if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
8690e634
JK
17809 $as_echo_n "(cached) " >&6
17810else
17811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17812/* end confdefs.h. */
17813
6ec2e0f5
SDJ
17814#include <fcntl.h>
17815#ifndef F_DUPFD_CLOEXEC
17816choke me
17817#endif
49e4877c 17818
6ec2e0f5
SDJ
17819int
17820main ()
17821{
8690e634 17822
6ec2e0f5
SDJ
17823 ;
17824 return 0;
17825}
17826_ACEOF
17827if ac_fn_c_try_compile "$LINENO"; then :
17828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17829/* end confdefs.h. */
8690e634 17830
6ec2e0f5
SDJ
17831#ifdef __linux__
17832/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
17833 it to support the semantics on older kernels that failed with EINVAL. */
17834choke me
17835#endif
8690e634
JK
17836
17837int
17838main ()
17839{
17840
8690e634
JK
17841 ;
17842 return 0;
17843}
17844_ACEOF
17845if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 17846 gl_cv_func_fcntl_f_dupfd_cloexec=yes
8690e634 17847else
6ec2e0f5 17848 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
8690e634
JK
17849fi
17850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
17851else
17852 gl_cv_func_fcntl_f_dupfd_cloexec=no
8690e634 17853fi
6ec2e0f5
SDJ
17854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17855fi
17856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
17857$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
17858 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
17859
17860
17861
472fa5ee
SM
17862 :
17863
17864
17865
17866
17867
6ec2e0f5
SDJ
17868 if test $ac_cv_func_fcntl = no; then
17869 HAVE_FCNTL=0
17870 else
17871 REPLACE_FCNTL=1
17872 fi
17873
17874 fi
17875 fi
17876
17877
17878
17879
472fa5ee
SM
17880 :
17881
17882
17883
17884
17885
6ec2e0f5
SDJ
17886 if test $ac_cv_func_fchdir = no; then
17887 HAVE_FCHDIR=0
17888 fi
17889
17890 if test $HAVE_FCHDIR = 0; then
17891
17892
17893
472fa5ee
SM
17894 :
17895
17896
17897
17898
17899
6ec2e0f5
SDJ
17900 if test $ac_cv_func_fcntl = no; then
17901 HAVE_FCNTL=0
17902 else
17903 REPLACE_FCNTL=1
17904 fi
17905
17906 fi
17907
17908
17909 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
17910
17911
17912
17913
17914
17915
17916
17917
17918 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
17919
17920 fi
8690e634 17921
8690e634
JK
17922
17923
8690e634
JK
17924
17925
6ec2e0f5 17926 GNULIB_FCNTL=1
8690e634 17927
8690e634
JK
17928
17929
8690e634 17930
8690e634 17931
6ec2e0f5
SDJ
17932$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
17933
8690e634 17934
8690e634 17935
63ce7108
TT
17936
17937
17938
17939
8690e634
JK
17940
17941
17942
17943
17944
17945
17946
17947 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 17948 gl_cv_next_fcntl_h='<'fcntl.h'>'
8690e634 17949 else
6ec2e0f5
SDJ
17950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
17951$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
d0ac1c44 17952if ${gl_cv_next_fcntl_h+:} false; then :
8690e634
JK
17953 $as_echo_n "(cached) " >&6
17954else
17955
4a626d0a
PA
17956
17957
17958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 17959/* end confdefs.h. */
6ec2e0f5 17960#include <fcntl.h>
8690e634 17961_ACEOF
4a626d0a
PA
17962 case "$host_os" in
17963 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17964 *) gl_absname_cpp="$ac_cpp" ;;
17965 esac
17966
17967 case "$host_os" in
17968 mingw*)
17969 gl_dirsep_regex='[/\\]'
17970 ;;
17971 *)
17972 gl_dirsep_regex='\/'
17973 ;;
17974 esac
17975 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 17976 gl_header_literal_regex=`echo 'fcntl.h' \
4a626d0a
PA
17977 | sed -e "$gl_make_literal_regex_sed"`
17978 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17979 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17980 s|^/[^/]|//&|
17981 p
17982 q
17983 }'
8690e634 17984
6ec2e0f5 17985 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 17986 sed -n "$gl_absolute_header_sed"`
c971b7fa 17987
6ec2e0f5
SDJ
17988 gl_header=$gl_cv_absolute_fcntl_h
17989 gl_cv_next_fcntl_h='"'$gl_header'"'
8690e634
JK
17990
17991
17992fi
6ec2e0f5
SDJ
17993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
17994$as_echo "$gl_cv_next_fcntl_h" >&6; }
8690e634 17995 fi
6ec2e0f5 17996 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
8690e634
JK
17997
17998 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17999 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 18000 gl_next_as_first_directive='<'fcntl.h'>'
8690e634
JK
18001 else
18002 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 18003 gl_next_as_first_directive=$gl_cv_next_fcntl_h
8690e634 18004 fi
6ec2e0f5 18005 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
8690e634
JK
18006
18007
18008
18009
18010
18011
6ec2e0f5
SDJ
18012
18013
18014
18015
5e8754f9
SDJ
18016 for gl_func in fcntl openat; do
18017 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18019$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18020if eval \${$as_gl_Symbol+:} false; then :
18021 $as_echo_n "(cached) " >&6
18022else
18023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18024/* end confdefs.h. */
18025#include <fcntl.h>
8690e634 18026
5e8754f9
SDJ
18027int
18028main ()
18029{
18030#undef $gl_func
18031 (void) $gl_func;
18032 ;
18033 return 0;
18034}
18035_ACEOF
18036if ac_fn_c_try_compile "$LINENO"; then :
18037 eval "$as_gl_Symbol=yes"
18038else
18039 eval "$as_gl_Symbol=no"
18040fi
18041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18042fi
18043eval ac_res=\$$as_gl_Symbol
18044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18045$as_echo "$ac_res" >&6; }
18046 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18047 cat >>confdefs.h <<_ACEOF
18048#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
7a6dbc2f 18049_ACEOF
8690e634 18050
5e8754f9
SDJ
18051 eval ac_cv_have_decl_$gl_func=yes
18052fi
18053 done
18054
8690e634
JK
18055
18056
8839a007 18057
63ce7108 18058
63ce7108 18059
63ce7108 18060
6ec2e0f5
SDJ
18061 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
18062#include <dirent.h>
18063
18064"
d0ac1c44 18065if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
6ec2e0f5
SDJ
18066 ac_have_decl=1
18067else
18068 ac_have_decl=0
18069fi
18070
18071cat >>confdefs.h <<_ACEOF
18072#define HAVE_DECL_FDOPENDIR $ac_have_decl
63ce7108 18073_ACEOF
6ec2e0f5
SDJ
18074if test $ac_have_decl = 1; then :
18075
63ce7108 18076else
6ec2e0f5 18077 HAVE_DECL_FDOPENDIR=0
63ce7108 18078fi
63ce7108
TT
18079
18080
472fa5ee
SM
18081 :
18082
18083
18084
18085
18086
6ec2e0f5
SDJ
18087 if test $ac_cv_func_fdopendir = no; then
18088 HAVE_FDOPENDIR=0
18089 else
18090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
18091$as_echo_n "checking whether fdopendir works... " >&6; }
d0ac1c44 18092if ${gl_cv_func_fdopendir_works+:} false; then :
6ec2e0f5
SDJ
18093 $as_echo_n "(cached) " >&6
18094else
18095 if test "$cross_compiling" = yes; then :
18096 case "$host_os" in
18097 # Guess yes on glibc systems.
18098 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
18099 # If we don't know, assume the worst.
18100 *) gl_cv_func_fdopendir_works="guessing no" ;;
18101 esac
18102
63ce7108
TT
18103else
18104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18105/* end confdefs.h. */
18106
6ec2e0f5
SDJ
18107#include <dirent.h>
18108#include <fcntl.h>
18109#include <unistd.h>
18110#if !HAVE_DECL_FDOPENDIR
18111extern
18112# ifdef __cplusplus
18113"C"
18114# endif
18115DIR *fdopendir (int);
18116#endif
63ce7108
TT
18117
18118int
18119main ()
18120{
6ec2e0f5
SDJ
18121int result = 0;
18122 int fd = open ("conftest.c", O_RDONLY);
18123 if (fd < 0) result |= 1;
18124 if (fdopendir (fd)) result |= 2;
18125 if (close (fd)) result |= 4;
18126 return result;
63ce7108
TT
18127 ;
18128 return 0;
18129}
18130_ACEOF
18131if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 18132 gl_cv_func_fdopendir_works=yes
63ce7108 18133else
6ec2e0f5 18134 gl_cv_func_fdopendir_works=no
63ce7108
TT
18135fi
18136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18137 conftest.$ac_objext conftest.beam conftest.$ac_ext
18138fi
18139
63ce7108 18140fi
6ec2e0f5
SDJ
18141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
18142$as_echo "$gl_cv_func_fdopendir_works" >&6; }
18143 case "$gl_cv_func_fdopendir_works" in
63ce7108
TT
18144 *yes) ;;
18145 *)
6ec2e0f5 18146 REPLACE_FDOPENDIR=1
63ce7108
TT
18147 ;;
18148 esac
18149 fi
18150
6ec2e0f5 18151 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
09607c9e
TT
18152
18153
18154
4a626d0a
PA
18155
18156
18157
18158
18159
6ec2e0f5 18160 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
4a626d0a 18161
6ec2e0f5 18162 fi
4a626d0a
PA
18163
18164
18165
4a626d0a 18166
4a626d0a 18167
6ec2e0f5 18168 GNULIB_FDOPENDIR=1
4a626d0a
PA
18169
18170
18171
18172
18173
6ec2e0f5 18174$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
4a626d0a
PA
18175
18176
18177
18178
18179
6ec2e0f5
SDJ
18180cat >>confdefs.h <<_ACEOF
18181#define GNULIB_FDOPENDIR 1
18182_ACEOF
4a626d0a 18183
09607c9e 18184
09607c9e
TT
18185
18186
472fa5ee
SM
18187 :
18188
18189
18190
18191
18192
09607c9e 18193
6ec2e0f5
SDJ
18194
18195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
18196$as_echo_n "checking for flexible array member... " >&6; }
d0ac1c44 18197if ${ac_cv_c_flexmember+:} false; then :
09607c9e
TT
18198 $as_echo_n "(cached) " >&6
18199else
18200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18201/* end confdefs.h. */
6ec2e0f5
SDJ
18202#include <stdlib.h>
18203 #include <stdio.h>
18204 #include <stddef.h>
5e8754f9 18205 struct s { int n; double d[]; };
09607c9e
TT
18206int
18207main ()
18208{
6ec2e0f5
SDJ
18209int m = getchar ();
18210 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
18211 nbytes += sizeof (struct s) - 1;
18212 nbytes -= nbytes % sizeof (struct s);
18213 struct s *p = malloc (nbytes);
18214 p->d[0] = 0.0;
18215 return p->d != (double *) NULL;
09607c9e
TT
18216 ;
18217 return 0;
18218}
18219_ACEOF
18220if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 18221 ac_cv_c_flexmember=yes
09607c9e 18222else
6ec2e0f5 18223 ac_cv_c_flexmember=no
09607c9e
TT
18224fi
18225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18226fi
6ec2e0f5
SDJ
18227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
18228$as_echo "$ac_cv_c_flexmember" >&6; }
18229 if test $ac_cv_c_flexmember = yes; then
18230
18231$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
09607c9e 18232
09607c9e 18233 else
6ec2e0f5 18234 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
09607c9e 18235
6ec2e0f5
SDJ
18236 fi
18237
18238
18239
18240
18241 FLOAT_H=
18242 REPLACE_FLOAT_LDBL=0
18243 case "$host_os" in
18244 aix* | beos* | openbsd* | mirbsd* | irix*)
18245 FLOAT_H=float.h
18246 ;;
5e8754f9 18247 freebsd*)
6ec2e0f5
SDJ
18248 case "$host_cpu" in
18249 i[34567]86 )
18250 FLOAT_H=float.h
18251 ;;
18252 x86_64 )
18253 # On x86_64 systems, the C compiler may still be generating
18254 # 32-bit code.
18255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18256/* end confdefs.h. */
18257#if defined __LP64__ || defined __x86_64__ || defined __amd64__
5e8754f9
SDJ
18258 yes
18259 #endif
09607c9e 18260_ACEOF
5e8754f9
SDJ
18261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18262 $EGREP "yes" >/dev/null 2>&1; then :
6ec2e0f5 18263
09607c9e 18264else
6ec2e0f5 18265 FLOAT_H=float.h
09607c9e 18266fi
5e8754f9
SDJ
18267rm -f conftest*
18268
6ec2e0f5
SDJ
18269 ;;
18270 esac
18271 ;;
18272 linux*)
18273 case "$host_cpu" in
18274 powerpc*)
18275 FLOAT_H=float.h
18276 ;;
18277 esac
18278 ;;
18279 esac
18280 case "$host_os" in
5e8754f9 18281 aix* | freebsd* | linux*)
6ec2e0f5
SDJ
18282 if test -n "$FLOAT_H"; then
18283 REPLACE_FLOAT_LDBL=1
18284 fi
18285 ;;
18286 esac
18287
18288 REPLACE_ITOLD=0
18289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
18290$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
d0ac1c44 18291if ${gl_cv_func_itold_works+:} false; then :
09607c9e
TT
18292 $as_echo_n "(cached) " >&6
18293else
09607c9e 18294
6ec2e0f5
SDJ
18295 if test "$cross_compiling" = yes; then :
18296 case "$host" in
18297 sparc*-*-linux*)
18298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18299/* end confdefs.h. */
18300#if defined __LP64__ || defined __arch64__
5e8754f9
SDJ
18301 yes
18302 #endif
09607c9e 18303_ACEOF
5e8754f9
SDJ
18304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18305 $EGREP "yes" >/dev/null 2>&1; then :
6ec2e0f5 18306 gl_cv_func_itold_works="guessing no"
09607c9e 18307else
6ec2e0f5 18308 gl_cv_func_itold_works="guessing yes"
09607c9e 18309fi
5e8754f9
SDJ
18310rm -f conftest*
18311
6ec2e0f5 18312 ;;
5e8754f9 18313 *) gl_cv_func_itold_works="guessing yes" ;;
6ec2e0f5
SDJ
18314 esac
18315
4a626d0a
PA
18316else
18317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18318/* end confdefs.h. */
4a626d0a 18319
6ec2e0f5
SDJ
18320int i = -1;
18321volatile long double ld;
18322int main ()
4a626d0a 18323{
6ec2e0f5
SDJ
18324 ld += i * 1.0L;
18325 if (ld > 0)
18326 return 1;
4a626d0a
PA
18327 return 0;
18328}
18329_ACEOF
6ec2e0f5
SDJ
18330if ac_fn_c_try_run "$LINENO"; then :
18331 gl_cv_func_itold_works=yes
4a626d0a 18332else
6ec2e0f5
SDJ
18333 gl_cv_func_itold_works=no
18334fi
18335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18336 conftest.$ac_objext conftest.beam conftest.$ac_ext
18337fi
09607c9e
TT
18338
18339
6ec2e0f5
SDJ
18340fi
18341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
18342$as_echo "$gl_cv_func_itold_works" >&6; }
18343 case "$gl_cv_func_itold_works" in
18344 *no)
18345 REPLACE_ITOLD=1
18346 FLOAT_H=float.h
18347 ;;
18348 esac
09607c9e 18349
6ec2e0f5 18350 if test -n "$FLOAT_H"; then
09607c9e
TT
18351
18352
18353
18354
18355
18356
18357
4a626d0a 18358
09607c9e 18359 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 18360 gl_cv_next_float_h='<'float.h'>'
09607c9e 18361 else
6ec2e0f5
SDJ
18362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
18363$as_echo_n "checking absolute name of <float.h>... " >&6; }
d0ac1c44 18364if ${gl_cv_next_float_h+:} false; then :
09607c9e
TT
18365 $as_echo_n "(cached) " >&6
18366else
18367
4a626d0a
PA
18368
18369
18370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e 18371/* end confdefs.h. */
6ec2e0f5 18372#include <float.h>
09607c9e 18373_ACEOF
4a626d0a
PA
18374 case "$host_os" in
18375 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18376 *) gl_absname_cpp="$ac_cpp" ;;
18377 esac
18378
18379 case "$host_os" in
18380 mingw*)
18381 gl_dirsep_regex='[/\\]'
18382 ;;
18383 *)
18384 gl_dirsep_regex='\/'
18385 ;;
18386 esac
18387 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 18388 gl_header_literal_regex=`echo 'float.h' \
4a626d0a
PA
18389 | sed -e "$gl_make_literal_regex_sed"`
18390 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18391 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18392 s|^/[^/]|//&|
18393 p
18394 q
18395 }'
09607c9e 18396
6ec2e0f5 18397 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 18398 sed -n "$gl_absolute_header_sed"`
09607c9e 18399
6ec2e0f5
SDJ
18400 gl_header=$gl_cv_absolute_float_h
18401 gl_cv_next_float_h='"'$gl_header'"'
09607c9e
TT
18402
18403
18404fi
6ec2e0f5
SDJ
18405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
18406$as_echo "$gl_cv_next_float_h" >&6; }
09607c9e 18407 fi
6ec2e0f5 18408 NEXT_FLOAT_H=$gl_cv_next_float_h
09607c9e
TT
18409
18410 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18411 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 18412 gl_next_as_first_directive='<'float.h'>'
09607c9e
TT
18413 else
18414 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 18415 gl_next_as_first_directive=$gl_cv_next_float_h
09607c9e 18416 fi
6ec2e0f5 18417 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
09607c9e
TT
18418
18419
18420
18421
6ec2e0f5 18422 fi
09607c9e 18423
6ec2e0f5
SDJ
18424 if test -n "$FLOAT_H"; then
18425 GL_GENERATE_FLOAT_H_TRUE=
18426 GL_GENERATE_FLOAT_H_FALSE='#'
3d99e817 18427else
6ec2e0f5
SDJ
18428 GL_GENERATE_FLOAT_H_TRUE='#'
18429 GL_GENERATE_FLOAT_H_FALSE=
3d99e817
AK
18430fi
18431
3d99e817 18432
09607c9e 18433
6ec2e0f5 18434 if test $REPLACE_FLOAT_LDBL = 1; then
8690e634 18435
8690e634 18436
8690e634 18437
8690e634 18438
8690e634 18439
6ec2e0f5
SDJ
18440
18441
18442
18443 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
18444
8690e634 18445 fi
6ec2e0f5 18446 if test $REPLACE_ITOLD = 1; then
8690e634
JK
18447
18448
18449
18450
18451
6ec2e0f5
SDJ
18452
18453
18454
18455 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
18456
8690e634
JK
18457 fi
18458
18459
18460
6ec2e0f5 18461
5e8754f9
SDJ
18462
18463 FNMATCH_H=
6ec2e0f5
SDJ
18464 gl_fnmatch_required_lowercase=`
18465 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
18466 `
5e8754f9
SDJ
18467 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
18468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
6ec2e0f5 18469$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
d0ac1c44 18470if eval \${$gl_fnmatch_cache_var+:} false; then :
8690e634 18471 $as_echo_n "(cached) " >&6
6ec2e0f5 18472else
5e8754f9
SDJ
18473 if test $gl_fnmatch_required = GNU; then
18474 gl_fnmatch_gnu_start=
18475 gl_fnmatch_gnu_end=
18476 else
18477 gl_fnmatch_gnu_start='#if 0'
18478 gl_fnmatch_gnu_end='#endif'
18479 fi
18480 if test "$cross_compiling" = yes; then :
6ec2e0f5 18481 eval "$gl_fnmatch_cache_var=\"guessing no\""
8690e634
JK
18482else
18483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18484/* end confdefs.h. */
6ec2e0f5 18485#include <fnmatch.h>
5e8754f9
SDJ
18486 static int
18487 y (char const *pattern, char const *string, int flags)
18488 {
18489 return fnmatch (pattern, string, flags) == 0;
18490 }
18491 static int
18492 n (char const *pattern, char const *string, int flags)
18493 {
18494 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
18495 }
8690e634 18496
8690e634
JK
18497int
18498main ()
18499{
6ec2e0f5 18500char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
5e8754f9
SDJ
18501 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
18502 static char const A_1[] = { 'A' - 1, 0 };
18503 static char const A01[] = { 'A' + 1, 0 };
18504 static char const a_1[] = { 'a' - 1, 0 };
18505 static char const a01[] = { 'a' + 1, 0 };
18506 static char const bs_1[] = { '\\\\' - 1, 0 };
18507 static char const bs01[] = { '\\\\' + 1, 0 };
18508 int result = 0;
18509 if (!n ("a*", "", 0))
18510 return 1;
18511 if (!y ("a*", "abc", 0))
18512 return 1;
18513 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
18514 return 1;
18515 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
18516 return 2;
18517 if (!y ("a\\\\bc", "abc", 0))
18518 return 3;
18519 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
18520 return 3;
18521 if (!y ("*x", ".x", 0))
18522 return 4;
18523 if (!n ("*x", ".x", FNM_PERIOD))
18524 return 4;
18525 if (!y (Apat, "\\\\", 0))
18526 return 5;
18527 if (!y (Apat, "A", 0))
18528 return 5;
18529 if (!y (apat, "\\\\", 0))
18530 return 5;
18531 if (!y (apat, "a", 0))
18532 return 5;
18533 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
18534 return 5;
18535 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
18536 return 5;
18537 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
18538 return 5;
18539 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
18540 return 5;
18541 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
18542 return 5;
18543 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
18544 return 5;
18545 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
18546 return 5;
18547 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
18548 return 5;
18549 $gl_fnmatch_gnu_start
18550 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
18551 result |= 8;
18552 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
18553 result |= 16;
18554 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
18555 result |= 32;
18556 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
18557 result |= 64;
18558 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
18559 result |= 64;
18560 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
18561 result |= 64;
18562 $gl_fnmatch_gnu_end
18563 return result;
8690e634
JK
18564
18565 ;
18566 return 0;
18567}
18568_ACEOF
6ec2e0f5
SDJ
18569if ac_fn_c_try_run "$LINENO"; then :
18570 eval "$gl_fnmatch_cache_var=yes"
8690e634 18571else
6ec2e0f5 18572 eval "$gl_fnmatch_cache_var=no"
8690e634 18573fi
6ec2e0f5
SDJ
18574rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18575 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 18576fi
8690e634 18577
8690e634 18578
6ec2e0f5
SDJ
18579fi
18580eval ac_res=\$$gl_fnmatch_cache_var
18581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18582$as_echo "$ac_res" >&6; }
5e8754f9
SDJ
18583 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
18584 if test "$gl_fnmatch_result" = yes; then
18585 rm -f "$gl_source_base/fnmatch.h"
18586 else
18587 FNMATCH_H=fnmatch.h
8690e634
JK
18588 fi
18589
6ec2e0f5
SDJ
18590 if test -n "$FNMATCH_H"; then
18591 GL_GENERATE_FNMATCH_H_TRUE=
18592 GL_GENERATE_FNMATCH_H_FALSE='#'
18593else
18594 GL_GENERATE_FNMATCH_H_TRUE='#'
18595 GL_GENERATE_FNMATCH_H_FALSE=
18596fi
8690e634 18597
8690e634 18598
5e8754f9 18599 if test -n "$FNMATCH_H"; then
8690e634 18600
6ec2e0f5
SDJ
18601
18602
18603
18604
18605
6ec2e0f5
SDJ
18606
18607
7a6dbc2f 18608 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
6ec2e0f5 18609
6ec2e0f5
SDJ
18610
18611
5e8754f9
SDJ
18612cat >>confdefs.h <<_ACEOF
18613#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
18614_ACEOF
18615
18616
6ec2e0f5
SDJ
18617 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
18618"
d0ac1c44 18619if test "x$ac_cv_have_decl_isblank" = xyes; then :
6ec2e0f5 18620 ac_have_decl=1
8690e634 18621else
6ec2e0f5 18622 ac_have_decl=0
8690e634
JK
18623fi
18624
6ec2e0f5
SDJ
18625cat >>confdefs.h <<_ACEOF
18626#define HAVE_DECL_ISBLANK $ac_have_decl
18627_ACEOF
8690e634
JK
18628
18629
472fa5ee
SM
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
18660
18661
18662
8690e634
JK
18663
18664
6ec2e0f5 18665 fi
8690e634
JK
18666
18667
18668
18669
18670
5e8754f9
SDJ
18671 if test -n "$FNMATCH_H"; then
18672
18673
18674
18675
472fa5ee
SM
18676
18677
18678
18679
5e8754f9 18680 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
472fa5ee
SM
18681
18682
18683
5e8754f9
SDJ
18684cat >>confdefs.h <<_ACEOF
18685#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
18686_ACEOF
472fa5ee
SM
18687
18688
5e8754f9
SDJ
18689 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
18690"
18691if test "x$ac_cv_have_decl_isblank" = xyes; then :
18692 ac_have_decl=1
18693else
18694 ac_have_decl=0
18695fi
472fa5ee 18696
5e8754f9
SDJ
18697cat >>confdefs.h <<_ACEOF
18698#define HAVE_DECL_ISBLANK $ac_have_decl
18699_ACEOF
472fa5ee
SM
18700
18701
5e8754f9 18702 :
472fa5ee
SM
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
98399780 18714
5e8754f9
SDJ
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730 :
18731
18732
18733
18734
18735
18736
18737 fi
18738
18739
18740
18741 FREXP_LIBM=
18742 if test $gl_cv_func_frexp_no_libm = no; then
18743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
18744$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
18745if ${gl_cv_func_frexp_in_libm+:} false; then :
18746 $as_echo_n "(cached) " >&6
6ec2e0f5 18747else
98399780 18748
5e8754f9
SDJ
18749 save_LIBS="$LIBS"
18750 LIBS="$LIBS -lm"
18751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18752/* end confdefs.h. */
18753#include <math.h>
18754 double x;
18755int
18756main ()
18757{
18758int e; return frexp (x, &e) > 0;
18759 ;
18760 return 0;
18761}
7a6dbc2f 18762_ACEOF
5e8754f9
SDJ
18763if ac_fn_c_try_link "$LINENO"; then :
18764 gl_cv_func_frexp_in_libm=yes
18765else
18766 gl_cv_func_frexp_in_libm=no
18767fi
18768rm -f core conftest.err conftest.$ac_objext \
18769 conftest$ac_exeext conftest.$ac_ext
18770 LIBS="$save_LIBS"
18771
18772fi
18773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
18774$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
18775 if test $gl_cv_func_frexp_in_libm = yes; then
18776 FREXP_LIBM=-lm
18777 fi
18778 fi
18779 if test $gl_cv_func_frexp_no_libm = yes \
18780 || test $gl_cv_func_frexp_in_libm = yes; then
18781 save_LIBS="$LIBS"
18782 LIBS="$LIBS $FREXP_LIBM"
18783
98399780
YQ
18784
18785
472fa5ee
SM
18786 :
18787
18788
18789
18790
18791
5e8754f9
SDJ
18792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
18793$as_echo_n "checking whether frexp works... " >&6; }
18794if ${gl_cv_func_frexp_works+:} false; then :
18795 $as_echo_n "(cached) " >&6
18796else
18797
18798 if test "$cross_compiling" = yes; then :
18799 case "$host_os" in
18800 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
18801 *) gl_cv_func_frexp_works="guessing yes";;
18802 esac
18803
18804else
18805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18806/* end confdefs.h. */
18807
18808#include <float.h>
18809#include <math.h>
18810#include <string.h>
18811#if HAVE_DECL_ALARM
18812# include <signal.h>
18813# include <unistd.h>
18814#endif
18815/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
18816 ICC 10.0 has a bug when optimizing the expression -zero.
18817 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
18818 to PowerPC on Mac OS X 10.5. */
18819#if defined __hpux || defined __sgi || defined __ICC
18820static double
18821compute_minus_zero (void)
18822{
18823 return -DBL_MIN * DBL_MIN;
18824}
18825# define minus_zero compute_minus_zero ()
18826#else
18827double minus_zero = -0.0;
18828#endif
18829int main()
18830{
18831 int result = 0;
18832 int i;
18833 volatile double x;
18834 double zero = 0.0;
18835#if HAVE_DECL_ALARM
18836 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
18837 number. Let the test fail in this case. */
18838 signal (SIGALRM, SIG_DFL);
18839 alarm (5);
18840#endif
18841 /* Test on denormalized numbers. */
18842 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
18843 ;
18844 if (x > 0.0)
18845 {
18846 int exp;
18847 double y = frexp (x, &exp);
18848 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
18849 On NetBSD: y = 0.75. Correct: y = 0.5. */
18850 if (y != 0.5)
18851 result |= 1;
18852 }
18853 /* Test on infinite numbers. */
18854 x = 1.0 / zero;
18855 {
18856 int exp;
18857 double y = frexp (x, &exp);
18858 if (y != x)
18859 result |= 2;
18860 }
18861 /* Test on negative zero. */
18862 x = minus_zero;
18863 {
18864 int exp;
18865 double y = frexp (x, &exp);
18866 if (memcmp (&y, &x, sizeof x))
18867 result |= 4;
18868 }
18869 return result;
18870}
18871_ACEOF
18872if ac_fn_c_try_run "$LINENO"; then :
18873 gl_cv_func_frexp_works=yes
18874else
18875 gl_cv_func_frexp_works=no
18876fi
18877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18878 conftest.$ac_objext conftest.beam conftest.$ac_ext
18879fi
18880
98399780 18881
5e8754f9
SDJ
18882fi
18883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
18884$as_echo "$gl_cv_func_frexp_works" >&6; }
98399780 18885
5e8754f9
SDJ
18886 LIBS="$save_LIBS"
18887 case "$gl_cv_func_frexp_works" in
18888 *yes) gl_func_frexp=yes ;;
18889 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
18890 esac
18891 else
18892 gl_func_frexp=no
18893 fi
18894 if test $gl_func_frexp = yes; then
98399780 18895
5e8754f9 18896$as_echo "#define HAVE_FREXP 1" >>confdefs.h
98399780 18897
5e8754f9 18898 fi
98399780
YQ
18899
18900
5e8754f9 18901 if test $gl_func_frexp != yes; then
6a29c58e
YQ
18902
18903
18904
18905
6a29c58e
YQ
18906
18907
18908
18909
5e8754f9 18910 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
8690e634 18911
5e8754f9 18912 fi
8690e634 18913
8690e634 18914
8690e634 18915
8690e634 18916
8690e634 18917
5e8754f9 18918 GNULIB_FREXP=1
8690e634 18919
8690e634 18920
4a626d0a 18921
8690e634 18922
8690e634 18923
5e8754f9 18924$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
8690e634
JK
18925
18926
18927
18928
18929
63ce7108 18930
e26b6bb0
TT
18931
18932
18933
5e8754f9
SDJ
18934 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
18935"
18936if test "x$ac_cv_have_decl_frexpl" = xyes; then :
e26b6bb0 18937
5e8754f9
SDJ
18938else
18939 HAVE_DECL_FREXPL=0
18940fi
e26b6bb0
TT
18941
18942
5e8754f9
SDJ
18943 FREXPL_LIBM=
18944 if test $HAVE_DECL_FREXPL = 1; then
e26b6bb0 18945
5e8754f9
SDJ
18946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
18947$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
18948if ${gl_cv_func_frexpl_no_libm+:} false; then :
18949 $as_echo_n "(cached) " >&6
18950else
e26b6bb0 18951
5e8754f9
SDJ
18952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18953/* end confdefs.h. */
18954#include <math.h>
18955 long double x;
18956int
18957main ()
18958{
18959int e; return frexpl (x, &e) > 0;
18960 ;
18961 return 0;
18962}
18963_ACEOF
18964if ac_fn_c_try_link "$LINENO"; then :
18965 gl_cv_func_frexpl_no_libm=yes
18966else
18967 gl_cv_func_frexpl_no_libm=no
18968fi
18969rm -f core conftest.err conftest.$ac_objext \
18970 conftest$ac_exeext conftest.$ac_ext
e26b6bb0 18971
5e8754f9
SDJ
18972fi
18973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
18974$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
e26b6bb0 18975
5e8754f9
SDJ
18976 if test $gl_cv_func_frexpl_no_libm = no; then
18977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
18978$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
18979if ${gl_cv_func_frexpl_in_libm+:} false; then :
18980 $as_echo_n "(cached) " >&6
18981else
e26b6bb0 18982
5e8754f9
SDJ
18983 save_LIBS="$LIBS"
18984 LIBS="$LIBS -lm"
18985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18986/* end confdefs.h. */
18987#include <math.h>
18988 long double x;
18989int
18990main ()
18991{
18992int e; return frexpl (x, &e) > 0;
18993 ;
18994 return 0;
18995}
18996_ACEOF
18997if ac_fn_c_try_link "$LINENO"; then :
18998 gl_cv_func_frexpl_in_libm=yes
18999else
19000 gl_cv_func_frexpl_in_libm=no
19001fi
19002rm -f core conftest.err conftest.$ac_objext \
19003 conftest$ac_exeext conftest.$ac_ext
19004 LIBS="$save_LIBS"
e26b6bb0 19005
5e8754f9
SDJ
19006fi
19007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
19008$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
19009 if test $gl_cv_func_frexpl_in_libm = yes; then
19010 FREXPL_LIBM=-lm
19011 fi
19012 fi
19013 if test $gl_cv_func_frexpl_no_libm = yes \
19014 || test $gl_cv_func_frexpl_in_libm = yes; then
19015 save_LIBS="$LIBS"
19016 LIBS="$LIBS $FREXPL_LIBM"
18848e28 19017
18848e28 19018
5e8754f9
SDJ
19019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
19020$as_echo_n "checking whether frexpl works... " >&6; }
19021if ${gl_cv_func_frexpl_works+:} false; then :
19022 $as_echo_n "(cached) " >&6
19023else
18848e28 19024
5e8754f9 19025 if test "$cross_compiling" = yes; then :
18848e28 19026
5e8754f9
SDJ
19027 case "$host_os" in
19028 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
19029 gl_cv_func_frexpl_works="guessing no";;
19030 *) gl_cv_func_frexpl_works="guessing yes";;
19031 esac
18848e28 19032
5e8754f9
SDJ
19033else
19034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19035/* end confdefs.h. */
18848e28 19036
5e8754f9
SDJ
19037#include <float.h>
19038#include <math.h>
19039/* Override the values of <float.h>, like done in float.in.h. */
19040#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
19041# undef LDBL_MIN_EXP
19042# define LDBL_MIN_EXP (-16381)
19043#endif
19044#if defined __i386__ && defined __FreeBSD__
19045# undef LDBL_MIN_EXP
19046# define LDBL_MIN_EXP (-16381)
19047#endif
19048#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
19049# undef LDBL_MIN_EXP
19050# define LDBL_MIN_EXP DBL_MIN_EXP
19051#endif
19052#if defined __sgi && (LDBL_MANT_DIG >= 106)
19053# if defined __GNUC__
19054# undef LDBL_MIN_EXP
19055# define LDBL_MIN_EXP DBL_MIN_EXP
19056# endif
19057#endif
19058extern
19059#ifdef __cplusplus
19060"C"
19061#endif
19062long double frexpl (long double, int *);
19063int main()
19064{
19065 int result = 0;
19066 volatile long double x;
19067 /* Test on finite numbers that fails on AIX 5.1. */
19068 x = 16.0L;
19069 {
19070 int exp = -9999;
19071 frexpl (x, &exp);
19072 if (exp != 5)
19073 result |= 1;
19074 }
19075 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
19076 function returns an invalid (incorrectly normalized) value: it returns
19077 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
19078 but the correct result is
19079 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
19080 x = 1.01L;
19081 {
19082 int exp = -9999;
19083 long double y = frexpl (x, &exp);
19084 if (!(exp == 1 && y == 0.505L))
19085 result |= 2;
19086 }
19087 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
19088 LDBL_MAX_EXP = 16384.
19089 In the loop end test, we test x against Infinity, rather than comparing
19090 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
19091 {
19092 int i;
19093 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
19094 {
19095 int exp = -9999;
19096 frexpl (x, &exp);
19097 if (exp != i)
19098 {
19099 result |= 4;
19100 break;
19101 }
19102 }
19103 }
19104 /* Test on denormalized numbers. */
19105 {
19106 int i;
19107 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
19108 ;
19109 if (x > 0.0L)
19110 {
19111 int exp;
19112 long double y = frexpl (x, &exp);
19113 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
19114 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
19115 if (exp != LDBL_MIN_EXP - 1)
19116 result |= 8;
19117 }
19118 }
19119 /* Test on infinite numbers. */
19120 x = 1.0L / 0.0L;
19121 {
19122 int exp;
19123 long double y = frexpl (x, &exp);
19124 if (y != x)
19125 result |= 16;
19126 }
19127 return result;
19128}
19129_ACEOF
19130if ac_fn_c_try_run "$LINENO"; then :
19131 gl_cv_func_frexpl_works=yes
19132else
19133 gl_cv_func_frexpl_works=no
19134fi
19135rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19136 conftest.$ac_objext conftest.beam conftest.$ac_ext
19137fi
18848e28
GF
19138
19139
5e8754f9
SDJ
19140fi
19141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
19142$as_echo "$gl_cv_func_frexpl_works" >&6; }
18848e28 19143
5e8754f9
SDJ
19144 LIBS="$save_LIBS"
19145 case "$gl_cv_func_frexpl_works" in
19146 *yes) gl_func_frexpl=yes ;;
19147 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
19148 esac
19149 else
19150 gl_func_frexpl=no
19151 fi
19152 if test $gl_func_frexpl = yes; then
18848e28 19153
5e8754f9 19154$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
18848e28 19155
5e8754f9
SDJ
19156 fi
19157 fi
19158 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
19159 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
18848e28 19160
5e8754f9
SDJ
19161 FREXPL_LIBM="$FREXP_LIBM"
19162 else
19163 FREXPL_LIBM=
19164 fi
19165 fi
18848e28 19166
18848e28 19167
6ec2e0f5 19168 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
18848e28 19169
18848e28 19170
18848e28 19171
18848e28
GF
19172
19173
18848e28 19174
18848e28 19175
18848e28 19176
6ec2e0f5 19177 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
18848e28
GF
19178
19179 fi
19180
19181
19182
19183
19184
6ec2e0f5 19185 GNULIB_FREXPL=1
18848e28
GF
19186
19187
19188
19189
19190
6ec2e0f5 19191$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
18848e28
GF
19192
19193
19194
19195
19196
19197
19198
5e8754f9
SDJ
19199 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19200 REPLACE_FSTAT=1
19201 fi
19202
19203
19204 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
19205 REPLACE_FSTAT=1
19206 fi
18848e28 19207
6a29c58e 19208
6a29c58e 19209
6a29c58e 19210
6ec2e0f5 19211
472fa5ee
SM
19212 :
19213
19214
19215
19216
19217
6ec2e0f5
SDJ
19218 if test $ac_cv_func_fchdir = no; then
19219 HAVE_FCHDIR=0
6a29c58e
YQ
19220 fi
19221
6ec2e0f5
SDJ
19222 if test $HAVE_FCHDIR = 0; then
19223 case "$gl_cv_func_open_directory_works" in
19224 *yes) ;;
19225 *)
19226 REPLACE_FSTAT=1
19227 ;;
19228 esac
19229 fi
6a29c58e
YQ
19230
19231
6ec2e0f5 19232 if test $REPLACE_FSTAT = 1; then
6a29c58e 19233
3d99e817
AK
19234
19235
19236
3d99e817
AK
19237
19238
19239
19240
6ec2e0f5 19241 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
3d99e817 19242
5e8754f9 19243 :
6ec2e0f5 19244 fi
3d99e817
AK
19245
19246
19247
19248
19249
6ec2e0f5 19250 GNULIB_FSTAT=1
3d99e817 19251
49e4877c 19252
49e4877c 19253
49e4877c 19254
49e4877c 19255
6ec2e0f5 19256$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
49e4877c 19257
6a29c58e
YQ
19258
19259
88b48903 19260
8690e634 19261
a512b375 19262
88b48903 19263
88b48903 19264
472fa5ee
SM
19265 :
19266
19267
19268
19269
19270
6ec2e0f5
SDJ
19271
19272 if test $ac_cv_func_fstatat = no; then
19273 HAVE_FSTATAT=0
19274 else
19275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
19276$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
d0ac1c44 19277if ${gl_cv_func_fstatat_zero_flag+:} false; then :
6ec2e0f5
SDJ
19278 $as_echo_n "(cached) " >&6
19279else
19280 if test "$cross_compiling" = yes; then :
19281 case "$host_os" in
19282 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
19283 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
19284 esac
88b48903 19285
8690e634
JK
19286else
19287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19288/* end confdefs.h. */
8690e634 19289
6ec2e0f5
SDJ
19290 #include <fcntl.h>
19291 #include <sys/stat.h>
19292 int
19293 main (void)
19294 {
19295 struct stat a;
19296 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
19297 }
19298
88b48903
WN
19299_ACEOF
19300if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19301 gl_cv_func_fstatat_zero_flag=yes
88b48903 19302else
6ec2e0f5 19303 gl_cv_func_fstatat_zero_flag=no
88b48903
WN
19304fi
19305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19306 conftest.$ac_objext conftest.beam conftest.$ac_ext
19307fi
19308
19309
19310fi
6ec2e0f5
SDJ
19311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
19312$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
88b48903 19313
6ec2e0f5
SDJ
19314 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
19315 *yes+*yes) ;;
5e8754f9
SDJ
19316 *) REPLACE_FSTATAT=1
19317 case $gl_cv_func_fstatat_zero_flag in
19318 *yes)
88b48903 19319
6ec2e0f5 19320$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
88b48903 19321
7a6dbc2f 19322 ;;
5e8754f9
SDJ
19323 esac
19324 ;;
6ec2e0f5
SDJ
19325 esac
19326 fi
88b48903 19327
6ec2e0f5 19328 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
88b48903
WN
19329
19330
19331
19332
19333
88b48903 19334
4a626d0a
PA
19335
19336
6ec2e0f5
SDJ
19337 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
19338
19339 fi
19340
19341
19342
4a626d0a 19343
6ec2e0f5
SDJ
19344
19345 GNULIB_FSTATAT=1
19346
19347
19348
19349
19350
19351$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
19352
19353
19354
19355
19356
19357
19358
19359
19360 gl_abort_bug=no
4a626d0a
PA
19361 case "$host_os" in
19362 mingw*)
6ec2e0f5 19363 gl_cv_func_getcwd_path_max=yes
4a626d0a
PA
19364 ;;
19365 *)
88b48903 19366
88b48903 19367
472fa5ee
SM
19368 :
19369
19370
19371
19372
19373
19374
19375
19376 :
19377
19378
19379
88b48903
WN
19380
19381
88b48903 19382
6ec2e0f5
SDJ
19383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
19384$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
d0ac1c44 19385if ${gl_cv_func_getcwd_path_max+:} false; then :
6ec2e0f5
SDJ
19386 $as_echo_n "(cached) " >&6
19387else
19388 # Arrange for deletion of the temporary directory this test creates.
19389 ac_clean_files="$ac_clean_files confdir3"
19390 if test "$cross_compiling" = yes; then :
b567ca63
SM
19391 # Cross-compilation guesses:
19392 case "$host_os" in
19393 aix*) # On AIX, it has the AIX bug.
19394 gl_cv_func_getcwd_path_max='no, it has the AIX bug' ;;
19395 gnu*) # On Hurd, it is 'yes'.
19396 gl_cv_func_getcwd_path_max=yes ;;
19397 linux* | kfreebsd*)
19398 # On older Linux+glibc it's 'no, but it is partly working',
19399 # on newer Linux+glibc it's 'yes'.
19400 # On Linux+musl libc, it's 'no, but it is partly working'.
19401 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
19402 gl_cv_func_getcwd_path_max='no, but it is partly working' ;;
19403 *) # If we don't know, assume the worst.
19404 gl_cv_func_getcwd_path_max=no ;;
5e8754f9 19405 esac
b567ca63 19406
6ec2e0f5
SDJ
19407else
19408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19409/* end confdefs.h. */
88b48903 19410
6ec2e0f5
SDJ
19411#include <errno.h>
19412#include <stdlib.h>
19413#if HAVE_UNISTD_H
19414# include <unistd.h>
19415#else
19416# include <direct.h>
19417#endif
19418#include <string.h>
19419#include <limits.h>
19420#include <sys/stat.h>
19421#include <sys/types.h>
19422#include <fcntl.h>
88b48903
WN
19423
19424
6ec2e0f5
SDJ
19425/* Arrange to define PATH_MAX, like "pathmax.h" does. */
19426#if HAVE_UNISTD_H
19427# include <unistd.h>
19428#endif
19429#include <limits.h>
19430#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19431# include <sys/param.h>
19432#endif
19433#if !defined PATH_MAX && defined MAXPATHLEN
19434# define PATH_MAX MAXPATHLEN
19435#endif
19436#ifdef __hpux
19437# undef PATH_MAX
19438# define PATH_MAX 1024
19439#endif
5e8754f9 19440#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
19441# undef PATH_MAX
19442# define PATH_MAX 260
19443#endif
88b48903 19444
88b48903 19445
6ec2e0f5
SDJ
19446#ifndef AT_FDCWD
19447# define AT_FDCWD 0
19448#endif
19449#ifdef ENAMETOOLONG
19450# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
19451#else
19452# define is_ENAMETOOLONG(x) 0
19453#endif
88b48903 19454
6ec2e0f5
SDJ
19455/* Use the getcwd function, not any macro. */
19456#undef getcwd
88b48903 19457
6ec2e0f5
SDJ
19458/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
19459#undef mkdir
88b48903 19460
6ec2e0f5
SDJ
19461#ifndef S_IRWXU
19462# define S_IRWXU 0700
19463#endif
88b48903 19464
6ec2e0f5
SDJ
19465/* The length of this name must be 8. */
19466#define DIR_NAME "confdir3"
19467#define DIR_NAME_LEN 8
19468#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
88b48903 19469
6ec2e0f5
SDJ
19470/* The length of "../". */
19471#define DOTDOTSLASH_LEN 3
88b48903 19472
6ec2e0f5
SDJ
19473/* Leftover bytes in the buffer, to work around library or OS bugs. */
19474#define BUF_SLOP 20
88b48903 19475
6ec2e0f5
SDJ
19476int
19477main ()
19478{
19479#ifndef PATH_MAX
19480 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
19481 at least not on a local file system. And if we were to start worrying
19482 about remote file systems, we'd have to enable the wrapper function
19483 all of the time, just to be safe. That's not worth the cost. */
19484 exit (0);
19485#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
19486 - DIR_NAME_SIZE - BUF_SLOP) \
19487 <= PATH_MAX)
19488 /* FIXME: Assuming there's a system for which this is true,
19489 this should be done in a compile test. */
19490 exit (0);
19491#else
19492 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
19493 + DIR_NAME_SIZE + BUF_SLOP];
19494 char *cwd = getcwd (buf, PATH_MAX);
19495 size_t initial_cwd_len;
19496 size_t cwd_len;
19497 int fail = 0;
19498 size_t n_chdirs = 0;
88b48903 19499
6ec2e0f5
SDJ
19500 if (cwd == NULL)
19501 exit (10);
88b48903 19502
6ec2e0f5 19503 cwd_len = initial_cwd_len = strlen (cwd);
88b48903 19504
6ec2e0f5
SDJ
19505 while (1)
19506 {
19507 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
19508 char *c = NULL;
19509
19510 cwd_len += DIR_NAME_SIZE;
19511 /* If mkdir or chdir fails, it could be that this system cannot create
19512 any file with an absolute name longer than PATH_MAX, such as cygwin.
19513 If so, leave fail as 0, because the current working directory can't
19514 be too long for getcwd if it can't even be created. For other
19515 errors, be pessimistic and consider that as a failure, too. */
19516 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
19517 {
19518 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19519 fail = 20;
19520 break;
19521 }
88b48903 19522
6ec2e0f5
SDJ
19523 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
19524 {
19525 struct stat sb;
88b48903 19526
6ec2e0f5
SDJ
19527 c = getcwd (buf, PATH_MAX);
19528 if (!c && errno == ENOENT)
19529 {
19530 fail = 11;
19531 break;
19532 }
19533 if (c)
19534 {
19535 fail = 31;
19536 break;
19537 }
19538 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19539 {
19540 fail = 21;
19541 break;
19542 }
88b48903 19543
6ec2e0f5
SDJ
19544 /* Our replacement needs to be able to stat() long ../../paths,
19545 so generate a path larger than PATH_MAX to check,
19546 avoiding the replacement if we can't stat(). */
19547 c = getcwd (buf, cwd_len + 1);
19548 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
19549 {
19550 fail = 32;
19551 break;
19552 }
19553 }
88b48903 19554
6ec2e0f5
SDJ
19555 if (dotdot_max <= cwd_len - initial_cwd_len)
19556 {
19557 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
19558 break;
19559 c = getcwd (buf, cwd_len + 1);
19560 if (!c)
19561 {
19562 if (! (errno == ERANGE || errno == ENOENT
19563 || is_ENAMETOOLONG (errno)))
19564 {
19565 fail = 22;
19566 break;
19567 }
19568 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
19569 {
19570 fail = 12;
19571 break;
19572 }
19573 }
19574 }
88b48903 19575
6ec2e0f5
SDJ
19576 if (c && strlen (c) != cwd_len)
19577 {
19578 fail = 23;
19579 break;
19580 }
19581 ++n_chdirs;
19582 }
88b48903 19583
6ec2e0f5
SDJ
19584 /* Leaving behind such a deep directory is not polite.
19585 So clean up here, right away, even though the driving
19586 shell script would also clean up. */
19587 {
19588 size_t i;
88b48903 19589
6ec2e0f5
SDJ
19590 /* Try rmdir first, in case the chdir failed. */
19591 rmdir (DIR_NAME);
19592 for (i = 0; i <= n_chdirs; i++)
19593 {
19594 if (chdir ("..") < 0)
19595 break;
19596 if (rmdir (DIR_NAME) != 0)
19597 break;
19598 }
19599 }
88b48903 19600
6ec2e0f5
SDJ
19601 exit (fail);
19602#endif
19603}
88b48903 19604
6ec2e0f5
SDJ
19605_ACEOF
19606if ac_fn_c_try_run "$LINENO"; then :
19607 gl_cv_func_getcwd_path_max=yes
19608else
19609 case $? in
5e8754f9
SDJ
19610 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
19611 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
19612 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
19613 *) gl_cv_func_getcwd_path_max=no;;
19614 esac
6ec2e0f5
SDJ
19615fi
19616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19617 conftest.$ac_objext conftest.beam conftest.$ac_ext
19618fi
88b48903 19619
88b48903 19620
6ec2e0f5
SDJ
19621fi
19622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
19623$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
88b48903 19624
6ec2e0f5
SDJ
19625 case "$gl_cv_func_getcwd_null" in
19626 *yes)
88b48903
WN
19627
19628
472fa5ee
SM
19629 :
19630
19631
19632
19633
19634
19635
19636 :
19637
19638
19639
19640
88b48903
WN
19641
19642
5e8754f9
SDJ
19643 for ac_func in getpagesize
19644do :
19645 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
19646if test "x$ac_cv_func_getpagesize" = xyes; then :
19647 cat >>confdefs.h <<_ACEOF
7a6dbc2f
SDJ
19648#define HAVE_GETPAGESIZE 1
19649_ACEOF
19650
5e8754f9
SDJ
19651fi
19652done
6ec2e0f5
SDJ
19653
19654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
19655$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
d0ac1c44 19656if ${gl_cv_func_getcwd_abort_bug+:} false; then :
88b48903
WN
19657 $as_echo_n "(cached) " >&6
19658else
6ec2e0f5
SDJ
19659 # Remove any remnants of a previous test.
19660 rm -rf confdir-14B---
19661 # Arrange for deletion of the temporary directory this test creates.
19662 ac_clean_files="$ac_clean_files confdir-14B---"
19663 if test "$cross_compiling" = yes; then :
19664 gl_cv_func_getcwd_abort_bug=yes
88b48903
WN
19665else
19666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19667/* end confdefs.h. */
6ec2e0f5
SDJ
19668
19669#include <errno.h>
19670#include <stdlib.h>
19671#if HAVE_UNISTD_H
19672# include <unistd.h>
19673#else /* on Windows with MSVC */
19674# include <direct.h>
19675#endif
19676#include <string.h>
19677#include <sys/stat.h>
19678
19679
19680/* Arrange to define PATH_MAX, like "pathmax.h" does. */
19681#if HAVE_UNISTD_H
19682# include <unistd.h>
19683#endif
19684#include <limits.h>
19685#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19686# include <sys/param.h>
19687#endif
19688#if !defined PATH_MAX && defined MAXPATHLEN
19689# define PATH_MAX MAXPATHLEN
19690#endif
19691#ifdef __hpux
19692# undef PATH_MAX
19693# define PATH_MAX 1024
19694#endif
5e8754f9 19695#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6ec2e0f5
SDJ
19696# undef PATH_MAX
19697# define PATH_MAX 260
19698#endif
19699
19700
19701/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
19702#undef mkdir
19703
19704#ifndef S_IRWXU
19705# define S_IRWXU 0700
19706#endif
19707
19708/* FIXME: skip the run-test altogether on systems without getpagesize. */
19709#if ! HAVE_GETPAGESIZE
19710# define getpagesize() 0
19711#endif
19712
19713/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
19714 the 16kB pagesize on ia64 linux. Those conditions make the code below
19715 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
19716#define TARGET_LEN (5 * 1024)
88b48903
WN
19717
19718int
19719main ()
19720{
6ec2e0f5
SDJ
19721 char *cwd;
19722 size_t initial_cwd_len;
19723 int fail = 0;
19724
19725 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
19726 this relatively expensive and invasive test if that's not true. */
19727#ifdef PATH_MAX
19728 int bug_possible = PATH_MAX < getpagesize ();
19729#else
19730 int bug_possible = 0;
19731#endif
19732 if (! bug_possible)
19733 return 0;
8690e634 19734
6ec2e0f5
SDJ
19735 cwd = getcwd (NULL, 0);
19736 if (cwd == NULL)
19737 return 2;
19738
19739 initial_cwd_len = strlen (cwd);
19740 free (cwd);
19741
19742 if (1)
19743 {
19744 static char const dir_name[] = "confdir-14B---";
19745 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
19746 / sizeof dir_name);
19747 size_t d;
19748 for (d = 0; d < desired_depth; d++)
19749 {
19750 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
19751 {
19752 if (! (errno == ERANGE || errno == ENAMETOOLONG
19753 || errno == ENOENT))
19754 fail = 3; /* Unable to construct deep hierarchy. */
19755 break;
19756 }
19757 }
19758
19759 /* If libc has the bug in question, this invocation of getcwd
19760 results in a failed assertion. */
19761 cwd = getcwd (NULL, 0);
19762 if (cwd == NULL)
19763 fail = 4; /* getcwd didn't assert, but it failed for a long name
19764 where the answer could have been learned. */
19765 free (cwd);
19766
19767 /* Call rmdir first, in case the above chdir failed. */
19768 rmdir (dir_name);
19769 while (0 < d--)
19770 {
19771 if (chdir ("..") < 0)
19772 {
19773 fail = 5;
19774 break;
19775 }
19776 rmdir (dir_name);
19777 }
19778 }
19779
19780 return fail;
8690e634 19781}
6ec2e0f5 19782
8690e634
JK
19783_ACEOF
19784if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19785 gl_cv_func_getcwd_abort_bug=no
8690e634 19786else
5e8754f9
SDJ
19787 ret=$?
19788 if test $ret -ge 128 || test $ret = 4; then
19789 gl_cv_func_getcwd_abort_bug=yes
19790 else
19791 gl_cv_func_getcwd_abort_bug=no
19792 fi
8690e634
JK
19793fi
19794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19795 conftest.$ac_objext conftest.beam conftest.$ac_ext
19796fi
19797
19798
19799fi
6ec2e0f5
SDJ
19800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
19801$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
19802 if test $gl_cv_func_getcwd_abort_bug = yes; then :
19803 gl_abort_bug=yes
19804fi
19805
19806 ;;
19807 esac
19808 ;;
19809 esac
19810 case "$gl_cv_func_getcwd_path_max" in
19811 "no"|"no, it has the AIX bug") ;;
19812 *)
19813
19814$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
19815
19816 ;;
19817 esac
19818 case "$gl_cv_func_getcwd_path_max" in
19819 "no, but it is partly working")
19820
19821$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
19822
19823 ;;
19824 "yes, but with shorter paths")
19825
19826$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
19827
19828 ;;
19829 esac
19830
19831 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
19832 || test $gl_cv_func_getcwd_posix_signature != yes \
19833 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
19834 || test $gl_abort_bug = yes; then
19835 REPLACE_GETCWD=1
8690e634
JK
19836 fi
19837
6ec2e0f5 19838 if test $REPLACE_GETCWD = 1; then
8690e634
JK
19839
19840
8690e634
JK
19841
19842
19843
19844
19845
19846
6ec2e0f5 19847 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
8690e634
JK
19848
19849
8690e634
JK
19850
19851
6ec2e0f5
SDJ
19852 :
19853
19854 fi
19855
8690e634
JK
19856
19857cat >>confdefs.h <<_ACEOF
6ec2e0f5 19858#define GNULIB_GETCWD 1
8690e634
JK
19859_ACEOF
19860
19861
8690e634 19862
8690e634
JK
19863
19864
c971b7fa 19865
c971b7fa 19866
6ec2e0f5
SDJ
19867 GNULIB_GETCWD=1
19868
19869
19870
19871
19872
19873$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
19874
c971b7fa 19875
c971b7fa 19876
c971b7fa 19877
c971b7fa 19878
c971b7fa 19879
c971b7fa 19880
c971b7fa 19881
6ec2e0f5
SDJ
19882 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
19883 *yes,yes) ;;
19884 *)
19885 REPLACE_GETCWD=1
19886 ;;
19887 esac
c971b7fa 19888
6ec2e0f5 19889 if test $REPLACE_GETCWD = 1; then
c971b7fa 19890
c971b7fa
PA
19891
19892
c971b7fa
PA
19893
19894
c971b7fa 19895
c971b7fa 19896
c971b7fa 19897
6ec2e0f5 19898 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
c971b7fa 19899
6ec2e0f5 19900 fi
c971b7fa 19901
c971b7fa 19902
c971b7fa 19903
c971b7fa 19904
8690e634 19905
6ec2e0f5 19906 GNULIB_GETCWD=1
c971b7fa 19907
88b48903
WN
19908
19909
19910
88b48903 19911
6ec2e0f5 19912$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
88b48903 19913
88b48903
WN
19914
19915
19916
6ec2e0f5
SDJ
19917
19918
19919
472fa5ee
SM
19920 :
19921
19922
19923
19924
19925
19926
19927 :
19928
19929
19930
19931
6ec2e0f5
SDJ
19932
19933 if test $ac_cv_func_getdtablesize = yes &&
19934 test $ac_cv_have_decl_getdtablesize = yes; then
5e8754f9
SDJ
19935 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
19936 # up to an unchangeable hard limit; all other platforms correctly
19937 # require setrlimit before getdtablesize() can report a larger value.
6ec2e0f5
SDJ
19938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
19939$as_echo_n "checking whether getdtablesize works... " >&6; }
d0ac1c44 19940if ${gl_cv_func_getdtablesize_works+:} false; then :
88b48903
WN
19941 $as_echo_n "(cached) " >&6
19942else
5e8754f9 19943 if test "$cross_compiling" = yes; then :
88b48903 19944 case "$host_os" in
5e8754f9
SDJ
19945 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
19946 gl_cv_func_getdtablesize_works="guessing no" ;;
19947 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
19948 esac
88b48903
WN
19949else
19950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19951/* end confdefs.h. */
19952
5e8754f9 19953 #include <unistd.h>
6ec2e0f5
SDJ
19954int
19955main ()
88b48903 19956{
6ec2e0f5 19957int size = getdtablesize();
5e8754f9
SDJ
19958 if (dup2 (0, getdtablesize()) != -1)
19959 return 1;
19960 if (size != getdtablesize())
19961 return 2;
6ec2e0f5
SDJ
19962
19963 ;
19964 return 0;
88b48903
WN
19965}
19966_ACEOF
19967if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19968 gl_cv_func_getdtablesize_works=yes
88b48903 19969else
6ec2e0f5 19970 gl_cv_func_getdtablesize_works=no
88b48903
WN
19971fi
19972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19973 conftest.$ac_objext conftest.beam conftest.$ac_ext
19974fi
19975
19976
19977fi
6ec2e0f5
SDJ
19978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
19979$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
19980 case "$gl_cv_func_getdtablesize_works" in
5e8754f9 19981 *yes) ;;
6ec2e0f5 19982 *) REPLACE_GETDTABLESIZE=1 ;;
88b48903
WN
19983 esac
19984 else
6ec2e0f5 19985 HAVE_GETDTABLESIZE=0
88b48903
WN
19986 fi
19987
6ec2e0f5 19988 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
88b48903
WN
19989
19990
19991
19992
19993
19994
19995
19996
6ec2e0f5 19997 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
88b48903 19998
6ec2e0f5 19999 :
88b48903
WN
20000 fi
20001
20002
20003
20004
20005
6ec2e0f5 20006 GNULIB_GETDTABLESIZE=1
88b48903
WN
20007
20008
20009
88b48903 20010
88b48903 20011
6ec2e0f5 20012$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
88b48903 20013
88b48903 20014
88b48903 20015
88b48903 20016
88b48903 20017
88b48903 20018
88b48903 20019
88b48903
WN
20020
20021
472fa5ee
SM
20022 :
20023
20024
20025
20026
20027
6ec2e0f5
SDJ
20028 if test $ac_cv_have_decl_getlogin_r = no; then
20029 HAVE_DECL_GETLOGIN_R=0
20030 fi
88b48903 20031
88b48903 20032
472fa5ee
SM
20033 :
20034
20035
20036
20037
20038
6ec2e0f5
SDJ
20039 if test $ac_cv_func_getlogin_r = no; then
20040 HAVE_GETLOGIN_R=0
20041 else
20042 HAVE_GETLOGIN_R=1
20043
20044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
20045$as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
d0ac1c44 20046if ${gl_cv_func_getlogin_r_works+:} false; then :
6ec2e0f5
SDJ
20047 $as_echo_n "(cached) " >&6
20048else
88b48903 20049
6ec2e0f5 20050 case "$host_os" in
5e8754f9
SDJ
20051 # Guess no on OSF/1.
20052 osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
20053 # Guess yes otherwise.
20054 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
6ec2e0f5
SDJ
20055 esac
20056 if test "$cross_compiling" = yes; then :
20057 :
88b48903
WN
20058else
20059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20060/* end confdefs.h. */
20061
6ec2e0f5
SDJ
20062#include <stddef.h>
20063#include <unistd.h>
20064#if !HAVE_DECL_GETLOGIN_R
88b48903 20065extern
6ec2e0f5 20066# ifdef __cplusplus
88b48903 20067"C"
6ec2e0f5
SDJ
20068# endif
20069int getlogin_r (char *, size_t);
88b48903 20070#endif
6ec2e0f5
SDJ
20071int
20072main (void)
88b48903
WN
20073{
20074 int result = 0;
6ec2e0f5
SDJ
20075 char buf[100];
20076
20077 if (getlogin_r (buf, 0) == 0)
5e8754f9 20078 result |= 16;
6ec2e0f5 20079 if (getlogin_r (buf, 1) == 0)
5e8754f9 20080 result |= 17;
88b48903
WN
20081 return result;
20082}
20083_ACEOF
20084if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 20085 gl_cv_func_getlogin_r_works=yes
88b48903 20086else
5e8754f9
SDJ
20087 case $? in
20088 16 | 17) gl_cv_func_getlogin_r_works=no ;;
20089 esac
20090
88b48903
WN
20091fi
20092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20093 conftest.$ac_objext conftest.beam conftest.$ac_ext
20094fi
20095
20096
4a626d0a 20097fi
6ec2e0f5
SDJ
20098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
20099$as_echo "$gl_cv_func_getlogin_r_works" >&6; }
20100 case "$gl_cv_func_getlogin_r_works" in
20101 *yes) ;;
20102 *) REPLACE_GETLOGIN_R=1 ;;
20103 esac
20104 fi
20105
20106 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
20107
20108
20109
20110
20111
20112
20113
20114
20115 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
4a626d0a 20116
4a626d0a 20117
4a626d0a 20118
472fa5ee
SM
20119 :
20120
20121
20122
20123
20124
4a626d0a 20125
4a626d0a
PA
20126 fi
20127
20128
4a626d0a
PA
20129
20130
20131
6ec2e0f5 20132 GNULIB_GETLOGIN_R=1
4a626d0a
PA
20133
20134
20135
20136
20137
6ec2e0f5 20138$as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
4a626d0a 20139
4a626d0a
PA
20140
20141
20142
20143
472fa5ee
SM
20144 :
20145
20146
20147
20148
20149
20150
20151
20152
4a626d0a 20153
6ec2e0f5
SDJ
20154 ac_found=0
20155 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
20156"
d0ac1c44 20157if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
6ec2e0f5
SDJ
20158 ac_have_decl=1
20159else
20160 ac_have_decl=0
20161fi
20162
20163cat >>confdefs.h <<_ACEOF
20164#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
20165_ACEOF
20166if test $ac_have_decl = 1; then :
20167 ac_found=1
20168fi
20169
20170 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
20171"
d0ac1c44 20172if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
6ec2e0f5
SDJ
20173 ac_have_decl=1
20174else
20175 ac_have_decl=0
20176fi
20177
20178cat >>confdefs.h <<_ACEOF
20179#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
20180_ACEOF
20181if test $ac_have_decl = 1; then :
20182 ac_found=1
20183fi
4a626d0a 20184
6ec2e0f5
SDJ
20185 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
20186"
d0ac1c44 20187if test "x$ac_cv_have_decl___argv" = xyes; then :
6ec2e0f5
SDJ
20188 ac_have_decl=1
20189else
20190 ac_have_decl=0
20191fi
4a626d0a 20192
6ec2e0f5
SDJ
20193cat >>confdefs.h <<_ACEOF
20194#define HAVE_DECL___ARGV $ac_have_decl
20195_ACEOF
20196if test $ac_have_decl = 1; then :
20197 ac_found=1
20198fi
4a626d0a
PA
20199
20200
6ec2e0f5
SDJ
20201 # Incur the cost of this test only if none of the above worked.
20202 if test $ac_found = 0; then
20203 # On OpenBSD 5.1, using the global __progname variable appears to be
20204 # the only way to implement getprogname.
20205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
20206$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
d0ac1c44 20207if ${gl_cv_var___progname+:} false; then :
6ec2e0f5
SDJ
20208 $as_echo_n "(cached) " >&6
20209else
4a626d0a 20210
6ec2e0f5
SDJ
20211 gl_cv_var___progname=
20212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20213/* end confdefs.h. */
20214extern char *__progname;
20215int
20216main ()
20217{
20218return *__progname;
20219
20220 ;
20221 return 0;
20222}
20223_ACEOF
20224if ac_fn_c_try_link "$LINENO"; then :
20225 gl_cv_var___progname=yes
20226
20227fi
20228rm -f core conftest.err conftest.$ac_objext \
20229 conftest$ac_exeext conftest.$ac_ext
20230
20231
20232fi
20233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
20234$as_echo "$gl_cv_var___progname" >&6; }
20235 if test "$gl_cv_var___progname" = yes; then
20236
20237$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
20238
20239 fi
20240 fi
4a626d0a
PA
20241
20242
20243
20244
20245
20246
20247
20248
472fa5ee
SM
20249 :
20250
20251
20252
20253
20254
4a626d0a
PA
20255
20256 gl_gettimeofday_timezone=void
20257 if test $ac_cv_func_gettimeofday != yes; then
20258 HAVE_GETTIMEOFDAY=0
20259 else
20260
20261
20262
20263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
20264$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
d0ac1c44 20265if ${gl_cv_func_gettimeofday_clobber+:} false; then :
4a626d0a
PA
20266 $as_echo_n "(cached) " >&6
20267else
20268 if test "$cross_compiling" = yes; then :
20269 # When cross-compiling:
20270 case "$host_os" in
5e8754f9
SDJ
20271 # Guess all is fine on glibc systems.
20272 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
20273 # If we don't know, assume the worst.
20274 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
4a626d0a
PA
20275 esac
20276
20277else
20278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20279/* end confdefs.h. */
20280#include <string.h>
20281 #include <sys/time.h>
20282 #include <time.h>
20283 #include <stdlib.h>
20284
20285int
20286main ()
20287{
20288
20289 time_t t = 0;
20290 struct tm *lt;
20291 struct tm saved_lt;
20292 struct timeval tv;
20293 lt = localtime (&t);
20294 saved_lt = *lt;
20295 gettimeofday (&tv, NULL);
20296 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
20297
20298 ;
20299 return 0;
20300}
20301_ACEOF
20302if ac_fn_c_try_run "$LINENO"; then :
20303 gl_cv_func_gettimeofday_clobber=no
20304else
20305 gl_cv_func_gettimeofday_clobber=yes
20306fi
20307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20308 conftest.$ac_objext conftest.beam conftest.$ac_ext
20309fi
20310
20311fi
20312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
20313$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
20314
20315 case "$gl_cv_func_gettimeofday_clobber" in
20316 *yes)
20317 REPLACE_GETTIMEOFDAY=1
20318
7a6dbc2f
SDJ
20319 REPLACE_GMTIME=1
20320 REPLACE_LOCALTIME=1
4a626d0a 20321
5e8754f9
SDJ
20322
20323$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
20324
4a626d0a
PA
20325 ;;
20326 esac
20327
20328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
20329$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
d0ac1c44 20330if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
4a626d0a
PA
20331 $as_echo_n "(cached) " >&6
20332else
20333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20334/* end confdefs.h. */
20335#include <sys/time.h>
20336 struct timeval c;
20337 int gettimeofday (struct timeval *restrict, void *restrict);
20338
20339int
20340main ()
20341{
20342/* glibc uses struct timezone * rather than the POSIX void *
20343 if _GNU_SOURCE is defined. However, since the only portable
20344 use of gettimeofday uses NULL as the second parameter, and
20345 since the glibc definition is actually more typesafe, it is
20346 not worth wrapping this to get a compliant signature. */
20347 int (*f) (struct timeval *restrict, void *restrict)
20348 = gettimeofday;
20349 int x = f (&c, 0);
20350 return !(x | c.tv_sec | c.tv_usec);
20351
20352 ;
20353 return 0;
20354}
20355_ACEOF
20356if ac_fn_c_try_compile "$LINENO"; then :
20357 gl_cv_func_gettimeofday_posix_signature=yes
20358else
20359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20360/* end confdefs.h. */
20361#include <sys/time.h>
20362int gettimeofday (struct timeval *restrict, struct timezone *restrict);
20363
20364int
20365main ()
20366{
20367
20368 ;
20369 return 0;
20370}
20371_ACEOF
20372if ac_fn_c_try_compile "$LINENO"; then :
20373 gl_cv_func_gettimeofday_posix_signature=almost
20374else
20375 gl_cv_func_gettimeofday_posix_signature=no
20376fi
20377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20378fi
20379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20380fi
20381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
20382$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
20383 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
20384 gl_gettimeofday_timezone='struct timezone'
20385 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
20386 REPLACE_GETTIMEOFDAY=1
20387 fi
20388 if test $REPLACE_STRUCT_TIMEVAL = 1; then
20389 REPLACE_GETTIMEOFDAY=1
20390 fi
5e8754f9 20391
4a626d0a
PA
20392 fi
20393
20394cat >>confdefs.h <<_ACEOF
20395#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
20396_ACEOF
20397
88b48903 20398
4a626d0a 20399 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
88b48903 20400
88b48903 20401
88b48903 20402
88b48903
WN
20403
20404
88b48903
WN
20405
20406
20407
6ec2e0f5
SDJ
20408 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
20409
6ec2e0f5 20410
5e8754f9
SDJ
20411 for ac_header in sys/timeb.h
20412do :
20413 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
20414if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
20415 cat >>confdefs.h <<_ACEOF
20416#define HAVE_SYS_TIMEB_H 1
20417_ACEOF
6ec2e0f5 20418
5e8754f9 20419fi
6ec2e0f5 20420
5e8754f9 20421done
6ec2e0f5 20422
5e8754f9
SDJ
20423 for ac_func in _ftime
20424do :
20425 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
20426if test "x$ac_cv_func__ftime" = xyes; then :
20427 cat >>confdefs.h <<_ACEOF
20428#define HAVE__FTIME 1
20429_ACEOF
6ec2e0f5 20430
5e8754f9
SDJ
20431fi
20432done
6ec2e0f5
SDJ
20433
20434
5e8754f9 20435 fi
6ec2e0f5
SDJ
20436
20437
20438
6ec2e0f5
SDJ
20439
20440
5e8754f9 20441 GNULIB_GETTIMEOFDAY=1
6ec2e0f5
SDJ
20442
20443
20444
7a6dbc2f
SDJ
20445
20446
5e8754f9 20447$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
6ec2e0f5
SDJ
20448
20449
20450
5e8754f9
SDJ
20451 GLOB_H=
20452 for ac_header in glob.h
20453do :
20454 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
20455if test "x$ac_cv_header_glob_h" = xyes; then :
20456 cat >>confdefs.h <<_ACEOF
20457#define HAVE_GLOB_H 1
20458_ACEOF
6ec2e0f5 20459
5e8754f9
SDJ
20460else
20461 GLOB_H=glob.h
20462fi
6ec2e0f5 20463
5e8754f9 20464done
6ec2e0f5
SDJ
20465
20466
5e8754f9
SDJ
20467 if test -z "$GLOB_H"; then
20468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5
20469$as_echo_n "checking for GNU glob interface version 1... " >&6; }
20470if ${gl_cv_gnu_glob_interface_version_1+:} false; then :
6ec2e0f5
SDJ
20471 $as_echo_n "(cached) " >&6
20472else
20473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20474/* end confdefs.h. */
20475#include <gnu-versions.h>
5e8754f9 20476char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
6ec2e0f5
SDJ
20477_ACEOF
20478if ac_fn_c_try_compile "$LINENO"; then :
5e8754f9 20479 gl_cv_gnu_glob_interface_version_1=yes
6ec2e0f5 20480else
5e8754f9 20481 gl_cv_gnu_glob_interface_version_1=no
6ec2e0f5
SDJ
20482fi
20483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20484fi
5e8754f9
SDJ
20485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5
20486$as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; }
20487
20488 if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
20489 GLOB_H=glob.h
6ec2e0f5 20490 fi
5e8754f9 20491 fi
6ec2e0f5 20492
5e8754f9
SDJ
20493 if test -z "$GLOB_H"; then
20494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
6ec2e0f5 20495$as_echo_n "checking whether glob lists broken symlinks... " >&6; }
d0ac1c44 20496if ${gl_cv_glob_lists_symlinks+:} false; then :
6ec2e0f5
SDJ
20497 $as_echo_n "(cached) " >&6
20498else
5e8754f9
SDJ
20499 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
20500 gl_cv_glob_lists_symlinks=maybe
20501 else
20502 # If we can't make a symlink, then we cannot test this issue. Be
20503 # pessimistic about this.
20504 gl_cv_glob_lists_symlinks=no
20505 fi
20506
20507 if test $gl_cv_glob_lists_symlinks = maybe; then
20508 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
20509 gl_cv_glob_lists_symlinks=no
20510else
20511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20512/* end confdefs.h. */
5e8754f9 20513
6ec2e0f5 20514#include <stddef.h>
5e8754f9 20515#include <glob.h>
6ec2e0f5
SDJ
20516int
20517main ()
20518{
20519glob_t found;
5e8754f9 20520if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
6ec2e0f5
SDJ
20521 ;
20522 return 0;
20523}
4a626d0a 20524_ACEOF
6ec2e0f5
SDJ
20525if ac_fn_c_try_run "$LINENO"; then :
20526 gl_cv_glob_lists_symlinks=yes
20527else
20528 gl_cv_glob_lists_symlinks=no
20529fi
20530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20531 conftest.$ac_objext conftest.beam conftest.$ac_ext
20532fi
88b48903 20533
5e8754f9 20534 fi
4a626d0a 20535fi
6ec2e0f5
SDJ
20536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
20537$as_echo "$gl_cv_glob_lists_symlinks" >&6; }
88b48903 20538
5e8754f9
SDJ
20539 if test $gl_cv_glob_lists_symlinks = no; then
20540 GLOB_H=glob.h
6ec2e0f5
SDJ
20541 fi
20542 fi
4a626d0a 20543
5e8754f9 20544 rm -f conf$$-globtest
4a626d0a 20545
88b48903 20546
6ec2e0f5
SDJ
20547 if test -n "$GLOB_H"; then
20548 GL_GENERATE_GLOB_H_TRUE=
20549 GL_GENERATE_GLOB_H_FALSE='#'
20550else
20551 GL_GENERATE_GLOB_H_TRUE='#'
20552 GL_GENERATE_GLOB_H_FALSE=
20553fi
88b48903 20554
88b48903 20555
5e8754f9 20556 if test -n "$GLOB_H"; then
472fa5ee
SM
20557
20558
20559
20560
20561
20562
20563
20564
20565 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
20566
20567
20568
7a6dbc2f
SDJ
20569 :
20570
20571
20572
472fa5ee 20573
472fa5ee 20574
88b48903 20575
88b48903 20576
5e8754f9
SDJ
20577 if test $ac_cv_header_sys_cdefs_h = yes; then
20578 HAVE_SYS_CDEFS_H=1
20579 else
20580 HAVE_SYS_CDEFS_H=0
7a6dbc2f 20581 fi
88b48903
WN
20582
20583
725e2999
JB
20584 :
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596 fi
20597
20598 :
20599
20600
20601
20602
20603
20604
20605
20606
20607 HAVE_INET_NTOP=1
20608 INET_NTOP_LIB=
20609
20610
20611
20612
20613 :
20614
20615
20616
20617
20618
20619 if test $ac_cv_header_sys_socket_h != yes; then
20620 for ac_header in winsock2.h
20621do :
20622 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20623if test "x$ac_cv_header_winsock2_h" = xyes; then :
20624 cat >>confdefs.h <<_ACEOF
20625#define HAVE_WINSOCK2_H 1
20626_ACEOF
20627
20628fi
20629
20630done
20631
20632 fi
20633 if test "$ac_cv_header_winsock2_h" = yes; then
20634 HAVE_WINSOCK2_H=1
20635 UNISTD_H_HAVE_WINSOCK2_H=1
20636 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20637 else
20638 HAVE_WINSOCK2_H=0
20639 fi
20640
20641
20642 if test $HAVE_WINSOCK2_H = 1; then
20643 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
20644"
20645if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20646 ac_have_decl=1
20647else
20648 ac_have_decl=0
20649fi
20650
20651cat >>confdefs.h <<_ACEOF
20652#define HAVE_DECL_INET_NTOP $ac_have_decl
20653_ACEOF
20654
20655 if test $ac_cv_have_decl_inet_ntop = yes; then
20656 REPLACE_INET_NTOP=1
20657 INET_NTOP_LIB="-lws2_32"
20658 else
20659 HAVE_DECL_INET_NTOP=0
20660 HAVE_INET_NTOP=0
20661 fi
20662 else
20663 gl_save_LIBS=$LIBS
20664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
20665$as_echo_n "checking for library containing inet_ntop... " >&6; }
20666if ${ac_cv_search_inet_ntop+:} false; then :
20667 $as_echo_n "(cached) " >&6
20668else
20669 ac_func_search_save_LIBS=$LIBS
20670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20671/* end confdefs.h. */
20672
20673/* Override any GCC internal prototype to avoid an error.
20674 Use char because int might match the return type of a GCC
20675 builtin and then its argument prototype would still apply. */
20676#ifdef __cplusplus
20677extern "C"
20678#endif
20679char inet_ntop ();
20680int
20681main ()
20682{
20683return inet_ntop ();
20684 ;
20685 return 0;
20686}
20687_ACEOF
20688for ac_lib in '' nsl resolv; do
20689 if test -z "$ac_lib"; then
20690 ac_res="none required"
20691 else
20692 ac_res=-l$ac_lib
20693 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20694 fi
20695 if ac_fn_c_try_link "$LINENO"; then :
20696 ac_cv_search_inet_ntop=$ac_res
20697fi
20698rm -f core conftest.err conftest.$ac_objext \
20699 conftest$ac_exeext
20700 if ${ac_cv_search_inet_ntop+:} false; then :
20701 break
20702fi
20703done
20704if ${ac_cv_search_inet_ntop+:} false; then :
20705
20706else
20707 ac_cv_search_inet_ntop=no
20708fi
20709rm conftest.$ac_ext
20710LIBS=$ac_func_search_save_LIBS
20711fi
20712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
20713$as_echo "$ac_cv_search_inet_ntop" >&6; }
20714ac_res=$ac_cv_search_inet_ntop
20715if test "$ac_res" != no; then :
20716 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20717
20718else
20719 for ac_func in inet_ntop
20720do :
20721 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
20722if test "x$ac_cv_func_inet_ntop" = xyes; then :
20723 cat >>confdefs.h <<_ACEOF
20724#define HAVE_INET_NTOP 1
20725_ACEOF
20726
20727fi
20728done
20729
20730 if test $ac_cv_func_inet_ntop = no; then
20731 HAVE_INET_NTOP=0
20732 fi
20733
20734fi
20735
20736 LIBS=$gl_save_LIBS
20737
20738 if test "$ac_cv_search_inet_ntop" != "no" \
20739 && test "$ac_cv_search_inet_ntop" != "none required"; then
20740 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
20741 fi
20742
20743
20744 :
20745
20746
20747
20748
20749
20750 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
20751 #if HAVE_NETDB_H
20752 # include <netdb.h>
20753 #endif
20754
20755"
20756if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
20757 ac_have_decl=1
20758else
20759 ac_have_decl=0
20760fi
20761
20762cat >>confdefs.h <<_ACEOF
20763#define HAVE_DECL_INET_NTOP $ac_have_decl
20764_ACEOF
20765
20766 if test $ac_cv_have_decl_inet_ntop = no; then
20767 HAVE_DECL_INET_NTOP=0
20768 fi
20769 fi
20770
20771
20772 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
20773
20774
20775
20776
20777
20778
20779
7a6dbc2f 20780
725e2999 20781 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
7a6dbc2f
SDJ
20782
20783
20784
7a6dbc2f 20785
725e2999 20786 fi
7a6dbc2f
SDJ
20787
20788
20789
20790
7a6dbc2f 20791
725e2999
JB
20792 GNULIB_INET_NTOP=1
20793
7a6dbc2f
SDJ
20794
20795
49e4877c
PA
20796
20797
88b48903
WN
20798
20799
20800
20801
20802 PRIPTR_PREFIX=
20803 if test -n "$STDINT_H"; then
20804 PRIPTR_PREFIX='"l"'
20805 else
20806 for glpfx in '' l ll I64; do
20807 case $glpfx in
20808 '') gltype1='int';;
20809 l) gltype1='long int';;
20810 ll) gltype1='long long int';;
20811 I64) gltype1='__int64';;
20812 esac
20813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20814/* end confdefs.h. */
20815#include <stdint.h>
20816 extern intptr_t foo;
20817 extern $gltype1 foo;
20818int
20819main ()
20820{
20821
20822 ;
20823 return 0;
20824}
20825_ACEOF
20826if ac_fn_c_try_compile "$LINENO"; then :
20827 PRIPTR_PREFIX='"'$glpfx'"'
20828fi
20829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20830 test -n "$PRIPTR_PREFIX" && break
20831 done
20832 fi
20833
20834
20835
20836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
20837$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
d0ac1c44 20838if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
88b48903
WN
20839 $as_echo_n "(cached) " >&6
20840else
20841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20842/* end confdefs.h. */
20843/* Work also in C++ mode. */
20844 #define __STDC_LIMIT_MACROS 1
20845
20846 /* Work if build is not clean. */
20847 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20848
20849 #include <limits.h>
20850 #if HAVE_STDINT_H
20851 #include <stdint.h>
20852 #endif
20853
20854 #if defined INT32_MAX && defined INTMAX_MAX
20855 #define CONDITION (INT32_MAX < INTMAX_MAX)
20856 #elif HAVE_LONG_LONG_INT
20857 #define CONDITION (sizeof (int) < sizeof (long long int))
20858 #else
20859 #define CONDITION 0
20860 #endif
20861 int test[CONDITION ? 1 : -1];
20862int
20863main ()
20864{
20865
20866 ;
20867 return 0;
20868}
20869_ACEOF
20870if ac_fn_c_try_compile "$LINENO"; then :
20871 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
20872else
20873 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
20874fi
20875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20876fi
20877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
20878$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
20879 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
20880 INT32_MAX_LT_INTMAX_MAX=1;
20881 else
20882 INT32_MAX_LT_INTMAX_MAX=0;
20883 fi
20884
20885
20886 if test $APPLE_UNIVERSAL_BUILD = 0; then
20887
20888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
20889$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
d0ac1c44 20890if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
88b48903
WN
20891 $as_echo_n "(cached) " >&6
20892else
20893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20894/* end confdefs.h. */
20895/* Work also in C++ mode. */
20896 #define __STDC_LIMIT_MACROS 1
20897
20898 /* Work if build is not clean. */
20899 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20900
20901 #include <limits.h>
20902 #if HAVE_STDINT_H
20903 #include <stdint.h>
20904 #endif
20905
20906 #if defined INT64_MAX
20907 #define CONDITION (INT64_MAX == LONG_MAX)
20908 #elif HAVE_LONG_LONG_INT
20909 #define CONDITION (sizeof (long long int) == sizeof (long int))
20910 #else
20911 #define CONDITION 0
20912 #endif
20913 int test[CONDITION ? 1 : -1];
20914int
20915main ()
20916{
20917
20918 ;
20919 return 0;
20920}
20921_ACEOF
20922if ac_fn_c_try_compile "$LINENO"; then :
20923 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
20924else
20925 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
20926fi
20927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20928fi
20929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
20930$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
20931 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
20932 INT64_MAX_EQ_LONG_MAX=1;
20933 else
20934 INT64_MAX_EQ_LONG_MAX=0;
20935 fi
20936
20937
20938 else
20939 INT64_MAX_EQ_LONG_MAX=-1
20940 fi
20941
20942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
20943$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
d0ac1c44 20944if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
88b48903
WN
20945 $as_echo_n "(cached) " >&6
20946else
20947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20948/* end confdefs.h. */
20949/* Work also in C++ mode. */
20950 #define __STDC_LIMIT_MACROS 1
20951
20952 /* Work if build is not clean. */
20953 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
20954
20955 #include <limits.h>
20956 #if HAVE_STDINT_H
20957 #include <stdint.h>
20958 #endif
20959
20960 #if defined UINT32_MAX && defined UINTMAX_MAX
20961 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
20962 #elif HAVE_LONG_LONG_INT
20963 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
20964 #else
20965 #define CONDITION 0
20966 #endif
20967 int test[CONDITION ? 1 : -1];
20968int
20969main ()
20970{
20971
20972 ;
20973 return 0;
20974}
20975_ACEOF
20976if ac_fn_c_try_compile "$LINENO"; then :
20977 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
20978else
20979 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
20980fi
20981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20982fi
20983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
20984$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
20985 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
20986 UINT32_MAX_LT_UINTMAX_MAX=1;
20987 else
20988 UINT32_MAX_LT_UINTMAX_MAX=0;
20989 fi
20990
20991
20992 if test $APPLE_UNIVERSAL_BUILD = 0; then
20993
20994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
20995$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
d0ac1c44 20996if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
88b48903
WN
20997 $as_echo_n "(cached) " >&6
20998else
20999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21000/* end confdefs.h. */
21001/* Work also in C++ mode. */
21002 #define __STDC_LIMIT_MACROS 1
21003
21004 /* Work if build is not clean. */
21005 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21006
21007 #include <limits.h>
21008 #if HAVE_STDINT_H
21009 #include <stdint.h>
21010 #endif
21011
21012 #if defined UINT64_MAX
21013 #define CONDITION (UINT64_MAX == ULONG_MAX)
21014 #elif HAVE_LONG_LONG_INT
21015 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
21016 #else
21017 #define CONDITION 0
21018 #endif
21019 int test[CONDITION ? 1 : -1];
21020int
21021main ()
21022{
21023
21024 ;
21025 return 0;
21026}
21027_ACEOF
21028if ac_fn_c_try_compile "$LINENO"; then :
21029 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
21030else
21031 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
21032fi
21033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21034fi
21035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
21036$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
21037 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
21038 UINT64_MAX_EQ_ULONG_MAX=1;
21039 else
21040 UINT64_MAX_EQ_ULONG_MAX=0;
21041 fi
21042
21043
21044 else
21045 UINT64_MAX_EQ_ULONG_MAX=-1
21046 fi
21047
21048
21049
21050
21051
21052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
21053$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
d0ac1c44 21054if ${gl_cv_func_isnand_no_libm+:} false; then :
88b48903
WN
21055 $as_echo_n "(cached) " >&6
21056else
21057
21058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21059/* end confdefs.h. */
21060#include <math.h>
21061 #if __GNUC__ >= 4
21062 # undef isnand
21063 # define isnand(x) __builtin_isnan ((double)(x))
21064 #else
21065 # undef isnand
21066 # define isnand(x) isnan ((double)(x))
21067 #endif
21068 double x;
21069int
21070main ()
21071{
21072return isnand (x);
21073 ;
21074 return 0;
21075}
21076_ACEOF
21077if ac_fn_c_try_link "$LINENO"; then :
21078 gl_cv_func_isnand_no_libm=yes
21079else
21080 gl_cv_func_isnand_no_libm=no
21081fi
21082rm -f core conftest.err conftest.$ac_objext \
21083 conftest$ac_exeext conftest.$ac_ext
21084
21085fi
21086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
21087$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
21088
21089 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
21090 if test $gl_cv_func_isnand_no_libm = yes; then
21091
21092$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
21093
21094 fi
21095
21096 if test $gl_func_isnand_no_libm != yes; then
21097
21098
21099
21100
21101
21102
21103
21104
21105 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
21106
21107
21108
21109
21110 fi
21111
21112
21113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
21114$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
d0ac1c44 21115if ${gl_cv_func_isnanl_no_libm+:} false; then :
88b48903
WN
21116 $as_echo_n "(cached) " >&6
21117else
21118
21119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21120/* end confdefs.h. */
21121#include <math.h>
21122 #if __GNUC__ >= 4
21123 # undef isnanl
21124 # define isnanl(x) __builtin_isnanl ((long double)(x))
21125 #elif defined isnan
21126 # undef isnanl
21127 # define isnanl(x) isnan ((long double)(x))
21128 #endif
21129 long double x;
21130int
21131main ()
21132{
21133return isnanl (x);
21134 ;
21135 return 0;
21136}
21137_ACEOF
21138if ac_fn_c_try_link "$LINENO"; then :
21139 gl_cv_func_isnanl_no_libm=yes
21140else
21141 gl_cv_func_isnanl_no_libm=no
21142fi
21143rm -f core conftest.err conftest.$ac_objext \
21144 conftest$ac_exeext conftest.$ac_ext
21145
21146fi
21147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
21148$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
21149
21150 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
21151 if test $gl_func_isnanl_no_libm = yes; then
21152
21153
21154
21155
21156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
21157$as_echo_n "checking whether isnanl works... " >&6; }
d0ac1c44 21158if ${gl_cv_func_isnanl_works+:} false; then :
88b48903
WN
21159 $as_echo_n "(cached) " >&6
21160else
21161
21162 if test "$cross_compiling" = yes; then :
4a626d0a 21163 gl_cv_func_isnanl_works="guessing yes"
88b48903
WN
21164else
21165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21166/* end confdefs.h. */
21167
21168#include <float.h>
21169#include <limits.h>
21170#include <math.h>
21171#if __GNUC__ >= 4
21172# undef isnanl
21173# define isnanl(x) __builtin_isnanl ((long double)(x))
21174#elif defined isnan
21175# undef isnanl
21176# define isnanl(x) isnan ((long double)(x))
21177#endif
21178#define NWORDS \
21179 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21180typedef union { unsigned int word[NWORDS]; long double value; }
21181 memory_long_double;
21182/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
21183 runtime type conversion. */
21184#ifdef __sgi
21185static long double NaNl ()
21186{
21187 double zero = 0.0;
21188 return zero / zero;
21189}
21190#else
21191# define NaNl() (0.0L / 0.0L)
21192#endif
21193int main ()
21194{
21195 int result = 0;
21196
21197 if (!isnanl (NaNl ()))
21198 result |= 1;
21199
21200 {
21201 memory_long_double m;
21202 unsigned int i;
21203
21204 /* The isnanl function should be immune against changes in the sign bit and
21205 in the mantissa bits. The xor operation twiddles a bit that can only be
21206 a sign bit or a mantissa bit (since the exponent never extends to
21207 bit 31). */
21208 m.value = NaNl ();
21209 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
21210 for (i = 0; i < NWORDS; i++)
21211 m.word[i] |= 1;
21212 if (!isnanl (m.value))
21213 result |= 1;
21214 }
21215
21216#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
21217/* Representation of an 80-bit 'long double' as an initializer for a sequence
21218 of 'unsigned int' words. */
21219# ifdef WORDS_BIGENDIAN
21220# define LDBL80_WORDS(exponent,manthi,mantlo) \
21221 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
4a626d0a 21222 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
88b48903
WN
21223 (unsigned int) (mantlo) << 16 \
21224 }
21225# else
21226# define LDBL80_WORDS(exponent,manthi,mantlo) \
21227 { mantlo, manthi, exponent }
21228# endif
21229 { /* Quiet NaN. */
21230 static memory_long_double x =
21231 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
21232 if (!isnanl (x.value))
21233 result |= 2;
21234 }
21235 {
21236 /* Signalling NaN. */
21237 static memory_long_double x =
21238 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
21239 if (!isnanl (x.value))
21240 result |= 2;
21241 }
4a626d0a 21242 /* isnanl should return something even for noncanonical values. */
88b48903
WN
21243 { /* Pseudo-NaN. */
21244 static memory_long_double x =
21245 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
4a626d0a 21246 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
21247 result |= 4;
21248 }
21249 { /* Pseudo-Infinity. */
21250 static memory_long_double x =
21251 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
4a626d0a 21252 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
21253 result |= 8;
21254 }
21255 { /* Pseudo-Zero. */
21256 static memory_long_double x =
21257 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
4a626d0a 21258 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
21259 result |= 16;
21260 }
21261 { /* Unnormalized number. */
21262 static memory_long_double x =
21263 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
4a626d0a 21264 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
21265 result |= 32;
21266 }
21267 { /* Pseudo-Denormal. */
21268 static memory_long_double x =
21269 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
4a626d0a 21270 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
21271 result |= 64;
21272 }
21273#endif
21274
21275 return result;
21276}
21277_ACEOF
21278if ac_fn_c_try_run "$LINENO"; then :
21279 gl_cv_func_isnanl_works=yes
21280else
21281 gl_cv_func_isnanl_works=no
21282fi
21283rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21284 conftest.$ac_objext conftest.beam conftest.$ac_ext
21285fi
21286
21287
21288fi
21289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
21290$as_echo "$gl_cv_func_isnanl_works" >&6; }
21291
21292 case "$gl_cv_func_isnanl_works" in
21293 *yes) ;;
21294 *) gl_func_isnanl_no_libm=no ;;
21295 esac
21296 fi
21297 if test $gl_func_isnanl_no_libm = yes; then
21298
21299$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
21300
21301 fi
21302
21303 if test $gl_func_isnanl_no_libm != yes; then
21304
21305
21306
21307
21308
21309
21310
21311
21312 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
21313
21314
21315
21316
5e8754f9 21317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
88b48903 21318$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
d0ac1c44 21319if ${gl_cv_cc_long_double_expbit0+:} false; then :
88b48903
WN
21320 $as_echo_n "(cached) " >&6
21321else
21322
21323 if test "$cross_compiling" = yes; then :
21324
21325 gl_cv_cc_long_double_expbit0="unknown"
21326
21327else
21328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21329/* end confdefs.h. */
21330
21331#include <float.h>
21332#include <stddef.h>
21333#include <stdio.h>
21334#include <string.h>
21335#define NWORDS \
21336 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
21337typedef union { long double value; unsigned int word[NWORDS]; }
21338 memory_long_double;
21339static unsigned int ored_words[NWORDS];
21340static unsigned int anded_words[NWORDS];
21341static void add_to_ored_words (long double x)
21342{
21343 memory_long_double m;
21344 size_t i;
21345 /* Clear it first, in case
21346 sizeof (long double) < sizeof (memory_long_double). */
21347 memset (&m, 0, sizeof (memory_long_double));
21348 m.value = x;
21349 for (i = 0; i < NWORDS; i++)
21350 {
21351 ored_words[i] |= m.word[i];
21352 anded_words[i] &= m.word[i];
21353 }
21354}
21355int main ()
21356{
21357 size_t j;
21358 FILE *fp = fopen ("conftest.out", "w");
21359 if (fp == NULL)
21360 return 1;
21361 for (j = 0; j < NWORDS; j++)
21362 anded_words[j] = ~ (unsigned int) 0;
21363 add_to_ored_words (0.25L);
21364 add_to_ored_words (0.5L);
21365 add_to_ored_words (1.0L);
21366 add_to_ored_words (2.0L);
21367 add_to_ored_words (4.0L);
21368 /* Remove bits that are common (e.g. if representation of the first mantissa
21369 bit is explicit). */
21370 for (j = 0; j < NWORDS; j++)
21371 ored_words[j] &= ~anded_words[j];
21372 /* Now find the nonzero word. */
21373 for (j = 0; j < NWORDS; j++)
21374 if (ored_words[j] != 0)
21375 break;
21376 if (j < NWORDS)
21377 {
21378 size_t i;
21379 for (i = j + 1; i < NWORDS; i++)
21380 if (ored_words[i] != 0)
21381 {
21382 fprintf (fp, "unknown");
21383 return (fclose (fp) != 0);
21384 }
21385 for (i = 0; ; i++)
21386 if ((ored_words[j] >> i) & 1)
21387 {
21388 fprintf (fp, "word %d bit %d", (int) j, (int) i);
21389 return (fclose (fp) != 0);
21390 }
21391 }
21392 fprintf (fp, "unknown");
21393 return (fclose (fp) != 0);
21394}
21395
21396_ACEOF
21397if ac_fn_c_try_run "$LINENO"; then :
21398 gl_cv_cc_long_double_expbit0=`cat conftest.out`
21399else
21400 gl_cv_cc_long_double_expbit0="unknown"
21401fi
21402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21403 conftest.$ac_objext conftest.beam conftest.$ac_ext
21404fi
21405
21406 rm -f conftest.out
21407
21408fi
21409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
21410$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
21411 case "$gl_cv_cc_long_double_expbit0" in
21412 word*bit*)
21413 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
21414 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
21415
21416cat >>confdefs.h <<_ACEOF
21417#define LDBL_EXPBIT0_WORD $word
21418_ACEOF
21419
21420
21421cat >>confdefs.h <<_ACEOF
21422#define LDBL_EXPBIT0_BIT $bit
21423_ACEOF
21424
21425 ;;
21426 esac
21427
21428
21429
21430 fi
21431
21432
21433
21434
88b48903
WN
21435
21436
5e8754f9 21437 :
472fa5ee
SM
21438
21439
21440
21441
21442
88b48903
WN
21443
21444
2196f55f 21445
49e4877c 21446
5e8754f9 21447 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
88b48903
WN
21448
21449
21450
5abebf3c
CB
21451 if test "$gl_threads_api" = posix; then
21452 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
21453 # pthread_rwlock_* functions.
21454 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
21455"
21456if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
21457
21458$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
21459
21460fi
21461
21462 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
21463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21464/* end confdefs.h. */
21465
21466 #include <pthread.h>
21467int
21468main ()
21469{
21470
21471#if __FreeBSD__ == 4
21472error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
21473#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
21474 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
21475error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
21476#else
21477int x = (int)PTHREAD_MUTEX_RECURSIVE;
21478return !x;
21479#endif
21480
21481 ;
21482 return 0;
21483}
21484_ACEOF
21485if ac_fn_c_try_compile "$LINENO"; then :
21486
21487$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
21488
21489fi
21490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21491 fi
21492 :
21493
21494
21495
21496cat >>confdefs.h <<_ACEOF
21497#define GNULIB_LOCK 1
21498_ACEOF
21499
21500
21501
21502
88b48903 21503
472fa5ee
SM
21504 :
21505
21506
21507
21508
21509
f45c62c4
YQ
21510 if test $ac_cv_func_lstat = yes; then
21511
5e8754f9
SDJ
21512 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
21513 *no)
f45c62c4
YQ
21514 REPLACE_LSTAT=1
21515 ;;
21516 esac
21517 else
21518 HAVE_LSTAT=0
21519 fi
21520
21521 if test $REPLACE_LSTAT = 1; then
21522
21523
21524
21525
21526
21527
21528
21529
21530 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
21531
21532 :
21533 fi
21534
21535
21536
21537
21538
21539 GNULIB_LSTAT=1
21540
21541
21542
21543
21544
21545$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
21546
21547
21548
21549
21550
21551
6a29c58e
YQ
21552 if test $gl_cv_func_malloc_posix = yes; then
21553
21554$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
21555
21556 else
21557 REPLACE_MALLOC=1
21558 fi
21559
21560 if test $REPLACE_MALLOC = 1; then
21561
21562
21563
21564
21565
21566
21567
21568
21569 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
21570
21571 fi
21572
21573
21574
21575
21576
21577 GNULIB_MALLOC_POSIX=1
21578
21579
21580
21581
21582
21583$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
21584
21585
21586
21587
21588
21589
88b48903
WN
21590
21591
21592
21593
21594
88b48903 21595
c971b7fa 21596
c971b7fa 21597
98399780 21598
472fa5ee
SM
21599 :
21600
21601
21602
21603
21604
98399780
YQ
21605
21606
21607
88b48903
WN
21608 if test $gl_cv_have_include_next = yes; then
21609 gl_cv_next_math_h='<'math.h'>'
21610 else
21611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
21612$as_echo_n "checking absolute name of <math.h>... " >&6; }
d0ac1c44 21613if ${gl_cv_next_math_h+:} false; then :
88b48903
WN
21614 $as_echo_n "(cached) " >&6
21615else
c971b7fa 21616
88b48903 21617 if test $ac_cv_header_math_h = yes; then
c971b7fa
PA
21618
21619
4a626d0a
PA
21620
21621
21622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 21623/* end confdefs.h. */
88b48903 21624#include <math.h>
8690e634 21625_ACEOF
4a626d0a
PA
21626 case "$host_os" in
21627 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21628 *) gl_absname_cpp="$ac_cpp" ;;
21629 esac
21630
21631 case "$host_os" in
21632 mingw*)
21633 gl_dirsep_regex='[/\\]'
21634 ;;
21635 *)
21636 gl_dirsep_regex='\/'
21637 ;;
21638 esac
21639 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21640 gl_header_literal_regex=`echo 'math.h' \
21641 | sed -e "$gl_make_literal_regex_sed"`
21642 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21643 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21644 s|^/[^/]|//&|
21645 p
21646 q
21647 }'
21648
21649 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21650 sed -n "$gl_absolute_header_sed"`
21651
21652 gl_header=$gl_cv_absolute_math_h
21653 gl_cv_next_math_h='"'$gl_header'"'
88b48903
WN
21654 else
21655 gl_cv_next_math_h='<'math.h'>'
21656 fi
8690e634 21657
c971b7fa 21658
88b48903
WN
21659fi
21660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
21661$as_echo "$gl_cv_next_math_h" >&6; }
21662 fi
21663 NEXT_MATH_H=$gl_cv_next_math_h
c971b7fa 21664
88b48903
WN
21665 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21666 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21667 gl_next_as_first_directive='<'math.h'>'
21668 else
21669 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21670 gl_next_as_first_directive=$gl_cv_next_math_h
21671 fi
21672 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
8690e634 21673
c971b7fa 21674
c971b7fa
PA
21675
21676
c971b7fa 21677
88b48903
WN
21678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
21679$as_echo_n "checking whether NAN macro works... " >&6; }
d0ac1c44 21680if ${gl_cv_header_math_nan_works+:} false; then :
c971b7fa
PA
21681 $as_echo_n "(cached) " >&6
21682else
8690e634
JK
21683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21684/* end confdefs.h. */
88b48903 21685#include <math.h>
c971b7fa
PA
21686int
21687main ()
21688{
88b48903
WN
21689/* Solaris 10 has a broken definition of NAN. Other platforms
21690 fail to provide NAN, or provide it only in C99 mode; this
21691 test only needs to fail when NAN is provided but wrong. */
21692 float f = 1.0f;
21693#ifdef NAN
21694 f = NAN;
21695#endif
21696 return f == 0;
c971b7fa
PA
21697 ;
21698 return 0;
21699}
21700_ACEOF
21701if ac_fn_c_try_compile "$LINENO"; then :
88b48903 21702 gl_cv_header_math_nan_works=yes
8690e634 21703else
88b48903 21704 gl_cv_header_math_nan_works=no
c971b7fa
PA
21705fi
21706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 21707fi
88b48903
WN
21708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
21709$as_echo "$gl_cv_header_math_nan_works" >&6; }
21710 if test $gl_cv_header_math_nan_works = no; then
21711 REPLACE_NAN=1
c971b7fa 21712 fi
88b48903
WN
21713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
21714$as_echo_n "checking whether HUGE_VAL works... " >&6; }
d0ac1c44 21715if ${gl_cv_header_math_huge_val_works+:} false; then :
c971b7fa
PA
21716 $as_echo_n "(cached) " >&6
21717else
8690e634 21718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 21719/* end confdefs.h. */
88b48903 21720#include <math.h>
c971b7fa
PA
21721int
21722main ()
21723{
88b48903
WN
21724/* Solaris 10 has a broken definition of HUGE_VAL. */
21725 double d = HUGE_VAL;
21726 return d == 0;
c971b7fa
PA
21727 ;
21728 return 0;
21729}
21730_ACEOF
21731if ac_fn_c_try_compile "$LINENO"; then :
88b48903 21732 gl_cv_header_math_huge_val_works=yes
8690e634 21733else
88b48903 21734 gl_cv_header_math_huge_val_works=no
c971b7fa
PA
21735fi
21736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 21737fi
88b48903
WN
21738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
21739$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
21740 if test $gl_cv_header_math_huge_val_works = no; then
21741 REPLACE_HUGE_VAL=1
8690e634 21742 fi
c971b7fa 21743
c971b7fa 21744
5e8754f9
SDJ
21745 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
21746 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21748$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21749if eval \${$as_gl_Symbol+:} false; then :
21750 $as_echo_n "(cached) " >&6
21751else
21752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21753/* end confdefs.h. */
21754#include <math.h>
21755int
21756main ()
21757{
21758#undef $gl_func
21759 (void) $gl_func;
21760 ;
21761 return 0;
21762}
21763_ACEOF
21764if ac_fn_c_try_compile "$LINENO"; then :
21765 eval "$as_gl_Symbol=yes"
21766else
21767 eval "$as_gl_Symbol=no"
21768fi
21769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21770fi
21771eval ac_res=\$$as_gl_Symbol
21772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21773$as_echo "$ac_res" >&6; }
21774 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
21775 cat >>confdefs.h <<_ACEOF
21776#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21777_ACEOF
c971b7fa 21778
5e8754f9
SDJ
21779 eval ac_cv_have_decl_$gl_func=yes
21780fi
21781 done
c971b7fa
PA
21782
21783
21784
21785
21786
c971b7fa 21787
c971b7fa 21788
c971b7fa 21789
c971b7fa
PA
21790
21791
c971b7fa 21792
472fa5ee
SM
21793 :
21794
21795
21796
21797
21798
21799
21800 :
21801
21802
21803
21804
8690e634
JK
21805
21806 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
21807
21808
21809
21810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
21811$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 21812if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
c971b7fa
PA
21813 $as_echo_n "(cached) " >&6
21814else
8690e634
JK
21815
21816 case "$host_os" in
21817 # Guess no on AIX and OSF/1.
21818 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
21819 # Guess yes otherwise.
21820 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
21821 esac
21822 if test $LOCALE_JA != none; then
21823 if test "$cross_compiling" = yes; then :
21824 :
21825else
c971b7fa
PA
21826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21827/* end confdefs.h. */
c971b7fa 21828
8690e634
JK
21829#include <locale.h>
21830#include <string.h>
21831/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21832 <wchar.h>.
21833 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21834 included before <wchar.h>. */
21835#include <stddef.h>
21836#include <stdio.h>
21837#include <time.h>
21838#include <wchar.h>
21839int main ()
c971b7fa 21840{
8690e634
JK
21841 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
21842 {
21843 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
21844 mbstate_t state;
21845 wchar_t wc;
21846
21847 memset (&state, '\0', sizeof (mbstate_t));
21848 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
21849 if (mbsinit (&state))
5e8754f9 21850 return 1;
8690e634 21851 }
c971b7fa
PA
21852 return 0;
21853}
21854_ACEOF
8690e634
JK
21855if ac_fn_c_try_run "$LINENO"; then :
21856 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 21857else
8690e634 21858 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa 21859fi
8690e634
JK
21860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21861 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 21862fi
c971b7fa 21863
8690e634 21864 fi
c971b7fa 21865
8690e634
JK
21866fi
21867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
21868$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 21869
c971b7fa 21870
c971b7fa 21871
c971b7fa 21872
8690e634
JK
21873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
21874$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 21875if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
21876 $as_echo_n "(cached) " >&6
21877else
21878
8690e634
JK
21879 case "$host_os" in
21880 # Guess no on Solaris 8.
21881 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
21882 # Guess yes otherwise.
21883 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
21884 esac
21885 if test $LOCALE_ZH_CN != none; then
21886 if test "$cross_compiling" = yes; then :
21887 :
21888else
21889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
21890/* end confdefs.h. */
21891
8690e634
JK
21892#include <locale.h>
21893#include <stdlib.h>
21894#include <string.h>
21895/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21896 <wchar.h>.
21897 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21898 included before <wchar.h>. */
21899#include <stddef.h>
21900#include <stdio.h>
21901#include <time.h>
21902#include <wchar.h>
21903int main ()
c971b7fa 21904{
8690e634
JK
21905 /* This fails on Solaris 8:
21906 mbrtowc returns 2, and sets wc to 0x00F0.
21907 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
21908 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
21909 {
21910 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
21911 mbstate_t state;
21912 wchar_t wc;
21913
21914 memset (&state, '\0', sizeof (mbstate_t));
21915 if (mbrtowc (&wc, input + 3, 6, &state) != 4
21916 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 21917 return 1;
8690e634 21918 }
c971b7fa
PA
21919 return 0;
21920}
21921_ACEOF
8690e634
JK
21922if ac_fn_c_try_run "$LINENO"; then :
21923 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 21924else
8690e634 21925 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 21926fi
8690e634
JK
21927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21928 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 21929fi
c971b7fa 21930
8690e634 21931 fi
c971b7fa 21932
8690e634
JK
21933fi
21934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
21935$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
21936
21937 REPLACE_MBSTATE_T=0
21938 case "$gl_cv_func_mbrtowc_incomplete_state" in
21939 *yes) ;;
21940 *) REPLACE_MBSTATE_T=1 ;;
21941 esac
21942 case "$gl_cv_func_mbrtowc_sanitycheck" in
21943 *yes) ;;
21944 *) REPLACE_MBSTATE_T=1 ;;
21945 esac
c971b7fa 21946 else
8690e634 21947 REPLACE_MBSTATE_T=1
c971b7fa
PA
21948 fi
21949
21950
21951
472fa5ee
SM
21952 :
21953
21954
21955
21956
21957
8690e634
JK
21958 if test $ac_cv_func_mbrtowc = no; then
21959 HAVE_MBRTOWC=0
21960 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
21961/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21962 <wchar.h>.
21963 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
21964 included before <wchar.h>. */
21965#include <stddef.h>
21966#include <stdio.h>
21967#include <time.h>
21968#include <wchar.h>
c971b7fa 21969
8690e634 21970"
d0ac1c44 21971if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
8690e634
JK
21972 ac_have_decl=1
21973else
21974 ac_have_decl=0
c971b7fa 21975fi
c971b7fa 21976
8690e634
JK
21977cat >>confdefs.h <<_ACEOF
21978#define HAVE_DECL_MBRTOWC $ac_have_decl
21979_ACEOF
c971b7fa 21980
8690e634
JK
21981 if test $ac_cv_have_decl_mbrtowc = yes; then
21982 REPLACE_MBRTOWC=1
21983 fi
21984 else
21985 if test $REPLACE_MBSTATE_T = 1; then
21986 REPLACE_MBRTOWC=1
21987 else
c971b7fa
PA
21988
21989
21990
8690e634
JK
21991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
21992$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
d0ac1c44 21993if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
8690e634 21994 $as_echo_n "(cached) " >&6
c971b7fa 21995else
c971b7fa 21996
8690e634
JK
21997 case "$host_os" in
21998 # Guess no on Solaris.
21999 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
22000 # Guess yes otherwise.
22001 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
22002 esac
22003 if test $LOCALE_FR_UTF8 != none; then
22004 if test "$cross_compiling" = yes; then :
22005 :
22006else
22007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
22008/* end confdefs.h. */
22009
8690e634
JK
22010#include <locale.h>
22011#include <stdlib.h>
22012#include <string.h>
22013/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22014 <wchar.h>.
22015 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22016 included before <wchar.h>. */
22017#include <stddef.h>
22018#include <stdio.h>
22019#include <time.h>
22020#include <wchar.h>
22021int main ()
22022{
22023 int result = 0;
22024
22025 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22026 {
22027 char input[] = "\303\237er";
22028 mbstate_t state;
22029 wchar_t wc;
22030 size_t ret;
22031
22032 memset (&state, '\0', sizeof (mbstate_t));
22033 wc = (wchar_t) 0xBADFACE;
22034 ret = mbrtowc (&wc, input, 5, &state);
22035 if (ret != 2)
22036 result |= 1;
22037 if (!mbsinit (&state))
22038 result |= 2;
c971b7fa 22039
8690e634
JK
22040 memset (&state, '\0', sizeof (mbstate_t));
22041 ret = mbrtowc (NULL, input, 5, &state);
22042 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
22043 result |= 4;
22044 if (!mbsinit (&state))
22045 result |= 8;
22046 }
22047 return result;
22048}
c971b7fa 22049_ACEOF
8690e634
JK
22050if ac_fn_c_try_run "$LINENO"; then :
22051 gl_cv_func_mbrtowc_null_arg1=yes
22052else
22053 gl_cv_func_mbrtowc_null_arg1=no
22054fi
22055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22056 conftest.$ac_objext conftest.beam conftest.$ac_ext
22057fi
c971b7fa 22058
8690e634 22059 fi
c971b7fa 22060
c971b7fa 22061fi
8690e634
JK
22062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
22063$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
c971b7fa 22064
c971b7fa 22065
c971b7fa 22066
c971b7fa 22067
8690e634
JK
22068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
22069$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
d0ac1c44 22070if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
8690e634
JK
22071 $as_echo_n "(cached) " >&6
22072else
c971b7fa 22073
8690e634
JK
22074 case "$host_os" in
22075 # Guess no on OSF/1.
22076 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
22077 # Guess yes otherwise.
22078 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
22079 esac
22080 if test $LOCALE_FR_UTF8 != none; then
22081 if test "$cross_compiling" = yes; then :
c971b7fa 22082 :
8690e634
JK
22083else
22084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22085/* end confdefs.h. */
22086
22087#include <locale.h>
22088#include <string.h>
22089/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22090 <wchar.h>.
22091 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22092 included before <wchar.h>. */
22093#include <stddef.h>
22094#include <stdio.h>
22095#include <time.h>
22096#include <wchar.h>
22097int main ()
22098{
22099 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22100 {
22101 mbstate_t state;
22102 wchar_t wc;
22103 int ret;
22104
22105 memset (&state, '\0', sizeof (mbstate_t));
22106 wc = (wchar_t) 0xBADFACE;
22107 mbrtowc (&wc, NULL, 5, &state);
22108 /* Check that wc was not modified. */
22109 if (wc != (wchar_t) 0xBADFACE)
5e8754f9 22110 return 1;
8690e634
JK
22111 }
22112 return 0;
22113}
22114_ACEOF
22115if ac_fn_c_try_run "$LINENO"; then :
22116 gl_cv_func_mbrtowc_null_arg2=yes
22117else
22118 gl_cv_func_mbrtowc_null_arg2=no
22119fi
22120rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22121 conftest.$ac_objext conftest.beam conftest.$ac_ext
22122fi
22123
22124 fi
22125
22126fi
22127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
22128$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
c971b7fa
PA
22129
22130
22131
22132
22133
22134
8690e634
JK
22135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
22136$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
d0ac1c44 22137if ${gl_cv_func_mbrtowc_retval+:} false; then :
8690e634
JK
22138 $as_echo_n "(cached) " >&6
22139else
22140
22141 case "$host_os" in
22142 # Guess no on HP-UX, Solaris, native Windows.
22143 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
22144 # Guess yes otherwise.
22145 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
22146 esac
22147 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
22148 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
22149 if test "$cross_compiling" = yes; then :
c971b7fa 22150 :
8690e634
JK
22151else
22152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22153/* end confdefs.h. */
c971b7fa 22154
8690e634
JK
22155#include <locale.h>
22156#include <string.h>
22157/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22158 <wchar.h>.
22159 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22160 included before <wchar.h>. */
22161#include <stddef.h>
22162#include <stdio.h>
22163#include <time.h>
22164#include <wchar.h>
22165int main ()
22166{
22167 int result = 0;
22168 int found_some_locale = 0;
22169 /* This fails on Solaris. */
22170 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22171 {
22172 char input[] = "B\303\274\303\237er"; /* "Büßer" */
22173 mbstate_t state;
22174 wchar_t wc;
22175
22176 memset (&state, '\0', sizeof (mbstate_t));
22177 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22178 {
22179 input[1] = '\0';
22180 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
22181 result |= 1;
22182 }
22183 found_some_locale = 1;
22184 }
22185 /* This fails on HP-UX 11.11. */
22186 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22187 {
22188 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22189 mbstate_t state;
22190 wchar_t wc;
22191
22192 memset (&state, '\0', sizeof (mbstate_t));
22193 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22194 {
22195 input[1] = '\0';
22196 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
22197 result |= 2;
22198 }
22199 found_some_locale = 1;
22200 }
22201 /* This fails on native Windows. */
22202 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
22203 {
22204 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
22205 mbstate_t state;
22206 wchar_t wc;
22207
22208 memset (&state, '\0', sizeof (mbstate_t));
22209 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22210 {
22211 input[3] = '\0';
22212 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22213 result |= 4;
22214 }
22215 found_some_locale = 1;
22216 }
22217 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
22218 {
22219 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
22220 mbstate_t state;
22221 wchar_t wc;
22222
22223 memset (&state, '\0', sizeof (mbstate_t));
22224 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22225 {
22226 input[3] = '\0';
22227 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22228 result |= 8;
22229 }
22230 found_some_locale = 1;
22231 }
22232 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
22233 {
22234 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
22235 mbstate_t state;
22236 wchar_t wc;
22237
22238 memset (&state, '\0', sizeof (mbstate_t));
22239 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
22240 {
22241 input[3] = '\0';
22242 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
22243 result |= 16;
22244 }
22245 found_some_locale = 1;
22246 }
22247 return (found_some_locale ? result : 77);
22248}
22249_ACEOF
22250if ac_fn_c_try_run "$LINENO"; then :
22251 gl_cv_func_mbrtowc_retval=yes
22252else
22253 if test $? != 77; then
22254 gl_cv_func_mbrtowc_retval=no
22255 fi
c971b7fa 22256
8690e634
JK
22257fi
22258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22259 conftest.$ac_objext conftest.beam conftest.$ac_ext
22260fi
c971b7fa 22261
8690e634 22262 fi
c971b7fa 22263
8690e634
JK
22264fi
22265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
22266$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
c971b7fa
PA
22267
22268
22269
22270
8690e634
JK
22271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
22272$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
d0ac1c44 22273if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
c971b7fa
PA
22274 $as_echo_n "(cached) " >&6
22275else
8690e634
JK
22276
22277 case "$host_os" in
22278 # Guess no on Solaris 8 and 9.
22279 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
22280 # Guess yes otherwise.
22281 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
22282 esac
22283 if test $LOCALE_ZH_CN != none; then
22284 if test "$cross_compiling" = yes; then :
22285 :
c971b7fa
PA
22286else
22287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22288/* end confdefs.h. */
22289
8690e634 22290#include <locale.h>
c971b7fa 22291#include <string.h>
8690e634
JK
22292/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22293 <wchar.h>.
22294 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22295 included before <wchar.h>. */
22296#include <stddef.h>
22297#include <stdio.h>
22298#include <time.h>
22299#include <wchar.h>
22300int main ()
c971b7fa 22301{
8690e634
JK
22302 /* This fails on Solaris 8 and 9. */
22303 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
c971b7fa 22304 {
8690e634
JK
22305 mbstate_t state;
22306 wchar_t wc;
c971b7fa 22307
8690e634
JK
22308 memset (&state, '\0', sizeof (mbstate_t));
22309 if (mbrtowc (&wc, "", 1, &state) != 0)
5e8754f9 22310 return 1;
8690e634 22311 }
c971b7fa
PA
22312 return 0;
22313}
22314_ACEOF
22315if ac_fn_c_try_run "$LINENO"; then :
8690e634 22316 gl_cv_func_mbrtowc_nul_retval=yes
c971b7fa 22317else
8690e634 22318 gl_cv_func_mbrtowc_nul_retval=no
c971b7fa
PA
22319fi
22320rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22321 conftest.$ac_objext conftest.beam conftest.$ac_ext
22322fi
22323
8690e634
JK
22324 fi
22325
c971b7fa 22326fi
8690e634
JK
22327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
22328$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
22329
4a626d0a
PA
22330
22331
22332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
22333$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
d0ac1c44 22334if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
4a626d0a
PA
22335 $as_echo_n "(cached) " >&6
22336else
22337
22338 case "$host_os" in
5e8754f9
SDJ
22339 # Guess no on AIX and glibc systems.
22340 aix* | *-gnu*)
22341 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
22342 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
4a626d0a
PA
22343 esac
22344 if test "$cross_compiling" = yes; then :
22345 :
22346else
22347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22348/* end confdefs.h. */
22349
22350 #include <wchar.h>
22351 static wchar_t wc;
22352 static mbstate_t mbs;
22353 int
22354 main (void)
22355 {
49e4877c 22356 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
4a626d0a
PA
22357 }
22358_ACEOF
22359if ac_fn_c_try_run "$LINENO"; then :
4a626d0a 22360 gl_cv_func_mbrtowc_empty_input=yes
49e4877c
PA
22361else
22362 gl_cv_func_mbrtowc_empty_input=no
4a626d0a
PA
22363fi
22364rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22365 conftest.$ac_objext conftest.beam conftest.$ac_ext
22366fi
22367
22368
22369fi
22370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
22371$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
22372
49e4877c 22373
5e8754f9 22374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
49e4877c 22375$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
d0ac1c44 22376if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
49e4877c
PA
22377 $as_echo_n "(cached) " >&6
22378else
22379
22380 gl_cv_C_locale_sans_EILSEQ="guessing no"
22381
22382 if test "$cross_compiling" = yes; then :
5e8754f9 22383 :
49e4877c
PA
22384else
22385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22386/* end confdefs.h. */
22387#include <limits.h>
22388 #include <locale.h>
22389 #include <wchar.h>
22390
22391int
22392main ()
22393{
22394
22395 int i;
22396 char *locale = setlocale (LC_ALL, "C");
22397 if (! locale)
5e8754f9 22398 return 1;
49e4877c
PA
22399 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
22400 {
22401 char c = i;
22402 wchar_t wc;
22403 mbstate_t mbs = { 0, };
22404 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
22405 if (1 < ss)
5e8754f9 22406 return 1;
49e4877c
PA
22407 }
22408 return 0;
22409
6ec2e0f5
SDJ
22410 ;
22411 return 0;
22412}
22413_ACEOF
22414if ac_fn_c_try_run "$LINENO"; then :
22415 gl_cv_C_locale_sans_EILSEQ=yes
22416else
22417 gl_cv_C_locale_sans_EILSEQ=no
22418fi
22419rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22420 conftest.$ac_objext conftest.beam conftest.$ac_ext
22421fi
22422
22423fi
22424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
22425$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
22426
22427 case "$gl_cv_func_mbrtowc_null_arg1" in
22428 *yes) ;;
22429 *)
22430$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
22431
22432 REPLACE_MBRTOWC=1
22433 ;;
22434 esac
22435 case "$gl_cv_func_mbrtowc_null_arg2" in
22436 *yes) ;;
22437 *)
22438$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
22439
22440 REPLACE_MBRTOWC=1
22441 ;;
22442 esac
22443 case "$gl_cv_func_mbrtowc_retval" in
22444 *yes) ;;
22445 *)
22446$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
22447
22448 REPLACE_MBRTOWC=1
22449 ;;
22450 esac
22451 case "$gl_cv_func_mbrtowc_nul_retval" in
22452 *yes) ;;
22453 *)
22454$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
22455
22456 REPLACE_MBRTOWC=1
22457 ;;
22458 esac
22459 case "$gl_cv_func_mbrtowc_empty_input" in
22460 *yes) ;;
22461 *)
22462$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
22463
22464 REPLACE_MBRTOWC=1
22465 ;;
22466 esac
22467 case $gl_cv_C_locale_sans_EILSEQ in
22468 *yes) ;;
22469 *)
22470$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
22471
22472 REPLACE_MBRTOWC=1
22473 ;;
22474 esac
22475 fi
22476 fi
22477
22478 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
22479
22480
22481
22482
22483
22484
22485
22486
22487 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
22488
22489
22490 :
22491
22492 fi
22493
22494
22495
22496
22497
22498 GNULIB_MBRTOWC=1
22499
22500
22501
22502
22503
22504$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
472fa5ee
SM
22518 :
22519
22520
22521
22522
22523
22524
22525 :
22526
22527
22528
22529
6ec2e0f5
SDJ
22530
22531 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
22532
22533
22534
22535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22536$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 22537if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
6ec2e0f5
SDJ
22538 $as_echo_n "(cached) " >&6
22539else
22540
22541 case "$host_os" in
22542 # Guess no on AIX and OSF/1.
22543 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22544 # Guess yes otherwise.
22545 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22546 esac
22547 if test $LOCALE_JA != none; then
22548 if test "$cross_compiling" = yes; then :
22549 :
22550else
22551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22552/* end confdefs.h. */
22553
22554#include <locale.h>
22555#include <string.h>
22556/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22557 <wchar.h>.
22558 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22559 included before <wchar.h>. */
22560#include <stddef.h>
22561#include <stdio.h>
22562#include <time.h>
22563#include <wchar.h>
22564int main ()
22565{
22566 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22567 {
22568 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22569 mbstate_t state;
22570 wchar_t wc;
22571
22572 memset (&state, '\0', sizeof (mbstate_t));
22573 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22574 if (mbsinit (&state))
5e8754f9 22575 return 1;
6ec2e0f5
SDJ
22576 }
22577 return 0;
22578}
22579_ACEOF
22580if ac_fn_c_try_run "$LINENO"; then :
22581 gl_cv_func_mbrtowc_incomplete_state=yes
22582else
22583 gl_cv_func_mbrtowc_incomplete_state=no
22584fi
22585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22586 conftest.$ac_objext conftest.beam conftest.$ac_ext
22587fi
22588
22589 fi
22590
22591fi
22592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22593$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22594
22595
22596
22597
22598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22599$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 22600if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
6ec2e0f5
SDJ
22601 $as_echo_n "(cached) " >&6
22602else
22603
22604 case "$host_os" in
22605 # Guess no on Solaris 8.
22606 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22607 # Guess yes otherwise.
22608 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22609 esac
22610 if test $LOCALE_ZH_CN != none; then
22611 if test "$cross_compiling" = yes; then :
22612 :
22613else
22614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22615/* end confdefs.h. */
22616
22617#include <locale.h>
22618#include <stdlib.h>
22619#include <string.h>
22620/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22621 <wchar.h>.
22622 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22623 included before <wchar.h>. */
22624#include <stddef.h>
22625#include <stdio.h>
22626#include <time.h>
22627#include <wchar.h>
22628int main ()
22629{
22630 /* This fails on Solaris 8:
22631 mbrtowc returns 2, and sets wc to 0x00F0.
22632 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
22633 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22634 {
22635 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22636 mbstate_t state;
22637 wchar_t wc;
22638
22639 memset (&state, '\0', sizeof (mbstate_t));
22640 if (mbrtowc (&wc, input + 3, 6, &state) != 4
22641 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 22642 return 1;
6ec2e0f5 22643 }
49e4877c
PA
22644 return 0;
22645}
22646_ACEOF
22647if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 22648 gl_cv_func_mbrtowc_sanitycheck=yes
49e4877c 22649else
6ec2e0f5 22650 gl_cv_func_mbrtowc_sanitycheck=no
49e4877c
PA
22651fi
22652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22653 conftest.$ac_objext conftest.beam conftest.$ac_ext
22654fi
22655
6ec2e0f5
SDJ
22656 fi
22657
49e4877c 22658fi
6ec2e0f5
SDJ
22659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22660$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
49e4877c 22661
6ec2e0f5
SDJ
22662 REPLACE_MBSTATE_T=0
22663 case "$gl_cv_func_mbrtowc_incomplete_state" in
22664 *yes) ;;
22665 *) REPLACE_MBSTATE_T=1 ;;
22666 esac
22667 case "$gl_cv_func_mbrtowc_sanitycheck" in
22668 *yes) ;;
22669 *) REPLACE_MBSTATE_T=1 ;;
22670 esac
22671 else
22672 REPLACE_MBSTATE_T=1
22673 fi
8690e634 22674
8690e634 22675
8690e634 22676
472fa5ee
SM
22677 :
22678
22679
22680
22681
22682
6ec2e0f5
SDJ
22683 if test $ac_cv_func_mbsinit = no; then
22684 HAVE_MBSINIT=0
22685 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
22686/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22687 <wchar.h>.
22688 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22689 included before <wchar.h>. */
22690#include <stddef.h>
22691#include <stdio.h>
22692#include <time.h>
22693#include <wchar.h>
8690e634 22694
6ec2e0f5 22695"
d0ac1c44 22696if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
6ec2e0f5
SDJ
22697 ac_have_decl=1
22698else
22699 ac_have_decl=0
22700fi
4a626d0a 22701
6ec2e0f5
SDJ
22702cat >>confdefs.h <<_ACEOF
22703#define HAVE_DECL_MBSINIT $ac_have_decl
22704_ACEOF
49e4877c 22705
6ec2e0f5
SDJ
22706 if test $ac_cv_have_decl_mbsinit = yes; then
22707 REPLACE_MBSINIT=1
22708 fi
22709 else
22710 if test $REPLACE_MBSTATE_T = 1; then
22711 REPLACE_MBSINIT=1
22712 else
22713 case "$host_os" in
22714 mingw*) REPLACE_MBSINIT=1 ;;
8690e634 22715 esac
c971b7fa
PA
22716 fi
22717 fi
22718
6ec2e0f5 22719 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
c971b7fa 22720
c971b7fa 22721
c971b7fa
PA
22722
22723
22724
22725
22726
22727
6ec2e0f5 22728 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
8690e634
JK
22729
22730
22731 :
c971b7fa 22732
a512b375 22733 fi
c971b7fa 22734
8690e634
JK
22735
22736
22737
22738
6ec2e0f5 22739 GNULIB_MBSINIT=1
8690e634
JK
22740
22741
22742
22743
8690e634 22744
6ec2e0f5 22745$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
8690e634
JK
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
c971b7fa 22757
472fa5ee
SM
22758 :
22759
22760
22761
22762
22763
22764
22765 :
22766
22767
22768
22769
c971b7fa 22770
8690e634 22771 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa 22772
8690e634
JK
22773
22774
22775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22776$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 22777if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
8690e634
JK
22778 $as_echo_n "(cached) " >&6
22779else
22780
22781 case "$host_os" in
22782 # Guess no on AIX and OSF/1.
22783 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22784 # Guess yes otherwise.
22785 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22786 esac
22787 if test $LOCALE_JA != none; then
22788 if test "$cross_compiling" = yes; then :
22789 :
c971b7fa
PA
22790else
22791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22792/* end confdefs.h. */
22793
8690e634
JK
22794#include <locale.h>
22795#include <string.h>
22796/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22797 <wchar.h>.
22798 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22799 included before <wchar.h>. */
22800#include <stddef.h>
22801#include <stdio.h>
22802#include <time.h>
22803#include <wchar.h>
22804int main ()
c971b7fa 22805{
8690e634 22806 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
c971b7fa 22807 {
8690e634
JK
22808 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22809 mbstate_t state;
22810 wchar_t wc;
22811
22812 memset (&state, '\0', sizeof (mbstate_t));
22813 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22814 if (mbsinit (&state))
5e8754f9 22815 return 1;
c971b7fa 22816 }
c971b7fa
PA
22817 return 0;
22818}
22819_ACEOF
22820if ac_fn_c_try_run "$LINENO"; then :
8690e634 22821 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 22822else
8690e634 22823 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa
PA
22824fi
22825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22826 conftest.$ac_objext conftest.beam conftest.$ac_ext
22827fi
22828
8690e634 22829 fi
c971b7fa
PA
22830
22831fi
8690e634
JK
22832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22833$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa
PA
22834
22835
c971b7fa
PA
22836
22837
8690e634
JK
22838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22839$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 22840if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
22841 $as_echo_n "(cached) " >&6
22842else
8690e634
JK
22843
22844 case "$host_os" in
22845 # Guess no on Solaris 8.
22846 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22847 # Guess yes otherwise.
22848 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22849 esac
22850 if test $LOCALE_ZH_CN != none; then
22851 if test "$cross_compiling" = yes; then :
22852 :
22853else
c971b7fa
PA
22854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22855/* end confdefs.h. */
8690e634
JK
22856
22857#include <locale.h>
22858#include <stdlib.h>
22859#include <string.h>
22860/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22861 <wchar.h>.
22862 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22863 included before <wchar.h>. */
c971b7fa 22864#include <stddef.h>
8690e634
JK
22865#include <stdio.h>
22866#include <time.h>
22867#include <wchar.h>
22868int main ()
c971b7fa 22869{
8690e634
JK
22870 /* This fails on Solaris 8:
22871 mbrtowc returns 2, and sets wc to 0x00F0.
22872 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
22873 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22874 {
22875 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22876 mbstate_t state;
22877 wchar_t wc;
22878
22879 memset (&state, '\0', sizeof (mbstate_t));
22880 if (mbrtowc (&wc, input + 3, 6, &state) != 4
22881 && mbtowc (&wc, input + 3, 6) == 4)
5e8754f9 22882 return 1;
8690e634 22883 }
c971b7fa
PA
22884 return 0;
22885}
22886_ACEOF
8690e634
JK
22887if ac_fn_c_try_run "$LINENO"; then :
22888 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 22889else
8690e634 22890 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 22891fi
8690e634
JK
22892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22893 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 22894fi
c971b7fa 22895
8690e634
JK
22896 fi
22897
22898fi
22899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22900$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
c971b7fa 22901
8690e634
JK
22902 REPLACE_MBSTATE_T=0
22903 case "$gl_cv_func_mbrtowc_incomplete_state" in
22904 *yes) ;;
22905 *) REPLACE_MBSTATE_T=1 ;;
22906 esac
22907 case "$gl_cv_func_mbrtowc_sanitycheck" in
22908 *yes) ;;
22909 *) REPLACE_MBSTATE_T=1 ;;
22910 esac
22911 else
22912 REPLACE_MBSTATE_T=1
c971b7fa
PA
22913 fi
22914
c971b7fa 22915
8690e634 22916
472fa5ee
SM
22917 :
22918
22919
22920
22921
22922
6ec2e0f5
SDJ
22923 if test $ac_cv_func_mbsrtowcs = no; then
22924 HAVE_MBSRTOWCS=0
22925 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
8690e634
JK
22926/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22927 <wchar.h>.
22928 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22929 included before <wchar.h>. */
22930#include <stddef.h>
22931#include <stdio.h>
22932#include <time.h>
22933#include <wchar.h>
22934
22935"
d0ac1c44 22936if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
8690e634
JK
22937 ac_have_decl=1
22938else
22939 ac_have_decl=0
c971b7fa 22940fi
c971b7fa 22941
8690e634 22942cat >>confdefs.h <<_ACEOF
6ec2e0f5 22943#define HAVE_DECL_MBSRTOWCS $ac_have_decl
c971b7fa 22944_ACEOF
c971b7fa 22945
6ec2e0f5
SDJ
22946 if test $ac_cv_have_decl_mbsrtowcs = yes; then
22947 REPLACE_MBSRTOWCS=1
8690e634
JK
22948 fi
22949 else
22950 if test $REPLACE_MBSTATE_T = 1; then
6ec2e0f5 22951 REPLACE_MBSRTOWCS=1
8690e634 22952 else
6ec2e0f5
SDJ
22953
22954
22955
22956
22957
22958
22959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
22960$as_echo_n "checking whether mbsrtowcs works... " >&6; }
d0ac1c44 22961if ${gl_cv_func_mbsrtowcs_works+:} false; then :
6ec2e0f5
SDJ
22962 $as_echo_n "(cached) " >&6
22963else
22964
22965 case "$host_os" in
22966 # Guess no on HP-UX, Solaris, mingw.
22967 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
22968 # Guess yes otherwise.
22969 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
22970 esac
22971 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
22972 if test "$cross_compiling" = yes; then :
22973 :
22974else
22975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22976/* end confdefs.h. */
22977
22978#include <locale.h>
22979#include <string.h>
22980/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22981 <wchar.h>.
22982 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22983 included before <wchar.h>. */
22984#include <stddef.h>
22985#include <stdio.h>
22986#include <time.h>
22987#include <wchar.h>
22988int main ()
22989{
22990 int result = 0;
22991 /* Test whether the function supports a NULL destination argument.
22992 This fails on native Windows. */
22993 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
22994 {
22995 const char input[] = "\337er";
22996 const char *src = input;
22997 mbstate_t state;
22998
22999 memset (&state, '\0', sizeof (mbstate_t));
23000 if (mbsrtowcs (NULL, &src, 1, &state) != 3
23001 || src != input)
23002 result |= 1;
23003 }
23004 /* Test whether the function works when started with a conversion state
23005 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
23006 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23007 {
23008 const char input[] = "B\303\274\303\237er";
23009 mbstate_t state;
23010
23011 memset (&state, '\0', sizeof (mbstate_t));
23012 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23013 if (!mbsinit (&state))
23014 {
23015 const char *src = input + 2;
23016 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23017 result |= 2;
23018 }
23019 }
23020 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23021 {
23022 const char input[] = "<\306\374\313\334\270\354>";
23023 mbstate_t state;
23024
23025 memset (&state, '\0', sizeof (mbstate_t));
23026 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
23027 if (!mbsinit (&state))
23028 {
23029 const char *src = input + 4;
23030 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
23031 result |= 4;
23032 }
23033 }
23034 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23035 {
23036 const char input[] = "B\250\271\201\060\211\070er";
23037 mbstate_t state;
23038
23039 memset (&state, '\0', sizeof (mbstate_t));
23040 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23041 if (!mbsinit (&state))
23042 {
23043 const char *src = input + 2;
23044 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23045 result |= 8;
23046 }
23047 }
23048 return result;
23049}
23050_ACEOF
23051if ac_fn_c_try_run "$LINENO"; then :
23052 gl_cv_func_mbsrtowcs_works=yes
23053else
23054 gl_cv_func_mbsrtowcs_works=no
23055fi
23056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23057 conftest.$ac_objext conftest.beam conftest.$ac_ext
23058fi
23059
23060 fi
23061
23062fi
23063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
23064$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
23065
23066 case "$gl_cv_func_mbsrtowcs_works" in
23067 *yes) ;;
23068 *) REPLACE_MBSRTOWCS=1 ;;
8690e634
JK
23069 esac
23070 fi
23071 fi
c971b7fa 23072
6ec2e0f5 23073 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
c971b7fa
PA
23074
23075
23076
23077
23078
23079
23080
23081
6ec2e0f5
SDJ
23082 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
c971b7fa
PA
23093
23094
8690e634 23095 :
c971b7fa 23096
a512b375 23097 fi
c971b7fa 23098
c971b7fa 23099
c971b7fa 23100
c971b7fa
PA
23101
23102
6ec2e0f5 23103 GNULIB_MBSRTOWCS=1
c971b7fa 23104
c971b7fa
PA
23105
23106
23107
23108
6ec2e0f5 23109$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
c971b7fa
PA
23110
23111
c971b7fa 23112
c971b7fa 23113
6ec2e0f5 23114 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
c971b7fa
PA
23115
23116
23117
c971b7fa 23118
c971b7fa
PA
23119
23120
23121
23122
6ec2e0f5 23123 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
8690e634 23124
c971b7fa 23125
6ec2e0f5
SDJ
23126 for ac_header in bp-sym.h
23127do :
23128 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
d0ac1c44 23129if test "x$ac_cv_header_bp_sym_h" = xyes; then :
6ec2e0f5
SDJ
23130 cat >>confdefs.h <<_ACEOF
23131#define HAVE_BP_SYM_H 1
23132_ACEOF
c971b7fa 23133
6ec2e0f5 23134fi
c971b7fa 23135
6ec2e0f5
SDJ
23136done
23137
23138
23139 fi
23140
23141
23142
23143
23144
23145 GNULIB_MEMCHR=1
23146
23147
23148
23149
23150
23151$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
23152
23153
23154
23155
23156
23157 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
23158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
23159$as_echo_n "checking whether memmem works in linear time... " >&6; }
d0ac1c44 23160if ${gl_cv_func_memmem_works_fast+:} false; then :
8690e634
JK
23161 $as_echo_n "(cached) " >&6
23162else
6ec2e0f5
SDJ
23163 if test "$cross_compiling" = yes; then :
23164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23165/* end confdefs.h. */
23166
23167#include <features.h>
23168#ifdef __GNU_LIBRARY__
23169 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
23170 && !defined __UCLIBC__
23171 Lucky user
23172 #endif
23173#endif
23174#ifdef __CYGWIN__
23175 #include <cygwin/version.h>
23176 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
23177 Lucky user
23178 #endif
23179#endif
23180
23181_ACEOF
23182if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23183 $EGREP "Lucky user" >/dev/null 2>&1; then :
23184 gl_cv_func_memmem_works_fast="guessing yes"
23185else
23186 gl_cv_func_memmem_works_fast="guessing no"
23187fi
23188rm -f conftest*
23189
c971b7fa 23190
8690e634
JK
23191else
23192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 23193/* end confdefs.h. */
c971b7fa 23194
6ec2e0f5
SDJ
23195#include <signal.h> /* for signal */
23196#include <string.h> /* for memmem */
23197#include <stdlib.h> /* for malloc */
23198#include <unistd.h> /* for alarm */
23199static void quit (int sig) { _exit (sig + 128); }
23200
23201int
23202main ()
8690e634 23203{
8690e634 23204
6ec2e0f5
SDJ
23205 int result = 0;
23206 size_t m = 1000000;
23207 char *haystack = (char *) malloc (2 * m + 1);
23208 char *needle = (char *) malloc (m + 1);
23209 /* Failure to compile this test due to missing alarm is okay,
23210 since all such platforms (mingw) also lack memmem. */
23211 signal (SIGALRM, quit);
23212 alarm (5);
23213 /* Check for quadratic performance. */
23214 if (haystack && needle)
23215 {
23216 memset (haystack, 'A', 2 * m);
23217 haystack[2 * m] = 'B';
23218 memset (needle, 'A', m);
23219 needle[m] = 'B';
23220 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
23221 result |= 1;
23222 }
23223 return result;
23224
23225 ;
c971b7fa
PA
23226 return 0;
23227}
23228_ACEOF
8690e634 23229if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 23230 gl_cv_func_memmem_works_fast=yes
8690e634 23231else
6ec2e0f5 23232 gl_cv_func_memmem_works_fast=no
8690e634
JK
23233fi
23234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23235 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 23236fi
c971b7fa
PA
23237
23238
8690e634 23239fi
6ec2e0f5
SDJ
23240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
23241$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
23242 case "$gl_cv_func_memmem_works_fast" in
23243 *yes) ;;
23244 *)
23245 REPLACE_MEMMEM=1
23246 ;;
23247 esac
23248 fi
c971b7fa 23249
6ec2e0f5 23250 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
8690e634
JK
23251
23252
23253
6ec2e0f5
SDJ
23254
23255
23256
23257
23258
23259 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
23260
23261 fi
23262
23263
23264
23265
23266 for ac_func in memmem
23267do :
23268 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 23269if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
23270 cat >>confdefs.h <<_ACEOF
23271#define HAVE_MEMMEM 1
23272_ACEOF
23273
23274fi
23275done
23276
23277 if test $ac_cv_func_memmem = yes; then
23278 HAVE_MEMMEM=1
23279 else
23280 HAVE_MEMMEM=0
23281 fi
23282
472fa5ee
SM
23283 :
23284
23285
23286
23287
23288
6ec2e0f5
SDJ
23289 if test $ac_cv_have_decl_memmem = no; then
23290 HAVE_DECL_MEMMEM=0
23291 else
23292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
23293$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 23294if ${gl_cv_func_memmem_works_always+:} false; then :
c971b7fa
PA
23295 $as_echo_n "(cached) " >&6
23296else
6ec2e0f5
SDJ
23297 if test "$cross_compiling" = yes; then :
23298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23299/* end confdefs.h. */
23300
23301#ifdef __GNU_LIBRARY__
23302 #include <features.h>
23303 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
23304 || __GLIBC_MINOR__ > 12)) \
23305 || (__GLIBC__ > 2)) \
23306 || defined __UCLIBC__
23307 Lucky user
23308 #endif
23309#elif defined __CYGWIN__
23310 #include <cygwin/version.h>
23311 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
23312 Lucky user
23313 #endif
23314#else
23315 Lucky user
23316#endif
23317
23318_ACEOF
23319if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23320 $EGREP "Lucky user" >/dev/null 2>&1; then :
23321 gl_cv_func_memmem_works_always="guessing yes"
23322else
23323 gl_cv_func_memmem_works_always="guessing no"
23324fi
23325rm -f conftest*
23326
8690e634 23327
8690e634 23328else
c971b7fa
PA
23329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23330/* end confdefs.h. */
c971b7fa 23331
6ec2e0f5
SDJ
23332#include <string.h> /* for memmem */
23333#define P "_EF_BF_BD"
23334#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
23335#define NEEDLE P P P P P
23336
23337int
23338main ()
c971b7fa 23339{
8690e634 23340
6ec2e0f5
SDJ
23341 int result = 0;
23342 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
23343 result |= 1;
23344 /* Check for empty needle behavior. */
23345 {
23346 const char *haystack = "AAA";
23347 if (memmem (haystack, 3, NULL, 0) != haystack)
23348 result |= 2;
8690e634 23349 }
6ec2e0f5
SDJ
23350 return result;
23351
23352 ;
c971b7fa
PA
23353 return 0;
23354}
23355_ACEOF
8690e634 23356if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 23357 gl_cv_func_memmem_works_always=yes
c971b7fa 23358else
6ec2e0f5 23359 gl_cv_func_memmem_works_always=no
c971b7fa 23360fi
8690e634
JK
23361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23362 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 23363fi
8690e634 23364
8690e634
JK
23365
23366fi
6ec2e0f5
SDJ
23367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
23368$as_echo "$gl_cv_func_memmem_works_always" >&6; }
23369 case "$gl_cv_func_memmem_works_always" in
8690e634 23370 *yes) ;;
6ec2e0f5
SDJ
23371 *)
23372 REPLACE_MEMMEM=1
23373 ;;
8690e634 23374 esac
c971b7fa 23375 fi
6ec2e0f5 23376 :
c971b7fa 23377
6ec2e0f5 23378 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
c971b7fa 23379
c971b7fa 23380
8690e634 23381
c971b7fa 23382
6ec2e0f5
SDJ
23383
23384
23385
23386
23387 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
23388
23389 fi
23390
23391
23392
23393
23394
23395 GNULIB_MEMMEM=1
23396
23397
23398
23399
23400
23401$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
23402
23403
23404
23405
23406
23407
23408
23409
23410
23411 for ac_func in mempcpy
23412do :
23413 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
d0ac1c44 23414if test "x$ac_cv_func_mempcpy" = xyes; then :
6ec2e0f5
SDJ
23415 cat >>confdefs.h <<_ACEOF
23416#define HAVE_MEMPCPY 1
8690e634 23417_ACEOF
c971b7fa 23418
6ec2e0f5
SDJ
23419fi
23420done
c971b7fa 23421
6ec2e0f5
SDJ
23422 if test $ac_cv_func_mempcpy = no; then
23423 HAVE_MEMPCPY=0
23424 fi
8690e634 23425
6ec2e0f5 23426 if test $HAVE_MEMPCPY = 0; then
8690e634
JK
23427
23428
23429
23430
8690e634 23431
6ec2e0f5
SDJ
23432
23433
23434
23435 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
23436
23437
8690e634 23438 :
c971b7fa 23439
6ec2e0f5 23440 fi
c971b7fa 23441
8690e634 23442
8690e634 23443
8690e634 23444
6ec2e0f5
SDJ
23445
23446 GNULIB_MEMPCPY=1
23447
23448
23449
23450
23451
23452$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
23453
23454
23455
23456
23457
23458
23459
23460
472fa5ee
SM
23461 :
23462
23463
23464
23465
23466
6ec2e0f5
SDJ
23467 if test $ac_cv_have_decl_memrchr = no; then
23468 HAVE_DECL_MEMRCHR=0
23469 fi
23470
23471 for ac_func in memrchr
23472do :
23473 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
d0ac1c44 23474if test "x$ac_cv_func_memrchr" = xyes; then :
6ec2e0f5
SDJ
23475 cat >>confdefs.h <<_ACEOF
23476#define HAVE_MEMRCHR 1
c971b7fa 23477_ACEOF
6ec2e0f5 23478
c971b7fa 23479fi
6ec2e0f5 23480done
8690e634 23481
8690e634 23482
6ec2e0f5 23483 if test $ac_cv_func_memrchr = no; then
8690e634 23484
6ec2e0f5
SDJ
23485
23486
23487
23488
23489
23490
23491
23492 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
23493
23494 :
c971b7fa
PA
23495 fi
23496
23497
c971b7fa 23498
c971b7fa 23499
c971b7fa 23500
6ec2e0f5
SDJ
23501 GNULIB_MEMRCHR=1
23502
23503
23504
23505
23506
23507$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
23508
23509
23510
23511
2d8adcbd 23512
8a99096f
SM
23513 :
23514
23515
23516
23517
23518
23519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
23520$as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
23521if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
23522 $as_echo_n "(cached) " >&6
23523else
23524 rm -rf conftest.dir
23525 if test "$cross_compiling" = yes; then :
23526 case "$host_os" in
5e8754f9
SDJ
23527 # Guess yes on glibc systems.
23528 *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
23529 # If we don't know, assume the worst.
23530 *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
8a99096f
SM
23531 esac
23532
23533else
23534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23535/* end confdefs.h. */
23536
23537# include <sys/types.h>
23538# include <sys/stat.h>
23539
23540int
23541main ()
23542{
23543return mkdir ("conftest.dir/", 0700);
23544 ;
23545 return 0;
23546}
23547_ACEOF
23548if ac_fn_c_try_run "$LINENO"; then :
23549 gl_cv_func_mkdir_trailing_slash_works=yes
23550else
23551 gl_cv_func_mkdir_trailing_slash_works=no
23552fi
23553rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23554 conftest.$ac_objext conftest.beam conftest.$ac_ext
23555fi
23556
23557 rm -rf conftest.dir
23558
23559
23560fi
23561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
23562$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
23563 case "$gl_cv_func_mkdir_trailing_slash_works" in
23564 *yes) ;;
23565 *)
23566 REPLACE_MKDIR=1
23567 ;;
23568 esac
23569
23570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
23571$as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
23572if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
23573 $as_echo_n "(cached) " >&6
23574else
23575 rm -rf conftest.dir
23576 if test "$cross_compiling" = yes; then :
23577 case "$host_os" in
5e8754f9
SDJ
23578 # Guess yes on glibc systems.
23579 *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
23580 # If we don't know, assume the worst.
23581 *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
8a99096f
SM
23582 esac
23583
23584else
23585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23586/* end confdefs.h. */
23587
23588# include <sys/types.h>
23589# include <sys/stat.h>
23590
23591int
23592main ()
23593{
23594return !mkdir ("conftest.dir/./", 0700);
23595 ;
23596 return 0;
23597}
23598_ACEOF
23599if ac_fn_c_try_run "$LINENO"; then :
23600 gl_cv_func_mkdir_trailing_dot_works=yes
23601else
23602 gl_cv_func_mkdir_trailing_dot_works=no
23603fi
23604rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23605 conftest.$ac_objext conftest.beam conftest.$ac_ext
23606fi
23607
23608 rm -rf conftest.dir
23609
23610
23611fi
23612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
23613$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
23614 case "$gl_cv_func_mkdir_trailing_dot_works" in
23615 *yes) ;;
23616 *)
23617 REPLACE_MKDIR=1
23618
23619$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
23620
23621 ;;
23622 esac
23623
23624 if test $REPLACE_MKDIR = 1; then
23625
23626
23627
23628
23629
23630
23631
23632
23633 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
23634
23635 fi
23636
23637
e8d8cce6
SM
23638 for ac_func in mkdtemp
23639do :
23640 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
23641if test "x$ac_cv_func_mkdtemp" = xyes; then :
23642 cat >>confdefs.h <<_ACEOF
23643#define HAVE_MKDTEMP 1
23644_ACEOF
23645
23646fi
23647done
23648
23649 if test $ac_cv_func_mkdtemp = no; then
23650 HAVE_MKDTEMP=0
23651 fi
23652
23653 if test $HAVE_MKDTEMP = 0; then
23654
23655
23656
23657
23658
23659
23660
23661
23662 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
23663
23664 :
23665
23666 fi
23667
23668
23669
23670
23671
23672 GNULIB_MKDTEMP=1
23673
23674
23675
23676
23677
23678$as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
23679
23680
23681
23682
23683
2d8adcbd
MM
23684
23685
b3279b60
TT
23686
23687
472fa5ee
SM
23688 :
23689
23690
23691
23692
23693
b3279b60
TT
23694 if test $ac_cv_func_mkostemp != yes; then
23695 HAVE_MKOSTEMP=0
23696 fi
2d8adcbd 23697
b3279b60 23698 if test $HAVE_MKOSTEMP = 0; then
2d8adcbd 23699
2d8adcbd 23700
2d8adcbd 23701
2d8adcbd 23702
2d8adcbd
MM
23703
23704
23705
23706
b3279b60 23707 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
2d8adcbd
MM
23708
23709
23710
b3279b60 23711 fi
2d8adcbd 23712
2d8adcbd 23713
b3279b60
TT
23714cat >>confdefs.h <<_ACEOF
23715#define GNULIB_MKOSTEMP 1
23716_ACEOF
2d8adcbd
MM
23717
23718
2d8adcbd
MM
23719
23720
23721
23722
23723
b3279b60 23724 GNULIB_MKOSTEMP=1
2d8adcbd
MM
23725
23726
23727
23728
23729
b3279b60 23730$as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
2d8adcbd
MM
23731
23732
23733
23734
6ec2e0f5
SDJ
23735 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
23736
23737
23738
c971b7fa 23739
c971b7fa 23740
c971b7fa
PA
23741
23742
8690e634 23743
6ec2e0f5 23744 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
8690e634 23745
6ec2e0f5 23746 fi
8690e634 23747
6ec2e0f5 23748 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
8690e634
JK
23749
23750
23751
23752
23753
23754
8690e634
JK
23755
23756
6ec2e0f5 23757 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
8690e634 23758
a512b375 23759 fi
8690e634
JK
23760
23761
725e2999
JB
23762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
23763$as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
23764if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
23765 $as_echo_n "(cached) " >&6
23766else
23767
23768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23769/* end confdefs.h. */
23770#include <netinet/in.h>
23771int
23772main ()
23773{
23774
23775 ;
23776 return 0;
23777}
23778_ACEOF
23779if ac_fn_c_try_compile "$LINENO"; then :
23780 gl_cv_header_netinet_in_h_selfcontained=yes
23781else
23782 gl_cv_header_netinet_in_h_selfcontained=no
23783fi
23784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23785
23786fi
23787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
23788$as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
23789 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
23790 NETINET_IN_H=''
23791 else
23792 NETINET_IN_H='netinet/in.h'
23793 for ac_header in netinet/in.h
23794do :
23795 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
23796if test "x$ac_cv_header_netinet_in_h" = xyes; then :
23797 cat >>confdefs.h <<_ACEOF
23798#define HAVE_NETINET_IN_H 1
23799_ACEOF
23800
23801fi
23802
23803done
23804
23805
23806
23807
23808
23809
23810
23811 :
23812
23813
23814
23815
23816
23817
23818
23819
23820 if test $gl_cv_have_include_next = yes; then
23821 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
23822 else
23823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
23824$as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
23825if ${gl_cv_next_netinet_in_h+:} false; then :
23826 $as_echo_n "(cached) " >&6
23827else
23828
23829 if test $ac_cv_header_netinet_in_h = yes; then
23830
23831
23832
23833
23834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23835/* end confdefs.h. */
23836#include <netinet/in.h>
23837_ACEOF
23838 case "$host_os" in
23839 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23840 *) gl_absname_cpp="$ac_cpp" ;;
23841 esac
23842
23843 case "$host_os" in
23844 mingw*)
23845 gl_dirsep_regex='[/\\]'
23846 ;;
23847 *)
23848 gl_dirsep_regex='\/'
23849 ;;
23850 esac
23851 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23852 gl_header_literal_regex=`echo 'netinet/in.h' \
23853 | sed -e "$gl_make_literal_regex_sed"`
23854 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23855 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23856 s|^/[^/]|//&|
23857 p
23858 q
23859 }'
23860
23861 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23862 sed -n "$gl_absolute_header_sed"`
23863
23864 gl_header=$gl_cv_absolute_netinet_in_h
23865 gl_cv_next_netinet_in_h='"'$gl_header'"'
23866 else
23867 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
23868 fi
23869
23870
23871fi
23872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
23873$as_echo "$gl_cv_next_netinet_in_h" >&6; }
23874 fi
23875 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
23876
23877 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23878 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23879 gl_next_as_first_directive='<'netinet/in.h'>'
23880 else
23881 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23882 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
23883 fi
23884 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
23885
23886
23887
23888
23889 if test $ac_cv_header_netinet_in_h = yes; then
23890 HAVE_NETINET_IN_H=1
23891 else
23892 HAVE_NETINET_IN_H=0
23893 fi
23894
23895 fi
23896
23897 if test -n "$NETINET_IN_H"; then
23898 GL_GENERATE_NETINET_IN_H_TRUE=
23899 GL_GENERATE_NETINET_IN_H_FALSE='#'
23900else
23901 GL_GENERATE_NETINET_IN_H_TRUE='#'
23902 GL_GENERATE_NETINET_IN_H_FALSE=
23903fi
23904
23905
23906
23907
8690e634 23908
6ec2e0f5
SDJ
23909 case "$host_os" in
23910 mingw* | pw*)
23911 REPLACE_OPEN=1
23912 ;;
23913 *)
23914
472fa5ee
SM
23915 :
23916
23917
23918
23919
23920
6ec2e0f5
SDJ
23921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
23922$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
d0ac1c44 23923if ${gl_cv_func_open_slash+:} false; then :
6ec2e0f5
SDJ
23924 $as_echo_n "(cached) " >&6
23925else
23926 # Assume that if we have lstat, we can also check symlinks.
23927 if test $ac_cv_func_lstat = yes; then
23928 touch conftest.tmp
23929 ln -s conftest.tmp conftest.lnk
23930 fi
23931 if test "$cross_compiling" = yes; then :
8690e634 23932
6ec2e0f5
SDJ
23933 case "$host_os" in
23934 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
23935 gl_cv_func_open_slash="guessing no" ;;
23936 *)
23937 gl_cv_func_open_slash="guessing yes" ;;
23938 esac
8690e634 23939
6ec2e0f5
SDJ
23940else
23941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23942/* end confdefs.h. */
23943
23944#include <fcntl.h>
23945#if HAVE_UNISTD_H
23946# include <unistd.h>
23947#endif
23948int main ()
23949{
23950 int result = 0;
23951#if HAVE_LSTAT
23952 if (open ("conftest.lnk/", O_RDONLY) != -1)
23953 result |= 1;
23954#endif
23955 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
23956 result |= 2;
23957 return result;
23958}
23959_ACEOF
23960if ac_fn_c_try_run "$LINENO"; then :
23961 gl_cv_func_open_slash=yes
23962else
23963 gl_cv_func_open_slash=no
23964fi
23965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23966 conftest.$ac_objext conftest.beam conftest.$ac_ext
23967fi
8690e634 23968
6ec2e0f5 23969 rm -f conftest.sl conftest.tmp conftest.lnk
8690e634 23970
6ec2e0f5
SDJ
23971fi
23972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
23973$as_echo "$gl_cv_func_open_slash" >&6; }
23974 case "$gl_cv_func_open_slash" in
23975 *no)
8690e634 23976
6ec2e0f5 23977$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
8690e634 23978
6ec2e0f5
SDJ
23979 REPLACE_OPEN=1
23980 ;;
23981 esac
23982 ;;
23983 esac
8690e634 23984
6ec2e0f5 23985 if test $REPLACE_OPEN = 0; then
c971b7fa
PA
23986
23987
23988
472fa5ee
SM
23989 :
23990
23991
23992
23993
23994
6ec2e0f5
SDJ
23995 if test $ac_cv_func_fchdir = no; then
23996 HAVE_FCHDIR=0
23997 fi
c971b7fa 23998
6ec2e0f5
SDJ
23999 if test $HAVE_FCHDIR = 0; then
24000 REPLACE_OPEN=1
24001 fi
24002 fi
c971b7fa
PA
24003
24004
24005
6ec2e0f5 24006 if test $REPLACE_OPEN = 1; then
c971b7fa
PA
24007
24008
24009
24010
24011
c971b7fa
PA
24012
24013
c971b7fa 24014
6ec2e0f5 24015 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
c971b7fa 24016
c971b7fa
PA
24017
24018
6ec2e0f5
SDJ
24019 :
24020
a512b375 24021 fi
c971b7fa
PA
24022
24023
24024
24025
24026
6ec2e0f5 24027 GNULIB_OPEN=1
c971b7fa
PA
24028
24029
24030
24031
24032
6ec2e0f5 24033$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
c971b7fa
PA
24034
24035
24036
24037
24038
c971b7fa 24039
c971b7fa 24040
472fa5ee
SM
24041 :
24042
24043
24044
24045
24046
63ce7108 24047
5e8754f9
SDJ
24048 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
24049 yes+*yes)
6ec2e0f5
SDJ
24050 ;;
24051 yes+*)
24052 # Solaris 9 has *at functions, but uniformly mishandles trailing
24053 # slash in all of them.
24054 REPLACE_OPENAT=1
24055 ;;
24056 *)
24057 HAVE_OPENAT=0
24058 ;;
24059 esac
63ce7108 24060
6ec2e0f5 24061 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
63ce7108 24062
63ce7108 24063
63ce7108 24064
63ce7108 24065
63ce7108
TT
24066
24067
63ce7108 24068
63ce7108 24069
6ec2e0f5 24070 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
63ce7108
TT
24071
24072
24073
6ec2e0f5 24074 :
63ce7108 24075
6ec2e0f5 24076 fi
63ce7108
TT
24077
24078
6ec2e0f5
SDJ
24079cat >>confdefs.h <<_ACEOF
24080#define GNULIB_OPENAT 1
24081_ACEOF
63ce7108 24082
63ce7108 24083
63ce7108
TT
24084
24085
24086
24087
6ec2e0f5 24088 GNULIB_OPENAT=1
63ce7108 24089
63ce7108 24090
63ce7108 24091
63ce7108 24092
63ce7108 24093
6ec2e0f5 24094$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
63ce7108
TT
24095
24096
63ce7108 24097
63ce7108 24098
63ce7108 24099
63ce7108 24100
6ec2e0f5
SDJ
24101 for ac_func in opendir
24102do :
24103 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
d0ac1c44 24104if test "x$ac_cv_func_opendir" = xyes; then :
6ec2e0f5
SDJ
24105 cat >>confdefs.h <<_ACEOF
24106#define HAVE_OPENDIR 1
63ce7108 24107_ACEOF
6ec2e0f5 24108
63ce7108 24109fi
6ec2e0f5 24110done
63ce7108 24111
6ec2e0f5
SDJ
24112 if test $ac_cv_func_opendir = no; then
24113 HAVE_OPENDIR=0
24114 fi
63ce7108 24115
6ec2e0f5
SDJ
24116
24117
24118
472fa5ee
SM
24119 :
24120
24121
24122
24123
24124
6ec2e0f5
SDJ
24125 if test $ac_cv_func_fchdir = no; then
24126 HAVE_FCHDIR=0
63ce7108 24127 fi
63ce7108 24128
6ec2e0f5
SDJ
24129 if test $HAVE_FCHDIR = 0; then
24130 if test $HAVE_OPENDIR = 1; then
24131 REPLACE_OPENDIR=1
24132 fi
24133 fi
24134
24135 case $host_os,$HAVE_OPENDIR in
24136 os2*,1)
24137 REPLACE_OPENDIR=1;;
24138 esac
24139
24140 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
63ce7108
TT
24141
24142
24143
24144
24145
24146
24147
24148
6ec2e0f5 24149 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
63ce7108
TT
24150
24151 fi
24152
24153
24154
24155
24156
6ec2e0f5 24157 GNULIB_OPENDIR=1
63ce7108
TT
24158
24159
24160
24161
63ce7108 24162
6ec2e0f5 24163$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
63ce7108
TT
24164
24165
24166
24167
24168
472fa5ee
SM
24169 :
24170
24171
24172
24173
24174
63ce7108
TT
24175
24176
2196f55f
YQ
24177
24178
8424cc97
SM
24179
24180 for ac_func in rawmemchr
24181do :
24182 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
d0ac1c44 24183if test "x$ac_cv_func_rawmemchr" = xyes; then :
8424cc97
SM
24184 cat >>confdefs.h <<_ACEOF
24185#define HAVE_RAWMEMCHR 1
24186_ACEOF
24187
24188fi
24189done
24190
24191 if test $ac_cv_func_rawmemchr = no; then
24192 HAVE_RAWMEMCHR=0
24193 fi
24194
24195 if test $HAVE_RAWMEMCHR = 0; then
24196
24197
24198
24199
24200
24201
24202
24203
24204 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
24205
24206 :
24207 fi
24208
24209
24210
24211
24212
24213 GNULIB_RAWMEMCHR=1
24214
24215
24216
24217
24218
24219$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
24220
24221
24222
24223
24224
24225
6ec2e0f5
SDJ
24226 for ac_func in readdir
24227do :
24228 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
d0ac1c44 24229if test "x$ac_cv_func_readdir" = xyes; then :
6ec2e0f5
SDJ
24230 cat >>confdefs.h <<_ACEOF
24231#define HAVE_READDIR 1
24232_ACEOF
24233
24234fi
24235done
24236
24237 if test $ac_cv_func_readdir = no; then
24238 HAVE_READDIR=0
24239 fi
24240
24241 if test $HAVE_READDIR = 0; then
24242
24243
24244
24245
24246
24247
24248
24249
24250 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
24251
24252 fi
24253
24254
24255
24256
24257
24258 GNULIB_READDIR=1
24259
24260
24261
24262
24263
24264$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
24265
24266
24267
24268
24269
24270
472fa5ee
SM
24271 :
24272
24273
24274
24275
24276
2196f55f
YQ
24277 if test $ac_cv_func_readlink = no; then
24278 HAVE_READLINK=0
24279 else
24280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
24281$as_echo_n "checking whether readlink signature is correct... " >&6; }
d0ac1c44 24282if ${gl_cv_decl_readlink_works+:} false; then :
2196f55f
YQ
24283 $as_echo_n "(cached) " >&6
24284else
24285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24286/* end confdefs.h. */
24287#include <unistd.h>
24288 /* Cause compilation failure if original declaration has wrong type. */
24289 ssize_t readlink (const char *, char *, size_t);
24290int
24291main ()
24292{
24293
24294 ;
24295 return 0;
24296}
24297_ACEOF
24298if ac_fn_c_try_compile "$LINENO"; then :
24299 gl_cv_decl_readlink_works=yes
24300else
24301 gl_cv_decl_readlink_works=no
24302fi
24303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24304fi
24305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
24306$as_echo "$gl_cv_decl_readlink_works" >&6; }
24307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
24308$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
d0ac1c44 24309if ${gl_cv_func_readlink_works+:} false; then :
2196f55f
YQ
24310 $as_echo_n "(cached) " >&6
24311else
24312 # We have readlink, so assume ln -s works.
24313 ln -s conftest.no-such conftest.link
24314 ln -s conftest.link conftest.lnk2
24315 if test "$cross_compiling" = yes; then :
24316 case "$host_os" in
5e8754f9
SDJ
24317 # Guess yes on glibc systems.
24318 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
24319 # If we don't know, assume the worst.
24320 *) gl_cv_func_readlink_works="guessing no" ;;
2196f55f
YQ
24321 esac
24322
24323else
24324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24325/* end confdefs.h. */
24326#include <unistd.h>
24327
24328int
24329main ()
24330{
24331char buf[20];
24332 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
24333 ;
24334 return 0;
24335}
24336_ACEOF
24337if ac_fn_c_try_run "$LINENO"; then :
24338 gl_cv_func_readlink_works=yes
24339else
24340 gl_cv_func_readlink_works=no
24341fi
24342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24343 conftest.$ac_objext conftest.beam conftest.$ac_ext
24344fi
24345
24346 rm -f conftest.link conftest.lnk2
24347fi
24348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
24349$as_echo "$gl_cv_func_readlink_works" >&6; }
24350 case "$gl_cv_func_readlink_works" in
24351 *yes)
24352 if test "$gl_cv_decl_readlink_works" != yes; then
24353 REPLACE_READLINK=1
24354 fi
24355 ;;
24356 *)
24357
24358$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
24359
24360 REPLACE_READLINK=1
24361 ;;
24362 esac
24363 fi
24364
24365 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
24366
24367
24368
24369
24370
24371
24372
24373
24374 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
24375
24376
24377 :
24378
24379 fi
24380
24381
24382
24383
24384
24385 GNULIB_READLINK=1
24386
24387
24388
24389
24390
24391$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
24392
24393
24394
24395
6a29c58e
YQ
24396
24397
6ec2e0f5
SDJ
24398 if test $gl_cv_func_malloc_posix = yes; then
24399
24400$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
24401
24402 else
24403 REPLACE_REALLOC=1
24404 fi
24405
24406 if test $REPLACE_REALLOC = 1; then
24407
24408
24409
24410
24411
24412
24413
24414
24415 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
24416
24417 fi
24418
24419
24420
24421
24422
24423 GNULIB_REALLOC_POSIX=1
24424
24425
24426
24427
24428
24429$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
24430
24431
24432
24433
24434
24435
6a29c58e 24436
472fa5ee
SM
24437 :
24438
24439
24440
24441
24442
6a29c58e
YQ
24443
24444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
24445$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
d0ac1c44 24446if ${gl_cv_func_rename_slash_dst_works+:} false; then :
6a29c58e
YQ
24447 $as_echo_n "(cached) " >&6
24448else
24449 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
24450 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 24451 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
24452 # Assume that if we have lstat, we can also check symlinks.
24453 if test $ac_cv_func_lstat = yes; then
24454 ln -s conftest.f conftest.lnk
24455 fi
24456 if test "$cross_compiling" = yes; then :
24457 case "$host_os" in
5e8754f9
SDJ
24458 # Guess yes on glibc systems.
24459 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
24460 # If we don't know, assume the worst.
24461 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
6a29c58e
YQ
24462 esac
24463
24464else
24465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24466/* end confdefs.h. */
24467
24468# include <stdio.h>
24469# include <stdlib.h>
24470
24471int
24472main ()
24473{
24474int result = 0;
24475 if (rename ("conftest.f1", "conftest.f2/") == 0)
24476 result |= 1;
24477 if (rename ("conftest.d1", "conftest.d2/") != 0)
24478 result |= 2;
24479#if HAVE_LSTAT
24480 if (rename ("conftest.f", "conftest.lnk/") == 0)
24481 result |= 4;
24482#endif
24483 return result;
24484
24485 ;
24486 return 0;
24487}
24488_ACEOF
24489if ac_fn_c_try_run "$LINENO"; then :
24490 gl_cv_func_rename_slash_dst_works=yes
24491else
24492 gl_cv_func_rename_slash_dst_works=no
24493fi
24494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24495 conftest.$ac_objext conftest.beam conftest.$ac_ext
24496fi
24497
24498 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
24499
24500fi
24501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
24502$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
24503 case "$gl_cv_func_rename_slash_dst_works" in
24504 *yes) ;;
24505 *)
24506 REPLACE_RENAME=1
24507
24508$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
24509
24510 ;;
24511 esac
24512
24513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
24514$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
d0ac1c44 24515if ${gl_cv_func_rename_slash_src_works+:} false; then :
6a29c58e
YQ
24516 $as_echo_n "(cached) " >&6
24517else
24518 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
24519 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 24520 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
24521 # Assume that if we have lstat, we can also check symlinks.
24522 if test $ac_cv_func_lstat = yes; then
24523 ln -s conftest.f conftest.lnk
24524 fi
24525 if test "$cross_compiling" = yes; then :
24526 case "$host_os" in
5e8754f9
SDJ
24527 # Guess yes on glibc systems.
24528 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
24529 # If we don't know, assume the worst.
24530 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
6a29c58e
YQ
24531 esac
24532
24533else
24534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24535/* end confdefs.h. */
24536
24537# include <stdio.h>
24538# include <stdlib.h>
24539
24540int
24541main ()
24542{
24543int result = 0;
24544 if (rename ("conftest.f1/", "conftest.d3") == 0)
24545 result |= 1;
24546 if (rename ("conftest.d1/", "conftest.d2") != 0)
24547 result |= 2;
24548#if HAVE_LSTAT
24549 if (rename ("conftest.lnk/", "conftest.f") == 0)
24550 result |= 4;
24551#endif
24552 return result;
24553
24554 ;
24555 return 0;
24556}
24557_ACEOF
24558if ac_fn_c_try_run "$LINENO"; then :
24559 gl_cv_func_rename_slash_src_works=yes
24560else
24561 gl_cv_func_rename_slash_src_works=no
24562fi
24563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24564 conftest.$ac_objext conftest.beam conftest.$ac_ext
24565fi
24566
24567 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
24568
24569fi
24570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
24571$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
24572 case "$gl_cv_func_rename_slash_src_works" in
24573 *yes) ;;
24574 *)
24575 REPLACE_RENAME=1
24576
24577$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
24578
24579 ;;
24580 esac
24581
24582
472fa5ee
SM
24583 :
24584
24585
24586
24587
24588
6a29c58e
YQ
24589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
24590$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
d0ac1c44 24591if ${gl_cv_func_rename_link_works+:} false; then :
6a29c58e
YQ
24592 $as_echo_n "(cached) " >&6
24593else
24594 if test $ac_cv_func_link = yes; then
5e8754f9
SDJ
24595 rm -rf conftest.f conftest.f1
24596 if touch conftest.f && ln conftest.f conftest.f1 &&
6a29c58e
YQ
24597 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
24598 if test "$cross_compiling" = yes; then :
24599 case "$host_os" in
5e8754f9
SDJ
24600 # Guess yes on glibc systems.
24601 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
24602 # If we don't know, assume the worst.
24603 *) gl_cv_func_rename_link_works="guessing no" ;;
6a29c58e
YQ
24604 esac
24605
24606else
24607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24608/* end confdefs.h. */
24609
24610# include <stdio.h>
24611# include <stdlib.h>
24612# include <unistd.h>
24613
24614int
24615main ()
24616{
24617int result = 0;
24618 if (rename ("conftest.f", "conftest.f1"))
24619 result |= 1;
24620 if (unlink ("conftest.f1"))
24621 result |= 2;
5e8754f9 24622 if (rename ("conftest.f", "conftest.f"))
6a29c58e
YQ
24623 result |= 4;
24624 if (rename ("conftest.f1", "conftest.f1") == 0)
24625 result |= 8;
24626 return result;
24627
24628 ;
24629 return 0;
24630}
24631_ACEOF
24632if ac_fn_c_try_run "$LINENO"; then :
24633 gl_cv_func_rename_link_works=yes
24634else
24635 gl_cv_func_rename_link_works=no
24636fi
24637rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24638 conftest.$ac_objext conftest.beam conftest.$ac_ext
24639fi
24640
24641 else
24642 gl_cv_func_rename_link_works="guessing no"
24643 fi
5e8754f9 24644 rm -rf conftest.f conftest.f1
6a29c58e
YQ
24645 else
24646 gl_cv_func_rename_link_works=yes
24647 fi
24648
24649fi
24650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
24651$as_echo "$gl_cv_func_rename_link_works" >&6; }
24652 case "$gl_cv_func_rename_link_works" in
24653 *yes) ;;
24654 *)
24655 REPLACE_RENAME=1
24656
24657$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
24658
24659 ;;
24660 esac
24661
24662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
24663$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
d0ac1c44 24664if ${gl_cv_func_rename_dest_works+:} false; then :
6a29c58e
YQ
24665 $as_echo_n "(cached) " >&6
24666else
24667 rm -rf conftest.f conftest.d1 conftest.d2
24668 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
d0ac1c44 24669 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
24670 if test "$cross_compiling" = yes; then :
24671 case "$host_os" in
5e8754f9
SDJ
24672 # Guess yes on glibc systems.
24673 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
24674 # If we don't know, assume the worst.
24675 *) gl_cv_func_rename_dest_works="guessing no" ;;
6a29c58e
YQ
24676 esac
24677
24678else
24679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24680/* end confdefs.h. */
24681
24682# include <stdio.h>
24683# include <stdlib.h>
24684
24685int
24686main ()
24687{
24688int result = 0;
24689 if (rename ("conftest.d1", "conftest.d2") != 0)
24690 result |= 1;
24691 if (rename ("conftest.d2", "conftest.f") == 0)
24692 result |= 2;
24693 return result;
24694
24695 ;
24696 return 0;
24697}
24698_ACEOF
24699if ac_fn_c_try_run "$LINENO"; then :
24700 gl_cv_func_rename_dest_works=yes
24701else
24702 gl_cv_func_rename_dest_works=no
24703fi
24704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24705 conftest.$ac_objext conftest.beam conftest.$ac_ext
24706fi
24707
24708 rm -rf conftest.f conftest.d1 conftest.d2
24709
24710fi
24711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
24712$as_echo "$gl_cv_func_rename_dest_works" >&6; }
24713 case "$gl_cv_func_rename_dest_works" in
24714 *yes) ;;
24715 *)
24716 REPLACE_RENAME=1
24717
24718$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
24719
24720 ;;
24721 esac
24722
24723 if test $REPLACE_RENAME = 1; then
24724
24725
24726
24727
24728
24729
24730
24731
24732 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
24733
24734 fi
24735
24736
24737
24738
24739
24740 GNULIB_RENAME=1
24741
24742
24743
24744
24745
24746$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
24747
24748
24749
24750
24751
24752
6ec2e0f5
SDJ
24753 for ac_func in rewinddir
24754do :
24755 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
d0ac1c44 24756if test "x$ac_cv_func_rewinddir" = xyes; then :
6ec2e0f5
SDJ
24757 cat >>confdefs.h <<_ACEOF
24758#define HAVE_REWINDDIR 1
24759_ACEOF
24760
24761fi
24762done
24763
24764 if test $ac_cv_func_rewinddir = no; then
24765 HAVE_REWINDDIR=0
24766 fi
24767
24768 if test $HAVE_REWINDDIR = 0; then
24769
24770
24771
24772
24773
24774
24775
24776
24777 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
24778
24779 fi
24780
24781
24782
24783
24784
24785 GNULIB_REWINDDIR=1
24786
24787
24788
24789
24790
24791$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
24792
24793
24794
24795
24796
24797
472fa5ee
SM
24798 :
24799
24800
24801
24802
24803
6a29c58e
YQ
24804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
24805$as_echo_n "checking whether rmdir works... " >&6; }
d0ac1c44 24806if ${gl_cv_func_rmdir_works+:} false; then :
6a29c58e
YQ
24807 $as_echo_n "(cached) " >&6
24808else
24809 mkdir conftest.dir
24810 touch conftest.file
24811 if test "$cross_compiling" = yes; then :
24812 case "$host_os" in
5e8754f9
SDJ
24813 # Guess yes on glibc systems.
24814 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
24815 # If we don't know, assume the worst.
24816 *) gl_cv_func_rmdir_works="guessing no" ;;
6a29c58e
YQ
24817 esac
24818
24819else
24820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24821/* end confdefs.h. */
24822#include <stdio.h>
24823 #include <errno.h>
24824 #if HAVE_UNISTD_H
24825 # include <unistd.h>
24826 #else /* on Windows with MSVC */
24827 # include <direct.h>
24828 #endif
24829
24830int
24831main ()
24832{
24833int result = 0;
24834 if (!rmdir ("conftest.file/"))
24835 result |= 1;
24836 else if (errno != ENOTDIR)
24837 result |= 2;
24838 if (!rmdir ("conftest.dir/./"))
24839 result |= 4;
24840 return result;
24841
24842 ;
24843 return 0;
24844}
24845_ACEOF
24846if ac_fn_c_try_run "$LINENO"; then :
24847 gl_cv_func_rmdir_works=yes
24848else
24849 gl_cv_func_rmdir_works=no
24850fi
24851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24852 conftest.$ac_objext conftest.beam conftest.$ac_ext
24853fi
24854
24855 rm -rf conftest.dir conftest.file
24856fi
24857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
24858$as_echo "$gl_cv_func_rmdir_works" >&6; }
24859 case "$gl_cv_func_rmdir_works" in
24860 *yes) ;;
24861 *)
24862 REPLACE_RMDIR=1
24863 ;;
24864 esac
24865
24866 if test $REPLACE_RMDIR = 1; then
24867
24868
24869
24870
24871
24872
24873
24874
24875 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
24876
24877 fi
24878
24879
24880
24881
24882
24883 GNULIB_RMDIR=1
24884
24885
24886
24887
24888
24889$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
24890
24891
24892
24893
0750520d 24894
472fa5ee
SM
24895 :
24896
24897
24898
24899
24900
24901
24902
24903
5e8754f9
SDJ
24904
24905
24906
24907 :
24908
24909
24910
24911
24912
24913 if test $ac_cv_func_secure_getenv = no; then
24914 HAVE_SECURE_GETENV=0
24915 fi
24916
24917 if test $HAVE_SECURE_GETENV = 0; then
24918
24919
24920
24921
24922
24923
24924
24925
24926 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
24927
24928
24929 for ac_func in __secure_getenv
24930do :
24931 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
24932if test "x$ac_cv_func___secure_getenv" = xyes; then :
24933 cat >>confdefs.h <<_ACEOF
24934#define HAVE___SECURE_GETENV 1
24935_ACEOF
24936
24937fi
24938done
24939
24940 if test $ac_cv_func___secure_getenv = no; then
24941 for ac_func in issetugid
24942do :
24943 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
24944if test "x$ac_cv_func_issetugid" = xyes; then :
24945 cat >>confdefs.h <<_ACEOF
24946#define HAVE_ISSETUGID 1
24947_ACEOF
24948
24949fi
24950done
24951
24952 fi
24953
24954 :
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969
24970 fi
24971
24972
24973
24974
24975
24976 GNULIB_SECURE_GETENV=1
24977
24978
24979
24980
24981
24982$as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
24983
24984
24985
24986
24987
3d99e817
AK
24988 if test $ac_cv_func_setenv = no; then
24989 HAVE_SETENV=0
24990 else
24991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
24992$as_echo_n "checking whether setenv validates arguments... " >&6; }
d0ac1c44 24993if ${gl_cv_func_setenv_works+:} false; then :
3d99e817
AK
24994 $as_echo_n "(cached) " >&6
24995else
24996 if test "$cross_compiling" = yes; then :
24997 case "$host_os" in
5e8754f9
SDJ
24998 # Guess yes on glibc systems.
24999 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
25000 # If we don't know, assume the worst.
25001 *) gl_cv_func_setenv_works="guessing no" ;;
3d99e817
AK
25002 esac
25003
25004else
25005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25006/* end confdefs.h. */
25007
25008 #include <stdlib.h>
25009 #include <errno.h>
25010 #include <string.h>
25011
25012int
25013main ()
25014{
25015
25016 int result = 0;
25017 {
25018 if (setenv ("", "", 0) != -1)
25019 result |= 1;
25020 else if (errno != EINVAL)
25021 result |= 2;
25022 }
25023 {
25024 if (setenv ("a", "=", 1) != 0)
25025 result |= 4;
25026 else if (strcmp (getenv ("a"), "=") != 0)
25027 result |= 8;
25028 }
25029 return result;
25030
25031 ;
25032 return 0;
25033}
25034_ACEOF
25035if ac_fn_c_try_run "$LINENO"; then :
25036 gl_cv_func_setenv_works=yes
25037else
25038 gl_cv_func_setenv_works=no
25039fi
25040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25041 conftest.$ac_objext conftest.beam conftest.$ac_ext
25042fi
25043
25044fi
25045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
25046$as_echo "$gl_cv_func_setenv_works" >&6; }
25047 case "$gl_cv_func_setenv_works" in
25048 *yes) ;;
25049 *)
25050 REPLACE_SETENV=1
25051 ;;
25052 esac
25053 fi
25054
25055 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
25056
25057
25058
25059
25060
25061
25062
25063
25064 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
25065
25066 fi
25067
25068
25069
25070
25071
25072 GNULIB_SETENV=1
25073
25074
25075
25076
25077
25078$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
25079
25080
25081
25082
25083
0750520d
PA
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093 if test $gl_cv_have_include_next = yes; then
25094 gl_cv_next_signal_h='<'signal.h'>'
25095 else
25096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
25097$as_echo_n "checking absolute name of <signal.h>... " >&6; }
d0ac1c44 25098if ${gl_cv_next_signal_h+:} false; then :
0750520d
PA
25099 $as_echo_n "(cached) " >&6
25100else
25101
25102
25103
25104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25105/* end confdefs.h. */
25106#include <signal.h>
25107_ACEOF
25108 case "$host_os" in
25109 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25110 *) gl_absname_cpp="$ac_cpp" ;;
25111 esac
25112
25113 case "$host_os" in
25114 mingw*)
25115 gl_dirsep_regex='[/\\]'
25116 ;;
25117 *)
25118 gl_dirsep_regex='\/'
25119 ;;
25120 esac
25121 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25122 gl_header_literal_regex=`echo 'signal.h' \
25123 | sed -e "$gl_make_literal_regex_sed"`
25124 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25125 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25126 s|^/[^/]|//&|
25127 p
25128 q
25129 }'
25130
25131 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25132 sed -n "$gl_absolute_header_sed"`
25133
25134 gl_header=$gl_cv_absolute_signal_h
25135 gl_cv_next_signal_h='"'$gl_header'"'
25136
25137
25138fi
25139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
25140$as_echo "$gl_cv_next_signal_h" >&6; }
25141 fi
25142 NEXT_SIGNAL_H=$gl_cv_next_signal_h
25143
25144 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25145 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25146 gl_next_as_first_directive='<'signal.h'>'
25147 else
25148 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25149 gl_next_as_first_directive=$gl_cv_next_signal_h
25150 fi
25151 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
25152
25153
25154
25155
25156
25157# AIX declares sig_atomic_t to already include volatile, and C89 compilers
25158# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
25159 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
25160#include <signal.h>
25161
25162"
d0ac1c44 25163if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
0750520d
PA
25164
25165else
25166 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
25167fi
25168
25169
25170
25171
25172
25173
25174
25175 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
25176#include <signal.h>
25177
25178"
d0ac1c44 25179if test "x$ac_cv_type_sighandler_t" = xyes; then :
0750520d
PA
25180
25181else
25182 HAVE_SIGHANDLER_T=0
25183fi
25184
25185
25186
5e8754f9
SDJ
25187 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
25188 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25190$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25191if eval \${$as_gl_Symbol+:} false; then :
25192 $as_echo_n "(cached) " >&6
25193else
25194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25195/* end confdefs.h. */
25196#include <signal.h>
25197
25198int
25199main ()
25200{
25201#undef $gl_func
25202 (void) $gl_func;
25203 ;
25204 return 0;
25205}
25206_ACEOF
25207if ac_fn_c_try_compile "$LINENO"; then :
25208 eval "$as_gl_Symbol=yes"
25209else
25210 eval "$as_gl_Symbol=no"
25211fi
25212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25213fi
25214eval ac_res=\$$as_gl_Symbol
25215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25216$as_echo "$ac_res" >&6; }
25217 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25218 cat >>confdefs.h <<_ACEOF
25219#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25220_ACEOF
0750520d 25221
5e8754f9
SDJ
25222 eval ac_cv_have_decl_$gl_func=yes
25223fi
25224 done
0750520d
PA
25225
25226
725e2999
JB
25227 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
25228/* <sys/types.h> is not needed according to POSIX, but the
25229 <sys/socket.h> in i386-unknown-freebsd4.10 and
25230 powerpc-apple-darwin5.5 required it. */
25231#include <sys/types.h>
25232#if HAVE_SYS_SOCKET_H
25233# include <sys/socket.h>
25234#elif HAVE_WS2TCPIP_H
25235# include <ws2tcpip.h>
25236#endif
25237
25238"
25239if test "x$ac_cv_type_socklen_t" = xyes; then :
25240
25241else
25242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
25243$as_echo_n "checking for socklen_t equivalent... " >&6; }
25244 if ${gl_cv_socklen_t_equiv+:} false; then :
25245 $as_echo_n "(cached) " >&6
25246else
25247 # Systems have either "struct sockaddr *" or
25248 # "void *" as the second argument to getpeername
25249 gl_cv_socklen_t_equiv=
25250 for arg2 in "struct sockaddr" void; do
25251 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
25252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25253/* end confdefs.h. */
25254#include <sys/types.h>
25255 #include <sys/socket.h>
25256
25257 int getpeername (int, $arg2 *, $t *);
25258int
25259main ()
25260{
25261$t len;
25262 getpeername (0, 0, &len);
25263 ;
25264 return 0;
25265}
25266_ACEOF
25267if ac_fn_c_try_compile "$LINENO"; then :
25268 gl_cv_socklen_t_equiv="$t"
25269fi
25270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25271 test "$gl_cv_socklen_t_equiv" != "" && break
25272 done
25273 test "$gl_cv_socklen_t_equiv" != "" && break
25274 done
25275
25276fi
25277
25278 if test "$gl_cv_socklen_t_equiv" = ""; then
25279 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
25280 fi
25281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
25282$as_echo "$gl_cv_socklen_t_equiv" >&6; }
25283
25284cat >>confdefs.h <<_ACEOF
25285#define socklen_t $gl_cv_socklen_t_equiv
25286_ACEOF
25287
25288fi
25289
0750520d 25290
63ce7108
TT
25291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
25292$as_echo_n "checking for ssize_t... " >&6; }
d0ac1c44 25293if ${gt_cv_ssize_t+:} false; then :
63ce7108
TT
25294 $as_echo_n "(cached) " >&6
25295else
25296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25297/* end confdefs.h. */
25298#include <sys/types.h>
25299int
25300main ()
25301{
25302int x = sizeof (ssize_t *) + sizeof (ssize_t);
25303 return !x;
25304 ;
25305 return 0;
25306}
25307_ACEOF
25308if ac_fn_c_try_compile "$LINENO"; then :
25309 gt_cv_ssize_t=yes
25310else
25311 gt_cv_ssize_t=no
25312fi
25313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25314fi
25315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
25316$as_echo "$gt_cv_ssize_t" >&6; }
25317 if test $gt_cv_ssize_t = no; then
25318
25319$as_echo "#define ssize_t int" >>confdefs.h
25320
25321 fi
25322
25323
25324
25325
472fa5ee
SM
25326 :
25327
25328
25329
25330
25331
5e8754f9
SDJ
25332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
25333$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
25334if ${gl_cv_func_stat_dir_slash+:} false; then :
2196f55f
YQ
25335 $as_echo_n "(cached) " >&6
25336else
5e8754f9
SDJ
25337 if test "$cross_compiling" = yes; then :
25338 case $host_os in
25339 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
25340 *) gl_cv_func_stat_dir_slash="guessing yes";;
25341 esac
2196f55f
YQ
25342else
25343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25344/* end confdefs.h. */
25345#include <sys/stat.h>
25346
25347int
25348main ()
25349{
5e8754f9 25350struct stat st; return stat (".", &st) != stat ("./", &st);
2196f55f
YQ
25351 ;
25352 return 0;
25353}
25354_ACEOF
25355if ac_fn_c_try_run "$LINENO"; then :
5e8754f9 25356 gl_cv_func_stat_dir_slash=yes
2196f55f 25357else
5e8754f9 25358 gl_cv_func_stat_dir_slash=no
2196f55f
YQ
25359fi
25360rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25361 conftest.$ac_objext conftest.beam conftest.$ac_ext
25362fi
25363
25364fi
5e8754f9
SDJ
25365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
25366$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
25367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
25368$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
25369if ${gl_cv_func_stat_file_slash+:} false; then :
7a6dbc2f 25370 $as_echo_n "(cached) " >&6
2196f55f 25371else
5e8754f9
SDJ
25372 touch conftest.tmp
25373 # Assume that if we have lstat, we can also check symlinks.
25374 if test $ac_cv_func_lstat = yes; then
25375 ln -s conftest.tmp conftest.lnk
25376 fi
25377 if test "$cross_compiling" = yes; then :
25378 case "$host_os" in
25379 # Guess yes on glibc systems.
25380 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
25381 # If we don't know, assume the worst.
25382 *) gl_cv_func_stat_file_slash="guessing no" ;;
25383 esac
7a6dbc2f 25384
2196f55f 25385else
5e8754f9
SDJ
25386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25387/* end confdefs.h. */
25388#include <sys/stat.h>
7a6dbc2f 25389
5e8754f9
SDJ
25390int
25391main ()
25392{
25393int result = 0;
25394 struct stat st;
25395 if (!stat ("conftest.tmp/", &st))
25396 result |= 1;
25397#if HAVE_LSTAT
25398 if (!stat ("conftest.lnk/", &st))
25399 result |= 2;
25400#endif
25401 return result;
7a6dbc2f 25402
5e8754f9
SDJ
25403 ;
25404 return 0;
25405}
25406_ACEOF
25407if ac_fn_c_try_run "$LINENO"; then :
25408 gl_cv_func_stat_file_slash=yes
25409else
25410 gl_cv_func_stat_file_slash=no
2196f55f 25411fi
5e8754f9
SDJ
25412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25413 conftest.$ac_objext conftest.beam conftest.$ac_ext
2196f55f 25414fi
2196f55f 25415
5e8754f9 25416 rm -f conftest.tmp conftest.lnk
7a6dbc2f 25417fi
5e8754f9
SDJ
25418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
25419$as_echo "$gl_cv_func_stat_file_slash" >&6; }
25420 case $gl_cv_func_stat_dir_slash in
25421 *no) REPLACE_STAT=1
2196f55f 25422
5e8754f9
SDJ
25423$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
25424;;
25425 esac
25426 case $gl_cv_func_stat_file_slash in
25427 *no) REPLACE_STAT=1
2196f55f 25428
5e8754f9
SDJ
25429$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
25430;;
25431 esac
2196f55f 25432
5e8754f9 25433 if test $REPLACE_STAT = 1; then
2196f55f
YQ
25434
25435
25436
25437
25438
25439
25440
2196f55f 25441
5e8754f9 25442 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
2196f55f 25443
5e8754f9
SDJ
25444 :
25445 fi
2196f55f
YQ
25446
25447
25448
25449
2196f55f 25450
5e8754f9 25451 GNULIB_STAT=1
2196f55f
YQ
25452
25453
25454
25455
2196f55f 25456
5e8754f9
SDJ
25457$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
25458
2196f55f
YQ
25459
25460
25461
725e2999
JB
25462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
25463$as_echo_n "checking for working stdalign.h... " >&6; }
25464if ${gl_cv_header_working_stdalign_h+:} false; then :
25465 $as_echo_n "(cached) " >&6
25466else
25467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25468/* end confdefs.h. */
25469#include <stdalign.h>
25470 #include <stddef.h>
25471
25472 /* Test that alignof yields a result consistent with offsetof.
25473 This catches GCC bug 52023
25474 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
25475 #ifdef __cplusplus
25476 template <class t> struct alignof_helper { char a; t b; };
25477 # define ao(type) offsetof (alignof_helper<type>, b)
25478 #else
25479 # define ao(type) offsetof (struct { char a; type b; }, b)
25480 #endif
25481 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
25482 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
25483 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
25484
25485 /* Test _Alignas only on platforms where gnulib can help. */
25486 #if \
25487 ((defined __cplusplus && 201103 <= __cplusplus) \
25488 || (defined __APPLE__ && defined __MACH__ \
25489 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
25490 : __GNUC__) \
25491 || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \
25492 || __ICC || 0x5110 <= __SUNPRO_C \
25493 || 1300 <= _MSC_VER)
25494 struct alignas_test { char c; char alignas (8) alignas_8; };
25495 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
25496 ? 1 : -1];
25497 #endif
25498
25499int
25500main ()
25501{
25502
25503 ;
25504 return 0;
25505}
25506_ACEOF
25507if ac_fn_c_try_compile "$LINENO"; then :
25508 gl_cv_header_working_stdalign_h=yes
25509else
25510 gl_cv_header_working_stdalign_h=no
25511fi
25512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25513fi
25514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
25515$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
25516
25517 if test $gl_cv_header_working_stdalign_h = yes; then
25518 STDALIGN_H=''
25519 else
25520 STDALIGN_H='stdalign.h'
25521 fi
25522
25523
25524 if test -n "$STDALIGN_H"; then
25525 GL_GENERATE_STDALIGN_H_TRUE=
25526 GL_GENERATE_STDALIGN_H_FALSE='#'
25527else
25528 GL_GENERATE_STDALIGN_H_TRUE='#'
25529 GL_GENERATE_STDALIGN_H_FALSE=
25530fi
25531
25532
25533
2196f55f
YQ
25534
25535
63ce7108
TT
25536 # Define two additional variables used in the Makefile substitution.
25537
25538 if test "$ac_cv_header_stdbool_h" = yes; then
25539 STDBOOL_H=''
25540 else
25541 STDBOOL_H='stdbool.h'
25542 fi
25543
25544 if test -n "$STDBOOL_H"; then
25545 GL_GENERATE_STDBOOL_H_TRUE=
25546 GL_GENERATE_STDBOOL_H_FALSE='#'
25547else
25548 GL_GENERATE_STDBOOL_H_TRUE='#'
25549 GL_GENERATE_STDBOOL_H_FALSE=
25550fi
25551
25552
25553 if test "$ac_cv_type__Bool" = yes; then
25554 HAVE__BOOL=1
25555 else
25556 HAVE__BOOL=0
25557 fi
25558
25559
25560
25561
25562
25563 STDDEF_H=
4a626d0a
PA
25564 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
25565
25566"
d0ac1c44 25567if test "x$ac_cv_type_max_align_t" = xyes; then :
4a626d0a
PA
25568
25569else
25570 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
25571fi
25572
63ce7108
TT
25573 if test $gt_cv_c_wchar_t = no; then
25574 HAVE_WCHAR_T=0
25575 STDDEF_H=stddef.h
25576 fi
25577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
25578$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
d0ac1c44 25579if ${gl_cv_decl_null_works+:} false; then :
63ce7108
TT
25580 $as_echo_n "(cached) " >&6
25581else
25582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25583/* end confdefs.h. */
25584#include <stddef.h>
25585 int test[2 * (sizeof NULL == sizeof (void *)) -1];
25586
25587int
25588main ()
25589{
25590
25591 ;
25592 return 0;
25593}
25594_ACEOF
25595if ac_fn_c_try_compile "$LINENO"; then :
25596 gl_cv_decl_null_works=yes
25597else
25598 gl_cv_decl_null_works=no
25599fi
25600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25601fi
25602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
25603$as_echo "$gl_cv_decl_null_works" >&6; }
25604 if test $gl_cv_decl_null_works = no; then
25605 REPLACE_NULL=1
25606 STDDEF_H=stddef.h
25607 fi
25608
25609 if test -n "$STDDEF_H"; then
25610 GL_GENERATE_STDDEF_H_TRUE=
25611 GL_GENERATE_STDDEF_H_FALSE='#'
25612else
25613 GL_GENERATE_STDDEF_H_TRUE='#'
25614 GL_GENERATE_STDDEF_H_FALSE=
25615fi
25616
25617 if test -n "$STDDEF_H"; then
25618
25619
25620
25621
25622
25623
25624
25625
25626 if test $gl_cv_have_include_next = yes; then
25627 gl_cv_next_stddef_h='<'stddef.h'>'
25628 else
25629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
25630$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
d0ac1c44 25631if ${gl_cv_next_stddef_h+:} false; then :
63ce7108
TT
25632 $as_echo_n "(cached) " >&6
25633else
25634
4a626d0a
PA
25635
25636
25637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
25638/* end confdefs.h. */
25639#include <stddef.h>
63ce7108 25640_ACEOF
4a626d0a
PA
25641 case "$host_os" in
25642 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25643 *) gl_absname_cpp="$ac_cpp" ;;
25644 esac
63ce7108 25645
4a626d0a
PA
25646 case "$host_os" in
25647 mingw*)
25648 gl_dirsep_regex='[/\\]'
25649 ;;
25650 *)
25651 gl_dirsep_regex='\/'
25652 ;;
25653 esac
25654 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25655 gl_header_literal_regex=`echo 'stddef.h' \
25656 | sed -e "$gl_make_literal_regex_sed"`
25657 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25658 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25659 s|^/[^/]|//&|
25660 p
25661 q
25662 }'
63ce7108 25663
4a626d0a
PA
25664 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25665 sed -n "$gl_absolute_header_sed"`
25666
25667 gl_header=$gl_cv_absolute_stddef_h
25668 gl_cv_next_stddef_h='"'$gl_header'"'
63ce7108
TT
25669
25670
25671fi
25672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
25673$as_echo "$gl_cv_next_stddef_h" >&6; }
25674 fi
25675 NEXT_STDDEF_H=$gl_cv_next_stddef_h
25676
25677 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25678 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25679 gl_next_as_first_directive='<'stddef.h'>'
25680 else
25681 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25682 gl_next_as_first_directive=$gl_cv_next_stddef_h
25683 fi
25684 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
25685
25686
25687
25688
25689 fi
25690
25691
25692
25693
49e4877c 25694 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
63ce7108
TT
25695
25696
25697
98399780
YQ
25698
25699
25700
25701
25702
4a626d0a
PA
25703
25704
6a29c58e
YQ
25705 if test $gl_cv_have_include_next = yes; then
25706 gl_cv_next_stdio_h='<'stdio.h'>'
25707 else
25708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
25709$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
d0ac1c44 25710if ${gl_cv_next_stdio_h+:} false; then :
6a29c58e
YQ
25711 $as_echo_n "(cached) " >&6
25712else
25713
4a626d0a
PA
25714
25715
25716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6a29c58e
YQ
25717/* end confdefs.h. */
25718#include <stdio.h>
6a29c58e 25719_ACEOF
4a626d0a
PA
25720 case "$host_os" in
25721 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25722 *) gl_absname_cpp="$ac_cpp" ;;
25723 esac
25724
25725 case "$host_os" in
25726 mingw*)
25727 gl_dirsep_regex='[/\\]'
25728 ;;
25729 *)
25730 gl_dirsep_regex='\/'
25731 ;;
25732 esac
25733 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25734 gl_header_literal_regex=`echo 'stdio.h' \
25735 | sed -e "$gl_make_literal_regex_sed"`
25736 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25737 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25738 s|^/[^/]|//&|
25739 p
25740 q
25741 }'
6a29c58e 25742
4a626d0a
PA
25743 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25744 sed -n "$gl_absolute_header_sed"`
6a29c58e 25745
4a626d0a
PA
25746 gl_header=$gl_cv_absolute_stdio_h
25747 gl_cv_next_stdio_h='"'$gl_header'"'
6a29c58e
YQ
25748
25749
25750fi
25751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
25752$as_echo "$gl_cv_next_stdio_h" >&6; }
25753 fi
25754 NEXT_STDIO_H=$gl_cv_next_stdio_h
25755
25756 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25757 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25758 gl_next_as_first_directive='<'stdio.h'>'
25759 else
25760 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25761 gl_next_as_first_directive=$gl_cv_next_stdio_h
25762 fi
25763 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
25764
25765
25766
25767
25768
4a626d0a
PA
25769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
25770$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
d0ac1c44 25771if ${gl_cv_func_printf_attribute_flavor+:} false; then :
4a626d0a
PA
25772 $as_echo_n "(cached) " >&6
25773else
25774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25775/* end confdefs.h. */
25776
25777 #define __STDC_FORMAT_MACROS 1
25778 #include <stdio.h>
25779 #include <inttypes.h>
25780 /* For non-mingw systems, compilation will trivially succeed.
25781 For mingw, compilation will succeed for older mingw (system
25782 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
5e8754f9 25783 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
4a626d0a
PA
25784 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
25785 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
25786 #endif
25787
25788int
25789main ()
25790{
25791
25792 ;
25793 return 0;
25794}
25795_ACEOF
25796if ac_fn_c_try_compile "$LINENO"; then :
25797 gl_cv_func_printf_attribute_flavor=system
25798else
25799 gl_cv_func_printf_attribute_flavor=gnu
25800fi
25801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25802fi
25803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
25804$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
25805 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
25806
25807$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
25808
25809 fi
25810
6a29c58e
YQ
25811 GNULIB_FSCANF=1
25812
25813
25814cat >>confdefs.h <<_ACEOF
25815#define GNULIB_FSCANF 1
25816_ACEOF
25817
25818
25819 GNULIB_SCANF=1
25820
25821
25822cat >>confdefs.h <<_ACEOF
25823#define GNULIB_SCANF 1
25824_ACEOF
25825
25826
25827 GNULIB_FGETC=1
25828 GNULIB_GETC=1
25829 GNULIB_GETCHAR=1
25830 GNULIB_FGETS=1
25831 GNULIB_FREAD=1
25832
25833
25834 GNULIB_FPRINTF=1
25835 GNULIB_PRINTF=1
25836 GNULIB_VFPRINTF=1
25837 GNULIB_VPRINTF=1
25838 GNULIB_FPUTC=1
25839 GNULIB_PUTC=1
25840 GNULIB_PUTCHAR=1
25841 GNULIB_FPUTS=1
25842 GNULIB_PUTS=1
25843 GNULIB_FWRITE=1
25844
25845
25846
25847
5e8754f9
SDJ
25848 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
25849 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25851$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25852if eval \${$as_gl_Symbol+:} false; then :
25853 $as_echo_n "(cached) " >&6
25854else
25855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25856/* end confdefs.h. */
25857#include <stdio.h>
25858
25859int
25860main ()
25861{
25862#undef $gl_func
25863 (void) $gl_func;
25864 ;
25865 return 0;
25866}
25867_ACEOF
25868if ac_fn_c_try_compile "$LINENO"; then :
25869 eval "$as_gl_Symbol=yes"
25870else
25871 eval "$as_gl_Symbol=no"
25872fi
25873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25874fi
25875eval ac_res=\$$as_gl_Symbol
25876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25877$as_echo "$ac_res" >&6; }
25878 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
25879 cat >>confdefs.h <<_ACEOF
25880#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
25881_ACEOF
6a29c58e 25882
5e8754f9
SDJ
25883 eval ac_cv_have_decl_$gl_func=yes
25884fi
25885 done
6a29c58e
YQ
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
98399780
YQ
25898 if test $gl_cv_have_include_next = yes; then
25899 gl_cv_next_stdlib_h='<'stdlib.h'>'
25900 else
25901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
25902$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
d0ac1c44 25903if ${gl_cv_next_stdlib_h+:} false; then :
98399780
YQ
25904 $as_echo_n "(cached) " >&6
25905else
25906
4a626d0a
PA
25907
25908
25909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98399780
YQ
25910/* end confdefs.h. */
25911#include <stdlib.h>
98399780 25912_ACEOF
4a626d0a
PA
25913 case "$host_os" in
25914 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25915 *) gl_absname_cpp="$ac_cpp" ;;
25916 esac
25917
25918 case "$host_os" in
25919 mingw*)
25920 gl_dirsep_regex='[/\\]'
25921 ;;
25922 *)
25923 gl_dirsep_regex='\/'
25924 ;;
25925 esac
25926 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25927 gl_header_literal_regex=`echo 'stdlib.h' \
25928 | sed -e "$gl_make_literal_regex_sed"`
25929 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25930 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25931 s|^/[^/]|//&|
25932 p
25933 q
25934 }'
98399780 25935
4a626d0a
PA
25936 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25937 sed -n "$gl_absolute_header_sed"`
98399780 25938
4a626d0a
PA
25939 gl_header=$gl_cv_absolute_stdlib_h
25940 gl_cv_next_stdlib_h='"'$gl_header'"'
98399780
YQ
25941
25942
25943fi
25944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
25945$as_echo "$gl_cv_next_stdlib_h" >&6; }
25946 fi
25947 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
25948
25949 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25950 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25951 gl_next_as_first_directive='<'stdlib.h'>'
25952 else
25953 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25954 gl_next_as_first_directive=$gl_cv_next_stdlib_h
25955 fi
25956 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
25957
25958
25959
25960
25961
25962
5e8754f9
SDJ
25963 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
25964 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25966$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25967if eval \${$as_gl_Symbol+:} false; then :
25968 $as_echo_n "(cached) " >&6
25969else
25970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25971/* end confdefs.h. */
25972#include <stdlib.h>
25973#if HAVE_SYS_LOADAVG_H
25974# include <sys/loadavg.h>
25975#endif
25976#if HAVE_RANDOM_H
25977# include <random.h>
25978#endif
25979
25980int
25981main ()
25982{
25983#undef $gl_func
25984 (void) $gl_func;
25985 ;
25986 return 0;
25987}
25988_ACEOF
25989if ac_fn_c_try_compile "$LINENO"; then :
25990 eval "$as_gl_Symbol=yes"
25991else
25992 eval "$as_gl_Symbol=no"
25993fi
25994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25995fi
25996eval ac_res=\$$as_gl_Symbol
25997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
25998$as_echo "$ac_res" >&6; }
25999 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26000 cat >>confdefs.h <<_ACEOF
26001#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26002_ACEOF
98399780 26003
5e8754f9
SDJ
26004 eval ac_cv_have_decl_$gl_func=yes
26005fi
26006 done
98399780
YQ
26007
26008
26009
26010
26011
26012
8424cc97
SM
26013 for ac_func in strchrnul
26014do :
26015 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
d0ac1c44 26016if test "x$ac_cv_func_strchrnul" = xyes; then :
8424cc97
SM
26017 cat >>confdefs.h <<_ACEOF
26018#define HAVE_STRCHRNUL 1
26019_ACEOF
26020
26021fi
26022done
26023
26024 if test $ac_cv_func_strchrnul = no; then
26025 HAVE_STRCHRNUL=0
26026 else
26027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
26028$as_echo_n "checking whether strchrnul works... " >&6; }
d0ac1c44 26029if ${gl_cv_func_strchrnul_works+:} false; then :
8424cc97
SM
26030 $as_echo_n "(cached) " >&6
26031else
26032 if test "$cross_compiling" = yes; then :
26033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26034/* end confdefs.h. */
26035
26036#if defined __CYGWIN__
26037 #include <cygwin/version.h>
26038 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
26039 Lucky user
26040 #endif
26041#else
26042 Lucky user
26043#endif
26044
26045_ACEOF
26046if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26047 $EGREP "Lucky user" >/dev/null 2>&1; then :
26048 gl_cv_func_strchrnul_works="guessing yes"
26049else
26050 gl_cv_func_strchrnul_works="guessing no"
26051fi
26052rm -f conftest*
26053
26054
26055else
26056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26057/* end confdefs.h. */
26058
26059#include <string.h> /* for strchrnul */
26060
26061int
26062main ()
26063{
26064const char *buf = "a";
26065 return strchrnul (buf, 'b') != buf + 1;
26066
26067 ;
26068 return 0;
26069}
26070_ACEOF
26071if ac_fn_c_try_run "$LINENO"; then :
26072 gl_cv_func_strchrnul_works=yes
26073else
26074 gl_cv_func_strchrnul_works=no
26075fi
26076rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26077 conftest.$ac_objext conftest.beam conftest.$ac_ext
26078fi
26079
26080
26081fi
26082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
26083$as_echo "$gl_cv_func_strchrnul_works" >&6; }
26084 case "$gl_cv_func_strchrnul_works" in
26085 *yes) ;;
26086 *) REPLACE_STRCHRNUL=1 ;;
26087 esac
26088 fi
26089
26090 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
26091
26092
26093
26094
26095
26096
26097
26098
26099 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
26100
26101 :
26102 fi
26103
26104
26105
26106
26107
26108 GNULIB_STRCHRNUL=1
26109
26110
26111
26112
26113
26114$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
26115
26116
26117
26118
26119
26120
26121
472fa5ee
SM
26122 :
26123
26124
26125
26126
26127
6ec2e0f5
SDJ
26128 if test $ac_cv_func_strdup = yes; then
26129 if test $gl_cv_func_malloc_posix != yes; then
26130 REPLACE_STRDUP=1
26131 fi
26132 fi
26133
472fa5ee
SM
26134 :
26135
26136
26137
26138
26139
6ec2e0f5
SDJ
26140 if test $ac_cv_have_decl_strdup = no; then
26141 HAVE_DECL_STRDUP=0
26142 fi
26143
26144 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
26145
26146
26147
26148
26149
26150
26151
26152
26153 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
26154
26155 :
26156 fi
26157
26158
26159
26160
26161
26162 GNULIB_STRDUP=1
26163
26164
26165
26166
26167
26168$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
26169
26170
26171
26172
26173
26174
26175
26176
5abebf3c
CB
26177
26178
6ec2e0f5
SDJ
26179 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
26181$as_echo_n "checking for working strerror function... " >&6; }
d0ac1c44 26182if ${gl_cv_func_working_strerror+:} false; then :
6ec2e0f5
SDJ
26183 $as_echo_n "(cached) " >&6
26184else
26185 if test "$cross_compiling" = yes; then :
26186 case "$host_os" in
5e8754f9
SDJ
26187 # Guess yes on glibc systems.
26188 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
26189 # If we don't know, assume the worst.
26190 *) gl_cv_func_working_strerror="guessing no" ;;
6ec2e0f5
SDJ
26191 esac
26192
26193else
26194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26195/* end confdefs.h. */
26196#include <string.h>
26197
26198int
26199main ()
26200{
26201if (!*strerror (-2)) return 1;
26202 ;
26203 return 0;
26204}
26205_ACEOF
26206if ac_fn_c_try_run "$LINENO"; then :
26207 gl_cv_func_working_strerror=yes
26208else
26209 gl_cv_func_working_strerror=no
26210fi
26211rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26212 conftest.$ac_objext conftest.beam conftest.$ac_ext
26213fi
26214
26215
26216fi
26217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
26218$as_echo "$gl_cv_func_working_strerror" >&6; }
26219 case "$gl_cv_func_working_strerror" in
26220 *yes) ;;
26221 *)
26222 REPLACE_STRERROR=1
26223 ;;
26224 esac
26225
5abebf3c
CB
26226 case "$gl_cv_func_strerror_r_works" in
26227 *no) REPLACE_STRERROR=1 ;;
26228 esac
26229
6ec2e0f5
SDJ
26230 else
26231 REPLACE_STRERROR=1
26232 fi
26233
26234 if test $REPLACE_STRERROR = 1; then
26235
26236
26237
26238
26239
26240
26241
26242
26243 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
26244
26245 fi
26246
26247
26248cat >>confdefs.h <<_ACEOF
26249#define GNULIB_STRERROR 1
26250_ACEOF
26251
26252
26253
26254
26255
26256
26257
26258 GNULIB_STRERROR=1
26259
26260
26261
26262
26263
26264$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
26265
26266
26267
26268
26269
26270 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
26271
26272
26273
26274
26275
26276
26277
26278
26279 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
26280
26281
26282
26283
26284
472fa5ee
SM
26285 :
26286
26287
26288
26289
26290
6ec2e0f5
SDJ
26291 if test $ac_cv_header_sys_socket_h != yes; then
26292 for ac_header in winsock2.h
26293do :
26294 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 26295if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
26296 cat >>confdefs.h <<_ACEOF
26297#define HAVE_WINSOCK2_H 1
26298_ACEOF
26299
26300fi
26301
26302done
26303
26304 fi
26305 if test "$ac_cv_header_winsock2_h" = yes; then
26306 HAVE_WINSOCK2_H=1
26307 UNISTD_H_HAVE_WINSOCK2_H=1
26308 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
26309 else
26310 HAVE_WINSOCK2_H=0
26311 fi
26312
26313
26314 fi
26315
26316
26317
26318
98399780 26319
5abebf3c
CB
26320
26321 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
26322if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
26323 HAVE_DECL_STRERROR_R=1
26324else
26325 HAVE_DECL_STRERROR_R=0
26326fi
26327
26328
26329cat >>confdefs.h <<_ACEOF
26330#define HAVE_DECL_STRERROR_R_ORIG $HAVE_DECL_STRERROR_R
26331_ACEOF
26332
26333
26334 if test $ac_cv_func_strerror_r = yes; then
26335 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
26336 if test $gl_cv_func_strerror_r_posix_signature = yes; then
26337 case "$gl_cv_func_strerror_r_works" in
26338 *no) REPLACE_STRERROR_R=1 ;;
26339 esac
26340 else
26341 REPLACE_STRERROR_R=1
26342 fi
26343 else
26344 REPLACE_STRERROR_R=1
26345 fi
26346 fi
26347
26348 # Overwrite the findings of AC_FUNC_STRERROR_R (for code that uses that).
26349
26350
26351 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
26352
26353
26354
26355
26356
26357
26358
26359
26360 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
26361
26362
26363
26364 :
26365
26366
26367
26368
26369
26370
26371 :
26372
26373
26374
26375
26376
26377
26378 :
26379
26380
26381
26382
26383
26384
26385 fi
26386
26387
26388
26389
26390
26391 GNULIB_STRERROR_R=1
26392
26393
26394
26395
26396
26397$as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
26398
26399
26400
26401
26402
26403
26404
26405
63ce7108
TT
26406 if test $REPLACE_STRSTR = 0; then
26407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
26408$as_echo_n "checking whether strstr works in linear time... " >&6; }
d0ac1c44 26409if ${gl_cv_func_strstr_linear+:} false; then :
63ce7108
TT
26410 $as_echo_n "(cached) " >&6
26411else
26412 if test "$cross_compiling" = yes; then :
26413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26414/* end confdefs.h. */
26415
26416#include <features.h>
26417#ifdef __GNU_LIBRARY__
26418 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
26419 && !(defined __i386__ || defined __x86_64__) \
26420 && !defined __UCLIBC__
26421 Lucky user
26422 #endif
26423#endif
26424#ifdef __CYGWIN__
26425 #include <cygwin/version.h>
26426 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
26427 Lucky user
26428 #endif
26429#endif
26430
26431_ACEOF
26432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26433 $EGREP "Lucky user" >/dev/null 2>&1; then :
26434 gl_cv_func_strstr_linear="guessing yes"
c971b7fa 26435else
63ce7108 26436 gl_cv_func_strstr_linear="guessing no"
c971b7fa
PA
26437fi
26438rm -f conftest*
26439
26440
26441else
26442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26443/* end confdefs.h. */
26444
49e4877c
PA
26445#ifdef __MVS__
26446/* z/OS does not deliver signals while strstr() is running (thanks to
26447 restrictions on its LE runtime), which prevents us from limiting the
26448 running time of this test. */
26449# error "This test does not work properly on z/OS"
26450#endif
c971b7fa 26451#include <signal.h> /* for signal */
63ce7108 26452#include <string.h> /* for strstr */
c971b7fa
PA
26453#include <stdlib.h> /* for malloc */
26454#include <unistd.h> /* for alarm */
49e4877c 26455static void quit (int sig) { _exit (sig + 128); }
c971b7fa
PA
26456
26457int
26458main ()
26459{
26460
26461 int result = 0;
26462 size_t m = 1000000;
63ce7108
TT
26463 char *haystack = (char *) malloc (2 * m + 2);
26464 char *needle = (char *) malloc (m + 2);
c971b7fa 26465 /* Failure to compile this test due to missing alarm is okay,
63ce7108 26466 since all such platforms (mingw) also have quadratic strstr. */
c971b7fa
PA
26467 signal (SIGALRM, quit);
26468 alarm (5);
26469 /* Check for quadratic performance. */
26470 if (haystack && needle)
26471 {
26472 memset (haystack, 'A', 2 * m);
26473 haystack[2 * m] = 'B';
63ce7108 26474 haystack[2 * m + 1] = 0;
c971b7fa
PA
26475 memset (needle, 'A', m);
26476 needle[m] = 'B';
63ce7108
TT
26477 needle[m + 1] = 0;
26478 if (!strstr (haystack, needle))
c971b7fa
PA
26479 result |= 1;
26480 }
26481 return result;
26482
26483 ;
26484 return 0;
26485}
26486_ACEOF
26487if ac_fn_c_try_run "$LINENO"; then :
63ce7108 26488 gl_cv_func_strstr_linear=yes
c971b7fa 26489else
63ce7108 26490 gl_cv_func_strstr_linear=no
c971b7fa
PA
26491fi
26492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26493 conftest.$ac_objext conftest.beam conftest.$ac_ext
26494fi
26495
26496
26497fi
63ce7108
TT
26498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
26499$as_echo "$gl_cv_func_strstr_linear" >&6; }
26500 case "$gl_cv_func_strstr_linear" in
40a73391
JK
26501 *yes) ;;
26502 *)
63ce7108 26503 REPLACE_STRSTR=1
40a73391
JK
26504 ;;
26505 esac
c971b7fa
PA
26506 fi
26507
63ce7108 26508 if test $REPLACE_STRSTR = 1; then
c971b7fa
PA
26509
26510
26511
26512
26513
26514
26515
26516
63ce7108 26517 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
c971b7fa 26518
a512b375 26519 fi
c971b7fa
PA
26520
26521
26522
5e8754f9 26523 if test "$gl_cv_func_memchr_works" != yes; then
63ce7108 26524 REPLACE_STRSTR=1
c971b7fa 26525 else
63ce7108
TT
26526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
26527$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 26528if ${gl_cv_func_strstr_works_always+:} false; then :
c971b7fa
PA
26529 $as_echo_n "(cached) " >&6
26530else
26531 if test "$cross_compiling" = yes; then :
63ce7108 26532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
26533/* end confdefs.h. */
26534
26535#ifdef __GNU_LIBRARY__
26536 #include <features.h>
63ce7108 26537 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
c971b7fa
PA
26538 || defined __UCLIBC__
26539 Lucky user
26540 #endif
26541#elif defined __CYGWIN__
26542 #include <cygwin/version.h>
26543 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
26544 Lucky user
26545 #endif
26546#else
26547 Lucky user
26548#endif
26549
26550_ACEOF
26551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26552 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108 26553 gl_cv_func_strstr_works_always="guessing yes"
c971b7fa 26554else
63ce7108 26555 gl_cv_func_strstr_works_always="guessing no"
c971b7fa
PA
26556fi
26557rm -f conftest*
26558
26559
26560else
26561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26562/* end confdefs.h. */
26563
63ce7108 26564#include <string.h> /* for strstr */
c971b7fa
PA
26565#define P "_EF_BF_BD"
26566#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
26567#define NEEDLE P P P P P
26568
26569int
26570main ()
26571{
63ce7108 26572return !!strstr (HAYSTACK, NEEDLE);
c971b7fa
PA
26573
26574 ;
26575 return 0;
26576}
26577_ACEOF
26578if ac_fn_c_try_run "$LINENO"; then :
63ce7108 26579 gl_cv_func_strstr_works_always=yes
c971b7fa 26580else
63ce7108 26581 gl_cv_func_strstr_works_always=no
c971b7fa
PA
26582fi
26583rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26584 conftest.$ac_objext conftest.beam conftest.$ac_ext
26585fi
26586
26587
26588fi
63ce7108
TT
26589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
26590$as_echo "$gl_cv_func_strstr_works_always" >&6; }
26591 case "$gl_cv_func_strstr_works_always" in
40a73391
JK
26592 *yes) ;;
26593 *)
63ce7108 26594 REPLACE_STRSTR=1
40a73391
JK
26595 ;;
26596 esac
c971b7fa 26597 fi
8839a007 26598
63ce7108 26599 if test $REPLACE_STRSTR = 1; then
8839a007 26600
8690e634
JK
26601
26602
8690e634
JK
26603
26604
26605
26606
26607
63ce7108 26608 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
8690e634 26609
8690e634
JK
26610 fi
26611
8690e634
JK
26612
26613
8690e634 26614
8690e634 26615
63ce7108 26616 GNULIB_STRSTR=1
8690e634
JK
26617
26618
26619
8690e634
JK
26620
26621
63ce7108 26622$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
8690e634
JK
26623
26624
26625
26626
26627
26628
26629
421693b0
PA
26630 for ac_func in strtok_r
26631do :
26632 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
d0ac1c44 26633if test "x$ac_cv_func_strtok_r" = xyes; then :
421693b0
PA
26634 cat >>confdefs.h <<_ACEOF
26635#define HAVE_STRTOK_R 1
26636_ACEOF
26637
26638fi
26639done
26640
26641 if test $ac_cv_func_strtok_r = yes; then
26642 HAVE_STRTOK_R=1
26643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
26644$as_echo_n "checking whether strtok_r works... " >&6; }
d0ac1c44 26645if ${gl_cv_func_strtok_r_works+:} false; then :
421693b0
PA
26646 $as_echo_n "(cached) " >&6
26647else
26648 if test "$cross_compiling" = yes; then :
5e8754f9
SDJ
26649
26650 case "$host_os" in
26651 # Guess no on glibc systems.
26652 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
26653 *) gl_cv_func_strtok_r_works="guessing yes";;
421693b0
PA
26654 esac
26655
26656else
26657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26658/* end confdefs.h. */
26659
26660 #ifndef __OPTIMIZE__
26661 # define __OPTIMIZE__ 1
26662 #endif
26663 #undef __OPTIMIZE_SIZE__
26664 #undef __NO_INLINE__
26665 #include <stdlib.h>
26666 #include <string.h>
26667
26668int
26669main ()
26670{
26671static const char dummy[] = "\177\01a";
26672 char delimiters[] = "xxxxxxxx";
26673 char *save_ptr = (char *) dummy;
26674 strtok_r (delimiters, "x", &save_ptr);
26675 strtok_r (NULL, "x", &save_ptr);
26676 return 0;
26677
26678 ;
26679 return 0;
26680}
26681
26682_ACEOF
26683if ac_fn_c_try_run "$LINENO"; then :
26684 gl_cv_func_strtok_r_works=yes
26685else
26686 gl_cv_func_strtok_r_works=no
26687fi
26688rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26689 conftest.$ac_objext conftest.beam conftest.$ac_ext
26690fi
26691
26692
26693fi
26694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
26695$as_echo "$gl_cv_func_strtok_r_works" >&6; }
26696 case "$gl_cv_func_strtok_r_works" in
26697 *no)
26698 UNDEFINE_STRTOK_R=1
26699 ;;
26700 esac
26701 else
26702 HAVE_STRTOK_R=0
26703 fi
26704
472fa5ee
SM
26705 :
26706
26707
26708
26709
26710
421693b0
PA
26711 if test $ac_cv_have_decl_strtok_r = no; then
26712 HAVE_DECL_STRTOK_R=0
26713 fi
26714
26715 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
26716
26717
26718
26719
26720
26721
26722
26723
26724 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
26725
26726
26727 :
26728
26729 fi
26730
26731
26732
26733
26734
26735 GNULIB_STRTOK_R=1
26736
26737
26738
26739
26740
26741$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
26742
26743
26744
26745
26746
26747
26748
8690e634
JK
26749
26750
26751
26752
26753
8690e634 26754
09607c9e 26755
725e2999
JB
26756
26757
472fa5ee
SM
26758 :
26759
26760
26761
26762
26763
09607c9e
TT
26764
26765
26766
26767 if test $gl_cv_have_include_next = yes; then
26768 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26769 else
26770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
26771$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 26772if ${gl_cv_next_sys_stat_h+:} false; then :
09607c9e
TT
26773 $as_echo_n "(cached) " >&6
26774else
26775
26776 if test $ac_cv_header_sys_stat_h = yes; then
26777
26778
4a626d0a
PA
26779
26780
26781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
26782/* end confdefs.h. */
26783#include <sys/stat.h>
09607c9e 26784_ACEOF
4a626d0a
PA
26785 case "$host_os" in
26786 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26787 *) gl_absname_cpp="$ac_cpp" ;;
26788 esac
26789
26790 case "$host_os" in
26791 mingw*)
26792 gl_dirsep_regex='[/\\]'
26793 ;;
26794 *)
26795 gl_dirsep_regex='\/'
26796 ;;
26797 esac
26798 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26799 gl_header_literal_regex=`echo 'sys/stat.h' \
26800 | sed -e "$gl_make_literal_regex_sed"`
26801 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26802 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26803 s|^/[^/]|//&|
26804 p
26805 q
26806 }'
26807
26808 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26809 sed -n "$gl_absolute_header_sed"`
26810
26811 gl_header=$gl_cv_absolute_sys_stat_h
26812 gl_cv_next_sys_stat_h='"'$gl_header'"'
09607c9e
TT
26813 else
26814 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
26815 fi
26816
26817
26818fi
26819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
26820$as_echo "$gl_cv_next_sys_stat_h" >&6; }
26821 fi
26822 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
26823
26824 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26825 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26826 gl_next_as_first_directive='<'sys/stat.h'>'
26827 else
26828 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26829 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
26830 fi
26831 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
26832
26833
26834
26835
26836
26837
26838
26839
2196f55f 26840
09607c9e
TT
26841
26842
5e8754f9 26843 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
09607c9e 26844
5e8754f9 26845$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
09607c9e 26846
5e8754f9 26847 fi
09607c9e
TT
26848
26849 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
26850 #include <sys/stat.h>
26851"
d0ac1c44 26852if test "x$ac_cv_type_nlink_t" = xyes; then :
09607c9e
TT
26853
26854else
26855
26856$as_echo "#define nlink_t int" >>confdefs.h
26857
26858fi
26859
26860
26861
5e8754f9
SDJ
26862 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
26863 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
26864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
26865$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
26866if eval \${$as_gl_Symbol+:} false; then :
26867 $as_echo_n "(cached) " >&6
26868else
26869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26870/* end confdefs.h. */
26871#include <sys/stat.h>
26872
26873int
26874main ()
26875{
26876#undef $gl_func
26877 (void) $gl_func;
26878 ;
26879 return 0;
26880}
26881_ACEOF
26882if ac_fn_c_try_compile "$LINENO"; then :
26883 eval "$as_gl_Symbol=yes"
26884else
26885 eval "$as_gl_Symbol=no"
26886fi
26887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26888fi
26889eval ac_res=\$$as_gl_Symbol
26890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26891$as_echo "$ac_res" >&6; }
26892 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26893 cat >>confdefs.h <<_ACEOF
26894#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26895_ACEOF
09607c9e 26896
5e8754f9
SDJ
26897 eval ac_cv_have_decl_$gl_func=yes
26898fi
26899 done
09607c9e
TT
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
725e2999
JB
26911
26912
26913
26914
26915
26916
26917 :
26918
26919
26920
26921
26922
26923
26924
26925
26926 if test $gl_cv_have_include_next = yes; then
26927 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
26928 else
26929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
26930$as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
26931if ${gl_cv_next_sys_uio_h+:} false; then :
26932 $as_echo_n "(cached) " >&6
26933else
26934
26935 if test $ac_cv_header_sys_uio_h = yes; then
26936
26937
26938
26939
26940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26941/* end confdefs.h. */
26942#include <sys/uio.h>
26943_ACEOF
26944 case "$host_os" in
26945 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26946 *) gl_absname_cpp="$ac_cpp" ;;
26947 esac
26948
26949 case "$host_os" in
26950 mingw*)
26951 gl_dirsep_regex='[/\\]'
26952 ;;
26953 *)
26954 gl_dirsep_regex='\/'
26955 ;;
26956 esac
26957 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26958 gl_header_literal_regex=`echo 'sys/uio.h' \
26959 | sed -e "$gl_make_literal_regex_sed"`
26960 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26961 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26962 s|^/[^/]|//&|
26963 p
26964 q
26965 }'
26966
26967 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26968 sed -n "$gl_absolute_header_sed"`
26969
26970 gl_header=$gl_cv_absolute_sys_uio_h
26971 gl_cv_next_sys_uio_h='"'$gl_header'"'
26972 else
26973 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
26974 fi
26975
26976
26977fi
26978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
26979$as_echo "$gl_cv_next_sys_uio_h" >&6; }
26980 fi
26981 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
26982
26983 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26984 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26985 gl_next_as_first_directive='<'sys/uio.h'>'
26986 else
26987 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26988 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
26989 fi
26990 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
26991
26992
26993
26994
26995 if test $ac_cv_header_sys_uio_h = yes; then
26996 HAVE_SYS_UIO_H=1
26997 else
26998 HAVE_SYS_UIO_H=0
26999 fi
27000
27001
27002
27003
27004
2d8adcbd
MM
27005 :
27006
27007
27008
27009
09607c9e
TT
27010
27011
27012
8839a007
PA
27013
27014
27015
27016
09607c9e
TT
27017
27018
8839a007 27019
5abebf3c
CB
27020
27021
27022
27023
472fa5ee
SM
27024 :
27025
27026
27027
27028
27029
8839a007
PA
27030
27031
27032
27033 if test $gl_cv_have_include_next = yes; then
27034 gl_cv_next_unistd_h='<'unistd.h'>'
27035 else
27036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
27037$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
d0ac1c44 27038if ${gl_cv_next_unistd_h+:} false; then :
8839a007
PA
27039 $as_echo_n "(cached) " >&6
27040else
27041
27042 if test $ac_cv_header_unistd_h = yes; then
27043
27044
4a626d0a
PA
27045
27046
27047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8839a007
PA
27048/* end confdefs.h. */
27049#include <unistd.h>
8839a007 27050_ACEOF
4a626d0a
PA
27051 case "$host_os" in
27052 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27053 *) gl_absname_cpp="$ac_cpp" ;;
27054 esac
27055
27056 case "$host_os" in
27057 mingw*)
27058 gl_dirsep_regex='[/\\]'
27059 ;;
27060 *)
27061 gl_dirsep_regex='\/'
27062 ;;
27063 esac
27064 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27065 gl_header_literal_regex=`echo 'unistd.h' \
27066 | sed -e "$gl_make_literal_regex_sed"`
27067 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27068 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27069 s|^/[^/]|//&|
27070 p
27071 q
27072 }'
27073
27074 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27075 sed -n "$gl_absolute_header_sed"`
27076
27077 gl_header=$gl_cv_absolute_unistd_h
27078 gl_cv_next_unistd_h='"'$gl_header'"'
8839a007
PA
27079 else
27080 gl_cv_next_unistd_h='<'unistd.h'>'
27081 fi
27082
27083
27084fi
27085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
27086$as_echo "$gl_cv_next_unistd_h" >&6; }
27087 fi
27088 NEXT_UNISTD_H=$gl_cv_next_unistd_h
27089
27090 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27091 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27092 gl_next_as_first_directive='<'unistd.h'>'
27093 else
27094 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27095 gl_next_as_first_directive=$gl_cv_next_unistd_h
27096 fi
27097 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
27098
27099
27100
27101
27102 if test $ac_cv_header_unistd_h = yes; then
27103 HAVE_UNISTD_H=1
27104 else
27105 HAVE_UNISTD_H=0
27106 fi
27107
27108
27109
27110
27111
27112
27113
5e8754f9
SDJ
27114 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
27115 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27117$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27118if eval \${$as_gl_Symbol+:} false; then :
27119 $as_echo_n "(cached) " >&6
27120else
27121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27122/* end confdefs.h. */
27123
27124#if HAVE_UNISTD_H
27125# include <unistd.h>
27126#endif
27127/* Some systems declare various items in the wrong headers. */
27128#if !(defined __GLIBC__ && !defined __UCLIBC__)
27129# include <fcntl.h>
27130# include <stdio.h>
27131# include <stdlib.h>
27132# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
27133# include <io.h>
27134# endif
27135#endif
27136
27137int
27138main ()
27139{
27140#undef $gl_func
27141 (void) $gl_func;
27142 ;
27143 return 0;
27144}
27145_ACEOF
27146if ac_fn_c_try_compile "$LINENO"; then :
27147 eval "$as_gl_Symbol=yes"
27148else
27149 eval "$as_gl_Symbol=no"
27150fi
27151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27152fi
27153eval ac_res=\$$as_gl_Symbol
27154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27155$as_echo "$ac_res" >&6; }
27156 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27157 cat >>confdefs.h <<_ACEOF
27158#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27159_ACEOF
8839a007 27160
5e8754f9
SDJ
27161 eval ac_cv_have_decl_$gl_func=yes
27162fi
27163 done
8839a007
PA
27164
27165
27166
27167
472fa5ee
SM
27168 :
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178 :
27179
8839a007 27180
6ec2e0f5
SDJ
27181
27182
27183
3d99e817
AK
27184 if test $ac_cv_have_decl_unsetenv = no; then
27185 HAVE_DECL_UNSETENV=0
27186 fi
27187 for ac_func in unsetenv
27188do :
27189 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
d0ac1c44 27190if test "x$ac_cv_func_unsetenv" = xyes; then :
3d99e817
AK
27191 cat >>confdefs.h <<_ACEOF
27192#define HAVE_UNSETENV 1
27193_ACEOF
27194
27195fi
27196done
27197
27198 if test $ac_cv_func_unsetenv = no; then
27199 HAVE_UNSETENV=0
27200 else
27201 HAVE_UNSETENV=1
27202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
27203$as_echo_n "checking for unsetenv() return type... " >&6; }
d0ac1c44 27204if ${gt_cv_func_unsetenv_ret+:} false; then :
3d99e817
AK
27205 $as_echo_n "(cached) " >&6
27206else
27207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27208/* end confdefs.h. */
27209
27210#undef _BSD
27211#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
27212#include <stdlib.h>
27213extern
27214#ifdef __cplusplus
27215"C"
27216#endif
27217int unsetenv (const char *name);
27218
27219int
27220main ()
27221{
27222
27223 ;
27224 return 0;
27225}
27226_ACEOF
27227if ac_fn_c_try_compile "$LINENO"; then :
27228 gt_cv_func_unsetenv_ret='int'
27229else
27230 gt_cv_func_unsetenv_ret='void'
27231fi
27232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27233fi
27234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
27235$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
27236 if test $gt_cv_func_unsetenv_ret = 'void'; then
27237
27238$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
27239
27240 REPLACE_UNSETENV=1
27241 fi
27242
27243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
27244$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
d0ac1c44 27245if ${gl_cv_func_unsetenv_works+:} false; then :
3d99e817
AK
27246 $as_echo_n "(cached) " >&6
27247else
27248 if test "$cross_compiling" = yes; then :
27249 case "$host_os" in
27250 # Guess yes on glibc systems.
27251 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
27252 # If we don't know, assume the worst.
27253 *) gl_cv_func_unsetenv_works="guessing no" ;;
27254 esac
27255
27256else
27257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27258/* end confdefs.h. */
27259
27260 #include <stdlib.h>
27261 #include <errno.h>
27262 extern char **environ;
27263
27264int
27265main ()
27266{
27267
27268 char entry1[] = "a=1";
27269 char entry2[] = "b=2";
27270 char *env[] = { entry1, entry2, NULL };
27271 if (putenv ((char *) "a=1")) return 1;
27272 if (putenv (entry2)) return 2;
27273 entry2[0] = 'a';
27274 unsetenv ("a");
27275 if (getenv ("a")) return 3;
27276 if (!unsetenv ("") || errno != EINVAL) return 4;
27277 entry2[0] = 'b';
27278 environ = env;
27279 if (!getenv ("a")) return 5;
27280 entry2[0] = 'a';
27281 unsetenv ("a");
27282 if (getenv ("a")) return 6;
27283
27284 ;
27285 return 0;
27286}
27287_ACEOF
27288if ac_fn_c_try_run "$LINENO"; then :
27289 gl_cv_func_unsetenv_works=yes
27290else
27291 gl_cv_func_unsetenv_works=no
27292fi
27293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27294 conftest.$ac_objext conftest.beam conftest.$ac_ext
27295fi
27296
27297fi
27298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
27299$as_echo "$gl_cv_func_unsetenv_works" >&6; }
27300 case "$gl_cv_func_unsetenv_works" in
27301 *yes) ;;
27302 *)
27303 REPLACE_UNSETENV=1
27304 ;;
27305 esac
27306 fi
27307
27308 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
27309
27310
27311
27312
27313
27314
27315
27316
27317 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
27318
27319
27320
27321
472fa5ee
SM
27322 :
27323
27324
27325
27326
27327
3d99e817
AK
27328
27329 fi
27330
27331
27332
27333
27334
27335 GNULIB_UNSETENV=1
27336
27337
27338
27339
27340
27341$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
27342
27343
27344
27345
27346
27347
8839a007
PA
27348
27349
27350
27351
27352
27353
472fa5ee
SM
27354 :
27355
27356
27357
27358
27359
8839a007 27360
8690e634
JK
27361
27362
27363 if test $gl_cv_have_include_next = yes; then
27364 gl_cv_next_wchar_h='<'wchar.h'>'
27365 else
27366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
27367$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
d0ac1c44 27368if ${gl_cv_next_wchar_h+:} false; then :
8690e634
JK
27369 $as_echo_n "(cached) " >&6
27370else
27371
27372 if test $ac_cv_header_wchar_h = yes; then
27373
27374
4a626d0a
PA
27375
27376
27377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
27378/* end confdefs.h. */
27379#include <wchar.h>
8690e634 27380_ACEOF
4a626d0a
PA
27381 case "$host_os" in
27382 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27383 *) gl_absname_cpp="$ac_cpp" ;;
27384 esac
27385
27386 case "$host_os" in
27387 mingw*)
27388 gl_dirsep_regex='[/\\]'
27389 ;;
27390 *)
27391 gl_dirsep_regex='\/'
27392 ;;
27393 esac
27394 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27395 gl_header_literal_regex=`echo 'wchar.h' \
27396 | sed -e "$gl_make_literal_regex_sed"`
27397 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27398 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27399 s|^/[^/]|//&|
27400 p
27401 q
27402 }'
27403
27404 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27405 sed -n "$gl_absolute_header_sed"`
27406
27407 gl_header=$gl_cv_absolute_wchar_h
27408 gl_cv_next_wchar_h='"'$gl_header'"'
8690e634
JK
27409 else
27410 gl_cv_next_wchar_h='<'wchar.h'>'
27411 fi
27412
27413
27414fi
27415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
27416$as_echo "$gl_cv_next_wchar_h" >&6; }
27417 fi
27418 NEXT_WCHAR_H=$gl_cv_next_wchar_h
27419
27420 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27421 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27422 gl_next_as_first_directive='<'wchar.h'>'
27423 else
27424 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27425 gl_next_as_first_directive=$gl_cv_next_wchar_h
27426 fi
27427 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
27428
27429
27430
27431
27432 if test $ac_cv_header_wchar_h = yes; then
27433 HAVE_WCHAR_H=1
27434 else
27435 HAVE_WCHAR_H=0
27436 fi
27437
c971b7fa
PA
27438
27439
27440
27441
8690e634
JK
27442 if test $gt_cv_c_wint_t = yes; then
27443 HAVE_WINT_T=1
27444 else
27445 HAVE_WINT_T=0
27446 fi
c971b7fa
PA
27447
27448
27449
5e8754f9
SDJ
27450 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
27451 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27453$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27454if eval \${$as_gl_Symbol+:} false; then :
27455 $as_echo_n "(cached) " >&6
27456else
27457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27458/* end confdefs.h. */
8690e634 27459
5e8754f9
SDJ
27460/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27461 <wchar.h>.
27462 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27463 included before <wchar.h>. */
27464#if !(defined __GLIBC__ && !defined __UCLIBC__)
27465# include <stddef.h>
27466# include <stdio.h>
27467# include <time.h>
27468#endif
27469#include <wchar.h>
c971b7fa 27470
5e8754f9
SDJ
27471int
27472main ()
27473{
27474#undef $gl_func
27475 (void) $gl_func;
27476 ;
27477 return 0;
27478}
27479_ACEOF
27480if ac_fn_c_try_compile "$LINENO"; then :
27481 eval "$as_gl_Symbol=yes"
27482else
27483 eval "$as_gl_Symbol=no"
27484fi
27485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27486fi
27487eval ac_res=\$$as_gl_Symbol
27488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27489$as_echo "$ac_res" >&6; }
27490 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27491 cat >>confdefs.h <<_ACEOF
27492#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27493_ACEOF
c971b7fa 27494
5e8754f9
SDJ
27495 eval ac_cv_have_decl_$gl_func=yes
27496fi
27497 done
8690e634
JK
27498
27499
27500
27501
27502
27503
27504
472fa5ee
SM
27505 :
27506
27507
27508
27509
27510
8690e634
JK
27511 if test $ac_cv_func_iswcntrl = yes; then
27512 HAVE_ISWCNTRL=1
27513 else
27514 HAVE_ISWCNTRL=0
27515 fi
27516
27517
27518
8690e634
JK
27519 if test $gt_cv_c_wint_t = yes; then
27520 HAVE_WINT_T=1
27521 else
27522 HAVE_WINT_T=0
27523 fi
27524
27525
27526
27527
27528
27529
c971b7fa 27530
8690e634 27531
472fa5ee
SM
27532 :
27533
27534
27535
27536
27537
c971b7fa
PA
27538
27539
27540
27541 if test $gl_cv_have_include_next = yes; then
8690e634 27542 gl_cv_next_wctype_h='<'wctype.h'>'
c971b7fa 27543 else
8690e634
JK
27544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
27545$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
d0ac1c44 27546if ${gl_cv_next_wctype_h+:} false; then :
c971b7fa
PA
27547 $as_echo_n "(cached) " >&6
27548else
27549
8690e634
JK
27550 if test $ac_cv_header_wctype_h = yes; then
27551
27552
4a626d0a
PA
27553
27554
27555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 27556/* end confdefs.h. */
8690e634 27557#include <wctype.h>
c971b7fa 27558_ACEOF
4a626d0a
PA
27559 case "$host_os" in
27560 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27561 *) gl_absname_cpp="$ac_cpp" ;;
27562 esac
27563
27564 case "$host_os" in
27565 mingw*)
27566 gl_dirsep_regex='[/\\]'
27567 ;;
27568 *)
27569 gl_dirsep_regex='\/'
27570 ;;
27571 esac
27572 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27573 gl_header_literal_regex=`echo 'wctype.h' \
27574 | sed -e "$gl_make_literal_regex_sed"`
27575 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27576 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27577 s|^/[^/]|//&|
27578 p
27579 q
27580 }'
27581
27582 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27583 sed -n "$gl_absolute_header_sed"`
27584
27585 gl_header=$gl_cv_absolute_wctype_h
27586 gl_cv_next_wctype_h='"'$gl_header'"'
8690e634
JK
27587 else
27588 gl_cv_next_wctype_h='<'wctype.h'>'
27589 fi
c971b7fa
PA
27590
27591
27592fi
8690e634
JK
27593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
27594$as_echo "$gl_cv_next_wctype_h" >&6; }
c971b7fa 27595 fi
8690e634 27596 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
c971b7fa
PA
27597
27598 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27599 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8690e634 27600 gl_next_as_first_directive='<'wctype.h'>'
c971b7fa
PA
27601 else
27602 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8690e634 27603 gl_next_as_first_directive=$gl_cv_next_wctype_h
c971b7fa 27604 fi
8690e634
JK
27605 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
27606
27607
27608
27609
27610 if test $ac_cv_header_wctype_h = yes; then
27611 if test $ac_cv_func_iswcntrl = yes; then
27612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
27613$as_echo_n "checking whether iswcntrl works... " >&6; }
d0ac1c44 27614if ${gl_cv_func_iswcntrl_works+:} false; then :
8690e634
JK
27615 $as_echo_n "(cached) " >&6
27616else
27617
27618 if test "$cross_compiling" = yes; then :
5e8754f9 27619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
27620/* end confdefs.h. */
27621#include <stdlib.h>
27622 #if __GNU_LIBRARY__ == 1
27623 Linux libc5 i18n is broken.
27624 #endif
27625int
27626main ()
27627{
27628
27629 ;
27630 return 0;
27631}
27632_ACEOF
27633if ac_fn_c_try_compile "$LINENO"; then :
27634 gl_cv_func_iswcntrl_works="guessing yes"
27635else
27636 gl_cv_func_iswcntrl_works="guessing no"
27637fi
27638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27639
27640else
27641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27642/* end confdefs.h. */
27643
27644 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27645 included before <wchar.h>.
27646 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27647 must be included before <wchar.h>. */
27648 #include <stddef.h>
27649 #include <stdio.h>
27650 #include <time.h>
27651 #include <wchar.h>
27652 #include <wctype.h>
27653 int main () { return iswprint ('x') == 0; }
27654
27655_ACEOF
27656if ac_fn_c_try_run "$LINENO"; then :
27657 gl_cv_func_iswcntrl_works=yes
27658else
27659 gl_cv_func_iswcntrl_works=no
27660fi
27661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27662 conftest.$ac_objext conftest.beam conftest.$ac_ext
27663fi
27664
27665
27666fi
27667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
27668$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
27669 fi
27670 HAVE_WCTYPE_H=1
27671 else
27672 HAVE_WCTYPE_H=0
27673 fi
27674
27675
27676 case "$gl_cv_func_iswcntrl_works" in
27677 *yes) REPLACE_ISWCNTRL=0 ;;
27678 *) REPLACE_ISWCNTRL=1 ;;
27679 esac
27680
27681
27682 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
27683 :
27684 fi
27685
27686 if test $REPLACE_ISWCNTRL = 1; then
27687 REPLACE_TOWLOWER=1
27688 else
27689 for ac_func in towlower
27690do :
27691 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
d0ac1c44 27692if test "x$ac_cv_func_towlower" = xyes; then :
8690e634
JK
27693 cat >>confdefs.h <<_ACEOF
27694#define HAVE_TOWLOWER 1
27695_ACEOF
27696
27697fi
27698done
27699
27700 if test $ac_cv_func_towlower = yes; then
27701 REPLACE_TOWLOWER=0
27702 else
27703 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27704 included before <wchar.h>.
27705 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27706 must be included before <wchar.h>. */
27707 #include <stddef.h>
27708 #include <stdio.h>
27709 #include <time.h>
27710 #include <wchar.h>
27711 #if HAVE_WCTYPE_H
27712 # include <wctype.h>
27713 #endif
27714
27715"
d0ac1c44 27716if test "x$ac_cv_have_decl_towlower" = xyes; then :
8690e634
JK
27717 ac_have_decl=1
27718else
27719 ac_have_decl=0
27720fi
27721
27722cat >>confdefs.h <<_ACEOF
27723#define HAVE_DECL_TOWLOWER $ac_have_decl
27724_ACEOF
27725
27726 if test $ac_cv_have_decl_towlower = yes; then
27727 REPLACE_TOWLOWER=1
27728 else
27729 REPLACE_TOWLOWER=0
27730 fi
27731 fi
27732 fi
27733
27734
27735 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
27736 :
27737 fi
27738
27739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
27740$as_echo_n "checking for wctype_t... " >&6; }
d0ac1c44 27741if ${gl_cv_type_wctype_t+:} false; then :
8690e634
JK
27742 $as_echo_n "(cached) " >&6
27743else
27744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27745/* end confdefs.h. */
27746/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27747 included before <wchar.h>.
27748 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27749 must be included before <wchar.h>. */
27750 #include <stddef.h>
27751 #include <stdio.h>
27752 #include <time.h>
27753 #include <wchar.h>
27754 #if HAVE_WCTYPE_H
27755 # include <wctype.h>
27756 #endif
27757 wctype_t a;
27758
27759int
27760main ()
27761{
27762
27763 ;
27764 return 0;
27765}
27766_ACEOF
27767if ac_fn_c_try_compile "$LINENO"; then :
27768 gl_cv_type_wctype_t=yes
27769else
27770 gl_cv_type_wctype_t=no
27771fi
27772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 27773
8690e634
JK
27774fi
27775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
27776$as_echo "$gl_cv_type_wctype_t" >&6; }
27777 if test $gl_cv_type_wctype_t = no; then
27778 HAVE_WCTYPE_T=0
27779 fi
27780
27781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
27782$as_echo_n "checking for wctrans_t... " >&6; }
d0ac1c44 27783if ${gl_cv_type_wctrans_t+:} false; then :
8690e634
JK
27784 $as_echo_n "(cached) " >&6
27785else
27786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27787/* end confdefs.h. */
27788/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
27789 included before <wchar.h>.
27790 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
27791 must be included before <wchar.h>. */
27792 #include <stddef.h>
27793 #include <stdio.h>
27794 #include <time.h>
27795 #include <wchar.h>
27796 #include <wctype.h>
27797 wctrans_t a;
c971b7fa 27798
8690e634
JK
27799int
27800main ()
27801{
c971b7fa 27802
8690e634
JK
27803 ;
27804 return 0;
27805}
27806_ACEOF
27807if ac_fn_c_try_compile "$LINENO"; then :
27808 gl_cv_type_wctrans_t=yes
27809else
27810 gl_cv_type_wctrans_t=no
27811fi
27812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 27813
8690e634
JK
27814fi
27815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
27816$as_echo "$gl_cv_type_wctrans_t" >&6; }
27817 if test $gl_cv_type_wctrans_t = no; then
27818 HAVE_WCTRANS_T=0
c971b7fa
PA
27819 fi
27820
27821
5e8754f9
SDJ
27822 for gl_func in wctype iswctype wctrans towctrans ; do
27823 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27825$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27826if eval \${$as_gl_Symbol+:} false; then :
27827 $as_echo_n "(cached) " >&6
27828else
27829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27830/* end confdefs.h. */
27831
27832/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
27833 <wchar.h>.
27834 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
27835 included before <wchar.h>. */
27836#if !(defined __GLIBC__ && !defined __UCLIBC__)
27837# include <stddef.h>
27838# include <stdio.h>
27839# include <time.h>
27840# include <wchar.h>
27841#endif
27842#include <wctype.h>
27843
27844int
27845main ()
27846{
27847#undef $gl_func
27848 (void) $gl_func;
27849 ;
27850 return 0;
27851}
27852_ACEOF
27853if ac_fn_c_try_compile "$LINENO"; then :
27854 eval "$as_gl_Symbol=yes"
27855else
27856 eval "$as_gl_Symbol=no"
27857fi
27858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27859fi
27860eval ac_res=\$$as_gl_Symbol
27861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27862$as_echo "$ac_res" >&6; }
27863 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27864 cat >>confdefs.h <<_ACEOF
27865#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27866_ACEOF
c971b7fa 27867
5e8754f9
SDJ
27868 eval ac_cv_have_decl_$gl_func=yes
27869fi
27870 done
c971b7fa
PA
27871
27872
27873 # End of code from modules
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883 gltests_libdeps=
27884 gltests_ltlibdeps=
27885
27886
27887
27888
27889
27890
27891
27892
27893
27894 gl_source_base='tests'
27895 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
27896
27897 gl_module_indicator_condition=$gltests_WITNESS
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907 LIBGNU_LIBDEPS="$gl_libdeps"
27908
27909 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
27910
27911
27912
27913# We don't use automake, but gnulib does. This line lets us generate
27914# its Makefile.in.
d0ac1c44 27915am__api_version='1.15'
c971b7fa
PA
27916
27917# Find a good install program. We prefer a C program (faster),
27918# so one script is as good as another. But avoid the broken or
27919# incompatible versions:
27920# SysV /etc/install, /usr/sbin/install
27921# SunOS /usr/etc/install
27922# IRIX /sbin/install
27923# AIX /bin/install
27924# AmigaOS /C/install, which installs bootblocks on floppy discs
27925# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
27926# AFS /usr/afsws/bin/install, which mishandles nonexistent args
27927# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
27928# OS/2's system install, which has a completely different semantic
27929# ./install, which can be erroneously created by make from ./install.sh.
27930# Reject install programs that cannot install multiple files.
27931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
27932$as_echo_n "checking for a BSD-compatible install... " >&6; }
27933if test -z "$INSTALL"; then
d0ac1c44 27934if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
27935 $as_echo_n "(cached) " >&6
27936else
27937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27938for as_dir in $PATH
27939do
27940 IFS=$as_save_IFS
27941 test -z "$as_dir" && as_dir=.
27942 # Account for people who put trailing slashes in PATH elements.
27943case $as_dir/ in #((
27944 ./ | .// | /[cC]/* | \
27945 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
27946 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
27947 /usr/ucb/* ) ;;
27948 *)
27949 # OSF1 and SCO ODT 3.0 have their own names for install.
27950 # Don't use installbsd from OSF since it installs stuff as root
27951 # by default.
27952 for ac_prog in ginstall scoinst install; do
27953 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 27954 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
27955 if test $ac_prog = install &&
27956 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
27957 # AIX install. It has an incompatible calling convention.
27958 :
27959 elif test $ac_prog = install &&
27960 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
27961 # program-specific install script used by HP pwplus--don't use.
27962 :
27963 else
27964 rm -rf conftest.one conftest.two conftest.dir
27965 echo one > conftest.one
27966 echo two > conftest.two
27967 mkdir conftest.dir
27968 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
27969 test -s conftest.one && test -s conftest.two &&
27970 test -s conftest.dir/conftest.one &&
27971 test -s conftest.dir/conftest.two
27972 then
27973 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
27974 break 3
27975 fi
27976 fi
27977 fi
27978 done
27979 done
27980 ;;
27981esac
27982
27983 done
27984IFS=$as_save_IFS
27985
27986rm -rf conftest.one conftest.two conftest.dir
27987
27988fi
27989 if test "${ac_cv_path_install+set}" = set; then
27990 INSTALL=$ac_cv_path_install
27991 else
27992 # As a last resort, use the slow shell script. Don't cache a
27993 # value for INSTALL within a source directory, because that will
27994 # break other packages using the cache if that directory is
27995 # removed, or if the value is a relative name.
27996 INSTALL=$ac_install_sh
27997 fi
27998fi
27999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
28000$as_echo "$INSTALL" >&6; }
28001
28002# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
28003# It thinks the first close brace ends the variable substitution.
28004test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
28005
28006test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
28007
28008test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
28009
28010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
28011$as_echo_n "checking whether build environment is sane... " >&6; }
c971b7fa
PA
28012# Reject unsafe characters in $srcdir or the absolute working directory
28013# name. Accept space and tab only in the latter.
28014am_lf='
28015'
28016case `pwd` in
28017 *[\\\"\#\$\&\'\`$am_lf]*)
d0ac1c44 28018 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
c971b7fa
PA
28019esac
28020case $srcdir in
28021 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
d0ac1c44 28022 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
c971b7fa
PA
28023esac
28024
d0ac1c44 28025# Do 'set' in a subshell so we don't clobber the current shell's
c971b7fa
PA
28026# arguments. Must try -L first in case configure is actually a
28027# symlink; some systems play weird games with the mod time of symlinks
28028# (eg FreeBSD returns the mod time of the symlink's containing
28029# directory).
28030if (
d0ac1c44
SM
28031 am_has_slept=no
28032 for am_try in 1 2; do
28033 echo "timestamp, slept: $am_has_slept" > conftest.file
28034 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
28035 if test "$*" = "X"; then
28036 # -L didn't work.
28037 set X `ls -t "$srcdir/configure" conftest.file`
28038 fi
28039 if test "$*" != "X $srcdir/configure conftest.file" \
28040 && test "$*" != "X conftest.file $srcdir/configure"; then
28041
28042 # If neither matched, then we have a broken ls. This can happen
28043 # if, for instance, CONFIG_SHELL is bash and it inherits a
28044 # broken ls alias from the environment. This has actually
28045 # happened. Such a system could not be considered "sane".
28046 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
28047 alias in your environment" "$LINENO" 5
28048 fi
28049 if test "$2" = conftest.file || test $am_try -eq 2; then
28050 break
28051 fi
28052 # Just in case.
28053 sleep 1
28054 am_has_slept=yes
28055 done
c971b7fa
PA
28056 test "$2" = conftest.file
28057 )
28058then
28059 # Ok.
28060 :
28061else
d0ac1c44 28062 as_fn_error $? "newly created file is older than distributed files!
c971b7fa
PA
28063Check your system clock" "$LINENO" 5
28064fi
28065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28066$as_echo "yes" >&6; }
d0ac1c44
SM
28067# If we didn't sleep, we still need to ensure time stamps of config.status and
28068# generated files are strictly newer.
28069am_sleep_pid=
28070if grep 'slept: no' conftest.file >/dev/null 2>&1; then
28071 ( sleep 1 ) &
28072 am_sleep_pid=$!
28073fi
28074
28075rm -f conftest.file
28076
c971b7fa
PA
28077test "$program_prefix" != NONE &&
28078 program_transform_name="s&^&$program_prefix&;$program_transform_name"
28079# Use a double $ so make ignores it.
28080test "$program_suffix" != NONE &&
28081 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
28082# Double any \ or $.
28083# By default was `s,x,x', remove it if useless.
28084ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
28085program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
28086
c971b7fa
PA
28087if test x"${MISSING+set}" != xset; then
28088 case $am_aux_dir in
28089 *\ * | *\ *)
28090 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
28091 *)
28092 MISSING="\${SHELL} $am_aux_dir/missing" ;;
28093 esac
28094fi
28095# Use eval to expand $SHELL
d0ac1c44
SM
28096if eval "$MISSING --is-lightweight"; then
28097 am_missing_run="$MISSING "
c971b7fa
PA
28098else
28099 am_missing_run=
d0ac1c44
SM
28100 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
28101$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
c971b7fa
PA
28102fi
28103
d0ac1c44 28104if test x"${install_sh+set}" != xset; then
c971b7fa
PA
28105 case $am_aux_dir in
28106 *\ * | *\ *)
28107 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
28108 *)
28109 install_sh="\${SHELL} $am_aux_dir/install-sh"
28110 esac
28111fi
28112
d0ac1c44
SM
28113# Installed binaries are usually stripped using 'strip' when the user
28114# run "make install-strip". However 'strip' might not be the right
c971b7fa 28115# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 28116# will honor the 'STRIP' environment variable to overrule this program.
c971b7fa
PA
28117if test "$cross_compiling" != no; then
28118 if test -n "$ac_tool_prefix"; then
28119 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
28120set dummy ${ac_tool_prefix}strip; ac_word=$2
28121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28122$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 28123if ${ac_cv_prog_STRIP+:} false; then :
c971b7fa
PA
28124 $as_echo_n "(cached) " >&6
28125else
28126 if test -n "$STRIP"; then
28127 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
28128else
28129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28130for as_dir in $PATH
28131do
28132 IFS=$as_save_IFS
28133 test -z "$as_dir" && as_dir=.
28134 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 28135 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
28136 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
28137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28138 break 2
28139 fi
28140done
28141 done
28142IFS=$as_save_IFS
28143
28144fi
28145fi
28146STRIP=$ac_cv_prog_STRIP
28147if test -n "$STRIP"; then
28148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
28149$as_echo "$STRIP" >&6; }
28150else
28151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28152$as_echo "no" >&6; }
28153fi
28154
28155
28156fi
28157if test -z "$ac_cv_prog_STRIP"; then
28158 ac_ct_STRIP=$STRIP
28159 # Extract the first word of "strip", so it can be a program name with args.
28160set dummy strip; ac_word=$2
28161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28162$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 28163if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
c971b7fa
PA
28164 $as_echo_n "(cached) " >&6
28165else
28166 if test -n "$ac_ct_STRIP"; then
28167 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
28168else
28169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28170for as_dir in $PATH
28171do
28172 IFS=$as_save_IFS
28173 test -z "$as_dir" && as_dir=.
28174 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 28175 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
28176 ac_cv_prog_ac_ct_STRIP="strip"
28177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28178 break 2
28179 fi
28180done
28181 done
28182IFS=$as_save_IFS
28183
28184fi
28185fi
28186ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
28187if test -n "$ac_ct_STRIP"; then
28188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
28189$as_echo "$ac_ct_STRIP" >&6; }
28190else
28191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28192$as_echo "no" >&6; }
28193fi
28194
28195 if test "x$ac_ct_STRIP" = x; then
28196 STRIP=":"
28197 else
28198 case $cross_compiling:$ac_tool_warned in
28199yes:)
28200{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28201$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28202ac_tool_warned=yes ;;
28203esac
28204 STRIP=$ac_ct_STRIP
28205 fi
28206else
28207 STRIP="$ac_cv_prog_STRIP"
28208fi
28209
28210fi
28211INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
28212
c971b7fa
PA
28213for ac_prog in gawk mawk nawk awk
28214do
28215 # Extract the first word of "$ac_prog", so it can be a program name with args.
28216set dummy $ac_prog; ac_word=$2
28217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28218$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 28219if ${ac_cv_prog_AWK+:} false; then :
c971b7fa
PA
28220 $as_echo_n "(cached) " >&6
28221else
28222 if test -n "$AWK"; then
28223 ac_cv_prog_AWK="$AWK" # Let the user override the test.
28224else
28225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28226for as_dir in $PATH
28227do
28228 IFS=$as_save_IFS
28229 test -z "$as_dir" && as_dir=.
28230 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 28231 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
28232 ac_cv_prog_AWK="$ac_prog"
28233 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28234 break 2
28235 fi
28236done
28237 done
28238IFS=$as_save_IFS
28239
28240fi
28241fi
28242AWK=$ac_cv_prog_AWK
28243if test -n "$AWK"; then
28244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
28245$as_echo "$AWK" >&6; }
28246else
28247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28248$as_echo "no" >&6; }
28249fi
28250
28251
28252 test -n "$AWK" && break
28253done
28254
28255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
28256$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
28257set x ${MAKE-make}
28258ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
d0ac1c44 28259if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
c971b7fa
PA
28260 $as_echo_n "(cached) " >&6
28261else
28262 cat >conftest.make <<\_ACEOF
28263SHELL = /bin/sh
28264all:
28265 @echo '@@@%%%=$(MAKE)=@@@%%%'
28266_ACEOF
d0ac1c44 28267# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
c971b7fa
PA
28268case `${MAKE-make} -f conftest.make 2>/dev/null` in
28269 *@@@%%%=?*=@@@%%%*)
28270 eval ac_cv_prog_make_${ac_make}_set=yes;;
28271 *)
28272 eval ac_cv_prog_make_${ac_make}_set=no;;
28273esac
28274rm -f conftest.make
28275fi
28276if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
28277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28278$as_echo "yes" >&6; }
28279 SET_MAKE=
28280else
28281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28282$as_echo "no" >&6; }
28283 SET_MAKE="MAKE=${MAKE-make}"
28284fi
28285
28286rm -rf .tst 2>/dev/null
28287mkdir .tst 2>/dev/null
28288if test -d .tst; then
28289 am__leading_dot=.
28290else
28291 am__leading_dot=_
28292fi
28293rmdir .tst 2>/dev/null
28294
28295DEPDIR="${am__leading_dot}deps"
28296
28297ac_config_commands="$ac_config_commands depfiles"
28298
28299
28300am_make=${MAKE-make}
28301cat > confinc << 'END'
28302am__doit:
28303 @echo this is the am__doit target
28304.PHONY: am__doit
28305END
28306# If we don't find an include directive, just comment out the code.
28307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
28308$as_echo_n "checking for style of include used by $am_make... " >&6; }
28309am__include="#"
28310am__quote=
28311_am_result=none
28312# First try GNU make style include.
28313echo "include confinc" > confmf
d0ac1c44 28314# Ignore all kinds of additional output from 'make'.
c971b7fa
PA
28315case `$am_make -s -f confmf 2> /dev/null` in #(
28316*the\ am__doit\ target*)
28317 am__include=include
28318 am__quote=
28319 _am_result=GNU
28320 ;;
28321esac
28322# Now try BSD make style include.
28323if test "$am__include" = "#"; then
28324 echo '.include "confinc"' > confmf
28325 case `$am_make -s -f confmf 2> /dev/null` in #(
28326 *the\ am__doit\ target*)
28327 am__include=.include
28328 am__quote="\""
28329 _am_result=BSD
28330 ;;
28331 esac
28332fi
28333
28334
28335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
28336$as_echo "$_am_result" >&6; }
28337rm -f confinc confmf
28338
28339# Check whether --enable-dependency-tracking was given.
28340if test "${enable_dependency_tracking+set}" = set; then :
28341 enableval=$enable_dependency_tracking;
28342fi
28343
28344if test "x$enable_dependency_tracking" != xno; then
28345 am_depcomp="$ac_aux_dir/depcomp"
28346 AMDEPBACKSLASH='\'
d0ac1c44 28347 am__nodep='_no'
c971b7fa
PA
28348fi
28349 if test "x$enable_dependency_tracking" != xno; then
28350 AMDEP_TRUE=
28351 AMDEP_FALSE='#'
28352else
28353 AMDEP_TRUE='#'
28354 AMDEP_FALSE=
28355fi
28356
28357
d0ac1c44
SM
28358# Check whether --enable-silent-rules was given.
28359if test "${enable_silent_rules+set}" = set; then :
28360 enableval=$enable_silent_rules;
28361fi
28362
28363case $enable_silent_rules in # (((
28364 yes) AM_DEFAULT_VERBOSITY=0;;
28365 no) AM_DEFAULT_VERBOSITY=1;;
28366 *) AM_DEFAULT_VERBOSITY=1;;
28367esac
28368am_make=${MAKE-make}
28369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
28370$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
28371if ${am_cv_make_support_nested_variables+:} false; then :
28372 $as_echo_n "(cached) " >&6
28373else
28374 if $as_echo 'TRUE=$(BAR$(V))
28375BAR0=false
28376BAR1=true
28377V=1
28378am__doit:
28379 @$(TRUE)
28380.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
28381 am_cv_make_support_nested_variables=yes
28382else
28383 am_cv_make_support_nested_variables=no
28384fi
28385fi
28386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
28387$as_echo "$am_cv_make_support_nested_variables" >&6; }
28388if test $am_cv_make_support_nested_variables = yes; then
28389 AM_V='$(V)'
28390 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
28391else
28392 AM_V=$AM_DEFAULT_VERBOSITY
28393 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
28394fi
28395AM_BACKSLASH='\'
28396
c971b7fa
PA
28397if test "`cd $srcdir && pwd`" != "`pwd`"; then
28398 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
28399 # is not polluted with repeated "-I."
28400 am__isrc=' -I$(srcdir)'
28401 # test to see if srcdir already configured
28402 if test -f $srcdir/config.status; then
d0ac1c44 28403 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
c971b7fa
PA
28404 fi
28405fi
28406
28407# test whether we have cygpath
28408if test -z "$CYGPATH_W"; then
28409 if (cygpath --version) >/dev/null 2>/dev/null; then
28410 CYGPATH_W='cygpath -w'
28411 else
28412 CYGPATH_W=echo
28413 fi
28414fi
28415
28416
28417# Define the identity of the package.
d0ac1c44
SM
28418 PACKAGE='libgnu'
28419 VERSION='UNUSED-VERSION'
c971b7fa
PA
28420
28421
28422# Some tools Automake needs.
28423
28424ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
28425
28426
28427AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
28428
28429
28430AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
28431
28432
28433AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
28434
28435
28436MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
28437
d0ac1c44
SM
28438# For better backward compatibility. To be removed once Automake 1.9.x
28439# dies out for good. For more background, see:
28440# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
28441# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
28442mkdir_p='$(MKDIR_P)'
28443
28444# We need awk for the "check" target (and possibly the TAP driver). The
28445# system "awk" is bad on some platforms.
28446# Always define AMTAR for backward compatibility. Yes, it's still used
28447# in the wild :-( We should find a proper way to deprecate it ...
28448AMTAR='$${TAR-tar}'
28449
28450
28451# We'll loop over all known methods to create a tar archive until one works.
28452_am_tools='gnutar pax cpio none'
c971b7fa 28453
d0ac1c44 28454am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
c971b7fa 28455
c971b7fa
PA
28456
28457
28458
28459
28460depcc="$CC" am_compiler_list=
28461
28462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
28463$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 28464if ${am_cv_CC_dependencies_compiler_type+:} false; then :
c971b7fa
PA
28465 $as_echo_n "(cached) " >&6
28466else
28467 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
28468 # We make a subdir and do the tests there. Otherwise we can end up
28469 # making bogus files that we don't know about and never remove. For
28470 # instance it was reported that on HP-UX the gcc test will end up
d0ac1c44
SM
28471 # making a dummy file named 'D' -- because '-MD' means "put the output
28472 # in D".
28473 rm -rf conftest.dir
c971b7fa
PA
28474 mkdir conftest.dir
28475 # Copy depcomp to subdir because otherwise we won't find it if we're
28476 # using a relative directory.
28477 cp "$am_depcomp" conftest.dir
28478 cd conftest.dir
28479 # We will build objects and dependencies in a subdirectory because
28480 # it helps to detect inapplicable dependency modes. For instance
28481 # both Tru64's cc and ICC support -MD to output dependencies as a
28482 # side effect of compilation, but ICC will put the dependencies in
28483 # the current directory while Tru64 will put them in the object
28484 # directory.
28485 mkdir sub
28486
28487 am_cv_CC_dependencies_compiler_type=none
28488 if test "$am_compiler_list" = ""; then
28489 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
28490 fi
28491 am__universal=false
28492 case " $depcc " in #(
28493 *\ -arch\ *\ -arch\ *) am__universal=true ;;
28494 esac
28495
28496 for depmode in $am_compiler_list; do
28497 # Setup a source with many dependencies, because some compilers
28498 # like to wrap large dependency lists on column 80 (with \), and
28499 # we should not choose a depcomp mode which is confused by this.
28500 #
28501 # We need to recreate these files for each test, as the compiler may
28502 # overwrite some of them when testing with obscure command lines.
28503 # This happens at least with the AIX C compiler.
28504 : > sub/conftest.c
28505 for i in 1 2 3 4 5 6; do
28506 echo '#include "conftst'$i'.h"' >> sub/conftest.c
d0ac1c44
SM
28507 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
28508 # Solaris 10 /bin/sh.
28509 echo '/* dummy */' > sub/conftst$i.h
c971b7fa
PA
28510 done
28511 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
28512
d0ac1c44 28513 # We check with '-c' and '-o' for the sake of the "dashmstdout"
c971b7fa 28514 # mode. It turns out that the SunPro C++ compiler does not properly
d0ac1c44
SM
28515 # handle '-M -o', and we need to detect this. Also, some Intel
28516 # versions had trouble with output in subdirs.
c971b7fa
PA
28517 am__obj=sub/conftest.${OBJEXT-o}
28518 am__minus_obj="-o $am__obj"
28519 case $depmode in
28520 gcc)
28521 # This depmode causes a compiler race in universal mode.
28522 test "$am__universal" = false || continue
28523 ;;
28524 nosideeffect)
d0ac1c44
SM
28525 # After this tag, mechanisms are not by side-effect, so they'll
28526 # only be used when explicitly requested.
c971b7fa
PA
28527 if test "x$enable_dependency_tracking" = xyes; then
28528 continue
28529 else
28530 break
28531 fi
28532 ;;
d0ac1c44
SM
28533 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
28534 # This compiler won't grok '-c -o', but also, the minuso test has
c971b7fa
PA
28535 # not run yet. These depmodes are late enough in the game, and
28536 # so weak that their functioning should not be impacted.
28537 am__obj=conftest.${OBJEXT-o}
28538 am__minus_obj=
28539 ;;
28540 none) break ;;
28541 esac
28542 if depmode=$depmode \
28543 source=sub/conftest.c object=$am__obj \
28544 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
28545 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
28546 >/dev/null 2>conftest.err &&
28547 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
28548 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
28549 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
28550 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
28551 # icc doesn't choke on unknown options, it will just issue warnings
28552 # or remarks (even with -Werror). So we grep stderr for any message
28553 # that says an option was ignored or not supported.
28554 # When given -MP, icc 7.0 and 7.1 complain thusly:
28555 # icc: Command line warning: ignoring option '-M'; no argument required
28556 # The diagnosis changed in icc 8.0:
28557 # icc: Command line remark: option '-MP' not supported
28558 if (grep 'ignoring option' conftest.err ||
28559 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
28560 am_cv_CC_dependencies_compiler_type=$depmode
28561 break
28562 fi
28563 fi
28564 done
28565
28566 cd ..
28567 rm -rf conftest.dir
28568else
28569 am_cv_CC_dependencies_compiler_type=none
28570fi
28571
28572fi
28573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
28574$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
28575CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
28576
28577 if
28578 test "x$enable_dependency_tracking" != xno \
28579 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
28580 am__fastdepCC_TRUE=
28581 am__fastdepCC_FALSE='#'
28582else
28583 am__fastdepCC_TRUE='#'
28584 am__fastdepCC_FALSE=
28585fi
28586
28587
28588
d0ac1c44
SM
28589# POSIX will say in a future version that running "rm -f" with no argument
28590# is OK; and we want to be able to make that assumption in our Makefile
28591# recipes. So use an aggressive probe to check that the usage we want is
28592# actually supported "in the wild" to an acceptable degree.
28593# See automake bug#10828.
28594# To make any issue more visible, cause the running configure to be aborted
28595# by default if the 'rm' program in use doesn't match our expectations; the
28596# user can still override this though.
28597if rm -f && rm -fr && rm -rf; then : OK; else
28598 cat >&2 <<'END'
28599Oops!
28600
28601Your 'rm' program seems unable to run without file operands specified
28602on the command line, even when the '-f' option is present. This is contrary
28603to the behaviour of most rm programs out there, and not conforming with
28604the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
28605
28606Please tell bug-automake@gnu.org about your system, including the value
28607of your $PATH and any error possibly output before this message. This
28608can help us improve future automake versions.
28609
28610END
28611 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
28612 echo 'Configuration will proceed anyway, since you have set the' >&2
28613 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
28614 echo >&2
28615 else
28616 cat >&2 <<'END'
28617Aborting the configuration process, to ensure you take notice of the issue.
28618
28619You can download and install GNU coreutils to get an 'rm' implementation
28620that behaves properly: <http://www.gnu.org/software/coreutils/>.
28621
28622If you want to complete the configuration process using your problematic
28623'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
28624to "yes", and re-run configure.
28625
28626END
28627 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
28628 fi
28629fi
28630
c971b7fa 28631
39be3c7e
SM
28632# Check whether --enable-silent-rules was given.
28633if test "${enable_silent_rules+set}" = set; then :
28634 enableval=$enable_silent_rules;
28635fi
28636
d0ac1c44
SM
28637case $enable_silent_rules in # (((
28638 yes) AM_DEFAULT_VERBOSITY=0;;
28639 no) AM_DEFAULT_VERBOSITY=1;;
28640 *) AM_DEFAULT_VERBOSITY=0;;
39be3c7e 28641esac
d0ac1c44
SM
28642am_make=${MAKE-make}
28643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
28644$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
28645if ${am_cv_make_support_nested_variables+:} false; then :
28646 $as_echo_n "(cached) " >&6
28647else
28648 if $as_echo 'TRUE=$(BAR$(V))
28649BAR0=false
28650BAR1=true
28651V=1
28652am__doit:
28653 @$(TRUE)
28654.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
28655 am_cv_make_support_nested_variables=yes
28656else
28657 am_cv_make_support_nested_variables=no
28658fi
28659fi
28660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
28661$as_echo "$am_cv_make_support_nested_variables" >&6; }
28662if test $am_cv_make_support_nested_variables = yes; then
28663 AM_V='$(V)'
28664 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
28665else
28666 AM_V=$AM_DEFAULT_VERBOSITY
28667 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
28668fi
39be3c7e
SM
28669AM_BACKSLASH='\'
28670
28671
c971b7fa
PA
28672# --------------------- #
28673# Checks for programs. #
28674# --------------------- #
28675
28676
28677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
28678$as_echo_n "checking whether ln -s works... " >&6; }
28679LN_S=$as_ln_s
28680if test "$LN_S" = "ln -s"; then
28681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28682$as_echo "yes" >&6; }
28683else
28684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
28685$as_echo "no, using $LN_S" >&6; }
28686fi
28687
28688if test -n "$ac_tool_prefix"; then
28689 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
28690set dummy ${ac_tool_prefix}ranlib; ac_word=$2
28691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28692$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 28693if ${ac_cv_prog_RANLIB+:} false; then :
c971b7fa
PA
28694 $as_echo_n "(cached) " >&6
28695else
28696 if test -n "$RANLIB"; then
28697 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
28698else
28699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28700for as_dir in $PATH
28701do
28702 IFS=$as_save_IFS
28703 test -z "$as_dir" && as_dir=.
28704 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 28705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
28706 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
28707 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28708 break 2
28709 fi
28710done
28711 done
28712IFS=$as_save_IFS
28713
28714fi
28715fi
28716RANLIB=$ac_cv_prog_RANLIB
28717if test -n "$RANLIB"; then
28718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
28719$as_echo "$RANLIB" >&6; }
28720else
28721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28722$as_echo "no" >&6; }
28723fi
28724
28725
28726fi
28727if test -z "$ac_cv_prog_RANLIB"; then
28728 ac_ct_RANLIB=$RANLIB
28729 # Extract the first word of "ranlib", so it can be a program name with args.
28730set dummy ranlib; ac_word=$2
28731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28732$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 28733if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
28734 $as_echo_n "(cached) " >&6
28735else
28736 if test -n "$ac_ct_RANLIB"; then
28737 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
28738else
28739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28740for as_dir in $PATH
28741do
28742 IFS=$as_save_IFS
28743 test -z "$as_dir" && as_dir=.
28744 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 28745 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
28746 ac_cv_prog_ac_ct_RANLIB="ranlib"
28747 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28748 break 2
28749 fi
28750done
28751 done
28752IFS=$as_save_IFS
28753
28754fi
28755fi
28756ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
28757if test -n "$ac_ct_RANLIB"; then
28758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
28759$as_echo "$ac_ct_RANLIB" >&6; }
28760else
28761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28762$as_echo "no" >&6; }
28763fi
28764
28765 if test "x$ac_ct_RANLIB" = x; then
28766 RANLIB=":"
28767 else
28768 case $cross_compiling:$ac_tool_warned in
28769yes:)
28770{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28771$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28772ac_tool_warned=yes ;;
28773esac
28774 RANLIB=$ac_ct_RANLIB
28775 fi
28776else
28777 RANLIB="$ac_cv_prog_RANLIB"
28778fi
28779
28780
28781if test -n "$ac_tool_prefix"; then
28782 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
28783set dummy ${ac_tool_prefix}ar; ac_word=$2
28784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28785$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 28786if ${ac_cv_prog_AR+:} false; then :
c971b7fa
PA
28787 $as_echo_n "(cached) " >&6
28788else
28789 if test -n "$AR"; then
28790 ac_cv_prog_AR="$AR" # Let the user override the test.
28791else
28792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28793for as_dir in $PATH
28794do
28795 IFS=$as_save_IFS
28796 test -z "$as_dir" && as_dir=.
28797 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 28798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
28799 ac_cv_prog_AR="${ac_tool_prefix}ar"
28800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28801 break 2
28802 fi
28803done
28804 done
28805IFS=$as_save_IFS
28806
28807fi
28808fi
28809AR=$ac_cv_prog_AR
28810if test -n "$AR"; then
28811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
28812$as_echo "$AR" >&6; }
28813else
28814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28815$as_echo "no" >&6; }
28816fi
28817
28818
28819fi
28820if test -z "$ac_cv_prog_AR"; then
28821 ac_ct_AR=$AR
28822 # Extract the first word of "ar", so it can be a program name with args.
28823set dummy ar; ac_word=$2
28824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28825$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 28826if ${ac_cv_prog_ac_ct_AR+:} false; then :
c971b7fa
PA
28827 $as_echo_n "(cached) " >&6
28828else
28829 if test -n "$ac_ct_AR"; then
28830 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
28831else
28832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28833for as_dir in $PATH
28834do
28835 IFS=$as_save_IFS
28836 test -z "$as_dir" && as_dir=.
28837 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 28838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
28839 ac_cv_prog_ac_ct_AR="ar"
28840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28841 break 2
28842 fi
28843done
28844 done
28845IFS=$as_save_IFS
28846
28847fi
28848fi
28849ac_ct_AR=$ac_cv_prog_ac_ct_AR
28850if test -n "$ac_ct_AR"; then
28851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
28852$as_echo "$ac_ct_AR" >&6; }
28853else
28854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28855$as_echo "no" >&6; }
28856fi
28857
28858 if test "x$ac_ct_AR" = x; then
28859 AR=""
28860 else
28861 case $cross_compiling:$ac_tool_warned in
28862yes:)
28863{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28864$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28865ac_tool_warned=yes ;;
28866esac
28867 AR=$ac_ct_AR
28868 fi
28869else
28870 AR="$ac_cv_prog_AR"
28871fi
28872
28873
28874# ---------------------- #
28875# Checks for libraries. #
28876# ---------------------- #
28877
28878ac_config_files="$ac_config_files Makefile import/Makefile"
28879
28880ac_config_commands="$ac_config_commands default"
28881
28882cat >confcache <<\_ACEOF
28883# This file is a shell script that caches the results of configure
28884# tests run on this system so they can be shared between configure
28885# scripts and configure runs, see configure's option --config-cache.
28886# It is not useful on other systems. If it contains results you don't
28887# want to keep, you may remove or edit it.
28888#
28889# config.status only pays attention to the cache file if you give it
28890# the --recheck option to rerun configure.
28891#
28892# `ac_cv_env_foo' variables (set or unset) will be overridden when
28893# loading this file, other *unset* `ac_cv_foo' will be assigned the
28894# following values.
28895
28896_ACEOF
28897
28898# The following way of writing the cache mishandles newlines in values,
28899# but we know of no workaround that is simple, portable, and efficient.
28900# So, we kill variables containing newlines.
28901# Ultrix sh set writes to stderr and can't be redirected directly,
28902# and sets the high bit in the cache file unless we assign to the vars.
28903(
28904 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
28905 eval ac_val=\$$ac_var
28906 case $ac_val in #(
28907 *${as_nl}*)
28908 case $ac_var in #(
28909 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
28910$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
28911 esac
28912 case $ac_var in #(
28913 _ | IFS | as_nl) ;; #(
28914 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
28915 *) { eval $ac_var=; unset $ac_var;} ;;
28916 esac ;;
28917 esac
28918 done
28919
28920 (set) 2>&1 |
28921 case $as_nl`(ac_space=' '; set) 2>&1` in #(
28922 *${as_nl}ac_space=\ *)
28923 # `set' does not quote correctly, so add quotes: double-quote
28924 # substitution turns \\\\ into \\, and sed turns \\ into \.
28925 sed -n \
28926 "s/'/'\\\\''/g;
28927 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28928 ;; #(
28929 *)
28930 # `set' quotes correctly as required by POSIX, so do not add quotes.
28931 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
28932 ;;
28933 esac |
28934 sort
28935) |
28936 sed '
28937 /^ac_cv_env_/b end
28938 t clear
28939 :clear
28940 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28941 t end
28942 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28943 :end' >>confcache
28944if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
28945 if test -w "$cache_file"; then
d0ac1c44 28946 if test "x$cache_file" != "x/dev/null"; then
c971b7fa
PA
28947 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
28948$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
28949 if test ! -f "$cache_file" || test -h "$cache_file"; then
28950 cat confcache >"$cache_file"
28951 else
28952 case $cache_file in #(
28953 */* | ?:*)
28954 mv -f confcache "$cache_file"$$ &&
28955 mv -f "$cache_file"$$ "$cache_file" ;; #(
28956 *)
28957 mv -f confcache "$cache_file" ;;
28958 esac
28959 fi
28960 fi
c971b7fa
PA
28961 else
28962 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
28963$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
28964 fi
28965fi
28966rm -f confcache
28967
28968test "x$prefix" = xNONE && prefix=$ac_default_prefix
28969# Let make expand exec_prefix.
28970test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28971
28972DEFS=-DHAVE_CONFIG_H
28973
28974ac_libobjs=
28975ac_ltlibobjs=
28976for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
28977 # 1. Remove the extension, and $U if already installed.
28978 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
28979 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
28980 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
28981 # will be set to the directory where LIBOBJS objects are built.
28982 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
28983 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
28984done
28985LIBOBJS=$ac_libobjs
28986
28987LTLIBOBJS=$ac_ltlibobjs
28988
28989
28990if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 28991 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
c971b7fa
PA
28992Usually this means the macro was only invoked conditionally." "$LINENO" 5
28993fi
28994if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
d0ac1c44 28995 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
c971b7fa
PA
28996Usually this means the macro was only invoked conditionally." "$LINENO" 5
28997fi
8690e634 28998if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
d0ac1c44 28999 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
8690e634
JK
29000Usually this means the macro was only invoked conditionally." "$LINENO" 5
29001fi
18848e28 29002if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
d0ac1c44 29003 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
18848e28
GF
29004Usually this means the macro was only invoked conditionally." "$LINENO" 5
29005fi
88b48903 29006if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
d0ac1c44 29007 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
88b48903
WN
29008Usually this means the macro was only invoked conditionally." "$LINENO" 5
29009fi
8690e634 29010if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
d0ac1c44 29011 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
8690e634
JK
29012Usually this means the macro was only invoked conditionally." "$LINENO" 5
29013fi
6ec2e0f5 29014if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
d0ac1c44 29015 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
6ec2e0f5
SDJ
29016Usually this means the macro was only invoked conditionally." "$LINENO" 5
29017fi
49e4877c 29018if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 29019 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
29020Usually this means the macro was only invoked conditionally." "$LINENO" 5
29021fi
29022if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 29023 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
29024Usually this means the macro was only invoked conditionally." "$LINENO" 5
29025fi
c971b7fa 29026if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
d0ac1c44 29027 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
c971b7fa
PA
29028Usually this means the macro was only invoked conditionally." "$LINENO" 5
29029fi
88b48903
WN
29030
29031
725e2999
JB
29032if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
29033 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
29034Usually this means the macro was only invoked conditionally." "$LINENO" 5
29035fi
29036if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
29037 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
29038Usually this means the macro was only invoked conditionally." "$LINENO" 5
29039fi
8690e634 29040if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
d0ac1c44 29041 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
8690e634
JK
29042Usually this means the macro was only invoked conditionally." "$LINENO" 5
29043fi
c971b7fa 29044if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
d0ac1c44 29045 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
c971b7fa
PA
29046Usually this means the macro was only invoked conditionally." "$LINENO" 5
29047fi
29048
29049 gl_libobjs=
29050 gl_ltlibobjs=
29051 if test -n "$gl_LIBOBJS"; then
29052 # Remove the extension.
29053 sed_drop_objext='s/\.o$//;s/\.obj$//'
29054 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29055 gl_libobjs="$gl_libobjs $i.$ac_objext"
29056 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
29057 done
29058 fi
29059 gl_LIBOBJS=$gl_libobjs
29060
29061 gl_LTLIBOBJS=$gl_ltlibobjs
29062
29063
29064
29065 gltests_libobjs=
29066 gltests_ltlibobjs=
29067 if test -n "$gltests_LIBOBJS"; then
29068 # Remove the extension.
29069 sed_drop_objext='s/\.o$//;s/\.obj$//'
29070 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
29071 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
29072 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
29073 done
29074 fi
29075 gltests_LIBOBJS=$gltests_libobjs
29076
29077 gltests_LTLIBOBJS=$gltests_ltlibobjs
29078
29079
d0ac1c44
SM
29080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
29081$as_echo_n "checking that generated files are newer than configure... " >&6; }
29082 if test -n "$am_sleep_pid"; then
29083 # Hide warnings about reused PIDs.
29084 wait $am_sleep_pid 2>/dev/null
29085 fi
29086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
29087$as_echo "done" >&6; }
c971b7fa 29088if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
d0ac1c44 29089 as_fn_error $? "conditional \"AMDEP\" was never defined.
c971b7fa
PA
29090Usually this means the macro was only invoked conditionally." "$LINENO" 5
29091fi
29092if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
d0ac1c44 29093 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
c971b7fa
PA
29094Usually this means the macro was only invoked conditionally." "$LINENO" 5
29095fi
29096 if test -n "$EXEEXT"; then
29097 am__EXEEXT_TRUE=
29098 am__EXEEXT_FALSE='#'
29099else
29100 am__EXEEXT_TRUE='#'
29101 am__EXEEXT_FALSE=
29102fi
29103
29104
d0ac1c44 29105: "${CONFIG_STATUS=./config.status}"
c971b7fa
PA
29106ac_write_fail=0
29107ac_clean_files_save=$ac_clean_files
29108ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29109{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
29110$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
29111as_write_fail=0
29112cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
29113#! $SHELL
29114# Generated by $as_me.
29115# Run this file to recreate the current configuration.
29116# Compiler output produced by configure, useful for debugging
29117# configure, is in config.log if it exists.
29118
29119debug=false
29120ac_cs_recheck=false
29121ac_cs_silent=false
29122
29123SHELL=\${CONFIG_SHELL-$SHELL}
29124export SHELL
29125_ASEOF
29126cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
29127## -------------------- ##
29128## M4sh Initialization. ##
29129## -------------------- ##
29130
29131# Be more Bourne compatible
29132DUALCASE=1; export DUALCASE # for MKS sh
29133if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
29134 emulate sh
29135 NULLCMD=:
29136 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29137 # is contrary to our usage. Disable this feature.
29138 alias -g '${1+"$@"}'='"$@"'
29139 setopt NO_GLOB_SUBST
29140else
29141 case `(set -o) 2>/dev/null` in #(
29142 *posix*) :
29143 set -o posix ;; #(
29144 *) :
29145 ;;
29146esac
29147fi
29148
29149
29150as_nl='
29151'
29152export as_nl
29153# Printing a long string crashes Solaris 7 /usr/bin/printf.
29154as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
29155as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
29156as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
29157# Prefer a ksh shell builtin over an external printf program on Solaris,
29158# but without wasting forks for bash or zsh.
29159if test -z "$BASH_VERSION$ZSH_VERSION" \
29160 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
29161 as_echo='print -r --'
29162 as_echo_n='print -rn --'
29163elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
29164 as_echo='printf %s\n'
29165 as_echo_n='printf %s'
29166else
29167 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
29168 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
29169 as_echo_n='/usr/ucb/echo -n'
29170 else
29171 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
29172 as_echo_n_body='eval
29173 arg=$1;
29174 case $arg in #(
29175 *"$as_nl"*)
29176 expr "X$arg" : "X\\(.*\\)$as_nl";
29177 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
29178 esac;
29179 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
29180 '
29181 export as_echo_n_body
29182 as_echo_n='sh -c $as_echo_n_body as_echo'
29183 fi
29184 export as_echo_body
29185 as_echo='sh -c $as_echo_body as_echo'
29186fi
29187
29188# The user is always right.
29189if test "${PATH_SEPARATOR+set}" != set; then
29190 PATH_SEPARATOR=:
29191 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
29192 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
29193 PATH_SEPARATOR=';'
29194 }
29195fi
29196
29197
29198# IFS
29199# We need space, tab and new line, in precisely that order. Quoting is
29200# there to prevent editors from complaining about space-tab.
29201# (If _AS_PATH_WALK were called with IFS unset, it would disable word
29202# splitting by setting IFS to empty value.)
29203IFS=" "" $as_nl"
29204
29205# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 29206as_myself=
c971b7fa
PA
29207case $0 in #((
29208 *[\\/]* ) as_myself=$0 ;;
29209 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29210for as_dir in $PATH
29211do
29212 IFS=$as_save_IFS
29213 test -z "$as_dir" && as_dir=.
29214 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
29215 done
29216IFS=$as_save_IFS
29217
29218 ;;
29219esac
29220# We did not find ourselves, most probably we were run as `sh COMMAND'
29221# in which case we are not to be found in the path.
29222if test "x$as_myself" = x; then
29223 as_myself=$0
29224fi
29225if test ! -f "$as_myself"; then
29226 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
29227 exit 1
29228fi
29229
29230# Unset variables that we do not need and which cause bugs (e.g. in
29231# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
29232# suppresses any "Segmentation fault" message there. '((' could
29233# trigger a bug in pdksh 5.2.14.
29234for as_var in BASH_ENV ENV MAIL MAILPATH
29235do eval test x\${$as_var+set} = xset \
29236 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
29237done
29238PS1='$ '
29239PS2='> '
29240PS4='+ '
29241
29242# NLS nuisances.
29243LC_ALL=C
29244export LC_ALL
29245LANGUAGE=C
29246export LANGUAGE
29247
29248# CDPATH.
29249(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
29250
29251
d0ac1c44
SM
29252# as_fn_error STATUS ERROR [LINENO LOG_FD]
29253# ----------------------------------------
c971b7fa
PA
29254# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
29255# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 29256# script with STATUS, using 1 if that was 0.
c971b7fa
PA
29257as_fn_error ()
29258{
d0ac1c44
SM
29259 as_status=$1; test $as_status -eq 0 && as_status=1
29260 if test "$4"; then
29261 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
29262 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
c971b7fa 29263 fi
d0ac1c44 29264 $as_echo "$as_me: error: $2" >&2
c971b7fa
PA
29265 as_fn_exit $as_status
29266} # as_fn_error
29267
29268
29269# as_fn_set_status STATUS
29270# -----------------------
29271# Set $? to STATUS, without forking.
29272as_fn_set_status ()
29273{
29274 return $1
29275} # as_fn_set_status
29276
29277# as_fn_exit STATUS
29278# -----------------
29279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
29280as_fn_exit ()
29281{
29282 set +e
29283 as_fn_set_status $1
29284 exit $1
29285} # as_fn_exit
29286
29287# as_fn_unset VAR
29288# ---------------
29289# Portably unset VAR.
29290as_fn_unset ()
29291{
29292 { eval $1=; unset $1;}
29293}
29294as_unset=as_fn_unset
29295# as_fn_append VAR VALUE
29296# ----------------------
29297# Append the text in VALUE to the end of the definition contained in VAR. Take
29298# advantage of any shell optimizations that allow amortized linear growth over
29299# repeated appends, instead of the typical quadratic growth present in naive
29300# implementations.
29301if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
29302 eval 'as_fn_append ()
29303 {
29304 eval $1+=\$2
29305 }'
29306else
29307 as_fn_append ()
29308 {
29309 eval $1=\$$1\$2
29310 }
29311fi # as_fn_append
29312
29313# as_fn_arith ARG...
29314# ------------------
29315# Perform arithmetic evaluation on the ARGs, and store the result in the
29316# global $as_val. Take advantage of shells that can avoid forks. The arguments
29317# must be portable across $(()) and expr.
29318if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
29319 eval 'as_fn_arith ()
29320 {
29321 as_val=$(( $* ))
29322 }'
29323else
29324 as_fn_arith ()
29325 {
29326 as_val=`expr "$@" || test $? -eq 1`
29327 }
29328fi # as_fn_arith
29329
29330
29331if expr a : '\(a\)' >/dev/null 2>&1 &&
29332 test "X`expr 00001 : '.*\(...\)'`" = X001; then
29333 as_expr=expr
29334else
29335 as_expr=false
29336fi
29337
29338if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
29339 as_basename=basename
29340else
29341 as_basename=false
29342fi
29343
29344if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
29345 as_dirname=dirname
29346else
29347 as_dirname=false
29348fi
29349
29350as_me=`$as_basename -- "$0" ||
29351$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
29352 X"$0" : 'X\(//\)$' \| \
29353 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
29354$as_echo X/"$0" |
29355 sed '/^.*\/\([^/][^/]*\)\/*$/{
29356 s//\1/
29357 q
29358 }
29359 /^X\/\(\/\/\)$/{
29360 s//\1/
29361 q
29362 }
29363 /^X\/\(\/\).*/{
29364 s//\1/
29365 q
29366 }
29367 s/.*/./; q'`
29368
29369# Avoid depending upon Character Ranges.
29370as_cr_letters='abcdefghijklmnopqrstuvwxyz'
29371as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
29372as_cr_Letters=$as_cr_letters$as_cr_LETTERS
29373as_cr_digits='0123456789'
29374as_cr_alnum=$as_cr_Letters$as_cr_digits
29375
29376ECHO_C= ECHO_N= ECHO_T=
29377case `echo -n x` in #(((((
29378-n*)
29379 case `echo 'xy\c'` in
29380 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
29381 xy) ECHO_C='\c';;
29382 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
29383 ECHO_T=' ';;
29384 esac;;
29385*)
29386 ECHO_N='-n';;
29387esac
29388
29389rm -f conf$$ conf$$.exe conf$$.file
29390if test -d conf$$.dir; then
29391 rm -f conf$$.dir/conf$$.file
29392else
29393 rm -f conf$$.dir
29394 mkdir conf$$.dir 2>/dev/null
29395fi
29396if (echo >conf$$.file) 2>/dev/null; then
29397 if ln -s conf$$.file conf$$ 2>/dev/null; then
29398 as_ln_s='ln -s'
29399 # ... but there are two gotchas:
29400 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
29401 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 29402 # In both cases, we have to default to `cp -pR'.
c971b7fa 29403 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 29404 as_ln_s='cp -pR'
c971b7fa
PA
29405 elif ln conf$$.file conf$$ 2>/dev/null; then
29406 as_ln_s=ln
29407 else
d0ac1c44 29408 as_ln_s='cp -pR'
c971b7fa
PA
29409 fi
29410else
d0ac1c44 29411 as_ln_s='cp -pR'
c971b7fa
PA
29412fi
29413rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
29414rmdir conf$$.dir 2>/dev/null
29415
29416
29417# as_fn_mkdir_p
29418# -------------
29419# Create "$as_dir" as a directory, including parents if necessary.
29420as_fn_mkdir_p ()
29421{
29422
29423 case $as_dir in #(
29424 -*) as_dir=./$as_dir;;
29425 esac
29426 test -d "$as_dir" || eval $as_mkdir_p || {
29427 as_dirs=
29428 while :; do
29429 case $as_dir in #(
29430 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
29431 *) as_qdir=$as_dir;;
29432 esac
29433 as_dirs="'$as_qdir' $as_dirs"
29434 as_dir=`$as_dirname -- "$as_dir" ||
29435$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29436 X"$as_dir" : 'X\(//\)[^/]' \| \
29437 X"$as_dir" : 'X\(//\)$' \| \
29438 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
29439$as_echo X"$as_dir" |
29440 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
29441 s//\1/
29442 q
29443 }
29444 /^X\(\/\/\)[^/].*/{
29445 s//\1/
29446 q
29447 }
29448 /^X\(\/\/\)$/{
29449 s//\1/
29450 q
29451 }
29452 /^X\(\/\).*/{
29453 s//\1/
29454 q
29455 }
29456 s/.*/./; q'`
29457 test -d "$as_dir" && break
29458 done
29459 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 29460 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
c971b7fa
PA
29461
29462
29463} # as_fn_mkdir_p
29464if mkdir -p . 2>/dev/null; then
29465 as_mkdir_p='mkdir -p "$as_dir"'
29466else
29467 test -d ./-p && rmdir ./-p
29468 as_mkdir_p=false
29469fi
29470
d0ac1c44
SM
29471
29472# as_fn_executable_p FILE
29473# -----------------------
29474# Test if FILE is an executable regular file.
29475as_fn_executable_p ()
29476{
29477 test -f "$1" && test -x "$1"
29478} # as_fn_executable_p
29479as_test_x='test -x'
29480as_executable_p=as_fn_executable_p
c971b7fa
PA
29481
29482# Sed expression to map a string onto a valid CPP name.
29483as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
29484
29485# Sed expression to map a string onto a valid variable name.
29486as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
29487
29488
29489exec 6>&1
29490## ----------------------------------- ##
29491## Main body of $CONFIG_STATUS script. ##
29492## ----------------------------------- ##
29493_ASEOF
29494test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
29495
29496cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29497# Save the log message, to keep $0 and so on meaningful, and to
29498# report actual input values of CONFIG_FILES etc. instead of their
29499# values after options handling.
29500ac_log="
d0ac1c44
SM
29501This file was extended by libgnu $as_me UNUSED-VERSION, which was
29502generated by GNU Autoconf 2.69. Invocation command line was
c971b7fa
PA
29503
29504 CONFIG_FILES = $CONFIG_FILES
29505 CONFIG_HEADERS = $CONFIG_HEADERS
29506 CONFIG_LINKS = $CONFIG_LINKS
29507 CONFIG_COMMANDS = $CONFIG_COMMANDS
29508 $ $0 $@
29509
29510on `(hostname || uname -n) 2>/dev/null | sed 1q`
29511"
29512
29513_ACEOF
29514
29515case $ac_config_files in *"
29516"*) set x $ac_config_files; shift; ac_config_files=$*;;
29517esac
29518
29519case $ac_config_headers in *"
29520"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
29521esac
29522
29523
29524cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29525# Files that config.status was made for.
29526config_files="$ac_config_files"
29527config_headers="$ac_config_headers"
29528config_commands="$ac_config_commands"
29529
29530_ACEOF
29531
29532cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29533ac_cs_usage="\
29534\`$as_me' instantiates files and other configuration actions
29535from templates according to the current configuration. Unless the files
29536and actions are specified as TAGs, all are instantiated by default.
29537
29538Usage: $0 [OPTION]... [TAG]...
29539
29540 -h, --help print this help, then exit
29541 -V, --version print version number and configuration settings, then exit
d0ac1c44 29542 --config print configuration, then exit
c971b7fa
PA
29543 -q, --quiet, --silent
29544 do not print progress messages
29545 -d, --debug don't remove temporary files
29546 --recheck update $as_me by reconfiguring in the same conditions
29547 --file=FILE[:TEMPLATE]
29548 instantiate the configuration file FILE
29549 --header=FILE[:TEMPLATE]
29550 instantiate the configuration header FILE
29551
29552Configuration files:
29553$config_files
29554
29555Configuration headers:
29556$config_headers
29557
29558Configuration commands:
29559$config_commands
29560
29561Report bugs to the package provider."
29562
29563_ACEOF
29564cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 29565ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
c971b7fa 29566ac_cs_version="\\
d0ac1c44
SM
29567libgnu config.status UNUSED-VERSION
29568configured by $0, generated by GNU Autoconf 2.69,
29569 with options \\"\$ac_cs_config\\"
c971b7fa 29570
d0ac1c44 29571Copyright (C) 2012 Free Software Foundation, Inc.
c971b7fa
PA
29572This config.status script is free software; the Free Software Foundation
29573gives unlimited permission to copy, distribute and modify it."
29574
29575ac_pwd='$ac_pwd'
29576srcdir='$srcdir'
29577INSTALL='$INSTALL'
29578MKDIR_P='$MKDIR_P'
29579AWK='$AWK'
29580test -n "\$AWK" || AWK=awk
29581_ACEOF
29582
29583cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29584# The default lists apply if the user does not specify any file.
29585ac_need_defaults=:
29586while test $# != 0
29587do
29588 case $1 in
d0ac1c44 29589 --*=?*)
c971b7fa
PA
29590 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29591 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
29592 ac_shift=:
29593 ;;
d0ac1c44
SM
29594 --*=)
29595 ac_option=`expr "X$1" : 'X\([^=]*\)='`
29596 ac_optarg=
29597 ac_shift=:
29598 ;;
c971b7fa
PA
29599 *)
29600 ac_option=$1
29601 ac_optarg=$2
29602 ac_shift=shift
29603 ;;
29604 esac
29605
29606 case $ac_option in
29607 # Handling of the options.
29608 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29609 ac_cs_recheck=: ;;
29610 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
29611 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
29612 --config | --confi | --conf | --con | --co | --c )
29613 $as_echo "$ac_cs_config"; exit ;;
c971b7fa
PA
29614 --debug | --debu | --deb | --de | --d | -d )
29615 debug=: ;;
29616 --file | --fil | --fi | --f )
29617 $ac_shift
29618 case $ac_optarg in
29619 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 29620 '') as_fn_error $? "missing file argument" ;;
c971b7fa
PA
29621 esac
29622 as_fn_append CONFIG_FILES " '$ac_optarg'"
29623 ac_need_defaults=false;;
29624 --header | --heade | --head | --hea )
29625 $ac_shift
29626 case $ac_optarg in
29627 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
29628 esac
29629 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
29630 ac_need_defaults=false;;
29631 --he | --h)
29632 # Conflict between --help and --header
d0ac1c44 29633 as_fn_error $? "ambiguous option: \`$1'
c971b7fa
PA
29634Try \`$0 --help' for more information.";;
29635 --help | --hel | -h )
29636 $as_echo "$ac_cs_usage"; exit ;;
29637 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
29638 | -silent | --silent | --silen | --sile | --sil | --si | --s)
29639 ac_cs_silent=: ;;
29640
29641 # This is an error.
d0ac1c44 29642 -*) as_fn_error $? "unrecognized option: \`$1'
c971b7fa
PA
29643Try \`$0 --help' for more information." ;;
29644
29645 *) as_fn_append ac_config_targets " $1"
29646 ac_need_defaults=false ;;
29647
29648 esac
29649 shift
29650done
29651
29652ac_configure_extra_args=
29653
29654if $ac_cs_silent; then
29655 exec 6>/dev/null
29656 ac_configure_extra_args="$ac_configure_extra_args --silent"
29657fi
29658
29659_ACEOF
29660cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29661if \$ac_cs_recheck; then
d0ac1c44 29662 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
c971b7fa
PA
29663 shift
29664 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
29665 CONFIG_SHELL='$SHELL'
29666 export CONFIG_SHELL
29667 exec "\$@"
29668fi
29669
29670_ACEOF
29671cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29672exec 5>>config.log
29673{
29674 echo
29675 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29676## Running $as_me. ##
29677_ASBOX
29678 $as_echo "$ac_log"
29679} >&5
29680
29681_ACEOF
29682cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29683#
29684# INIT-COMMANDS
29685#
29686AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
29687
29688_ACEOF
29689
29690cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29691
29692# Handling of arguments.
29693for ac_config_target in $ac_config_targets
29694do
29695 case $ac_config_target in
29696 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
29697 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
29698 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29699 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
29700 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29701
d0ac1c44 29702 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c971b7fa
PA
29703 esac
29704done
29705
29706
29707# If the user did not use the arguments to specify the items to instantiate,
29708# then the envvar interface is used. Set only those that are not.
29709# We use the long form for the default assignment because of an extremely
29710# bizarre bug on SunOS 4.1.3.
29711if $ac_need_defaults; then
29712 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29713 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29714 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29715fi
29716
29717# Have a temporary directory for convenience. Make it in the build tree
29718# simply because there is no reason against having it here, and in addition,
29719# creating and moving files from /tmp can sometimes cause problems.
29720# Hook for its removal unless debugging.
29721# Note that there is a small window in which the directory will not be cleaned:
29722# after its creation but before its name has been assigned to `$tmp'.
29723$debug ||
29724{
d0ac1c44 29725 tmp= ac_tmp=
c971b7fa 29726 trap 'exit_status=$?
d0ac1c44
SM
29727 : "${ac_tmp:=$tmp}"
29728 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
c971b7fa
PA
29729' 0
29730 trap 'as_fn_exit 1' 1 2 13 15
29731}
29732# Create a (secure) tmp directory for tmp files.
29733
29734{
29735 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 29736 test -d "$tmp"
c971b7fa
PA
29737} ||
29738{
29739 tmp=./conf$$-$RANDOM
29740 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
29741} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
29742ac_tmp=$tmp
c971b7fa
PA
29743
29744# Set up the scripts for CONFIG_FILES section.
29745# No need to generate them if there are no CONFIG_FILES.
29746# This happens for instance with `./config.status config.h'.
29747if test -n "$CONFIG_FILES"; then
29748
29749
29750ac_cr=`echo X | tr X '\015'`
29751# On cygwin, bash can eat \r inside `` if the user requested igncr.
29752# But we know of no other shell where ac_cr would be empty at this
29753# point, so we can use a bashism as a fallback.
29754if test "x$ac_cr" = x; then
29755 eval ac_cr=\$\'\\r\'
29756fi
29757ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
29758if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 29759 ac_cs_awk_cr='\\r'
c971b7fa
PA
29760else
29761 ac_cs_awk_cr=$ac_cr
29762fi
29763
d0ac1c44 29764echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
c971b7fa
PA
29765_ACEOF
29766
29767
29768{
29769 echo "cat >conf$$subs.awk <<_ACEOF" &&
29770 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
29771 echo "_ACEOF"
29772} >conf$$subs.sh ||
d0ac1c44
SM
29773 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
29774ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
c971b7fa
PA
29775ac_delim='%!_!# '
29776for ac_last_try in false false false false false :; do
29777 . ./conf$$subs.sh ||
d0ac1c44 29778 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
29779
29780 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
29781 if test $ac_delim_n = $ac_delim_num; then
29782 break
29783 elif $ac_last_try; then
d0ac1c44 29784 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
29785 else
29786 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29787 fi
29788done
29789rm -f conf$$subs.sh
29790
29791cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 29792cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
c971b7fa
PA
29793_ACEOF
29794sed -n '
29795h
29796s/^/S["/; s/!.*/"]=/
29797p
29798g
29799s/^[^!]*!//
29800:repl
29801t repl
29802s/'"$ac_delim"'$//
29803t delim
29804:nl
29805h
d0ac1c44 29806s/\(.\{148\}\)..*/\1/
c971b7fa
PA
29807t more1
29808s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
29809p
29810n
29811b repl
29812:more1
29813s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29814p
29815g
29816s/.\{148\}//
29817t nl
29818:delim
29819h
d0ac1c44 29820s/\(.\{148\}\)..*/\1/
c971b7fa
PA
29821t more2
29822s/["\\]/\\&/g; s/^/"/; s/$/"/
29823p
29824b
29825:more2
29826s/["\\]/\\&/g; s/^/"/; s/$/"\\/
29827p
29828g
29829s/.\{148\}//
29830t delim
29831' <conf$$subs.awk | sed '
29832/^[^""]/{
29833 N
29834 s/\n//
29835}
29836' >>$CONFIG_STATUS || ac_write_fail=1
29837rm -f conf$$subs.awk
29838cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29839_ACAWK
d0ac1c44 29840cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
c971b7fa
PA
29841 for (key in S) S_is_set[key] = 1
29842 FS = "\a"
29843
29844}
29845{
29846 line = $ 0
29847 nfields = split(line, field, "@")
29848 substed = 0
29849 len = length(field[1])
29850 for (i = 2; i < nfields; i++) {
29851 key = field[i]
29852 keylen = length(key)
29853 if (S_is_set[key]) {
29854 value = S[key]
29855 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
29856 len += length(value) + length(field[++i])
29857 substed = 1
29858 } else
29859 len += 1 + keylen
29860 }
29861
29862 print line
29863}
29864
29865_ACAWK
29866_ACEOF
29867cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29868if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
29869 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
29870else
29871 cat
d0ac1c44
SM
29872fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
29873 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
c971b7fa
PA
29874_ACEOF
29875
d0ac1c44
SM
29876# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
29877# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
c971b7fa
PA
29878# trailing colons and then remove the whole line if VPATH becomes empty
29879# (actually we leave an empty line to preserve line numbers).
29880if test "x$srcdir" = x.; then
d0ac1c44
SM
29881 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
29882h
29883s///
29884s/^/:/
29885s/[ ]*$/:/
29886s/:\$(srcdir):/:/g
29887s/:\${srcdir}:/:/g
29888s/:@srcdir@:/:/g
29889s/^:*//
c971b7fa 29890s/:*$//
d0ac1c44
SM
29891x
29892s/\(=[ ]*\).*/\1/
29893G
29894s/\n//
c971b7fa
PA
29895s/^[^=]*=[ ]*$//
29896}'
29897fi
29898
29899cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
29900fi # test -n "$CONFIG_FILES"
29901
29902# Set up the scripts for CONFIG_HEADERS section.
29903# No need to generate them if there are no CONFIG_HEADERS.
29904# This happens for instance with `./config.status Makefile'.
29905if test -n "$CONFIG_HEADERS"; then
d0ac1c44 29906cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
c971b7fa
PA
29907BEGIN {
29908_ACEOF
29909
29910# Transform confdefs.h into an awk script `defines.awk', embedded as
29911# here-document in config.status, that substitutes the proper values into
29912# config.h.in to produce config.h.
29913
29914# Create a delimiter string that does not exist in confdefs.h, to ease
29915# handling of long lines.
29916ac_delim='%!_!# '
29917for ac_last_try in false false :; do
d0ac1c44
SM
29918 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
29919 if test -z "$ac_tt"; then
c971b7fa
PA
29920 break
29921 elif $ac_last_try; then
d0ac1c44 29922 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
c971b7fa
PA
29923 else
29924 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
29925 fi
29926done
29927
29928# For the awk script, D is an array of macro values keyed by name,
29929# likewise P contains macro parameters if any. Preserve backslash
29930# newline sequences.
29931
29932ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
29933sed -n '
29934s/.\{148\}/&'"$ac_delim"'/g
29935t rset
29936:rset
29937s/^[ ]*#[ ]*define[ ][ ]*/ /
29938t def
29939d
29940:def
29941s/\\$//
29942t bsnl
29943s/["\\]/\\&/g
29944s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29945D["\1"]=" \3"/p
29946s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
29947d
29948:bsnl
29949s/["\\]/\\&/g
29950s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
29951D["\1"]=" \3\\\\\\n"\\/p
29952t cont
29953s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
29954t cont
29955d
29956:cont
29957n
29958s/.\{148\}/&'"$ac_delim"'/g
29959t clear
29960:clear
29961s/\\$//
29962t bsnlc
29963s/["\\]/\\&/g; s/^/"/; s/$/"/p
29964d
29965:bsnlc
29966s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
29967b cont
29968' <confdefs.h | sed '
29969s/'"$ac_delim"'/"\\\
29970"/g' >>$CONFIG_STATUS || ac_write_fail=1
29971
29972cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
29973 for (key in D) D_is_set[key] = 1
29974 FS = "\a"
29975}
29976/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
29977 line = \$ 0
29978 split(line, arg, " ")
29979 if (arg[1] == "#") {
29980 defundef = arg[2]
29981 mac1 = arg[3]
29982 } else {
29983 defundef = substr(arg[1], 2)
29984 mac1 = arg[2]
29985 }
29986 split(mac1, mac2, "(") #)
29987 macro = mac2[1]
29988 prefix = substr(line, 1, index(line, defundef) - 1)
29989 if (D_is_set[macro]) {
29990 # Preserve the white space surrounding the "#".
29991 print prefix "define", macro P[macro] D[macro]
29992 next
29993 } else {
29994 # Replace #undef with comments. This is necessary, for example,
29995 # in the case of _POSIX_SOURCE, which is predefined and required
29996 # on some systems where configure will not decide to define it.
29997 if (defundef == "undef") {
29998 print "/*", prefix defundef, macro, "*/"
29999 next
30000 }
30001 }
30002}
30003{ print }
30004_ACAWK
30005_ACEOF
30006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 30007 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
c971b7fa
PA
30008fi # test -n "$CONFIG_HEADERS"
30009
30010
30011eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
30012shift
30013for ac_tag
30014do
30015 case $ac_tag in
30016 :[FHLC]) ac_mode=$ac_tag; continue;;
30017 esac
30018 case $ac_mode$ac_tag in
30019 :[FHL]*:*);;
d0ac1c44 30020 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
c971b7fa
PA
30021 :[FH]-) ac_tag=-:-;;
30022 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
30023 esac
30024 ac_save_IFS=$IFS
30025 IFS=:
30026 set x $ac_tag
30027 IFS=$ac_save_IFS
30028 shift
30029 ac_file=$1
30030 shift
30031
30032 case $ac_mode in
30033 :L) ac_source=$1;;
30034 :[FH])
30035 ac_file_inputs=
30036 for ac_f
30037 do
30038 case $ac_f in
d0ac1c44 30039 -) ac_f="$ac_tmp/stdin";;
c971b7fa
PA
30040 *) # Look for the file first in the build tree, then in the source tree
30041 # (if the path is not absolute). The absolute path cannot be DOS-style,
30042 # because $ac_f cannot contain `:'.
30043 test -f "$ac_f" ||
30044 case $ac_f in
30045 [\\/$]*) false;;
30046 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
30047 esac ||
d0ac1c44 30048 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
c971b7fa
PA
30049 esac
30050 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
30051 as_fn_append ac_file_inputs " '$ac_f'"
30052 done
30053
30054 # Let's still pretend it is `configure' which instantiates (i.e., don't
30055 # use $as_me), people would be surprised to read:
30056 # /* config.h. Generated by config.status. */
30057 configure_input='Generated from '`
30058 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
30059 `' by configure.'
30060 if test x"$ac_file" != x-; then
30061 configure_input="$ac_file. $configure_input"
30062 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
30063$as_echo "$as_me: creating $ac_file" >&6;}
30064 fi
30065 # Neutralize special characters interpreted by sed in replacement strings.
30066 case $configure_input in #(
30067 *\&* | *\|* | *\\* )
30068 ac_sed_conf_input=`$as_echo "$configure_input" |
30069 sed 's/[\\\\&|]/\\\\&/g'`;; #(
30070 *) ac_sed_conf_input=$configure_input;;
30071 esac
30072
30073 case $ac_tag in
d0ac1c44
SM
30074 *:-:* | *:-) cat >"$ac_tmp/stdin" \
30075 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
c971b7fa
PA
30076 esac
30077 ;;
30078 esac
30079
30080 ac_dir=`$as_dirname -- "$ac_file" ||
30081$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30082 X"$ac_file" : 'X\(//\)[^/]' \| \
30083 X"$ac_file" : 'X\(//\)$' \| \
30084 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
30085$as_echo X"$ac_file" |
30086 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30087 s//\1/
30088 q
30089 }
30090 /^X\(\/\/\)[^/].*/{
30091 s//\1/
30092 q
30093 }
30094 /^X\(\/\/\)$/{
30095 s//\1/
30096 q
30097 }
30098 /^X\(\/\).*/{
30099 s//\1/
30100 q
30101 }
30102 s/.*/./; q'`
30103 as_dir="$ac_dir"; as_fn_mkdir_p
30104 ac_builddir=.
30105
30106case "$ac_dir" in
30107.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
30108*)
30109 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
30110 # A ".." for each directory in $ac_dir_suffix.
30111 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
30112 case $ac_top_builddir_sub in
30113 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
30114 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
30115 esac ;;
30116esac
30117ac_abs_top_builddir=$ac_pwd
30118ac_abs_builddir=$ac_pwd$ac_dir_suffix
30119# for backward compatibility:
30120ac_top_builddir=$ac_top_build_prefix
30121
30122case $srcdir in
30123 .) # We are building in place.
30124 ac_srcdir=.
30125 ac_top_srcdir=$ac_top_builddir_sub
30126 ac_abs_top_srcdir=$ac_pwd ;;
30127 [\\/]* | ?:[\\/]* ) # Absolute name.
30128 ac_srcdir=$srcdir$ac_dir_suffix;
30129 ac_top_srcdir=$srcdir
30130 ac_abs_top_srcdir=$srcdir ;;
30131 *) # Relative name.
30132 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
30133 ac_top_srcdir=$ac_top_build_prefix$srcdir
30134 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
30135esac
30136ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
30137
30138
30139 case $ac_mode in
30140 :F)
30141 #
30142 # CONFIG_FILE
30143 #
30144
30145 case $INSTALL in
30146 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30147 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
30148 esac
30149 ac_MKDIR_P=$MKDIR_P
30150 case $MKDIR_P in
30151 [\\/$]* | ?:[\\/]* ) ;;
30152 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
30153 esac
30154_ACEOF
30155
30156cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30157# If the template does not know about datarootdir, expand it.
30158# FIXME: This hack should be removed a few years after 2.60.
30159ac_datarootdir_hack=; ac_datarootdir_seen=
30160ac_sed_dataroot='
30161/datarootdir/ {
30162 p
30163 q
30164}
30165/@datadir@/p
30166/@docdir@/p
30167/@infodir@/p
30168/@localedir@/p
30169/@mandir@/p'
30170case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
30171*datarootdir*) ac_datarootdir_seen=yes;;
30172*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
30173 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
30174$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
30175_ACEOF
30176cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30177 ac_datarootdir_hack='
30178 s&@datadir@&$datadir&g
30179 s&@docdir@&$docdir&g
30180 s&@infodir@&$infodir&g
30181 s&@localedir@&$localedir&g
30182 s&@mandir@&$mandir&g
30183 s&\\\${datarootdir}&$datarootdir&g' ;;
30184esac
30185_ACEOF
30186
30187# Neutralize VPATH when `$srcdir' = `.'.
30188# Shell code in configure.ac might set extrasub.
30189# FIXME: do we really want to maintain this feature?
30190cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
30191ac_sed_extra="$ac_vpsub
30192$extrasub
30193_ACEOF
30194cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
30195:t
30196/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30197s|@configure_input@|$ac_sed_conf_input|;t t
30198s&@top_builddir@&$ac_top_builddir_sub&;t t
30199s&@top_build_prefix@&$ac_top_build_prefix&;t t
30200s&@srcdir@&$ac_srcdir&;t t
30201s&@abs_srcdir@&$ac_abs_srcdir&;t t
30202s&@top_srcdir@&$ac_top_srcdir&;t t
30203s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
30204s&@builddir@&$ac_builddir&;t t
30205s&@abs_builddir@&$ac_abs_builddir&;t t
30206s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
30207s&@INSTALL@&$ac_INSTALL&;t t
30208s&@MKDIR_P@&$ac_MKDIR_P&;t t
30209$ac_datarootdir_hack
30210"
d0ac1c44
SM
30211eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
30212 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
30213
30214test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
30215 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
30216 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
30217 "$ac_tmp/out"`; test -z "$ac_out"; } &&
c971b7fa 30218 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 30219which seems to be undefined. Please make sure it is defined" >&5
c971b7fa 30220$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 30221which seems to be undefined. Please make sure it is defined" >&2;}
c971b7fa 30222
d0ac1c44 30223 rm -f "$ac_tmp/stdin"
c971b7fa 30224 case $ac_file in
d0ac1c44
SM
30225 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
30226 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
c971b7fa 30227 esac \
d0ac1c44 30228 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
30229 ;;
30230 :H)
30231 #
30232 # CONFIG_HEADER
30233 #
30234 if test x"$ac_file" != x-; then
30235 {
30236 $as_echo "/* $configure_input */" \
d0ac1c44
SM
30237 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
30238 } >"$ac_tmp/config.h" \
30239 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
30240 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
c971b7fa
PA
30241 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
30242$as_echo "$as_me: $ac_file is unchanged" >&6;}
30243 else
30244 rm -f "$ac_file"
d0ac1c44
SM
30245 mv "$ac_tmp/config.h" "$ac_file" \
30246 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
30247 fi
30248 else
30249 $as_echo "/* $configure_input */" \
d0ac1c44
SM
30250 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
30251 || as_fn_error $? "could not create -" "$LINENO" 5
c971b7fa
PA
30252 fi
30253# Compute "$ac_file"'s index in $config_headers.
30254_am_arg="$ac_file"
30255_am_stamp_count=1
30256for _am_header in $config_headers :; do
30257 case $_am_header in
30258 $_am_arg | $_am_arg:* )
30259 break ;;
30260 * )
30261 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
30262 esac
30263done
30264echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
30265$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30266 X"$_am_arg" : 'X\(//\)[^/]' \| \
30267 X"$_am_arg" : 'X\(//\)$' \| \
30268 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
30269$as_echo X"$_am_arg" |
30270 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30271 s//\1/
30272 q
30273 }
30274 /^X\(\/\/\)[^/].*/{
30275 s//\1/
30276 q
30277 }
30278 /^X\(\/\/\)$/{
30279 s//\1/
30280 q
30281 }
30282 /^X\(\/\).*/{
30283 s//\1/
30284 q
30285 }
30286 s/.*/./; q'`/stamp-h$_am_stamp_count
30287 ;;
30288
30289 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
30290$as_echo "$as_me: executing $ac_file commands" >&6;}
30291 ;;
30292 esac
30293
30294
30295 case $ac_file$ac_mode in
30296 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
d0ac1c44 30297 # Older Autoconf quotes --file arguments for eval, but not when files
c971b7fa
PA
30298 # are listed without --file. Let's play safe and only enable the eval
30299 # if we detect the quoting.
30300 case $CONFIG_FILES in
30301 *\'*) eval set x "$CONFIG_FILES" ;;
30302 *) set x $CONFIG_FILES ;;
30303 esac
30304 shift
30305 for mf
30306 do
30307 # Strip MF so we end up with the name of the file.
30308 mf=`echo "$mf" | sed -e 's/:.*$//'`
30309 # Check whether this is an Automake generated Makefile or not.
d0ac1c44 30310 # We used to match only the files named 'Makefile.in', but
c971b7fa
PA
30311 # some people rename them; so instead we look at the file content.
30312 # Grep'ing the first line is not enough: some people post-process
30313 # each Makefile.in and add a new line on top of each file to say so.
30314 # Grep'ing the whole file is not good either: AIX grep has a line
30315 # limit of 2048, but all sed's we know have understand at least 4000.
30316 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
30317 dirpart=`$as_dirname -- "$mf" ||
30318$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30319 X"$mf" : 'X\(//\)[^/]' \| \
30320 X"$mf" : 'X\(//\)$' \| \
30321 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
30322$as_echo X"$mf" |
30323 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30324 s//\1/
30325 q
30326 }
30327 /^X\(\/\/\)[^/].*/{
30328 s//\1/
30329 q
30330 }
30331 /^X\(\/\/\)$/{
30332 s//\1/
30333 q
30334 }
30335 /^X\(\/\).*/{
30336 s//\1/
30337 q
30338 }
30339 s/.*/./; q'`
30340 else
30341 continue
30342 fi
30343 # Extract the definition of DEPDIR, am__include, and am__quote
d0ac1c44 30344 # from the Makefile without running 'make'.
c971b7fa
PA
30345 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
30346 test -z "$DEPDIR" && continue
30347 am__include=`sed -n 's/^am__include = //p' < "$mf"`
d0ac1c44 30348 test -z "$am__include" && continue
c971b7fa 30349 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
c971b7fa
PA
30350 # Find all dependency output files, they are included files with
30351 # $(DEPDIR) in their names. We invoke sed twice because it is the
30352 # simplest approach to changing $(DEPDIR) to its actual value in the
30353 # expansion.
30354 for file in `sed -n "
30355 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
d0ac1c44 30356 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
c971b7fa
PA
30357 # Make sure the directory exists.
30358 test -f "$dirpart/$file" && continue
30359 fdir=`$as_dirname -- "$file" ||
30360$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30361 X"$file" : 'X\(//\)[^/]' \| \
30362 X"$file" : 'X\(//\)$' \| \
30363 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
30364$as_echo X"$file" |
30365 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
30366 s//\1/
30367 q
30368 }
30369 /^X\(\/\/\)[^/].*/{
30370 s//\1/
30371 q
30372 }
30373 /^X\(\/\/\)$/{
30374 s//\1/
30375 q
30376 }
30377 /^X\(\/\).*/{
30378 s//\1/
30379 q
30380 }
30381 s/.*/./; q'`
30382 as_dir=$dirpart/$fdir; as_fn_mkdir_p
30383 # echo "creating $dirpart/$file"
30384 echo '# dummy' > "$dirpart/$file"
30385 done
30386 done
30387}
30388 ;;
30389 "default":C)
30390case x$CONFIG_HEADERS in
30391xconfig.h:config.in)
30392echo > stamp-h ;;
30393esac
30394 ;;
30395
30396 esac
30397done # for ac_tag
30398
30399
30400as_fn_exit 0
30401_ACEOF
30402ac_clean_files=$ac_clean_files_save
30403
30404test $ac_write_fail = 0 ||
d0ac1c44 30405 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
30406
30407
30408# configure is writing to config.log, and then calls config.status.
30409# config.status does its own redirection, appending to config.log.
30410# Unfortunately, on DOS this fails, as config.log is still kept open
30411# by configure, so config.status won't be able to write to it; its
30412# output is simply discarded. So we exec the FD to /dev/null,
30413# effectively closing config.log, so it can be properly (re)opened and
30414# appended to by config.status. When coming back to configure, we
30415# need to make the FD available again.
30416if test "$no_create" != yes; then
30417 ac_cs_success=:
30418 ac_config_status_args=
30419 test "$silent" = yes &&
30420 ac_config_status_args="$ac_config_status_args --quiet"
30421 exec 5>/dev/null
30422 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
30423 exec 5>>config.log
30424 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30425 # would make configure fail if this is the last instruction.
d0ac1c44 30426 $ac_cs_success || as_fn_exit 1
c971b7fa
PA
30427fi
30428if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
30429 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
30430$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
30431fi
30432
30433
30434exit 0
This page took 3.015295 seconds and 4 git commands to generate.