]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gnulib/configure
Introduce mmap_file function
[thirdparty/binutils-gdb.git] / gdb / gnulib / configure
CommitLineData
c971b7fa
PA
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
d0ac1c44
SM
3# Generated by GNU Autoconf 2.69 for libgnu UNUSED-VERSION.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
c971b7fa 7#
c971b7fa
PA
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 90as_myself=
c971b7fa
PA
91case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
d0ac1c44
SM
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
c971b7fa
PA
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
d0ac1c44
SM
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
c971b7fa
PA
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
d0ac1c44
SM
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
c971b7fa
PA
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
271 fi
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
301
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
c971b7fa
PA
356
357
358} # as_fn_mkdir_p
d0ac1c44
SM
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
c971b7fa
PA
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
d0ac1c44
SM
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
c971b7fa
PA
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 407# script with STATUS, using 1 if that was 0.
c971b7fa
PA
408as_fn_error ()
409{
d0ac1c44
SM
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
c971b7fa 414 fi
d0ac1c44 415 $as_echo "$as_me: error: $2" >&2
c971b7fa
PA
416 as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422else
423 as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428else
429 as_basename=false
430fi
431
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
437
438as_me=`$as_basename -- "$0" ||
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
d0ac1c44
SM
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
c971b7fa
PA
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498}
499
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509*)
510 ECHO_N='-n';;
511esac
512
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519fi
520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 526 # In both cases, we have to default to `cp -pR'.
c971b7fa 527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 528 as_ln_s='cp -pR'
c971b7fa
PA
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
d0ac1c44 532 as_ln_s='cp -pR'
c971b7fa
PA
533 fi
534else
d0ac1c44 535 as_ln_s='cp -pR'
c971b7fa
PA
536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
d0ac1c44
SM
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
c971b7fa
PA
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
d0ac1c44
SM
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
c971b7fa
PA
559
560# Name of the host.
d0ac1c44 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
c971b7fa
PA
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
576
577# Identity of this package.
d0ac1c44
SM
578PACKAGE_NAME='libgnu'
579PACKAGE_TARNAME='libgnu'
580PACKAGE_VERSION='UNUSED-VERSION'
581PACKAGE_STRING='libgnu UNUSED-VERSION'
582PACKAGE_BUGREPORT=''
583PACKAGE_URL=''
c971b7fa 584
8690e634 585ac_unique_file="import/memmem.c"
c971b7fa
PA
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
589#ifdef HAVE_SYS_TYPES_H
590# include <sys/types.h>
591#endif
592#ifdef HAVE_SYS_STAT_H
593# include <sys/stat.h>
594#endif
595#ifdef STDC_HEADERS
596# include <stdlib.h>
597# include <stddef.h>
598#else
599# ifdef HAVE_STDLIB_H
600# include <stdlib.h>
601# endif
602#endif
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
609#ifdef HAVE_STRINGS_H
610# include <strings.h>
611#endif
612#ifdef HAVE_INTTYPES_H
613# include <inttypes.h>
614#endif
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
619# include <unistd.h>
620#endif"
621
472fa5ee
SM
622gl_func_list=
623gl_header_list=
8690e634 624gl_fnmatch_required=POSIX
c971b7fa
PA
625ac_subst_vars='am__EXEEXT_FALSE
626am__EXEEXT_TRUE
627gltests_LTLIBOBJS
628gltests_LIBOBJS
629gl_LTLIBOBJS
630gl_LIBOBJS
631LTLIBOBJS
632LIBOBJS
633LN_S
39be3c7e
SM
634AM_BACKSLASH
635AM_DEFAULT_VERBOSITY
d0ac1c44
SM
636AM_DEFAULT_V
637AM_V
c971b7fa
PA
638am__fastdepCC_FALSE
639am__fastdepCC_TRUE
640CCDEPMODE
d0ac1c44 641am__nodep
c971b7fa
PA
642AMDEPBACKSLASH
643AMDEP_FALSE
644AMDEP_TRUE
645am__quote
646am__include
647DEPDIR
648am__untar
649am__tar
650AMTAR
651am__leading_dot
652SET_MAKE
653AWK
654mkdir_p
c971b7fa
PA
655INSTALL_STRIP_PROGRAM
656STRIP
657install_sh
658MAKEINFO
659AUTOHEADER
660AUTOMAKE
661AUTOCONF
662ACLOCAL
663VERSION
664PACKAGE
665CYGPATH_W
666am__isrc
667INSTALL_DATA
668INSTALL_SCRIPT
669INSTALL_PROGRAM
670LIBGNU_LTLIBDEPS
671LIBGNU_LIBDEPS
672gltests_WITNESS
8690e634
JK
673REPLACE_TOWLOWER
674REPLACE_ISWCNTRL
675HAVE_WCTYPE_H
676NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
677NEXT_WCTYPE_H
678HAVE_ISWCNTRL
679REPLACE_ISWBLANK
680HAVE_WCTRANS_T
681HAVE_WCTYPE_T
682HAVE_ISWBLANK
683GNULIB_TOWCTRANS
684GNULIB_WCTRANS
685GNULIB_ISWCTYPE
686GNULIB_WCTYPE
687GNULIB_ISWBLANK
688HAVE_WINT_T
689HAVE_FEATURES_H
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
4a626d0a
PA
701REPLACE_LOCALTIME
702REPLACE_GMTIME
09607c9e
TT
703REPLACE_TIMEGM
704REPLACE_NANOSLEEP
705REPLACE_MKTIME
706REPLACE_LOCALTIME_R
707HAVE_TIMEGM
708HAVE_STRPTIME
709HAVE_NANOSLEEP
710HAVE_DECL_LOCALTIME_R
4a626d0a 711GNULIB_TIME_RZ
09607c9e
TT
712GNULIB_TIME_R
713GNULIB_TIMEGM
714GNULIB_STRPTIME
715GNULIB_NANOSLEEP
716GNULIB_MKTIME
63ce7108
TT
717WINDOWS_64_BIT_OFF_T
718NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
719NEXT_SYS_TYPES_H
09607c9e 720MKDIR_P
2196f55f
YQ
721NEXT_AS_FIRST_DIRECTIVE_STRING_H
722NEXT_STRING_H
98399780
YQ
723NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
724NEXT_STDLIB_H
6a29c58e
YQ
725NEXT_AS_FIRST_DIRECTIVE_STDIO_H
726NEXT_STDIO_H
2196f55f
YQ
727NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
728NEXT_STDDEF_H
729GL_GENERATE_STDDEF_H_FALSE
730GL_GENERATE_STDDEF_H_TRUE
731STDDEF_H
732HAVE_WCHAR_T
4a626d0a 733HAVE_MAX_ALIGN_T
2196f55f
YQ
734REPLACE_NULL
735HAVE__BOOL
736GL_GENERATE_STDBOOL_H_FALSE
737GL_GENERATE_STDBOOL_H_TRUE
738STDBOOL_H
0750520d
PA
739NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
740NEXT_SIGNAL_H
741REPLACE_RAISE
742REPLACE_PTHREAD_SIGMASK
743HAVE_SIGHANDLER_T
744HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
745HAVE_STRUCT_SIGACTION_SA_SIGACTION
746HAVE_SIGACTION
747HAVE_SIGINFO_T
748HAVE_SIGSET_T
749HAVE_RAISE
750HAVE_PTHREAD_SIGMASK
751HAVE_POSIX_SIGNALBLOCKING
752GNULIB_SIGACTION
753GNULIB_SIGPROCMASK
754GNULIB_SIGNAL_H_SIGPIPE
755GNULIB_RAISE
756GNULIB_PTHREAD_SIGMASK
6a29c58e
YQ
757REPLACE_VSPRINTF
758REPLACE_VSNPRINTF
759REPLACE_VPRINTF
760REPLACE_VFPRINTF
761REPLACE_VDPRINTF
762REPLACE_VASPRINTF
763REPLACE_TMPFILE
764REPLACE_STDIO_WRITE_FUNCS
765REPLACE_STDIO_READ_FUNCS
766REPLACE_SPRINTF
767REPLACE_SNPRINTF
768REPLACE_RENAMEAT
769REPLACE_RENAME
770REPLACE_REMOVE
771REPLACE_PRINTF
772REPLACE_POPEN
773REPLACE_PERROR
774REPLACE_OBSTACK_PRINTF
775REPLACE_GETLINE
776REPLACE_GETDELIM
777REPLACE_FTELLO
778REPLACE_FTELL
779REPLACE_FSEEKO
780REPLACE_FSEEK
781REPLACE_FREOPEN
782REPLACE_FPURGE
783REPLACE_FPRINTF
784REPLACE_FOPEN
785REPLACE_FFLUSH
786REPLACE_FDOPEN
787REPLACE_FCLOSE
788REPLACE_DPRINTF
789HAVE_VDPRINTF
790HAVE_VASPRINTF
791HAVE_RENAMEAT
792HAVE_POPEN
793HAVE_PCLOSE
794HAVE_FTELLO
795HAVE_FSEEKO
796HAVE_DPRINTF
797HAVE_DECL_VSNPRINTF
798HAVE_DECL_SNPRINTF
799HAVE_DECL_OBSTACK_PRINTF
800HAVE_DECL_GETLINE
801HAVE_DECL_GETDELIM
802HAVE_DECL_FTELLO
803HAVE_DECL_FSEEKO
804HAVE_DECL_FPURGE
805GNULIB_VSPRINTF_POSIX
806GNULIB_VSNPRINTF
807GNULIB_VPRINTF_POSIX
808GNULIB_VPRINTF
809GNULIB_VFPRINTF_POSIX
810GNULIB_VFPRINTF
811GNULIB_VDPRINTF
812GNULIB_VSCANF
813GNULIB_VFSCANF
814GNULIB_VASPRINTF
815GNULIB_TMPFILE
816GNULIB_STDIO_H_SIGPIPE
817GNULIB_STDIO_H_NONBLOCKING
818GNULIB_SPRINTF_POSIX
819GNULIB_SNPRINTF
820GNULIB_SCANF
821GNULIB_RENAMEAT
822GNULIB_RENAME
823GNULIB_REMOVE
824GNULIB_PUTS
825GNULIB_PUTCHAR
826GNULIB_PUTC
827GNULIB_PRINTF_POSIX
828GNULIB_PRINTF
829GNULIB_POPEN
830GNULIB_PERROR
831GNULIB_PCLOSE
832GNULIB_OBSTACK_PRINTF_POSIX
833GNULIB_OBSTACK_PRINTF
834GNULIB_GETLINE
835GNULIB_GETDELIM
836GNULIB_GETCHAR
837GNULIB_GETC
838GNULIB_FWRITE
839GNULIB_FTELLO
840GNULIB_FTELL
841GNULIB_FSEEKO
842GNULIB_FSEEK
843GNULIB_FSCANF
844GNULIB_FREOPEN
845GNULIB_FREAD
846GNULIB_FPUTS
847GNULIB_FPUTC
848GNULIB_FPURGE
849GNULIB_FPRINTF_POSIX
850GNULIB_FPRINTF
851GNULIB_FOPEN
852GNULIB_FGETS
853GNULIB_FGETC
854GNULIB_FFLUSH
855GNULIB_FDOPEN
856GNULIB_FCLOSE
857GNULIB_DPRINTF
c971b7fa
PA
858UNDEFINE_STRTOK_R
859REPLACE_STRTOK_R
860REPLACE_STRSIGNAL
861REPLACE_STRNLEN
862REPLACE_STRNDUP
863REPLACE_STRNCAT
864REPLACE_STRERROR_R
865REPLACE_STRERROR
866REPLACE_STRCHRNUL
867REPLACE_STRCASESTR
868REPLACE_STRSTR
869REPLACE_STRDUP
870REPLACE_STPNCPY
871REPLACE_MEMMEM
872REPLACE_MEMCHR
873HAVE_STRVERSCMP
874HAVE_DECL_STRSIGNAL
875HAVE_DECL_STRERROR_R
876HAVE_DECL_STRTOK_R
877HAVE_STRCASESTR
878HAVE_STRSEP
879HAVE_STRPBRK
880HAVE_DECL_STRNLEN
881HAVE_DECL_STRNDUP
882HAVE_DECL_STRDUP
883HAVE_STRCHRNUL
884HAVE_STPNCPY
885HAVE_STPCPY
886HAVE_RAWMEMCHR
887HAVE_DECL_MEMRCHR
888HAVE_MEMPCPY
889HAVE_DECL_MEMMEM
890HAVE_MEMCHR
891HAVE_FFSLL
892HAVE_FFSL
893HAVE_MBSLEN
894GNULIB_STRVERSCMP
895GNULIB_STRSIGNAL
896GNULIB_STRERROR_R
897GNULIB_STRERROR
898GNULIB_MBSTOK_R
899GNULIB_MBSSEP
900GNULIB_MBSSPN
901GNULIB_MBSPBRK
902GNULIB_MBSCSPN
903GNULIB_MBSCASESTR
904GNULIB_MBSPCASECMP
905GNULIB_MBSNCASECMP
906GNULIB_MBSCASECMP
907GNULIB_MBSSTR
908GNULIB_MBSRCHR
909GNULIB_MBSCHR
910GNULIB_MBSNLEN
911GNULIB_MBSLEN
912GNULIB_STRTOK_R
913GNULIB_STRCASESTR
914GNULIB_STRSTR
915GNULIB_STRSEP
916GNULIB_STRPBRK
917GNULIB_STRNLEN
918GNULIB_STRNDUP
919GNULIB_STRNCAT
920GNULIB_STRDUP
921GNULIB_STRCHRNUL
922GNULIB_STPNCPY
923GNULIB_STPCPY
924GNULIB_RAWMEMCHR
925GNULIB_MEMRCHR
926GNULIB_MEMPCPY
927GNULIB_MEMMEM
928GNULIB_MEMCHR
929GNULIB_FFSLL
930GNULIB_FFSL
8690e634
JK
931LOCALE_FR
932LOCALE_FR_UTF8
933LOCALE_ZH_CN
934LOCALE_JA
935REPLACE_WCSWIDTH
936REPLACE_WCWIDTH
937REPLACE_WCSNRTOMBS
938REPLACE_WCSRTOMBS
939REPLACE_WCRTOMB
940REPLACE_MBSNRTOWCS
941REPLACE_MBSRTOWCS
942REPLACE_MBRLEN
943REPLACE_MBRTOWC
944REPLACE_MBSINIT
945REPLACE_WCTOB
946REPLACE_BTOWC
947REPLACE_MBSTATE_T
948HAVE_DECL_WCWIDTH
949HAVE_DECL_WCTOB
950HAVE_WCSWIDTH
951HAVE_WCSTOK
952HAVE_WCSSTR
953HAVE_WCSPBRK
954HAVE_WCSSPN
955HAVE_WCSCSPN
956HAVE_WCSRCHR
957HAVE_WCSCHR
958HAVE_WCSDUP
959HAVE_WCSXFRM
960HAVE_WCSCOLL
961HAVE_WCSNCASECMP
962HAVE_WCSCASECMP
963HAVE_WCSNCMP
964HAVE_WCSCMP
965HAVE_WCSNCAT
966HAVE_WCSCAT
967HAVE_WCPNCPY
968HAVE_WCSNCPY
969HAVE_WCPCPY
970HAVE_WCSCPY
971HAVE_WCSNLEN
972HAVE_WCSLEN
973HAVE_WMEMSET
974HAVE_WMEMMOVE
975HAVE_WMEMCPY
976HAVE_WMEMCMP
977HAVE_WMEMCHR
978HAVE_WCSNRTOMBS
979HAVE_WCSRTOMBS
980HAVE_WCRTOMB
981HAVE_MBSNRTOWCS
982HAVE_MBSRTOWCS
983HAVE_MBRLEN
984HAVE_MBRTOWC
985HAVE_MBSINIT
986HAVE_BTOWC
987GNULIB_WCSWIDTH
988GNULIB_WCSTOK
989GNULIB_WCSSTR
990GNULIB_WCSPBRK
991GNULIB_WCSSPN
992GNULIB_WCSCSPN
993GNULIB_WCSRCHR
994GNULIB_WCSCHR
995GNULIB_WCSDUP
996GNULIB_WCSXFRM
997GNULIB_WCSCOLL
998GNULIB_WCSNCASECMP
999GNULIB_WCSCASECMP
1000GNULIB_WCSNCMP
1001GNULIB_WCSCMP
1002GNULIB_WCSNCAT
1003GNULIB_WCSCAT
1004GNULIB_WCPNCPY
1005GNULIB_WCSNCPY
1006GNULIB_WCPCPY
1007GNULIB_WCSCPY
1008GNULIB_WCSNLEN
1009GNULIB_WCSLEN
1010GNULIB_WMEMSET
1011GNULIB_WMEMMOVE
1012GNULIB_WMEMCPY
1013GNULIB_WMEMCMP
1014GNULIB_WMEMCHR
1015GNULIB_WCWIDTH
1016GNULIB_WCSNRTOMBS
1017GNULIB_WCSRTOMBS
1018GNULIB_WCRTOMB
1019GNULIB_MBSNRTOWCS
1020GNULIB_MBSRTOWCS
1021GNULIB_MBRLEN
1022GNULIB_MBRTOWC
1023GNULIB_MBSINIT
1024GNULIB_WCTOB
1025GNULIB_BTOWC
88b48903
WN
1026NEXT_AS_FIRST_DIRECTIVE_MATH_H
1027NEXT_MATH_H
8690e634
JK
1028LOCALCHARSET_TESTS_ENVIRONMENT
1029GLIBC21
c971b7fa
PA
1030NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1031NEXT_INTTYPES_H
1032UINT64_MAX_EQ_ULONG_MAX
1033UINT32_MAX_LT_UINTMAX_MAX
1034PRIPTR_PREFIX
1035PRI_MACROS_BROKEN
1036INT64_MAX_EQ_LONG_MAX
1037INT32_MAX_LT_INTMAX_MAX
4a626d0a 1038REPLACE_STRTOUMAX
c971b7fa
PA
1039REPLACE_STRTOIMAX
1040HAVE_DECL_STRTOUMAX
1041HAVE_DECL_STRTOIMAX
1042HAVE_DECL_IMAXDIV
1043HAVE_DECL_IMAXABS
1044GNULIB_STRTOUMAX
1045GNULIB_STRTOIMAX
1046GNULIB_IMAXDIV
1047GNULIB_IMAXABS
1048GL_GENERATE_STDINT_H_FALSE
1049GL_GENERATE_STDINT_H_TRUE
1050STDINT_H
49e4877c
PA
1051HAVE_SYS_INTTYPES_H
1052HAVE_SYS_BITYPES_H
1053HAVE_C99_STDINT_H
c971b7fa
PA
1054WINT_T_SUFFIX
1055WCHAR_T_SUFFIX
1056SIG_ATOMIC_T_SUFFIX
1057SIZE_T_SUFFIX
1058PTRDIFF_T_SUFFIX
1059HAVE_SIGNED_WINT_T
1060HAVE_SIGNED_WCHAR_T
1061HAVE_SIGNED_SIG_ATOMIC_T
1062BITSIZEOF_WINT_T
1063BITSIZEOF_WCHAR_T
1064BITSIZEOF_SIG_ATOMIC_T
1065BITSIZEOF_SIZE_T
1066BITSIZEOF_PTRDIFF_T
1067APPLE_UNIVERSAL_BUILD
c971b7fa
PA
1068HAVE_STDINT_H
1069NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1070NEXT_STDINT_H
c971b7fa
PA
1071HAVE_SYS_TYPES_H
1072HAVE_INTTYPES_H
1073HAVE_WCHAR_H
1074HAVE_UNSIGNED_LONG_LONG_INT
1075HAVE_LONG_LONG_INT
49e4877c
PA
1076GL_GENERATE_LIMITS_H_FALSE
1077GL_GENERATE_LIMITS_H_TRUE
1078LIMITS_H
1079NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1080NEXT_LIMITS_H
6ec2e0f5
SDJ
1081HAVE_SYS_CDEFS_H
1082GL_GENERATE_GLOB_H_FALSE
1083GL_GENERATE_GLOB_H_TRUE
1084GLOB_H
4a626d0a
PA
1085NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1086NEXT_SYS_TIME_H
1087REPLACE_STRUCT_TIMEVAL
1088REPLACE_GETTIMEOFDAY
1089HAVE_TIMEZONE_T
1090HAVE_SYS_TIME_H
1091HAVE_STRUCT_TIMEVAL
1092HAVE_GETTIMEOFDAY
1093GNULIB_GETTIMEOFDAY
6ec2e0f5
SDJ
1094LTLIBINTL
1095LIBINTL
1096WINDOWS_64_BIT_ST_SIZE
1097NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1098NEXT_SYS_STAT_H
1099REPLACE_UTIMENSAT
1100REPLACE_STAT
1101REPLACE_MKNOD
1102REPLACE_MKFIFO
1103REPLACE_MKDIR
1104REPLACE_LSTAT
1105REPLACE_FUTIMENS
1106REPLACE_FSTATAT
1107REPLACE_FSTAT
1108HAVE_UTIMENSAT
1109HAVE_MKNODAT
1110HAVE_MKNOD
1111HAVE_MKFIFOAT
1112HAVE_MKFIFO
1113HAVE_MKDIRAT
1114HAVE_LSTAT
1115HAVE_LCHMOD
1116HAVE_FUTIMENS
1117HAVE_FSTATAT
1118HAVE_FCHMODAT
1119GNULIB_UTIMENSAT
1120GNULIB_STAT
1121GNULIB_MKNODAT
1122GNULIB_MKNOD
1123GNULIB_MKFIFOAT
1124GNULIB_MKFIFO
1125GNULIB_MKDIRAT
1126GNULIB_LSTAT
1127GNULIB_LCHMOD
1128GNULIB_FUTIMENS
1129GNULIB_FSTATAT
1130GNULIB_FSTAT
1131GNULIB_FCHMODAT
88b48903
WN
1132FREXPL_LIBM
1133HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1134FREXP_LIBM
1135REPLACE_TRUNCL
1136REPLACE_TRUNCF
1137REPLACE_TRUNC
1138REPLACE_SQRTL
1139REPLACE_SIGNBIT_USING_GCC
1140REPLACE_SIGNBIT
1141REPLACE_ROUNDL
1142REPLACE_ROUNDF
1143REPLACE_ROUND
1144REPLACE_REMAINDERL
1145REPLACE_REMAINDERF
1146REPLACE_REMAINDER
1147REPLACE_NAN
1148REPLACE_MODFL
1149REPLACE_MODFF
1150REPLACE_MODF
1151REPLACE_LOGBL
1152REPLACE_LOGBF
1153REPLACE_LOGB
1154REPLACE_LOG2L
1155REPLACE_LOG2F
1156REPLACE_LOG2
1157REPLACE_LOG1PL
1158REPLACE_LOG1PF
1159REPLACE_LOG1P
1160REPLACE_LOG10L
1161REPLACE_LOG10F
1162REPLACE_LOG10
1163REPLACE_LOGL
1164REPLACE_LOGF
1165REPLACE_LOG
1166REPLACE_LDEXPL
1167REPLACE_ISNAN
1168REPLACE_ISINF
1169REPLACE_ISFINITE
1170REPLACE_ILOGBF
1171REPLACE_ILOGB
1172REPLACE_HYPOTL
1173REPLACE_HYPOTF
1174REPLACE_HYPOT
1175REPLACE_HUGE_VAL
1176REPLACE_FREXPL
1177REPLACE_FREXP
1178REPLACE_FREXPF
1179REPLACE_FMODL
1180REPLACE_FMODF
1181REPLACE_FMOD
1182REPLACE_FMAL
1183REPLACE_FMAF
1184REPLACE_FMA
1185REPLACE_FLOORL
1186REPLACE_FLOORF
1187REPLACE_FLOOR
1188REPLACE_FABSL
1189REPLACE_EXP2L
1190REPLACE_EXP2
1191REPLACE_EXPM1F
1192REPLACE_EXPM1
1193REPLACE_CEILL
1194REPLACE_CEILF
1195REPLACE_CEIL
1196REPLACE_CBRTL
1197REPLACE_CBRTF
1198HAVE_DECL_TRUNCL
1199HAVE_DECL_TRUNCF
1200HAVE_DECL_TRUNC
1201HAVE_DECL_TANL
1202HAVE_DECL_SQRTL
1203HAVE_DECL_SINL
1204HAVE_DECL_ROUNDL
1205HAVE_DECL_ROUNDF
1206HAVE_DECL_ROUND
1207HAVE_DECL_RINTF
1208HAVE_DECL_REMAINDERL
1209HAVE_DECL_REMAINDER
1210HAVE_DECL_LOGB
1211HAVE_DECL_LOG2L
1212HAVE_DECL_LOG2F
1213HAVE_DECL_LOG2
1214HAVE_DECL_LOG10L
1215HAVE_DECL_LOGL
1216HAVE_DECL_LDEXPL
1217HAVE_DECL_FREXPL
1218HAVE_DECL_FLOORL
1219HAVE_DECL_FLOORF
1220HAVE_DECL_EXPM1L
1221HAVE_DECL_EXP2L
1222HAVE_DECL_EXP2F
1223HAVE_DECL_EXP2
1224HAVE_DECL_EXPL
1225HAVE_DECL_COSL
1226HAVE_DECL_COPYSIGNF
1227HAVE_DECL_CEILL
1228HAVE_DECL_CEILF
1229HAVE_DECL_CBRTL
1230HAVE_DECL_CBRTF
1231HAVE_DECL_ATANL
1232HAVE_DECL_ASINL
1233HAVE_DECL_ACOSL
1234HAVE_TANHF
1235HAVE_TANL
1236HAVE_TANF
1237HAVE_SQRTL
1238HAVE_SQRTF
1239HAVE_SINHF
1240HAVE_SINL
1241HAVE_SINF
1242HAVE_RINTL
1243HAVE_RINT
1244HAVE_REMAINDERF
1245HAVE_REMAINDER
1246HAVE_POWF
1247HAVE_MODFL
1248HAVE_MODFF
1249HAVE_LOGBL
1250HAVE_LOGBF
1251HAVE_LOG1PL
1252HAVE_LOG1PF
1253HAVE_LOG1P
1254HAVE_LOG10L
1255HAVE_LOG10F
1256HAVE_LOGL
1257HAVE_LOGF
1258HAVE_LDEXPF
1259HAVE_ISNANL
1260HAVE_ISNAND
1261HAVE_ISNANF
1262HAVE_ILOGBL
1263HAVE_ILOGBF
1264HAVE_ILOGB
1265HAVE_HYPOTL
1266HAVE_HYPOTF
1267HAVE_FREXPF
1268HAVE_FMODL
1269HAVE_FMODF
1270HAVE_FMAL
1271HAVE_FMAF
1272HAVE_FMA
1273HAVE_FABSL
1274HAVE_FABSF
1275HAVE_EXPM1F
1276HAVE_EXPM1
1277HAVE_EXPL
1278HAVE_EXPF
1279HAVE_COSHF
1280HAVE_COSL
1281HAVE_COSF
1282HAVE_COPYSIGNL
1283HAVE_COPYSIGN
1284HAVE_CBRTL
1285HAVE_CBRTF
1286HAVE_CBRT
1287HAVE_ATAN2F
1288HAVE_ATANL
1289HAVE_ATANF
1290HAVE_ASINL
1291HAVE_ASINF
1292HAVE_ACOSL
1293HAVE_ACOSF
1294GNULIB_TRUNCL
1295GNULIB_TRUNCF
1296GNULIB_TRUNC
1297GNULIB_TANHF
1298GNULIB_TANL
1299GNULIB_TANF
1300GNULIB_SQRTL
1301GNULIB_SQRTF
1302GNULIB_SINHF
1303GNULIB_SINL
1304GNULIB_SINF
1305GNULIB_SIGNBIT
1306GNULIB_ROUNDL
1307GNULIB_ROUNDF
1308GNULIB_ROUND
1309GNULIB_RINTL
1310GNULIB_RINTF
1311GNULIB_RINT
1312GNULIB_REMAINDERL
1313GNULIB_REMAINDERF
1314GNULIB_REMAINDER
1315GNULIB_POWF
1316GNULIB_MODFL
1317GNULIB_MODFF
1318GNULIB_MODF
1319GNULIB_LOGBL
1320GNULIB_LOGBF
1321GNULIB_LOGB
1322GNULIB_LOG2L
1323GNULIB_LOG2F
1324GNULIB_LOG2
1325GNULIB_LOG1PL
1326GNULIB_LOG1PF
1327GNULIB_LOG1P
1328GNULIB_LOG10L
1329GNULIB_LOG10F
1330GNULIB_LOG10
1331GNULIB_LOGL
1332GNULIB_LOGF
1333GNULIB_LOG
1334GNULIB_LDEXPL
1335GNULIB_LDEXPF
1336GNULIB_ISNANL
1337GNULIB_ISNAND
1338GNULIB_ISNANF
1339GNULIB_ISNAN
1340GNULIB_ISINF
1341GNULIB_ISFINITE
1342GNULIB_ILOGBL
1343GNULIB_ILOGBF
1344GNULIB_ILOGB
1345GNULIB_HYPOTL
1346GNULIB_HYPOTF
1347GNULIB_HYPOT
1348GNULIB_FREXPL
1349GNULIB_FREXP
1350GNULIB_FREXPF
1351GNULIB_FMODL
1352GNULIB_FMODF
1353GNULIB_FMOD
1354GNULIB_FMAL
1355GNULIB_FMAF
1356GNULIB_FMA
1357GNULIB_FLOORL
1358GNULIB_FLOORF
1359GNULIB_FLOOR
1360GNULIB_FABSL
1361GNULIB_FABSF
1362GNULIB_EXPM1L
1363GNULIB_EXPM1F
1364GNULIB_EXPM1
1365GNULIB_EXP2L
1366GNULIB_EXP2F
1367GNULIB_EXP2
1368GNULIB_EXPL
1369GNULIB_EXPF
1370GNULIB_COSHF
1371GNULIB_COSL
1372GNULIB_COSF
1373GNULIB_COPYSIGNL
1374GNULIB_COPYSIGNF
1375GNULIB_COPYSIGN
1376GNULIB_CEILL
1377GNULIB_CEILF
1378GNULIB_CEIL
1379GNULIB_CBRTL
1380GNULIB_CBRTF
1381GNULIB_CBRT
1382GNULIB_ATAN2F
1383GNULIB_ATANL
1384GNULIB_ATANF
1385GNULIB_ASINL
1386GNULIB_ASINF
1387GNULIB_ACOSL
1388GNULIB_ACOSF
8690e634
JK
1389GL_GENERATE_FNMATCH_H_FALSE
1390GL_GENERATE_FNMATCH_H_TRUE
1391FNMATCH_H
88b48903
WN
1392REPLACE_ITOLD
1393GL_GENERATE_FLOAT_H_FALSE
1394GL_GENERATE_FLOAT_H_TRUE
1395FLOAT_H
1396NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1397NEXT_FLOAT_H
6ec2e0f5
SDJ
1398NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1399NEXT_FCNTL_H
1400REPLACE_OPENAT
1401REPLACE_OPEN
1402REPLACE_FCNTL
1403HAVE_OPENAT
1404HAVE_FCNTL
1405GNULIB_OPENAT
1406GNULIB_OPEN
1407GNULIB_NONBLOCKING
1408GNULIB_FCNTL
18848e28
GF
1409EOVERFLOW_VALUE
1410EOVERFLOW_HIDDEN
1411ENOLINK_VALUE
1412ENOLINK_HIDDEN
1413EMULTIHOP_VALUE
1414EMULTIHOP_HIDDEN
1415GL_GENERATE_ERRNO_H_FALSE
1416GL_GENERATE_ERRNO_H_TRUE
1417ERRNO_H
1418NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1419NEXT_ERRNO_H
e26b6bb0
TT
1420HAVE_DIRENT_H
1421NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1422NEXT_DIRENT_H
88b48903
WN
1423PRAGMA_COLUMNS
1424PRAGMA_SYSTEM_HEADER
1425INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1426INCLUDE_NEXT
6ec2e0f5
SDJ
1427pkglibexecdir
1428runstatedir
1429lispdir
e26b6bb0
TT
1430REPLACE_FDOPENDIR
1431REPLACE_DIRFD
1432REPLACE_CLOSEDIR
1433REPLACE_OPENDIR
1434HAVE_ALPHASORT
1435HAVE_SCANDIR
1436HAVE_FDOPENDIR
1437HAVE_DECL_FDOPENDIR
1438HAVE_DECL_DIRFD
1439HAVE_CLOSEDIR
1440HAVE_REWINDDIR
1441HAVE_READDIR
1442HAVE_OPENDIR
1443GNULIB_ALPHASORT
1444GNULIB_SCANDIR
1445GNULIB_FDOPENDIR
1446GNULIB_DIRFD
1447GNULIB_CLOSEDIR
1448GNULIB_REWINDDIR
1449GNULIB_READDIR
1450GNULIB_OPENDIR
6ec2e0f5
SDJ
1451HAVE_WINSOCK2_H
1452HAVE_MSVC_INVALID_PARAMETER_HANDLER
e26b6bb0
TT
1453UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1454UNISTD_H_HAVE_WINSOCK2_H
1455REPLACE_WRITE
1456REPLACE_USLEEP
1457REPLACE_UNLINKAT
1458REPLACE_UNLINK
1459REPLACE_TTYNAME_R
4a626d0a 1460REPLACE_SYMLINKAT
e26b6bb0
TT
1461REPLACE_SYMLINK
1462REPLACE_SLEEP
1463REPLACE_RMDIR
4a626d0a 1464REPLACE_READLINKAT
e26b6bb0
TT
1465REPLACE_READLINK
1466REPLACE_READ
1467REPLACE_PWRITE
1468REPLACE_PREAD
1469REPLACE_LSEEK
1470REPLACE_LINKAT
1471REPLACE_LINK
1472REPLACE_LCHOWN
1473REPLACE_ISATTY
1474REPLACE_GETPAGESIZE
1475REPLACE_GETGROUPS
1476REPLACE_GETLOGIN_R
4a626d0a 1477REPLACE_GETDTABLESIZE
e26b6bb0
TT
1478REPLACE_GETDOMAINNAME
1479REPLACE_GETCWD
1480REPLACE_FTRUNCATE
1481REPLACE_FCHOWNAT
1482REPLACE_DUP2
1483REPLACE_DUP
1484REPLACE_CLOSE
1485REPLACE_CHOWN
1486HAVE_SYS_PARAM_H
1487HAVE_OS_H
1488HAVE_DECL_TTYNAME_R
1489HAVE_DECL_SETHOSTNAME
1490HAVE_DECL_GETUSERSHELL
1491HAVE_DECL_GETPAGESIZE
1492HAVE_DECL_GETLOGIN_R
1493HAVE_DECL_GETDOMAINNAME
1494HAVE_DECL_FDATASYNC
1495HAVE_DECL_FCHDIR
1496HAVE_DECL_ENVIRON
1497HAVE_USLEEP
1498HAVE_UNLINKAT
1499HAVE_SYMLINKAT
1500HAVE_SYMLINK
1501HAVE_SLEEP
1502HAVE_SETHOSTNAME
1503HAVE_READLINKAT
1504HAVE_READLINK
1505HAVE_PWRITE
1506HAVE_PREAD
1507HAVE_PIPE2
1508HAVE_PIPE
1509HAVE_LINKAT
1510HAVE_LINK
1511HAVE_LCHOWN
1512HAVE_GROUP_MEMBER
1513HAVE_GETPAGESIZE
1514HAVE_GETLOGIN
1515HAVE_GETHOSTNAME
1516HAVE_GETGROUPS
1517HAVE_GETDTABLESIZE
1518HAVE_FTRUNCATE
1519HAVE_FSYNC
1520HAVE_FDATASYNC
1521HAVE_FCHOWNAT
1522HAVE_FCHDIR
1523HAVE_FACCESSAT
1524HAVE_EUIDACCESS
1525HAVE_DUP3
1526HAVE_DUP2
1527HAVE_CHOWN
1528GNULIB_WRITE
1529GNULIB_USLEEP
1530GNULIB_UNLINKAT
1531GNULIB_UNLINK
1532GNULIB_UNISTD_H_SIGPIPE
1533GNULIB_UNISTD_H_NONBLOCKING
1534GNULIB_TTYNAME_R
1535GNULIB_SYMLINKAT
1536GNULIB_SYMLINK
1537GNULIB_SLEEP
1538GNULIB_SETHOSTNAME
1539GNULIB_RMDIR
1540GNULIB_READLINKAT
1541GNULIB_READLINK
1542GNULIB_READ
1543GNULIB_PWRITE
1544GNULIB_PREAD
1545GNULIB_PIPE2
1546GNULIB_PIPE
1547GNULIB_LSEEK
1548GNULIB_LINKAT
1549GNULIB_LINK
1550GNULIB_LCHOWN
1551GNULIB_ISATTY
1552GNULIB_GROUP_MEMBER
1553GNULIB_GETUSERSHELL
1554GNULIB_GETPAGESIZE
1555GNULIB_GETLOGIN_R
1556GNULIB_GETLOGIN
1557GNULIB_GETHOSTNAME
1558GNULIB_GETGROUPS
1559GNULIB_GETDTABLESIZE
1560GNULIB_GETDOMAINNAME
1561GNULIB_GETCWD
1562GNULIB_FTRUNCATE
1563GNULIB_FSYNC
1564GNULIB_FDATASYNC
1565GNULIB_FCHOWNAT
1566GNULIB_FCHDIR
1567GNULIB_FACCESSAT
1568GNULIB_EUIDACCESS
1569GNULIB_ENVIRON
1570GNULIB_DUP3
1571GNULIB_DUP2
1572GNULIB_DUP
1573GNULIB_CLOSE
1574GNULIB_CHOWN
1575GNULIB_CHDIR
98399780
YQ
1576REPLACE_WCTOMB
1577REPLACE_UNSETENV
1578REPLACE_STRTOD
1579REPLACE_SETENV
1580REPLACE_REALPATH
1581REPLACE_REALLOC
1582REPLACE_RANDOM_R
4a626d0a 1583REPLACE_QSORT_R
98399780
YQ
1584REPLACE_PUTENV
1585REPLACE_PTSNAME_R
1586REPLACE_PTSNAME
1587REPLACE_MKSTEMP
1588REPLACE_MBTOWC
1589REPLACE_MALLOC
1590REPLACE_CANONICALIZE_FILE_NAME
1591REPLACE_CALLOC
1592HAVE_DECL_UNSETENV
1593HAVE_UNLOCKPT
1594HAVE_SYS_LOADAVG_H
1595HAVE_STRUCT_RANDOM_DATA
1596HAVE_STRTOULL
1597HAVE_STRTOLL
1598HAVE_STRTOD
1599HAVE_DECL_SETENV
1600HAVE_SETENV
4a626d0a 1601HAVE_SECURE_GETENV
98399780
YQ
1602HAVE_RPMATCH
1603HAVE_REALPATH
1604HAVE_RANDOM_R
1605HAVE_RANDOM_H
1606HAVE_RANDOM
4c62b19f 1607HAVE_QSORT_R
98399780
YQ
1608HAVE_PTSNAME_R
1609HAVE_PTSNAME
1610HAVE_POSIX_OPENPT
1611HAVE_MKSTEMPS
1612HAVE_MKSTEMP
1613HAVE_MKOSTEMPS
1614HAVE_MKOSTEMP
1615HAVE_MKDTEMP
1616HAVE_GRANTPT
1617HAVE_GETSUBOPT
1618HAVE_DECL_GETLOADAVG
1619HAVE_CANONICALIZE_FILE_NAME
1620HAVE_ATOLL
1621HAVE__EXIT
1622GNULIB_WCTOMB
1623GNULIB_UNSETENV
1624GNULIB_UNLOCKPT
1625GNULIB_SYSTEM_POSIX
1626GNULIB_STRTOULL
1627GNULIB_STRTOLL
1628GNULIB_STRTOD
1629GNULIB_SETENV
4a626d0a 1630GNULIB_SECURE_GETENV
98399780
YQ
1631GNULIB_RPMATCH
1632GNULIB_REALPATH
1633GNULIB_REALLOC_POSIX
1634GNULIB_RANDOM_R
1635GNULIB_RANDOM
4a626d0a 1636GNULIB_QSORT_R
98399780
YQ
1637GNULIB_PUTENV
1638GNULIB_PTSNAME_R
1639GNULIB_PTSNAME
1640GNULIB_POSIX_OPENPT
1641GNULIB_MKSTEMPS
1642GNULIB_MKSTEMP
1643GNULIB_MKOSTEMPS
1644GNULIB_MKOSTEMP
1645GNULIB_MKDTEMP
1646GNULIB_MBTOWC
1647GNULIB_MALLOC_POSIX
1648GNULIB_GRANTPT
1649GNULIB_GETSUBOPT
1650GNULIB_GETLOADAVG
1651GNULIB_CANONICALIZE_FILE_NAME
1652GNULIB_CALLOC_POSIX
1653GNULIB_ATOLL
1654GNULIB__EXIT
8690e634
JK
1655GL_GENERATE_ALLOCA_H_FALSE
1656GL_GENERATE_ALLOCA_H_TRUE
1657ALLOCA_H
1658ALLOCA
c971b7fa
PA
1659GL_COND_LIBTOOL_FALSE
1660GL_COND_LIBTOOL_TRUE
1661target_os
1662target_vendor
1663target_cpu
1664target
c971b7fa
PA
1665host_os
1666host_vendor
1667host_cpu
1668host
1669build_os
1670build_vendor
1671build_cpu
1672build
4a626d0a
PA
1673RANLIB
1674ARFLAGS
d0ac1c44 1675ac_ct_AR
4a626d0a
PA
1676AR
1677EGREP
1678GREP
1679CPP
c971b7fa
PA
1680OBJEXT
1681EXEEXT
1682ac_ct_CC
1683CPPFLAGS
1684LDFLAGS
1685CFLAGS
1686CC
1687MAINT
1688MAINTAINER_MODE_FALSE
1689MAINTAINER_MODE_TRUE
1690target_alias
1691host_alias
1692build_alias
1693LIBS
1694ECHO_T
1695ECHO_N
1696ECHO_C
1697DEFS
1698mandir
1699localedir
1700libdir
1701psdir
1702pdfdir
1703dvidir
1704htmldir
1705infodir
1706docdir
1707oldincludedir
1708includedir
1709localstatedir
1710sharedstatedir
1711sysconfdir
1712datadir
1713datarootdir
1714libexecdir
1715sbindir
1716bindir
1717program_transform_name
1718prefix
1719exec_prefix
1720PACKAGE_URL
1721PACKAGE_BUGREPORT
1722PACKAGE_STRING
1723PACKAGE_VERSION
1724PACKAGE_TARNAME
1725PACKAGE_NAME
1726PATH_SEPARATOR
1727SHELL'
1728ac_subst_files=''
1729ac_user_opts='
1730enable_option_checking
1731enable_maintainer_mode
2196f55f 1732enable_largefile
c971b7fa 1733enable_dependency_tracking
39be3c7e 1734enable_silent_rules
c971b7fa
PA
1735'
1736 ac_precious_vars='build_alias
1737host_alias
1738target_alias
1739CC
1740CFLAGS
1741LDFLAGS
1742LIBS
1743CPPFLAGS
1744CPP'
1745
1746
1747# Initialize some variables set by options.
1748ac_init_help=
1749ac_init_version=false
1750ac_unrecognized_opts=
1751ac_unrecognized_sep=
1752# The variables have the same names as the options, with
1753# dashes changed to underlines.
1754cache_file=/dev/null
1755exec_prefix=NONE
1756no_create=
1757no_recursion=
1758prefix=NONE
1759program_prefix=NONE
1760program_suffix=NONE
1761program_transform_name=s,x,x,
1762silent=
1763site=
1764srcdir=
1765verbose=
1766x_includes=NONE
1767x_libraries=NONE
1768
1769# Installation directory options.
1770# These are left unexpanded so users can "make install exec_prefix=/foo"
1771# and all the variables that are supposed to be based on exec_prefix
1772# by default will actually change.
1773# Use braces instead of parens because sh, perl, etc. also accept them.
1774# (The list follows the same order as the GNU Coding Standards.)
1775bindir='${exec_prefix}/bin'
1776sbindir='${exec_prefix}/sbin'
1777libexecdir='${exec_prefix}/libexec'
1778datarootdir='${prefix}/share'
1779datadir='${datarootdir}'
1780sysconfdir='${prefix}/etc'
1781sharedstatedir='${prefix}/com'
1782localstatedir='${prefix}/var'
1783includedir='${prefix}/include'
1784oldincludedir='/usr/include'
d0ac1c44 1785docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
c971b7fa
PA
1786infodir='${datarootdir}/info'
1787htmldir='${docdir}'
1788dvidir='${docdir}'
1789pdfdir='${docdir}'
1790psdir='${docdir}'
1791libdir='${exec_prefix}/lib'
1792localedir='${datarootdir}/locale'
1793mandir='${datarootdir}/man'
1794
1795ac_prev=
1796ac_dashdash=
1797for ac_option
1798do
1799 # If the previous option needs an argument, assign it.
1800 if test -n "$ac_prev"; then
1801 eval $ac_prev=\$ac_option
1802 ac_prev=
1803 continue
1804 fi
1805
1806 case $ac_option in
d0ac1c44
SM
1807 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1808 *=) ac_optarg= ;;
1809 *) ac_optarg=yes ;;
c971b7fa
PA
1810 esac
1811
1812 # Accept the important Cygnus configure options, so we can diagnose typos.
1813
1814 case $ac_dashdash$ac_option in
1815 --)
1816 ac_dashdash=yes ;;
1817
1818 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1819 ac_prev=bindir ;;
1820 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1821 bindir=$ac_optarg ;;
1822
1823 -build | --build | --buil | --bui | --bu)
1824 ac_prev=build_alias ;;
1825 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1826 build_alias=$ac_optarg ;;
1827
1828 -cache-file | --cache-file | --cache-fil | --cache-fi \
1829 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1830 ac_prev=cache_file ;;
1831 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1832 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1833 cache_file=$ac_optarg ;;
1834
1835 --config-cache | -C)
1836 cache_file=config.cache ;;
1837
1838 -datadir | --datadir | --datadi | --datad)
1839 ac_prev=datadir ;;
1840 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1841 datadir=$ac_optarg ;;
1842
1843 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1844 | --dataroo | --dataro | --datar)
1845 ac_prev=datarootdir ;;
1846 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1847 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1848 datarootdir=$ac_optarg ;;
1849
1850 -disable-* | --disable-*)
1851 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1852 # Reject names that are not valid shell variable names.
1853 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1854 as_fn_error $? "invalid feature name: $ac_useropt"
c971b7fa
PA
1855 ac_useropt_orig=$ac_useropt
1856 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1857 case $ac_user_opts in
1858 *"
1859"enable_$ac_useropt"
1860"*) ;;
1861 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1862 ac_unrecognized_sep=', ';;
1863 esac
1864 eval enable_$ac_useropt=no ;;
1865
1866 -docdir | --docdir | --docdi | --doc | --do)
1867 ac_prev=docdir ;;
1868 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1869 docdir=$ac_optarg ;;
1870
1871 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1872 ac_prev=dvidir ;;
1873 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1874 dvidir=$ac_optarg ;;
1875
1876 -enable-* | --enable-*)
1877 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1878 # Reject names that are not valid shell variable names.
1879 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 1880 as_fn_error $? "invalid feature name: $ac_useropt"
c971b7fa
PA
1881 ac_useropt_orig=$ac_useropt
1882 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1883 case $ac_user_opts in
1884 *"
1885"enable_$ac_useropt"
1886"*) ;;
1887 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1888 ac_unrecognized_sep=', ';;
1889 esac
1890 eval enable_$ac_useropt=\$ac_optarg ;;
1891
1892 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1893 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1894 | --exec | --exe | --ex)
1895 ac_prev=exec_prefix ;;
1896 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1897 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1898 | --exec=* | --exe=* | --ex=*)
1899 exec_prefix=$ac_optarg ;;
1900
1901 -gas | --gas | --ga | --g)
1902 # Obsolete; use --with-gas.
1903 with_gas=yes ;;
1904
1905 -help | --help | --hel | --he | -h)
1906 ac_init_help=long ;;
1907 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1908 ac_init_help=recursive ;;
1909 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1910 ac_init_help=short ;;
1911
1912 -host | --host | --hos | --ho)
1913 ac_prev=host_alias ;;
1914 -host=* | --host=* | --hos=* | --ho=*)
1915 host_alias=$ac_optarg ;;
1916
1917 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1918 ac_prev=htmldir ;;
1919 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1920 | --ht=*)
1921 htmldir=$ac_optarg ;;
1922
1923 -includedir | --includedir | --includedi | --included | --include \
1924 | --includ | --inclu | --incl | --inc)
1925 ac_prev=includedir ;;
1926 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1927 | --includ=* | --inclu=* | --incl=* | --inc=*)
1928 includedir=$ac_optarg ;;
1929
1930 -infodir | --infodir | --infodi | --infod | --info | --inf)
1931 ac_prev=infodir ;;
1932 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1933 infodir=$ac_optarg ;;
1934
1935 -libdir | --libdir | --libdi | --libd)
1936 ac_prev=libdir ;;
1937 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1938 libdir=$ac_optarg ;;
1939
1940 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1941 | --libexe | --libex | --libe)
1942 ac_prev=libexecdir ;;
1943 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1944 | --libexe=* | --libex=* | --libe=*)
1945 libexecdir=$ac_optarg ;;
1946
1947 -localedir | --localedir | --localedi | --localed | --locale)
1948 ac_prev=localedir ;;
1949 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1950 localedir=$ac_optarg ;;
1951
1952 -localstatedir | --localstatedir | --localstatedi | --localstated \
1953 | --localstate | --localstat | --localsta | --localst | --locals)
1954 ac_prev=localstatedir ;;
1955 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1956 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1957 localstatedir=$ac_optarg ;;
1958
1959 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1960 ac_prev=mandir ;;
1961 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1962 mandir=$ac_optarg ;;
1963
1964 -nfp | --nfp | --nf)
1965 # Obsolete; use --without-fp.
1966 with_fp=no ;;
1967
1968 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1969 | --no-cr | --no-c | -n)
1970 no_create=yes ;;
1971
1972 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1973 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1974 no_recursion=yes ;;
1975
1976 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1977 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1978 | --oldin | --oldi | --old | --ol | --o)
1979 ac_prev=oldincludedir ;;
1980 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1981 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1982 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1983 oldincludedir=$ac_optarg ;;
1984
1985 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1986 ac_prev=prefix ;;
1987 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1988 prefix=$ac_optarg ;;
1989
1990 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1991 | --program-pre | --program-pr | --program-p)
1992 ac_prev=program_prefix ;;
1993 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1994 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1995 program_prefix=$ac_optarg ;;
1996
1997 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1998 | --program-suf | --program-su | --program-s)
1999 ac_prev=program_suffix ;;
2000 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2001 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2002 program_suffix=$ac_optarg ;;
2003
2004 -program-transform-name | --program-transform-name \
2005 | --program-transform-nam | --program-transform-na \
2006 | --program-transform-n | --program-transform- \
2007 | --program-transform | --program-transfor \
2008 | --program-transfo | --program-transf \
2009 | --program-trans | --program-tran \
2010 | --progr-tra | --program-tr | --program-t)
2011 ac_prev=program_transform_name ;;
2012 -program-transform-name=* | --program-transform-name=* \
2013 | --program-transform-nam=* | --program-transform-na=* \
2014 | --program-transform-n=* | --program-transform-=* \
2015 | --program-transform=* | --program-transfor=* \
2016 | --program-transfo=* | --program-transf=* \
2017 | --program-trans=* | --program-tran=* \
2018 | --progr-tra=* | --program-tr=* | --program-t=*)
2019 program_transform_name=$ac_optarg ;;
2020
2021 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2022 ac_prev=pdfdir ;;
2023 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2024 pdfdir=$ac_optarg ;;
2025
2026 -psdir | --psdir | --psdi | --psd | --ps)
2027 ac_prev=psdir ;;
2028 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2029 psdir=$ac_optarg ;;
2030
2031 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2032 | -silent | --silent | --silen | --sile | --sil)
2033 silent=yes ;;
2034
2035 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2036 ac_prev=sbindir ;;
2037 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2038 | --sbi=* | --sb=*)
2039 sbindir=$ac_optarg ;;
2040
2041 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2042 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2043 | --sharedst | --shareds | --shared | --share | --shar \
2044 | --sha | --sh)
2045 ac_prev=sharedstatedir ;;
2046 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2047 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2048 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2049 | --sha=* | --sh=*)
2050 sharedstatedir=$ac_optarg ;;
2051
2052 -site | --site | --sit)
2053 ac_prev=site ;;
2054 -site=* | --site=* | --sit=*)
2055 site=$ac_optarg ;;
2056
2057 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2058 ac_prev=srcdir ;;
2059 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2060 srcdir=$ac_optarg ;;
2061
2062 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2063 | --syscon | --sysco | --sysc | --sys | --sy)
2064 ac_prev=sysconfdir ;;
2065 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2066 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2067 sysconfdir=$ac_optarg ;;
2068
2069 -target | --target | --targe | --targ | --tar | --ta | --t)
2070 ac_prev=target_alias ;;
2071 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2072 target_alias=$ac_optarg ;;
2073
2074 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2075 verbose=yes ;;
2076
2077 -version | --version | --versio | --versi | --vers | -V)
2078 ac_init_version=: ;;
2079
2080 -with-* | --with-*)
2081 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2082 # Reject names that are not valid shell variable names.
2083 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 2084 as_fn_error $? "invalid package name: $ac_useropt"
c971b7fa
PA
2085 ac_useropt_orig=$ac_useropt
2086 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2087 case $ac_user_opts in
2088 *"
2089"with_$ac_useropt"
2090"*) ;;
2091 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2092 ac_unrecognized_sep=', ';;
2093 esac
2094 eval with_$ac_useropt=\$ac_optarg ;;
2095
2096 -without-* | --without-*)
2097 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2098 # Reject names that are not valid shell variable names.
2099 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
d0ac1c44 2100 as_fn_error $? "invalid package name: $ac_useropt"
c971b7fa
PA
2101 ac_useropt_orig=$ac_useropt
2102 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2103 case $ac_user_opts in
2104 *"
2105"with_$ac_useropt"
2106"*) ;;
2107 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2108 ac_unrecognized_sep=', ';;
2109 esac
2110 eval with_$ac_useropt=no ;;
2111
2112 --x)
2113 # Obsolete; use --with-x.
2114 with_x=yes ;;
2115
2116 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2117 | --x-incl | --x-inc | --x-in | --x-i)
2118 ac_prev=x_includes ;;
2119 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2120 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2121 x_includes=$ac_optarg ;;
2122
2123 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2124 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2125 ac_prev=x_libraries ;;
2126 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2127 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2128 x_libraries=$ac_optarg ;;
2129
d0ac1c44
SM
2130 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2131Try \`$0 --help' for more information"
c971b7fa
PA
2132 ;;
2133
2134 *=*)
2135 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2136 # Reject names that are not valid shell variable names.
2137 case $ac_envvar in #(
2138 '' | [0-9]* | *[!_$as_cr_alnum]* )
d0ac1c44 2139 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
c971b7fa
PA
2140 esac
2141 eval $ac_envvar=\$ac_optarg
2142 export $ac_envvar ;;
2143
2144 *)
2145 # FIXME: should be removed in autoconf 3.0.
2146 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2147 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2148 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
d0ac1c44 2149 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
c971b7fa
PA
2150 ;;
2151
2152 esac
2153done
2154
2155if test -n "$ac_prev"; then
2156 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
d0ac1c44 2157 as_fn_error $? "missing argument to $ac_option"
c971b7fa
PA
2158fi
2159
2160if test -n "$ac_unrecognized_opts"; then
2161 case $enable_option_checking in
2162 no) ;;
d0ac1c44 2163 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
c971b7fa
PA
2164 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2165 esac
2166fi
2167
2168# Check all directory arguments for consistency.
2169for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2170 datadir sysconfdir sharedstatedir localstatedir includedir \
2171 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2172 libdir localedir mandir
2173do
2174 eval ac_val=\$$ac_var
2175 # Remove trailing slashes.
2176 case $ac_val in
2177 */ )
2178 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2179 eval $ac_var=\$ac_val;;
2180 esac
2181 # Be sure to have absolute directory names.
2182 case $ac_val in
2183 [\\/$]* | ?:[\\/]* ) continue;;
2184 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2185 esac
d0ac1c44 2186 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
c971b7fa
PA
2187done
2188
2189# There might be people who depend on the old broken behavior: `$host'
2190# used to hold the argument of --host etc.
2191# FIXME: To remove some day.
2192build=$build_alias
2193host=$host_alias
2194target=$target_alias
2195
2196# FIXME: To remove some day.
2197if test "x$host_alias" != x; then
2198 if test "x$build_alias" = x; then
2199 cross_compiling=maybe
c971b7fa
PA
2200 elif test "x$build_alias" != "x$host_alias"; then
2201 cross_compiling=yes
2202 fi
2203fi
2204
2205ac_tool_prefix=
2206test -n "$host_alias" && ac_tool_prefix=$host_alias-
2207
2208test "$silent" = yes && exec 6>/dev/null
2209
2210
2211ac_pwd=`pwd` && test -n "$ac_pwd" &&
2212ac_ls_di=`ls -di .` &&
2213ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
d0ac1c44 2214 as_fn_error $? "working directory cannot be determined"
c971b7fa 2215test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
d0ac1c44 2216 as_fn_error $? "pwd does not report name of working directory"
c971b7fa
PA
2217
2218
2219# Find the source files, if location was not specified.
2220if test -z "$srcdir"; then
2221 ac_srcdir_defaulted=yes
2222 # Try the directory containing this script, then the parent directory.
2223 ac_confdir=`$as_dirname -- "$as_myself" ||
2224$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2225 X"$as_myself" : 'X\(//\)[^/]' \| \
2226 X"$as_myself" : 'X\(//\)$' \| \
2227 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2228$as_echo X"$as_myself" |
2229 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2230 s//\1/
2231 q
2232 }
2233 /^X\(\/\/\)[^/].*/{
2234 s//\1/
2235 q
2236 }
2237 /^X\(\/\/\)$/{
2238 s//\1/
2239 q
2240 }
2241 /^X\(\/\).*/{
2242 s//\1/
2243 q
2244 }
2245 s/.*/./; q'`
2246 srcdir=$ac_confdir
2247 if test ! -r "$srcdir/$ac_unique_file"; then
2248 srcdir=..
2249 fi
2250else
2251 ac_srcdir_defaulted=no
2252fi
2253if test ! -r "$srcdir/$ac_unique_file"; then
2254 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
d0ac1c44 2255 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
c971b7fa
PA
2256fi
2257ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2258ac_abs_confdir=`(
d0ac1c44 2259 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
c971b7fa
PA
2260 pwd)`
2261# When building in place, set srcdir=.
2262if test "$ac_abs_confdir" = "$ac_pwd"; then
2263 srcdir=.
2264fi
2265# Remove unnecessary trailing slashes from srcdir.
2266# Double slashes in file names in object file debugging info
2267# mess up M-x gdb in Emacs.
2268case $srcdir in
2269*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2270esac
2271for ac_var in $ac_precious_vars; do
2272 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2273 eval ac_env_${ac_var}_value=\$${ac_var}
2274 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2275 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2276done
2277
2278#
2279# Report the --help message.
2280#
2281if test "$ac_init_help" = "long"; then
2282 # Omit some internal or obsolete options to make the list less imposing.
2283 # This message is too long to be a string in the A/UX 3.1 sh.
2284 cat <<_ACEOF
d0ac1c44 2285\`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
c971b7fa
PA
2286
2287Usage: $0 [OPTION]... [VAR=VALUE]...
2288
2289To assign environment variables (e.g., CC, CFLAGS...), specify them as
2290VAR=VALUE. See below for descriptions of some of the useful variables.
2291
2292Defaults for the options are specified in brackets.
2293
2294Configuration:
2295 -h, --help display this help and exit
2296 --help=short display options specific to this package
2297 --help=recursive display the short help of all the included packages
2298 -V, --version display version information and exit
d0ac1c44 2299 -q, --quiet, --silent do not print \`checking ...' messages
c971b7fa
PA
2300 --cache-file=FILE cache test results in FILE [disabled]
2301 -C, --config-cache alias for \`--cache-file=config.cache'
2302 -n, --no-create do not create output files
2303 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2304
2305Installation directories:
2306 --prefix=PREFIX install architecture-independent files in PREFIX
2307 [$ac_default_prefix]
2308 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2309 [PREFIX]
2310
2311By default, \`make install' will install all the files in
2312\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2313an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2314for instance \`--prefix=\$HOME'.
2315
2316For better control, use the options below.
2317
2318Fine tuning of the installation directories:
2319 --bindir=DIR user executables [EPREFIX/bin]
2320 --sbindir=DIR system admin executables [EPREFIX/sbin]
2321 --libexecdir=DIR program executables [EPREFIX/libexec]
2322 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2323 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2324 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2325 --libdir=DIR object code libraries [EPREFIX/lib]
2326 --includedir=DIR C header files [PREFIX/include]
2327 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2328 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2329 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2330 --infodir=DIR info documentation [DATAROOTDIR/info]
2331 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2332 --mandir=DIR man documentation [DATAROOTDIR/man]
d0ac1c44 2333 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
c971b7fa
PA
2334 --htmldir=DIR html documentation [DOCDIR]
2335 --dvidir=DIR dvi documentation [DOCDIR]
2336 --pdfdir=DIR pdf documentation [DOCDIR]
2337 --psdir=DIR ps documentation [DOCDIR]
2338_ACEOF
2339
2340 cat <<\_ACEOF
2341
2342Program names:
2343 --program-prefix=PREFIX prepend PREFIX to installed program names
2344 --program-suffix=SUFFIX append SUFFIX to installed program names
2345 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2346
2347System types:
2348 --build=BUILD configure for building on BUILD [guessed]
2349 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2350 --target=TARGET configure for building compilers for TARGET [HOST]
2351_ACEOF
2352fi
2353
2354if test -n "$ac_init_help"; then
d0ac1c44
SM
2355 case $ac_init_help in
2356 short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
2357 esac
c971b7fa
PA
2358 cat <<\_ACEOF
2359
2360Optional Features:
2361 --disable-option-checking ignore unrecognized --enable/--with options
2362 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2363 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
d0ac1c44
SM
2364 --enable-maintainer-mode
2365 enable make rules and dependencies not useful (and
2366 sometimes confusing) to the casual installer
2196f55f 2367 --disable-largefile omit support for large files
d0ac1c44
SM
2368 --enable-dependency-tracking
2369 do not reject slow dependency extractors
2370 --disable-dependency-tracking
2371 speeds up one-time build
2372 --enable-silent-rules less verbose build output (undo: "make V=1")
2373 --disable-silent-rules verbose build output (undo: "make V=0")
c971b7fa
PA
2374
2375Some influential environment variables:
2376 CC C compiler command
2377 CFLAGS C compiler flags
2378 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2379 nonstandard directory <lib dir>
2380 LIBS libraries to pass to the linker, e.g. -l<library>
d0ac1c44 2381 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
c971b7fa
PA
2382 you have headers in a nonstandard directory <include dir>
2383 CPP C preprocessor
2384
2385Use these variables to override the choices made by `configure' or to help
2386it to find libraries and programs with nonstandard names/locations.
2387
2388Report bugs to the package provider.
2389_ACEOF
2390ac_status=$?
2391fi
2392
2393if test "$ac_init_help" = "recursive"; then
2394 # If there are subdirs, report their specific --help.
2395 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2396 test -d "$ac_dir" ||
2397 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2398 continue
2399 ac_builddir=.
2400
2401case "$ac_dir" in
2402.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2403*)
2404 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2405 # A ".." for each directory in $ac_dir_suffix.
2406 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2407 case $ac_top_builddir_sub in
2408 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2409 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2410 esac ;;
2411esac
2412ac_abs_top_builddir=$ac_pwd
2413ac_abs_builddir=$ac_pwd$ac_dir_suffix
2414# for backward compatibility:
2415ac_top_builddir=$ac_top_build_prefix
2416
2417case $srcdir in
2418 .) # We are building in place.
2419 ac_srcdir=.
2420 ac_top_srcdir=$ac_top_builddir_sub
2421 ac_abs_top_srcdir=$ac_pwd ;;
2422 [\\/]* | ?:[\\/]* ) # Absolute name.
2423 ac_srcdir=$srcdir$ac_dir_suffix;
2424 ac_top_srcdir=$srcdir
2425 ac_abs_top_srcdir=$srcdir ;;
2426 *) # Relative name.
2427 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2428 ac_top_srcdir=$ac_top_build_prefix$srcdir
2429 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2430esac
2431ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2432
2433 cd "$ac_dir" || { ac_status=$?; continue; }
2434 # Check for guested configure.
2435 if test -f "$ac_srcdir/configure.gnu"; then
2436 echo &&
2437 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2438 elif test -f "$ac_srcdir/configure"; then
2439 echo &&
2440 $SHELL "$ac_srcdir/configure" --help=recursive
2441 else
2442 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2443 fi || ac_status=$?
2444 cd "$ac_pwd" || { ac_status=$?; break; }
2445 done
2446fi
2447
2448test -n "$ac_init_help" && exit $ac_status
2449if $ac_init_version; then
2450 cat <<\_ACEOF
d0ac1c44
SM
2451libgnu configure UNUSED-VERSION
2452generated by GNU Autoconf 2.69
c971b7fa 2453
d0ac1c44 2454Copyright (C) 2012 Free Software Foundation, Inc.
c971b7fa
PA
2455This configure script is free software; the Free Software Foundation
2456gives unlimited permission to copy, distribute and modify it.
2457_ACEOF
2458 exit
2459fi
2460
2461## ------------------------ ##
2462## Autoconf initialization. ##
2463## ------------------------ ##
2464
2465# ac_fn_c_try_compile LINENO
2466# --------------------------
2467# Try to compile conftest.$ac_ext, and return whether this succeeded.
2468ac_fn_c_try_compile ()
2469{
2470 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2471 rm -f conftest.$ac_objext
2472 if { { ac_try="$ac_compile"
2473case "(($ac_try" in
2474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2475 *) ac_try_echo=$ac_try;;
2476esac
2477eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2478$as_echo "$ac_try_echo"; } >&5
2479 (eval "$ac_compile") 2>conftest.err
2480 ac_status=$?
2481 if test -s conftest.err; then
2482 grep -v '^ *+' conftest.err >conftest.er1
2483 cat conftest.er1 >&5
2484 mv -f conftest.er1 conftest.err
2485 fi
2486 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2487 test $ac_status = 0; } && {
2488 test -z "$ac_c_werror_flag" ||
2489 test ! -s conftest.err
2490 } && test -s conftest.$ac_objext; then :
2491 ac_retval=0
2492else
2493 $as_echo "$as_me: failed program was:" >&5
2494sed 's/^/| /' conftest.$ac_ext >&5
2495
2496 ac_retval=1
2497fi
d0ac1c44
SM
2498 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2499 as_fn_set_status $ac_retval
c971b7fa
PA
2500
2501} # ac_fn_c_try_compile
2502
2503# ac_fn_c_try_cpp LINENO
2504# ----------------------
2505# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2506ac_fn_c_try_cpp ()
2507{
2508 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2509 if { { ac_try="$ac_cpp conftest.$ac_ext"
2510case "(($ac_try" in
2511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2512 *) ac_try_echo=$ac_try;;
2513esac
2514eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2515$as_echo "$ac_try_echo"; } >&5
2516 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2517 ac_status=$?
2518 if test -s conftest.err; then
2519 grep -v '^ *+' conftest.err >conftest.er1
2520 cat conftest.er1 >&5
2521 mv -f conftest.er1 conftest.err
2522 fi
2523 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
d0ac1c44 2524 test $ac_status = 0; } > conftest.i && {
c971b7fa
PA
2525 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2526 test ! -s conftest.err
2527 }; then :
2528 ac_retval=0
2529else
2530 $as_echo "$as_me: failed program was:" >&5
2531sed 's/^/| /' conftest.$ac_ext >&5
2532
2533 ac_retval=1
2534fi
d0ac1c44
SM
2535 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2536 as_fn_set_status $ac_retval
c971b7fa
PA
2537
2538} # ac_fn_c_try_cpp
2539
2540# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2541# -------------------------------------------------------
2542# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2543# the include files in INCLUDES and setting the cache variable VAR
2544# accordingly.
2545ac_fn_c_check_header_mongrel ()
2546{
2547 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44 2548 if eval \${$3+:} false; then :
c971b7fa
PA
2549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2550$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2551if eval \${$3+:} false; then :
c971b7fa
PA
2552 $as_echo_n "(cached) " >&6
2553fi
2554eval ac_res=\$$3
2555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2556$as_echo "$ac_res" >&6; }
2557else
2558 # Is the header compilable?
2559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2560$as_echo_n "checking $2 usability... " >&6; }
2561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2562/* end confdefs.h. */
2563$4
2564#include <$2>
2565_ACEOF
2566if ac_fn_c_try_compile "$LINENO"; then :
2567 ac_header_compiler=yes
2568else
2569 ac_header_compiler=no
2570fi
2571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2573$as_echo "$ac_header_compiler" >&6; }
2574
2575# Is the header present?
2576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2577$as_echo_n "checking $2 presence... " >&6; }
2578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2579/* end confdefs.h. */
2580#include <$2>
2581_ACEOF
2582if ac_fn_c_try_cpp "$LINENO"; then :
2583 ac_header_preproc=yes
2584else
2585 ac_header_preproc=no
2586fi
d0ac1c44 2587rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
2588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2589$as_echo "$ac_header_preproc" >&6; }
2590
2591# So? What about this header?
2592case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2593 yes:no: )
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2595$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2597$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2598 ;;
2599 no:yes:* )
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2601$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2602 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2603$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2605$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2607$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2609$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2610 ;;
2611esac
2612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2613$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2614if eval \${$3+:} false; then :
c971b7fa
PA
2615 $as_echo_n "(cached) " >&6
2616else
2617 eval "$3=\$ac_header_compiler"
2618fi
2619eval ac_res=\$$3
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2621$as_echo "$ac_res" >&6; }
2622fi
d0ac1c44 2623 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c971b7fa
PA
2624
2625} # ac_fn_c_check_header_mongrel
2626
2627# ac_fn_c_try_run LINENO
2628# ----------------------
2629# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2630# that executables *can* be run.
2631ac_fn_c_try_run ()
2632{
2633 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2634 if { { ac_try="$ac_link"
2635case "(($ac_try" in
2636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2637 *) ac_try_echo=$ac_try;;
2638esac
2639eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2640$as_echo "$ac_try_echo"; } >&5
2641 (eval "$ac_link") 2>&5
2642 ac_status=$?
2643 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2644 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2645 { { case "(($ac_try" in
2646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2647 *) ac_try_echo=$ac_try;;
2648esac
2649eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2650$as_echo "$ac_try_echo"; } >&5
2651 (eval "$ac_try") 2>&5
2652 ac_status=$?
2653 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2654 test $ac_status = 0; }; }; then :
2655 ac_retval=0
2656else
2657 $as_echo "$as_me: program exited with status $ac_status" >&5
2658 $as_echo "$as_me: failed program was:" >&5
2659sed 's/^/| /' conftest.$ac_ext >&5
2660
2661 ac_retval=$ac_status
2662fi
2663 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2664 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2665 as_fn_set_status $ac_retval
c971b7fa
PA
2666
2667} # ac_fn_c_try_run
2668
2669# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2670# -------------------------------------------------------
2671# Tests whether HEADER exists and can be compiled using the include files in
2672# INCLUDES, setting the cache variable VAR accordingly.
2673ac_fn_c_check_header_compile ()
2674{
2675 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2677$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2678if eval \${$3+:} false; then :
c971b7fa
PA
2679 $as_echo_n "(cached) " >&6
2680else
2681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2682/* end confdefs.h. */
2683$4
2684#include <$2>
2685_ACEOF
2686if ac_fn_c_try_compile "$LINENO"; then :
2687 eval "$3=yes"
2688else
2689 eval "$3=no"
2690fi
2691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2692fi
2693eval ac_res=\$$3
2694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2695$as_echo "$ac_res" >&6; }
d0ac1c44 2696 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
c971b7fa
PA
2697
2698} # ac_fn_c_check_header_compile
2699
d0ac1c44
SM
2700# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2701# -------------------------------------------
2702# Tests whether TYPE exists after having included INCLUDES, setting cache
2703# variable VAR accordingly.
2704ac_fn_c_check_type ()
2705{
2706 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2708$as_echo_n "checking for $2... " >&6; }
2709if eval \${$3+:} false; then :
2710 $as_echo_n "(cached) " >&6
2711else
2712 eval "$3=no"
2713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2714/* end confdefs.h. */
2715$4
2716int
2717main ()
2718{
2719if (sizeof ($2))
2720 return 0;
2721 ;
2722 return 0;
2723}
2724_ACEOF
2725if ac_fn_c_try_compile "$LINENO"; then :
2726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2727/* end confdefs.h. */
2728$4
2729int
2730main ()
2731{
2732if (sizeof (($2)))
2733 return 0;
2734 ;
2735 return 0;
2736}
2737_ACEOF
2738if ac_fn_c_try_compile "$LINENO"; then :
2739
2740else
2741 eval "$3=yes"
2742fi
2743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2744fi
2745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2746fi
2747eval ac_res=\$$3
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2749$as_echo "$ac_res" >&6; }
2750 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2751
2752} # ac_fn_c_check_type
2753
c971b7fa
PA
2754# ac_fn_c_try_link LINENO
2755# -----------------------
2756# Try to link conftest.$ac_ext, and return whether this succeeded.
2757ac_fn_c_try_link ()
2758{
2759 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2760 rm -f conftest.$ac_objext conftest$ac_exeext
2761 if { { ac_try="$ac_link"
2762case "(($ac_try" in
2763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2764 *) ac_try_echo=$ac_try;;
2765esac
2766eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2767$as_echo "$ac_try_echo"; } >&5
2768 (eval "$ac_link") 2>conftest.err
2769 ac_status=$?
2770 if test -s conftest.err; then
2771 grep -v '^ *+' conftest.err >conftest.er1
2772 cat conftest.er1 >&5
2773 mv -f conftest.er1 conftest.err
2774 fi
2775 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2776 test $ac_status = 0; } && {
2777 test -z "$ac_c_werror_flag" ||
2778 test ! -s conftest.err
2779 } && test -s conftest$ac_exeext && {
2780 test "$cross_compiling" = yes ||
d0ac1c44 2781 test -x conftest$ac_exeext
c971b7fa
PA
2782 }; then :
2783 ac_retval=0
2784else
2785 $as_echo "$as_me: failed program was:" >&5
2786sed 's/^/| /' conftest.$ac_ext >&5
2787
2788 ac_retval=1
2789fi
2790 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2791 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2792 # interfere with the next link command; also delete a directory that is
2793 # left behind by Apple's compiler. We do this before executing the actions.
2794 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
d0ac1c44
SM
2795 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2796 as_fn_set_status $ac_retval
c971b7fa
PA
2797
2798} # ac_fn_c_try_link
2799
8690e634
JK
2800# ac_fn_c_check_func LINENO FUNC VAR
2801# ----------------------------------
2802# Tests whether FUNC exists, setting the cache variable VAR accordingly
2803ac_fn_c_check_func ()
2804{
2805 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2807$as_echo_n "checking for $2... " >&6; }
d0ac1c44 2808if eval \${$3+:} false; then :
8690e634
JK
2809 $as_echo_n "(cached) " >&6
2810else
2811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2812/* end confdefs.h. */
2813/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2814 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2815#define $2 innocuous_$2
2816
2817/* System header to define __stub macros and hopefully few prototypes,
2818 which can conflict with char $2 (); below.
2819 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2820 <limits.h> exists even on freestanding compilers. */
2821
2822#ifdef __STDC__
2823# include <limits.h>
2824#else
2825# include <assert.h>
2826#endif
2827
2828#undef $2
2829
2830/* Override any GCC internal prototype to avoid an error.
2831 Use char because int might match the return type of a GCC
2832 builtin and then its argument prototype would still apply. */
2833#ifdef __cplusplus
2834extern "C"
2835#endif
2836char $2 ();
2837/* The GNU C library defines this for functions which it implements
2838 to always fail with ENOSYS. Some functions are actually named
2839 something starting with __ and the normal name is an alias. */
2840#if defined __stub_$2 || defined __stub___$2
2841choke me
2842#endif
2843
2844int
2845main ()
2846{
2847return $2 ();
2848 ;
2849 return 0;
2850}
2851_ACEOF
2852if ac_fn_c_try_link "$LINENO"; then :
2853 eval "$3=yes"
2854else
2855 eval "$3=no"
2856fi
2857rm -f core conftest.err conftest.$ac_objext \
2858 conftest$ac_exeext conftest.$ac_ext
2859fi
2860eval ac_res=\$$3
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2862$as_echo "$ac_res" >&6; }
d0ac1c44 2863 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
8690e634
JK
2864
2865} # ac_fn_c_check_func
2866
d0ac1c44
SM
2867# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2868# ---------------------------------------------
2869# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2870# accordingly.
8986e351
TT
2871ac_fn_c_check_decl ()
2872{
2873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
d0ac1c44
SM
2874 as_decl_name=`echo $2|sed 's/ *(.*//'`
2875 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2877$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2878if eval \${$3+:} false; then :
8986e351
TT
2879 $as_echo_n "(cached) " >&6
2880else
2881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2882/* end confdefs.h. */
2883$4
2884int
2885main ()
2886{
d0ac1c44
SM
2887#ifndef $as_decl_name
2888#ifdef __cplusplus
2889 (void) $as_decl_use;
2890#else
2891 (void) $as_decl_name;
2892#endif
8986e351
TT
2893#endif
2894
2895 ;
2896 return 0;
2897}
2898_ACEOF
2899if ac_fn_c_try_compile "$LINENO"; then :
2900 eval "$3=yes"
2901else
2902 eval "$3=no"
2903fi
2904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2905fi
2906eval ac_res=\$$3
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2908$as_echo "$ac_res" >&6; }
d0ac1c44 2909 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
8986e351
TT
2910
2911} # ac_fn_c_check_decl
2912
c971b7fa
PA
2913# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2914# --------------------------------------------
2915# Tries to find the compile-time value of EXPR in a program that includes
2916# INCLUDES, setting VAR accordingly. Returns whether the value could be
2917# computed
2918ac_fn_c_compute_int ()
2919{
2920 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2921 if test "$cross_compiling" = yes; then
2922 # Depending upon the size, compute the lo and hi bounds.
2923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2924/* end confdefs.h. */
2925$4
2926int
2927main ()
2928{
2929static int test_array [1 - 2 * !(($2) >= 0)];
d0ac1c44
SM
2930test_array [0] = 0;
2931return test_array [0];
c971b7fa
PA
2932
2933 ;
2934 return 0;
2935}
2936_ACEOF
2937if ac_fn_c_try_compile "$LINENO"; then :
2938 ac_lo=0 ac_mid=0
2939 while :; do
2940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2941/* end confdefs.h. */
2942$4
2943int
2944main ()
2945{
2946static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
2947test_array [0] = 0;
2948return test_array [0];
c971b7fa
PA
2949
2950 ;
2951 return 0;
2952}
2953_ACEOF
2954if ac_fn_c_try_compile "$LINENO"; then :
2955 ac_hi=$ac_mid; break
2956else
2957 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2958 if test $ac_lo -le $ac_mid; then
2959 ac_lo= ac_hi=
2960 break
2961 fi
2962 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2963fi
2964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2965 done
2966else
2967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2968/* end confdefs.h. */
2969$4
2970int
2971main ()
2972{
2973static int test_array [1 - 2 * !(($2) < 0)];
d0ac1c44
SM
2974test_array [0] = 0;
2975return test_array [0];
c971b7fa
PA
2976
2977 ;
2978 return 0;
2979}
2980_ACEOF
2981if ac_fn_c_try_compile "$LINENO"; then :
2982 ac_hi=-1 ac_mid=-1
2983 while :; do
2984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2985/* end confdefs.h. */
2986$4
2987int
2988main ()
2989{
2990static int test_array [1 - 2 * !(($2) >= $ac_mid)];
d0ac1c44
SM
2991test_array [0] = 0;
2992return test_array [0];
c971b7fa
PA
2993
2994 ;
2995 return 0;
2996}
2997_ACEOF
2998if ac_fn_c_try_compile "$LINENO"; then :
2999 ac_lo=$ac_mid; break
3000else
3001 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3002 if test $ac_mid -le $ac_hi; then
3003 ac_lo= ac_hi=
3004 break
3005 fi
3006 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3007fi
3008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3009 done
3010else
3011 ac_lo= ac_hi=
3012fi
3013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3014fi
3015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3016# Binary search between lo and hi bounds.
3017while test "x$ac_lo" != "x$ac_hi"; do
3018 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3020/* end confdefs.h. */
3021$4
3022int
3023main ()
3024{
3025static int test_array [1 - 2 * !(($2) <= $ac_mid)];
d0ac1c44
SM
3026test_array [0] = 0;
3027return test_array [0];
c971b7fa
PA
3028
3029 ;
3030 return 0;
3031}
3032_ACEOF
3033if ac_fn_c_try_compile "$LINENO"; then :
3034 ac_hi=$ac_mid
3035else
3036 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3037fi
3038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3039done
3040case $ac_lo in #((
3041?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3042'') ac_retval=1 ;;
3043esac
3044 else
3045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3046/* end confdefs.h. */
3047$4
3048static long int longval () { return $2; }
3049static unsigned long int ulongval () { return $2; }
3050#include <stdio.h>
3051#include <stdlib.h>
3052int
3053main ()
3054{
3055
3056 FILE *f = fopen ("conftest.val", "w");
3057 if (! f)
3058 return 1;
3059 if (($2) < 0)
3060 {
3061 long int i = longval ();
3062 if (i != ($2))
3063 return 1;
3064 fprintf (f, "%ld", i);
3065 }
3066 else
3067 {
3068 unsigned long int i = ulongval ();
3069 if (i != ($2))
3070 return 1;
3071 fprintf (f, "%lu", i);
3072 }
3073 /* Do not output a trailing newline, as this causes \r\n confusion
3074 on some platforms. */
3075 return ferror (f) || fclose (f) != 0;
3076
3077 ;
3078 return 0;
3079}
3080_ACEOF
3081if ac_fn_c_try_run "$LINENO"; then :
3082 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3083else
3084 ac_retval=1
3085fi
3086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3087 conftest.$ac_objext conftest.beam conftest.$ac_ext
3088rm -f conftest.val
3089
3090 fi
d0ac1c44
SM
3091 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3092 as_fn_set_status $ac_retval
c971b7fa
PA
3093
3094} # ac_fn_c_compute_int
c971b7fa
PA
3095cat >config.log <<_ACEOF
3096This file contains any messages produced by compilers while
3097running configure, to aid debugging if configure makes a mistake.
3098
d0ac1c44
SM
3099It was created by libgnu $as_me UNUSED-VERSION, which was
3100generated by GNU Autoconf 2.69. Invocation command line was
c971b7fa
PA
3101
3102 $ $0 $@
3103
3104_ACEOF
3105exec 5>>config.log
3106{
3107cat <<_ASUNAME
3108## --------- ##
3109## Platform. ##
3110## --------- ##
3111
3112hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3113uname -m = `(uname -m) 2>/dev/null || echo unknown`
3114uname -r = `(uname -r) 2>/dev/null || echo unknown`
3115uname -s = `(uname -s) 2>/dev/null || echo unknown`
3116uname -v = `(uname -v) 2>/dev/null || echo unknown`
3117
3118/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3119/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3120
3121/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3122/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3123/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3124/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3125/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3126/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3127/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3128
3129_ASUNAME
3130
3131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3132for as_dir in $PATH
3133do
3134 IFS=$as_save_IFS
3135 test -z "$as_dir" && as_dir=.
3136 $as_echo "PATH: $as_dir"
3137 done
3138IFS=$as_save_IFS
3139
3140} >&5
3141
3142cat >&5 <<_ACEOF
3143
3144
3145## ----------- ##
3146## Core tests. ##
3147## ----------- ##
3148
3149_ACEOF
3150
3151
3152# Keep a trace of the command line.
3153# Strip out --no-create and --no-recursion so they do not pile up.
3154# Strip out --silent because we don't want to record it for future runs.
3155# Also quote any args containing shell meta-characters.
3156# Make two passes to allow for proper duplicate-argument suppression.
3157ac_configure_args=
3158ac_configure_args0=
3159ac_configure_args1=
3160ac_must_keep_next=false
3161for ac_pass in 1 2
3162do
3163 for ac_arg
3164 do
3165 case $ac_arg in
3166 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3167 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3168 | -silent | --silent | --silen | --sile | --sil)
3169 continue ;;
3170 *\'*)
3171 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3172 esac
3173 case $ac_pass in
3174 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3175 2)
3176 as_fn_append ac_configure_args1 " '$ac_arg'"
3177 if test $ac_must_keep_next = true; then
3178 ac_must_keep_next=false # Got value, back to normal.
3179 else
3180 case $ac_arg in
3181 *=* | --config-cache | -C | -disable-* | --disable-* \
3182 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3183 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3184 | -with-* | --with-* | -without-* | --without-* | --x)
3185 case "$ac_configure_args0 " in
3186 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3187 esac
3188 ;;
3189 -* ) ac_must_keep_next=true ;;
3190 esac
3191 fi
3192 as_fn_append ac_configure_args " '$ac_arg'"
3193 ;;
3194 esac
3195 done
3196done
3197{ ac_configure_args0=; unset ac_configure_args0;}
3198{ ac_configure_args1=; unset ac_configure_args1;}
3199
3200# When interrupted or exit'd, cleanup temporary files, and complete
3201# config.log. We remove comments because anyway the quotes in there
3202# would cause problems or look ugly.
3203# WARNING: Use '\'' to represent an apostrophe within the trap.
3204# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3205trap 'exit_status=$?
3206 # Save into config.log some information that might help in debugging.
3207 {
3208 echo
3209
d0ac1c44 3210 $as_echo "## ---------------- ##
c971b7fa 3211## Cache variables. ##
d0ac1c44 3212## ---------------- ##"
c971b7fa
PA
3213 echo
3214 # The following way of writing the cache mishandles newlines in values,
3215(
3216 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3217 eval ac_val=\$$ac_var
3218 case $ac_val in #(
3219 *${as_nl}*)
3220 case $ac_var in #(
3221 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3222$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3223 esac
3224 case $ac_var in #(
3225 _ | IFS | as_nl) ;; #(
3226 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3227 *) { eval $ac_var=; unset $ac_var;} ;;
3228 esac ;;
3229 esac
3230 done
3231 (set) 2>&1 |
3232 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3233 *${as_nl}ac_space=\ *)
3234 sed -n \
3235 "s/'\''/'\''\\\\'\'''\''/g;
3236 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3237 ;; #(
3238 *)
3239 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3240 ;;
3241 esac |
3242 sort
3243)
3244 echo
3245
d0ac1c44 3246 $as_echo "## ----------------- ##
c971b7fa 3247## Output variables. ##
d0ac1c44 3248## ----------------- ##"
c971b7fa
PA
3249 echo
3250 for ac_var in $ac_subst_vars
3251 do
3252 eval ac_val=\$$ac_var
3253 case $ac_val in
3254 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3255 esac
3256 $as_echo "$ac_var='\''$ac_val'\''"
3257 done | sort
3258 echo
3259
3260 if test -n "$ac_subst_files"; then
d0ac1c44 3261 $as_echo "## ------------------- ##
c971b7fa 3262## File substitutions. ##
d0ac1c44 3263## ------------------- ##"
c971b7fa
PA
3264 echo
3265 for ac_var in $ac_subst_files
3266 do
3267 eval ac_val=\$$ac_var
3268 case $ac_val in
3269 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3270 esac
3271 $as_echo "$ac_var='\''$ac_val'\''"
3272 done | sort
3273 echo
3274 fi
3275
3276 if test -s confdefs.h; then
d0ac1c44 3277 $as_echo "## ----------- ##
c971b7fa 3278## confdefs.h. ##
d0ac1c44 3279## ----------- ##"
c971b7fa
PA
3280 echo
3281 cat confdefs.h
3282 echo
3283 fi
3284 test "$ac_signal" != 0 &&
3285 $as_echo "$as_me: caught signal $ac_signal"
3286 $as_echo "$as_me: exit $exit_status"
3287 } >&5
3288 rm -f core *.core core.conftest.* &&
3289 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3290 exit $exit_status
3291' 0
3292for ac_signal in 1 2 13 15; do
3293 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3294done
3295ac_signal=0
3296
3297# confdefs.h avoids OS command line length limits that DEFS can exceed.
3298rm -f -r conftest* confdefs.h
3299
3300$as_echo "/* confdefs.h */" > confdefs.h
3301
3302# Predefined preprocessor variables.
3303
3304cat >>confdefs.h <<_ACEOF
3305#define PACKAGE_NAME "$PACKAGE_NAME"
3306_ACEOF
3307
3308cat >>confdefs.h <<_ACEOF
3309#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3310_ACEOF
3311
3312cat >>confdefs.h <<_ACEOF
3313#define PACKAGE_VERSION "$PACKAGE_VERSION"
3314_ACEOF
3315
3316cat >>confdefs.h <<_ACEOF
3317#define PACKAGE_STRING "$PACKAGE_STRING"
3318_ACEOF
3319
3320cat >>confdefs.h <<_ACEOF
3321#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3322_ACEOF
3323
3324cat >>confdefs.h <<_ACEOF
3325#define PACKAGE_URL "$PACKAGE_URL"
3326_ACEOF
3327
3328
3329# Let the site file select an alternate cache file if it wants to.
3330# Prefer an explicitly selected file to automatically selected ones.
3331ac_site_file1=NONE
3332ac_site_file2=NONE
3333if test -n "$CONFIG_SITE"; then
d0ac1c44
SM
3334 # We do not want a PATH search for config.site.
3335 case $CONFIG_SITE in #((
3336 -*) ac_site_file1=./$CONFIG_SITE;;
3337 */*) ac_site_file1=$CONFIG_SITE;;
3338 *) ac_site_file1=./$CONFIG_SITE;;
3339 esac
c971b7fa
PA
3340elif test "x$prefix" != xNONE; then
3341 ac_site_file1=$prefix/share/config.site
3342 ac_site_file2=$prefix/etc/config.site
3343else
3344 ac_site_file1=$ac_default_prefix/share/config.site
3345 ac_site_file2=$ac_default_prefix/etc/config.site
3346fi
3347for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3348do
3349 test "x$ac_site_file" = xNONE && continue
d0ac1c44 3350 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
c971b7fa
PA
3351 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3352$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3353 sed 's/^/| /' "$ac_site_file" >&5
d0ac1c44
SM
3354 . "$ac_site_file" \
3355 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3356$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3357as_fn_error $? "failed to load site script $ac_site_file
3358See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
3359 fi
3360done
3361
3362if test -r "$cache_file"; then
d0ac1c44
SM
3363 # Some versions of bash will fail to source /dev/null (special files
3364 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3365 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
c971b7fa
PA
3366 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3367$as_echo "$as_me: loading cache $cache_file" >&6;}
3368 case $cache_file in
3369 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3370 *) . "./$cache_file";;
3371 esac
3372 fi
3373else
3374 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3375$as_echo "$as_me: creating cache $cache_file" >&6;}
3376 >$cache_file
3377fi
3378
472fa5ee
SM
3379gl_func_list="$gl_func_list canonicalize_file_name"
3380gl_func_list="$gl_func_list getcwd"
3381gl_func_list="$gl_func_list readlink"
3382gl_func_list="$gl_func_list realpath"
3383gl_header_list="$gl_header_list sys/param.h"
3384gl_header_list="$gl_header_list unistd.h"
3385gl_func_list="$gl_func_list _set_invalid_parameter_handler"
3386gl_header_list="$gl_header_list sys/socket.h"
3387gl_func_list="$gl_func_list fchdir"
3388gl_header_list="$gl_header_list dirent.h"
3389gl_func_list="$gl_func_list fcntl"
3390gl_func_list="$gl_func_list symlink"
3391gl_func_list="$gl_func_list fdopendir"
3392gl_func_list="$gl_func_list mempcpy"
3393gl_func_list="$gl_func_list btowc"
3394gl_func_list="$gl_func_list isblank"
3395gl_func_list="$gl_func_list iswctype"
3396gl_func_list="$gl_func_list mbsrtowcs"
3397gl_func_list="$gl_func_list wmemchr"
3398gl_func_list="$gl_func_list wmemcpy"
3399gl_func_list="$gl_func_list wmempcpy"
3400gl_header_list="$gl_header_list wctype.h"
8690e634 3401gl_fnmatch_required=GNU
472fa5ee
SM
3402gl_header_list="$gl_header_list sys/stat.h"
3403gl_func_list="$gl_func_list fstatat"
3404gl_func_list="$gl_func_list getdtablesize"
3405gl_func_list="$gl_func_list getlogin_r"
3406gl_func_list="$gl_func_list getprogname"
3407gl_func_list="$gl_func_list getexecname"
3408gl_header_list="$gl_header_list sys/time.h"
3409gl_func_list="$gl_func_list gettimeofday"
3410gl_header_list="$gl_header_list sys/cdefs.h"
3411gl_func_list="$gl_func_list getpwnam_r"
3412gl_header_list="$gl_header_list limits.h"
3413gl_header_list="$gl_header_list wchar.h"
3414gl_header_list="$gl_header_list stdint.h"
3415gl_header_list="$gl_header_list inttypes.h"
3416gl_func_list="$gl_func_list lstat"
3417gl_header_list="$gl_header_list math.h"
3418gl_func_list="$gl_func_list mbsinit"
3419gl_func_list="$gl_func_list mbrtowc"
3420gl_header_list="$gl_header_list sys/mman.h"
3421gl_func_list="$gl_func_list mprotect"
3422gl_func_list="$gl_func_list mkstemp"
3423gl_func_list="$gl_func_list openat"
3424gl_func_list="$gl_func_list link"
3425gl_func_list="$gl_func_list secure_getenv"
3426gl_func_list="$gl_func_list getuid"
3427gl_func_list="$gl_func_list geteuid"
3428gl_func_list="$gl_func_list getgid"
3429gl_func_list="$gl_func_list getegid"
3430gl_func_list="$gl_func_list setenv"
3431gl_func_list="$gl_func_list strdup"
3432gl_func_list="$gl_func_list pipe"
3433gl_header_list="$gl_header_list features.h"
3434gl_func_list="$gl_func_list iswcntrl"
c971b7fa
PA
3435# Check that the precious variables saved in the cache have kept the same
3436# value.
3437ac_cache_corrupted=false
3438for ac_var in $ac_precious_vars; do
3439 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3440 eval ac_new_set=\$ac_env_${ac_var}_set
3441 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3442 eval ac_new_val=\$ac_env_${ac_var}_value
3443 case $ac_old_set,$ac_new_set in
3444 set,)
3445 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3446$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3447 ac_cache_corrupted=: ;;
3448 ,set)
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3450$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3451 ac_cache_corrupted=: ;;
3452 ,);;
3453 *)
3454 if test "x$ac_old_val" != "x$ac_new_val"; then
3455 # differences in whitespace do not lead to failure.
3456 ac_old_val_w=`echo x $ac_old_val`
3457 ac_new_val_w=`echo x $ac_new_val`
3458 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3459 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3460$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3461 ac_cache_corrupted=:
3462 else
3463 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3464$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3465 eval $ac_var=\$ac_old_val
3466 fi
3467 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3468$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3469 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3470$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3471 fi;;
3472 esac
3473 # Pass precious variables to config.status.
3474 if test "$ac_new_set" = set; then
3475 case $ac_new_val in
3476 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3477 *) ac_arg=$ac_var=$ac_new_val ;;
3478 esac
3479 case " $ac_configure_args " in
3480 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3481 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3482 esac
3483 fi
3484done
3485if $ac_cache_corrupted; then
3486 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3487$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3488 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3489$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
d0ac1c44 3490 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
c971b7fa
PA
3491fi
3492## -------------------- ##
3493## Main body of script. ##
3494## -------------------- ##
3495
3496ac_ext=c
3497ac_cpp='$CPP $CPPFLAGS'
3498ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3499ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3500ac_compiler_gnu=$ac_cv_c_compiler_gnu
3501
3502
d0ac1c44 3503
c971b7fa
PA
3504ac_config_headers="$ac_config_headers config.h:config.in"
3505
3506
3507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3508$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3509 # Check whether --enable-maintainer-mode was given.
3510if test "${enable_maintainer_mode+set}" = set; then :
3511 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3512else
3513 USE_MAINTAINER_MODE=no
3514fi
3515
3516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3517$as_echo "$USE_MAINTAINER_MODE" >&6; }
3518 if test $USE_MAINTAINER_MODE = yes; then
3519 MAINTAINER_MODE_TRUE=
3520 MAINTAINER_MODE_FALSE='#'
3521else
3522 MAINTAINER_MODE_TRUE='#'
3523 MAINTAINER_MODE_FALSE=
3524fi
3525
3526 MAINT=$MAINTAINER_MODE_TRUE
3527
3528
3529
3530ac_ext=c
3531ac_cpp='$CPP $CPPFLAGS'
3532ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3533ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3534ac_compiler_gnu=$ac_cv_c_compiler_gnu
3535if test -n "$ac_tool_prefix"; then
3536 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3537set dummy ${ac_tool_prefix}gcc; ac_word=$2
3538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3539$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3540if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3541 $as_echo_n "(cached) " >&6
3542else
3543 if test -n "$CC"; then
3544 ac_cv_prog_CC="$CC" # Let the user override the test.
3545else
3546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3547for as_dir in $PATH
3548do
3549 IFS=$as_save_IFS
3550 test -z "$as_dir" && as_dir=.
3551 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3552 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3553 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3555 break 2
3556 fi
3557done
3558 done
3559IFS=$as_save_IFS
3560
3561fi
3562fi
3563CC=$ac_cv_prog_CC
3564if test -n "$CC"; then
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3566$as_echo "$CC" >&6; }
3567else
3568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3569$as_echo "no" >&6; }
3570fi
3571
3572
3573fi
3574if test -z "$ac_cv_prog_CC"; then
3575 ac_ct_CC=$CC
3576 # Extract the first word of "gcc", so it can be a program name with args.
3577set dummy gcc; ac_word=$2
3578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3579$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3580if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
3581 $as_echo_n "(cached) " >&6
3582else
3583 if test -n "$ac_ct_CC"; then
3584 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3585else
3586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3587for as_dir in $PATH
3588do
3589 IFS=$as_save_IFS
3590 test -z "$as_dir" && as_dir=.
3591 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3593 ac_cv_prog_ac_ct_CC="gcc"
3594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3595 break 2
3596 fi
3597done
3598 done
3599IFS=$as_save_IFS
3600
3601fi
3602fi
3603ac_ct_CC=$ac_cv_prog_ac_ct_CC
3604if test -n "$ac_ct_CC"; then
3605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3606$as_echo "$ac_ct_CC" >&6; }
3607else
3608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3609$as_echo "no" >&6; }
3610fi
3611
3612 if test "x$ac_ct_CC" = x; then
3613 CC=""
3614 else
3615 case $cross_compiling:$ac_tool_warned in
3616yes:)
3617{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3619ac_tool_warned=yes ;;
3620esac
3621 CC=$ac_ct_CC
3622 fi
3623else
3624 CC="$ac_cv_prog_CC"
3625fi
3626
3627if test -z "$CC"; then
3628 if test -n "$ac_tool_prefix"; then
3629 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3630set dummy ${ac_tool_prefix}cc; ac_word=$2
3631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3632$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3633if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3634 $as_echo_n "(cached) " >&6
3635else
3636 if test -n "$CC"; then
3637 ac_cv_prog_CC="$CC" # Let the user override the test.
3638else
3639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3640for as_dir in $PATH
3641do
3642 IFS=$as_save_IFS
3643 test -z "$as_dir" && as_dir=.
3644 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3646 ac_cv_prog_CC="${ac_tool_prefix}cc"
3647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3648 break 2
3649 fi
3650done
3651 done
3652IFS=$as_save_IFS
3653
3654fi
3655fi
3656CC=$ac_cv_prog_CC
3657if test -n "$CC"; then
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3659$as_echo "$CC" >&6; }
3660else
3661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3662$as_echo "no" >&6; }
3663fi
3664
3665
3666 fi
3667fi
3668if test -z "$CC"; then
3669 # Extract the first word of "cc", so it can be a program name with args.
3670set dummy cc; ac_word=$2
3671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3672$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3673if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3674 $as_echo_n "(cached) " >&6
3675else
3676 if test -n "$CC"; then
3677 ac_cv_prog_CC="$CC" # Let the user override the test.
3678else
3679 ac_prog_rejected=no
3680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3681for as_dir in $PATH
3682do
3683 IFS=$as_save_IFS
3684 test -z "$as_dir" && as_dir=.
3685 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3687 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3688 ac_prog_rejected=yes
3689 continue
3690 fi
3691 ac_cv_prog_CC="cc"
3692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3693 break 2
3694 fi
3695done
3696 done
3697IFS=$as_save_IFS
3698
3699if test $ac_prog_rejected = yes; then
3700 # We found a bogon in the path, so make sure we never use it.
3701 set dummy $ac_cv_prog_CC
3702 shift
3703 if test $# != 0; then
3704 # We chose a different compiler from the bogus one.
3705 # However, it has the same basename, so the bogon will be chosen
3706 # first if we set CC to just the basename; use the full file name.
3707 shift
3708 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3709 fi
3710fi
3711fi
3712fi
3713CC=$ac_cv_prog_CC
3714if test -n "$CC"; then
3715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3716$as_echo "$CC" >&6; }
3717else
3718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3719$as_echo "no" >&6; }
3720fi
3721
3722
3723fi
3724if test -z "$CC"; then
3725 if test -n "$ac_tool_prefix"; then
3726 for ac_prog in cl.exe
3727 do
3728 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3729set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3731$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3732if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
3733 $as_echo_n "(cached) " >&6
3734else
3735 if test -n "$CC"; then
3736 ac_cv_prog_CC="$CC" # Let the user override the test.
3737else
3738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3739for as_dir in $PATH
3740do
3741 IFS=$as_save_IFS
3742 test -z "$as_dir" && as_dir=.
3743 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3745 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3747 break 2
3748 fi
3749done
3750 done
3751IFS=$as_save_IFS
3752
3753fi
3754fi
3755CC=$ac_cv_prog_CC
3756if test -n "$CC"; then
3757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3758$as_echo "$CC" >&6; }
3759else
3760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3761$as_echo "no" >&6; }
3762fi
3763
3764
3765 test -n "$CC" && break
3766 done
3767fi
3768if test -z "$CC"; then
3769 ac_ct_CC=$CC
3770 for ac_prog in cl.exe
3771do
3772 # Extract the first word of "$ac_prog", so it can be a program name with args.
3773set dummy $ac_prog; ac_word=$2
3774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3775$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 3776if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
3777 $as_echo_n "(cached) " >&6
3778else
3779 if test -n "$ac_ct_CC"; then
3780 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3781else
3782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3783for as_dir in $PATH
3784do
3785 IFS=$as_save_IFS
3786 test -z "$as_dir" && as_dir=.
3787 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 3788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
3789 ac_cv_prog_ac_ct_CC="$ac_prog"
3790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3791 break 2
3792 fi
3793done
3794 done
3795IFS=$as_save_IFS
3796
3797fi
3798fi
3799ac_ct_CC=$ac_cv_prog_ac_ct_CC
3800if test -n "$ac_ct_CC"; then
3801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3802$as_echo "$ac_ct_CC" >&6; }
3803else
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3805$as_echo "no" >&6; }
3806fi
3807
3808
3809 test -n "$ac_ct_CC" && break
3810done
3811
3812 if test "x$ac_ct_CC" = x; then
3813 CC=""
3814 else
3815 case $cross_compiling:$ac_tool_warned in
3816yes:)
3817{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3818$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3819ac_tool_warned=yes ;;
3820esac
3821 CC=$ac_ct_CC
3822 fi
3823fi
3824
3825fi
3826
3827
3828test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3830as_fn_error $? "no acceptable C compiler found in \$PATH
3831See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
3832
3833# Provide some information about the compiler.
3834$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3835set X $ac_compile
3836ac_compiler=$2
3837for ac_option in --version -v -V -qversion; do
3838 { { ac_try="$ac_compiler $ac_option >&5"
3839case "(($ac_try" in
3840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3841 *) ac_try_echo=$ac_try;;
3842esac
3843eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3844$as_echo "$ac_try_echo"; } >&5
3845 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3846 ac_status=$?
3847 if test -s conftest.err; then
3848 sed '10a\
3849... rest of stderr output deleted ...
3850 10q' conftest.err >conftest.er1
3851 cat conftest.er1 >&5
c971b7fa 3852 fi
d0ac1c44 3853 rm -f conftest.er1 conftest.err
c971b7fa
PA
3854 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3855 test $ac_status = 0; }
3856done
3857
3858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3859/* end confdefs.h. */
d0ac1c44 3860
c971b7fa
PA
3861int
3862main ()
3863{
c971b7fa
PA
3864
3865 ;
3866 return 0;
3867}
3868_ACEOF
3869ac_clean_files_save=$ac_clean_files
d0ac1c44 3870ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
c971b7fa
PA
3871# Try to create an executable without -o first, disregard a.out.
3872# It will help us diagnose broken compilers, and finding out an intuition
3873# of exeext.
d0ac1c44
SM
3874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3875$as_echo_n "checking whether the C compiler works... " >&6; }
c971b7fa
PA
3876ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3877
3878# The possible output files:
3879ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3880
3881ac_rmfiles=
3882for ac_file in $ac_files
3883do
3884 case $ac_file in
3885 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3886 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3887 esac
3888done
3889rm -f $ac_rmfiles
3890
3891if { { ac_try="$ac_link_default"
3892case "(($ac_try" in
3893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3894 *) ac_try_echo=$ac_try;;
3895esac
3896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3897$as_echo "$ac_try_echo"; } >&5
3898 (eval "$ac_link_default") 2>&5
3899 ac_status=$?
3900 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3901 test $ac_status = 0; }; then :
3902 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3903# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3904# in a Makefile. We should not override ac_cv_exeext if it was cached,
3905# so that the user can short-circuit this test for compilers unknown to
3906# Autoconf.
3907for ac_file in $ac_files ''
3908do
3909 test -f "$ac_file" || continue
3910 case $ac_file in
3911 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3912 ;;
3913 [ab].out )
3914 # We found the default executable, but exeext='' is most
3915 # certainly right.
3916 break;;
3917 *.* )
3918 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3919 then :; else
3920 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3921 fi
3922 # We set ac_cv_exeext here because the later test for it is not
3923 # safe: cross compilers may not add the suffix if given an `-o'
3924 # argument, so we may need to know it at that point already.
3925 # Even if this section looks crufty: it has the advantage of
3926 # actually working.
3927 break;;
3928 * )
3929 break;;
3930 esac
3931done
3932test "$ac_cv_exeext" = no && ac_cv_exeext=
3933
3934else
3935 ac_file=''
3936fi
c971b7fa 3937if test -z "$ac_file"; then :
d0ac1c44
SM
3938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3939$as_echo "no" >&6; }
3940$as_echo "$as_me: failed program was:" >&5
c971b7fa
PA
3941sed 's/^/| /' conftest.$ac_ext >&5
3942
3943{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3945as_fn_error 77 "C compiler cannot create executables
3946See \`config.log' for more details" "$LINENO" 5; }
3947else
3948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3949$as_echo "yes" >&6; }
c971b7fa 3950fi
d0ac1c44
SM
3951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3952$as_echo_n "checking for C compiler default output file name... " >&6; }
3953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3954$as_echo "$ac_file" >&6; }
c971b7fa
PA
3955ac_exeext=$ac_cv_exeext
3956
d0ac1c44 3957rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
c971b7fa 3958ac_clean_files=$ac_clean_files_save
c971b7fa
PA
3959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3960$as_echo_n "checking for suffix of executables... " >&6; }
3961if { { ac_try="$ac_link"
3962case "(($ac_try" in
3963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3964 *) ac_try_echo=$ac_try;;
3965esac
3966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3967$as_echo "$ac_try_echo"; } >&5
3968 (eval "$ac_link") 2>&5
3969 ac_status=$?
3970 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3971 test $ac_status = 0; }; then :
3972 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3973# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3974# work properly (i.e., refer to `conftest.exe'), while it won't with
3975# `rm'.
3976for ac_file in conftest.exe conftest conftest.*; do
3977 test -f "$ac_file" || continue
3978 case $ac_file in
3979 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3980 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3981 break;;
3982 * ) break;;
3983 esac
3984done
3985else
3986 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
3988as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3989See \`config.log' for more details" "$LINENO" 5; }
c971b7fa 3990fi
d0ac1c44 3991rm -f conftest conftest$ac_cv_exeext
c971b7fa
PA
3992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3993$as_echo "$ac_cv_exeext" >&6; }
3994
3995rm -f conftest.$ac_ext
3996EXEEXT=$ac_cv_exeext
3997ac_exeext=$EXEEXT
d0ac1c44
SM
3998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3999/* end confdefs.h. */
4000#include <stdio.h>
4001int
4002main ()
4003{
4004FILE *f = fopen ("conftest.out", "w");
4005 return ferror (f) || fclose (f) != 0;
4006
4007 ;
4008 return 0;
4009}
4010_ACEOF
4011ac_clean_files="$ac_clean_files conftest.out"
4012# Check that the compiler produces executables we can run. If not, either
4013# the compiler is broken, or we cross compile.
4014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4015$as_echo_n "checking whether we are cross compiling... " >&6; }
4016if test "$cross_compiling" != yes; then
4017 { { ac_try="$ac_link"
4018case "(($ac_try" in
4019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4020 *) ac_try_echo=$ac_try;;
4021esac
4022eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4023$as_echo "$ac_try_echo"; } >&5
4024 (eval "$ac_link") 2>&5
4025 ac_status=$?
4026 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4027 test $ac_status = 0; }
4028 if { ac_try='./conftest$ac_cv_exeext'
4029 { { case "(($ac_try" in
4030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4031 *) ac_try_echo=$ac_try;;
4032esac
4033eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4034$as_echo "$ac_try_echo"; } >&5
4035 (eval "$ac_try") 2>&5
4036 ac_status=$?
4037 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4038 test $ac_status = 0; }; }; then
4039 cross_compiling=no
4040 else
4041 if test "$cross_compiling" = maybe; then
4042 cross_compiling=yes
4043 else
4044 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4045$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4046as_fn_error $? "cannot run C compiled programs.
4047If you meant to cross compile, use \`--host'.
4048See \`config.log' for more details" "$LINENO" 5; }
4049 fi
4050 fi
4051fi
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4053$as_echo "$cross_compiling" >&6; }
4054
4055rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4056ac_clean_files=$ac_clean_files_save
c971b7fa
PA
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4058$as_echo_n "checking for suffix of object files... " >&6; }
d0ac1c44 4059if ${ac_cv_objext+:} false; then :
c971b7fa
PA
4060 $as_echo_n "(cached) " >&6
4061else
4062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4063/* end confdefs.h. */
4064
4065int
4066main ()
4067{
4068
4069 ;
4070 return 0;
4071}
4072_ACEOF
4073rm -f conftest.o conftest.obj
4074if { { ac_try="$ac_compile"
4075case "(($ac_try" in
4076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4077 *) ac_try_echo=$ac_try;;
4078esac
4079eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4080$as_echo "$ac_try_echo"; } >&5
4081 (eval "$ac_compile") 2>&5
4082 ac_status=$?
4083 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4084 test $ac_status = 0; }; then :
4085 for ac_file in conftest.o conftest.obj conftest.*; do
4086 test -f "$ac_file" || continue;
4087 case $ac_file in
4088 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4089 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4090 break;;
4091 esac
4092done
4093else
4094 $as_echo "$as_me: failed program was:" >&5
4095sed 's/^/| /' conftest.$ac_ext >&5
4096
4097{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4098$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4099as_fn_error $? "cannot compute suffix of object files: cannot compile
4100See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
4101fi
4102rm -f conftest.$ac_cv_objext conftest.$ac_ext
4103fi
4104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4105$as_echo "$ac_cv_objext" >&6; }
4106OBJEXT=$ac_cv_objext
4107ac_objext=$OBJEXT
4108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4109$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 4110if ${ac_cv_c_compiler_gnu+:} false; then :
c971b7fa
PA
4111 $as_echo_n "(cached) " >&6
4112else
4113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4114/* end confdefs.h. */
4115
4116int
4117main ()
4118{
4119#ifndef __GNUC__
4120 choke me
4121#endif
4122
4123 ;
4124 return 0;
4125}
4126_ACEOF
4127if ac_fn_c_try_compile "$LINENO"; then :
4128 ac_compiler_gnu=yes
4129else
4130 ac_compiler_gnu=no
4131fi
4132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4133ac_cv_c_compiler_gnu=$ac_compiler_gnu
4134
4135fi
4136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4137$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4138if test $ac_compiler_gnu = yes; then
4139 GCC=yes
4140else
4141 GCC=
4142fi
4143ac_test_CFLAGS=${CFLAGS+set}
4144ac_save_CFLAGS=$CFLAGS
4145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4146$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 4147if ${ac_cv_prog_cc_g+:} false; then :
c971b7fa
PA
4148 $as_echo_n "(cached) " >&6
4149else
4150 ac_save_c_werror_flag=$ac_c_werror_flag
4151 ac_c_werror_flag=yes
4152 ac_cv_prog_cc_g=no
4153 CFLAGS="-g"
4154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4155/* end confdefs.h. */
4156
4157int
4158main ()
4159{
4160
4161 ;
4162 return 0;
4163}
4164_ACEOF
4165if ac_fn_c_try_compile "$LINENO"; then :
4166 ac_cv_prog_cc_g=yes
4167else
4168 CFLAGS=""
4169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4170/* end confdefs.h. */
4171
4172int
4173main ()
4174{
4175
4176 ;
4177 return 0;
4178}
4179_ACEOF
4180if ac_fn_c_try_compile "$LINENO"; then :
4181
4182else
4183 ac_c_werror_flag=$ac_save_c_werror_flag
4184 CFLAGS="-g"
4185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4186/* end confdefs.h. */
4187
4188int
4189main ()
4190{
4191
4192 ;
4193 return 0;
4194}
4195_ACEOF
4196if ac_fn_c_try_compile "$LINENO"; then :
4197 ac_cv_prog_cc_g=yes
4198fi
4199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4200fi
4201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4202fi
4203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4204 ac_c_werror_flag=$ac_save_c_werror_flag
4205fi
4206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4207$as_echo "$ac_cv_prog_cc_g" >&6; }
4208if test "$ac_test_CFLAGS" = set; then
4209 CFLAGS=$ac_save_CFLAGS
4210elif test $ac_cv_prog_cc_g = yes; then
4211 if test "$GCC" = yes; then
4212 CFLAGS="-g -O2"
4213 else
4214 CFLAGS="-g"
4215 fi
4216else
4217 if test "$GCC" = yes; then
4218 CFLAGS="-O2"
4219 else
4220 CFLAGS=
4221 fi
4222fi
4223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4224$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 4225if ${ac_cv_prog_cc_c89+:} false; then :
c971b7fa
PA
4226 $as_echo_n "(cached) " >&6
4227else
4228 ac_cv_prog_cc_c89=no
4229ac_save_CC=$CC
4230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4231/* end confdefs.h. */
4232#include <stdarg.h>
4233#include <stdio.h>
d0ac1c44 4234struct stat;
c971b7fa
PA
4235/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4236struct buf { int x; };
4237FILE * (*rcsopen) (struct buf *, struct stat *, int);
4238static char *e (p, i)
4239 char **p;
4240 int i;
4241{
4242 return p[i];
4243}
4244static char *f (char * (*g) (char **, int), char **p, ...)
4245{
4246 char *s;
4247 va_list v;
4248 va_start (v,p);
4249 s = g (p, va_arg (v,int));
4250 va_end (v);
4251 return s;
4252}
4253
4254/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4255 function prototypes and stuff, but not '\xHH' hex character constants.
4256 These don't provoke an error unfortunately, instead are silently treated
4257 as 'x'. The following induces an error, until -std is added to get
4258 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4259 array size at least. It's necessary to write '\x00'==0 to get something
4260 that's true only with -std. */
4261int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4262
4263/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4264 inside strings and character constants. */
4265#define FOO(x) 'x'
4266int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4267
4268int test (int i, double x);
4269struct s1 {int (*f) (int a);};
4270struct s2 {int (*f) (double a);};
4271int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4272int argc;
4273char **argv;
4274int
4275main ()
4276{
4277return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4278 ;
4279 return 0;
4280}
4281_ACEOF
4282for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4283 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4284do
4285 CC="$ac_save_CC $ac_arg"
4286 if ac_fn_c_try_compile "$LINENO"; then :
4287 ac_cv_prog_cc_c89=$ac_arg
4288fi
4289rm -f core conftest.err conftest.$ac_objext
4290 test "x$ac_cv_prog_cc_c89" != "xno" && break
4291done
4292rm -f conftest.$ac_ext
4293CC=$ac_save_CC
4294
4295fi
4296# AC_CACHE_VAL
4297case "x$ac_cv_prog_cc_c89" in
4298 x)
4299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4300$as_echo "none needed" >&6; } ;;
4301 xno)
4302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4303$as_echo "unsupported" >&6; } ;;
4304 *)
4305 CC="$CC $ac_cv_prog_cc_c89"
4306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4307$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4308esac
4309if test "x$ac_cv_prog_cc_c89" != xno; then :
4310
4311fi
4312
4313ac_ext=c
4314ac_cpp='$CPP $CPPFLAGS'
4315ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4316ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4317ac_compiler_gnu=$ac_cv_c_compiler_gnu
4318
d0ac1c44
SM
4319ac_aux_dir=
4320for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4321 if test -f "$ac_dir/install-sh"; then
4322 ac_aux_dir=$ac_dir
4323 ac_install_sh="$ac_aux_dir/install-sh -c"
4324 break
4325 elif test -f "$ac_dir/install.sh"; then
4326 ac_aux_dir=$ac_dir
4327 ac_install_sh="$ac_aux_dir/install.sh -c"
4328 break
4329 elif test -f "$ac_dir/shtool"; then
4330 ac_aux_dir=$ac_dir
4331 ac_install_sh="$ac_aux_dir/shtool install -c"
4332 break
4333 fi
4334done
4335if test -z "$ac_aux_dir"; then
4336 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4337fi
4338
4339# These three variables are undocumented and unsupported,
4340# and are intended to be withdrawn in a future Autoconf release.
4341# They can cause serious problems if a builder's source tree is in a directory
4342# whose full name contains unusual characters.
4343ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4344ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4345ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4346
4347
4348# Expand $ac_aux_dir to an absolute path.
4349am_aux_dir=`cd "$ac_aux_dir" && pwd`
4350
4351ac_ext=c
4352ac_cpp='$CPP $CPPFLAGS'
4353ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4354ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4355ac_compiler_gnu=$ac_cv_c_compiler_gnu
4356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4357$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4358if ${am_cv_prog_cc_c_o+:} false; then :
4359 $as_echo_n "(cached) " >&6
4360else
4361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4362/* end confdefs.h. */
4363
4364int
4365main ()
4366{
4367
4368 ;
4369 return 0;
4370}
4371_ACEOF
4372 # Make sure it works both with $CC and with simple cc.
4373 # Following AC_PROG_CC_C_O, we do the test twice because some
4374 # compilers refuse to overwrite an existing .o file with -o,
4375 # though they will create one.
4376 am_cv_prog_cc_c_o=yes
4377 for am_i in 1 2; do
4378 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4379 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4380 ac_status=$?
4381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4382 (exit $ac_status); } \
4383 && test -f conftest2.$ac_objext; then
4384 : OK
4385 else
4386 am_cv_prog_cc_c_o=no
4387 break
4388 fi
4389 done
4390 rm -f core conftest*
4391 unset am_i
4392fi
4393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4394$as_echo "$am_cv_prog_cc_c_o" >&6; }
4395if test "$am_cv_prog_cc_c_o" != yes; then
4396 # Losing compiler, so override with the script.
4397 # FIXME: It is wrong to rewrite CC.
4398 # But if we don't then we get into trouble of one sort or another.
4399 # A longer-term fix would be to have automake use am__CC in this case,
4400 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4401 CC="$am_aux_dir/compile $CC"
4402fi
4403ac_ext=c
4404ac_cpp='$CPP $CPPFLAGS'
4405ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4406ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4407ac_compiler_gnu=$ac_cv_c_compiler_gnu
4408
4409
c971b7fa
PA
4410
4411ac_ext=c
4412ac_cpp='$CPP $CPPFLAGS'
4413ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4414ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4415ac_compiler_gnu=$ac_cv_c_compiler_gnu
4416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4417$as_echo_n "checking how to run the C preprocessor... " >&6; }
4418# On Suns, sometimes $CPP names a directory.
4419if test -n "$CPP" && test -d "$CPP"; then
4420 CPP=
4421fi
4422if test -z "$CPP"; then
d0ac1c44 4423 if ${ac_cv_prog_CPP+:} false; then :
c971b7fa
PA
4424 $as_echo_n "(cached) " >&6
4425else
4426 # Double quotes because CPP needs to be expanded
4427 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4428 do
4429 ac_preproc_ok=false
4430for ac_c_preproc_warn_flag in '' yes
4431do
4432 # Use a header file that comes with gcc, so configuring glibc
4433 # with a fresh cross-compiler works.
4434 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4435 # <limits.h> exists even on freestanding compilers.
4436 # On the NeXT, cc -E runs the code through the compiler's parser,
4437 # not just through cpp. "Syntax error" is here to catch this case.
4438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4439/* end confdefs.h. */
4440#ifdef __STDC__
4441# include <limits.h>
4442#else
4443# include <assert.h>
4444#endif
4445 Syntax error
4446_ACEOF
4447if ac_fn_c_try_cpp "$LINENO"; then :
4448
4449else
4450 # Broken: fails on valid input.
4451continue
4452fi
d0ac1c44 4453rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4454
4455 # OK, works on sane cases. Now check whether nonexistent headers
4456 # can be detected and how.
4457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4458/* end confdefs.h. */
4459#include <ac_nonexistent.h>
4460_ACEOF
4461if ac_fn_c_try_cpp "$LINENO"; then :
4462 # Broken: success on invalid input.
4463continue
4464else
4465 # Passes both tests.
4466ac_preproc_ok=:
4467break
4468fi
d0ac1c44 4469rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4470
4471done
4472# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4473rm -f conftest.i conftest.err conftest.$ac_ext
c971b7fa
PA
4474if $ac_preproc_ok; then :
4475 break
4476fi
4477
4478 done
4479 ac_cv_prog_CPP=$CPP
4480
4481fi
4482 CPP=$ac_cv_prog_CPP
4483else
4484 ac_cv_prog_CPP=$CPP
4485fi
4486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4487$as_echo "$CPP" >&6; }
4488ac_preproc_ok=false
4489for ac_c_preproc_warn_flag in '' yes
4490do
4491 # Use a header file that comes with gcc, so configuring glibc
4492 # with a fresh cross-compiler works.
4493 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4494 # <limits.h> exists even on freestanding compilers.
4495 # On the NeXT, cc -E runs the code through the compiler's parser,
4496 # not just through cpp. "Syntax error" is here to catch this case.
4497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4498/* end confdefs.h. */
4499#ifdef __STDC__
4500# include <limits.h>
4501#else
4502# include <assert.h>
4503#endif
4504 Syntax error
4505_ACEOF
4506if ac_fn_c_try_cpp "$LINENO"; then :
4507
4508else
4509 # Broken: fails on valid input.
4510continue
4511fi
d0ac1c44 4512rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4513
4514 # OK, works on sane cases. Now check whether nonexistent headers
4515 # can be detected and how.
4516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4517/* end confdefs.h. */
4518#include <ac_nonexistent.h>
4519_ACEOF
4520if ac_fn_c_try_cpp "$LINENO"; then :
4521 # Broken: success on invalid input.
4522continue
4523else
4524 # Passes both tests.
4525ac_preproc_ok=:
4526break
4527fi
d0ac1c44 4528rm -f conftest.err conftest.i conftest.$ac_ext
c971b7fa
PA
4529
4530done
4531# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
d0ac1c44 4532rm -f conftest.i conftest.err conftest.$ac_ext
c971b7fa
PA
4533if $ac_preproc_ok; then :
4534
4535else
4536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4537$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
4538as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4539See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
4540fi
4541
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
4549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4550$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
d0ac1c44 4551if ${ac_cv_path_GREP+:} false; then :
c971b7fa
PA
4552 $as_echo_n "(cached) " >&6
4553else
4554 if test -z "$GREP"; then
4555 ac_path_GREP_found=false
4556 # Loop through the user's path and test for each of PROGNAME-LIST
4557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4558for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4559do
4560 IFS=$as_save_IFS
4561 test -z "$as_dir" && as_dir=.
4562 for ac_prog in grep ggrep; do
4563 for ac_exec_ext in '' $ac_executable_extensions; do
4564 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4565 as_fn_executable_p "$ac_path_GREP" || continue
c971b7fa
PA
4566# Check for GNU ac_path_GREP and select it if it is found.
4567 # Check for GNU $ac_path_GREP
4568case `"$ac_path_GREP" --version 2>&1` in
4569*GNU*)
4570 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4571*)
4572 ac_count=0
4573 $as_echo_n 0123456789 >"conftest.in"
4574 while :
4575 do
4576 cat "conftest.in" "conftest.in" >"conftest.tmp"
4577 mv "conftest.tmp" "conftest.in"
4578 cp "conftest.in" "conftest.nl"
4579 $as_echo 'GREP' >> "conftest.nl"
4580 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4581 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4582 as_fn_arith $ac_count + 1 && ac_count=$as_val
4583 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4584 # Best one so far, save it but keep looking for a better one
4585 ac_cv_path_GREP="$ac_path_GREP"
4586 ac_path_GREP_max=$ac_count
4587 fi
4588 # 10*(2^10) chars as input seems more than enough
4589 test $ac_count -gt 10 && break
4590 done
4591 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4592esac
4593
4594 $ac_path_GREP_found && break 3
4595 done
4596 done
4597 done
4598IFS=$as_save_IFS
4599 if test -z "$ac_cv_path_GREP"; then
d0ac1c44 4600 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
c971b7fa
PA
4601 fi
4602else
4603 ac_cv_path_GREP=$GREP
4604fi
4605
4606fi
4607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4608$as_echo "$ac_cv_path_GREP" >&6; }
4609 GREP="$ac_cv_path_GREP"
4610
4611
4612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4613$as_echo_n "checking for egrep... " >&6; }
d0ac1c44 4614if ${ac_cv_path_EGREP+:} false; then :
c971b7fa
PA
4615 $as_echo_n "(cached) " >&6
4616else
4617 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4618 then ac_cv_path_EGREP="$GREP -E"
4619 else
4620 if test -z "$EGREP"; then
4621 ac_path_EGREP_found=false
4622 # Loop through the user's path and test for each of PROGNAME-LIST
4623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4624for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4625do
4626 IFS=$as_save_IFS
4627 test -z "$as_dir" && as_dir=.
4628 for ac_prog in egrep; do
4629 for ac_exec_ext in '' $ac_executable_extensions; do
4630 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
d0ac1c44 4631 as_fn_executable_p "$ac_path_EGREP" || continue
c971b7fa
PA
4632# Check for GNU ac_path_EGREP and select it if it is found.
4633 # Check for GNU $ac_path_EGREP
4634case `"$ac_path_EGREP" --version 2>&1` in
4635*GNU*)
4636 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4637*)
4638 ac_count=0
4639 $as_echo_n 0123456789 >"conftest.in"
4640 while :
4641 do
4642 cat "conftest.in" "conftest.in" >"conftest.tmp"
4643 mv "conftest.tmp" "conftest.in"
4644 cp "conftest.in" "conftest.nl"
4645 $as_echo 'EGREP' >> "conftest.nl"
4646 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4647 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4648 as_fn_arith $ac_count + 1 && ac_count=$as_val
4649 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4650 # Best one so far, save it but keep looking for a better one
4651 ac_cv_path_EGREP="$ac_path_EGREP"
4652 ac_path_EGREP_max=$ac_count
4653 fi
4654 # 10*(2^10) chars as input seems more than enough
4655 test $ac_count -gt 10 && break
4656 done
4657 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4658esac
4659
4660 $ac_path_EGREP_found && break 3
4661 done
4662 done
4663 done
4664IFS=$as_save_IFS
4665 if test -z "$ac_cv_path_EGREP"; then
d0ac1c44 4666 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
c971b7fa
PA
4667 fi
4668else
4669 ac_cv_path_EGREP=$EGREP
4670fi
4671
4672 fi
4673fi
4674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4675$as_echo "$ac_cv_path_EGREP" >&6; }
4676 EGREP="$ac_cv_path_EGREP"
4677
4678
4679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4680$as_echo_n "checking for ANSI C header files... " >&6; }
d0ac1c44 4681if ${ac_cv_header_stdc+:} false; then :
c971b7fa
PA
4682 $as_echo_n "(cached) " >&6
4683else
4684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4685/* end confdefs.h. */
4686#include <stdlib.h>
4687#include <stdarg.h>
4688#include <string.h>
4689#include <float.h>
4690
4691int
4692main ()
4693{
4694
4695 ;
4696 return 0;
4697}
4698_ACEOF
4699if ac_fn_c_try_compile "$LINENO"; then :
4700 ac_cv_header_stdc=yes
4701else
4702 ac_cv_header_stdc=no
4703fi
4704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4705
4706if test $ac_cv_header_stdc = yes; then
4707 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4709/* end confdefs.h. */
4710#include <string.h>
4711
4712_ACEOF
4713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4714 $EGREP "memchr" >/dev/null 2>&1; then :
4715
4716else
4717 ac_cv_header_stdc=no
4718fi
4719rm -f conftest*
4720
4721fi
4722
4723if test $ac_cv_header_stdc = yes; then
4724 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4726/* end confdefs.h. */
4727#include <stdlib.h>
4728
4729_ACEOF
4730if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4731 $EGREP "free" >/dev/null 2>&1; then :
4732
4733else
4734 ac_cv_header_stdc=no
4735fi
4736rm -f conftest*
4737
4738fi
4739
4740if test $ac_cv_header_stdc = yes; then
4741 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4742 if test "$cross_compiling" = yes; then :
4743 :
4744else
4745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4746/* end confdefs.h. */
4747#include <ctype.h>
4748#include <stdlib.h>
4749#if ((' ' & 0x0FF) == 0x020)
4750# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4751# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4752#else
4753# define ISLOWER(c) \
4754 (('a' <= (c) && (c) <= 'i') \
4755 || ('j' <= (c) && (c) <= 'r') \
4756 || ('s' <= (c) && (c) <= 'z'))
4757# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4758#endif
4759
4760#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4761int
4762main ()
4763{
4764 int i;
4765 for (i = 0; i < 256; i++)
4766 if (XOR (islower (i), ISLOWER (i))
4767 || toupper (i) != TOUPPER (i))
4768 return 2;
4769 return 0;
4770}
4771_ACEOF
4772if ac_fn_c_try_run "$LINENO"; then :
4773
4774else
4775 ac_cv_header_stdc=no
4776fi
4777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4778 conftest.$ac_objext conftest.beam conftest.$ac_ext
4779fi
4780
4781fi
4782fi
4783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4784$as_echo "$ac_cv_header_stdc" >&6; }
4785if test $ac_cv_header_stdc = yes; then
4786
4787$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4788
4789fi
4790
4791# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4792for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4793 inttypes.h stdint.h unistd.h
4794do :
4795 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4796ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4797"
d0ac1c44 4798if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c971b7fa
PA
4799 cat >>confdefs.h <<_ACEOF
4800#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4801_ACEOF
4802
4803fi
4804
4805done
4806
4807
4808
c971b7fa 4809 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
d0ac1c44 4810if test "x$ac_cv_header_minix_config_h" = xyes; then :
c971b7fa
PA
4811 MINIX=yes
4812else
4813 MINIX=
4814fi
4815
4816
4817 if test "$MINIX" = yes; then
4818
4819$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4820
4821
4822$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4823
4824
4825$as_echo "#define _MINIX 1" >>confdefs.h
4826
c971b7fa 4827
4a626d0a 4828$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
c971b7fa 4829
4a626d0a 4830 fi
c971b7fa
PA
4831
4832
4833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4834$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
d0ac1c44 4835if ${ac_cv_safe_to_define___extensions__+:} false; then :
c971b7fa
PA
4836 $as_echo_n "(cached) " >&6
4837else
4838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4839/* end confdefs.h. */
4840
4841# define __EXTENSIONS__ 1
4842 $ac_includes_default
4843int
4844main ()
4845{
4846
4847 ;
4848 return 0;
4849}
4850_ACEOF
4851if ac_fn_c_try_compile "$LINENO"; then :
4852 ac_cv_safe_to_define___extensions__=yes
4853else
4854 ac_cv_safe_to_define___extensions__=no
4855fi
4856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4857fi
4858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4859$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4860 test $ac_cv_safe_to_define___extensions__ = yes &&
4861 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4862
4863 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4864
4865 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
4866
4867 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4868
4869 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4870
49e4877c
PA
4871 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
4872
4873 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
4874
4875 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
4876
4877 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
4878
4879 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
4880
4881 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
4882
4883 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
4884
c971b7fa
PA
4885 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4886
4a626d0a
PA
4887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4888$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
d0ac1c44 4889if ${ac_cv_should_define__xopen_source+:} false; then :
4a626d0a
PA
4890 $as_echo_n "(cached) " >&6
4891else
4892 ac_cv_should_define__xopen_source=no
4893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4894/* end confdefs.h. */
4895
4896 #include <wchar.h>
4897 mbstate_t x;
4898int
4899main ()
4900{
4901
4902 ;
4903 return 0;
4904}
4905_ACEOF
4906if ac_fn_c_try_compile "$LINENO"; then :
4907
4908else
4909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4910/* end confdefs.h. */
4911
4912 #define _XOPEN_SOURCE 500
4913 #include <wchar.h>
4914 mbstate_t x;
4915int
4916main ()
4917{
4918
4919 ;
4920 return 0;
4921}
4922_ACEOF
4923if ac_fn_c_try_compile "$LINENO"; then :
4924 ac_cv_should_define__xopen_source=yes
4925fi
d0ac1c44
SM
4926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4927fi
4928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4929fi
4930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4931$as_echo "$ac_cv_should_define__xopen_source" >&6; }
4932 test $ac_cv_should_define__xopen_source = yes &&
4933 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
4946$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
4947if ${gl_cv_c_amsterdam_compiler+:} false; then :
4948 $as_echo_n "(cached) " >&6
4949else
4950
4951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4952/* end confdefs.h. */
4953
4954#ifdef __ACK__
4955Amsterdam
4956#endif
4957
4958_ACEOF
4959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4960 $EGREP "Amsterdam" >/dev/null 2>&1; then :
4961 gl_cv_c_amsterdam_compiler=yes
4962else
4963 gl_cv_c_amsterdam_compiler=no
4964fi
4965rm -f conftest*
4966
4967
4968fi
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
4970$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
4971
4972 if test $gl_cv_c_amsterdam_compiler = yes; then
4973 if test -z "$AR"; then
4974 AR='cc -c.a'
4975 fi
4976 if test -z "$ARFLAGS"; then
4977 ARFLAGS='-o'
4978 fi
4979 else
4980 if test -n "$ac_tool_prefix"; then
4981 for ac_prog in ar lib "link -lib"
4982 do
4983 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4984set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4986$as_echo_n "checking for $ac_word... " >&6; }
4987if ${ac_cv_prog_AR+:} false; then :
4988 $as_echo_n "(cached) " >&6
4989else
4990 if test -n "$AR"; then
4991 ac_cv_prog_AR="$AR" # Let the user override the test.
4992else
4993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4994for as_dir in $PATH
4995do
4996 IFS=$as_save_IFS
4997 test -z "$as_dir" && as_dir=.
4998 for ac_exec_ext in '' $ac_executable_extensions; do
4999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5000 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
5001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5002 break 2
5003 fi
5004done
5005 done
5006IFS=$as_save_IFS
5007
5008fi
4a626d0a 5009fi
d0ac1c44
SM
5010AR=$ac_cv_prog_AR
5011if test -n "$AR"; then
5012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5013$as_echo "$AR" >&6; }
5014else
5015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5016$as_echo "no" >&6; }
4a626d0a 5017fi
c971b7fa 5018
49e4877c 5019
d0ac1c44
SM
5020 test -n "$AR" && break
5021 done
5022fi
5023if test -z "$AR"; then
5024 ac_ct_AR=$AR
5025 for ac_prog in ar lib "link -lib"
5026do
5027 # Extract the first word of "$ac_prog", so it can be a program name with args.
5028set dummy $ac_prog; ac_word=$2
5029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5030$as_echo_n "checking for $ac_word... " >&6; }
5031if ${ac_cv_prog_ac_ct_AR+:} false; then :
5032 $as_echo_n "(cached) " >&6
5033else
5034 if test -n "$ac_ct_AR"; then
5035 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5036else
5037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5038for as_dir in $PATH
5039do
5040 IFS=$as_save_IFS
5041 test -z "$as_dir" && as_dir=.
5042 for ac_exec_ext in '' $ac_executable_extensions; do
5043 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5044 ac_cv_prog_ac_ct_AR="$ac_prog"
5045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5046 break 2
5047 fi
5048done
5049 done
5050IFS=$as_save_IFS
49e4877c 5051
d0ac1c44
SM
5052fi
5053fi
5054ac_ct_AR=$ac_cv_prog_ac_ct_AR
5055if test -n "$ac_ct_AR"; then
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5057$as_echo "$ac_ct_AR" >&6; }
5058else
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5060$as_echo "no" >&6; }
5061fi
49e4877c
PA
5062
5063
d0ac1c44
SM
5064 test -n "$ac_ct_AR" && break
5065done
49e4877c 5066
d0ac1c44
SM
5067 if test "x$ac_ct_AR" = x; then
5068 AR="false"
5069 else
5070 case $cross_compiling:$ac_tool_warned in
5071yes:)
5072{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5073$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5074ac_tool_warned=yes ;;
5075esac
5076 AR=$ac_ct_AR
5077 fi
5078fi
49e4877c 5079
d0ac1c44 5080: ${AR=ar}
49e4877c 5081
d0ac1c44
SM
5082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
5083$as_echo_n "checking the archiver ($AR) interface... " >&6; }
5084if ${am_cv_ar_interface+:} false; then :
c971b7fa
PA
5085 $as_echo_n "(cached) " >&6
5086else
d0ac1c44
SM
5087 ac_ext=c
5088ac_cpp='$CPP $CPPFLAGS'
5089ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5090ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5091ac_compiler_gnu=$ac_cv_c_compiler_gnu
c971b7fa 5092
d0ac1c44
SM
5093 am_cv_ar_interface=ar
5094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 5095/* end confdefs.h. */
d0ac1c44 5096int some_variable = 0;
c971b7fa 5097_ACEOF
d0ac1c44
SM
5098if ac_fn_c_try_compile "$LINENO"; then :
5099 am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
5100 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5101 (eval $am_ar_try) 2>&5
5102 ac_status=$?
5103 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5104 test $ac_status = 0; }
5105 if test "$ac_status" -eq 0; then
5106 am_cv_ar_interface=ar
5107 else
5108 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
5109 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
5110 (eval $am_ar_try) 2>&5
5111 ac_status=$?
5112 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5113 test $ac_status = 0; }
5114 if test "$ac_status" -eq 0; then
5115 am_cv_ar_interface=lib
5116 else
5117 am_cv_ar_interface=unknown
5118 fi
5119 fi
5120 rm -f conftest.lib libconftest.a
c971b7fa 5121
d0ac1c44
SM
5122fi
5123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5124 ac_ext=c
5125ac_cpp='$CPP $CPPFLAGS'
5126ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5127ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5128ac_compiler_gnu=$ac_cv_c_compiler_gnu
c971b7fa
PA
5129
5130fi
d0ac1c44
SM
5131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
5132$as_echo "$am_cv_ar_interface" >&6; }
5133
5134case $am_cv_ar_interface in
5135ar)
5136 ;;
5137lib)
5138 # Microsoft lib, so override with the ar-lib wrapper script.
5139 # FIXME: It is wrong to rewrite AR.
5140 # But if we don't then we get into trouble of one sort or another.
5141 # A longer-term fix would be to have automake use am__AR in this case,
5142 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
5143 # similar.
5144 AR="$am_aux_dir/ar-lib $AR"
5145 ;;
5146unknown)
5147 as_fn_error $? "could not determine $AR interface" "$LINENO" 5
5148 ;;
5149esac
49e4877c 5150
49e4877c
PA
5151 fi
5152
5153 if test -n "$ac_tool_prefix"; then
c971b7fa
PA
5154 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5155set dummy ${ac_tool_prefix}ar; ac_word=$2
5156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5157$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5158if ${ac_cv_prog_AR+:} false; then :
c971b7fa
PA
5159 $as_echo_n "(cached) " >&6
5160else
5161 if test -n "$AR"; then
5162 ac_cv_prog_AR="$AR" # Let the user override the test.
5163else
5164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5165for as_dir in $PATH
5166do
5167 IFS=$as_save_IFS
5168 test -z "$as_dir" && as_dir=.
5169 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5170 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5171 ac_cv_prog_AR="${ac_tool_prefix}ar"
5172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5173 break 2
5174 fi
5175done
5176 done
5177IFS=$as_save_IFS
5178
5179fi
5180fi
5181AR=$ac_cv_prog_AR
5182if test -n "$AR"; then
5183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5184$as_echo "$AR" >&6; }
5185else
5186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5187$as_echo "no" >&6; }
5188fi
5189
5190
5191fi
5192if test -z "$ac_cv_prog_AR"; then
5193 ac_ct_AR=$AR
5194 # Extract the first word of "ar", so it can be a program name with args.
5195set dummy ar; ac_word=$2
5196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5197$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5198if ${ac_cv_prog_ac_ct_AR+:} false; then :
c971b7fa
PA
5199 $as_echo_n "(cached) " >&6
5200else
5201 if test -n "$ac_ct_AR"; then
5202 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5203else
5204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5205for as_dir in $PATH
5206do
5207 IFS=$as_save_IFS
5208 test -z "$as_dir" && as_dir=.
5209 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5211 ac_cv_prog_ac_ct_AR="ar"
5212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5213 break 2
5214 fi
5215done
5216 done
5217IFS=$as_save_IFS
5218
5219fi
5220fi
5221ac_ct_AR=$ac_cv_prog_ac_ct_AR
5222if test -n "$ac_ct_AR"; then
5223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5224$as_echo "$ac_ct_AR" >&6; }
5225else
5226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5227$as_echo "no" >&6; }
5228fi
5229
5230 if test "x$ac_ct_AR" = x; then
5231 AR="ar"
5232 else
5233 case $cross_compiling:$ac_tool_warned in
5234yes:)
5235{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5236$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5237ac_tool_warned=yes ;;
5238esac
5239 AR=$ac_ct_AR
5240 fi
5241else
5242 AR="$ac_cv_prog_AR"
5243fi
5244
49e4877c
PA
5245 if test -z "$ARFLAGS"; then
5246 ARFLAGS='cr'
c971b7fa
PA
5247 fi
5248
5249
49e4877c 5250
c971b7fa
PA
5251 if test -z "$RANLIB"; then
5252 if test $gl_cv_c_amsterdam_compiler = yes; then
5253 RANLIB=':'
5254 else
5255 if test -n "$ac_tool_prefix"; then
5256 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5257set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5259$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5260if ${ac_cv_prog_RANLIB+:} false; then :
c971b7fa
PA
5261 $as_echo_n "(cached) " >&6
5262else
5263 if test -n "$RANLIB"; then
5264 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5265else
5266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5267for as_dir in $PATH
5268do
5269 IFS=$as_save_IFS
5270 test -z "$as_dir" && as_dir=.
5271 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5272 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5273 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5274 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5275 break 2
5276 fi
5277done
5278 done
5279IFS=$as_save_IFS
5280
5281fi
5282fi
5283RANLIB=$ac_cv_prog_RANLIB
5284if test -n "$RANLIB"; then
5285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5286$as_echo "$RANLIB" >&6; }
5287else
5288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5289$as_echo "no" >&6; }
5290fi
5291
5292
5293fi
5294if test -z "$ac_cv_prog_RANLIB"; then
5295 ac_ct_RANLIB=$RANLIB
5296 # Extract the first word of "ranlib", so it can be a program name with args.
5297set dummy ranlib; ac_word=$2
5298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5299$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5300if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
5301 $as_echo_n "(cached) " >&6
5302else
5303 if test -n "$ac_ct_RANLIB"; then
5304 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5305else
5306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5307for as_dir in $PATH
5308do
5309 IFS=$as_save_IFS
5310 test -z "$as_dir" && as_dir=.
5311 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5312 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5313 ac_cv_prog_ac_ct_RANLIB="ranlib"
5314 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5315 break 2
5316 fi
5317done
5318 done
5319IFS=$as_save_IFS
5320
5321fi
5322fi
5323ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5324if test -n "$ac_ct_RANLIB"; then
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5326$as_echo "$ac_ct_RANLIB" >&6; }
5327else
5328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5329$as_echo "no" >&6; }
5330fi
5331
5332 if test "x$ac_ct_RANLIB" = x; then
5333 RANLIB=":"
5334 else
5335 case $cross_compiling:$ac_tool_warned in
5336yes:)
5337{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5338$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5339ac_tool_warned=yes ;;
5340esac
5341 RANLIB=$ac_ct_RANLIB
5342 fi
5343else
5344 RANLIB="$ac_cv_prog_RANLIB"
5345fi
5346
5347 fi
5348 fi
5349
5350
4a626d0a
PA
5351# Make sure we can run config.sub.
5352$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
d0ac1c44 5353 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4a626d0a
PA
5354
5355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5356$as_echo_n "checking build system type... " >&6; }
d0ac1c44 5357if ${ac_cv_build+:} false; then :
4a626d0a
PA
5358 $as_echo_n "(cached) " >&6
5359else
5360 ac_build_alias=$build_alias
5361test "x$ac_build_alias" = x &&
5362 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5363test "x$ac_build_alias" = x &&
d0ac1c44 5364 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4a626d0a 5365ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
d0ac1c44 5366 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4a626d0a
PA
5367
5368fi
5369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5370$as_echo "$ac_cv_build" >&6; }
5371case $ac_cv_build in
5372*-*-*) ;;
d0ac1c44 5373*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4a626d0a
PA
5374esac
5375build=$ac_cv_build
5376ac_save_IFS=$IFS; IFS='-'
5377set x $ac_cv_build
5378shift
5379build_cpu=$1
5380build_vendor=$2
5381shift; shift
5382# Remember, the first character of IFS is used to create $*,
5383# except with old shells:
5384build_os=$*
5385IFS=$ac_save_IFS
5386case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5387
5388
5389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5390$as_echo_n "checking host system type... " >&6; }
d0ac1c44 5391if ${ac_cv_host+:} false; then :
4a626d0a
PA
5392 $as_echo_n "(cached) " >&6
5393else
5394 if test "x$host_alias" = x; then
5395 ac_cv_host=$ac_cv_build
5396else
5397 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
d0ac1c44 5398 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4a626d0a
PA
5399fi
5400
5401fi
5402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5403$as_echo "$ac_cv_host" >&6; }
5404case $ac_cv_host in
5405*-*-*) ;;
d0ac1c44 5406*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4a626d0a
PA
5407esac
5408host=$ac_cv_host
5409ac_save_IFS=$IFS; IFS='-'
5410set x $ac_cv_host
5411shift
5412host_cpu=$1
5413host_vendor=$2
5414shift; shift
5415# Remember, the first character of IFS is used to create $*,
5416# except with old shells:
5417host_os=$*
5418IFS=$ac_save_IFS
5419case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5420
5421
c971b7fa
PA
5422
5423
88b48903
WN
5424
5425 # IEEE behaviour is the default on all CPUs except Alpha and SH
5426 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
5427 # and the GCC 4.1.2 manual).
5428 case "$host_cpu" in
5429 alpha*)
5430 # On Alpha systems, a compiler option provides the behaviour.
5431 # See the ieee(3) manual page, also available at
5432 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
5433 if test -n "$GCC"; then
5434 # GCC has the option -mieee.
5435 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
5436 CPPFLAGS="$CPPFLAGS -mieee"
5437 else
5438 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
5439 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
5440 CPPFLAGS="$CPPFLAGS -ieee"
5441 fi
5442 ;;
5443 sh*)
5444 if test -n "$GCC"; then
5445 # GCC has the option -mieee.
5446 CPPFLAGS="$CPPFLAGS -mieee"
5447 fi
5448 ;;
5449 esac
5450
2196f55f
YQ
5451# Check whether --enable-largefile was given.
5452if test "${enable_largefile+set}" = set; then :
5453 enableval=$enable_largefile;
5454fi
5455
5456if test "$enable_largefile" != no; then
5457
5458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5459$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
d0ac1c44 5460if ${ac_cv_sys_largefile_CC+:} false; then :
2196f55f
YQ
5461 $as_echo_n "(cached) " >&6
5462else
5463 ac_cv_sys_largefile_CC=no
5464 if test "$GCC" != yes; then
5465 ac_save_CC=$CC
5466 while :; do
5467 # IRIX 6.2 and later do not support large files by default,
5468 # so use the C compiler's -n32 option if that helps.
5469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5470/* end confdefs.h. */
5471#include <sys/types.h>
5472 /* Check that off_t can represent 2**63 - 1 correctly.
5473 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5474 since some C++ compilers masquerading as C compilers
5475 incorrectly reject 9223372036854775807. */
5476#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5477 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5478 && LARGE_OFF_T % 2147483647 == 1)
5479 ? 1 : -1];
5480int
5481main ()
5482{
5483
5484 ;
5485 return 0;
5486}
5487_ACEOF
5488 if ac_fn_c_try_compile "$LINENO"; then :
5489 break
5490fi
5491rm -f core conftest.err conftest.$ac_objext
5492 CC="$CC -n32"
5493 if ac_fn_c_try_compile "$LINENO"; then :
5494 ac_cv_sys_largefile_CC=' -n32'; break
5495fi
5496rm -f core conftest.err conftest.$ac_objext
5497 break
5498 done
5499 CC=$ac_save_CC
5500 rm -f conftest.$ac_ext
5501 fi
5502fi
5503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5504$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5505 if test "$ac_cv_sys_largefile_CC" != no; then
5506 CC=$CC$ac_cv_sys_largefile_CC
5507 fi
5508
5509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5510$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
d0ac1c44 5511if ${ac_cv_sys_file_offset_bits+:} false; then :
2196f55f
YQ
5512 $as_echo_n "(cached) " >&6
5513else
5514 while :; do
5515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5516/* end confdefs.h. */
5517#include <sys/types.h>
5518 /* Check that off_t can represent 2**63 - 1 correctly.
5519 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5520 since some C++ compilers masquerading as C compilers
5521 incorrectly reject 9223372036854775807. */
5522#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5523 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5524 && LARGE_OFF_T % 2147483647 == 1)
5525 ? 1 : -1];
5526int
5527main ()
5528{
5529
5530 ;
5531 return 0;
5532}
5533_ACEOF
5534if ac_fn_c_try_compile "$LINENO"; then :
5535 ac_cv_sys_file_offset_bits=no; break
5536fi
5537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5539/* end confdefs.h. */
5540#define _FILE_OFFSET_BITS 64
5541#include <sys/types.h>
5542 /* Check that off_t can represent 2**63 - 1 correctly.
5543 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5544 since some C++ compilers masquerading as C compilers
5545 incorrectly reject 9223372036854775807. */
5546#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5547 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5548 && LARGE_OFF_T % 2147483647 == 1)
5549 ? 1 : -1];
5550int
5551main ()
5552{
5553
5554 ;
5555 return 0;
5556}
5557_ACEOF
5558if ac_fn_c_try_compile "$LINENO"; then :
5559 ac_cv_sys_file_offset_bits=64; break
5560fi
5561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5562 ac_cv_sys_file_offset_bits=unknown
5563 break
5564done
5565fi
5566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5567$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5568case $ac_cv_sys_file_offset_bits in #(
5569 no | unknown) ;;
5570 *)
5571cat >>confdefs.h <<_ACEOF
5572#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5573_ACEOF
5574;;
5575esac
5576rm -rf conftest*
5577 if test $ac_cv_sys_file_offset_bits = unknown; then
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5579$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
d0ac1c44 5580if ${ac_cv_sys_large_files+:} false; then :
2196f55f
YQ
5581 $as_echo_n "(cached) " >&6
5582else
5583 while :; do
5584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5585/* end confdefs.h. */
5586#include <sys/types.h>
5587 /* Check that off_t can represent 2**63 - 1 correctly.
5588 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5589 since some C++ compilers masquerading as C compilers
5590 incorrectly reject 9223372036854775807. */
5591#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5592 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5593 && LARGE_OFF_T % 2147483647 == 1)
5594 ? 1 : -1];
5595int
5596main ()
5597{
5598
5599 ;
5600 return 0;
5601}
5602_ACEOF
5603if ac_fn_c_try_compile "$LINENO"; then :
5604 ac_cv_sys_large_files=no; break
5605fi
5606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5608/* end confdefs.h. */
5609#define _LARGE_FILES 1
5610#include <sys/types.h>
5611 /* Check that off_t can represent 2**63 - 1 correctly.
5612 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5613 since some C++ compilers masquerading as C compilers
5614 incorrectly reject 9223372036854775807. */
5615#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5616 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5617 && LARGE_OFF_T % 2147483647 == 1)
5618 ? 1 : -1];
5619int
5620main ()
5621{
5622
5623 ;
5624 return 0;
5625}
5626_ACEOF
5627if ac_fn_c_try_compile "$LINENO"; then :
5628 ac_cv_sys_large_files=1; break
5629fi
5630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5631 ac_cv_sys_large_files=unknown
5632 break
5633done
5634fi
5635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5636$as_echo "$ac_cv_sys_large_files" >&6; }
5637case $ac_cv_sys_large_files in #(
5638 no | unknown) ;;
5639 *)
5640cat >>confdefs.h <<_ACEOF
5641#define _LARGE_FILES $ac_cv_sys_large_files
5642_ACEOF
5643;;
5644esac
5645rm -rf conftest*
5646 fi
5647
5648
4a626d0a
PA
5649$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
5650
2196f55f
YQ
5651fi
5652
88b48903
WN
5653
5654
49e4877c
PA
5655 # Pre-early section.
5656
5657
5658
4a626d0a 5659 # Code from module absolute-header:
8690e634
JK
5660 # Code from module alloca:
5661 # Code from module alloca-opt:
6ec2e0f5
SDJ
5662 # Code from module assure:
5663 # Code from module at-internal:
98399780 5664 # Code from module canonicalize-lgpl:
6a29c58e 5665 # Code from module chdir:
6ec2e0f5
SDJ
5666 # Code from module chdir-long:
5667 # Code from module cloexec:
5668 # Code from module close:
5669 # Code from module closedir:
8690e634 5670 # Code from module configmake:
6ec2e0f5
SDJ
5671 # Code from module d-ino:
5672 # Code from module d-type:
e26b6bb0 5673 # Code from module dirent:
18848e28 5674 # Code from module dirfd:
6a29c58e 5675 # Code from module dirname-lgpl:
2196f55f 5676 # Code from module dosname:
6a29c58e 5677 # Code from module double-slash-root:
6ec2e0f5
SDJ
5678 # Code from module dup:
5679 # Code from module dup2:
3d99e817 5680 # Code from module environ:
18848e28 5681 # Code from module errno:
6ec2e0f5
SDJ
5682 # Code from module error:
5683 # Code from module exitfail:
c971b7fa 5684 # Code from module extensions:
a512b375 5685 # Code from module extern-inline:
6ec2e0f5
SDJ
5686 # Code from module fchdir:
5687 # Code from module fcntl:
5688 # Code from module fcntl-h:
5689 # Code from module fd-hook:
5690 # Code from module fdopendir:
5691 # Code from module filename:
5692 # Code from module filenamecat-lgpl:
49e4877c 5693 # Code from module flexmember:
88b48903 5694 # Code from module float:
8690e634
JK
5695 # Code from module fnmatch:
5696 # Code from module fnmatch-gnu:
88b48903
WN
5697 # Code from module fpieee:
5698
5699 # Code from module fpucw:
5700 # Code from module frexp:
5701 # Code from module frexpl:
6ec2e0f5
SDJ
5702 # Code from module fstat:
5703 # Code from module fstatat:
5704 # Code from module getcwd:
5705 # Code from module getcwd-lgpl:
5706 # Code from module getdtablesize:
5707 # Code from module getlogin_r:
5708 # Code from module getprogname:
5709 # Code from module gettext-h:
4a626d0a 5710 # Code from module gettimeofday:
6ec2e0f5 5711 # Code from module glob:
49e4877c 5712 # Code from module hard-locale:
c971b7fa 5713 # Code from module include_next:
6ec2e0f5 5714 # Code from module intprops:
c971b7fa
PA
5715 # Code from module inttypes:
5716 # Code from module inttypes-incomplete:
88b48903
WN
5717 # Code from module isnand-nolibm:
5718 # Code from module isnanl-nolibm:
2196f55f
YQ
5719 # Code from module largefile:
5720
49e4877c 5721 # Code from module limits-h:
8690e634 5722 # Code from module localcharset:
f45c62c4 5723 # Code from module lstat:
6a29c58e 5724 # Code from module malloc-posix:
98399780 5725 # Code from module malloca:
88b48903 5726 # Code from module math:
8690e634
JK
5727 # Code from module mbrtowc:
5728 # Code from module mbsinit:
5729 # Code from module mbsrtowcs:
c971b7fa
PA
5730 # Code from module memchr:
5731 # Code from module memmem:
5732 # Code from module memmem-simple:
6ec2e0f5
SDJ
5733 # Code from module mempcpy:
5734 # Code from module memrchr:
2d8adcbd 5735 # Code from module mkstemp:
6ec2e0f5
SDJ
5736 # Code from module msvc-inval:
5737 # Code from module msvc-nothrow:
c971b7fa 5738 # Code from module multiarch:
98399780 5739 # Code from module nocrash:
6ec2e0f5
SDJ
5740 # Code from module open:
5741 # Code from module openat:
5742 # Code from module openat-die:
5743 # Code from module openat-h:
5744 # Code from module opendir:
38ec2207 5745 # Code from module pathmax:
8424cc97 5746 # Code from module rawmemchr:
6ec2e0f5 5747 # Code from module readdir:
2196f55f 5748 # Code from module readlink:
6ec2e0f5 5749 # Code from module realloc-posix:
6a29c58e 5750 # Code from module rename:
6ec2e0f5 5751 # Code from module rewinddir:
6a29c58e
YQ
5752 # Code from module rmdir:
5753 # Code from module same-inode:
6ec2e0f5 5754 # Code from module save-cwd:
2d8adcbd 5755 # Code from module secure_getenv:
3d99e817 5756 # Code from module setenv:
0750520d 5757 # Code from module signal-h:
98399780 5758 # Code from module snippet/_Noreturn:
c971b7fa
PA
5759 # Code from module snippet/arg-nonnull:
5760 # Code from module snippet/c++defs:
5761 # Code from module snippet/warn-on-use:
8839a007 5762 # Code from module ssize_t:
2196f55f 5763 # Code from module stat:
8690e634 5764 # Code from module stdbool:
c971b7fa
PA
5765 # Code from module stddef:
5766 # Code from module stdint:
6a29c58e 5767 # Code from module stdio:
98399780 5768 # Code from module stdlib:
8424cc97 5769 # Code from module strchrnul:
6ec2e0f5 5770 # Code from module strdup-posix:
8690e634 5771 # Code from module streq:
6ec2e0f5
SDJ
5772 # Code from module strerror:
5773 # Code from module strerror-override:
c971b7fa 5774 # Code from module string:
8690e634 5775 # Code from module strnlen1:
63ce7108
TT
5776 # Code from module strstr:
5777 # Code from module strstr-simple:
421693b0 5778 # Code from module strtok_r:
09607c9e 5779 # Code from module sys_stat:
4a626d0a 5780 # Code from module sys_time:
8839a007 5781 # Code from module sys_types:
2d8adcbd 5782 # Code from module tempname:
09607c9e 5783 # Code from module time:
8839a007 5784 # Code from module unistd:
6ec2e0f5 5785 # Code from module unistd-safer:
3d99e817 5786 # Code from module unsetenv:
c971b7fa 5787 # Code from module update-copyright:
8690e634
JK
5788 # Code from module verify:
5789 # Code from module wchar:
5790 # Code from module wctype-h:
c971b7fa
PA
5791
5792ac_ext=c
5793ac_cpp='$CPP $CPPFLAGS'
5794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5796ac_compiler_gnu=$ac_cv_c_compiler_gnu
5797if test -n "$ac_tool_prefix"; then
5798 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5799set dummy ${ac_tool_prefix}gcc; ac_word=$2
5800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5801$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5802if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
5803 $as_echo_n "(cached) " >&6
5804else
5805 if test -n "$CC"; then
5806 ac_cv_prog_CC="$CC" # Let the user override the test.
5807else
5808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5809for as_dir in $PATH
5810do
5811 IFS=$as_save_IFS
5812 test -z "$as_dir" && as_dir=.
5813 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5815 ac_cv_prog_CC="${ac_tool_prefix}gcc"
5816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5817 break 2
5818 fi
5819done
5820 done
5821IFS=$as_save_IFS
5822
5823fi
5824fi
5825CC=$ac_cv_prog_CC
5826if test -n "$CC"; then
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5828$as_echo "$CC" >&6; }
5829else
5830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5831$as_echo "no" >&6; }
5832fi
5833
5834
5835fi
5836if test -z "$ac_cv_prog_CC"; then
5837 ac_ct_CC=$CC
5838 # Extract the first word of "gcc", so it can be a program name with args.
5839set dummy gcc; ac_word=$2
5840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5841$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5842if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
5843 $as_echo_n "(cached) " >&6
5844else
5845 if test -n "$ac_ct_CC"; then
5846 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5847else
5848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849for as_dir in $PATH
5850do
5851 IFS=$as_save_IFS
5852 test -z "$as_dir" && as_dir=.
5853 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5855 ac_cv_prog_ac_ct_CC="gcc"
5856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5857 break 2
5858 fi
5859done
5860 done
5861IFS=$as_save_IFS
5862
5863fi
5864fi
5865ac_ct_CC=$ac_cv_prog_ac_ct_CC
5866if test -n "$ac_ct_CC"; then
5867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5868$as_echo "$ac_ct_CC" >&6; }
5869else
5870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
5872fi
5873
5874 if test "x$ac_ct_CC" = x; then
5875 CC=""
5876 else
5877 case $cross_compiling:$ac_tool_warned in
5878yes:)
5879{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5880$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5881ac_tool_warned=yes ;;
5882esac
5883 CC=$ac_ct_CC
5884 fi
5885else
5886 CC="$ac_cv_prog_CC"
5887fi
5888
5889if test -z "$CC"; then
5890 if test -n "$ac_tool_prefix"; then
5891 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5892set dummy ${ac_tool_prefix}cc; ac_word=$2
5893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5894$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5895if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
5896 $as_echo_n "(cached) " >&6
5897else
5898 if test -n "$CC"; then
5899 ac_cv_prog_CC="$CC" # Let the user override the test.
5900else
5901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5902for as_dir in $PATH
5903do
5904 IFS=$as_save_IFS
5905 test -z "$as_dir" && as_dir=.
5906 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5907 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5908 ac_cv_prog_CC="${ac_tool_prefix}cc"
5909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5910 break 2
5911 fi
5912done
5913 done
5914IFS=$as_save_IFS
5915
5916fi
5917fi
5918CC=$ac_cv_prog_CC
5919if test -n "$CC"; then
5920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5921$as_echo "$CC" >&6; }
5922else
5923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5924$as_echo "no" >&6; }
5925fi
5926
5927
5928 fi
5929fi
5930if test -z "$CC"; then
5931 # Extract the first word of "cc", so it can be a program name with args.
5932set dummy cc; ac_word=$2
5933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5934$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5935if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
5936 $as_echo_n "(cached) " >&6
5937else
5938 if test -n "$CC"; then
5939 ac_cv_prog_CC="$CC" # Let the user override the test.
5940else
5941 ac_prog_rejected=no
5942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5943for as_dir in $PATH
5944do
5945 IFS=$as_save_IFS
5946 test -z "$as_dir" && as_dir=.
5947 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 5948 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
5949 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5950 ac_prog_rejected=yes
5951 continue
5952 fi
5953 ac_cv_prog_CC="cc"
5954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5955 break 2
5956 fi
5957done
5958 done
5959IFS=$as_save_IFS
5960
5961if test $ac_prog_rejected = yes; then
5962 # We found a bogon in the path, so make sure we never use it.
5963 set dummy $ac_cv_prog_CC
5964 shift
5965 if test $# != 0; then
5966 # We chose a different compiler from the bogus one.
5967 # However, it has the same basename, so the bogon will be chosen
5968 # first if we set CC to just the basename; use the full file name.
5969 shift
5970 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5971 fi
5972fi
5973fi
5974fi
5975CC=$ac_cv_prog_CC
5976if test -n "$CC"; then
5977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5978$as_echo "$CC" >&6; }
5979else
5980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5981$as_echo "no" >&6; }
5982fi
5983
5984
5985fi
5986if test -z "$CC"; then
5987 if test -n "$ac_tool_prefix"; then
5988 for ac_prog in cl.exe
5989 do
5990 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5991set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5993$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 5994if ${ac_cv_prog_CC+:} false; then :
c971b7fa
PA
5995 $as_echo_n "(cached) " >&6
5996else
5997 if test -n "$CC"; then
5998 ac_cv_prog_CC="$CC" # Let the user override the test.
5999else
6000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6001for as_dir in $PATH
6002do
6003 IFS=$as_save_IFS
6004 test -z "$as_dir" && as_dir=.
6005 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 6006 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
6007 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
6008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6009 break 2
6010 fi
6011done
6012 done
6013IFS=$as_save_IFS
6014
6015fi
6016fi
6017CC=$ac_cv_prog_CC
6018if test -n "$CC"; then
6019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6020$as_echo "$CC" >&6; }
6021else
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6023$as_echo "no" >&6; }
6024fi
6025
6026
6027 test -n "$CC" && break
6028 done
6029fi
6030if test -z "$CC"; then
6031 ac_ct_CC=$CC
6032 for ac_prog in cl.exe
6033do
6034 # Extract the first word of "$ac_prog", so it can be a program name with args.
6035set dummy $ac_prog; ac_word=$2
6036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6037$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 6038if ${ac_cv_prog_ac_ct_CC+:} false; then :
c971b7fa
PA
6039 $as_echo_n "(cached) " >&6
6040else
6041 if test -n "$ac_ct_CC"; then
6042 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
6043else
6044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6045for as_dir in $PATH
6046do
6047 IFS=$as_save_IFS
6048 test -z "$as_dir" && as_dir=.
6049 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 6050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
6051 ac_cv_prog_ac_ct_CC="$ac_prog"
6052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6053 break 2
6054 fi
6055done
6056 done
6057IFS=$as_save_IFS
6058
6059fi
6060fi
6061ac_ct_CC=$ac_cv_prog_ac_ct_CC
6062if test -n "$ac_ct_CC"; then
6063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
6064$as_echo "$ac_ct_CC" >&6; }
6065else
6066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6067$as_echo "no" >&6; }
6068fi
6069
6070
6071 test -n "$ac_ct_CC" && break
6072done
6073
6074 if test "x$ac_ct_CC" = x; then
6075 CC=""
6076 else
6077 case $cross_compiling:$ac_tool_warned in
6078yes:)
6079{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6080$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6081ac_tool_warned=yes ;;
6082esac
6083 CC=$ac_ct_CC
6084 fi
6085fi
6086
6087fi
6088
6089
6090test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
d0ac1c44
SM
6092as_fn_error $? "no acceptable C compiler found in \$PATH
6093See \`config.log' for more details" "$LINENO" 5; }
c971b7fa
PA
6094
6095# Provide some information about the compiler.
6096$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
6097set X $ac_compile
6098ac_compiler=$2
6099for ac_option in --version -v -V -qversion; do
6100 { { ac_try="$ac_compiler $ac_option >&5"
6101case "(($ac_try" in
6102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6103 *) ac_try_echo=$ac_try;;
6104esac
6105eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6106$as_echo "$ac_try_echo"; } >&5
6107 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6108 ac_status=$?
6109 if test -s conftest.err; then
6110 sed '10a\
6111... rest of stderr output deleted ...
6112 10q' conftest.err >conftest.er1
6113 cat conftest.er1 >&5
c971b7fa 6114 fi
d0ac1c44 6115 rm -f conftest.er1 conftest.err
c971b7fa
PA
6116 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6117 test $ac_status = 0; }
6118done
6119
6120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6121$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
d0ac1c44 6122if ${ac_cv_c_compiler_gnu+:} false; then :
c971b7fa
PA
6123 $as_echo_n "(cached) " >&6
6124else
6125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6126/* end confdefs.h. */
6127
6128int
6129main ()
6130{
6131#ifndef __GNUC__
6132 choke me
6133#endif
6134
6135 ;
6136 return 0;
6137}
6138_ACEOF
6139if ac_fn_c_try_compile "$LINENO"; then :
6140 ac_compiler_gnu=yes
6141else
6142 ac_compiler_gnu=no
6143fi
6144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6145ac_cv_c_compiler_gnu=$ac_compiler_gnu
6146
6147fi
6148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6149$as_echo "$ac_cv_c_compiler_gnu" >&6; }
6150if test $ac_compiler_gnu = yes; then
6151 GCC=yes
6152else
6153 GCC=
6154fi
6155ac_test_CFLAGS=${CFLAGS+set}
6156ac_save_CFLAGS=$CFLAGS
6157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6158$as_echo_n "checking whether $CC accepts -g... " >&6; }
d0ac1c44 6159if ${ac_cv_prog_cc_g+:} false; then :
c971b7fa
PA
6160 $as_echo_n "(cached) " >&6
6161else
6162 ac_save_c_werror_flag=$ac_c_werror_flag
6163 ac_c_werror_flag=yes
6164 ac_cv_prog_cc_g=no
6165 CFLAGS="-g"
6166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6167/* end confdefs.h. */
6168
6169int
6170main ()
6171{
6172
6173 ;
6174 return 0;
6175}
6176_ACEOF
6177if ac_fn_c_try_compile "$LINENO"; then :
6178 ac_cv_prog_cc_g=yes
6179else
6180 CFLAGS=""
6181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6182/* end confdefs.h. */
6183
6184int
6185main ()
6186{
6187
6188 ;
6189 return 0;
6190}
6191_ACEOF
6192if ac_fn_c_try_compile "$LINENO"; then :
6193
6194else
6195 ac_c_werror_flag=$ac_save_c_werror_flag
6196 CFLAGS="-g"
6197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6198/* end confdefs.h. */
6199
6200int
6201main ()
6202{
6203
6204 ;
6205 return 0;
6206}
6207_ACEOF
6208if ac_fn_c_try_compile "$LINENO"; then :
6209 ac_cv_prog_cc_g=yes
6210fi
6211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6212fi
6213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6214fi
6215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6216 ac_c_werror_flag=$ac_save_c_werror_flag
6217fi
6218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6219$as_echo "$ac_cv_prog_cc_g" >&6; }
6220if test "$ac_test_CFLAGS" = set; then
6221 CFLAGS=$ac_save_CFLAGS
6222elif test $ac_cv_prog_cc_g = yes; then
6223 if test "$GCC" = yes; then
6224 CFLAGS="-g -O2"
6225 else
6226 CFLAGS="-g"
6227 fi
6228else
6229 if test "$GCC" = yes; then
6230 CFLAGS="-O2"
6231 else
6232 CFLAGS=
6233 fi
6234fi
6235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6236$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
d0ac1c44 6237if ${ac_cv_prog_cc_c89+:} false; then :
c971b7fa
PA
6238 $as_echo_n "(cached) " >&6
6239else
6240 ac_cv_prog_cc_c89=no
6241ac_save_CC=$CC
6242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6243/* end confdefs.h. */
6244#include <stdarg.h>
6245#include <stdio.h>
d0ac1c44 6246struct stat;
c971b7fa
PA
6247/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6248struct buf { int x; };
6249FILE * (*rcsopen) (struct buf *, struct stat *, int);
6250static char *e (p, i)
6251 char **p;
6252 int i;
6253{
6254 return p[i];
6255}
6256static char *f (char * (*g) (char **, int), char **p, ...)
6257{
6258 char *s;
6259 va_list v;
6260 va_start (v,p);
6261 s = g (p, va_arg (v,int));
6262 va_end (v);
6263 return s;
6264}
6265
6266/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6267 function prototypes and stuff, but not '\xHH' hex character constants.
6268 These don't provoke an error unfortunately, instead are silently treated
6269 as 'x'. The following induces an error, until -std is added to get
6270 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6271 array size at least. It's necessary to write '\x00'==0 to get something
6272 that's true only with -std. */
6273int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6274
6275/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6276 inside strings and character constants. */
6277#define FOO(x) 'x'
6278int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6279
6280int test (int i, double x);
6281struct s1 {int (*f) (int a);};
6282struct s2 {int (*f) (double a);};
6283int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6284int argc;
6285char **argv;
6286int
6287main ()
6288{
6289return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6290 ;
6291 return 0;
6292}
6293_ACEOF
6294for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6295 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6296do
6297 CC="$ac_save_CC $ac_arg"
6298 if ac_fn_c_try_compile "$LINENO"; then :
6299 ac_cv_prog_cc_c89=$ac_arg
6300fi
6301rm -f core conftest.err conftest.$ac_objext
6302 test "x$ac_cv_prog_cc_c89" != "xno" && break
6303done
6304rm -f conftest.$ac_ext
6305CC=$ac_save_CC
6306
6307fi
6308# AC_CACHE_VAL
6309case "x$ac_cv_prog_cc_c89" in
6310 x)
6311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6312$as_echo "none needed" >&6; } ;;
6313 xno)
6314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6315$as_echo "unsupported" >&6; } ;;
6316 *)
6317 CC="$CC $ac_cv_prog_cc_c89"
6318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6319$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6320esac
6321if test "x$ac_cv_prog_cc_c89" != xno; then :
6322
6323fi
6324
6325ac_ext=c
6326ac_cpp='$CPP $CPPFLAGS'
6327ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6328ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6329ac_compiler_gnu=$ac_cv_c_compiler_gnu
6330
d0ac1c44
SM
6331ac_ext=c
6332ac_cpp='$CPP $CPPFLAGS'
6333ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6334ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6335ac_compiler_gnu=$ac_cv_c_compiler_gnu
6336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
6337$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
6338if ${am_cv_prog_cc_c_o+:} false; then :
6339 $as_echo_n "(cached) " >&6
6340else
6341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6342/* end confdefs.h. */
6343
6344int
6345main ()
6346{
6347
6348 ;
6349 return 0;
6350}
6351_ACEOF
6352 # Make sure it works both with $CC and with simple cc.
6353 # Following AC_PROG_CC_C_O, we do the test twice because some
6354 # compilers refuse to overwrite an existing .o file with -o,
6355 # though they will create one.
6356 am_cv_prog_cc_c_o=yes
6357 for am_i in 1 2; do
6358 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
6359 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
6360 ac_status=$?
6361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6362 (exit $ac_status); } \
6363 && test -f conftest2.$ac_objext; then
6364 : OK
6365 else
6366 am_cv_prog_cc_c_o=no
6367 break
6368 fi
6369 done
6370 rm -f core conftest*
6371 unset am_i
6372fi
6373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
6374$as_echo "$am_cv_prog_cc_c_o" >&6; }
6375if test "$am_cv_prog_cc_c_o" != yes; then
6376 # Losing compiler, so override with the script.
6377 # FIXME: It is wrong to rewrite CC.
6378 # But if we don't then we get into trouble of one sort or another.
6379 # A longer-term fix would be to have automake use am__CC in this case,
6380 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6381 CC="$am_aux_dir/compile $CC"
6382fi
6383ac_ext=c
6384ac_cpp='$CPP $CPPFLAGS'
6385ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6386ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6387ac_compiler_gnu=$ac_cv_c_compiler_gnu
6388
c971b7fa
PA
6389
6390am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6391
6392
6393ac_aux_dir=
6394for ac_dir in ../.. "$srcdir"/../..; do
d0ac1c44
SM
6395 if test -f "$ac_dir/install-sh"; then
6396 ac_aux_dir=$ac_dir
6397 ac_install_sh="$ac_aux_dir/install-sh -c"
6398 break
6399 elif test -f "$ac_dir/install.sh"; then
6400 ac_aux_dir=$ac_dir
6401 ac_install_sh="$ac_aux_dir/install.sh -c"
6402 break
6403 elif test -f "$ac_dir/shtool"; then
6404 ac_aux_dir=$ac_dir
6405 ac_install_sh="$ac_aux_dir/shtool install -c"
6406 break
6407 fi
c971b7fa
PA
6408done
6409if test -z "$ac_aux_dir"; then
d0ac1c44 6410 as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../.. \"$srcdir\"/../.." "$LINENO" 5
c971b7fa
PA
6411fi
6412
6413# These three variables are undocumented and unsupported,
6414# and are intended to be withdrawn in a future Autoconf release.
6415# They can cause serious problems if a builder's source tree is in a directory
6416# whose full name contains unusual characters.
6417ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6418ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6419ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6420
6421
6422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6423$as_echo_n "checking target system type... " >&6; }
d0ac1c44 6424if ${ac_cv_target+:} false; then :
c971b7fa
PA
6425 $as_echo_n "(cached) " >&6
6426else
6427 if test "x$target_alias" = x; then
6428 ac_cv_target=$ac_cv_host
6429else
6430 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
d0ac1c44 6431 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
c971b7fa
PA
6432fi
6433
6434fi
6435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6436$as_echo "$ac_cv_target" >&6; }
6437case $ac_cv_target in
6438*-*-*) ;;
d0ac1c44 6439*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
c971b7fa
PA
6440esac
6441target=$ac_cv_target
6442ac_save_IFS=$IFS; IFS='-'
6443set x $ac_cv_target
6444shift
6445target_cpu=$1
6446target_vendor=$2
6447shift; shift
6448# Remember, the first character of IFS is used to create $*,
6449# except with old shells:
6450target_os=$*
6451IFS=$ac_save_IFS
6452case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6453
6454
6455# The aliases save the names the user supplied, while $host etc.
6456# will get canonicalized.
6457test -n "$target_alias" &&
6458 test "$program_prefix$program_suffix$program_transform_name" = \
6459 NONENONEs,x,x, &&
6460 program_prefix=${target_alias}-
6461
6462
6463
6464
6465
6466
6467
6468 LIBC_FATAL_STDERR_=1
6469 export LIBC_FATAL_STDERR_
6470
d0ac1c44
SM
6471ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6472if test "x$ac_cv_type_size_t" = xyes; then :
6473
6474else
6475
6476cat >>confdefs.h <<_ACEOF
6477#define size_t unsigned int
6478_ACEOF
6479
6480fi
6481
8690e634
JK
6482# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6483# for constant arguments. Useless!
6484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6485$as_echo_n "checking for working alloca.h... " >&6; }
d0ac1c44 6486if ${ac_cv_working_alloca_h+:} false; then :
c971b7fa
PA
6487 $as_echo_n "(cached) " >&6
6488else
8690e634 6489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6490/* end confdefs.h. */
8690e634 6491#include <alloca.h>
c971b7fa
PA
6492int
6493main ()
6494{
8690e634
JK
6495char *p = (char *) alloca (2 * sizeof (int));
6496 if (p) return 0;
c971b7fa
PA
6497 ;
6498 return 0;
6499}
c971b7fa
PA
6500_ACEOF
6501if ac_fn_c_try_link "$LINENO"; then :
8690e634 6502 ac_cv_working_alloca_h=yes
c971b7fa 6503else
8690e634 6504 ac_cv_working_alloca_h=no
c971b7fa
PA
6505fi
6506rm -f core conftest.err conftest.$ac_objext \
6507 conftest$ac_exeext conftest.$ac_ext
c971b7fa 6508fi
8690e634
JK
6509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6510$as_echo "$ac_cv_working_alloca_h" >&6; }
6511if test $ac_cv_working_alloca_h = yes; then
c971b7fa 6512
8690e634 6513$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
c971b7fa 6514
8690e634 6515fi
c971b7fa 6516
8690e634
JK
6517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6518$as_echo_n "checking for alloca... " >&6; }
d0ac1c44 6519if ${ac_cv_func_alloca_works+:} false; then :
c971b7fa 6520 $as_echo_n "(cached) " >&6
c971b7fa
PA
6521else
6522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6523/* end confdefs.h. */
8690e634
JK
6524#ifdef __GNUC__
6525# define alloca __builtin_alloca
6526#else
6527# ifdef _MSC_VER
6528# include <malloc.h>
6529# define alloca _alloca
6530# else
6531# ifdef HAVE_ALLOCA_H
6532# include <alloca.h>
6533# else
6534# ifdef _AIX
6535 #pragma alloca
6536# else
6537# ifndef alloca /* predefined by HP cc +Olibcalls */
d0ac1c44 6538void *alloca (size_t);
8690e634
JK
6539# endif
6540# endif
6541# endif
6542# endif
6543#endif
6544
c971b7fa
PA
6545int
6546main ()
6547{
8690e634
JK
6548char *p = (char *) alloca (1);
6549 if (p) return 0;
c971b7fa
PA
6550 ;
6551 return 0;
6552}
6553_ACEOF
8690e634
JK
6554if ac_fn_c_try_link "$LINENO"; then :
6555 ac_cv_func_alloca_works=yes
c971b7fa 6556else
8690e634 6557 ac_cv_func_alloca_works=no
c971b7fa 6558fi
8690e634
JK
6559rm -f core conftest.err conftest.$ac_objext \
6560 conftest$ac_exeext conftest.$ac_ext
c971b7fa 6561fi
a143c6de
JB
6562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6563$as_echo "$ac_cv_func_alloca_works" >&6; }
c971b7fa 6564
a143c6de 6565if test $ac_cv_func_alloca_works = yes; then
c971b7fa 6566
a143c6de 6567$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
c971b7fa 6568
a143c6de
JB
6569else
6570 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6571# that cause trouble. Some versions do not even contain alloca or
6572# contain a buggy version. If you still want to use their alloca,
6573# use ar to extract alloca.o from them instead of compiling alloca.c.
c971b7fa
PA
6574
6575
6576
6577
6578
a143c6de 6579ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
c971b7fa 6580
a143c6de 6581$as_echo "#define C_ALLOCA 1" >>confdefs.h
c971b7fa 6582
c971b7fa 6583
d0ac1c44
SM
6584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
6585$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
6586if ${ac_cv_os_cray+:} false; then :
8690e634
JK
6587 $as_echo_n "(cached) " >&6
6588else
a143c6de 6589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 6590/* end confdefs.h. */
a143c6de
JB
6591#if defined CRAY && ! defined CRAY2
6592webecray
6593#else
6594wenotbecray
8690e634 6595#endif
c971b7fa 6596
8690e634
JK
6597_ACEOF
6598if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
a143c6de
JB
6599 $EGREP "webecray" >/dev/null 2>&1; then :
6600 ac_cv_os_cray=yes
8690e634 6601else
a143c6de 6602 ac_cv_os_cray=no
8690e634
JK
6603fi
6604rm -f conftest*
c971b7fa 6605
c0fc7f8b 6606fi
a143c6de
JB
6607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6608$as_echo "$ac_cv_os_cray" >&6; }
6609if test $ac_cv_os_cray = yes; then
6610 for ac_func in _getb67 GETB67 getb67; do
6611 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6612ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6613if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
c0fc7f8b 6614
a143c6de
JB
6615cat >>confdefs.h <<_ACEOF
6616#define CRAY_STACKSEG_END $ac_func
6617_ACEOF
c971b7fa 6618
a143c6de 6619 break
8690e634 6620fi
c971b7fa 6621
a143c6de 6622 done
8690e634 6623fi
c0fc7f8b 6624
a143c6de
JB
6625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6626$as_echo_n "checking stack direction for C alloca... " >&6; }
d0ac1c44 6627if ${ac_cv_c_stack_direction+:} false; then :
c971b7fa
PA
6628 $as_echo_n "(cached) " >&6
6629else
a143c6de
JB
6630 if test "$cross_compiling" = yes; then :
6631 ac_cv_c_stack_direction=0
6632else
6633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 6634/* end confdefs.h. */
a143c6de
JB
6635$ac_includes_default
6636int
6637find_stack_direction (int *addr, int depth)
6638{
6639 int dir, dummy = 0;
6640 if (! addr)
6641 addr = &dummy;
6642 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6643 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6644 return dir + dummy;
6645}
8690e634 6646
a143c6de
JB
6647int
6648main (int argc, char **argv)
6649{
6650 return find_stack_direction (0, argc + !argv + 20) < 0;
6651}
c971b7fa 6652_ACEOF
a143c6de
JB
6653if ac_fn_c_try_run "$LINENO"; then :
6654 ac_cv_c_stack_direction=1
c971b7fa 6655else
a143c6de 6656 ac_cv_c_stack_direction=-1
8690e634 6657fi
a143c6de
JB
6658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6659 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 6660fi
c971b7fa
PA
6661
6662fi
a143c6de
JB
6663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6664$as_echo "$ac_cv_c_stack_direction" >&6; }
6665cat >>confdefs.h <<_ACEOF
6666#define STACK_DIRECTION $ac_cv_c_stack_direction
6667_ACEOF
8690e634 6668
c971b7fa
PA
6669
6670fi
c971b7fa
PA
6671
6672
98399780
YQ
6673 GNULIB__EXIT=0;
6674 GNULIB_ATOLL=0;
6675 GNULIB_CALLOC_POSIX=0;
6676 GNULIB_CANONICALIZE_FILE_NAME=0;
6677 GNULIB_GETLOADAVG=0;
6678 GNULIB_GETSUBOPT=0;
6679 GNULIB_GRANTPT=0;
6680 GNULIB_MALLOC_POSIX=0;
6681 GNULIB_MBTOWC=0;
6682 GNULIB_MKDTEMP=0;
6683 GNULIB_MKOSTEMP=0;
6684 GNULIB_MKOSTEMPS=0;
6685 GNULIB_MKSTEMP=0;
6686 GNULIB_MKSTEMPS=0;
6687 GNULIB_POSIX_OPENPT=0;
6688 GNULIB_PTSNAME=0;
6689 GNULIB_PTSNAME_R=0;
6690 GNULIB_PUTENV=0;
4a626d0a 6691 GNULIB_QSORT_R=0;
98399780
YQ
6692 GNULIB_RANDOM=0;
6693 GNULIB_RANDOM_R=0;
6694 GNULIB_REALLOC_POSIX=0;
6695 GNULIB_REALPATH=0;
6696 GNULIB_RPMATCH=0;
4a626d0a 6697 GNULIB_SECURE_GETENV=0;
98399780
YQ
6698 GNULIB_SETENV=0;
6699 GNULIB_STRTOD=0;
6700 GNULIB_STRTOLL=0;
6701 GNULIB_STRTOULL=0;
6702 GNULIB_SYSTEM_POSIX=0;
6703 GNULIB_UNLOCKPT=0;
6704 GNULIB_UNSETENV=0;
6705 GNULIB_WCTOMB=0;
6706 HAVE__EXIT=1;
6707 HAVE_ATOLL=1;
6708 HAVE_CANONICALIZE_FILE_NAME=1;
6709 HAVE_DECL_GETLOADAVG=1;
6710 HAVE_GETSUBOPT=1;
6711 HAVE_GRANTPT=1;
6712 HAVE_MKDTEMP=1;
6713 HAVE_MKOSTEMP=1;
6714 HAVE_MKOSTEMPS=1;
6715 HAVE_MKSTEMP=1;
6716 HAVE_MKSTEMPS=1;
6717 HAVE_POSIX_OPENPT=1;
6718 HAVE_PTSNAME=1;
6719 HAVE_PTSNAME_R=1;
4c62b19f 6720 HAVE_QSORT_R=1;
98399780
YQ
6721 HAVE_RANDOM=1;
6722 HAVE_RANDOM_H=1;
6723 HAVE_RANDOM_R=1;
6724 HAVE_REALPATH=1;
6725 HAVE_RPMATCH=1;
4a626d0a 6726 HAVE_SECURE_GETENV=1;
98399780
YQ
6727 HAVE_SETENV=1;
6728 HAVE_DECL_SETENV=1;
6729 HAVE_STRTOD=1;
6730 HAVE_STRTOLL=1;
6731 HAVE_STRTOULL=1;
6732 HAVE_STRUCT_RANDOM_DATA=1;
6733 HAVE_SYS_LOADAVG_H=0;
6734 HAVE_UNLOCKPT=1;
6735 HAVE_DECL_UNSETENV=1;
6736 REPLACE_CALLOC=0;
6737 REPLACE_CANONICALIZE_FILE_NAME=0;
6738 REPLACE_MALLOC=0;
6739 REPLACE_MBTOWC=0;
6740 REPLACE_MKSTEMP=0;
6741 REPLACE_PTSNAME=0;
6742 REPLACE_PTSNAME_R=0;
6743 REPLACE_PUTENV=0;
4a626d0a 6744 REPLACE_QSORT_R=0;
98399780
YQ
6745 REPLACE_RANDOM_R=0;
6746 REPLACE_REALLOC=0;
6747 REPLACE_REALPATH=0;
6748 REPLACE_SETENV=0;
6749 REPLACE_STRTOD=0;
6750 REPLACE_UNSETENV=0;
6751 REPLACE_WCTOMB=0;
6752
6753
6754
6755
472fa5ee
SM
6756
6757 for ac_func in $gl_func_list
98399780
YQ
6758do :
6759 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6760ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
d0ac1c44 6761if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
98399780
YQ
6762 cat >>confdefs.h <<_ACEOF
6763#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6764_ACEOF
6765
6766fi
6767done
6768
6769
6770
6771
6772
6773
6774
6775
6776
472fa5ee
SM
6777
6778
6779
6780
6781
6782
6783
6784
98399780
YQ
6785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
6786$as_echo_n "checking whether // is distinct from /... " >&6; }
d0ac1c44 6787if ${gl_cv_double_slash_root+:} false; then :
98399780
YQ
6788 $as_echo_n "(cached) " >&6
6789else
6790 if test x"$cross_compiling" = xyes ; then
6791 # When cross-compiling, there is no way to tell whether // is special
6792 # short of a list of hosts. However, the only known hosts to date
6793 # that have a distinct // are Apollo DomainOS (too old to port to),
6794 # Cygwin, and z/OS. If anyone knows of another system for which // has
6795 # special semantics and is distinct from /, please report it to
6796 # <bug-gnulib@gnu.org>.
6797 case $host in
6798 *-cygwin | i370-ibm-openedition)
6799 gl_cv_double_slash_root=yes ;;
6800 *)
6801 # Be optimistic and assume that / and // are the same when we
6802 # don't know.
6803 gl_cv_double_slash_root='unknown, assuming no' ;;
6804 esac
6805 else
6806 set x `ls -di / // 2>/dev/null`
6807 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
6808 gl_cv_double_slash_root=no
6809 else
6810 gl_cv_double_slash_root=yes
6811 fi
6812 fi
6813fi
6814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
6815$as_echo "$gl_cv_double_slash_root" >&6; }
6816 if test "$gl_cv_double_slash_root" = yes; then
6817
6818$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6819
6820 fi
6821
6822
6823
6824
6825
472fa5ee
SM
6826
6827
6828
6829 :
6830
6831
6832
6833
6834
98399780
YQ
6835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
6836$as_echo_n "checking whether realpath works... " >&6; }
d0ac1c44 6837if ${gl_cv_func_realpath_works+:} false; then :
98399780
YQ
6838 $as_echo_n "(cached) " >&6
6839else
6840
6841 touch conftest.a
6842 mkdir conftest.d
6843 if test "$cross_compiling" = yes; then :
6844 case "$host_os" in
6845 # Guess yes on glibc systems.
6846 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
6847 # If we don't know, assume the worst.
6848 *) gl_cv_func_realpath_works="guessing no" ;;
6849 esac
6850
6851else
6852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6853/* end confdefs.h. */
6854
6855
6856
6857#include <stdlib.h>
6858#if defined __MACH__ && defined __APPLE__
6859/* Avoid a crash on Mac OS X. */
6860#include <mach/mach.h>
6861#include <mach/mach_error.h>
6862#include <mach/thread_status.h>
6863#include <mach/exception.h>
6864#include <mach/task.h>
6865#include <pthread.h>
6866/* The exception port on which our thread listens. */
6867static mach_port_t our_exception_port;
6868/* The main function of the thread listening for exceptions of type
6869 EXC_BAD_ACCESS. */
6870static void *
6871mach_exception_thread (void *arg)
6872{
6873 /* Buffer for a message to be received. */
6874 struct {
6875 mach_msg_header_t head;
6876 mach_msg_body_t msgh_body;
6877 char data[1024];
6878 } msg;
6879 mach_msg_return_t retval;
6880 /* Wait for a message on the exception port. */
6881 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
6882 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
6883 if (retval != MACH_MSG_SUCCESS)
6884 abort ();
6885 exit (1);
6886}
6887static void
6888nocrash_init (void)
6889{
6890 mach_port_t self = mach_task_self ();
6891 /* Allocate a port on which the thread shall listen for exceptions. */
6892 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
6893 == KERN_SUCCESS) {
6894 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
6895 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
6896 MACH_MSG_TYPE_MAKE_SEND)
6897 == KERN_SUCCESS) {
6898 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
6899 for us. */
6900 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
6901 /* Create the thread listening on the exception port. */
6902 pthread_attr_t attr;
6903 pthread_t thread;
6904 if (pthread_attr_init (&attr) == 0
6905 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
6906 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
6907 pthread_attr_destroy (&attr);
6908 /* Replace the exception port info for these exceptions with our own.
6909 Note that we replace the exception port for the entire task, not only
6910 for a particular thread. This has the effect that when our exception
6911 port gets the message, the thread specific exception port has already
6912 been asked, and we don't need to bother about it.
6913 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
6914 task_set_exception_ports (self, mask, our_exception_port,
6915 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
6916 }
6917 }
6918 }
6919}
6920#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6921/* Avoid a crash on native Windows. */
6922#define WIN32_LEAN_AND_MEAN
6923#include <windows.h>
6924#include <winerror.h>
6925static LONG WINAPI
6926exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
6927{
6928 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
6929 {
6930 case EXCEPTION_ACCESS_VIOLATION:
6931 case EXCEPTION_IN_PAGE_ERROR:
6932 case EXCEPTION_STACK_OVERFLOW:
6933 case EXCEPTION_GUARD_PAGE:
6934 case EXCEPTION_PRIV_INSTRUCTION:
6935 case EXCEPTION_ILLEGAL_INSTRUCTION:
6936 case EXCEPTION_DATATYPE_MISALIGNMENT:
6937 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
6938 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
6939 exit (1);
6940 }
6941 return EXCEPTION_CONTINUE_SEARCH;
6942}
6943static void
6944nocrash_init (void)
6945{
6946 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
6947}
6948#else
6949/* Avoid a crash on POSIX systems. */
6950#include <signal.h>
49e4877c 6951#include <unistd.h>
98399780
YQ
6952/* A POSIX signal handler. */
6953static void
6954exception_handler (int sig)
6955{
49e4877c 6956 _exit (1);
98399780
YQ
6957}
6958static void
6959nocrash_init (void)
6960{
6961#ifdef SIGSEGV
6962 signal (SIGSEGV, exception_handler);
6963#endif
6964#ifdef SIGBUS
6965 signal (SIGBUS, exception_handler);
6966#endif
6967}
6968#endif
6969
6970 #include <stdlib.h>
6971 #include <string.h>
6972
6973int
6974main ()
6975{
6976
6977 int result = 0;
6978 {
6979 char *name = realpath ("conftest.a", NULL);
6980 if (!(name && *name == '/'))
6981 result |= 1;
49e4877c 6982 free (name);
98399780
YQ
6983 }
6984 {
6985 char *name = realpath ("conftest.b/../conftest.a", NULL);
6986 if (name != NULL)
6987 result |= 2;
49e4877c 6988 free (name);
98399780
YQ
6989 }
6990 {
6991 char *name = realpath ("conftest.a/", NULL);
6992 if (name != NULL)
6993 result |= 4;
49e4877c 6994 free (name);
98399780
YQ
6995 }
6996 {
6997 char *name1 = realpath (".", NULL);
6998 char *name2 = realpath ("conftest.d//./..", NULL);
49e4877c 6999 if (! name1 || ! name2 || strcmp (name1, name2))
98399780 7000 result |= 8;
49e4877c
PA
7001 free (name1);
7002 free (name2);
98399780
YQ
7003 }
7004 return result;
7005
7006 ;
7007 return 0;
7008}
7009
7010_ACEOF
7011if ac_fn_c_try_run "$LINENO"; then :
7012 gl_cv_func_realpath_works=yes
7013else
7014 gl_cv_func_realpath_works=no
7015fi
7016rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7017 conftest.$ac_objext conftest.beam conftest.$ac_ext
7018fi
7019
7020 rm -rf conftest.a conftest.d
7021
7022fi
7023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
7024$as_echo "$gl_cv_func_realpath_works" >&6; }
7025 case "$gl_cv_func_realpath_works" in
7026 *yes)
7027
7028$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
7029
7030 ;;
7031 esac
7032
7033
7034
7035
472fa5ee
SM
7036
7037 for ac_header in $gl_header_list
98399780
YQ
7038do :
7039 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
472fa5ee 7040ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 7041if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
98399780
YQ
7042 cat >>confdefs.h <<_ACEOF
7043#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7044_ACEOF
7045
7046fi
7047
7048done
7049
7050
7051
7052
7053
7054
7055
7056
472fa5ee
SM
7057 :
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072 :
7073
7074
7075
7076
98399780
YQ
7077
7078
7079
e26b6bb0
TT
7080 GNULIB_CHDIR=0;
7081 GNULIB_CHOWN=0;
7082 GNULIB_CLOSE=0;
7083 GNULIB_DUP=0;
7084 GNULIB_DUP2=0;
7085 GNULIB_DUP3=0;
7086 GNULIB_ENVIRON=0;
7087 GNULIB_EUIDACCESS=0;
7088 GNULIB_FACCESSAT=0;
7089 GNULIB_FCHDIR=0;
7090 GNULIB_FCHOWNAT=0;
7091 GNULIB_FDATASYNC=0;
7092 GNULIB_FSYNC=0;
7093 GNULIB_FTRUNCATE=0;
7094 GNULIB_GETCWD=0;
7095 GNULIB_GETDOMAINNAME=0;
7096 GNULIB_GETDTABLESIZE=0;
7097 GNULIB_GETGROUPS=0;
7098 GNULIB_GETHOSTNAME=0;
7099 GNULIB_GETLOGIN=0;
7100 GNULIB_GETLOGIN_R=0;
7101 GNULIB_GETPAGESIZE=0;
7102 GNULIB_GETUSERSHELL=0;
7103 GNULIB_GROUP_MEMBER=0;
7104 GNULIB_ISATTY=0;
7105 GNULIB_LCHOWN=0;
7106 GNULIB_LINK=0;
7107 GNULIB_LINKAT=0;
7108 GNULIB_LSEEK=0;
7109 GNULIB_PIPE=0;
7110 GNULIB_PIPE2=0;
7111 GNULIB_PREAD=0;
7112 GNULIB_PWRITE=0;
7113 GNULIB_READ=0;
7114 GNULIB_READLINK=0;
7115 GNULIB_READLINKAT=0;
7116 GNULIB_RMDIR=0;
7117 GNULIB_SETHOSTNAME=0;
7118 GNULIB_SLEEP=0;
7119 GNULIB_SYMLINK=0;
7120 GNULIB_SYMLINKAT=0;
7121 GNULIB_TTYNAME_R=0;
7122 GNULIB_UNISTD_H_NONBLOCKING=0;
7123 GNULIB_UNISTD_H_SIGPIPE=0;
7124 GNULIB_UNLINK=0;
7125 GNULIB_UNLINKAT=0;
7126 GNULIB_USLEEP=0;
7127 GNULIB_WRITE=0;
7128 HAVE_CHOWN=1;
7129 HAVE_DUP2=1;
7130 HAVE_DUP3=1;
7131 HAVE_EUIDACCESS=1;
7132 HAVE_FACCESSAT=1;
7133 HAVE_FCHDIR=1;
7134 HAVE_FCHOWNAT=1;
7135 HAVE_FDATASYNC=1;
7136 HAVE_FSYNC=1;
7137 HAVE_FTRUNCATE=1;
7138 HAVE_GETDTABLESIZE=1;
7139 HAVE_GETGROUPS=1;
7140 HAVE_GETHOSTNAME=1;
7141 HAVE_GETLOGIN=1;
7142 HAVE_GETPAGESIZE=1;
7143 HAVE_GROUP_MEMBER=1;
7144 HAVE_LCHOWN=1;
7145 HAVE_LINK=1;
7146 HAVE_LINKAT=1;
7147 HAVE_PIPE=1;
7148 HAVE_PIPE2=1;
7149 HAVE_PREAD=1;
7150 HAVE_PWRITE=1;
7151 HAVE_READLINK=1;
7152 HAVE_READLINKAT=1;
7153 HAVE_SETHOSTNAME=1;
7154 HAVE_SLEEP=1;
7155 HAVE_SYMLINK=1;
7156 HAVE_SYMLINKAT=1;
7157 HAVE_UNLINKAT=1;
7158 HAVE_USLEEP=1;
7159 HAVE_DECL_ENVIRON=1;
7160 HAVE_DECL_FCHDIR=1;
7161 HAVE_DECL_FDATASYNC=1;
7162 HAVE_DECL_GETDOMAINNAME=1;
7163 HAVE_DECL_GETLOGIN_R=1;
7164 HAVE_DECL_GETPAGESIZE=1;
7165 HAVE_DECL_GETUSERSHELL=1;
7166 HAVE_DECL_SETHOSTNAME=1;
7167 HAVE_DECL_TTYNAME_R=1;
7168 HAVE_OS_H=0;
7169 HAVE_SYS_PARAM_H=0;
7170 REPLACE_CHOWN=0;
7171 REPLACE_CLOSE=0;
7172 REPLACE_DUP=0;
7173 REPLACE_DUP2=0;
7174 REPLACE_FCHOWNAT=0;
7175 REPLACE_FTRUNCATE=0;
7176 REPLACE_GETCWD=0;
7177 REPLACE_GETDOMAINNAME=0;
4a626d0a 7178 REPLACE_GETDTABLESIZE=0;
e26b6bb0
TT
7179 REPLACE_GETLOGIN_R=0;
7180 REPLACE_GETGROUPS=0;
7181 REPLACE_GETPAGESIZE=0;
7182 REPLACE_ISATTY=0;
7183 REPLACE_LCHOWN=0;
7184 REPLACE_LINK=0;
7185 REPLACE_LINKAT=0;
7186 REPLACE_LSEEK=0;
7187 REPLACE_PREAD=0;
7188 REPLACE_PWRITE=0;
7189 REPLACE_READ=0;
7190 REPLACE_READLINK=0;
4a626d0a 7191 REPLACE_READLINKAT=0;
e26b6bb0
TT
7192 REPLACE_RMDIR=0;
7193 REPLACE_SLEEP=0;
7194 REPLACE_SYMLINK=0;
4a626d0a 7195 REPLACE_SYMLINKAT=0;
e26b6bb0
TT
7196 REPLACE_TTYNAME_R=0;
7197 REPLACE_UNLINK=0;
7198 REPLACE_UNLINKAT=0;
7199 REPLACE_USLEEP=0;
7200 REPLACE_WRITE=0;
7201 UNISTD_H_HAVE_WINSOCK2_H=0;
7202 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7203
7204
7205
6ec2e0f5
SDJ
7206
7207
7208
7209
7210
7211
472fa5ee
SM
7212 :
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229 :
7230
7231
7232
6ec2e0f5
SDJ
7233
7234
7235 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7236 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7237
7238$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7239
7240 else
7241 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7242 fi
7243
7244
7245
7246
7247
7248
7249
472fa5ee
SM
7250
7251
7252
7253
7254
7255
e26b6bb0
TT
7256 GNULIB_OPENDIR=0;
7257 GNULIB_READDIR=0;
7258 GNULIB_REWINDDIR=0;
7259 GNULIB_CLOSEDIR=0;
7260 GNULIB_DIRFD=0;
7261 GNULIB_FDOPENDIR=0;
7262 GNULIB_SCANDIR=0;
7263 GNULIB_ALPHASORT=0;
7264 HAVE_OPENDIR=1;
7265 HAVE_READDIR=1;
7266 HAVE_REWINDDIR=1;
7267 HAVE_CLOSEDIR=1;
7268 HAVE_DECL_DIRFD=1;
7269 HAVE_DECL_FDOPENDIR=1;
7270 HAVE_FDOPENDIR=1;
7271 HAVE_SCANDIR=1;
7272 HAVE_ALPHASORT=1;
7273 REPLACE_OPENDIR=0;
7274 REPLACE_CLOSEDIR=0;
7275 REPLACE_DIRFD=0;
7276 REPLACE_FDOPENDIR=0;
7277
7278
7279
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7281$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
d0ac1c44 7282if ${gl_cv_have_include_next+:} false; then :
e26b6bb0
TT
7283 $as_echo_n "(cached) " >&6
7284else
7285 rm -rf conftestd1a conftestd1b conftestd2
7286 mkdir conftestd1a conftestd1b conftestd2
7287 cat <<EOF > conftestd1a/conftest.h
7288#define DEFINED_IN_CONFTESTD1
7289#include_next <conftest.h>
7290#ifdef DEFINED_IN_CONFTESTD2
7291int foo;
7292#else
88b48903
WN
7293#error "include_next doesn't work"
7294#endif
7295EOF
7296 cat <<EOF > conftestd1b/conftest.h
7297#define DEFINED_IN_CONFTESTD1
7298#include <stdio.h>
7299#include_next <conftest.h>
7300#ifdef DEFINED_IN_CONFTESTD2
7301int foo;
7302#else
7303#error "include_next doesn't work"
7304#endif
7305EOF
7306 cat <<EOF > conftestd2/conftest.h
7307#ifndef DEFINED_IN_CONFTESTD1
7308#error "include_next test doesn't work"
7309#endif
7310#define DEFINED_IN_CONFTESTD2
7311EOF
7312 gl_save_CPPFLAGS="$CPPFLAGS"
7313 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7315/* end confdefs.h. */
7316#include <conftest.h>
7317_ACEOF
7318if ac_fn_c_try_compile "$LINENO"; then :
7319 gl_cv_have_include_next=yes
7320else
7321 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7323/* end confdefs.h. */
7324#include <conftest.h>
7325_ACEOF
7326if ac_fn_c_try_compile "$LINENO"; then :
7327 gl_cv_have_include_next=buggy
7328else
7329 gl_cv_have_include_next=no
7330fi
7331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7332
7333fi
7334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7335 CPPFLAGS="$gl_save_CPPFLAGS"
7336 rm -rf conftestd1a conftestd1b conftestd2
7337
7338fi
7339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7340$as_echo "$gl_cv_have_include_next" >&6; }
7341 PRAGMA_SYSTEM_HEADER=
7342 if test $gl_cv_have_include_next = yes; then
7343 INCLUDE_NEXT=include_next
7344 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7345 if test -n "$GCC"; then
7346 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7347 fi
7348 else
7349 if test $gl_cv_have_include_next = buggy; then
7350 INCLUDE_NEXT=include
7351 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7352 else
7353 INCLUDE_NEXT=include
7354 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7355 fi
7356 fi
7357
7358
7359
7360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7361$as_echo_n "checking whether system header files limit the line length... " >&6; }
d0ac1c44 7362if ${gl_cv_pragma_columns+:} false; then :
88b48903
WN
7363 $as_echo_n "(cached) " >&6
7364else
7365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7366/* end confdefs.h. */
7367
7368#ifdef __TANDEM
7369choke me
7370#endif
7371
7372_ACEOF
7373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7374 $EGREP "choke me" >/dev/null 2>&1; then :
7375 gl_cv_pragma_columns=yes
7376else
7377 gl_cv_pragma_columns=no
7378fi
7379rm -f conftest*
7380
7381
7382fi
7383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7384$as_echo "$gl_cv_pragma_columns" >&6; }
7385 if test $gl_cv_pragma_columns = yes; then
7386 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7387 else
7388 PRAGMA_COLUMNS=
7389 fi
7390
7391
7392
7393
e26b6bb0 7394
e26b6bb0 7395
3d99e817
AK
7396
7397
7398
7399
7400
472fa5ee
SM
7401
7402 :
7403
7404
7405
7406
7407
7408
7409
3d99e817
AK
7410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
7411$as_echo_n "checking if environ is properly declared... " >&6; }
d0ac1c44 7412 if ${gt_cv_var_environ_declaration+:} false; then :
3d99e817
AK
7413 $as_echo_n "(cached) " >&6
7414else
7415
7416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7417/* end confdefs.h. */
7418#if HAVE_UNISTD_H
7419 #include <unistd.h>
7420 #endif
7421 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
7422 #include <stdlib.h>
7423
7424 extern struct { int foo; } environ;
7425int
7426main ()
7427{
7428environ.foo = 1;
7429 ;
7430 return 0;
7431}
7432_ACEOF
7433if ac_fn_c_try_compile "$LINENO"; then :
7434 gt_cv_var_environ_declaration=no
7435else
7436 gt_cv_var_environ_declaration=yes
7437fi
7438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7439fi
7440
7441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
7442$as_echo "$gt_cv_var_environ_declaration" >&6; }
7443 if test $gt_cv_var_environ_declaration = yes; then
7444
7445$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
7446
7447 fi
7448
7449
7450 if test $gt_cv_var_environ_declaration != yes; then
7451 HAVE_DECL_ENVIRON=0
7452 fi
7453
7454
7455
18848e28
GF
7456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7457$as_echo_n "checking for complete errno.h... " >&6; }
d0ac1c44 7458if ${gl_cv_header_errno_h_complete+:} false; then :
18848e28
GF
7459 $as_echo_n "(cached) " >&6
7460else
7461
7462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7463/* end confdefs.h. */
7464
7465#include <errno.h>
7466#if !defined ETXTBSY
7467booboo
7468#endif
7469#if !defined ENOMSG
7470booboo
7471#endif
7472#if !defined EIDRM
7473booboo
7474#endif
7475#if !defined ENOLINK
7476booboo
7477#endif
7478#if !defined EPROTO
7479booboo
7480#endif
7481#if !defined EMULTIHOP
7482booboo
7483#endif
7484#if !defined EBADMSG
7485booboo
7486#endif
7487#if !defined EOVERFLOW
7488booboo
7489#endif
7490#if !defined ENOTSUP
7491booboo
7492#endif
7493#if !defined ENETRESET
7494booboo
7495#endif
7496#if !defined ECONNABORTED
7497booboo
7498#endif
7499#if !defined ESTALE
7500booboo
7501#endif
7502#if !defined EDQUOT
7503booboo
7504#endif
7505#if !defined ECANCELED
7506booboo
7507#endif
7508#if !defined EOWNERDEAD
7509booboo
7510#endif
7511#if !defined ENOTRECOVERABLE
7512booboo
7513#endif
7514#if !defined EILSEQ
7515booboo
7516#endif
7517
7518_ACEOF
7519if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7520 $EGREP "booboo" >/dev/null 2>&1; then :
7521 gl_cv_header_errno_h_complete=no
7522else
7523 gl_cv_header_errno_h_complete=yes
7524fi
7525rm -f conftest*
7526
7527
7528fi
7529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7530$as_echo "$gl_cv_header_errno_h_complete" >&6; }
7531 if test $gl_cv_header_errno_h_complete = yes; then
7532 ERRNO_H=''
7533 else
7534
7535
7536
7537
7538
7539
7540
7541
7542 if test $gl_cv_have_include_next = yes; then
7543 gl_cv_next_errno_h='<'errno.h'>'
7544 else
7545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7546$as_echo_n "checking absolute name of <errno.h>... " >&6; }
d0ac1c44 7547if ${gl_cv_next_errno_h+:} false; then :
18848e28
GF
7548 $as_echo_n "(cached) " >&6
7549else
7550
4a626d0a
PA
7551
7552
7553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18848e28
GF
7554/* end confdefs.h. */
7555#include <errno.h>
18848e28 7556_ACEOF
4a626d0a
PA
7557 case "$host_os" in
7558 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7559 *) gl_absname_cpp="$ac_cpp" ;;
7560 esac
18848e28 7561
4a626d0a
PA
7562 case "$host_os" in
7563 mingw*)
7564 gl_dirsep_regex='[/\\]'
7565 ;;
7566 *)
7567 gl_dirsep_regex='\/'
7568 ;;
7569 esac
7570 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7571 gl_header_literal_regex=`echo 'errno.h' \
7572 | sed -e "$gl_make_literal_regex_sed"`
7573 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7574 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7575 s|^/[^/]|//&|
7576 p
7577 q
7578 }'
7579
7580 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7581 sed -n "$gl_absolute_header_sed"`
7582
7583 gl_header=$gl_cv_absolute_errno_h
7584 gl_cv_next_errno_h='"'$gl_header'"'
7585
7586
7587fi
7588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
18848e28
GF
7589$as_echo "$gl_cv_next_errno_h" >&6; }
7590 fi
7591 NEXT_ERRNO_H=$gl_cv_next_errno_h
7592
7593 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7594 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7595 gl_next_as_first_directive='<'errno.h'>'
7596 else
7597 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7598 gl_next_as_first_directive=$gl_cv_next_errno_h
7599 fi
7600 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7601
7602
7603
7604
7605 ERRNO_H='errno.h'
7606 fi
7607
7608 if test -n "$ERRNO_H"; then
7609 GL_GENERATE_ERRNO_H_TRUE=
7610 GL_GENERATE_ERRNO_H_FALSE='#'
7611else
7612 GL_GENERATE_ERRNO_H_TRUE='#'
7613 GL_GENERATE_ERRNO_H_FALSE=
7614fi
7615
7616
7617 if test -n "$ERRNO_H"; then
7618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7619$as_echo_n "checking for EMULTIHOP value... " >&6; }
d0ac1c44 7620if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
18848e28
GF
7621 $as_echo_n "(cached) " >&6
7622else
7623
7624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7625/* end confdefs.h. */
7626
7627#include <errno.h>
7628#ifdef EMULTIHOP
7629yes
7630#endif
7631
7632_ACEOF
7633if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7634 $EGREP "yes" >/dev/null 2>&1; then :
7635 gl_cv_header_errno_h_EMULTIHOP=yes
7636else
7637 gl_cv_header_errno_h_EMULTIHOP=no
7638fi
7639rm -f conftest*
7640
7641 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7643/* end confdefs.h. */
7644
7645#define _XOPEN_SOURCE_EXTENDED 1
7646#include <errno.h>
7647#ifdef EMULTIHOP
7648yes
7649#endif
7650
7651_ACEOF
7652if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7653 $EGREP "yes" >/dev/null 2>&1; then :
7654 gl_cv_header_errno_h_EMULTIHOP=hidden
7655fi
7656rm -f conftest*
7657
7658 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7659 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
7660#define _XOPEN_SOURCE_EXTENDED 1
7661#include <errno.h>
7662/* The following two lines are a workaround against an autoconf-2.52 bug. */
7663#include <stdio.h>
7664#include <stdlib.h>
7665"; then :
7666
7667fi
7668
7669 fi
7670 fi
7671
7672fi
7673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7674$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7675 case $gl_cv_header_errno_h_EMULTIHOP in
7676 yes | no)
7677 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7678 ;;
7679 *)
7680 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7681 ;;
7682 esac
7683
7684
7685 fi
7686
7687
7688 if test -n "$ERRNO_H"; then
7689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7690$as_echo_n "checking for ENOLINK value... " >&6; }
d0ac1c44 7691if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
18848e28
GF
7692 $as_echo_n "(cached) " >&6
7693else
7694
7695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7696/* end confdefs.h. */
7697
7698#include <errno.h>
7699#ifdef ENOLINK
7700yes
7701#endif
7702
7703_ACEOF
7704if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7705 $EGREP "yes" >/dev/null 2>&1; then :
7706 gl_cv_header_errno_h_ENOLINK=yes
7707else
7708 gl_cv_header_errno_h_ENOLINK=no
7709fi
7710rm -f conftest*
7711
7712 if test $gl_cv_header_errno_h_ENOLINK = no; then
7713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7714/* end confdefs.h. */
7715
7716#define _XOPEN_SOURCE_EXTENDED 1
7717#include <errno.h>
7718#ifdef ENOLINK
7719yes
7720#endif
7721
7722_ACEOF
7723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7724 $EGREP "yes" >/dev/null 2>&1; then :
7725 gl_cv_header_errno_h_ENOLINK=hidden
7726fi
7727rm -f conftest*
7728
7729 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7730 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
7731#define _XOPEN_SOURCE_EXTENDED 1
7732#include <errno.h>
7733/* The following two lines are a workaround against an autoconf-2.52 bug. */
7734#include <stdio.h>
7735#include <stdlib.h>
7736"; then :
7737
7738fi
7739
7740 fi
7741 fi
7742
7743fi
7744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7745$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7746 case $gl_cv_header_errno_h_ENOLINK in
7747 yes | no)
7748 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7749 ;;
7750 *)
7751 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7752 ;;
7753 esac
7754
7755
7756 fi
7757
7758
7759 if test -n "$ERRNO_H"; then
7760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7761$as_echo_n "checking for EOVERFLOW value... " >&6; }
d0ac1c44 7762if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
18848e28
GF
7763 $as_echo_n "(cached) " >&6
7764else
7765
7766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7767/* end confdefs.h. */
7768
7769#include <errno.h>
7770#ifdef EOVERFLOW
7771yes
7772#endif
7773
7774_ACEOF
7775if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7776 $EGREP "yes" >/dev/null 2>&1; then :
7777 gl_cv_header_errno_h_EOVERFLOW=yes
7778else
7779 gl_cv_header_errno_h_EOVERFLOW=no
7780fi
7781rm -f conftest*
7782
7783 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7785/* end confdefs.h. */
7786
7787#define _XOPEN_SOURCE_EXTENDED 1
7788#include <errno.h>
7789#ifdef EOVERFLOW
7790yes
7791#endif
7792
7793_ACEOF
7794if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7795 $EGREP "yes" >/dev/null 2>&1; then :
7796 gl_cv_header_errno_h_EOVERFLOW=hidden
7797fi
7798rm -f conftest*
7799
7800 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7801 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
7802#define _XOPEN_SOURCE_EXTENDED 1
7803#include <errno.h>
7804/* The following two lines are a workaround against an autoconf-2.52 bug. */
7805#include <stdio.h>
7806#include <stdlib.h>
7807"; then :
7808
7809fi
7810
7811 fi
7812 fi
7813
7814fi
7815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
7816$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
7817 case $gl_cv_header_errno_h_EOVERFLOW in
7818 yes | no)
7819 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
7820 ;;
7821 *)
7822 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
7823 ;;
7824 esac
7825
7826
7827 fi
7828
7829
6ec2e0f5 7830ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
d0ac1c44 7831if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
6ec2e0f5
SDJ
7832 ac_have_decl=1
7833else
7834 ac_have_decl=0
7835fi
18848e28 7836
6ec2e0f5
SDJ
7837cat >>confdefs.h <<_ACEOF
7838#define HAVE_DECL_STRERROR_R $ac_have_decl
7839_ACEOF
18848e28 7840
6ec2e0f5
SDJ
7841for ac_func in strerror_r
7842do :
7843 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
d0ac1c44 7844if test "x$ac_cv_func_strerror_r" = xyes; then :
6ec2e0f5
SDJ
7845 cat >>confdefs.h <<_ACEOF
7846#define HAVE_STRERROR_R 1
7847_ACEOF
63ce7108 7848
6ec2e0f5
SDJ
7849fi
7850done
63ce7108 7851
6ec2e0f5
SDJ
7852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
7853$as_echo_n "checking whether strerror_r returns char *... " >&6; }
d0ac1c44 7854if ${ac_cv_func_strerror_r_char_p+:} false; then :
63ce7108
TT
7855 $as_echo_n "(cached) " >&6
7856else
6ec2e0f5
SDJ
7857
7858 ac_cv_func_strerror_r_char_p=no
7859 if test $ac_cv_have_decl_strerror_r = yes; then
7860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
7861/* end confdefs.h. */
7862$ac_includes_default
63ce7108
TT
7863int
7864main ()
7865{
6ec2e0f5
SDJ
7866
7867 char buf[100];
7868 char x = *strerror_r (0, buf, sizeof buf);
7869 char *p = strerror_r (0, buf, sizeof buf);
7870 return !p || x;
7871
63ce7108
TT
7872 ;
7873 return 0;
7874}
7875_ACEOF
7876if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 7877 ac_cv_func_strerror_r_char_p=yes
63ce7108
TT
7878fi
7879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
7880 else
7881 # strerror_r is not declared. Choose between
7882 # systems that have relatively inaccessible declarations for the
7883 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
7884 # former has a strerror_r that returns char*, while the latter
7885 # has a strerror_r that returns `int'.
7886 # This test should segfault on the DEC system.
7887 if test "$cross_compiling" = yes; then :
7888 :
7889else
7890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7891/* end confdefs.h. */
7892$ac_includes_default
7893 extern char *strerror_r ();
7894int
7895main ()
7896{
7897char buf[100];
7898 char x = *strerror_r (0, buf, sizeof buf);
7899 return ! isalpha (x);
7900 ;
7901 return 0;
7902}
7903_ACEOF
7904if ac_fn_c_try_run "$LINENO"; then :
7905 ac_cv_func_strerror_r_char_p=yes
7906fi
7907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7908 conftest.$ac_objext conftest.beam conftest.$ac_ext
63ce7108 7909fi
63ce7108 7910
6ec2e0f5 7911 fi
63ce7108 7912
6ec2e0f5
SDJ
7913fi
7914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
7915$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
7916if test $ac_cv_func_strerror_r_char_p = yes; then
63ce7108 7917
6ec2e0f5 7918$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
63ce7108 7919
6ec2e0f5 7920fi
63ce7108
TT
7921
7922
d0ac1c44
SM
7923
7924
63ce7108 7925
472fa5ee 7926 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
d0ac1c44 7927if test "x$ac_cv_have_decl_fchdir" = xyes; then :
6ec2e0f5
SDJ
7928 ac_have_decl=1
7929else
7930 ac_have_decl=0
7931fi
63ce7108 7932
6ec2e0f5
SDJ
7933cat >>confdefs.h <<_ACEOF
7934#define HAVE_DECL_FCHDIR $ac_have_decl
7935_ACEOF
63ce7108
TT
7936
7937
472fa5ee 7938
6ec2e0f5
SDJ
7939 GNULIB_FCNTL=0;
7940 GNULIB_NONBLOCKING=0;
7941 GNULIB_OPEN=0;
7942 GNULIB_OPENAT=0;
7943 HAVE_FCNTL=1;
7944 HAVE_OPENAT=1;
7945 REPLACE_FCNTL=0;
7946 REPLACE_OPEN=0;
7947 REPLACE_OPENAT=0;
63ce7108
TT
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
472fa5ee
SM
7958
7959
7960
7961
7962
7963 :
7964
7965
7966
7967
7968
7969
7970 :
7971
7972
7973
7974
7975
6ec2e0f5
SDJ
7976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
7977$as_echo_n "checking for working fcntl.h... " >&6; }
d0ac1c44 7978if ${gl_cv_header_working_fcntl_h+:} false; then :
6ec2e0f5
SDJ
7979 $as_echo_n "(cached) " >&6
7980else
7981 if test "$cross_compiling" = yes; then :
7982 gl_cv_header_working_fcntl_h=cross-compiling
7983else
7984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7985/* end confdefs.h. */
7986#include <sys/types.h>
7987 #include <sys/stat.h>
7988 #if HAVE_UNISTD_H
7989 # include <unistd.h>
7990 #else /* on Windows with MSVC */
7991 # include <io.h>
7992 # include <stdlib.h>
7993 # defined sleep(n) _sleep ((n) * 1000)
7994 #endif
7995 #include <fcntl.h>
7996 #ifndef O_NOATIME
7997 #define O_NOATIME 0
7998 #endif
7999 #ifndef O_NOFOLLOW
8000 #define O_NOFOLLOW 0
8001 #endif
8002 static int const constants[] =
8003 {
8004 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8005 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8006 };
63ce7108 8007
6ec2e0f5
SDJ
8008int
8009main ()
8010{
63ce7108 8011
6ec2e0f5
SDJ
8012 int result = !constants;
8013 #if HAVE_SYMLINK
8014 {
8015 static char const sym[] = "conftest.sym";
8016 if (symlink ("/dev/null", sym) != 0)
8017 result |= 2;
8018 else
8019 {
8020 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8021 if (fd >= 0)
8022 {
8023 close (fd);
8024 result |= 4;
8025 }
8026 }
8027 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8028 result |= 2;
8029 else
8030 {
8031 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8032 if (fd >= 0)
8033 {
8034 close (fd);
8035 result |= 4;
8036 }
8037 }
8038 unlink (sym);
8039 }
8040 #endif
8041 {
8042 static char const file[] = "confdefs.h";
8043 int fd = open (file, O_RDONLY | O_NOATIME);
8044 if (fd < 0)
8045 result |= 8;
8046 else
8047 {
8048 struct stat st0;
8049 if (fstat (fd, &st0) != 0)
8050 result |= 16;
8051 else
8052 {
8053 char c;
8054 sleep (1);
8055 if (read (fd, &c, 1) != 1)
8056 result |= 24;
8057 else
8058 {
8059 if (close (fd) != 0)
8060 result |= 32;
8061 else
8062 {
8063 struct stat st1;
8064 if (stat (file, &st1) != 0)
8065 result |= 40;
8066 else
8067 if (st0.st_atime != st1.st_atime)
8068 result |= 64;
8069 }
8070 }
8071 }
8072 }
8073 }
8074 return result;
8075 ;
8076 return 0;
8077}
8078_ACEOF
8079if ac_fn_c_try_run "$LINENO"; then :
8080 gl_cv_header_working_fcntl_h=yes
8081else
8082 case $? in #(
8083 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
8084 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
8085 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
8086 *) gl_cv_header_working_fcntl_h='no';;
8087 esac
8088fi
8089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8090 conftest.$ac_objext conftest.beam conftest.$ac_ext
8091fi
8092
8093fi
8094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
8095$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
8096
8097 case $gl_cv_header_working_fcntl_h in #(
8098 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
8099 *) ac_val=1;;
8100 esac
8101
8102cat >>confdefs.h <<_ACEOF
8103#define HAVE_WORKING_O_NOATIME $ac_val
8104_ACEOF
8105
8106
8107 case $gl_cv_header_working_fcntl_h in #(
8108 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
8109 *) ac_val=1;;
8110 esac
8111
8112cat >>confdefs.h <<_ACEOF
8113#define HAVE_WORKING_O_NOFOLLOW $ac_val
8114_ACEOF
8115
8116
8117ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
d0ac1c44 8118if test "x$ac_cv_type_pid_t" = xyes; then :
6ec2e0f5
SDJ
8119
8120else
8121
8122cat >>confdefs.h <<_ACEOF
8123#define pid_t int
8124_ACEOF
8125
8126fi
8127
8128ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
d0ac1c44 8129if test "x$ac_cv_type_mode_t" = xyes; then :
6ec2e0f5
SDJ
8130
8131else
8132
8133cat >>confdefs.h <<_ACEOF
8134#define mode_t int
8135_ACEOF
8136
8137fi
8138
8139
8140
8141
8142
8143
8144
472fa5ee
SM
8145
8146
8147
8148
8149
8150
6ec2e0f5
SDJ
8151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
8152$as_echo_n "checking for mbstate_t... " >&6; }
d0ac1c44 8153if ${ac_cv_type_mbstate_t+:} false; then :
6ec2e0f5
SDJ
8154 $as_echo_n "(cached) " >&6
8155else
8156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8157/* end confdefs.h. */
8158$ac_includes_default
8159/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8160 <wchar.h>.
8161 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8162 included before <wchar.h>. */
8163#include <stddef.h>
8164#include <stdio.h>
8165#include <time.h>
8166#include <wchar.h>
8167int
8168main ()
8169{
8170mbstate_t x; return sizeof x;
8171 ;
8172 return 0;
8173}
8174_ACEOF
8175if ac_fn_c_try_compile "$LINENO"; then :
8176 ac_cv_type_mbstate_t=yes
8177else
8178 ac_cv_type_mbstate_t=no
8179fi
8180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8181fi
8182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
8183$as_echo "$ac_cv_type_mbstate_t" >&6; }
8184 if test $ac_cv_type_mbstate_t = yes; then
8185
8186$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
8187
8188 else
8189
8190$as_echo "#define mbstate_t int" >>confdefs.h
8191
8192 fi
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
472fa5ee
SM
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
6ec2e0f5
SDJ
8235 GNULIB_ACOSF=0;
8236 GNULIB_ACOSL=0;
8237 GNULIB_ASINF=0;
8238 GNULIB_ASINL=0;
8239 GNULIB_ATANF=0;
8240 GNULIB_ATANL=0;
8241 GNULIB_ATAN2F=0;
8242 GNULIB_CBRT=0;
8243 GNULIB_CBRTF=0;
8244 GNULIB_CBRTL=0;
8245 GNULIB_CEIL=0;
8246 GNULIB_CEILF=0;
8247 GNULIB_CEILL=0;
8248 GNULIB_COPYSIGN=0;
8249 GNULIB_COPYSIGNF=0;
8250 GNULIB_COPYSIGNL=0;
8251 GNULIB_COSF=0;
8252 GNULIB_COSL=0;
8253 GNULIB_COSHF=0;
8254 GNULIB_EXPF=0;
8255 GNULIB_EXPL=0;
8256 GNULIB_EXP2=0;
8257 GNULIB_EXP2F=0;
8258 GNULIB_EXP2L=0;
8259 GNULIB_EXPM1=0;
8260 GNULIB_EXPM1F=0;
8261 GNULIB_EXPM1L=0;
8262 GNULIB_FABSF=0;
8263 GNULIB_FABSL=0;
8264 GNULIB_FLOOR=0;
8265 GNULIB_FLOORF=0;
8266 GNULIB_FLOORL=0;
8267 GNULIB_FMA=0;
8268 GNULIB_FMAF=0;
8269 GNULIB_FMAL=0;
8270 GNULIB_FMOD=0;
8271 GNULIB_FMODF=0;
8272 GNULIB_FMODL=0;
8273 GNULIB_FREXPF=0;
8274 GNULIB_FREXP=0;
8275 GNULIB_FREXPL=0;
8276 GNULIB_HYPOT=0;
8277 GNULIB_HYPOTF=0;
8278 GNULIB_HYPOTL=0;
88b48903
WN
8279 GNULIB_ILOGB=0;
8280 GNULIB_ILOGBF=0;
8281 GNULIB_ILOGBL=0;
8282 GNULIB_ISFINITE=0;
8283 GNULIB_ISINF=0;
8284 GNULIB_ISNAN=0;
8285 GNULIB_ISNANF=0;
8286 GNULIB_ISNAND=0;
8287 GNULIB_ISNANL=0;
8288 GNULIB_LDEXPF=0;
8289 GNULIB_LDEXPL=0;
8290 GNULIB_LOG=0;
8291 GNULIB_LOGF=0;
8292 GNULIB_LOGL=0;
8293 GNULIB_LOG10=0;
8294 GNULIB_LOG10F=0;
8295 GNULIB_LOG10L=0;
8296 GNULIB_LOG1P=0;
8297 GNULIB_LOG1PF=0;
8298 GNULIB_LOG1PL=0;
8299 GNULIB_LOG2=0;
8300 GNULIB_LOG2F=0;
8301 GNULIB_LOG2L=0;
8302 GNULIB_LOGB=0;
8303 GNULIB_LOGBF=0;
8304 GNULIB_LOGBL=0;
8305 GNULIB_MODF=0;
8306 GNULIB_MODFF=0;
8307 GNULIB_MODFL=0;
8308 GNULIB_POWF=0;
8309 GNULIB_REMAINDER=0;
8310 GNULIB_REMAINDERF=0;
8311 GNULIB_REMAINDERL=0;
8312 GNULIB_RINT=0;
8313 GNULIB_RINTF=0;
8314 GNULIB_RINTL=0;
8315 GNULIB_ROUND=0;
8316 GNULIB_ROUNDF=0;
8317 GNULIB_ROUNDL=0;
8318 GNULIB_SIGNBIT=0;
8319 GNULIB_SINF=0;
8320 GNULIB_SINL=0;
8321 GNULIB_SINHF=0;
8322 GNULIB_SQRTF=0;
8323 GNULIB_SQRTL=0;
8324 GNULIB_TANF=0;
8325 GNULIB_TANL=0;
8326 GNULIB_TANHF=0;
8327 GNULIB_TRUNC=0;
8328 GNULIB_TRUNCF=0;
8329 GNULIB_TRUNCL=0;
8330 HAVE_ACOSF=1;
8331 HAVE_ACOSL=1;
8332 HAVE_ASINF=1;
8333 HAVE_ASINL=1;
8334 HAVE_ATANF=1;
8335 HAVE_ATANL=1;
8336 HAVE_ATAN2F=1;
8337 HAVE_CBRT=1;
8338 HAVE_CBRTF=1;
8339 HAVE_CBRTL=1;
8340 HAVE_COPYSIGN=1;
8341 HAVE_COPYSIGNL=1;
8342 HAVE_COSF=1;
8343 HAVE_COSL=1;
8344 HAVE_COSHF=1;
8345 HAVE_EXPF=1;
8346 HAVE_EXPL=1;
8347 HAVE_EXPM1=1;
8348 HAVE_EXPM1F=1;
8349 HAVE_FABSF=1;
8350 HAVE_FABSL=1;
8351 HAVE_FMA=1;
8352 HAVE_FMAF=1;
8353 HAVE_FMAL=1;
8354 HAVE_FMODF=1;
8355 HAVE_FMODL=1;
8356 HAVE_FREXPF=1;
8357 HAVE_HYPOTF=1;
8358 HAVE_HYPOTL=1;
8359 HAVE_ILOGB=1;
8360 HAVE_ILOGBF=1;
8361 HAVE_ILOGBL=1;
8362 HAVE_ISNANF=1;
8363 HAVE_ISNAND=1;
8364 HAVE_ISNANL=1;
8365 HAVE_LDEXPF=1;
8366 HAVE_LOGF=1;
8367 HAVE_LOGL=1;
8368 HAVE_LOG10F=1;
8369 HAVE_LOG10L=1;
8370 HAVE_LOG1P=1;
8371 HAVE_LOG1PF=1;
8372 HAVE_LOG1PL=1;
8373 HAVE_LOGBF=1;
8374 HAVE_LOGBL=1;
8375 HAVE_MODFF=1;
8376 HAVE_MODFL=1;
8377 HAVE_POWF=1;
8378 HAVE_REMAINDER=1;
8379 HAVE_REMAINDERF=1;
8380 HAVE_RINT=1;
8381 HAVE_RINTL=1;
8382 HAVE_SINF=1;
8383 HAVE_SINL=1;
8384 HAVE_SINHF=1;
8385 HAVE_SQRTF=1;
8386 HAVE_SQRTL=1;
8387 HAVE_TANF=1;
8388 HAVE_TANL=1;
8389 HAVE_TANHF=1;
8390 HAVE_DECL_ACOSL=1;
8391 HAVE_DECL_ASINL=1;
8392 HAVE_DECL_ATANL=1;
8393 HAVE_DECL_CBRTF=1;
8394 HAVE_DECL_CBRTL=1;
8395 HAVE_DECL_CEILF=1;
8396 HAVE_DECL_CEILL=1;
8397 HAVE_DECL_COPYSIGNF=1;
8398 HAVE_DECL_COSL=1;
8399 HAVE_DECL_EXPL=1;
8400 HAVE_DECL_EXP2=1;
8401 HAVE_DECL_EXP2F=1;
8402 HAVE_DECL_EXP2L=1;
8403 HAVE_DECL_EXPM1L=1;
8404 HAVE_DECL_FLOORF=1;
8405 HAVE_DECL_FLOORL=1;
8406 HAVE_DECL_FREXPL=1;
8407 HAVE_DECL_LDEXPL=1;
8408 HAVE_DECL_LOGL=1;
8409 HAVE_DECL_LOG10L=1;
8410 HAVE_DECL_LOG2=1;
8411 HAVE_DECL_LOG2F=1;
8412 HAVE_DECL_LOG2L=1;
8413 HAVE_DECL_LOGB=1;
8414 HAVE_DECL_REMAINDER=1;
8415 HAVE_DECL_REMAINDERL=1;
8416 HAVE_DECL_RINTF=1;
8417 HAVE_DECL_ROUND=1;
8418 HAVE_DECL_ROUNDF=1;
8419 HAVE_DECL_ROUNDL=1;
8420 HAVE_DECL_SINL=1;
8421 HAVE_DECL_SQRTL=1;
8422 HAVE_DECL_TANL=1;
8423 HAVE_DECL_TRUNC=1;
8424 HAVE_DECL_TRUNCF=1;
8425 HAVE_DECL_TRUNCL=1;
8426 REPLACE_CBRTF=0;
8427 REPLACE_CBRTL=0;
8428 REPLACE_CEIL=0;
8429 REPLACE_CEILF=0;
8430 REPLACE_CEILL=0;
8431 REPLACE_EXPM1=0;
8432 REPLACE_EXPM1F=0;
8433 REPLACE_EXP2=0;
8434 REPLACE_EXP2L=0;
8435 REPLACE_FABSL=0;
8436 REPLACE_FLOOR=0;
8437 REPLACE_FLOORF=0;
8438 REPLACE_FLOORL=0;
8439 REPLACE_FMA=0;
8440 REPLACE_FMAF=0;
8441 REPLACE_FMAL=0;
8442 REPLACE_FMOD=0;
8443 REPLACE_FMODF=0;
8444 REPLACE_FMODL=0;
8445 REPLACE_FREXPF=0;
8446 REPLACE_FREXP=0;
8447 REPLACE_FREXPL=0;
8448 REPLACE_HUGE_VAL=0;
8449 REPLACE_HYPOT=0;
8450 REPLACE_HYPOTF=0;
8451 REPLACE_HYPOTL=0;
8452 REPLACE_ILOGB=0;
8453 REPLACE_ILOGBF=0;
8454 REPLACE_ISFINITE=0;
8455 REPLACE_ISINF=0;
8456 REPLACE_ISNAN=0;
8457 REPLACE_LDEXPL=0;
8458 REPLACE_LOG=0;
8459 REPLACE_LOGF=0;
8460 REPLACE_LOGL=0;
8461 REPLACE_LOG10=0;
8462 REPLACE_LOG10F=0;
8463 REPLACE_LOG10L=0;
8464 REPLACE_LOG1P=0;
8465 REPLACE_LOG1PF=0;
8466 REPLACE_LOG1PL=0;
8467 REPLACE_LOG2=0;
8468 REPLACE_LOG2F=0;
8469 REPLACE_LOG2L=0;
8470 REPLACE_LOGB=0;
8471 REPLACE_LOGBF=0;
8472 REPLACE_LOGBL=0;
8473 REPLACE_MODF=0;
8474 REPLACE_MODFF=0;
8475 REPLACE_MODFL=0;
8476 REPLACE_NAN=0;
8477 REPLACE_REMAINDER=0;
8478 REPLACE_REMAINDERF=0;
8479 REPLACE_REMAINDERL=0;
8480 REPLACE_ROUND=0;
8481 REPLACE_ROUNDF=0;
8482 REPLACE_ROUNDL=0;
8483 REPLACE_SIGNBIT=0;
8484 REPLACE_SIGNBIT_USING_GCC=0;
8485 REPLACE_SQRTL=0;
8486 REPLACE_TRUNC=0;
8487 REPLACE_TRUNCF=0;
8488 REPLACE_TRUNCL=0;
8489
8490
8491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
8492$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
d0ac1c44 8493if ${gl_cv_func_frexp_no_libm+:} false; then :
88b48903
WN
8494 $as_echo_n "(cached) " >&6
8495else
8496
8497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8498/* end confdefs.h. */
8499#include <math.h>
8500 double x;
8501int
8502main ()
8503{
8504int e; return frexp (x, &e) > 0;
8505 ;
8506 return 0;
8507}
8508_ACEOF
8509if ac_fn_c_try_link "$LINENO"; then :
8510 gl_cv_func_frexp_no_libm=yes
8511else
8512 gl_cv_func_frexp_no_libm=no
8513fi
8514rm -f core conftest.err conftest.$ac_objext \
8515 conftest$ac_exeext conftest.$ac_ext
8516
8517fi
8518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
8519$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
8520
472fa5ee
SM
8521
8522 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
d0ac1c44 8523if test "x$ac_cv_have_decl_alarm" = xyes; then :
4a626d0a
PA
8524 ac_have_decl=1
8525else
8526 ac_have_decl=0
8527fi
88b48903 8528
4a626d0a
PA
8529cat >>confdefs.h <<_ACEOF
8530#define HAVE_DECL_ALARM $ac_have_decl
8531_ACEOF
88b48903
WN
8532
8533
472fa5ee 8534
88b48903
WN
8535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
8536$as_echo_n "checking whether long double and double are the same... " >&6; }
d0ac1c44 8537if ${gl_cv_long_double_equals_double+:} false; then :
88b48903
WN
8538 $as_echo_n "(cached) " >&6
8539else
8540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8541/* end confdefs.h. */
8542#include <float.h>
8543int
8544main ()
8545{
8546typedef int check[sizeof (long double) == sizeof (double)
8547 && LDBL_MANT_DIG == DBL_MANT_DIG
8548 && LDBL_MAX_EXP == DBL_MAX_EXP
8549 && LDBL_MIN_EXP == DBL_MIN_EXP
8550 ? 1 : -1];
8551
8552 ;
8553 return 0;
8554}
8555_ACEOF
8556if ac_fn_c_try_compile "$LINENO"; then :
8557 gl_cv_long_double_equals_double=yes
8558else
8559 gl_cv_long_double_equals_double=no
8560fi
8561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8562
8563fi
8564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
8565$as_echo "$gl_cv_long_double_equals_double" >&6; }
8566 if test $gl_cv_long_double_equals_double = yes; then
8567
8568$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
8569
8570 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
8571 else
8572 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
8573 fi
8574
8575
4a626d0a 8576
6ec2e0f5
SDJ
8577 GNULIB_FCHMODAT=0;
8578 GNULIB_FSTAT=0;
8579 GNULIB_FSTATAT=0;
8580 GNULIB_FUTIMENS=0;
8581 GNULIB_LCHMOD=0;
8582 GNULIB_LSTAT=0;
8583 GNULIB_MKDIRAT=0;
8584 GNULIB_MKFIFO=0;
8585 GNULIB_MKFIFOAT=0;
8586 GNULIB_MKNOD=0;
8587 GNULIB_MKNODAT=0;
8588 GNULIB_STAT=0;
8589 GNULIB_UTIMENSAT=0;
8590 HAVE_FCHMODAT=1;
8591 HAVE_FSTATAT=1;
8592 HAVE_FUTIMENS=1;
8593 HAVE_LCHMOD=1;
8594 HAVE_LSTAT=1;
8595 HAVE_MKDIRAT=1;
8596 HAVE_MKFIFO=1;
8597 HAVE_MKFIFOAT=1;
8598 HAVE_MKNOD=1;
8599 HAVE_MKNODAT=1;
8600 HAVE_UTIMENSAT=1;
8601 REPLACE_FSTAT=0;
8602 REPLACE_FSTATAT=0;
8603 REPLACE_FUTIMENS=0;
8604 REPLACE_LSTAT=0;
8605 REPLACE_MKDIR=0;
8606 REPLACE_MKFIFO=0;
8607 REPLACE_MKNOD=0;
8608 REPLACE_STAT=0;
8609 REPLACE_UTIMENSAT=0;
8610
8611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
8612$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
d0ac1c44 8613if ${ac_cv_header_stat_broken+:} false; then :
6ec2e0f5
SDJ
8614 $as_echo_n "(cached) " >&6
8615else
8616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8617/* end confdefs.h. */
8618#include <sys/types.h>
8619#include <sys/stat.h>
8620
8621#if defined S_ISBLK && defined S_IFDIR
8622extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
8623#endif
8624
8625#if defined S_ISBLK && defined S_IFCHR
8626extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
8627#endif
8628
8629#if defined S_ISLNK && defined S_IFREG
8630extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
8631#endif
8632
8633#if defined S_ISSOCK && defined S_IFREG
8634extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
8635#endif
4a626d0a 8636
4a626d0a
PA
8637_ACEOF
8638if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
8639 ac_cv_header_stat_broken=no
8640else
8641 ac_cv_header_stat_broken=yes
4a626d0a
PA
8642fi
8643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
8644fi
8645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
8646$as_echo "$ac_cv_header_stat_broken" >&6; }
8647if test $ac_cv_header_stat_broken = yes; then
8648
8649$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
4a626d0a
PA
8650
8651fi
4a626d0a 8652
4a626d0a
PA
8653
8654
4a626d0a
PA
8655
8656
472fa5ee
SM
8657
8658
8659
6ec2e0f5
SDJ
8660 case "$host_os" in
8661 mingw*)
8662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
8663$as_echo_n "checking for 64-bit off_t... " >&6; }
d0ac1c44 8664if ${gl_cv_type_off_t_64+:} false; then :
6ec2e0f5
SDJ
8665 $as_echo_n "(cached) " >&6
8666else
8667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8668/* end confdefs.h. */
8669#include <sys/types.h>
8670 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
8671
8672int
8673main ()
8674{
8675
8676 ;
8677 return 0;
8678}
8679_ACEOF
8680if ac_fn_c_try_compile "$LINENO"; then :
8681 gl_cv_type_off_t_64=yes
8682else
8683 gl_cv_type_off_t_64=no
8684fi
8685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4a626d0a 8686
6ec2e0f5
SDJ
8687fi
8688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
8689$as_echo "$gl_cv_type_off_t_64" >&6; }
8690 if test $gl_cv_type_off_t_64 = no; then
8691 WINDOWS_64_BIT_OFF_T=1
8692 else
8693 WINDOWS_64_BIT_OFF_T=0
8694 fi
8695 WINDOWS_64_BIT_ST_SIZE=1
8696 ;;
8697 *)
8698 WINDOWS_64_BIT_OFF_T=0
8699 WINDOWS_64_BIT_ST_SIZE=0
8700 ;;
8701 esac
4a626d0a
PA
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
472fa5ee
SM
8714 :
8715
8716
8717
8718
8719
4a626d0a
PA
8720
8721
8722
8723 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 8724 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a 8725 else
6ec2e0f5
SDJ
8726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
8727$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 8728if ${gl_cv_next_sys_stat_h+:} false; then :
4a626d0a
PA
8729 $as_echo_n "(cached) " >&6
8730else
8731
6ec2e0f5 8732 if test $ac_cv_header_sys_stat_h = yes; then
4a626d0a
PA
8733
8734
8735
8736
8737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8738/* end confdefs.h. */
6ec2e0f5 8739#include <sys/stat.h>
4a626d0a
PA
8740_ACEOF
8741 case "$host_os" in
8742 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8743 *) gl_absname_cpp="$ac_cpp" ;;
8744 esac
8745
8746 case "$host_os" in
8747 mingw*)
8748 gl_dirsep_regex='[/\\]'
8749 ;;
8750 *)
8751 gl_dirsep_regex='\/'
8752 ;;
8753 esac
8754 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 8755 gl_header_literal_regex=`echo 'sys/stat.h' \
4a626d0a
PA
8756 | sed -e "$gl_make_literal_regex_sed"`
8757 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8758 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8759 s|^/[^/]|//&|
8760 p
8761 q
8762 }'
8763
6ec2e0f5 8764 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
8765 sed -n "$gl_absolute_header_sed"`
8766
6ec2e0f5
SDJ
8767 gl_header=$gl_cv_absolute_sys_stat_h
8768 gl_cv_next_sys_stat_h='"'$gl_header'"'
4a626d0a 8769 else
6ec2e0f5 8770 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
4a626d0a
PA
8771 fi
8772
8773
8774fi
6ec2e0f5
SDJ
8775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
8776$as_echo "$gl_cv_next_sys_stat_h" >&6; }
4a626d0a 8777 fi
6ec2e0f5 8778 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
4a626d0a
PA
8779
8780 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8781 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 8782 gl_next_as_first_directive='<'sys/stat.h'>'
4a626d0a
PA
8783 else
8784 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 8785 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
4a626d0a 8786 fi
6ec2e0f5 8787 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
4a626d0a
PA
8788
8789
8790
8791
8792
4a626d0a
PA
8793
8794
8795
8796
8797
4a626d0a 8798
6ec2e0f5 8799 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
4a626d0a 8800
6ec2e0f5 8801$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
4a626d0a
PA
8802
8803 fi
4a626d0a 8804
6ec2e0f5
SDJ
8805 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
8806 #include <sys/stat.h>
8807"
d0ac1c44 8808if test "x$ac_cv_type_nlink_t" = xyes; then :
6ec2e0f5
SDJ
8809
8810else
4a626d0a 8811
6ec2e0f5
SDJ
8812$as_echo "#define nlink_t int" >>confdefs.h
8813
8814fi
8815
8816
8817
8818 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
8819 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
8820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
8821$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
d0ac1c44 8822if eval \${$as_gl_Symbol+:} false; then :
4a626d0a
PA
8823 $as_echo_n "(cached) " >&6
8824else
8825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8826/* end confdefs.h. */
6ec2e0f5 8827#include <sys/stat.h>
4a626d0a
PA
8828
8829int
8830main ()
8831{
6ec2e0f5
SDJ
8832#undef $gl_func
8833 (void) $gl_func;
4a626d0a
PA
8834 ;
8835 return 0;
8836}
8837_ACEOF
8838if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 8839 eval "$as_gl_Symbol=yes"
4a626d0a 8840else
6ec2e0f5 8841 eval "$as_gl_Symbol=no"
4a626d0a
PA
8842fi
8843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
8844fi
8845eval ac_res=\$$as_gl_Symbol
8846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8847$as_echo "$ac_res" >&6; }
d0ac1c44 8848 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
6ec2e0f5
SDJ
8849 cat >>confdefs.h <<_ACEOF
8850#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
8851_ACEOF
4a626d0a 8852
6ec2e0f5 8853 eval ac_cv_have_decl_$gl_func=yes
4a626d0a 8854fi
6ec2e0f5
SDJ
8855 done
8856
8857
8858
8859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
8860$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
d0ac1c44 8861if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
4a626d0a
PA
8862 $as_echo_n "(cached) " >&6
8863else
6ec2e0f5
SDJ
8864 rm -f conftest.sym conftest.file
8865 echo >conftest.file
8866 if test "$cross_compiling" = yes; then :
8867 case "$host_os" in
8868 *-gnu*)
8869 # Guess yes on glibc systems.
8870 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
8871 *)
8872 # If we don't know, assume the worst.
8873 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
8874 esac
4a626d0a 8875
6ec2e0f5
SDJ
8876else
8877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8878/* end confdefs.h. */
8879$ac_includes_default
4a626d0a
PA
8880int
8881main ()
8882{
6ec2e0f5
SDJ
8883struct stat sbuf;
8884 if (symlink ("conftest.file", "conftest.sym") != 0)
8885 return 1;
8886 /* Linux will dereference the symlink and fail, as required by
8887 POSIX. That is better in the sense that it means we will not
8888 have to compile and use the lstat wrapper. */
8889 return lstat ("conftest.sym/", &sbuf) == 0;
4a626d0a
PA
8890
8891 ;
8892 return 0;
8893}
8894_ACEOF
6ec2e0f5
SDJ
8895if ac_fn_c_try_run "$LINENO"; then :
8896 gl_cv_func_lstat_dereferences_slashed_symlink=yes
4a626d0a 8897else
6ec2e0f5
SDJ
8898 gl_cv_func_lstat_dereferences_slashed_symlink=no
8899fi
8900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8901 conftest.$ac_objext conftest.beam conftest.$ac_ext
4a626d0a 8902fi
6ec2e0f5
SDJ
8903
8904 rm -f conftest.sym conftest.file
4a626d0a
PA
8905
8906fi
6ec2e0f5
SDJ
8907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
8908$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
8909 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
8910 *yes)
4a626d0a 8911
6ec2e0f5
SDJ
8912cat >>confdefs.h <<_ACEOF
8913#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
8914_ACEOF
4a626d0a 8915
6ec2e0f5
SDJ
8916 ;;
8917 esac
8918
8919
8920
8921
8922
472fa5ee
SM
8923
8924
8925
8926 :
8927
8928
8929
8930
8931
6ec2e0f5
SDJ
8932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
8933$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
d0ac1c44 8934if ${gl_cv_func_getcwd_null+:} false; then :
4a626d0a 8935 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
8936else
8937 if test "$cross_compiling" = yes; then :
8938 case "$host_os" in
8939 # Guess yes on glibc systems.
8940 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
8941 # Guess yes on Cygwin.
8942 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
8943 # If we don't know, assume the worst.
8944 *) gl_cv_func_getcwd_null="guessing no";;
8945 esac
8946
4a626d0a
PA
8947else
8948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8949/* end confdefs.h. */
8950
6ec2e0f5
SDJ
8951# include <stdlib.h>
8952# if HAVE_UNISTD_H
8953# include <unistd.h>
8954# else /* on Windows with MSVC */
8955# include <direct.h>
8956# endif
8957# ifndef getcwd
8958 char *getcwd ();
8959# endif
8960
8961int
8962main ()
8963{
8964
8965#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
8966/* mingw cwd does not start with '/', but getcwd does allocate.
8967 However, mingw fails to honor non-zero size. */
8968#else
8969 if (chdir ("/") != 0)
8970 return 1;
8971 else
8972 {
8973 char *f = getcwd (NULL, 0);
8974 if (! f)
8975 return 2;
8976 if (f[0] != '/')
8977 return 3;
8978 if (f[1] != '\0')
8979 return 4;
8980 free (f);
8981 return 0;
8982 }
4a626d0a 8983#endif
4a626d0a 8984
6ec2e0f5
SDJ
8985 ;
8986 return 0;
8987}
8988_ACEOF
8989if ac_fn_c_try_run "$LINENO"; then :
8990 gl_cv_func_getcwd_null=yes
8991else
8992 gl_cv_func_getcwd_null=no
8993fi
8994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8995 conftest.$ac_objext conftest.beam conftest.$ac_ext
8996fi
8997
8998fi
8999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
9000$as_echo "$gl_cv_func_getcwd_null" >&6; }
9001
9002
9003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
9004$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
d0ac1c44 9005if ${gl_cv_func_getcwd_posix_signature+:} false; then :
6ec2e0f5
SDJ
9006 $as_echo_n "(cached) " >&6
9007else
9008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9009/* end confdefs.h. */
9010#include <unistd.h>
4a626d0a
PA
9011int
9012main ()
9013{
6ec2e0f5
SDJ
9014extern
9015 #ifdef __cplusplus
9016 "C"
9017 #endif
9018 char *getcwd (char *, size_t);
9019
4a626d0a
PA
9020 ;
9021 return 0;
9022}
6ec2e0f5 9023
4a626d0a
PA
9024_ACEOF
9025if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9026 gl_cv_func_getcwd_posix_signature=yes
4a626d0a 9027else
6ec2e0f5 9028 gl_cv_func_getcwd_posix_signature=no
4a626d0a
PA
9029fi
9030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5 9031
4a626d0a 9032fi
6ec2e0f5
SDJ
9033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
9034$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
9035
472fa5ee
SM
9036
9037 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
d0ac1c44 9038if test "x$ac_cv_have_decl_getcwd" = xyes; then :
6ec2e0f5
SDJ
9039 ac_have_decl=1
9040else
9041 ac_have_decl=0
9042fi
9043
9044cat >>confdefs.h <<_ACEOF
9045#define HAVE_DECL_GETCWD $ac_have_decl
4a626d0a
PA
9046_ACEOF
9047
6ec2e0f5
SDJ
9048
9049
472fa5ee
SM
9050
9051
9052
9053
9054
9055 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
d0ac1c44 9056if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
6ec2e0f5
SDJ
9057 ac_have_decl=1
9058else
9059 ac_have_decl=0
4a626d0a 9060fi
4a626d0a 9061
6ec2e0f5
SDJ
9062cat >>confdefs.h <<_ACEOF
9063#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
9064_ACEOF
9065
472fa5ee
SM
9066
9067
9068 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
d0ac1c44 9069if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
6ec2e0f5
SDJ
9070 ac_have_decl=1
9071else
9072 ac_have_decl=0
9073fi
9074
9075cat >>confdefs.h <<_ACEOF
9076#define HAVE_DECL_GETLOGIN_R $ac_have_decl
9077_ACEOF
9078
9079
9080
472fa5ee
SM
9081
9082
9083
9084
9085
9086 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
d0ac1c44 9087if test "x$ac_cv_have_decl_getlogin" = xyes; then :
6ec2e0f5
SDJ
9088 ac_have_decl=1
9089else
9090 ac_have_decl=0
9091fi
9092
9093cat >>confdefs.h <<_ACEOF
9094#define HAVE_DECL_GETLOGIN $ac_have_decl
9095_ACEOF
9096
9097
9098
9099
9100
472fa5ee
SM
9101
9102
9103
9104
9105
9106
9107
6ec2e0f5
SDJ
9108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
9109$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
d0ac1c44 9110if ${ac_cv_c_restrict+:} false; then :
6ec2e0f5
SDJ
9111 $as_echo_n "(cached) " >&6
9112else
9113 ac_cv_c_restrict=no
9114 # The order here caters to the fact that C++ does not require restrict.
9115 for ac_kw in __restrict __restrict__ _Restrict restrict; do
9116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9117/* end confdefs.h. */
9118typedef int *int_ptr;
9119 int foo (int_ptr $ac_kw ip) { return ip[0]; }
9120 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
9121 int bar (int ip[$ac_kw]) { return ip[0]; }
9122
9123int
9124main ()
9125{
9126int s[1];
9127 int *$ac_kw t = s;
9128 t[0] = 0;
9129 return foo (t) + bar (t);
9130
9131 ;
9132 return 0;
9133}
9134_ACEOF
9135if ac_fn_c_try_compile "$LINENO"; then :
9136 ac_cv_c_restrict=$ac_kw
9137fi
9138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9139 test "$ac_cv_c_restrict" != no && break
9140 done
9141
9142fi
9143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
9144$as_echo "$ac_cv_c_restrict" >&6; }
9145
9146 case $ac_cv_c_restrict in
9147 restrict) ;;
9148 no) $as_echo "#define restrict /**/" >>confdefs.h
9149 ;;
9150 *) cat >>confdefs.h <<_ACEOF
9151#define restrict $ac_cv_c_restrict
9152_ACEOF
9153 ;;
9154 esac
4a626d0a
PA
9155
9156
6ec2e0f5
SDJ
9157 GNULIB_GETTIMEOFDAY=0;
9158 HAVE_GETTIMEOFDAY=1;
9159 HAVE_STRUCT_TIMEVAL=1;
9160 HAVE_SYS_TIME_H=1;
9161 HAVE_TIMEZONE_T=0;
9162 REPLACE_GETTIMEOFDAY=0;
9163 REPLACE_STRUCT_TIMEVAL=0;
4a626d0a
PA
9164
9165
9166
9167
88b48903 9168
49e4877c
PA
9169
9170
9171
9172
9173
472fa5ee
SM
9174 :
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186 :
9187
9188
49e4877c
PA
9189
9190
9191
9192
9193
9194
9195 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9196 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c 9197 else
6ec2e0f5
SDJ
9198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
9199$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
d0ac1c44 9200if ${gl_cv_next_sys_time_h+:} false; then :
49e4877c
PA
9201 $as_echo_n "(cached) " >&6
9202else
9203
6ec2e0f5 9204 if test $ac_cv_header_sys_time_h = yes; then
49e4877c
PA
9205
9206
9207
9208
9209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9210/* end confdefs.h. */
6ec2e0f5 9211#include <sys/time.h>
49e4877c
PA
9212_ACEOF
9213 case "$host_os" in
9214 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9215 *) gl_absname_cpp="$ac_cpp" ;;
9216 esac
9217
9218 case "$host_os" in
9219 mingw*)
9220 gl_dirsep_regex='[/\\]'
9221 ;;
9222 *)
9223 gl_dirsep_regex='\/'
9224 ;;
9225 esac
9226 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9227 gl_header_literal_regex=`echo 'sys/time.h' \
49e4877c
PA
9228 | sed -e "$gl_make_literal_regex_sed"`
9229 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9230 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9231 s|^/[^/]|//&|
9232 p
9233 q
9234 }'
9235
6ec2e0f5 9236 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
49e4877c
PA
9237 sed -n "$gl_absolute_header_sed"`
9238
6ec2e0f5
SDJ
9239 gl_header=$gl_cv_absolute_sys_time_h
9240 gl_cv_next_sys_time_h='"'$gl_header'"'
49e4877c 9241 else
6ec2e0f5 9242 gl_cv_next_sys_time_h='<'sys/time.h'>'
49e4877c
PA
9243 fi
9244
9245
9246fi
6ec2e0f5
SDJ
9247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
9248$as_echo "$gl_cv_next_sys_time_h" >&6; }
49e4877c 9249 fi
6ec2e0f5 9250 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
49e4877c
PA
9251
9252 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9253 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 9254 gl_next_as_first_directive='<'sys/time.h'>'
49e4877c
PA
9255 else
9256 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 9257 gl_next_as_first_directive=$gl_cv_next_sys_time_h
49e4877c 9258 fi
6ec2e0f5 9259 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
49e4877c
PA
9260
9261
9262
9263
9264
6ec2e0f5
SDJ
9265 if test $ac_cv_header_sys_time_h != yes; then
9266 HAVE_SYS_TIME_H=0
9267 fi
9268
9269
9270
9271
9272
472fa5ee
SM
9273 :
9274
9275
9276
9277
9278
6ec2e0f5
SDJ
9279 if test $ac_cv_header_sys_socket_h != yes; then
9280 for ac_header in winsock2.h
9281do :
9282 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 9283if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
9284 cat >>confdefs.h <<_ACEOF
9285#define HAVE_WINSOCK2_H 1
9286_ACEOF
9287
9288fi
9289
9290done
9291
9292 fi
9293 if test "$ac_cv_header_winsock2_h" = yes; then
9294 HAVE_WINSOCK2_H=1
9295 UNISTD_H_HAVE_WINSOCK2_H=1
9296 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
9297 else
9298 HAVE_WINSOCK2_H=0
9299 fi
9300
9301
9302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
9303$as_echo_n "checking for struct timeval... " >&6; }
d0ac1c44 9304if ${gl_cv_sys_struct_timeval+:} false; then :
6ec2e0f5
SDJ
9305 $as_echo_n "(cached) " >&6
9306else
9307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9308/* end confdefs.h. */
9309#if HAVE_SYS_TIME_H
9310 #include <sys/time.h>
9311 #endif
9312 #include <time.h>
9313 #if HAVE_WINSOCK2_H
9314 # include <winsock2.h>
9315 #endif
9316
49e4877c
PA
9317int
9318main ()
9319{
6ec2e0f5 9320static struct timeval x; x.tv_sec = x.tv_usec;
49e4877c
PA
9321 ;
9322 return 0;
9323}
9324_ACEOF
9325if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 9326 gl_cv_sys_struct_timeval=yes
49e4877c 9327else
6ec2e0f5 9328 gl_cv_sys_struct_timeval=no
49e4877c
PA
9329fi
9330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49e4877c 9331
49e4877c 9332fi
6ec2e0f5
SDJ
9333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
9334$as_echo "$gl_cv_sys_struct_timeval" >&6; }
9335 if test $gl_cv_sys_struct_timeval != yes; then
9336 HAVE_STRUCT_TIMEVAL=0
9337 else
9338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
9339$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
d0ac1c44 9340if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
8690e634
JK
9341 $as_echo_n "(cached) " >&6
9342else
6ec2e0f5 9343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9344/* end confdefs.h. */
6ec2e0f5
SDJ
9345#if HAVE_SYS_TIME_H
9346 #include <sys/time.h>
9347 #endif
9348 #include <time.h>
9349 #if HAVE_WINSOCK2_H
9350 # include <winsock2.h>
9351 #endif
8690e634 9352
8690e634
JK
9353int
9354main ()
9355{
6ec2e0f5
SDJ
9356static struct timeval x;
9357 typedef int verify_tv_sec_type[
9358 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
9359 ];
9360
8690e634
JK
9361 ;
9362 return 0;
9363}
8690e634 9364_ACEOF
6ec2e0f5
SDJ
9365if ac_fn_c_try_compile "$LINENO"; then :
9366 gl_cv_sys_struct_timeval_tv_sec=yes
8690e634 9367else
6ec2e0f5 9368 gl_cv_sys_struct_timeval_tv_sec=no
8690e634 9369fi
6ec2e0f5 9370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9371
6ec2e0f5
SDJ
9372fi
9373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
9374$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
9375 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
9376 REPLACE_STRUCT_TIMEVAL=1
9377 fi
8690e634
JK
9378 fi
9379
9380
6ec2e0f5
SDJ
9381 for gl_func in gettimeofday; do
9382 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
9383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
9384$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
d0ac1c44 9385if eval \${$as_gl_Symbol+:} false; then :
8690e634 9386 $as_echo_n "(cached) " >&6
8690e634
JK
9387else
9388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9389/* end confdefs.h. */
6ec2e0f5
SDJ
9390
9391#if HAVE_SYS_TIME_H
9392# include <sys/time.h>
9393#endif
9394#include <time.h>
9395
8690e634
JK
9396int
9397main ()
9398{
6ec2e0f5
SDJ
9399#undef $gl_func
9400 (void) $gl_func;
8690e634
JK
9401 ;
9402 return 0;
9403}
9404_ACEOF
6ec2e0f5
SDJ
9405if ac_fn_c_try_compile "$LINENO"; then :
9406 eval "$as_gl_Symbol=yes"
8690e634 9407else
6ec2e0f5 9408 eval "$as_gl_Symbol=no"
8690e634 9409fi
6ec2e0f5 9410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 9411fi
6ec2e0f5
SDJ
9412eval ac_res=\$$as_gl_Symbol
9413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9414$as_echo "$ac_res" >&6; }
d0ac1c44 9415 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
6ec2e0f5
SDJ
9416 cat >>confdefs.h <<_ACEOF
9417#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
9418_ACEOF
8690e634 9419
6ec2e0f5 9420 eval ac_cv_have_decl_$gl_func=yes
8690e634 9421fi
6ec2e0f5 9422 done
8690e634 9423
8690e634 9424
8690e634
JK
9425
9426
9427
9428
9429
9430
88b48903 9431
8690e634 9432
8690e634 9433
8690e634
JK
9434
9435
9436
9437
9438
49e4877c
PA
9439
9440
8690e634
JK
9441
9442
472fa5ee
SM
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455 :
9456
9457
9458
9459
9460
8690e634
JK
9461
9462
9463
9464 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 9465 gl_cv_next_limits_h='<'limits.h'>'
8690e634 9466 else
6ec2e0f5
SDJ
9467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
9468$as_echo_n "checking absolute name of <limits.h>... " >&6; }
d0ac1c44 9469if ${gl_cv_next_limits_h+:} false; then :
8690e634
JK
9470 $as_echo_n "(cached) " >&6
9471else
9472
6ec2e0f5 9473 if test $ac_cv_header_limits_h = yes; then
8690e634
JK
9474
9475
4a626d0a
PA
9476
9477
9478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 9479/* end confdefs.h. */
6ec2e0f5 9480#include <limits.h>
8690e634 9481_ACEOF
4a626d0a
PA
9482 case "$host_os" in
9483 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9484 *) gl_absname_cpp="$ac_cpp" ;;
9485 esac
9486
9487 case "$host_os" in
9488 mingw*)
9489 gl_dirsep_regex='[/\\]'
9490 ;;
9491 *)
9492 gl_dirsep_regex='\/'
9493 ;;
9494 esac
9495 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 9496 gl_header_literal_regex=`echo 'limits.h' \
4a626d0a
PA
9497 | sed -e "$gl_make_literal_regex_sed"`
9498 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9499 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9500 s|^/[^/]|//&|
9501 p
9502 q
9503 }'
9504
6ec2e0f5 9505 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a
PA
9506 sed -n "$gl_absolute_header_sed"`
9507
6ec2e0f5
SDJ
9508 gl_header=$gl_cv_absolute_limits_h
9509 gl_cv_next_limits_h='"'$gl_header'"'
8690e634 9510 else
6ec2e0f5 9511 gl_cv_next_limits_h='<'limits.h'>'
8690e634
JK
9512 fi
9513
9514
9515fi
6ec2e0f5
SDJ
9516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
9517$as_echo "$gl_cv_next_limits_h" >&6; }
8690e634 9518 fi
6ec2e0f5 9519 NEXT_LIMITS_H=$gl_cv_next_limits_h
8690e634
JK
9520
9521 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9522 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 9523 gl_next_as_first_directive='<'limits.h'>'
8690e634
JK
9524 else
9525 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 9526 gl_next_as_first_directive=$gl_cv_next_limits_h
8690e634 9527 fi
6ec2e0f5 9528 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
8690e634
JK
9529
9530
9531
9532
6ec2e0f5
SDJ
9533
9534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
9535$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
d0ac1c44 9536if ${gl_cv_header_limits_width+:} false; then :
6ec2e0f5
SDJ
9537 $as_echo_n "(cached) " >&6
9538else
9539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9540/* end confdefs.h. */
9541#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
9542 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
9543 #endif
9544 #include <limits.h>
9545 int ullw = ULLONG_WIDTH;
9546int
9547main ()
9548{
9549
9550 ;
9551 return 0;
9552}
9553_ACEOF
9554if ac_fn_c_try_compile "$LINENO"; then :
9555 gl_cv_header_limits_width=yes
9556else
9557 gl_cv_header_limits_width=no
9558fi
9559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9560fi
9561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
9562$as_echo "$gl_cv_header_limits_width" >&6; }
9563 if test "$gl_cv_header_limits_width" = yes; then
9564 LIMITS_H=
8690e634 9565 else
6ec2e0f5 9566 LIMITS_H=limits.h
8690e634
JK
9567 fi
9568
6ec2e0f5
SDJ
9569 if test -n "$LIMITS_H"; then
9570 GL_GENERATE_LIMITS_H_TRUE=
9571 GL_GENERATE_LIMITS_H_FALSE='#'
9572else
9573 GL_GENERATE_LIMITS_H_TRUE='#'
9574 GL_GENERATE_LIMITS_H_FALSE=
9575fi
9576
8690e634 9577
6ec2e0f5
SDJ
9578
9579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
9580$as_echo_n "checking for unsigned long long int... " >&6; }
d0ac1c44 9581if ${ac_cv_type_unsigned_long_long_int+:} false; then :
8690e634
JK
9582 $as_echo_n "(cached) " >&6
9583else
6ec2e0f5
SDJ
9584 ac_cv_type_unsigned_long_long_int=yes
9585 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
8690e634
JK
9586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9587/* end confdefs.h. */
9588
6ec2e0f5
SDJ
9589 /* For now, do not test the preprocessor; as of 2007 there are too many
9590 implementations with broken preprocessors. Perhaps this can
9591 be revisited in 2012. In the meantime, code should not expect
9592 #if to work with literals wider than 32 bits. */
9593 /* Test literals. */
9594 long long int ll = 9223372036854775807ll;
9595 long long int nll = -9223372036854775807LL;
9596 unsigned long long int ull = 18446744073709551615ULL;
9597 /* Test constant expressions. */
9598 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
9599 ? 1 : -1)];
9600 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
9601 ? 1 : -1)];
9602 int i = 63;
9603int
9604main ()
9605{
9606/* Test availability of runtime routines for shift and division. */
9607 long long int llmax = 9223372036854775807ll;
9608 unsigned long long int ullmax = 18446744073709551615ull;
9609 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
9610 | (llmax / ll) | (llmax % ll)
9611 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
9612 | (ullmax / ull) | (ullmax % ull));
9613 ;
9614 return 0;
9615}
8690e634 9616
6ec2e0f5
SDJ
9617_ACEOF
9618if ac_fn_c_try_link "$LINENO"; then :
8690e634 9619
6ec2e0f5
SDJ
9620else
9621 ac_cv_type_unsigned_long_long_int=no
9622fi
9623rm -f core conftest.err conftest.$ac_objext \
9624 conftest$ac_exeext conftest.$ac_ext
9625 fi
9626fi
9627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
9628$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
9629 if test $ac_cv_type_unsigned_long_long_int = yes; then
8690e634 9630
6ec2e0f5 9631$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
8690e634 9632
6ec2e0f5 9633 fi
8690e634 9634
8690e634 9635
8690e634 9636
6ec2e0f5
SDJ
9637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
9638$as_echo_n "checking for long long int... " >&6; }
d0ac1c44 9639if ${ac_cv_type_long_long_int+:} false; then :
6ec2e0f5
SDJ
9640 $as_echo_n "(cached) " >&6
9641else
9642 ac_cv_type_long_long_int=yes
9643 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9644 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
9645 if test $ac_cv_type_long_long_int = yes; then
9646 if test "$cross_compiling" = yes; then :
9647 :
8690e634
JK
9648else
9649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9650/* end confdefs.h. */
6ec2e0f5
SDJ
9651#include <limits.h>
9652 #ifndef LLONG_MAX
9653 # define HALF \
9654 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
9655 # define LLONG_MAX (HALF - 1 + HALF)
9656 #endif
8690e634
JK
9657int
9658main ()
9659{
6ec2e0f5
SDJ
9660long long int n = 1;
9661 int i;
9662 for (i = 0; ; i++)
9663 {
9664 long long int m = n << i;
9665 if (m >> i != n)
9666 return 1;
9667 if (LLONG_MAX / 2 < m)
9668 break;
9669 }
9670 return 0;
8690e634
JK
9671 ;
9672 return 0;
9673}
9674_ACEOF
9675if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5
SDJ
9676
9677else
9678 ac_cv_type_long_long_int=no
8690e634
JK
9679fi
9680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9681 conftest.$ac_objext conftest.beam conftest.$ac_ext
9682fi
9683
6ec2e0f5
SDJ
9684 fi
9685 fi
8690e634 9686fi
6ec2e0f5
SDJ
9687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
9688$as_echo "$ac_cv_type_long_long_int" >&6; }
9689 if test $ac_cv_type_long_long_int = yes; then
49e4877c 9690
6ec2e0f5 9691$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
49e4877c 9692
6ec2e0f5 9693 fi
49e4877c 9694
49e4877c
PA
9695
9696
49e4877c
PA
9697
9698
49e4877c 9699
472fa5ee
SM
9700
9701
9702
9703
9704
9705
6ec2e0f5
SDJ
9706 gl_cv_c_multiarch=no
9707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9708/* end confdefs.h. */
9709#ifndef __APPLE_CC__
9710 not a universal capable compiler
9711 #endif
9712 typedef int dummy;
49e4877c 9713
49e4877c
PA
9714_ACEOF
9715if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
9716
9717 arch=
9718 prev=
9719 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
9720 if test -n "$prev"; then
9721 case $word in
9722 i?86 | x86_64 | ppc | ppc64)
9723 if test -z "$arch" || test "$arch" = "$word"; then
9724 arch="$word"
9725 else
9726 gl_cv_c_multiarch=yes
9727 fi
9728 ;;
9729 esac
9730 prev=
9731 else
9732 if test "x$word" = "x-arch"; then
9733 prev=arch
9734 fi
9735 fi
9736 done
9737
49e4877c
PA
9738fi
9739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
9740 if test $gl_cv_c_multiarch = yes; then
9741 APPLE_UNIVERSAL_BUILD=1
9742 else
9743 APPLE_UNIVERSAL_BUILD=0
9744 fi
49e4877c 9745
49e4877c 9746
49e4877c
PA
9747
9748
49e4877c 9749
49e4877c 9750
49e4877c 9751
6ec2e0f5
SDJ
9752 if test $ac_cv_type_long_long_int = yes; then
9753 HAVE_LONG_LONG_INT=1
9754 else
9755 HAVE_LONG_LONG_INT=0
9756 fi
49e4877c 9757
49e4877c 9758
6ec2e0f5
SDJ
9759 if test $ac_cv_type_unsigned_long_long_int = yes; then
9760 HAVE_UNSIGNED_LONG_LONG_INT=1
8690e634 9761 else
6ec2e0f5
SDJ
9762 HAVE_UNSIGNED_LONG_LONG_INT=0
9763 fi
8690e634 9764
8690e634 9765
8690e634 9766
472fa5ee
SM
9767 :
9768
9769
9770
9771
9772
6ec2e0f5
SDJ
9773 if test $ac_cv_header_wchar_h = yes; then
9774 HAVE_WCHAR_H=1
9775 else
9776 HAVE_WCHAR_H=0
9777 fi
8690e634
JK
9778
9779
6ec2e0f5
SDJ
9780 if test $ac_cv_header_inttypes_h = yes; then
9781 HAVE_INTTYPES_H=1
9782 else
9783 HAVE_INTTYPES_H=0
9784 fi
8690e634
JK
9785
9786
6ec2e0f5
SDJ
9787 if test $ac_cv_header_sys_types_h = yes; then
9788 HAVE_SYS_TYPES_H=1
9789 else
9790 HAVE_SYS_TYPES_H=0
9791 fi
8690e634 9792
8690e634 9793
8690e634 9794
8690e634 9795
8690e634 9796
8690e634
JK
9797
9798
8690e634 9799
472fa5ee
SM
9800 :
9801
9802
9803
9804
9805
8690e634 9806
6ec2e0f5
SDJ
9807
9808
9809 if test $gl_cv_have_include_next = yes; then
9810 gl_cv_next_stdint_h='<'stdint.h'>'
9811 else
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
9813$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
d0ac1c44 9814if ${gl_cv_next_stdint_h+:} false; then :
8690e634
JK
9815 $as_echo_n "(cached) " >&6
9816else
8690e634 9817
6ec2e0f5 9818 if test $ac_cv_header_stdint_h = yes; then
8690e634 9819
8690e634 9820
8690e634 9821
6ec2e0f5
SDJ
9822
9823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9824/* end confdefs.h. */
9825#include <stdint.h>
8690e634 9826_ACEOF
6ec2e0f5
SDJ
9827 case "$host_os" in
9828 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9829 *) gl_absname_cpp="$ac_cpp" ;;
9830 esac
8690e634 9831
6ec2e0f5
SDJ
9832 case "$host_os" in
9833 mingw*)
9834 gl_dirsep_regex='[/\\]'
9835 ;;
9836 *)
9837 gl_dirsep_regex='\/'
9838 ;;
9839 esac
9840 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9841 gl_header_literal_regex=`echo 'stdint.h' \
9842 | sed -e "$gl_make_literal_regex_sed"`
9843 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9844 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9845 s|^/[^/]|//&|
9846 p
9847 q
9848 }'
9849
9850 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9851 sed -n "$gl_absolute_header_sed"`
9852
9853 gl_header=$gl_cv_absolute_stdint_h
9854 gl_cv_next_stdint_h='"'$gl_header'"'
9855 else
9856 gl_cv_next_stdint_h='<'stdint.h'>'
9857 fi
9858
9859
9860fi
9861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
9862$as_echo "$gl_cv_next_stdint_h" >&6; }
9863 fi
9864 NEXT_STDINT_H=$gl_cv_next_stdint_h
9865
9866 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9867 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9868 gl_next_as_first_directive='<'stdint.h'>'
9869 else
9870 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9871 gl_next_as_first_directive=$gl_cv_next_stdint_h
9872 fi
9873 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
8690e634
JK
9874
9875
9876
9877
6ec2e0f5
SDJ
9878 if test $ac_cv_header_stdint_h = yes; then
9879 HAVE_STDINT_H=1
9880 else
9881 HAVE_STDINT_H=0
9882 fi
9883
9884
9885 if test $ac_cv_header_stdint_h = yes; then
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
9887$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
d0ac1c44 9888if ${gl_cv_header_working_stdint_h+:} false; then :
8690e634
JK
9889 $as_echo_n "(cached) " >&6
9890else
6ec2e0f5
SDJ
9891 gl_cv_header_working_stdint_h=no
9892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
9893/* end confdefs.h. */
9894
6ec2e0f5
SDJ
9895
9896#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
9897#define __STDC_CONSTANT_MACROS 1
9898#define __STDC_LIMIT_MACROS 1
9899#include <stdint.h>
9900/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
9901#if !(defined WCHAR_MIN && defined WCHAR_MAX)
9902#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
9903#endif
9904
9905
8690e634
JK
9906 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9907 included before <wchar.h>. */
9908 #include <stddef.h>
9909 #include <signal.h>
9910 #if HAVE_WCHAR_H
9911 # include <stdio.h>
9912 # include <time.h>
9913 # include <wchar.h>
9914 #endif
9915
8690e634 9916
6ec2e0f5
SDJ
9917#ifdef INT8_MAX
9918int8_t a1 = INT8_MAX;
9919int8_t a1min = INT8_MIN;
9920#endif
9921#ifdef INT16_MAX
9922int16_t a2 = INT16_MAX;
9923int16_t a2min = INT16_MIN;
9924#endif
9925#ifdef INT32_MAX
9926int32_t a3 = INT32_MAX;
9927int32_t a3min = INT32_MIN;
9928#endif
9929#ifdef INT64_MAX
9930int64_t a4 = INT64_MAX;
9931int64_t a4min = INT64_MIN;
9932#endif
9933#ifdef UINT8_MAX
9934uint8_t b1 = UINT8_MAX;
9935#else
9936typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
9937#endif
9938#ifdef UINT16_MAX
9939uint16_t b2 = UINT16_MAX;
9940#endif
9941#ifdef UINT32_MAX
9942uint32_t b3 = UINT32_MAX;
9943#endif
9944#ifdef UINT64_MAX
9945uint64_t b4 = UINT64_MAX;
9946#endif
9947int_least8_t c1 = INT8_C (0x7f);
9948int_least8_t c1max = INT_LEAST8_MAX;
9949int_least8_t c1min = INT_LEAST8_MIN;
9950int_least16_t c2 = INT16_C (0x7fff);
9951int_least16_t c2max = INT_LEAST16_MAX;
9952int_least16_t c2min = INT_LEAST16_MIN;
9953int_least32_t c3 = INT32_C (0x7fffffff);
9954int_least32_t c3max = INT_LEAST32_MAX;
9955int_least32_t c3min = INT_LEAST32_MIN;
9956int_least64_t c4 = INT64_C (0x7fffffffffffffff);
9957int_least64_t c4max = INT_LEAST64_MAX;
9958int_least64_t c4min = INT_LEAST64_MIN;
9959uint_least8_t d1 = UINT8_C (0xff);
9960uint_least8_t d1max = UINT_LEAST8_MAX;
9961uint_least16_t d2 = UINT16_C (0xffff);
9962uint_least16_t d2max = UINT_LEAST16_MAX;
9963uint_least32_t d3 = UINT32_C (0xffffffff);
9964uint_least32_t d3max = UINT_LEAST32_MAX;
9965uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
9966uint_least64_t d4max = UINT_LEAST64_MAX;
9967int_fast8_t e1 = INT_FAST8_MAX;
9968int_fast8_t e1min = INT_FAST8_MIN;
9969int_fast16_t e2 = INT_FAST16_MAX;
9970int_fast16_t e2min = INT_FAST16_MIN;
9971int_fast32_t e3 = INT_FAST32_MAX;
9972int_fast32_t e3min = INT_FAST32_MIN;
9973int_fast64_t e4 = INT_FAST64_MAX;
9974int_fast64_t e4min = INT_FAST64_MIN;
9975uint_fast8_t f1 = UINT_FAST8_MAX;
9976uint_fast16_t f2 = UINT_FAST16_MAX;
9977uint_fast32_t f3 = UINT_FAST32_MAX;
9978uint_fast64_t f4 = UINT_FAST64_MAX;
9979#ifdef INTPTR_MAX
9980intptr_t g = INTPTR_MAX;
9981intptr_t gmin = INTPTR_MIN;
9982#endif
9983#ifdef UINTPTR_MAX
9984uintptr_t h = UINTPTR_MAX;
9985#endif
9986intmax_t i = INTMAX_MAX;
9987uintmax_t j = UINTMAX_MAX;
8690e634 9988
6ec2e0f5
SDJ
9989/* Check that SIZE_MAX has the correct type, if possible. */
9990#if 201112 <= __STDC_VERSION__
9991int k = _Generic (SIZE_MAX, size_t: 0);
9992#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
9993 || (0x5110 <= __SUNPRO_C && !__STDC__))
9994extern size_t k;
9995extern __typeof__ (SIZE_MAX) k;
9996#endif
8690e634 9997
6ec2e0f5
SDJ
9998#include <limits.h> /* for CHAR_BIT */
9999#define TYPE_MINIMUM(t) \
10000 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
10001#define TYPE_MAXIMUM(t) \
10002 ((t) ((t) 0 < (t) -1 \
10003 ? (t) -1 \
10004 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
10005struct s {
10006 int check_PTRDIFF:
10007 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
10008 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
10009 ? 1 : -1;
10010 /* Detect bug in FreeBSD 6.0 / ia64. */
10011 int check_SIG_ATOMIC:
10012 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
10013 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
10014 ? 1 : -1;
10015 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
10016 int check_WCHAR:
10017 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
10018 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
10019 ? 1 : -1;
10020 /* Detect bug in mingw. */
10021 int check_WINT:
10022 WINT_MIN == TYPE_MINIMUM (wint_t)
10023 && WINT_MAX == TYPE_MAXIMUM (wint_t)
10024 ? 1 : -1;
8690e634 10025
6ec2e0f5
SDJ
10026 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
10027 int check_UINT8_C:
10028 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
10029 int check_UINT16_C:
10030 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
8690e634 10031
6ec2e0f5
SDJ
10032 /* Detect bugs in OpenBSD 3.9 stdint.h. */
10033#ifdef UINT8_MAX
10034 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
10035#endif
10036#ifdef UINT16_MAX
10037 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
10038#endif
10039#ifdef UINT32_MAX
10040 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
10041#endif
10042#ifdef UINT64_MAX
10043 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
10044#endif
10045 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
10046 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
10047 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
10048 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
10049 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
10050 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
10051 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
10052 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
10053 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
10054 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
10055 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
10056};
8690e634 10057
8690e634
JK
10058int
10059main ()
10060{
10061
10062 ;
10063 return 0;
10064}
10065_ACEOF
10066if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5
SDJ
10067 if test "$cross_compiling" = yes; then :
10068 gl_cv_header_working_stdint_h=yes
8690e634 10069
6ec2e0f5
SDJ
10070else
10071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10072/* end confdefs.h. */
8690e634 10073
8690e634 10074
6ec2e0f5
SDJ
10075#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10076#define __STDC_CONSTANT_MACROS 1
10077#define __STDC_LIMIT_MACROS 1
10078#include <stdint.h>
8690e634 10079
8690e634
JK
10080
10081 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10082 included before <wchar.h>. */
10083 #include <stddef.h>
10084 #include <signal.h>
10085 #if HAVE_WCHAR_H
10086 # include <stdio.h>
10087 # include <time.h>
10088 # include <wchar.h>
10089 #endif
10090
8690e634 10091
6ec2e0f5
SDJ
10092#include <stdio.h>
10093#include <string.h>
10094#define MVAL(macro) MVAL1(macro)
10095#define MVAL1(expression) #expression
10096static const char *macro_values[] =
10097 {
10098#ifdef INT8_MAX
10099 MVAL (INT8_MAX),
10100#endif
10101#ifdef INT16_MAX
10102 MVAL (INT16_MAX),
10103#endif
10104#ifdef INT32_MAX
10105 MVAL (INT32_MAX),
10106#endif
10107#ifdef INT64_MAX
10108 MVAL (INT64_MAX),
10109#endif
10110#ifdef UINT8_MAX
10111 MVAL (UINT8_MAX),
10112#endif
10113#ifdef UINT16_MAX
10114 MVAL (UINT16_MAX),
10115#endif
10116#ifdef UINT32_MAX
10117 MVAL (UINT32_MAX),
10118#endif
10119#ifdef UINT64_MAX
10120 MVAL (UINT64_MAX),
10121#endif
10122 NULL
10123 };
10124
10125int
10126main ()
10127{
10128
10129 const char **mv;
10130 for (mv = macro_values; *mv != NULL; mv++)
10131 {
10132 const char *value = *mv;
10133 /* Test whether it looks like a cast expression. */
10134 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
10135 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
10136 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
10137 || strncmp (value, "((int)"/*)*/, 6) == 0
10138 || strncmp (value, "((signed short)"/*)*/, 15) == 0
10139 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
10140 return mv - macro_values + 1;
10141 }
10142 return 0;
10143
10144 ;
8690e634
JK
10145 return 0;
10146}
10147_ACEOF
6ec2e0f5
SDJ
10148if ac_fn_c_try_run "$LINENO"; then :
10149 gl_cv_header_working_stdint_h=yes
8690e634 10150fi
6ec2e0f5
SDJ
10151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10152 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 10153fi
8690e634
JK
10154
10155
6ec2e0f5
SDJ
10156fi
10157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 10158
6ec2e0f5
SDJ
10159fi
10160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
10161$as_echo "$gl_cv_header_working_stdint_h" >&6; }
8690e634
JK
10162 fi
10163
6ec2e0f5
SDJ
10164 HAVE_C99_STDINT_H=0
10165 HAVE_SYS_BITYPES_H=0
10166 HAVE_SYS_INTTYPES_H=0
10167 STDINT_H=stdint.h
10168 if test "$gl_cv_header_working_stdint_h" = yes; then
10169 HAVE_C99_STDINT_H=1
10170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
10171$as_echo_n "checking whether stdint.h predates C++11... " >&6; }
d0ac1c44 10172if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then :
6ec2e0f5 10173 $as_echo_n "(cached) " >&6
49e4877c 10174else
6ec2e0f5
SDJ
10175 gl_cv_header_stdint_predates_cxx11_h=yes
10176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10177/* end confdefs.h. */
49e4877c
PA
10178
10179
6ec2e0f5
SDJ
10180#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10181#include <stdint.h>
49e4877c
PA
10182
10183
6ec2e0f5
SDJ
10184 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10185 included before <wchar.h>. */
10186 #include <stddef.h>
10187 #include <signal.h>
10188 #if HAVE_WCHAR_H
10189 # include <stdio.h>
10190 # include <time.h>
10191 # include <wchar.h>
10192 #endif
49e4877c 10193
8690e634 10194
6ec2e0f5
SDJ
10195intmax_t im = INTMAX_MAX;
10196int32_t i32 = INT32_C (0x7fffffff);
8690e634 10197
6ec2e0f5
SDJ
10198int
10199main ()
10200{
8690e634 10201
6ec2e0f5
SDJ
10202 ;
10203 return 0;
10204}
10205_ACEOF
10206if ac_fn_c_try_compile "$LINENO"; then :
10207 gl_cv_header_stdint_predates_cxx11_h=no
10208fi
10209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10210fi
10211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
10212$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
8690e634 10213
6ec2e0f5 10214 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
8690e634 10215
6ec2e0f5 10216$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
8690e634
JK
10217
10218
6ec2e0f5 10219$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
8690e634 10220
6ec2e0f5
SDJ
10221 fi
10222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
10223$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
d0ac1c44 10224if ${gl_cv_header_stdint_width+:} false; then :
6ec2e0f5
SDJ
10225 $as_echo_n "(cached) " >&6
10226else
10227 gl_cv_header_stdint_width=no
10228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10229/* end confdefs.h. */
8690e634 10230
6ec2e0f5
SDJ
10231 /* Work if build is not clean. */
10232 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
10233 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
10234 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
10235 #endif
10236 #include <stdint.h>
8690e634 10237
6ec2e0f5
SDJ
10238 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10239 included before <wchar.h>. */
10240 #include <stddef.h>
10241 #include <signal.h>
10242 #if HAVE_WCHAR_H
10243 # include <stdio.h>
10244 # include <time.h>
10245 # include <wchar.h>
10246 #endif
8690e634 10247
6ec2e0f5 10248 int iw = UINTMAX_WIDTH;
8690e634 10249
6ec2e0f5
SDJ
10250int
10251main ()
10252{
8690e634 10253
6ec2e0f5
SDJ
10254 ;
10255 return 0;
10256}
10257_ACEOF
10258if ac_fn_c_try_compile "$LINENO"; then :
10259 gl_cv_header_stdint_width=yes
10260fi
10261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10262fi
10263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
10264$as_echo "$gl_cv_header_stdint_width" >&6; }
10265 if test "$gl_cv_header_stdint_width" = yes; then
10266 STDINT_H=
10267 fi
10268 else
10269 for ac_header in sys/inttypes.h sys/bitypes.h
10270do :
10271 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10272ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
d0ac1c44 10273if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6ec2e0f5
SDJ
10274 cat >>confdefs.h <<_ACEOF
10275#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10276_ACEOF
8690e634 10277
6ec2e0f5 10278fi
8690e634 10279
6ec2e0f5 10280done
8690e634 10281
6ec2e0f5
SDJ
10282 if test $ac_cv_header_sys_inttypes_h = yes; then
10283 HAVE_SYS_INTTYPES_H=1
10284 fi
10285 if test $ac_cv_header_sys_bitypes_h = yes; then
10286 HAVE_SYS_BITYPES_H=1
10287 fi
8690e634
JK
10288
10289
6ec2e0f5 10290 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634
JK
10291
10292
6ec2e0f5
SDJ
10293 for gltype in ptrdiff_t size_t ; do
10294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
10295$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 10296if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
8690e634
JK
10297 $as_echo_n "(cached) " >&6
10298else
6ec2e0f5
SDJ
10299 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
10300 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10301 included before <wchar.h>. */
10302 #include <stddef.h>
10303 #include <signal.h>
10304 #if HAVE_WCHAR_H
10305 # include <stdio.h>
10306 # include <time.h>
10307 # include <wchar.h>
10308 #endif
8690e634 10309
6ec2e0f5 10310#include <limits.h>"; then :
4a626d0a 10311
6ec2e0f5
SDJ
10312else
10313 result=unknown
10314fi
4a626d0a 10315
6ec2e0f5 10316 eval gl_cv_bitsizeof_${gltype}=\$result
4a626d0a 10317
6ec2e0f5
SDJ
10318fi
10319eval ac_res=\$gl_cv_bitsizeof_${gltype}
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10321$as_echo "$ac_res" >&6; }
10322 eval result=\$gl_cv_bitsizeof_${gltype}
10323 if test $result = unknown; then
10324 result=0
10325 fi
10326 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10327 cat >>confdefs.h <<_ACEOF
10328#define BITSIZEOF_${GLTYPE} $result
10329_ACEOF
4a626d0a 10330
6ec2e0f5
SDJ
10331 eval BITSIZEOF_${GLTYPE}=\$result
10332 done
4a626d0a 10333
8690e634 10334
6ec2e0f5 10335 fi
8690e634 10336
8690e634 10337
6ec2e0f5
SDJ
10338 for gltype in sig_atomic_t wchar_t wint_t ; do
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
10340$as_echo_n "checking for bit size of $gltype... " >&6; }
d0ac1c44 10341if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
6ec2e0f5
SDJ
10342 $as_echo_n "(cached) " >&6
10343else
10344 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
10345 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10346 included before <wchar.h>. */
10347 #include <stddef.h>
10348 #include <signal.h>
10349 #if HAVE_WCHAR_H
10350 # include <stdio.h>
10351 # include <time.h>
10352 # include <wchar.h>
10353 #endif
8690e634 10354
6ec2e0f5
SDJ
10355#include <limits.h>"; then :
10356
10357else
10358 result=unknown
10359fi
8690e634 10360
6ec2e0f5 10361 eval gl_cv_bitsizeof_${gltype}=\$result
8690e634 10362
6ec2e0f5
SDJ
10363fi
10364eval ac_res=\$gl_cv_bitsizeof_${gltype}
10365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10366$as_echo "$ac_res" >&6; }
10367 eval result=\$gl_cv_bitsizeof_${gltype}
10368 if test $result = unknown; then
10369 result=0
10370 fi
10371 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10372 cat >>confdefs.h <<_ACEOF
10373#define BITSIZEOF_${GLTYPE} $result
10374_ACEOF
8690e634 10375
6ec2e0f5
SDJ
10376 eval BITSIZEOF_${GLTYPE}=\$result
10377 done
8690e634
JK
10378
10379
10380
10381
6ec2e0f5
SDJ
10382 for gltype in sig_atomic_t wchar_t wint_t ; do
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
10384$as_echo_n "checking whether $gltype is signed... " >&6; }
d0ac1c44 10385if eval \${gl_cv_type_${gltype}_signed+:} false; then :
8690e634
JK
10386 $as_echo_n "(cached) " >&6
10387else
10388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10389/* end confdefs.h. */
8690e634 10390
6ec2e0f5
SDJ
10391 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10392 included before <wchar.h>. */
10393 #include <stddef.h>
10394 #include <signal.h>
10395 #if HAVE_WCHAR_H
10396 # include <stdio.h>
10397 # include <time.h>
10398 # include <wchar.h>
10399 #endif
10400
10401 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
8690e634
JK
10402int
10403main ()
10404{
6ec2e0f5 10405
8690e634
JK
10406 ;
10407 return 0;
10408}
10409_ACEOF
10410if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10411 result=yes
8690e634 10412else
6ec2e0f5 10413 result=no
8690e634
JK
10414fi
10415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
10416 eval gl_cv_type_${gltype}_signed=\$result
10417
8690e634 10418fi
6ec2e0f5 10419eval ac_res=\$gl_cv_type_${gltype}_signed
8690e634
JK
10420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10421$as_echo "$ac_res" >&6; }
6ec2e0f5
SDJ
10422 eval result=\$gl_cv_type_${gltype}_signed
10423 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10424 if test "$result" = yes; then
10425 cat >>confdefs.h <<_ACEOF
10426#define HAVE_SIGNED_${GLTYPE} 1
8690e634
JK
10427_ACEOF
10428
6ec2e0f5
SDJ
10429 eval HAVE_SIGNED_${GLTYPE}=1
10430 else
10431 eval HAVE_SIGNED_${GLTYPE}=0
10432 fi
10433 done
8690e634 10434
8690e634 10435
6ec2e0f5
SDJ
10436 gl_cv_type_ptrdiff_t_signed=yes
10437 gl_cv_type_size_t_signed=no
10438 if test $APPLE_UNIVERSAL_BUILD = 0; then
8690e634 10439
8690e634 10440
6ec2e0f5
SDJ
10441 for gltype in ptrdiff_t size_t ; do
10442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
10443$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 10444if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
10445 $as_echo_n "(cached) " >&6
10446else
6ec2e0f5
SDJ
10447 eval gl_cv_type_${gltype}_suffix=no
10448 eval result=\$gl_cv_type_${gltype}_signed
10449 if test "$result" = yes; then
10450 glsufu=
10451 else
10452 glsufu=u
10453 fi
10454 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
10455 case $glsuf in
10456 '') gltype1='int';;
10457 l) gltype1='long int';;
10458 ll) gltype1='long long int';;
10459 i64) gltype1='__int64';;
10460 u) gltype1='unsigned int';;
10461 ul) gltype1='unsigned long int';;
10462 ull) gltype1='unsigned long long int';;
10463 ui64)gltype1='unsigned __int64';;
10464 esac
10465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
10466/* end confdefs.h. */
10467
6ec2e0f5
SDJ
10468 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10469 included before <wchar.h>. */
10470 #include <stddef.h>
10471 #include <signal.h>
10472 #if HAVE_WCHAR_H
10473 # include <stdio.h>
10474 # include <time.h>
10475 # include <wchar.h>
10476 #endif
8690e634 10477
6ec2e0f5
SDJ
10478 extern $gltype foo;
10479 extern $gltype1 foo;
8690e634
JK
10480int
10481main ()
10482{
10483
10484 ;
10485 return 0;
10486}
10487_ACEOF
10488if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10489 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634
JK
10490fi
10491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
10492 eval result=\$gl_cv_type_${gltype}_suffix
10493 test "$result" != no && break
10494 done
8690e634 10495fi
6ec2e0f5
SDJ
10496eval ac_res=\$gl_cv_type_${gltype}_suffix
10497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10498$as_echo "$ac_res" >&6; }
10499 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10500 eval result=\$gl_cv_type_${gltype}_suffix
10501 test "$result" = no && result=
10502 eval ${GLTYPE}_SUFFIX=\$result
10503 cat >>confdefs.h <<_ACEOF
10504#define ${GLTYPE}_SUFFIX $result
8690e634
JK
10505_ACEOF
10506
6ec2e0f5 10507 done
8690e634
JK
10508
10509
6ec2e0f5 10510 fi
8690e634 10511
6ec2e0f5
SDJ
10512
10513 for gltype in sig_atomic_t wchar_t wint_t ; do
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
10515$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
d0ac1c44 10516if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
8690e634
JK
10517 $as_echo_n "(cached) " >&6
10518else
6ec2e0f5
SDJ
10519 eval gl_cv_type_${gltype}_suffix=no
10520 eval result=\$gl_cv_type_${gltype}_signed
10521 if test "$result" = yes; then
10522 glsufu=
10523 else
10524 glsufu=u
10525 fi
10526 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
10527 case $glsuf in
10528 '') gltype1='int';;
10529 l) gltype1='long int';;
10530 ll) gltype1='long long int';;
10531 i64) gltype1='__int64';;
10532 u) gltype1='unsigned int';;
10533 ul) gltype1='unsigned long int';;
10534 ull) gltype1='unsigned long long int';;
10535 ui64)gltype1='unsigned __int64';;
10536 esac
10537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 10538/* end confdefs.h. */
88b48903 10539
6ec2e0f5
SDJ
10540 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10541 included before <wchar.h>. */
10542 #include <stddef.h>
10543 #include <signal.h>
10544 #if HAVE_WCHAR_H
10545 # include <stdio.h>
10546 # include <time.h>
10547 # include <wchar.h>
10548 #endif
88b48903 10549
6ec2e0f5
SDJ
10550 extern $gltype foo;
10551 extern $gltype1 foo;
88b48903
WN
10552int
10553main ()
10554{
88b48903
WN
10555
10556 ;
10557 return 0;
10558}
10559_ACEOF
10560if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10561 eval gl_cv_type_${gltype}_suffix=\$glsuf
8690e634 10562fi
88b48903 10563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
10564 eval result=\$gl_cv_type_${gltype}_suffix
10565 test "$result" != no && break
10566 done
8690e634 10567fi
6ec2e0f5
SDJ
10568eval ac_res=\$gl_cv_type_${gltype}_suffix
10569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10570$as_echo "$ac_res" >&6; }
10571 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
10572 eval result=\$gl_cv_type_${gltype}_suffix
10573 test "$result" = no && result=
10574 eval ${GLTYPE}_SUFFIX=\$result
10575 cat >>confdefs.h <<_ACEOF
10576#define ${GLTYPE}_SUFFIX $result
88b48903 10577_ACEOF
8690e634 10578
6ec2e0f5 10579 done
8690e634
JK
10580
10581
10582
6ec2e0f5
SDJ
10583 if test $BITSIZEOF_WINT_T -lt 32; then
10584 BITSIZEOF_WINT_T=32
10585 fi
8690e634 10586
6ec2e0f5
SDJ
10587 fi
10588
10589 # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
10590 LIMITS_H=limits.h
10591 if test -n "$LIMITS_H"; then
10592 GL_GENERATE_LIMITS_H_TRUE=
10593 GL_GENERATE_LIMITS_H_FALSE='#'
88b48903 10594else
6ec2e0f5
SDJ
10595 GL_GENERATE_LIMITS_H_TRUE='#'
10596 GL_GENERATE_LIMITS_H_FALSE=
88b48903 10597fi
8690e634
JK
10598
10599
10600
10601
10602
6ec2e0f5
SDJ
10603
10604 if test -n "$STDINT_H"; then
10605 GL_GENERATE_STDINT_H_TRUE=
10606 GL_GENERATE_STDINT_H_FALSE='#'
10607else
10608 GL_GENERATE_STDINT_H_TRUE='#'
10609 GL_GENERATE_STDINT_H_FALSE=
88b48903 10610fi
8690e634 10611
8690e634
JK
10612
10613
10614
6ec2e0f5 10615
472fa5ee
SM
10616
10617
10618
6ec2e0f5
SDJ
10619 GNULIB_IMAXABS=0;
10620 GNULIB_IMAXDIV=0;
10621 GNULIB_STRTOIMAX=0;
10622 GNULIB_STRTOUMAX=0;
10623 HAVE_DECL_IMAXABS=1;
10624 HAVE_DECL_IMAXDIV=1;
10625 HAVE_DECL_STRTOIMAX=1;
10626 HAVE_DECL_STRTOUMAX=1;
10627 REPLACE_STRTOIMAX=0;
10628 REPLACE_STRTOUMAX=0;
10629 INT32_MAX_LT_INTMAX_MAX=1;
10630 INT64_MAX_EQ_LONG_MAX='defined _LP64';
10631 PRI_MACROS_BROKEN=0;
10632 PRIPTR_PREFIX=__PRIPTR_PREFIX;
10633 UINT32_MAX_LT_UINTMAX_MAX=1;
10634 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
10635
10636
10637
10638
472fa5ee
SM
10639 :
10640
10641
10642
10643
10644
10645
10646
6ec2e0f5
SDJ
10647
10648
10649
10650
10651
10652
472fa5ee
SM
10653 :
10654
10655
10656
6ec2e0f5
SDJ
10657
10658
10659
10660
10661
10662 if test $gl_cv_have_include_next = yes; then
10663 gl_cv_next_inttypes_h='<'inttypes.h'>'
10664 else
10665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
10666$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
d0ac1c44 10667if ${gl_cv_next_inttypes_h+:} false; then :
6ec2e0f5 10668 $as_echo_n "(cached) " >&6
88b48903 10669else
8690e634 10670
6ec2e0f5 10671 if test $ac_cv_header_inttypes_h = yes; then
8690e634
JK
10672
10673
8690e634
JK
10674
10675
6ec2e0f5
SDJ
10676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10677/* end confdefs.h. */
10678#include <inttypes.h>
88b48903 10679_ACEOF
6ec2e0f5
SDJ
10680 case "$host_os" in
10681 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10682 *) gl_absname_cpp="$ac_cpp" ;;
10683 esac
8690e634 10684
6ec2e0f5
SDJ
10685 case "$host_os" in
10686 mingw*)
10687 gl_dirsep_regex='[/\\]'
10688 ;;
10689 *)
10690 gl_dirsep_regex='\/'
88b48903
WN
10691 ;;
10692 esac
6ec2e0f5
SDJ
10693 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10694 gl_header_literal_regex=`echo 'inttypes.h' \
10695 | sed -e "$gl_make_literal_regex_sed"`
10696 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10697 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10698 s|^/[^/]|//&|
10699 p
10700 q
10701 }'
8690e634 10702
6ec2e0f5
SDJ
10703 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10704 sed -n "$gl_absolute_header_sed"`
8690e634 10705
6ec2e0f5
SDJ
10706 gl_header=$gl_cv_absolute_inttypes_h
10707 gl_cv_next_inttypes_h='"'$gl_header'"'
10708 else
10709 gl_cv_next_inttypes_h='<'inttypes.h'>'
10710 fi
88b48903 10711
88b48903 10712
88b48903 10713fi
6ec2e0f5
SDJ
10714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
10715$as_echo "$gl_cv_next_inttypes_h" >&6; }
10716 fi
10717 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
88b48903 10718
6ec2e0f5
SDJ
10719 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10720 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10721 gl_next_as_first_directive='<'inttypes.h'>'
10722 else
10723 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10724 gl_next_as_first_directive=$gl_cv_next_inttypes_h
10725 fi
10726 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
88b48903 10727
6ec2e0f5
SDJ
10728
10729
10730
10731
10732
10733
10734
10735 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
10736 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10738$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
d0ac1c44 10739if eval \${$as_gl_Symbol+:} false; then :
6ec2e0f5
SDJ
10740 $as_echo_n "(cached) " >&6
10741else
10742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903 10743/* end confdefs.h. */
6ec2e0f5 10744#include <inttypes.h>
88b48903
WN
10745
10746int
10747main ()
10748{
6ec2e0f5
SDJ
10749#undef $gl_func
10750 (void) $gl_func;
88b48903
WN
10751 ;
10752 return 0;
10753}
10754_ACEOF
10755if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 10756 eval "$as_gl_Symbol=yes"
88b48903 10757else
6ec2e0f5 10758 eval "$as_gl_Symbol=no"
88b48903
WN
10759fi
10760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10761fi
6ec2e0f5
SDJ
10762eval ac_res=\$$as_gl_Symbol
10763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10764$as_echo "$ac_res" >&6; }
d0ac1c44 10765 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
6ec2e0f5
SDJ
10766 cat >>confdefs.h <<_ACEOF
10767#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10768_ACEOF
10769
10770 eval ac_cv_have_decl_$gl_func=yes
10771fi
10772 done
10773
10774
10775
10776 for ac_header in inttypes.h
10777do :
10778 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
d0ac1c44 10779if test "x$ac_cv_header_inttypes_h" = xyes; then :
6ec2e0f5
SDJ
10780 cat >>confdefs.h <<_ACEOF
10781#define HAVE_INTTYPES_H 1
10782_ACEOF
10783
10784fi
10785
10786done
10787
10788 if test $ac_cv_header_inttypes_h = yes; then
10789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
10790$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
d0ac1c44 10791if ${gt_cv_inttypes_pri_broken+:} false; then :
6ec2e0f5
SDJ
10792 $as_echo_n "(cached) " >&6
10793else
10794
10795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10796/* end confdefs.h. */
10797
10798#include <inttypes.h>
10799#ifdef PRId32
10800char *p = PRId32;
10801#endif
10802
10803int
10804main ()
10805{
10806
10807 ;
10808 return 0;
10809}
10810_ACEOF
10811if ac_fn_c_try_compile "$LINENO"; then :
10812 gt_cv_inttypes_pri_broken=no
10813else
10814 gt_cv_inttypes_pri_broken=yes
10815fi
10816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10817
10818fi
10819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
10820$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
10821 fi
10822 if test "$gt_cv_inttypes_pri_broken" = yes; then
10823
10824cat >>confdefs.h <<_ACEOF
10825#define PRI_MACROS_BROKEN 1
10826_ACEOF
10827
10828 PRI_MACROS_BROKEN=1
10829 else
10830 PRI_MACROS_BROKEN=0
10831 fi
10832
10833
10834
10835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
10836$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
d0ac1c44 10837if ${gl_cv_cc_double_expbit0+:} false; then :
6ec2e0f5
SDJ
10838 $as_echo_n "(cached) " >&6
10839else
10840
10841 if test "$cross_compiling" = yes; then :
10842
10843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10844/* end confdefs.h. */
10845
10846#if defined arm || defined __arm || defined __arm__
10847 mixed_endianness
10848#endif
10849
10850_ACEOF
10851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10852 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
10853 gl_cv_cc_double_expbit0="unknown"
10854else
10855
10856 :
d0ac1c44 10857if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
10858 $as_echo_n "(cached) " >&6
10859else
10860 ac_cv_c_bigendian=unknown
10861 # See if we're dealing with a universal compiler.
10862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10863/* end confdefs.h. */
10864#ifndef __APPLE_CC__
10865 not a universal capable compiler
10866 #endif
10867 typedef int dummy;
10868
10869_ACEOF
10870if ac_fn_c_try_compile "$LINENO"; then :
10871
10872 # Check for potential -arch flags. It is not universal unless
10873 # there are at least two -arch flags with different values.
10874 ac_arch=
10875 ac_prev=
10876 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10877 if test -n "$ac_prev"; then
10878 case $ac_word in
10879 i?86 | x86_64 | ppc | ppc64)
10880 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10881 ac_arch=$ac_word
10882 else
10883 ac_cv_c_bigendian=universal
10884 break
10885 fi
10886 ;;
10887 esac
10888 ac_prev=
10889 elif test "x$ac_word" = "x-arch"; then
10890 ac_prev=arch
10891 fi
10892 done
10893fi
10894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10895 if test $ac_cv_c_bigendian = unknown; then
10896 # See if sys/param.h defines the BYTE_ORDER macro.
10897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10898/* end confdefs.h. */
10899#include <sys/types.h>
10900 #include <sys/param.h>
10901
10902int
10903main ()
10904{
10905#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10906 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10907 && LITTLE_ENDIAN)
10908 bogus endian macros
10909 #endif
10910
10911 ;
10912 return 0;
10913}
10914_ACEOF
10915if ac_fn_c_try_compile "$LINENO"; then :
10916 # It does; now see whether it defined to BIG_ENDIAN or not.
10917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10918/* end confdefs.h. */
10919#include <sys/types.h>
10920 #include <sys/param.h>
10921
10922int
10923main ()
10924{
10925#if BYTE_ORDER != BIG_ENDIAN
10926 not big endian
10927 #endif
10928
10929 ;
10930 return 0;
10931}
10932_ACEOF
10933if ac_fn_c_try_compile "$LINENO"; then :
10934 ac_cv_c_bigendian=yes
10935else
10936 ac_cv_c_bigendian=no
10937fi
10938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10939fi
10940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10941 fi
10942 if test $ac_cv_c_bigendian = unknown; then
10943 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10945/* end confdefs.h. */
10946#include <limits.h>
10947
10948int
88b48903
WN
10949main ()
10950{
10951#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10952 bogus endian macros
10953 #endif
10954
10955 ;
10956 return 0;
10957}
10958_ACEOF
10959if ac_fn_c_try_compile "$LINENO"; then :
10960 # It does; now see whether it defined to _BIG_ENDIAN or not.
10961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10962/* end confdefs.h. */
10963#include <limits.h>
10964
10965int
10966main ()
10967{
10968#ifndef _BIG_ENDIAN
10969 not big endian
10970 #endif
10971
10972 ;
10973 return 0;
10974}
10975_ACEOF
10976if ac_fn_c_try_compile "$LINENO"; then :
10977 ac_cv_c_bigendian=yes
10978else
10979 ac_cv_c_bigendian=no
10980fi
10981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10982fi
10983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10984 fi
10985 if test $ac_cv_c_bigendian = unknown; then
10986 # Compile a test program.
10987 if test "$cross_compiling" = yes; then :
10988 # Try to guess by grepping values from an object file.
10989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10990/* end confdefs.h. */
10991short int ascii_mm[] =
10992 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10993 short int ascii_ii[] =
10994 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10995 int use_ascii (int i) {
10996 return ascii_mm[i] + ascii_ii[i];
10997 }
10998 short int ebcdic_ii[] =
10999 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11000 short int ebcdic_mm[] =
11001 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11002 int use_ebcdic (int i) {
11003 return ebcdic_mm[i] + ebcdic_ii[i];
11004 }
11005 extern int foo;
11006
11007int
11008main ()
11009{
11010return use_ascii (foo) == use_ebcdic (foo);
11011 ;
11012 return 0;
11013}
11014_ACEOF
11015if ac_fn_c_try_compile "$LINENO"; then :
11016 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11017 ac_cv_c_bigendian=yes
11018 fi
11019 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11020 if test "$ac_cv_c_bigendian" = unknown; then
11021 ac_cv_c_bigendian=no
11022 else
11023 # finding both strings is unlikely to happen, but who knows?
11024 ac_cv_c_bigendian=unknown
11025 fi
11026 fi
11027fi
11028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11029else
11030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11031/* end confdefs.h. */
11032$ac_includes_default
11033int
11034main ()
11035{
11036
11037 /* Are we little or big endian? From Harbison&Steele. */
11038 union
11039 {
11040 long int l;
11041 char c[sizeof (long int)];
11042 } u;
11043 u.l = 1;
11044 return u.c[sizeof (long int) - 1] == 1;
11045
11046 ;
11047 return 0;
11048}
11049_ACEOF
11050if ac_fn_c_try_run "$LINENO"; then :
11051 ac_cv_c_bigendian=no
11052else
11053 ac_cv_c_bigendian=yes
11054fi
11055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11056 conftest.$ac_objext conftest.beam conftest.$ac_ext
11057fi
11058
11059 fi
11060fi
6ec2e0f5 11061:
88b48903
WN
11062 case $ac_cv_c_bigendian in #(
11063 yes)
6ec2e0f5 11064 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
88b48903 11065 no)
6ec2e0f5 11066 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
88b48903
WN
11067 universal)
11068
11069$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11070
11071 ;; #(
11072 *)
6ec2e0f5 11073 gl_cv_cc_double_expbit0="unknown" ;;
88b48903
WN
11074 esac
11075
11076
6ec2e0f5
SDJ
11077fi
11078rm -f conftest*
88b48903 11079
2196f55f 11080
2196f55f
YQ
11081else
11082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11083/* end confdefs.h. */
2196f55f 11084
6ec2e0f5
SDJ
11085#include <float.h>
11086#include <stddef.h>
11087#include <stdio.h>
11088#include <string.h>
11089#define NWORDS \
11090 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
11091typedef union { double value; unsigned int word[NWORDS]; } memory_double;
11092static unsigned int ored_words[NWORDS];
11093static unsigned int anded_words[NWORDS];
11094static void add_to_ored_words (double x)
2196f55f 11095{
6ec2e0f5
SDJ
11096 memory_double m;
11097 size_t i;
11098 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
11099 memset (&m, 0, sizeof (memory_double));
11100 m.value = x;
11101 for (i = 0; i < NWORDS; i++)
11102 {
11103 ored_words[i] |= m.word[i];
11104 anded_words[i] &= m.word[i];
11105 }
2196f55f 11106}
6ec2e0f5 11107int main ()
88b48903 11108{
6ec2e0f5
SDJ
11109 size_t j;
11110 FILE *fp = fopen ("conftest.out", "w");
11111 if (fp == NULL)
11112 return 1;
11113 for (j = 0; j < NWORDS; j++)
11114 anded_words[j] = ~ (unsigned int) 0;
11115 add_to_ored_words (0.25);
11116 add_to_ored_words (0.5);
11117 add_to_ored_words (1.0);
11118 add_to_ored_words (2.0);
11119 add_to_ored_words (4.0);
11120 /* Remove bits that are common (e.g. if representation of the first mantissa
11121 bit is explicit). */
11122 for (j = 0; j < NWORDS; j++)
11123 ored_words[j] &= ~anded_words[j];
11124 /* Now find the nonzero word. */
11125 for (j = 0; j < NWORDS; j++)
11126 if (ored_words[j] != 0)
11127 break;
11128 if (j < NWORDS)
11129 {
11130 size_t i;
11131 for (i = j + 1; i < NWORDS; i++)
11132 if (ored_words[i] != 0)
11133 {
11134 fprintf (fp, "unknown");
11135 return (fclose (fp) != 0);
11136 }
11137 for (i = 0; ; i++)
11138 if ((ored_words[j] >> i) & 1)
11139 {
11140 fprintf (fp, "word %d bit %d", (int) j, (int) i);
11141 return (fclose (fp) != 0);
11142 }
11143 }
11144 fprintf (fp, "unknown");
11145 return (fclose (fp) != 0);
88b48903 11146}
6ec2e0f5 11147
88b48903 11148_ACEOF
6ec2e0f5
SDJ
11149if ac_fn_c_try_run "$LINENO"; then :
11150 gl_cv_cc_double_expbit0=`cat conftest.out`
88b48903 11151else
6ec2e0f5 11152 gl_cv_cc_double_expbit0="unknown"
88b48903 11153fi
6ec2e0f5
SDJ
11154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11155 conftest.$ac_objext conftest.beam conftest.$ac_ext
11156fi
11157
11158 rm -f conftest.out
88b48903
WN
11159
11160fi
6ec2e0f5
SDJ
11161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
11162$as_echo "$gl_cv_cc_double_expbit0" >&6; }
11163 case "$gl_cv_cc_double_expbit0" in
11164 word*bit*)
11165 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
11166 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
88b48903 11167
6ec2e0f5
SDJ
11168cat >>confdefs.h <<_ACEOF
11169#define DBL_EXPBIT0_WORD $word
11170_ACEOF
88b48903 11171
88b48903 11172
6ec2e0f5
SDJ
11173cat >>confdefs.h <<_ACEOF
11174#define DBL_EXPBIT0_BIT $bit
11175_ACEOF
88b48903 11176
6ec2e0f5
SDJ
11177 ;;
11178 esac
88b48903
WN
11179
11180
6ec2e0f5
SDJ
11181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11182$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
d0ac1c44 11183if ${ac_cv_c_bigendian+:} false; then :
6ec2e0f5
SDJ
11184 $as_echo_n "(cached) " >&6
11185else
11186 ac_cv_c_bigendian=unknown
11187 # See if we're dealing with a universal compiler.
11188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11189/* end confdefs.h. */
11190#ifndef __APPLE_CC__
11191 not a universal capable compiler
11192 #endif
11193 typedef int dummy;
88b48903 11194
6ec2e0f5
SDJ
11195_ACEOF
11196if ac_fn_c_try_compile "$LINENO"; then :
88b48903 11197
6ec2e0f5
SDJ
11198 # Check for potential -arch flags. It is not universal unless
11199 # there are at least two -arch flags with different values.
11200 ac_arch=
11201 ac_prev=
11202 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11203 if test -n "$ac_prev"; then
11204 case $ac_word in
11205 i?86 | x86_64 | ppc | ppc64)
11206 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11207 ac_arch=$ac_word
11208 else
11209 ac_cv_c_bigendian=universal
11210 break
11211 fi
11212 ;;
11213 esac
11214 ac_prev=
11215 elif test "x$ac_word" = "x-arch"; then
11216 ac_prev=arch
11217 fi
11218 done
11219fi
11220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11221 if test $ac_cv_c_bigendian = unknown; then
11222 # See if sys/param.h defines the BYTE_ORDER macro.
11223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11224/* end confdefs.h. */
11225#include <sys/types.h>
11226 #include <sys/param.h>
88b48903 11227
6ec2e0f5
SDJ
11228int
11229main ()
11230{
11231#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11232 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11233 && LITTLE_ENDIAN)
11234 bogus endian macros
11235 #endif
88b48903 11236
6ec2e0f5
SDJ
11237 ;
11238 return 0;
11239}
11240_ACEOF
11241if ac_fn_c_try_compile "$LINENO"; then :
11242 # It does; now see whether it defined to BIG_ENDIAN or not.
11243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88b48903
WN
11244/* end confdefs.h. */
11245#include <sys/types.h>
6ec2e0f5 11246 #include <sys/param.h>
8690e634
JK
11247
11248int
11249main ()
11250{
6ec2e0f5
SDJ
11251#if BYTE_ORDER != BIG_ENDIAN
11252 not big endian
11253 #endif
8690e634 11254
8690e634
JK
11255 ;
11256 return 0;
11257}
11258_ACEOF
6ec2e0f5
SDJ
11259if ac_fn_c_try_compile "$LINENO"; then :
11260 ac_cv_c_bigendian=yes
8690e634 11261else
6ec2e0f5 11262 ac_cv_c_bigendian=no
8690e634 11263fi
6ec2e0f5 11264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8690e634 11265fi
6ec2e0f5
SDJ
11266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11267 fi
11268 if test $ac_cv_c_bigendian = unknown; then
11269 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11271/* end confdefs.h. */
11272#include <limits.h>
11273
11274int
11275main ()
11276{
11277#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11278 bogus endian macros
11279 #endif
11280
11281 ;
11282 return 0;
11283}
11284_ACEOF
11285if ac_fn_c_try_compile "$LINENO"; then :
11286 # It does; now see whether it defined to _BIG_ENDIAN or not.
11287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11288/* end confdefs.h. */
11289#include <limits.h>
8690e634 11290
6ec2e0f5
SDJ
11291int
11292main ()
11293{
11294#ifndef _BIG_ENDIAN
11295 not big endian
11296 #endif
11297
11298 ;
11299 return 0;
11300}
11301_ACEOF
11302if ac_fn_c_try_compile "$LINENO"; then :
11303 ac_cv_c_bigendian=yes
11304else
11305 ac_cv_c_bigendian=no
8690e634 11306fi
6ec2e0f5
SDJ
11307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11308fi
11309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11310 fi
11311 if test $ac_cv_c_bigendian = unknown; then
11312 # Compile a test program.
11313 if test "$cross_compiling" = yes; then :
11314 # Try to guess by grepping values from an object file.
11315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11316/* end confdefs.h. */
11317short int ascii_mm[] =
11318 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11319 short int ascii_ii[] =
11320 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11321 int use_ascii (int i) {
11322 return ascii_mm[i] + ascii_ii[i];
11323 }
11324 short int ebcdic_ii[] =
11325 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11326 short int ebcdic_mm[] =
11327 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11328 int use_ebcdic (int i) {
11329 return ebcdic_mm[i] + ebcdic_ii[i];
11330 }
11331 extern int foo;
8690e634 11332
6ec2e0f5
SDJ
11333int
11334main ()
11335{
11336return use_ascii (foo) == use_ebcdic (foo);
11337 ;
11338 return 0;
11339}
11340_ACEOF
11341if ac_fn_c_try_compile "$LINENO"; then :
11342 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11343 ac_cv_c_bigendian=yes
11344 fi
11345 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11346 if test "$ac_cv_c_bigendian" = unknown; then
11347 ac_cv_c_bigendian=no
11348 else
11349 # finding both strings is unlikely to happen, but who knows?
11350 ac_cv_c_bigendian=unknown
11351 fi
11352 fi
11353fi
11354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11355else
11356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11357/* end confdefs.h. */
11358$ac_includes_default
11359int
11360main ()
11361{
8690e634 11362
6ec2e0f5
SDJ
11363 /* Are we little or big endian? From Harbison&Steele. */
11364 union
11365 {
11366 long int l;
11367 char c[sizeof (long int)];
11368 } u;
11369 u.l = 1;
11370 return u.c[sizeof (long int) - 1] == 1;
11371
11372 ;
11373 return 0;
11374}
8690e634 11375_ACEOF
6ec2e0f5
SDJ
11376if ac_fn_c_try_run "$LINENO"; then :
11377 ac_cv_c_bigendian=no
11378else
11379 ac_cv_c_bigendian=yes
11380fi
11381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11382 conftest.$ac_objext conftest.beam conftest.$ac_ext
11383fi
11384
11385 fi
11386fi
11387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11388$as_echo "$ac_cv_c_bigendian" >&6; }
11389 case $ac_cv_c_bigendian in #(
11390 yes)
11391 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11392;; #(
11393 no)
11394 ;; #(
11395 universal)
8690e634 11396
6ec2e0f5 11397$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8690e634 11398
6ec2e0f5
SDJ
11399 ;; #(
11400 *)
d0ac1c44 11401 as_fn_error $? "unknown endianness
6ec2e0f5
SDJ
11402 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11403 esac
8690e634 11404
6ec2e0f5
SDJ
11405
11406
11407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
11408$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
d0ac1c44 11409if ${am_cv_langinfo_codeset+:} false; then :
6ec2e0f5
SDJ
11410 $as_echo_n "(cached) " >&6
11411else
11412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11413/* end confdefs.h. */
11414#include <langinfo.h>
11415int
11416main ()
11417{
11418char* cs = nl_langinfo(CODESET); return !cs;
11419 ;
11420 return 0;
11421}
8690e634 11422_ACEOF
6ec2e0f5
SDJ
11423if ac_fn_c_try_link "$LINENO"; then :
11424 am_cv_langinfo_codeset=yes
11425else
11426 am_cv_langinfo_codeset=no
11427fi
11428rm -f core conftest.err conftest.$ac_objext \
11429 conftest$ac_exeext conftest.$ac_ext
11430
11431fi
11432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
11433$as_echo "$am_cv_langinfo_codeset" >&6; }
11434 if test $am_cv_langinfo_codeset = yes; then
11435
11436$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8690e634 11437
6ec2e0f5 11438 fi
8690e634 11439
472fa5ee
SM
11440
11441 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
d0ac1c44 11442if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
8690e634
JK
11443 ac_have_decl=1
11444else
11445 ac_have_decl=0
11446fi
11447
11448cat >>confdefs.h <<_ACEOF
11449#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
11450_ACEOF
11451
11452
472fa5ee 11453
8690e634
JK
11454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
11455$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
d0ac1c44 11456if ${ac_cv_gnu_library_2_1+:} false; then :
8690e634
JK
11457 $as_echo_n "(cached) " >&6
11458else
11459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11460/* end confdefs.h. */
11461
11462#include <features.h>
11463#ifdef __GNU_LIBRARY__
11464 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
11465 Lucky GNU user
11466 #endif
11467#endif
11468#ifdef __UCLIBC__
11469 Lucky user
11470#endif
11471
11472_ACEOF
11473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11474 $EGREP "Lucky" >/dev/null 2>&1; then :
11475 ac_cv_gnu_library_2_1=yes
11476else
11477 ac_cv_gnu_library_2_1=no
11478fi
11479rm -f conftest*
11480
11481
11482
11483fi
11484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
11485$as_echo "$ac_cv_gnu_library_2_1" >&6; }
11486
11487 GLIBC21="$ac_cv_gnu_library_2_1"
11488
11489
11490
f45c62c4
YQ
11491
11492
472fa5ee
SM
11493
11494
11495
6ec2e0f5
SDJ
11496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
11497$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
d0ac1c44 11498if ${gl_cv_func_malloc_posix+:} false; then :
f45c62c4
YQ
11499 $as_echo_n "(cached) " >&6
11500else
f45c62c4 11501
6ec2e0f5 11502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f45c62c4 11503/* end confdefs.h. */
6ec2e0f5 11504
f45c62c4
YQ
11505int
11506main ()
11507{
6ec2e0f5
SDJ
11508#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11509 choke me
11510 #endif
f45c62c4
YQ
11511
11512 ;
11513 return 0;
11514}
11515_ACEOF
6ec2e0f5
SDJ
11516if ac_fn_c_try_compile "$LINENO"; then :
11517 gl_cv_func_malloc_posix=yes
f45c62c4 11518else
6ec2e0f5 11519 gl_cv_func_malloc_posix=no
f45c62c4 11520fi
6ec2e0f5 11521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6a29c58e
YQ
11522
11523fi
11524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
11525$as_echo "$gl_cv_func_malloc_posix" >&6; }
11526
11527
11528
11529 for ac_header in stdlib.h
98399780
YQ
11530do :
11531 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
d0ac1c44 11532if test "x$ac_cv_header_stdlib_h" = xyes; then :
98399780
YQ
11533 cat >>confdefs.h <<_ACEOF
11534#define HAVE_STDLIB_H 1
11535_ACEOF
11536
11537fi
11538
11539done
11540
6a29c58e 11541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
98399780 11542$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
d0ac1c44 11543if ${ac_cv_func_malloc_0_nonnull+:} false; then :
98399780
YQ
11544 $as_echo_n "(cached) " >&6
11545else
11546 if test "$cross_compiling" = yes; then :
6a29c58e
YQ
11547 case "$host_os" in
11548 # Guess yes on platforms where we know the result.
11549 *-gnu* | freebsd* | netbsd* | openbsd* \
11550 | hpux* | solaris* | cygwin* | mingw*)
11551 ac_cv_func_malloc_0_nonnull=yes ;;
11552 # If we don't know, assume the worst.
11553 *) ac_cv_func_malloc_0_nonnull=no ;;
11554 esac
11555
98399780
YQ
11556else
11557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11558/* end confdefs.h. */
11559#if defined STDC_HEADERS || defined HAVE_STDLIB_H
6a29c58e
YQ
11560 # include <stdlib.h>
11561 #else
11562 char *malloc ();
11563 #endif
98399780
YQ
11564
11565int
11566main ()
11567{
49e4877c
PA
11568char *p = malloc (0);
11569 int result = !p;
11570 free (p);
11571 return result;
98399780
YQ
11572 ;
11573 return 0;
11574}
6a29c58e 11575
98399780
YQ
11576_ACEOF
11577if ac_fn_c_try_run "$LINENO"; then :
11578 ac_cv_func_malloc_0_nonnull=yes
11579else
11580 ac_cv_func_malloc_0_nonnull=no
11581fi
11582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11583 conftest.$ac_objext conftest.beam conftest.$ac_ext
11584fi
11585
6a29c58e 11586
98399780
YQ
11587fi
11588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
11589$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6a29c58e 11590 if test $ac_cv_func_malloc_0_nonnull = yes; then :
98399780
YQ
11591 gl_cv_func_malloc_0_nonnull=1
11592else
11593 gl_cv_func_malloc_0_nonnull=0
11594fi
11595
11596
11597cat >>confdefs.h <<_ACEOF
11598#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
11599_ACEOF
11600
11601
11602
88b48903
WN
11603
11604
472fa5ee
SM
11605
11606
11607
8690e634
JK
11608 GNULIB_BTOWC=0;
11609 GNULIB_WCTOB=0;
11610 GNULIB_MBSINIT=0;
11611 GNULIB_MBRTOWC=0;
11612 GNULIB_MBRLEN=0;
11613 GNULIB_MBSRTOWCS=0;
11614 GNULIB_MBSNRTOWCS=0;
11615 GNULIB_WCRTOMB=0;
11616 GNULIB_WCSRTOMBS=0;
11617 GNULIB_WCSNRTOMBS=0;
11618 GNULIB_WCWIDTH=0;
11619 GNULIB_WMEMCHR=0;
11620 GNULIB_WMEMCMP=0;
11621 GNULIB_WMEMCPY=0;
11622 GNULIB_WMEMMOVE=0;
11623 GNULIB_WMEMSET=0;
11624 GNULIB_WCSLEN=0;
11625 GNULIB_WCSNLEN=0;
11626 GNULIB_WCSCPY=0;
11627 GNULIB_WCPCPY=0;
11628 GNULIB_WCSNCPY=0;
11629 GNULIB_WCPNCPY=0;
11630 GNULIB_WCSCAT=0;
11631 GNULIB_WCSNCAT=0;
11632 GNULIB_WCSCMP=0;
11633 GNULIB_WCSNCMP=0;
11634 GNULIB_WCSCASECMP=0;
11635 GNULIB_WCSNCASECMP=0;
11636 GNULIB_WCSCOLL=0;
11637 GNULIB_WCSXFRM=0;
11638 GNULIB_WCSDUP=0;
11639 GNULIB_WCSCHR=0;
11640 GNULIB_WCSRCHR=0;
11641 GNULIB_WCSCSPN=0;
11642 GNULIB_WCSSPN=0;
11643 GNULIB_WCSPBRK=0;
11644 GNULIB_WCSSTR=0;
11645 GNULIB_WCSTOK=0;
11646 GNULIB_WCSWIDTH=0;
11647 HAVE_BTOWC=1;
11648 HAVE_MBSINIT=1;
11649 HAVE_MBRTOWC=1;
11650 HAVE_MBRLEN=1;
11651 HAVE_MBSRTOWCS=1;
11652 HAVE_MBSNRTOWCS=1;
11653 HAVE_WCRTOMB=1;
11654 HAVE_WCSRTOMBS=1;
11655 HAVE_WCSNRTOMBS=1;
11656 HAVE_WMEMCHR=1;
11657 HAVE_WMEMCMP=1;
11658 HAVE_WMEMCPY=1;
11659 HAVE_WMEMMOVE=1;
11660 HAVE_WMEMSET=1;
11661 HAVE_WCSLEN=1;
11662 HAVE_WCSNLEN=1;
11663 HAVE_WCSCPY=1;
11664 HAVE_WCPCPY=1;
11665 HAVE_WCSNCPY=1;
11666 HAVE_WCPNCPY=1;
11667 HAVE_WCSCAT=1;
11668 HAVE_WCSNCAT=1;
11669 HAVE_WCSCMP=1;
11670 HAVE_WCSNCMP=1;
11671 HAVE_WCSCASECMP=1;
11672 HAVE_WCSNCASECMP=1;
11673 HAVE_WCSCOLL=1;
11674 HAVE_WCSXFRM=1;
11675 HAVE_WCSDUP=1;
11676 HAVE_WCSCHR=1;
11677 HAVE_WCSRCHR=1;
11678 HAVE_WCSCSPN=1;
11679 HAVE_WCSSPN=1;
11680 HAVE_WCSPBRK=1;
11681 HAVE_WCSSTR=1;
11682 HAVE_WCSTOK=1;
11683 HAVE_WCSWIDTH=1;
11684 HAVE_DECL_WCTOB=1;
11685 HAVE_DECL_WCWIDTH=1;
11686 REPLACE_MBSTATE_T=0;
11687 REPLACE_BTOWC=0;
11688 REPLACE_WCTOB=0;
11689 REPLACE_MBSINIT=0;
11690 REPLACE_MBRTOWC=0;
11691 REPLACE_MBRLEN=0;
11692 REPLACE_MBSRTOWCS=0;
11693 REPLACE_MBSNRTOWCS=0;
11694 REPLACE_WCRTOMB=0;
11695 REPLACE_WCSRTOMBS=0;
11696 REPLACE_WCSNRTOMBS=0;
11697 REPLACE_WCWIDTH=0;
11698 REPLACE_WCSWIDTH=0;
11699
11700
11701
11702
11703
11704
11705
11706
472fa5ee
SM
11707
11708
11709
11710
11711
11712
8690e634
JK
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
11714$as_echo_n "checking for a traditional japanese locale... " >&6; }
d0ac1c44 11715if ${gt_cv_locale_ja+:} false; then :
8690e634
JK
11716 $as_echo_n "(cached) " >&6
11717else
11718
11719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11720/* end confdefs.h. */
11721
11722#include <locale.h>
11723#include <time.h>
11724#if HAVE_LANGINFO_CODESET
11725# include <langinfo.h>
11726#endif
11727#include <stdlib.h>
11728#include <string.h>
11729struct tm t;
11730char buf[16];
11731int main ()
11732{
11733 const char *p;
11734 /* Check whether the given locale name is recognized by the system. */
11735#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11736 /* On native Windows, setlocale(category, "") looks at the system settings,
11737 not at the environment variables. Also, when an encoding suffix such
11738 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11739 category of the locale to "C". */
11740 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11741 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11742 return 1;
11743#else
11744 if (setlocale (LC_ALL, "") == NULL) return 1;
11745#endif
11746 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11747 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11748 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11749 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11750 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11751 some unit tests fail.
11752 On MirBSD 10, when an unsupported locale is specified, setlocale()
11753 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11754#if HAVE_LANGINFO_CODESET
11755 {
11756 const char *cs = nl_langinfo (CODESET);
11757 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11758 || strcmp (cs, "UTF-8") == 0)
11759 return 1;
11760 }
11761#endif
11762#ifdef __CYGWIN__
11763 /* On Cygwin, avoid locale names without encoding suffix, because the
11764 locale_charset() function relies on the encoding suffix. Note that
11765 LC_ALL is set on the command line. */
11766 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11767#endif
11768 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
11769 on Cygwin 1.5.x. */
11770 if (MB_CUR_MAX == 1)
11771 return 1;
11772 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11773 This excludes the UTF-8 encoding (except on MirBSD). */
11774 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11775 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11776 for (p = buf; *p != '\0'; p++)
11777 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11778 return 1;
11779 return 0;
11780}
11781
11782_ACEOF
11783 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11784 (eval $ac_link) 2>&5
11785 ac_status=$?
11786 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11787 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11788 case "$host_os" in
11789 # Handle native Windows specially, because there setlocale() interprets
11790 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11791 # "fr" or "fra" as "French" or "French_France.1252",
11792 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11793 # "ja" as "Japanese" or "Japanese_Japan.932",
11794 # and similar.
11795 mingw*)
11796 # Note that on native Windows, the Japanese locale is
11797 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
11798 # cannot use it here.
11799 gt_cv_locale_ja=none
11800 ;;
11801 *)
11802 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11803 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11804 # configure script would override the LC_ALL setting. Likewise for
11805 # LC_CTYPE, which is also set at the beginning of the configure script.
11806 # Test for the AIX locale name.
11807 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11808 gt_cv_locale_ja=ja_JP
11809 else
11810 # Test for the locale name with explicit encoding suffix.
11811 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11812 gt_cv_locale_ja=ja_JP.EUC-JP
11813 else
11814 # Test for the HP-UX, OSF/1, NetBSD locale name.
11815 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11816 gt_cv_locale_ja=ja_JP.eucJP
11817 else
11818 # Test for the IRIX, FreeBSD locale name.
11819 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11820 gt_cv_locale_ja=ja_JP.EUC
11821 else
11822 # Test for the Solaris 7 locale name.
11823 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11824 gt_cv_locale_ja=ja
11825 else
11826 # Special test for NetBSD 1.6.
11827 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
11828 gt_cv_locale_ja=ja_JP.eucJP
11829 else
11830 # None found.
11831 gt_cv_locale_ja=none
11832 fi
11833 fi
11834 fi
11835 fi
11836 fi
11837 fi
11838 ;;
11839 esac
11840 fi
11841 rm -fr conftest*
11842
11843fi
11844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
11845$as_echo "$gt_cv_locale_ja" >&6; }
11846 LOCALE_JA=$gt_cv_locale_ja
11847
11848
11849
11850
11851
11852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
11853$as_echo_n "checking for a transitional chinese locale... " >&6; }
d0ac1c44 11854if ${gt_cv_locale_zh_CN+:} false; then :
8690e634
JK
11855 $as_echo_n "(cached) " >&6
11856else
11857
11858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11859/* end confdefs.h. */
11860
11861#include <locale.h>
11862#include <stdlib.h>
11863#include <time.h>
11864#if HAVE_LANGINFO_CODESET
11865# include <langinfo.h>
11866#endif
11867#include <stdlib.h>
11868#include <string.h>
11869struct tm t;
11870char buf[16];
11871int main ()
11872{
11873 const char *p;
11874 /* Check whether the given locale name is recognized by the system. */
11875#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
11876 /* On native Windows, setlocale(category, "") looks at the system settings,
11877 not at the environment variables. Also, when an encoding suffix such
11878 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
11879 category of the locale to "C". */
11880 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
11881 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
11882 return 1;
11883#else
11884 if (setlocale (LC_ALL, "") == NULL) return 1;
11885#endif
11886 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
11887 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
11888 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
11889 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
11890 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
11891 some unit tests fail.
11892 On MirBSD 10, when an unsupported locale is specified, setlocale()
11893 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
11894#if HAVE_LANGINFO_CODESET
11895 {
11896 const char *cs = nl_langinfo (CODESET);
11897 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
11898 || strcmp (cs, "UTF-8") == 0)
11899 return 1;
11900 }
11901#endif
11902#ifdef __CYGWIN__
11903 /* On Cygwin, avoid locale names without encoding suffix, because the
11904 locale_charset() function relies on the encoding suffix. Note that
11905 LC_ALL is set on the command line. */
11906 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
11907#endif
11908 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
11909 This excludes the UTF-8 encoding (except on MirBSD). */
11910 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
11911 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
11912 for (p = buf; *p != '\0'; p++)
11913 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
11914 return 1;
11915 /* Check whether a typical GB18030 multibyte sequence is recognized as a
11916 single wide character. This excludes the GB2312 and GBK encodings. */
11917 if (mblen ("\203\062\332\066", 5) != 4)
11918 return 1;
11919 return 0;
11920}
11921
11922_ACEOF
11923 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11924 (eval $ac_link) 2>&5
11925 ac_status=$?
11926 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11927 test $ac_status = 0; } && test -s conftest$ac_exeext; then
11928 case "$host_os" in
11929 # Handle native Windows specially, because there setlocale() interprets
11930 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
11931 # "fr" or "fra" as "French" or "French_France.1252",
11932 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
11933 # "ja" as "Japanese" or "Japanese_Japan.932",
11934 # and similar.
11935 mingw*)
11936 # Test for the hypothetical native Windows locale name.
11937 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11938 gt_cv_locale_zh_CN=Chinese_China.54936
11939 else
11940 # None found.
11941 gt_cv_locale_zh_CN=none
11942 fi
11943 ;;
11944 solaris2.8)
11945 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
11946 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
11947 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
11948 gt_cv_locale_zh_CN=none
11949 ;;
11950 *)
11951 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
11952 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
11953 # configure script would override the LC_ALL setting. Likewise for
11954 # LC_CTYPE, which is also set at the beginning of the configure script.
11955 # Test for the locale name without encoding suffix.
11956 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11957 gt_cv_locale_zh_CN=zh_CN
11958 else
11959 # Test for the locale name with explicit encoding suffix.
11960 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
11961 gt_cv_locale_zh_CN=zh_CN.GB18030
11962 else
11963 # None found.
11964 gt_cv_locale_zh_CN=none
11965 fi
11966 fi
11967 ;;
11968 esac
11969 else
11970 # If there was a link error, due to mblen(), the system is so old that
11971 # it certainly doesn't have a chinese locale.
11972 gt_cv_locale_zh_CN=none
11973 fi
11974 rm -fr conftest*
11975
11976fi
11977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
11978$as_echo "$gt_cv_locale_zh_CN" >&6; }
11979 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
11980
11981
11982
11983
11984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
11985$as_echo_n "checking for a french Unicode locale... " >&6; }
d0ac1c44 11986if ${gt_cv_locale_fr_utf8+:} false; then :
8690e634
JK
11987 $as_echo_n "(cached) " >&6
11988else
11989
11990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11991/* end confdefs.h. */
11992
11993#include <locale.h>
11994#include <time.h>
11995#if HAVE_LANGINFO_CODESET
11996# include <langinfo.h>
11997#endif
11998#include <stdlib.h>
11999#include <string.h>
12000struct tm t;
12001char buf[16];
12002int main () {
12003 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
12004 imitates locale dependent behaviour by looking at the environment
12005 variables, and all locales use the UTF-8 encoding. */
12006#if !(defined __BEOS__ || defined __HAIKU__)
12007 /* Check whether the given locale name is recognized by the system. */
12008# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
12009 /* On native Windows, setlocale(category, "") looks at the system settings,
12010 not at the environment variables. Also, when an encoding suffix such
12011 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12012 category of the locale to "C". */
12013 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12014 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12015 return 1;
12016# else
12017 if (setlocale (LC_ALL, "") == NULL) return 1;
12018# endif
12019 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12020 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12021 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12022 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12023 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12024 some unit tests fail. */
12025# if HAVE_LANGINFO_CODESET
12026 {
12027 const char *cs = nl_langinfo (CODESET);
12028 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
12029 return 1;
12030 }
12031# endif
12032# ifdef __CYGWIN__
12033 /* On Cygwin, avoid locale names without encoding suffix, because the
12034 locale_charset() function relies on the encoding suffix. Note that
12035 LC_ALL is set on the command line. */
12036 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
12037# endif
12038 /* Check whether in the abbreviation of the second month, the second
12039 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
12040 two bytes long, with UTF-8 encoding. */
12041 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12042 if (strftime (buf, sizeof (buf), "%b", &t) < 4
12043 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
12044 return 1;
12045#endif
12046#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
12047 /* Check whether the decimal separator is a comma.
12048 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
12049 are nl_langinfo(RADIXCHAR) are both ".". */
12050 if (localeconv () ->decimal_point[0] != ',') return 1;
12051#endif
12052 return 0;
12053}
12054
12055_ACEOF
12056 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12057 (eval $ac_link) 2>&5
12058 ac_status=$?
12059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12060 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12061 case "$host_os" in
12062 # Handle native Windows specially, because there setlocale() interprets
12063 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12064 # "fr" or "fra" as "French" or "French_France.1252",
12065 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12066 # "ja" as "Japanese" or "Japanese_Japan.932",
12067 # and similar.
12068 mingw*)
12069 # Test for the hypothetical native Windows locale name.
12070 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12071 gt_cv_locale_fr_utf8=French_France.65001
12072 else
12073 # None found.
12074 gt_cv_locale_fr_utf8=none
12075 fi
12076 ;;
12077 *)
12078 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12079 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12080 # configure script would override the LC_ALL setting. Likewise for
12081 # LC_CTYPE, which is also set at the beginning of the configure script.
12082 # Test for the usual locale name.
12083 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12084 gt_cv_locale_fr_utf8=fr_FR
12085 else
12086 # Test for the locale name with explicit encoding suffix.
12087 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12088 gt_cv_locale_fr_utf8=fr_FR.UTF-8
12089 else
12090 # Test for the Solaris 7 locale name.
12091 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12092 gt_cv_locale_fr_utf8=fr.UTF-8
12093 else
12094 # None found.
12095 gt_cv_locale_fr_utf8=none
12096 fi
12097 fi
12098 fi
12099 ;;
12100 esac
12101 fi
12102 rm -fr conftest*
12103
12104fi
12105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
12106$as_echo "$gt_cv_locale_fr_utf8" >&6; }
12107 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
12108
12109
12110
12111
12112
12113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
12114$as_echo_n "checking for a traditional french locale... " >&6; }
d0ac1c44 12115if ${gt_cv_locale_fr+:} false; then :
8690e634
JK
12116 $as_echo_n "(cached) " >&6
12117else
12118
12119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12120/* end confdefs.h. */
12121
12122#include <locale.h>
12123#include <time.h>
12124#if HAVE_LANGINFO_CODESET
12125# include <langinfo.h>
12126#endif
12127#include <stdlib.h>
12128#include <string.h>
12129struct tm t;
12130char buf[16];
12131int main () {
12132 /* Check whether the given locale name is recognized by the system. */
12133#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
12134 /* On native Windows, setlocale(category, "") looks at the system settings,
12135 not at the environment variables. Also, when an encoding suffix such
12136 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
12137 category of the locale to "C". */
12138 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
12139 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
12140 return 1;
12141#else
12142 if (setlocale (LC_ALL, "") == NULL) return 1;
12143#endif
12144 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
12145 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
12146 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
12147 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
12148 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
12149 some unit tests fail.
12150 On MirBSD 10, when an unsupported locale is specified, setlocale()
12151 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
12152#if HAVE_LANGINFO_CODESET
12153 {
12154 const char *cs = nl_langinfo (CODESET);
12155 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
12156 || strcmp (cs, "UTF-8") == 0)
12157 return 1;
12158 }
12159#endif
12160#ifdef __CYGWIN__
12161 /* On Cygwin, avoid locale names without encoding suffix, because the
12162 locale_charset() function relies on the encoding suffix. Note that
12163 LC_ALL is set on the command line. */
12164 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
12165#endif
12166 /* Check whether in the abbreviation of the second month, the second
12167 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
12168 one byte long. This excludes the UTF-8 encoding. */
12169 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
12170 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
12171#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
12172 /* Check whether the decimal separator is a comma.
12173 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
12174 are nl_langinfo(RADIXCHAR) are both ".". */
12175 if (localeconv () ->decimal_point[0] != ',') return 1;
12176#endif
12177 return 0;
12178}
12179
12180_ACEOF
12181 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12182 (eval $ac_link) 2>&5
12183 ac_status=$?
12184 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12185 test $ac_status = 0; } && test -s conftest$ac_exeext; then
12186 case "$host_os" in
12187 # Handle native Windows specially, because there setlocale() interprets
12188 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
12189 # "fr" or "fra" as "French" or "French_France.1252",
12190 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
12191 # "ja" as "Japanese" or "Japanese_Japan.932",
12192 # and similar.
12193 mingw*)
12194 # Test for the native Windows locale name.
12195 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12196 gt_cv_locale_fr=French_France.1252
12197 else
12198 # None found.
12199 gt_cv_locale_fr=none
12200 fi
12201 ;;
12202 *)
12203 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
12204 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
12205 # configure script would override the LC_ALL setting. Likewise for
12206 # LC_CTYPE, which is also set at the beginning of the configure script.
12207 # Test for the usual locale name.
12208 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12209 gt_cv_locale_fr=fr_FR
12210 else
12211 # Test for the locale name with explicit encoding suffix.
12212 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12213 gt_cv_locale_fr=fr_FR.ISO-8859-1
12214 else
12215 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
12216 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12217 gt_cv_locale_fr=fr_FR.ISO8859-1
12218 else
12219 # Test for the HP-UX locale name.
12220 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12221 gt_cv_locale_fr=fr_FR.iso88591
12222 else
12223 # Test for the Solaris 7 locale name.
12224 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
12225 gt_cv_locale_fr=fr
12226 else
12227 # None found.
12228 gt_cv_locale_fr=none
12229 fi
12230 fi
12231 fi
12232 fi
12233 fi
12234 ;;
12235 esac
12236 fi
12237 rm -fr conftest*
12238
12239fi
6ec2e0f5
SDJ
12240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
12241$as_echo "$gt_cv_locale_fr" >&6; }
12242 LOCALE_FR=$gt_cv_locale_fr
12243
12244
12245
12246
12247
12248
12249
472fa5ee
SM
12250
12251
12252
12253
12254
12255
12256 GNULIB_FFSL=0;
12257 GNULIB_FFSLL=0;
6ec2e0f5
SDJ
12258 GNULIB_MEMCHR=0;
12259 GNULIB_MEMMEM=0;
12260 GNULIB_MEMPCPY=0;
12261 GNULIB_MEMRCHR=0;
12262 GNULIB_RAWMEMCHR=0;
12263 GNULIB_STPCPY=0;
12264 GNULIB_STPNCPY=0;
12265 GNULIB_STRCHRNUL=0;
12266 GNULIB_STRDUP=0;
12267 GNULIB_STRNCAT=0;
12268 GNULIB_STRNDUP=0;
12269 GNULIB_STRNLEN=0;
12270 GNULIB_STRPBRK=0;
12271 GNULIB_STRSEP=0;
12272 GNULIB_STRSTR=0;
12273 GNULIB_STRCASESTR=0;
12274 GNULIB_STRTOK_R=0;
12275 GNULIB_MBSLEN=0;
12276 GNULIB_MBSNLEN=0;
12277 GNULIB_MBSCHR=0;
12278 GNULIB_MBSRCHR=0;
12279 GNULIB_MBSSTR=0;
12280 GNULIB_MBSCASECMP=0;
12281 GNULIB_MBSNCASECMP=0;
12282 GNULIB_MBSPCASECMP=0;
12283 GNULIB_MBSCASESTR=0;
12284 GNULIB_MBSCSPN=0;
12285 GNULIB_MBSPBRK=0;
12286 GNULIB_MBSSPN=0;
12287 GNULIB_MBSSEP=0;
12288 GNULIB_MBSTOK_R=0;
12289 GNULIB_STRERROR=0;
12290 GNULIB_STRERROR_R=0;
12291 GNULIB_STRSIGNAL=0;
12292 GNULIB_STRVERSCMP=0;
12293 HAVE_MBSLEN=0;
12294 HAVE_FFSL=1;
12295 HAVE_FFSLL=1;
12296 HAVE_MEMCHR=1;
12297 HAVE_DECL_MEMMEM=1;
12298 HAVE_MEMPCPY=1;
12299 HAVE_DECL_MEMRCHR=1;
12300 HAVE_RAWMEMCHR=1;
12301 HAVE_STPCPY=1;
12302 HAVE_STPNCPY=1;
12303 HAVE_STRCHRNUL=1;
12304 HAVE_DECL_STRDUP=1;
12305 HAVE_DECL_STRNDUP=1;
12306 HAVE_DECL_STRNLEN=1;
12307 HAVE_STRPBRK=1;
12308 HAVE_STRSEP=1;
12309 HAVE_STRCASESTR=1;
12310 HAVE_DECL_STRTOK_R=1;
12311 HAVE_DECL_STRERROR_R=1;
12312 HAVE_DECL_STRSIGNAL=1;
12313 HAVE_STRVERSCMP=1;
12314 REPLACE_MEMCHR=0;
12315 REPLACE_MEMMEM=0;
12316 REPLACE_STPNCPY=0;
12317 REPLACE_STRDUP=0;
12318 REPLACE_STRSTR=0;
12319 REPLACE_STRCASESTR=0;
12320 REPLACE_STRCHRNUL=0;
12321 REPLACE_STRERROR=0;
12322 REPLACE_STRERROR_R=0;
12323 REPLACE_STRNCAT=0;
12324 REPLACE_STRNDUP=0;
12325 REPLACE_STRNLEN=0;
12326 REPLACE_STRSIGNAL=0;
12327 REPLACE_STRTOK_R=0;
12328 UNDEFINE_STRTOK_R=0;
12329
12330
12331
12332
12333
12334 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
12335 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
12336 # irrelevant for anonymous mappings.
12337 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
d0ac1c44 12338if test "x$ac_cv_func_mmap" = xyes; then :
6ec2e0f5
SDJ
12339 gl_have_mmap=yes
12340else
12341 gl_have_mmap=no
12342fi
12343
12344
12345 # Try to allow MAP_ANONYMOUS.
12346 gl_have_mmap_anonymous=no
12347 if test $gl_have_mmap = yes; then
12348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
12349$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
12350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12351/* end confdefs.h. */
12352
12353#include <sys/mman.h>
12354#ifdef MAP_ANONYMOUS
12355 I cannot identify this map
12356#endif
12357
12358_ACEOF
12359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12360 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
12361 gl_have_mmap_anonymous=yes
12362fi
12363rm -f conftest*
12364
12365 if test $gl_have_mmap_anonymous != yes; then
12366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12367/* end confdefs.h. */
12368
12369#include <sys/mman.h>
12370#ifdef MAP_ANON
12371 I cannot identify this map
12372#endif
12373
12374_ACEOF
12375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12376 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
12377
12378$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
12379
12380 gl_have_mmap_anonymous=yes
12381fi
12382rm -f conftest*
12383
12384 fi
12385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
12386$as_echo "$gl_have_mmap_anonymous" >&6; }
12387 if test $gl_have_mmap_anonymous = yes; then
12388
12389$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
12390
12391 fi
12392 fi
12393
12394
472fa5ee
SM
12395 :
12396
12397
12398
12399
12400
12401
12402 :
12403
12404
12405
12406
6ec2e0f5
SDJ
12407
12408
12409
12410
12411 if test $HAVE_MEMCHR = 1; then
12412 # Detect platform-specific bugs in some versions of glibc:
12413 # memchr should not dereference anything with length 0
12414 # http://bugzilla.redhat.com/499689
12415 # memchr should not dereference overestimated length after a match
12416 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
12417 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
12418 # Assume that memchr works on platforms that lack mprotect.
12419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
12420$as_echo_n "checking whether memchr works... " >&6; }
d0ac1c44 12421if ${gl_cv_func_memchr_works+:} false; then :
6ec2e0f5
SDJ
12422 $as_echo_n "(cached) " >&6
12423else
12424 if test "$cross_compiling" = yes; then :
12425 gl_cv_func_memchr_works="guessing no"
12426else
12427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12428/* end confdefs.h. */
12429
12430#include <string.h>
12431#if HAVE_SYS_MMAN_H
12432# include <fcntl.h>
12433# include <unistd.h>
12434# include <sys/types.h>
12435# include <sys/mman.h>
12436# ifndef MAP_FILE
12437# define MAP_FILE 0
12438# endif
12439#endif
12440
12441int
12442main ()
12443{
12444
12445 int result = 0;
12446 char *fence = NULL;
12447#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
12448# if HAVE_MAP_ANONYMOUS
12449 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
12450 const int fd = -1;
12451# else /* !HAVE_MAP_ANONYMOUS */
12452 const int flags = MAP_FILE | MAP_PRIVATE;
12453 int fd = open ("/dev/zero", O_RDONLY, 0666);
12454 if (fd >= 0)
12455# endif
12456 {
12457 int pagesize = getpagesize ();
12458 char *two_pages =
12459 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
12460 flags, fd, 0);
12461 if (two_pages != (char *)(-1)
12462 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
12463 fence = two_pages + pagesize;
12464 }
12465#endif
12466 if (fence)
12467 {
12468 if (memchr (fence, 0, 0))
12469 result |= 1;
12470 strcpy (fence - 9, "12345678");
12471 if (memchr (fence - 9, 0, 79) != fence - 1)
12472 result |= 2;
12473 if (memchr (fence - 1, 0, 3) != fence - 1)
12474 result |= 4;
12475 }
12476 return result;
12477
12478 ;
12479 return 0;
12480}
12481_ACEOF
12482if ac_fn_c_try_run "$LINENO"; then :
12483 gl_cv_func_memchr_works=yes
12484else
12485 gl_cv_func_memchr_works=no
12486fi
12487rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12488 conftest.$ac_objext conftest.beam conftest.$ac_ext
12489fi
12490
12491fi
12492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
12493$as_echo "$gl_cv_func_memchr_works" >&6; }
12494 if test "$gl_cv_func_memchr_works" != yes; then
12495 REPLACE_MEMCHR=1
12496 fi
12497 fi
12498
472fa5ee
SM
12499
12500 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
d0ac1c44 12501if test "x$ac_cv_have_decl_memmem" = xyes; then :
6ec2e0f5
SDJ
12502 ac_have_decl=1
12503else
12504 ac_have_decl=0
12505fi
12506
12507cat >>confdefs.h <<_ACEOF
12508#define HAVE_DECL_MEMMEM $ac_have_decl
12509_ACEOF
12510
12511
12512
12513
12514
472fa5ee 12515
6ec2e0f5
SDJ
12516 for ac_func in memmem
12517do :
12518 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 12519if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
12520 cat >>confdefs.h <<_ACEOF
12521#define HAVE_MEMMEM 1
12522_ACEOF
12523
12524fi
12525done
12526
12527 if test $ac_cv_func_memmem = yes; then
12528 HAVE_MEMMEM=1
12529 else
12530 HAVE_MEMMEM=0
12531 fi
12532
472fa5ee
SM
12533 :
12534
12535
12536
12537
12538
6ec2e0f5
SDJ
12539 if test $ac_cv_have_decl_memmem = no; then
12540 HAVE_DECL_MEMMEM=0
12541 else
12542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
12543$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 12544if ${gl_cv_func_memmem_works_always+:} false; then :
6ec2e0f5
SDJ
12545 $as_echo_n "(cached) " >&6
12546else
12547 if test "$cross_compiling" = yes; then :
12548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12549/* end confdefs.h. */
12550
12551#ifdef __GNU_LIBRARY__
12552 #include <features.h>
12553 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
12554 || __GLIBC_MINOR__ > 12)) \
12555 || (__GLIBC__ > 2)) \
12556 || defined __UCLIBC__
12557 Lucky user
12558 #endif
12559#elif defined __CYGWIN__
12560 #include <cygwin/version.h>
12561 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
12562 Lucky user
12563 #endif
12564#else
12565 Lucky user
12566#endif
12567
12568_ACEOF
12569if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12570 $EGREP "Lucky user" >/dev/null 2>&1; then :
12571 gl_cv_func_memmem_works_always="guessing yes"
12572else
12573 gl_cv_func_memmem_works_always="guessing no"
12574fi
12575rm -f conftest*
12576
12577
12578else
12579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12580/* end confdefs.h. */
12581
12582#include <string.h> /* for memmem */
12583#define P "_EF_BF_BD"
12584#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
12585#define NEEDLE P P P P P
12586
12587int
12588main ()
12589{
12590
12591 int result = 0;
12592 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
12593 result |= 1;
12594 /* Check for empty needle behavior. */
12595 {
12596 const char *haystack = "AAA";
12597 if (memmem (haystack, 3, NULL, 0) != haystack)
12598 result |= 2;
12599 }
12600 return result;
12601
12602 ;
12603 return 0;
12604}
12605_ACEOF
12606if ac_fn_c_try_run "$LINENO"; then :
12607 gl_cv_func_memmem_works_always=yes
12608else
12609 gl_cv_func_memmem_works_always=no
12610fi
12611rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12612 conftest.$ac_objext conftest.beam conftest.$ac_ext
12613fi
12614
12615
12616fi
12617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
12618$as_echo "$gl_cv_func_memmem_works_always" >&6; }
12619 case "$gl_cv_func_memmem_works_always" in
12620 *yes) ;;
12621 *)
12622 REPLACE_MEMMEM=1
12623 ;;
12624 esac
12625 fi
12626 :
12627
472fa5ee
SM
12628
12629 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
d0ac1c44 12630if test "x$ac_cv_have_decl_memrchr" = xyes; then :
6ec2e0f5
SDJ
12631 ac_have_decl=1
12632else
12633 ac_have_decl=0
12634fi
12635
12636cat >>confdefs.h <<_ACEOF
12637#define HAVE_DECL_MEMRCHR $ac_have_decl
12638_ACEOF
12639
12640
12641
12642
12643
12644
2d8adcbd
MM
12645
12646
472fa5ee
SM
12647
12648
12649
12650
6ec2e0f5
SDJ
12651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
12652$as_echo_n "checking for promoted mode_t type... " >&6; }
d0ac1c44 12653if ${gl_cv_promoted_mode_t+:} false; then :
6ec2e0f5
SDJ
12654 $as_echo_n "(cached) " >&6
12655else
12656
12657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12658/* end confdefs.h. */
12659#include <sys/types.h>
12660int
12661main ()
12662{
12663typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
12664 ;
12665 return 0;
12666}
12667_ACEOF
12668if ac_fn_c_try_compile "$LINENO"; then :
12669 gl_cv_promoted_mode_t='int'
12670else
12671 gl_cv_promoted_mode_t='mode_t'
12672fi
12673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12674
12675fi
12676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
12677$as_echo "$gl_cv_promoted_mode_t" >&6; }
12678
12679cat >>confdefs.h <<_ACEOF
12680#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
12681_ACEOF
12682
12683
12684
12685
12686
472fa5ee
SM
12687
12688
12689
6ec2e0f5
SDJ
12690 GNULIB_DPRINTF=0;
12691 GNULIB_FCLOSE=0;
12692 GNULIB_FDOPEN=0;
12693 GNULIB_FFLUSH=0;
12694 GNULIB_FGETC=0;
12695 GNULIB_FGETS=0;
12696 GNULIB_FOPEN=0;
12697 GNULIB_FPRINTF=0;
12698 GNULIB_FPRINTF_POSIX=0;
12699 GNULIB_FPURGE=0;
12700 GNULIB_FPUTC=0;
12701 GNULIB_FPUTS=0;
12702 GNULIB_FREAD=0;
12703 GNULIB_FREOPEN=0;
12704 GNULIB_FSCANF=0;
12705 GNULIB_FSEEK=0;
12706 GNULIB_FSEEKO=0;
12707 GNULIB_FTELL=0;
12708 GNULIB_FTELLO=0;
12709 GNULIB_FWRITE=0;
12710 GNULIB_GETC=0;
12711 GNULIB_GETCHAR=0;
12712 GNULIB_GETDELIM=0;
12713 GNULIB_GETLINE=0;
12714 GNULIB_OBSTACK_PRINTF=0;
12715 GNULIB_OBSTACK_PRINTF_POSIX=0;
12716 GNULIB_PCLOSE=0;
12717 GNULIB_PERROR=0;
12718 GNULIB_POPEN=0;
12719 GNULIB_PRINTF=0;
12720 GNULIB_PRINTF_POSIX=0;
12721 GNULIB_PUTC=0;
12722 GNULIB_PUTCHAR=0;
12723 GNULIB_PUTS=0;
12724 GNULIB_REMOVE=0;
12725 GNULIB_RENAME=0;
12726 GNULIB_RENAMEAT=0;
12727 GNULIB_SCANF=0;
12728 GNULIB_SNPRINTF=0;
12729 GNULIB_SPRINTF_POSIX=0;
12730 GNULIB_STDIO_H_NONBLOCKING=0;
12731 GNULIB_STDIO_H_SIGPIPE=0;
12732 GNULIB_TMPFILE=0;
12733 GNULIB_VASPRINTF=0;
12734 GNULIB_VFSCANF=0;
12735 GNULIB_VSCANF=0;
12736 GNULIB_VDPRINTF=0;
12737 GNULIB_VFPRINTF=0;
12738 GNULIB_VFPRINTF_POSIX=0;
12739 GNULIB_VPRINTF=0;
12740 GNULIB_VPRINTF_POSIX=0;
12741 GNULIB_VSNPRINTF=0;
12742 GNULIB_VSPRINTF_POSIX=0;
12743 HAVE_DECL_FPURGE=1;
12744 HAVE_DECL_FSEEKO=1;
12745 HAVE_DECL_FTELLO=1;
12746 HAVE_DECL_GETDELIM=1;
12747 HAVE_DECL_GETLINE=1;
12748 HAVE_DECL_OBSTACK_PRINTF=1;
12749 HAVE_DECL_SNPRINTF=1;
12750 HAVE_DECL_VSNPRINTF=1;
12751 HAVE_DPRINTF=1;
12752 HAVE_FSEEKO=1;
12753 HAVE_FTELLO=1;
12754 HAVE_PCLOSE=1;
12755 HAVE_POPEN=1;
12756 HAVE_RENAMEAT=1;
12757 HAVE_VASPRINTF=1;
12758 HAVE_VDPRINTF=1;
12759 REPLACE_DPRINTF=0;
12760 REPLACE_FCLOSE=0;
12761 REPLACE_FDOPEN=0;
12762 REPLACE_FFLUSH=0;
12763 REPLACE_FOPEN=0;
12764 REPLACE_FPRINTF=0;
12765 REPLACE_FPURGE=0;
12766 REPLACE_FREOPEN=0;
12767 REPLACE_FSEEK=0;
12768 REPLACE_FSEEKO=0;
12769 REPLACE_FTELL=0;
12770 REPLACE_FTELLO=0;
12771 REPLACE_GETDELIM=0;
12772 REPLACE_GETLINE=0;
12773 REPLACE_OBSTACK_PRINTF=0;
12774 REPLACE_PERROR=0;
12775 REPLACE_POPEN=0;
12776 REPLACE_PRINTF=0;
12777 REPLACE_REMOVE=0;
12778 REPLACE_RENAME=0;
12779 REPLACE_RENAMEAT=0;
12780 REPLACE_SNPRINTF=0;
12781 REPLACE_SPRINTF=0;
12782 REPLACE_STDIO_READ_FUNCS=0;
12783 REPLACE_STDIO_WRITE_FUNCS=0;
12784 REPLACE_TMPFILE=0;
12785 REPLACE_VASPRINTF=0;
12786 REPLACE_VDPRINTF=0;
12787 REPLACE_VFPRINTF=0;
12788 REPLACE_VPRINTF=0;
12789 REPLACE_VSNPRINTF=0;
12790 REPLACE_VSPRINTF=0;
12791
12792
12793
2d8adcbd
MM
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
472fa5ee
SM
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
d0ac1c44 12824if test "x$ac_cv_have_decl_setenv" = xyes; then :
6ec2e0f5
SDJ
12825 ac_have_decl=1
12826else
12827 ac_have_decl=0
12828fi
12829
12830cat >>confdefs.h <<_ACEOF
12831#define HAVE_DECL_SETENV $ac_have_decl
12832_ACEOF
12833
12834
12835
12836
12837
12838
472fa5ee
SM
12839
12840
12841
12842
12843 :
12844
12845
12846
12847
12848
6ec2e0f5
SDJ
12849 if test $ac_cv_have_decl_setenv = no; then
12850 HAVE_DECL_SETENV=0
12851 fi
12852
472fa5ee
SM
12853 :
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863 :
12864
6ec2e0f5
SDJ
12865
12866
12867
12868
12869 for ac_header in search.h
12870do :
12871 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
d0ac1c44 12872if test "x$ac_cv_header_search_h" = xyes; then :
6ec2e0f5
SDJ
12873 cat >>confdefs.h <<_ACEOF
12874#define HAVE_SEARCH_H 1
12875_ACEOF
12876
12877fi
12878
12879done
12880
12881 for ac_func in tsearch
12882do :
12883 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
d0ac1c44 12884if test "x$ac_cv_func_tsearch" = xyes; then :
6ec2e0f5
SDJ
12885 cat >>confdefs.h <<_ACEOF
12886#define HAVE_TSEARCH 1
12887_ACEOF
12888
12889fi
12890done
12891
12892
12893
12894
12895 GNULIB_PTHREAD_SIGMASK=0;
12896 GNULIB_RAISE=0;
12897 GNULIB_SIGNAL_H_SIGPIPE=0;
12898 GNULIB_SIGPROCMASK=0;
12899 GNULIB_SIGACTION=0;
12900 HAVE_POSIX_SIGNALBLOCKING=1;
12901 HAVE_PTHREAD_SIGMASK=1;
12902 HAVE_RAISE=1;
12903 HAVE_SIGSET_T=1;
12904 HAVE_SIGINFO_T=1;
12905 HAVE_SIGACTION=1;
12906 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
12907
12908 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
12909
12910 HAVE_SIGHANDLER_T=1;
12911 REPLACE_PTHREAD_SIGMASK=0;
12912 REPLACE_RAISE=0;
12913
12914
12915 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
12916 #include <signal.h>
12917 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
12918 #include <sys/types.h>
12919
12920"
d0ac1c44 12921if test "x$ac_cv_type_sigset_t" = xyes; then :
6ec2e0f5
SDJ
12922
12923cat >>confdefs.h <<_ACEOF
12924#define HAVE_SIGSET_T 1
12925_ACEOF
12926
12927gl_cv_type_sigset_t=yes
12928else
12929 gl_cv_type_sigset_t=no
12930fi
12931
12932 if test $gl_cv_type_sigset_t != yes; then
12933 HAVE_SIGSET_T=0
12934 fi
12935
12936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
12937$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
d0ac1c44 12938if ${ac_cv_type_uid_t+:} false; then :
6ec2e0f5
SDJ
12939 $as_echo_n "(cached) " >&6
12940else
12941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12942/* end confdefs.h. */
12943#include <sys/types.h>
12944
12945_ACEOF
12946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12947 $EGREP "uid_t" >/dev/null 2>&1; then :
12948 ac_cv_type_uid_t=yes
12949else
12950 ac_cv_type_uid_t=no
12951fi
12952rm -f conftest*
12953
12954fi
12955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
12956$as_echo "$ac_cv_type_uid_t" >&6; }
12957if test $ac_cv_type_uid_t = no; then
12958
12959$as_echo "#define uid_t int" >>confdefs.h
12960
12961
12962$as_echo "#define gid_t int" >>confdefs.h
12963
12964fi
12965
12966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12967$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
d0ac1c44 12968if ${ac_cv_header_stdbool_h+:} false; then :
6ec2e0f5
SDJ
12969 $as_echo_n "(cached) " >&6
12970else
12971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12972/* end confdefs.h. */
12973
12974 #include <stdbool.h>
12975
12976 #ifdef __cplusplus
12977 typedef bool Bool;
12978 #else
12979 typedef _Bool Bool;
12980 #ifndef bool
12981 "error: bool is not defined"
12982 #endif
12983 #ifndef false
12984 "error: false is not defined"
12985 #endif
12986 #if false
12987 "error: false is not 0"
12988 #endif
12989 #ifndef true
12990 "error: true is not defined"
12991 #endif
12992 #if true != 1
12993 "error: true is not 1"
12994 #endif
12995 #endif
12996
12997 #ifndef __bool_true_false_are_defined
12998 "error: __bool_true_false_are_defined is not defined"
12999 #endif
13000
13001 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
13002
13003 char a[true == 1 ? 1 : -1];
13004 char b[false == 0 ? 1 : -1];
13005 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13006 char d[(bool) 0.5 == true ? 1 : -1];
13007 /* See body of main program for 'e'. */
13008 char f[(Bool) 0.0 == false ? 1 : -1];
13009 char g[true];
13010 char h[sizeof (Bool)];
13011 char i[sizeof s.t];
13012 enum { j = false, k = true, l = false * true, m = true * 256 };
13013 /* The following fails for
13014 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13015 Bool n[m];
13016 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13017 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13018 /* Catch a bug in an HP-UX C compiler. See
13019 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13020 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13021 */
13022 Bool q = true;
13023 Bool *pq = &q;
13024 bool *qq = &q;
13025
13026int
13027main ()
13028{
13029
13030 bool e = &s;
13031 *pq |= q; *pq |= ! q;
13032 *qq |= q; *qq |= ! q;
13033 /* Refer to every declared value, to avoid compiler optimizations. */
13034 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13035 + !m + !n + !o + !p + !q + !pq + !qq);
13036
13037 ;
13038 return 0;
13039}
13040_ACEOF
13041if ac_fn_c_try_compile "$LINENO"; then :
13042 ac_cv_header_stdbool_h=yes
13043else
13044 ac_cv_header_stdbool_h=no
13045fi
13046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13047fi
13048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13049$as_echo "$ac_cv_header_stdbool_h" >&6; }
13050 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
d0ac1c44 13051if test "x$ac_cv_type__Bool" = xyes; then :
6ec2e0f5
SDJ
13052
13053cat >>confdefs.h <<_ACEOF
13054#define HAVE__BOOL 1
13055_ACEOF
13056
13057
13058fi
13059
13060
13061
13062 REPLACE_NULL=0;
13063 HAVE_MAX_ALIGN_T=1;
13064 HAVE_WCHAR_T=1;
13065
13066
13067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13068$as_echo_n "checking for wchar_t... " >&6; }
d0ac1c44 13069if ${gt_cv_c_wchar_t+:} false; then :
6ec2e0f5
SDJ
13070 $as_echo_n "(cached) " >&6
13071else
13072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13073/* end confdefs.h. */
13074#include <stddef.h>
13075 wchar_t foo = (wchar_t)'\0';
13076int
13077main ()
13078{
13079
13080 ;
13081 return 0;
13082}
13083_ACEOF
13084if ac_fn_c_try_compile "$LINENO"; then :
13085 gt_cv_c_wchar_t=yes
13086else
13087 gt_cv_c_wchar_t=no
13088fi
13089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13090fi
13091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13092$as_echo "$gt_cv_c_wchar_t" >&6; }
13093 if test $gt_cv_c_wchar_t = yes; then
13094
13095$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13096
13097 fi
13098
13099
13100
472fa5ee
SM
13101
13102
13103
13104
13105 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
d0ac1c44 13106if test "x$ac_cv_have_decl_strdup" = xyes; then :
6ec2e0f5
SDJ
13107 ac_have_decl=1
13108else
13109 ac_have_decl=0
13110fi
13111
13112cat >>confdefs.h <<_ACEOF
13113#define HAVE_DECL_STRDUP $ac_have_decl
13114_ACEOF
13115
13116
472fa5ee 13117
6ec2e0f5
SDJ
13118 REPLACE_STRERROR_0=0
13119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
13120$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
d0ac1c44 13121if ${gl_cv_func_strerror_0_works+:} false; then :
6ec2e0f5
SDJ
13122 $as_echo_n "(cached) " >&6
13123else
13124 if test "$cross_compiling" = yes; then :
13125 case "$host_os" in
13126 # Guess yes on glibc systems.
13127 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
13128 # If we don't know, assume the worst.
13129 *) gl_cv_func_strerror_0_works="guessing no" ;;
13130 esac
13131
13132else
13133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13134/* end confdefs.h. */
13135#include <string.h>
13136 #include <errno.h>
13137
13138int
13139main ()
13140{
13141int result = 0;
13142 char *str;
13143 errno = 0;
13144 str = strerror (0);
13145 if (!*str) result |= 1;
13146 if (errno) result |= 2;
13147 if (strstr (str, "nknown") || strstr (str, "ndefined"))
13148 result |= 4;
13149 return result;
13150 ;
13151 return 0;
13152}
13153_ACEOF
13154if ac_fn_c_try_run "$LINENO"; then :
13155 gl_cv_func_strerror_0_works=yes
13156else
13157 gl_cv_func_strerror_0_works=no
13158fi
13159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13160 conftest.$ac_objext conftest.beam conftest.$ac_ext
13161fi
13162
13163
13164fi
13165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
13166$as_echo "$gl_cv_func_strerror_0_works" >&6; }
13167 case "$gl_cv_func_strerror_0_works" in
13168 *yes) ;;
13169 *)
13170 REPLACE_STRERROR_0=1
13171
13172$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
13173
13174 ;;
13175 esac
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188 if test $gl_cv_have_include_next = yes; then
13189 gl_cv_next_string_h='<'string.h'>'
13190 else
13191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
13192$as_echo_n "checking absolute name of <string.h>... " >&6; }
d0ac1c44 13193if ${gl_cv_next_string_h+:} false; then :
6ec2e0f5
SDJ
13194 $as_echo_n "(cached) " >&6
13195else
13196
13197
13198
13199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13200/* end confdefs.h. */
13201#include <string.h>
13202_ACEOF
13203 case "$host_os" in
13204 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13205 *) gl_absname_cpp="$ac_cpp" ;;
13206 esac
13207
13208 case "$host_os" in
13209 mingw*)
13210 gl_dirsep_regex='[/\\]'
13211 ;;
13212 *)
13213 gl_dirsep_regex='\/'
13214 ;;
13215 esac
13216 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13217 gl_header_literal_regex=`echo 'string.h' \
13218 | sed -e "$gl_make_literal_regex_sed"`
13219 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13220 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13221 s|^/[^/]|//&|
13222 p
13223 q
13224 }'
13225
13226 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13227 sed -n "$gl_absolute_header_sed"`
13228
13229 gl_header=$gl_cv_absolute_string_h
13230 gl_cv_next_string_h='"'$gl_header'"'
13231
13232
13233fi
13234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
13235$as_echo "$gl_cv_next_string_h" >&6; }
13236 fi
13237 NEXT_STRING_H=$gl_cv_next_string_h
13238
13239 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13240 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13241 gl_next_as_first_directive='<'string.h'>'
13242 else
13243 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13244 gl_next_as_first_directive=$gl_cv_next_string_h
13245 fi
13246 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
13247
13248
13249
13250
13251
13252
13253 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
13254 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13256$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
d0ac1c44 13257if eval \${$as_gl_Symbol+:} false; then :
6ec2e0f5
SDJ
13258 $as_echo_n "(cached) " >&6
13259else
13260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13261/* end confdefs.h. */
13262#include <string.h>
13263
13264int
13265main ()
13266{
13267#undef $gl_func
13268 (void) $gl_func;
13269 ;
13270 return 0;
13271}
13272_ACEOF
13273if ac_fn_c_try_compile "$LINENO"; then :
13274 eval "$as_gl_Symbol=yes"
13275else
13276 eval "$as_gl_Symbol=no"
13277fi
13278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13279fi
13280eval ac_res=\$$as_gl_Symbol
13281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13282$as_echo "$ac_res" >&6; }
d0ac1c44 13283 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
6ec2e0f5
SDJ
13284 cat >>confdefs.h <<_ACEOF
13285#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13286_ACEOF
13287
13288 eval ac_cv_have_decl_$gl_func=yes
13289fi
13290 done
13291
13292
13293
13294
13295
13296 if test "$gl_cv_func_memchr_works" != yes; then
13297 REPLACE_STRSTR=1
13298 else
13299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
13300$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 13301if ${gl_cv_func_strstr_works_always+:} false; then :
6ec2e0f5
SDJ
13302 $as_echo_n "(cached) " >&6
13303else
13304 if test "$cross_compiling" = yes; then :
13305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13306/* end confdefs.h. */
13307
13308#ifdef __GNU_LIBRARY__
13309 #include <features.h>
13310 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
13311 || defined __UCLIBC__
13312 Lucky user
13313 #endif
13314#elif defined __CYGWIN__
13315 #include <cygwin/version.h>
13316 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
13317 Lucky user
13318 #endif
13319#else
13320 Lucky user
13321#endif
13322
13323_ACEOF
13324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13325 $EGREP "Lucky user" >/dev/null 2>&1; then :
13326 gl_cv_func_strstr_works_always="guessing yes"
13327else
13328 gl_cv_func_strstr_works_always="guessing no"
13329fi
13330rm -f conftest*
13331
13332
13333else
13334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13335/* end confdefs.h. */
13336
13337#include <string.h> /* for strstr */
13338#define P "_EF_BF_BD"
13339#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
13340#define NEEDLE P P P P P
13341
13342int
13343main ()
13344{
13345return !!strstr (HAYSTACK, NEEDLE);
13346
13347 ;
13348 return 0;
13349}
13350_ACEOF
13351if ac_fn_c_try_run "$LINENO"; then :
13352 gl_cv_func_strstr_works_always=yes
13353else
13354 gl_cv_func_strstr_works_always=no
13355fi
13356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13357 conftest.$ac_objext conftest.beam conftest.$ac_ext
13358fi
13359
13360
13361fi
13362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
13363$as_echo "$gl_cv_func_strstr_works_always" >&6; }
13364 case "$gl_cv_func_strstr_works_always" in
13365 *yes) ;;
13366 *)
13367 REPLACE_STRSTR=1
13368 ;;
13369 esac
13370 fi
13371
472fa5ee
SM
13372
13373 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
d0ac1c44 13374if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
6ec2e0f5
SDJ
13375 ac_have_decl=1
13376else
13377 ac_have_decl=0
13378fi
13379
13380cat >>confdefs.h <<_ACEOF
13381#define HAVE_DECL_STRTOK_R $ac_have_decl
13382_ACEOF
13383
472fa5ee 13384
6ec2e0f5
SDJ
13385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
13386$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
13387if test -z "$MKDIR_P"; then
d0ac1c44 13388 if ${ac_cv_path_mkdir+:} false; then :
6ec2e0f5
SDJ
13389 $as_echo_n "(cached) " >&6
13390else
13391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13392for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
13393do
13394 IFS=$as_save_IFS
13395 test -z "$as_dir" && as_dir=.
13396 for ac_prog in mkdir gmkdir; do
13397 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 13398 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
6ec2e0f5
SDJ
13399 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
13400 'mkdir (GNU coreutils) '* | \
13401 'mkdir (coreutils) '* | \
13402 'mkdir (fileutils) '4.1*)
13403 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
13404 break 3;;
13405 esac
13406 done
13407 done
13408 done
13409IFS=$as_save_IFS
13410
13411fi
13412
d0ac1c44 13413 test -d ./--version && rmdir ./--version
6ec2e0f5
SDJ
13414 if test "${ac_cv_path_mkdir+set}" = set; then
13415 MKDIR_P="$ac_cv_path_mkdir -p"
13416 else
13417 # As a last resort, use the slow shell script. Don't cache a
13418 # value for MKDIR_P within a source directory, because that will
13419 # break other packages using the cache if that directory is
13420 # removed, or if the value is a relative name.
6ec2e0f5
SDJ
13421 MKDIR_P="$ac_install_sh -d"
13422 fi
13423fi
13424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
13425$as_echo "$MKDIR_P" >&6; }
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445 if test $gl_cv_have_include_next = yes; then
13446 gl_cv_next_sys_types_h='<'sys/types.h'>'
13447 else
13448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
13449$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
d0ac1c44 13450if ${gl_cv_next_sys_types_h+:} false; then :
6ec2e0f5
SDJ
13451 $as_echo_n "(cached) " >&6
13452else
13453
13454
13455
13456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13457/* end confdefs.h. */
13458#include <sys/types.h>
13459_ACEOF
13460 case "$host_os" in
13461 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13462 *) gl_absname_cpp="$ac_cpp" ;;
13463 esac
13464
13465 case "$host_os" in
13466 mingw*)
13467 gl_dirsep_regex='[/\\]'
13468 ;;
13469 *)
13470 gl_dirsep_regex='\/'
13471 ;;
13472 esac
13473 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13474 gl_header_literal_regex=`echo 'sys/types.h' \
13475 | sed -e "$gl_make_literal_regex_sed"`
13476 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13477 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13478 s|^/[^/]|//&|
13479 p
13480 q
13481 }'
13482
13483 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13484 sed -n "$gl_absolute_header_sed"`
13485
13486 gl_header=$gl_cv_absolute_sys_types_h
13487 gl_cv_next_sys_types_h='"'$gl_header'"'
13488
13489
13490fi
13491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
13492$as_echo "$gl_cv_next_sys_types_h" >&6; }
13493 fi
13494 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
13495
13496 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13497 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13498 gl_next_as_first_directive='<'sys/types.h'>'
13499 else
13500 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13501 gl_next_as_first_directive=$gl_cv_next_sys_types_h
13502 fi
13503 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516 GNULIB_MKTIME=0;
13517 GNULIB_NANOSLEEP=0;
13518 GNULIB_STRPTIME=0;
13519 GNULIB_TIMEGM=0;
13520 GNULIB_TIME_R=0;
13521 GNULIB_TIME_RZ=0;
13522 HAVE_DECL_LOCALTIME_R=1;
13523 HAVE_NANOSLEEP=1;
13524 HAVE_STRPTIME=1;
13525 HAVE_TIMEGM=1;
13526 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
13527 REPLACE_MKTIME=GNULIB_PORTCHECK;
13528 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
13529 REPLACE_TIMEGM=GNULIB_PORTCHECK;
13530
13531 : ${GNULIB_GETTIMEOFDAY=0};
13532 REPLACE_GMTIME=0;
13533 REPLACE_LOCALTIME=0;
13534
13535
13536
472fa5ee
SM
13537 :
13538
13539
13540
13541
13542
6ec2e0f5
SDJ
13543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
13544$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
d0ac1c44 13545if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
6ec2e0f5
SDJ
13546 $as_echo_n "(cached) " >&6
13547else
13548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13549/* end confdefs.h. */
13550#include <time.h>
13551
13552int
13553main ()
13554{
13555static struct timespec x; x.tv_sec = x.tv_nsec;
13556 ;
13557 return 0;
13558}
13559_ACEOF
13560if ac_fn_c_try_compile "$LINENO"; then :
13561 gl_cv_sys_struct_timespec_in_time_h=yes
13562else
13563 gl_cv_sys_struct_timespec_in_time_h=no
13564fi
13565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13566fi
13567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
13568$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
13569
13570 TIME_H_DEFINES_STRUCT_TIMESPEC=0
13571 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
13572 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
13573 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
13574 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
13575 TIME_H_DEFINES_STRUCT_TIMESPEC=1
13576 else
13577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
13578$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
d0ac1c44 13579if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
6ec2e0f5
SDJ
13580 $as_echo_n "(cached) " >&6
13581else
13582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13583/* end confdefs.h. */
13584#include <sys/time.h>
13585
13586int
13587main ()
13588{
13589static struct timespec x; x.tv_sec = x.tv_nsec;
13590 ;
13591 return 0;
13592}
13593_ACEOF
13594if ac_fn_c_try_compile "$LINENO"; then :
13595 gl_cv_sys_struct_timespec_in_sys_time_h=yes
13596else
13597 gl_cv_sys_struct_timespec_in_sys_time_h=no
13598fi
13599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13600fi
13601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
13602$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
13603 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
13604 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
13605 else
13606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
13607$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
d0ac1c44 13608if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
6ec2e0f5
SDJ
13609 $as_echo_n "(cached) " >&6
13610else
13611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13612/* end confdefs.h. */
13613#include <pthread.h>
13614
13615int
13616main ()
13617{
13618static struct timespec x; x.tv_sec = x.tv_nsec;
13619 ;
13620 return 0;
13621}
13622_ACEOF
13623if ac_fn_c_try_compile "$LINENO"; then :
13624 gl_cv_sys_struct_timespec_in_pthread_h=yes
13625else
13626 gl_cv_sys_struct_timespec_in_pthread_h=no
13627fi
13628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13629fi
13630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
13631$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
13632 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
13633 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
13634 else
13635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
13636$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
d0ac1c44 13637if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
6ec2e0f5
SDJ
13638 $as_echo_n "(cached) " >&6
13639else
13640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13641/* end confdefs.h. */
13642#include <unistd.h>
13643
13644int
13645main ()
13646{
13647static struct timespec x; x.tv_sec = x.tv_nsec;
13648 ;
13649 return 0;
13650}
13651_ACEOF
13652if ac_fn_c_try_compile "$LINENO"; then :
13653 gl_cv_sys_struct_timespec_in_unistd_h=yes
13654else
13655 gl_cv_sys_struct_timespec_in_unistd_h=no
13656fi
13657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13658fi
13659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
13660$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
13661 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
13662 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
13663 fi
13664 fi
13665 fi
13666 fi
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683 if test $gl_cv_have_include_next = yes; then
13684 gl_cv_next_time_h='<'time.h'>'
13685 else
13686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
13687$as_echo_n "checking absolute name of <time.h>... " >&6; }
d0ac1c44 13688if ${gl_cv_next_time_h+:} false; then :
6ec2e0f5
SDJ
13689 $as_echo_n "(cached) " >&6
13690else
13691
13692
13693
13694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13695/* end confdefs.h. */
13696#include <time.h>
13697_ACEOF
13698 case "$host_os" in
13699 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13700 *) gl_absname_cpp="$ac_cpp" ;;
13701 esac
13702
13703 case "$host_os" in
13704 mingw*)
13705 gl_dirsep_regex='[/\\]'
13706 ;;
13707 *)
13708 gl_dirsep_regex='\/'
13709 ;;
13710 esac
13711 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13712 gl_header_literal_regex=`echo 'time.h' \
13713 | sed -e "$gl_make_literal_regex_sed"`
13714 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13715 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13716 s|^/[^/]|//&|
13717 p
13718 q
13719 }'
13720
13721 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13722 sed -n "$gl_absolute_header_sed"`
13723
13724 gl_header=$gl_cv_absolute_time_h
13725 gl_cv_next_time_h='"'$gl_header'"'
13726
13727
13728fi
13729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
13730$as_echo "$gl_cv_next_time_h" >&6; }
13731 fi
13732 NEXT_TIME_H=$gl_cv_next_time_h
13733
13734 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13735 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13736 gl_next_as_first_directive='<'time.h'>'
13737 else
13738 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13739 gl_next_as_first_directive=$gl_cv_next_time_h
13740 fi
13741 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
13742
13743
13744
13745
13746
13747
13748
13749
472fa5ee
SM
13750
13751
13752
13753
13754 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
d0ac1c44 13755if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
6ec2e0f5
SDJ
13756 ac_have_decl=1
13757else
13758 ac_have_decl=0
13759fi
13760
13761cat >>confdefs.h <<_ACEOF
13762#define HAVE_DECL_UNSETENV $ac_have_decl
13763_ACEOF
13764
13765
472fa5ee 13766
6ec2e0f5
SDJ
13767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
13768$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
d0ac1c44 13769if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
6ec2e0f5
SDJ
13770 $as_echo_n "(cached) " >&6
13771else
13772 gl_cv_header_wchar_h_correct_inline=yes
13773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13774/* end confdefs.h. */
13775
13776 #define wcstod renamed_wcstod
13777/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13778 <wchar.h>.
13779 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13780 included before <wchar.h>. */
13781#include <stddef.h>
13782#include <stdio.h>
13783#include <time.h>
13784#include <wchar.h>
13785extern int zero (void);
13786int main () { return zero(); }
13787
13788_ACEOF
13789 save_ac_compile="$ac_compile"
13790 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
13791 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13792 (eval $ac_compile) 2>&5
13793 ac_status=$?
13794 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13795 test $ac_status = 0; }; then
13796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13797/* end confdefs.h. */
13798
13799 #define wcstod renamed_wcstod
13800/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13801 <wchar.h>.
13802 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13803 included before <wchar.h>. */
13804#include <stddef.h>
13805#include <stdio.h>
13806#include <time.h>
13807#include <wchar.h>
13808int zero (void) { return 0; }
13809
13810_ACEOF
13811 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
13812 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13813 (eval $ac_compile) 2>&5
13814 ac_status=$?
13815 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13816 test $ac_status = 0; }; then
13817 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
13818 :
13819 else
13820 gl_cv_header_wchar_h_correct_inline=no
13821 fi
13822 fi
13823 fi
13824 ac_compile="$save_ac_compile"
13825 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
13826
13827fi
13828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
13829$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
13830 if test $gl_cv_header_wchar_h_correct_inline = no; then
d0ac1c44 13831 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
6ec2e0f5
SDJ
13832This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
13833C99 mode. You have four options:
13834 - Add the flag -fgnu89-inline to CC and reconfigure, or
13835 - Fix your include files, using parts of
13836 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
13837 - Use a gcc version older than 4.3, or
13838 - Don't use the flags -std=c99 or -std=gnu99.
13839Configuration aborted." "$LINENO" 5
13840 fi
13841
13842
13843
13844
13845
472fa5ee
SM
13846
13847
13848
13849 :
13850
13851
13852
13853
13854
6ec2e0f5
SDJ
13855 if test $ac_cv_header_features_h = yes; then
13856 HAVE_FEATURES_H=1
13857 else
13858 HAVE_FEATURES_H=0
13859 fi
13860
13861
13862
13863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13864$as_echo_n "checking for wint_t... " >&6; }
d0ac1c44 13865if ${gt_cv_c_wint_t+:} false; then :
6ec2e0f5
SDJ
13866 $as_echo_n "(cached) " >&6
13867else
13868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13869/* end confdefs.h. */
13870
13871/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13872 <wchar.h>.
13873 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13874 before <wchar.h>. */
13875#include <stddef.h>
13876#include <stdio.h>
13877#include <time.h>
13878#include <wchar.h>
13879 wint_t foo = (wchar_t)'\0';
13880int
13881main ()
13882{
13883
13884 ;
13885 return 0;
13886}
13887_ACEOF
13888if ac_fn_c_try_compile "$LINENO"; then :
13889 gt_cv_c_wint_t=yes
13890else
13891 gt_cv_c_wint_t=no
13892fi
13893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13894fi
13895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13896$as_echo "$gt_cv_c_wint_t" >&6; }
13897 if test $gt_cv_c_wint_t = yes; then
13898
13899$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
13900
13901 fi
13902
13903
13904 GNULIB_ISWBLANK=0;
13905 GNULIB_WCTYPE=0;
13906 GNULIB_ISWCTYPE=0;
13907 GNULIB_WCTRANS=0;
13908 GNULIB_TOWCTRANS=0;
13909 HAVE_ISWBLANK=1;
13910 HAVE_WCTYPE_T=1;
13911 HAVE_WCTRANS_T=1;
13912 REPLACE_ISWBLANK=0;
13913
13914
13915
13916
472fa5ee
SM
13917
13918
13919
6ec2e0f5
SDJ
13920 if false; then
13921 GL_COND_LIBTOOL_TRUE=
13922 GL_COND_LIBTOOL_FALSE='#'
13923else
13924 GL_COND_LIBTOOL_TRUE='#'
13925 GL_COND_LIBTOOL_FALSE=
13926fi
13927
13928 gl_cond_libtool=false
13929 gl_libdeps=
13930 gl_ltlibdeps=
13931 gl_m4_base='import/m4'
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941 gl_source_base='import'
13942
13943
13944 if test $ac_cv_func_alloca_works = no; then
13945 :
13946 fi
13947
13948 # Define an additional variable used in the Makefile substitution.
13949 if test $ac_cv_working_alloca_h = yes; then
13950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
13951$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
d0ac1c44 13952if ${gl_cv_rpl_alloca+:} false; then :
6ec2e0f5
SDJ
13953 $as_echo_n "(cached) " >&6
13954else
13955
13956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13957/* end confdefs.h. */
13958
13959#if defined __GNUC__ || defined _AIX || defined _MSC_VER
13960 Need own alloca
13961#endif
13962
13963_ACEOF
13964if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13965 $EGREP "Need own alloca" >/dev/null 2>&1; then :
13966 gl_cv_rpl_alloca=yes
13967else
13968 gl_cv_rpl_alloca=no
13969fi
13970rm -f conftest*
13971
13972
13973fi
13974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
13975$as_echo "$gl_cv_rpl_alloca" >&6; }
13976 if test $gl_cv_rpl_alloca = yes; then
13977
13978$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13979
13980 ALLOCA_H=alloca.h
13981 else
13982 ALLOCA_H=
13983 fi
13984 else
13985 ALLOCA_H=alloca.h
13986 fi
13987
13988 if test -n "$ALLOCA_H"; then
13989 GL_GENERATE_ALLOCA_H_TRUE=
13990 GL_GENERATE_ALLOCA_H_FALSE='#'
13991else
13992 GL_GENERATE_ALLOCA_H_TRUE='#'
13993 GL_GENERATE_ALLOCA_H_FALSE=
13994fi
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
14006
14007
14008
14009
14010 if test $ac_cv_func_canonicalize_file_name = no; then
14011 HAVE_CANONICALIZE_FILE_NAME=0
14012 if test $ac_cv_func_realpath = no; then
14013 HAVE_REALPATH=0
14014 else
14015 case "$gl_cv_func_realpath_works" in
14016 *yes) ;;
14017 *) REPLACE_REALPATH=1 ;;
14018 esac
14019 fi
14020 else
14021 case "$gl_cv_func_realpath_works" in
14022 *yes)
14023 ;;
14024 *)
14025 REPLACE_CANONICALIZE_FILE_NAME=1
14026 REPLACE_REALPATH=1
14027 ;;
14028 esac
14029 fi
14030
14031 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
14032
14033
14034
14035
14036
14037
14038
14039
14040 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
14041
14042 fi
14043
14044
14045cat >>confdefs.h <<_ACEOF
14046#define GNULIB_CANONICALIZE_LGPL 1
14047_ACEOF
14048
14049
14050
14051
14052
14053
14054
14055 GNULIB_CANONICALIZE_FILE_NAME=1
14056
14057
14058
14059
14060
14061$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
14062
14063
14064
14065
14066
14067
14068
14069
14070 GNULIB_REALPATH=1
14071
14072
14073
14074
14075
14076$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
14077
14078
14079
14080
14081
14082
14083
14084
14085 GNULIB_CHDIR=1
14086
14087
14088
14089
14090
14091$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
14092
14093
14094
14095
14096
14097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
14098$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
d0ac1c44 14099if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
6ec2e0f5
SDJ
14100 $as_echo_n "(cached) " >&6
14101else
14102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14103/* end confdefs.h. */
14104
14105/* Arrange to define PATH_MAX, like "pathmax.h" does. */
14106#if HAVE_UNISTD_H
14107# include <unistd.h>
14108#endif
14109#include <limits.h>
14110#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
14111# include <sys/param.h>
14112#endif
14113#if !defined PATH_MAX && defined MAXPATHLEN
14114# define PATH_MAX MAXPATHLEN
14115#endif
14116#ifdef __hpux
14117# undef PATH_MAX
14118# define PATH_MAX 1024
14119#endif
14120#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
14121# undef PATH_MAX
14122# define PATH_MAX 260
14123#endif
14124
14125#ifdef PATH_MAX
14126have_arbitrary_file_name_length_limit
14127#endif
14128_ACEOF
14129if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14130 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
14131 gl_cv_have_arbitrary_file_name_length_limit=yes
14132else
14133 gl_cv_have_arbitrary_file_name_length_limit=no
14134fi
14135rm -f conftest*
14136
14137fi
14138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
14139$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
14140
14141 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
14142
14143
14144
14145
14146
14147
14148
14149
14150 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
14151
14152 :
14153 fi
14154
14155
14156$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
14157
14158
14159
14160
14161
14162 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
14163 REPLACE_CLOSE=1
14164 fi
14165
14166
14167
14168
14169
472fa5ee
SM
14170 :
14171
14172
14173
14174
14175
6ec2e0f5
SDJ
14176 if test $ac_cv_header_sys_socket_h != yes; then
14177 for ac_header in winsock2.h
14178do :
14179 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 14180if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
14181 cat >>confdefs.h <<_ACEOF
14182#define HAVE_WINSOCK2_H 1
14183_ACEOF
14184
14185fi
14186
14187done
14188
14189 fi
14190 if test "$ac_cv_header_winsock2_h" = yes; then
14191 HAVE_WINSOCK2_H=1
14192 UNISTD_H_HAVE_WINSOCK2_H=1
14193 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
14194 else
14195 HAVE_WINSOCK2_H=0
14196 fi
14197
14198
14199 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
14200 REPLACE_CLOSE=1
14201 fi
14202
14203
14204 if test $REPLACE_CLOSE = 0; then
14205
14206
14207
472fa5ee
SM
14208 :
14209
14210
14211
14212
14213
6ec2e0f5
SDJ
14214 if test $ac_cv_func_fchdir = no; then
14215 HAVE_FCHDIR=0
14216 fi
14217
14218 if test $HAVE_FCHDIR = 0; then
14219 REPLACE_CLOSE=1
14220 fi
14221 fi
14222
14223
14224 if test $REPLACE_CLOSE = 1; then
14225
14226
14227
14228
14229
14230
14231
14232
14233 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
14234
14235 fi
14236
14237
14238
14239
14240
14241 GNULIB_CLOSE=1
14242
14243
14244
14245
14246
14247$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
14248
14249
14250
14251
14252
14253
14254 for ac_func in closedir
14255do :
14256 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
d0ac1c44 14257if test "x$ac_cv_func_closedir" = xyes; then :
6ec2e0f5
SDJ
14258 cat >>confdefs.h <<_ACEOF
14259#define HAVE_CLOSEDIR 1
14260_ACEOF
14261
14262fi
14263done
14264
14265 if test $ac_cv_func_closedir = no; then
14266 HAVE_CLOSEDIR=0
14267 fi
14268
14269
14270
14271
472fa5ee
SM
14272 :
14273
14274
14275
14276
14277
6ec2e0f5
SDJ
14278 if test $ac_cv_func_fchdir = no; then
14279 HAVE_FCHDIR=0
14280 fi
14281
14282 if test $HAVE_FCHDIR = 0; then
14283 if test $HAVE_CLOSEDIR = 1; then
14284 REPLACE_CLOSEDIR=1
14285 fi
14286 fi
14287
14288 case $host_os,$HAVE_CLOSEDIR in
14289 os2*,1)
14290 REPLACE_CLOSEDIR=1;;
14291 esac
14292
14293 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
14294
14295
14296
14297
14298
14299
14300
14301
14302 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
14303
14304 fi
14305
14306
14307
14308
14309
14310 GNULIB_CLOSEDIR=1
14311
14312
14313
14314
14315
14316$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
14317
14318
14319
14320
14321 if test "x$datarootdir" = x; then
14322 datarootdir='${datadir}'
14323
14324 fi
14325 if test "x$docdir" = x; then
d0ac1c44 14326 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
6ec2e0f5
SDJ
14327
14328 fi
14329 if test "x$htmldir" = x; then
14330 htmldir='${docdir}'
14331
14332 fi
14333 if test "x$dvidir" = x; then
14334 dvidir='${docdir}'
14335
14336 fi
14337 if test "x$pdfdir" = x; then
14338 pdfdir='${docdir}'
14339
14340 fi
14341 if test "x$psdir" = x; then
14342 psdir='${docdir}'
14343
14344 fi
14345 if test "x$lispdir" = x; then
14346 lispdir='${datarootdir}/emacs/site-lisp'
14347
14348 fi
14349 if test "x$localedir" = x; then
14350 localedir='${datarootdir}/locale'
14351
14352 fi
14353 if test "x$runstatedir" = x; then
14354 runstatedir='${localstatedir}/run'
14355
14356 fi
14357
14358 pkglibexecdir='${libexecdir}/${PACKAGE}'
14359
14360
14361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
14362$as_echo_n "checking for d_ino member in directory struct... " >&6; }
d0ac1c44 14363if ${gl_cv_struct_dirent_d_ino+:} false; then :
6ec2e0f5
SDJ
14364 $as_echo_n "(cached) " >&6
14365else
14366 if test "$cross_compiling" = yes; then :
14367 case "$host_os" in
14368 # Guess yes on glibc systems with Linux kernel.
14369 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
14370 # If we don't know, assume the worst.
14371 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
14372 esac
14373
14374else
14375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14376/* end confdefs.h. */
14377#include <sys/types.h>
14378 #include <sys/stat.h>
14379 #include <dirent.h>
14380
14381int
14382main ()
14383{
14384DIR *dp = opendir (".");
14385 struct dirent *e;
14386 struct stat st;
14387 if (! dp)
14388 return 1;
14389 e = readdir (dp);
14390 if (! e)
14391 return 2;
14392 if (lstat (e->d_name, &st) != 0)
14393 return 3;
14394 if (e->d_ino != st.st_ino)
14395 return 4;
14396 closedir (dp);
14397 return 0;
14398
14399 ;
14400 return 0;
14401}
14402_ACEOF
14403if ac_fn_c_try_run "$LINENO"; then :
14404 gl_cv_struct_dirent_d_ino=yes
14405else
14406 gl_cv_struct_dirent_d_ino=no
14407fi
14408rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14409 conftest.$ac_objext conftest.beam conftest.$ac_ext
14410fi
14411
14412fi
14413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
14414$as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
14415 case "$gl_cv_struct_dirent_d_ino" in
14416 *yes)
14417
14418$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
14419
14420 ;;
14421 esac
14422
14423
14424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
14425$as_echo_n "checking for d_type member in directory struct... " >&6; }
d0ac1c44 14426if ${gl_cv_struct_dirent_d_type+:} false; then :
6ec2e0f5
SDJ
14427 $as_echo_n "(cached) " >&6
14428else
14429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14430/* end confdefs.h. */
14431
14432#include <sys/types.h>
14433#include <dirent.h>
14434
14435int
14436main ()
14437{
14438struct dirent dp; dp.d_type = 0;
14439 ;
14440 return 0;
14441}
14442_ACEOF
14443if ac_fn_c_try_link "$LINENO"; then :
14444 gl_cv_struct_dirent_d_type=yes
14445else
14446 gl_cv_struct_dirent_d_type=no
14447fi
14448rm -f core conftest.err conftest.$ac_objext \
14449 conftest$ac_exeext conftest.$ac_ext
14450
14451
14452fi
14453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
14454$as_echo "$gl_cv_struct_dirent_d_type" >&6; }
14455 if test $gl_cv_struct_dirent_d_type = yes; then
14456
14457$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
14458
14459 fi
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
472fa5ee
SM
14471 :
14472
14473
14474
14475
14476
6ec2e0f5
SDJ
14477
14478
14479
14480 if test $gl_cv_have_include_next = yes; then
14481 gl_cv_next_dirent_h='<'dirent.h'>'
14482 else
14483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
14484$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
d0ac1c44 14485if ${gl_cv_next_dirent_h+:} false; then :
6ec2e0f5
SDJ
14486 $as_echo_n "(cached) " >&6
14487else
14488
14489 if test $ac_cv_header_dirent_h = yes; then
14490
14491
14492
14493
14494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14495/* end confdefs.h. */
14496#include <dirent.h>
14497_ACEOF
14498 case "$host_os" in
14499 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14500 *) gl_absname_cpp="$ac_cpp" ;;
14501 esac
14502
14503 case "$host_os" in
14504 mingw*)
14505 gl_dirsep_regex='[/\\]'
14506 ;;
14507 *)
14508 gl_dirsep_regex='\/'
14509 ;;
14510 esac
14511 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14512 gl_header_literal_regex=`echo 'dirent.h' \
14513 | sed -e "$gl_make_literal_regex_sed"`
14514 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14515 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14516 s|^/[^/]|//&|
14517 p
14518 q
14519 }'
14520
14521 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14522 sed -n "$gl_absolute_header_sed"`
14523
14524 gl_header=$gl_cv_absolute_dirent_h
14525 gl_cv_next_dirent_h='"'$gl_header'"'
14526 else
14527 gl_cv_next_dirent_h='<'dirent.h'>'
14528 fi
14529
14530
14531fi
14532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
14533$as_echo "$gl_cv_next_dirent_h" >&6; }
14534 fi
14535 NEXT_DIRENT_H=$gl_cv_next_dirent_h
14536
14537 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14538 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14539 gl_next_as_first_directive='<'dirent.h'>'
14540 else
14541 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14542 gl_next_as_first_directive=$gl_cv_next_dirent_h
14543 fi
14544 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
14545
14546
14547
14548
14549 if test $ac_cv_header_dirent_h = yes; then
14550 HAVE_DIRENT_H=1
14551 else
14552 HAVE_DIRENT_H=0
14553 fi
14554
14555
14556
14557 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
14558 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14560$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
d0ac1c44 14561if eval \${$as_gl_Symbol+:} false; then :
6ec2e0f5
SDJ
14562 $as_echo_n "(cached) " >&6
14563else
14564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14565/* end confdefs.h. */
14566#include <dirent.h>
14567
14568int
14569main ()
14570{
14571#undef $gl_func
14572 (void) $gl_func;
14573 ;
14574 return 0;
14575}
14576_ACEOF
14577if ac_fn_c_try_compile "$LINENO"; then :
14578 eval "$as_gl_Symbol=yes"
14579else
14580 eval "$as_gl_Symbol=no"
14581fi
14582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14583fi
14584eval ac_res=\$$as_gl_Symbol
14585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14586$as_echo "$ac_res" >&6; }
d0ac1c44 14587 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
6ec2e0f5
SDJ
14588 cat >>confdefs.h <<_ACEOF
14589#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14590_ACEOF
14591
14592 eval ac_cv_have_decl_$gl_func=yes
14593fi
14594 done
14595
14596
14597
14598
14599
14600
14601
14602 for ac_func in dirfd
14603do :
14604 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
d0ac1c44 14605if test "x$ac_cv_func_dirfd" = xyes; then :
6ec2e0f5
SDJ
14606 cat >>confdefs.h <<_ACEOF
14607#define HAVE_DIRFD 1
14608_ACEOF
14609
14610fi
14611done
14612
14613 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
14614 #include <dirent.h>
14615"
d0ac1c44 14616if test "x$ac_cv_have_decl_dirfd" = xyes; then :
6ec2e0f5
SDJ
14617 ac_have_decl=1
14618else
14619 ac_have_decl=0
14620fi
14621
14622cat >>confdefs.h <<_ACEOF
14623#define HAVE_DECL_DIRFD $ac_have_decl
14624_ACEOF
14625
14626 if test $ac_cv_have_decl_dirfd = no; then
14627 HAVE_DECL_DIRFD=0
14628 fi
14629
14630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
14631$as_echo_n "checking whether dirfd is a macro... " >&6; }
d0ac1c44 14632if ${gl_cv_func_dirfd_macro+:} false; then :
6ec2e0f5
SDJ
14633 $as_echo_n "(cached) " >&6
14634else
14635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14636/* end confdefs.h. */
14637
14638#include <sys/types.h>
14639#include <dirent.h>
14640#ifdef dirfd
14641 dirent_header_defines_dirfd
14642#endif
14643_ACEOF
14644if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14645 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
14646 gl_cv_func_dirfd_macro=yes
14647else
14648 gl_cv_func_dirfd_macro=no
14649fi
14650rm -f conftest*
14651
14652fi
14653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
14654$as_echo "$gl_cv_func_dirfd_macro" >&6; }
14655
14656 # Use the replacement if we have no function or macro with that name,
14657 # or if OS/2 kLIBC whose dirfd() does not work.
14658 # Replace only if the system declares dirfd already.
14659 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
14660 no,no,*,yes | *,*,os2*,yes)
14661 REPLACE_DIRFD=1
14662
14663$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
14664;;
14665 esac
14666
14667 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
14668 || test $REPLACE_DIRFD = 1; then
14669
14670
14671
14672
14673
14674
14675
14676
14677 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
14678
14679
14680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
14681$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
d0ac1c44 14682if ${gl_cv_sys_dir_fd_member_name+:} false; then :
6ec2e0f5
SDJ
14683 $as_echo_n "(cached) " >&6
14684else
14685
14686 dirfd_save_CFLAGS=$CFLAGS
14687 for ac_expr in d_fd dd_fd; do
14688
14689 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
14690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14691/* end confdefs.h. */
14692
14693 #include <sys/types.h>
14694 #include <dirent.h>
14695int
14696main ()
14697{
14698DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
14699 ;
14700 return 0;
14701}
14702_ACEOF
14703if ac_fn_c_try_compile "$LINENO"; then :
14704 dir_fd_found=yes
14705
14706fi
14707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14708 CFLAGS=$dirfd_save_CFLAGS
14709 test "$dir_fd_found" = yes && break
14710 done
14711 test "$dir_fd_found" = yes || ac_expr=no_such_member
14712
14713 gl_cv_sys_dir_fd_member_name=$ac_expr
14714
14715
14716fi
14717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
14718$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
14719 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
14720
14721cat >>confdefs.h <<_ACEOF
14722#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
14723_ACEOF
14724
14725 fi
14726
14727
14728 fi
14729
14730
14731
14732
14733
14734 GNULIB_DIRFD=1
14735
14736
14737
14738
14739
14740$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
14751$as_echo_n "checking whether // is distinct from /... " >&6; }
d0ac1c44 14752if ${gl_cv_double_slash_root+:} false; then :
6ec2e0f5
SDJ
14753 $as_echo_n "(cached) " >&6
14754else
14755 if test x"$cross_compiling" = xyes ; then
14756 # When cross-compiling, there is no way to tell whether // is special
14757 # short of a list of hosts. However, the only known hosts to date
14758 # that have a distinct // are Apollo DomainOS (too old to port to),
14759 # Cygwin, and z/OS. If anyone knows of another system for which // has
14760 # special semantics and is distinct from /, please report it to
14761 # <bug-gnulib@gnu.org>.
14762 case $host in
14763 *-cygwin | i370-ibm-openedition)
14764 gl_cv_double_slash_root=yes ;;
14765 *)
14766 # Be optimistic and assume that / and // are the same when we
14767 # don't know.
14768 gl_cv_double_slash_root='unknown, assuming no' ;;
14769 esac
14770 else
14771 set x `ls -di / // 2>/dev/null`
14772 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
14773 gl_cv_double_slash_root=no
14774 else
14775 gl_cv_double_slash_root=yes
14776 fi
14777 fi
14778fi
14779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
14780$as_echo "$gl_cv_double_slash_root" >&6; }
14781 if test "$gl_cv_double_slash_root" = yes; then
8690e634 14782
6ec2e0f5 14783$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8690e634 14784
6ec2e0f5 14785 fi
8690e634
JK
14786
14787
14788
14789
6ec2e0f5
SDJ
14790 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
14791 REPLACE_DUP=1
14792 fi
8690e634 14793
8690e634
JK
14794
14795
14796
472fa5ee
SM
14797 :
14798
14799
14800
14801
14802
6ec2e0f5
SDJ
14803 if test $ac_cv_func_fchdir = no; then
14804 HAVE_FCHDIR=0
14805 fi
8690e634 14806
6ec2e0f5
SDJ
14807 if test $HAVE_FCHDIR = 0; then
14808 REPLACE_DUP=1
14809 fi
8690e634 14810
6ec2e0f5
SDJ
14811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
14812$as_echo_n "checking whether dup works... " >&6; }
d0ac1c44 14813if ${gl_cv_func_dup_works+:} false; then :
6ec2e0f5 14814 $as_echo_n "(cached) " >&6
8690e634 14815else
6ec2e0f5
SDJ
14816 if test "$cross_compiling" = yes; then :
14817 gl_cv_func_dup_works='guessing yes'
14818else
14819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 14820/* end confdefs.h. */
6ec2e0f5
SDJ
14821#include <unistd.h>
14822 #include <fcntl.h>
14823 #include <errno.h>
14824int
14825main ()
14826{
14827/* On OS/2 kLIBC, dup does not work on a directory fd. */
14828 int fd = open (".", O_RDONLY);
14829 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
8690e634 14830
6ec2e0f5
SDJ
14831 ;
14832 return 0;
14833}
8690e634
JK
14834
14835_ACEOF
6ec2e0f5
SDJ
14836if ac_fn_c_try_run "$LINENO"; then :
14837 gl_cv_func_dup_works=yes
14838else
14839 gl_cv_func_dup_works=no
14840fi
14841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14842 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 14843fi
8690e634 14844
8690e634 14845
6ec2e0f5
SDJ
14846fi
14847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
14848$as_echo "$gl_cv_func_dup_works" >&6; }
14849 case "$gl_cv_func_dup_works" in
14850 *yes) ;;
14851 *)
14852 REPLACE_DUP=1
14853 ;;
14854 esac
8690e634 14855
6ec2e0f5 14856 if test $REPLACE_DUP = 1; then
8690e634 14857
8690e634 14858
8690e634 14859
8690e634 14860
8690e634 14861
6ec2e0f5
SDJ
14862
14863
14864
14865 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
14866
14867 :
8690e634
JK
14868 fi
14869
14870
8690e634
JK
14871
14872
14873
6ec2e0f5 14874 GNULIB_DUP=1
8690e634 14875
6ec2e0f5
SDJ
14876
14877
14878
14879
14880$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
14881
14882
14883
14884
14885
14886
14887
14888
14889$as_echo "#define HAVE_DUP2 1" >>confdefs.h
14890
14891
14892 if test $HAVE_DUP2 = 1; then
14893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
14894$as_echo_n "checking whether dup2 works... " >&6; }
d0ac1c44 14895if ${gl_cv_func_dup2_works+:} false; then :
8690e634
JK
14896 $as_echo_n "(cached) " >&6
14897else
14898 if test "$cross_compiling" = yes; then :
6ec2e0f5
SDJ
14899 case "$host_os" in
14900 mingw*) # on this platform, dup2 always returns 0 for success
14901 gl_cv_func_dup2_works="guessing no" ;;
14902 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
14903 gl_cv_func_dup2_works="guessing no" ;;
14904 aix* | freebsd*)
14905 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
14906 # not EBADF.
14907 gl_cv_func_dup2_works="guessing no" ;;
14908 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
14909 gl_cv_func_dup2_works="guessing no" ;;
14910 *-android*) # implemented using dup3(), which fails if oldfd == newfd
14911 gl_cv_func_dup2_works="guessing no" ;;
14912 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
14913 gl_cv_func_dup2_works="guessing no" ;;
14914 *) gl_cv_func_dup2_works="guessing yes" ;;
14915 esac
8690e634
JK
14916else
14917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14918/* end confdefs.h. */
14919
6ec2e0f5
SDJ
14920 #include <errno.h>
14921 #include <fcntl.h>
14922 #include <limits.h>
14923 #include <sys/resource.h>
14924 #include <unistd.h>
14925 #ifndef RLIM_SAVED_CUR
14926 # define RLIM_SAVED_CUR RLIM_INFINITY
14927 #endif
14928 #ifndef RLIM_SAVED_MAX
14929 # define RLIM_SAVED_MAX RLIM_INFINITY
14930 #endif
8690e634
JK
14931
14932int
14933main ()
14934{
6ec2e0f5
SDJ
14935int result = 0;
14936 int bad_fd = INT_MAX;
14937 struct rlimit rlim;
14938 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
14939 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
14940 && rlim.rlim_cur != RLIM_INFINITY
14941 && rlim.rlim_cur != RLIM_SAVED_MAX
14942 && rlim.rlim_cur != RLIM_SAVED_CUR)
14943 bad_fd = rlim.rlim_cur;
14944 #ifdef FD_CLOEXEC
14945 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
14946 result |= 1;
14947 #endif
14948 if (dup2 (1, 1) != 1)
14949 result |= 2;
14950 #ifdef FD_CLOEXEC
14951 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
14952 result |= 4;
14953 #endif
14954 close (0);
14955 if (dup2 (0, 0) != -1)
14956 result |= 8;
14957 /* Many gnulib modules require POSIX conformance of EBADF. */
14958 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
14959 result |= 16;
14960 /* Flush out some cygwin core dumps. */
14961 if (dup2 (2, -1) != -1 || errno != EBADF)
14962 result |= 32;
14963 dup2 (2, 255);
14964 dup2 (2, 256);
14965 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
14966 {
14967 int fd = open (".", O_RDONLY);
14968 if (fd == -1)
14969 result |= 64;
14970 else if (dup2 (fd, fd + 1) == -1)
14971 result |= 128;
14972
14973 close (fd);
14974 }
14975 return result;
8690e634
JK
14976 ;
14977 return 0;
14978}
6ec2e0f5 14979
8690e634
JK
14980_ACEOF
14981if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 14982 gl_cv_func_dup2_works=yes
8690e634 14983else
6ec2e0f5 14984 gl_cv_func_dup2_works=no
8690e634
JK
14985fi
14986rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14987 conftest.$ac_objext conftest.beam conftest.$ac_ext
14988fi
14989
6ec2e0f5
SDJ
14990
14991fi
14992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
14993$as_echo "$gl_cv_func_dup2_works" >&6; }
14994 case "$gl_cv_func_dup2_works" in
14995 *yes) ;;
14996 *)
14997 REPLACE_DUP2=1
14998 for ac_func in setdtablesize
14999do :
15000 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
d0ac1c44 15001if test "x$ac_cv_func_setdtablesize" = xyes; then :
6ec2e0f5
SDJ
15002 cat >>confdefs.h <<_ACEOF
15003#define HAVE_SETDTABLESIZE 1
15004_ACEOF
15005
15006fi
15007done
15008
15009 ;;
15010 esac
15011 fi
15012
15013
15014
15015
472fa5ee
SM
15016 :
15017
15018
15019
15020
15021
6ec2e0f5
SDJ
15022 if test $ac_cv_func_fchdir = no; then
15023 HAVE_FCHDIR=0
8690e634
JK
15024 fi
15025
6ec2e0f5
SDJ
15026 if test $HAVE_FCHDIR = 0; then
15027 if test $HAVE_DUP2 = 1; then
15028 REPLACE_DUP2=1
15029 fi
15030 fi
8690e634 15031
8690e634 15032
6ec2e0f5 15033 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
8690e634
JK
15034
15035
15036
15037
8690e634 15038
8690e634 15039
6ec2e0f5
SDJ
15040
15041
15042 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
15043
15044
8690e634
JK
15045 fi
15046
8690e634 15047
8690e634 15048
8690e634
JK
15049
15050
6ec2e0f5
SDJ
15051 GNULIB_DUP2=1
15052
15053
15054
15055
15056
15057$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067 GNULIB_ENVIRON=1
15068
15069
15070
15071
15072
15073$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
15074
15075
15076
15077
15078
15079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
15080$as_echo_n "checking for error_at_line... " >&6; }
d0ac1c44 15081if ${ac_cv_lib_error_at_line+:} false; then :
6ec2e0f5 15082 $as_echo_n "(cached) " >&6
8690e634
JK
15083else
15084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15085/* end confdefs.h. */
6ec2e0f5 15086#include <error.h>
8690e634
JK
15087int
15088main ()
15089{
6ec2e0f5 15090error_at_line (0, 0, "", 0, "an error occurred");
8690e634
JK
15091 ;
15092 return 0;
15093}
15094_ACEOF
6ec2e0f5
SDJ
15095if ac_fn_c_try_link "$LINENO"; then :
15096 ac_cv_lib_error_at_line=yes
8690e634 15097else
6ec2e0f5 15098 ac_cv_lib_error_at_line=no
8690e634 15099fi
6ec2e0f5
SDJ
15100rm -f core conftest.err conftest.$ac_objext \
15101 conftest$ac_exeext conftest.$ac_ext
8690e634 15102fi
6ec2e0f5
SDJ
15103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
15104$as_echo "$ac_cv_lib_error_at_line" >&6; }
15105
15106 if test $ac_cv_lib_error_at_line = no; then
15107
15108
15109
15110
15111
15112
15113
15114
15115 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
15116
8690e634
JK
15117
15118
8690e634
JK
15119 :
15120
6ec2e0f5 15121 fi
6a29c58e 15122
6a29c58e 15123
d0ac1c44
SM
15124
15125
15126
d0ac1c44
SM
15127
15128
472fa5ee 15129 :
6a29c58e
YQ
15130
15131
3d99e817 15132
6ec2e0f5
SDJ
15133
15134
15135 if test $ac_cv_have_decl_fchdir = no; then
15136 HAVE_DECL_FCHDIR=0
15137 fi
15138
15139
15140 if test $HAVE_FCHDIR = 0; then
15141
15142
3d99e817
AK
15143
15144
15145
15146
15147
15148
6ec2e0f5 15149 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
3d99e817 15150
6ec2e0f5 15151 :
3d99e817 15152
6ec2e0f5 15153$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
3d99e817 15154
6ec2e0f5
SDJ
15155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
15156$as_echo_n "checking whether open can visit directories... " >&6; }
d0ac1c44 15157if ${gl_cv_func_open_directory_works+:} false; then :
6ec2e0f5
SDJ
15158 $as_echo_n "(cached) " >&6
15159else
15160 if test "$cross_compiling" = yes; then :
15161 case "$host_os" in
15162 # Guess yes on glibc systems.
15163 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
15164 # If we don't know, assume the worst.
15165 *) gl_cv_func_open_directory_works="guessing no" ;;
15166 esac
3d99e817 15167
6ec2e0f5
SDJ
15168else
15169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15170/* end confdefs.h. */
15171#include <fcntl.h>
3d99e817 15172
6ec2e0f5
SDJ
15173int
15174main ()
15175{
15176return open(".", O_RDONLY) < 0;
15177 ;
15178 return 0;
15179}
3d99e817 15180_ACEOF
6ec2e0f5
SDJ
15181if ac_fn_c_try_run "$LINENO"; then :
15182 gl_cv_func_open_directory_works=yes
15183else
15184 gl_cv_func_open_directory_works=no
15185fi
15186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15187 conftest.$ac_objext conftest.beam conftest.$ac_ext
15188fi
3d99e817
AK
15189
15190fi
6ec2e0f5
SDJ
15191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
15192$as_echo "$gl_cv_func_open_directory_works" >&6; }
15193 case "$gl_cv_func_open_directory_works" in
15194 *yes) ;;
15195 *)
3d99e817 15196
6ec2e0f5 15197$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
3d99e817 15198
6ec2e0f5
SDJ
15199 ;;
15200 esac
15201 fi
3d99e817 15202
3d99e817
AK
15203
15204
15205
0750520d 15206
0750520d 15207
6ec2e0f5 15208 GNULIB_FCHDIR=1
0750520d 15209
0750520d
PA
15210
15211
0750520d 15212
0750520d 15213
6ec2e0f5 15214$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
0750520d 15215
0750520d 15216
0750520d 15217
0750520d 15218
0750520d 15219
0750520d 15220
0750520d 15221
6ec2e0f5 15222
472fa5ee
SM
15223 :
15224
15225
15226
15227
15228
6ec2e0f5
SDJ
15229 if test $ac_cv_func_fcntl = no; then
15230
15231
15232
472fa5ee
SM
15233 :
15234
15235
15236
15237
15238
6ec2e0f5
SDJ
15239 if test $ac_cv_func_fcntl = no; then
15240 HAVE_FCNTL=0
15241 else
15242 REPLACE_FCNTL=1
15243 fi
15244
15245 else
15246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
15247$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
d0ac1c44 15248if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
0750520d 15249 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
15250else
15251 if test "$cross_compiling" = yes; then :
15252 case $host_os in
15253 aix* | cygwin* | haiku*)
15254 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
15255 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
15256 esac
0750520d
PA
15257else
15258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15259/* end confdefs.h. */
6ec2e0f5
SDJ
15260#include <errno.h>
15261 #include <fcntl.h>
15262 #include <limits.h>
15263 #include <sys/resource.h>
15264 #include <unistd.h>
15265 #ifndef RLIM_SAVED_CUR
15266 # define RLIM_SAVED_CUR RLIM_INFINITY
15267 #endif
15268 #ifndef RLIM_SAVED_MAX
15269 # define RLIM_SAVED_MAX RLIM_INFINITY
15270 #endif
0750520d 15271
6ec2e0f5
SDJ
15272int
15273main ()
15274{
15275int result = 0;
15276 int bad_fd = INT_MAX;
15277 struct rlimit rlim;
15278 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
15279 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
15280 && rlim.rlim_cur != RLIM_INFINITY
15281 && rlim.rlim_cur != RLIM_SAVED_MAX
15282 && rlim.rlim_cur != RLIM_SAVED_CUR)
15283 bad_fd = rlim.rlim_cur;
15284 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
15285 if (errno != EINVAL) result |= 2;
15286 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
15287 if (errno != EINVAL) result |= 8;
15288 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
15289 {
15290 int fd;
15291 fd = open (".", O_RDONLY);
15292 if (fd == -1)
15293 result |= 16;
15294 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
15295 result |= 32;
15296
15297 close (fd);
15298 }
15299 return result;
15300 ;
15301 return 0;
15302}
0750520d 15303_ACEOF
6ec2e0f5
SDJ
15304if ac_fn_c_try_run "$LINENO"; then :
15305 gl_cv_func_fcntl_f_dupfd_works=yes
0750520d 15306else
6ec2e0f5
SDJ
15307 gl_cv_func_fcntl_f_dupfd_works=no
15308fi
15309rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15310 conftest.$ac_objext conftest.beam conftest.$ac_ext
0750520d 15311fi
0750520d
PA
15312
15313fi
6ec2e0f5
SDJ
15314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
15315$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
15316 case $gl_cv_func_fcntl_f_dupfd_works in
15317 *yes) ;;
15318 *)
0750520d 15319
0750520d 15320
472fa5ee
SM
15321 :
15322
15323
15324
15325
15326
6ec2e0f5
SDJ
15327 if test $ac_cv_func_fcntl = no; then
15328 HAVE_FCNTL=0
15329 else
15330 REPLACE_FCNTL=1
15331 fi
0750520d 15332
0750520d 15333
6ec2e0f5
SDJ
15334$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
15335 ;;
15336 esac
0750520d 15337
6ec2e0f5
SDJ
15338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
15339$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
d0ac1c44 15340if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
8690e634
JK
15341 $as_echo_n "(cached) " >&6
15342else
15343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15344/* end confdefs.h. */
15345
6ec2e0f5
SDJ
15346#include <fcntl.h>
15347#ifndef F_DUPFD_CLOEXEC
15348choke me
15349#endif
49e4877c 15350
6ec2e0f5
SDJ
15351int
15352main ()
15353{
8690e634 15354
6ec2e0f5
SDJ
15355 ;
15356 return 0;
15357}
15358_ACEOF
15359if ac_fn_c_try_compile "$LINENO"; then :
15360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15361/* end confdefs.h. */
8690e634 15362
6ec2e0f5
SDJ
15363#ifdef __linux__
15364/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
15365 it to support the semantics on older kernels that failed with EINVAL. */
15366choke me
15367#endif
8690e634
JK
15368
15369int
15370main ()
15371{
15372
8690e634
JK
15373 ;
15374 return 0;
15375}
15376_ACEOF
15377if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 15378 gl_cv_func_fcntl_f_dupfd_cloexec=yes
8690e634 15379else
6ec2e0f5 15380 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
8690e634
JK
15381fi
15382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6ec2e0f5
SDJ
15383else
15384 gl_cv_func_fcntl_f_dupfd_cloexec=no
8690e634 15385fi
6ec2e0f5
SDJ
15386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15387fi
15388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
15389$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
15390 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
15391
15392
15393
472fa5ee
SM
15394 :
15395
15396
15397
15398
15399
6ec2e0f5
SDJ
15400 if test $ac_cv_func_fcntl = no; then
15401 HAVE_FCNTL=0
15402 else
15403 REPLACE_FCNTL=1
15404 fi
15405
15406 fi
15407 fi
15408
15409
15410
15411
472fa5ee
SM
15412 :
15413
15414
15415
15416
15417
6ec2e0f5
SDJ
15418 if test $ac_cv_func_fchdir = no; then
15419 HAVE_FCHDIR=0
15420 fi
15421
15422 if test $HAVE_FCHDIR = 0; then
15423
15424
15425
472fa5ee
SM
15426 :
15427
15428
15429
15430
15431
6ec2e0f5
SDJ
15432 if test $ac_cv_func_fcntl = no; then
15433 HAVE_FCNTL=0
15434 else
15435 REPLACE_FCNTL=1
15436 fi
15437
15438 fi
15439
15440
15441 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
15442
15443
15444
15445
15446
15447
15448
15449
15450 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
15451
15452 fi
8690e634 15453
8690e634
JK
15454
15455
8690e634
JK
15456
15457
6ec2e0f5 15458 GNULIB_FCNTL=1
8690e634 15459
8690e634
JK
15460
15461
8690e634 15462
8690e634 15463
6ec2e0f5
SDJ
15464$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
15465
8690e634 15466
8690e634 15467
63ce7108
TT
15468
15469
15470
15471
8690e634
JK
15472
15473
15474
15475
15476
15477
15478
15479 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 15480 gl_cv_next_fcntl_h='<'fcntl.h'>'
8690e634 15481 else
6ec2e0f5
SDJ
15482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
15483$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
d0ac1c44 15484if ${gl_cv_next_fcntl_h+:} false; then :
8690e634
JK
15485 $as_echo_n "(cached) " >&6
15486else
15487
4a626d0a
PA
15488
15489
15490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 15491/* end confdefs.h. */
6ec2e0f5 15492#include <fcntl.h>
8690e634 15493_ACEOF
4a626d0a
PA
15494 case "$host_os" in
15495 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15496 *) gl_absname_cpp="$ac_cpp" ;;
15497 esac
15498
15499 case "$host_os" in
15500 mingw*)
15501 gl_dirsep_regex='[/\\]'
15502 ;;
15503 *)
15504 gl_dirsep_regex='\/'
15505 ;;
15506 esac
15507 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 15508 gl_header_literal_regex=`echo 'fcntl.h' \
4a626d0a
PA
15509 | sed -e "$gl_make_literal_regex_sed"`
15510 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15511 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15512 s|^/[^/]|//&|
15513 p
15514 q
15515 }'
8690e634 15516
6ec2e0f5 15517 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 15518 sed -n "$gl_absolute_header_sed"`
c971b7fa 15519
6ec2e0f5
SDJ
15520 gl_header=$gl_cv_absolute_fcntl_h
15521 gl_cv_next_fcntl_h='"'$gl_header'"'
8690e634
JK
15522
15523
15524fi
6ec2e0f5
SDJ
15525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
15526$as_echo "$gl_cv_next_fcntl_h" >&6; }
8690e634 15527 fi
6ec2e0f5 15528 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
8690e634
JK
15529
15530 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15531 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 15532 gl_next_as_first_directive='<'fcntl.h'>'
8690e634
JK
15533 else
15534 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 15535 gl_next_as_first_directive=$gl_cv_next_fcntl_h
8690e634 15536 fi
6ec2e0f5 15537 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
8690e634
JK
15538
15539
15540
15541
15542
15543
6ec2e0f5
SDJ
15544
15545
15546
15547
15548 for gl_func in fcntl openat; do
8690e634
JK
15549 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15551$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
d0ac1c44 15552if eval \${$as_gl_Symbol+:} false; then :
8690e634
JK
15553 $as_echo_n "(cached) " >&6
15554else
15555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15556/* end confdefs.h. */
6ec2e0f5 15557#include <fcntl.h>
8690e634
JK
15558
15559int
15560main ()
15561{
15562#undef $gl_func
15563 (void) $gl_func;
15564 ;
15565 return 0;
15566}
15567_ACEOF
15568if ac_fn_c_try_compile "$LINENO"; then :
15569 eval "$as_gl_Symbol=yes"
15570else
15571 eval "$as_gl_Symbol=no"
15572fi
15573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15574fi
15575eval ac_res=\$$as_gl_Symbol
15576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15577$as_echo "$ac_res" >&6; }
d0ac1c44 15578 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
8690e634
JK
15579 cat >>confdefs.h <<_ACEOF
15580#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15581_ACEOF
15582
15583 eval ac_cv_have_decl_$gl_func=yes
15584fi
15585 done
15586
15587
15588
8839a007 15589
63ce7108 15590
63ce7108 15591
63ce7108 15592
6ec2e0f5
SDJ
15593 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
15594#include <dirent.h>
15595
15596"
d0ac1c44 15597if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
6ec2e0f5
SDJ
15598 ac_have_decl=1
15599else
15600 ac_have_decl=0
15601fi
15602
15603cat >>confdefs.h <<_ACEOF
15604#define HAVE_DECL_FDOPENDIR $ac_have_decl
63ce7108 15605_ACEOF
6ec2e0f5
SDJ
15606if test $ac_have_decl = 1; then :
15607
63ce7108 15608else
6ec2e0f5 15609 HAVE_DECL_FDOPENDIR=0
63ce7108 15610fi
63ce7108
TT
15611
15612
472fa5ee
SM
15613 :
15614
15615
15616
15617
15618
6ec2e0f5
SDJ
15619 if test $ac_cv_func_fdopendir = no; then
15620 HAVE_FDOPENDIR=0
15621 else
15622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
15623$as_echo_n "checking whether fdopendir works... " >&6; }
d0ac1c44 15624if ${gl_cv_func_fdopendir_works+:} false; then :
6ec2e0f5
SDJ
15625 $as_echo_n "(cached) " >&6
15626else
15627 if test "$cross_compiling" = yes; then :
15628 case "$host_os" in
15629 # Guess yes on glibc systems.
15630 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
15631 # If we don't know, assume the worst.
15632 *) gl_cv_func_fdopendir_works="guessing no" ;;
15633 esac
15634
63ce7108
TT
15635else
15636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15637/* end confdefs.h. */
15638
6ec2e0f5
SDJ
15639#include <dirent.h>
15640#include <fcntl.h>
15641#include <unistd.h>
15642#if !HAVE_DECL_FDOPENDIR
15643extern
15644# ifdef __cplusplus
15645"C"
15646# endif
15647DIR *fdopendir (int);
15648#endif
63ce7108
TT
15649
15650int
15651main ()
15652{
6ec2e0f5
SDJ
15653int result = 0;
15654 int fd = open ("conftest.c", O_RDONLY);
15655 if (fd < 0) result |= 1;
15656 if (fdopendir (fd)) result |= 2;
15657 if (close (fd)) result |= 4;
15658 return result;
63ce7108
TT
15659 ;
15660 return 0;
15661}
15662_ACEOF
15663if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 15664 gl_cv_func_fdopendir_works=yes
63ce7108 15665else
6ec2e0f5 15666 gl_cv_func_fdopendir_works=no
63ce7108
TT
15667fi
15668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15669 conftest.$ac_objext conftest.beam conftest.$ac_ext
15670fi
15671
63ce7108 15672fi
6ec2e0f5
SDJ
15673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
15674$as_echo "$gl_cv_func_fdopendir_works" >&6; }
15675 case "$gl_cv_func_fdopendir_works" in
63ce7108
TT
15676 *yes) ;;
15677 *)
6ec2e0f5 15678 REPLACE_FDOPENDIR=1
63ce7108
TT
15679 ;;
15680 esac
15681 fi
15682
6ec2e0f5 15683 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
09607c9e
TT
15684
15685
15686
4a626d0a
PA
15687
15688
15689
15690
15691
6ec2e0f5 15692 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
4a626d0a 15693
6ec2e0f5 15694 fi
4a626d0a
PA
15695
15696
15697
4a626d0a 15698
4a626d0a 15699
6ec2e0f5 15700 GNULIB_FDOPENDIR=1
4a626d0a
PA
15701
15702
15703
15704
15705
6ec2e0f5 15706$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
4a626d0a
PA
15707
15708
15709
15710
15711
6ec2e0f5
SDJ
15712cat >>confdefs.h <<_ACEOF
15713#define GNULIB_FDOPENDIR 1
15714_ACEOF
4a626d0a 15715
09607c9e 15716
09607c9e
TT
15717
15718
472fa5ee
SM
15719 :
15720
15721
15722
15723
15724
09607c9e 15725
6ec2e0f5
SDJ
15726
15727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
15728$as_echo_n "checking for flexible array member... " >&6; }
d0ac1c44 15729if ${ac_cv_c_flexmember+:} false; then :
09607c9e
TT
15730 $as_echo_n "(cached) " >&6
15731else
15732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15733/* end confdefs.h. */
6ec2e0f5
SDJ
15734#include <stdlib.h>
15735 #include <stdio.h>
15736 #include <stddef.h>
15737 struct s { int n; double d[]; };
09607c9e
TT
15738int
15739main ()
15740{
6ec2e0f5
SDJ
15741int m = getchar ();
15742 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
15743 nbytes += sizeof (struct s) - 1;
15744 nbytes -= nbytes % sizeof (struct s);
15745 struct s *p = malloc (nbytes);
15746 p->d[0] = 0.0;
15747 return p->d != (double *) NULL;
09607c9e
TT
15748 ;
15749 return 0;
15750}
15751_ACEOF
15752if ac_fn_c_try_compile "$LINENO"; then :
6ec2e0f5 15753 ac_cv_c_flexmember=yes
09607c9e 15754else
6ec2e0f5 15755 ac_cv_c_flexmember=no
09607c9e
TT
15756fi
15757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15758fi
6ec2e0f5
SDJ
15759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
15760$as_echo "$ac_cv_c_flexmember" >&6; }
15761 if test $ac_cv_c_flexmember = yes; then
15762
15763$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
09607c9e 15764
09607c9e 15765 else
6ec2e0f5 15766 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
09607c9e 15767
6ec2e0f5
SDJ
15768 fi
15769
15770
15771
15772
15773 FLOAT_H=
15774 REPLACE_FLOAT_LDBL=0
15775 case "$host_os" in
15776 aix* | beos* | openbsd* | mirbsd* | irix*)
15777 FLOAT_H=float.h
15778 ;;
15779 freebsd*)
15780 case "$host_cpu" in
15781 i[34567]86 )
15782 FLOAT_H=float.h
15783 ;;
15784 x86_64 )
15785 # On x86_64 systems, the C compiler may still be generating
15786 # 32-bit code.
15787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15788/* end confdefs.h. */
15789#if defined __LP64__ || defined __x86_64__ || defined __amd64__
15790 yes
15791 #endif
09607c9e 15792_ACEOF
6ec2e0f5
SDJ
15793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15794 $EGREP "yes" >/dev/null 2>&1; then :
15795
09607c9e 15796else
6ec2e0f5 15797 FLOAT_H=float.h
09607c9e 15798fi
6ec2e0f5
SDJ
15799rm -f conftest*
15800
15801 ;;
15802 esac
15803 ;;
15804 linux*)
15805 case "$host_cpu" in
15806 powerpc*)
15807 FLOAT_H=float.h
15808 ;;
15809 esac
15810 ;;
15811 esac
15812 case "$host_os" in
15813 aix* | freebsd* | linux*)
15814 if test -n "$FLOAT_H"; then
15815 REPLACE_FLOAT_LDBL=1
15816 fi
15817 ;;
15818 esac
15819
15820 REPLACE_ITOLD=0
15821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
15822$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
d0ac1c44 15823if ${gl_cv_func_itold_works+:} false; then :
09607c9e
TT
15824 $as_echo_n "(cached) " >&6
15825else
09607c9e 15826
6ec2e0f5
SDJ
15827 if test "$cross_compiling" = yes; then :
15828 case "$host" in
15829 sparc*-*-linux*)
15830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15831/* end confdefs.h. */
15832#if defined __LP64__ || defined __arch64__
15833 yes
15834 #endif
09607c9e 15835_ACEOF
6ec2e0f5
SDJ
15836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15837 $EGREP "yes" >/dev/null 2>&1; then :
15838 gl_cv_func_itold_works="guessing no"
09607c9e 15839else
6ec2e0f5 15840 gl_cv_func_itold_works="guessing yes"
09607c9e 15841fi
6ec2e0f5
SDJ
15842rm -f conftest*
15843
15844 ;;
15845 *) gl_cv_func_itold_works="guessing yes" ;;
15846 esac
15847
4a626d0a
PA
15848else
15849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15850/* end confdefs.h. */
4a626d0a 15851
6ec2e0f5
SDJ
15852int i = -1;
15853volatile long double ld;
15854int main ()
4a626d0a 15855{
6ec2e0f5
SDJ
15856 ld += i * 1.0L;
15857 if (ld > 0)
15858 return 1;
4a626d0a
PA
15859 return 0;
15860}
15861_ACEOF
6ec2e0f5
SDJ
15862if ac_fn_c_try_run "$LINENO"; then :
15863 gl_cv_func_itold_works=yes
4a626d0a 15864else
6ec2e0f5
SDJ
15865 gl_cv_func_itold_works=no
15866fi
15867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15868 conftest.$ac_objext conftest.beam conftest.$ac_ext
15869fi
09607c9e
TT
15870
15871
6ec2e0f5
SDJ
15872fi
15873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
15874$as_echo "$gl_cv_func_itold_works" >&6; }
15875 case "$gl_cv_func_itold_works" in
15876 *no)
15877 REPLACE_ITOLD=1
15878 FLOAT_H=float.h
15879 ;;
15880 esac
09607c9e 15881
6ec2e0f5 15882 if test -n "$FLOAT_H"; then
09607c9e
TT
15883
15884
15885
15886
15887
15888
15889
4a626d0a 15890
09607c9e 15891 if test $gl_cv_have_include_next = yes; then
6ec2e0f5 15892 gl_cv_next_float_h='<'float.h'>'
09607c9e 15893 else
6ec2e0f5
SDJ
15894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
15895$as_echo_n "checking absolute name of <float.h>... " >&6; }
d0ac1c44 15896if ${gl_cv_next_float_h+:} false; then :
09607c9e
TT
15897 $as_echo_n "(cached) " >&6
15898else
15899
4a626d0a
PA
15900
15901
15902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e 15903/* end confdefs.h. */
6ec2e0f5 15904#include <float.h>
09607c9e 15905_ACEOF
4a626d0a
PA
15906 case "$host_os" in
15907 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15908 *) gl_absname_cpp="$ac_cpp" ;;
15909 esac
15910
15911 case "$host_os" in
15912 mingw*)
15913 gl_dirsep_regex='[/\\]'
15914 ;;
15915 *)
15916 gl_dirsep_regex='\/'
15917 ;;
15918 esac
15919 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
6ec2e0f5 15920 gl_header_literal_regex=`echo 'float.h' \
4a626d0a
PA
15921 | sed -e "$gl_make_literal_regex_sed"`
15922 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15923 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15924 s|^/[^/]|//&|
15925 p
15926 q
15927 }'
09607c9e 15928
6ec2e0f5 15929 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
4a626d0a 15930 sed -n "$gl_absolute_header_sed"`
09607c9e 15931
6ec2e0f5
SDJ
15932 gl_header=$gl_cv_absolute_float_h
15933 gl_cv_next_float_h='"'$gl_header'"'
09607c9e
TT
15934
15935
15936fi
6ec2e0f5
SDJ
15937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
15938$as_echo "$gl_cv_next_float_h" >&6; }
09607c9e 15939 fi
6ec2e0f5 15940 NEXT_FLOAT_H=$gl_cv_next_float_h
09607c9e
TT
15941
15942 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15943 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
6ec2e0f5 15944 gl_next_as_first_directive='<'float.h'>'
09607c9e
TT
15945 else
15946 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
6ec2e0f5 15947 gl_next_as_first_directive=$gl_cv_next_float_h
09607c9e 15948 fi
6ec2e0f5 15949 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
09607c9e
TT
15950
15951
15952
15953
6ec2e0f5 15954 fi
09607c9e 15955
6ec2e0f5
SDJ
15956 if test -n "$FLOAT_H"; then
15957 GL_GENERATE_FLOAT_H_TRUE=
15958 GL_GENERATE_FLOAT_H_FALSE='#'
3d99e817 15959else
6ec2e0f5
SDJ
15960 GL_GENERATE_FLOAT_H_TRUE='#'
15961 GL_GENERATE_FLOAT_H_FALSE=
3d99e817
AK
15962fi
15963
3d99e817 15964
09607c9e 15965
6ec2e0f5 15966 if test $REPLACE_FLOAT_LDBL = 1; then
8690e634 15967
8690e634 15968
8690e634 15969
8690e634 15970
8690e634 15971
6ec2e0f5
SDJ
15972
15973
15974
15975 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
15976
8690e634 15977 fi
6ec2e0f5 15978 if test $REPLACE_ITOLD = 1; then
8690e634
JK
15979
15980
15981
15982
15983
6ec2e0f5
SDJ
15984
15985
15986
15987 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
15988
8690e634
JK
15989 fi
15990
15991
15992
6ec2e0f5
SDJ
15993
15994
15995 FNMATCH_H=
15996 gl_fnmatch_required_lowercase=`
15997 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
15998 `
15999 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
16000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
16001$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
d0ac1c44 16002if eval \${$gl_fnmatch_cache_var+:} false; then :
8690e634 16003 $as_echo_n "(cached) " >&6
6ec2e0f5
SDJ
16004else
16005 if test $gl_fnmatch_required = GNU; then
16006 gl_fnmatch_gnu_start=
16007 gl_fnmatch_gnu_end=
16008 else
16009 gl_fnmatch_gnu_start='#if 0'
16010 gl_fnmatch_gnu_end='#endif'
16011 fi
16012 if test "$cross_compiling" = yes; then :
16013 eval "$gl_fnmatch_cache_var=\"guessing no\""
8690e634
JK
16014else
16015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16016/* end confdefs.h. */
6ec2e0f5
SDJ
16017#include <fnmatch.h>
16018 static int
16019 y (char const *pattern, char const *string, int flags)
16020 {
16021 return fnmatch (pattern, string, flags) == 0;
16022 }
16023 static int
16024 n (char const *pattern, char const *string, int flags)
16025 {
16026 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
16027 }
8690e634 16028
8690e634
JK
16029int
16030main ()
16031{
6ec2e0f5
SDJ
16032char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
16033 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
16034 static char const A_1[] = { 'A' - 1, 0 };
16035 static char const A01[] = { 'A' + 1, 0 };
16036 static char const a_1[] = { 'a' - 1, 0 };
16037 static char const a01[] = { 'a' + 1, 0 };
16038 static char const bs_1[] = { '\\\\' - 1, 0 };
16039 static char const bs01[] = { '\\\\' + 1, 0 };
16040 int result = 0;
16041 if (!n ("a*", "", 0))
16042 return 1;
16043 if (!y ("a*", "abc", 0))
16044 return 1;
16045 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
16046 return 1;
16047 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
16048 return 2;
16049 if (!y ("a\\\\bc", "abc", 0))
16050 return 3;
16051 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
16052 return 3;
16053 if (!y ("*x", ".x", 0))
16054 return 4;
16055 if (!n ("*x", ".x", FNM_PERIOD))
16056 return 4;
16057 if (!y (Apat, "\\\\", 0))
16058 return 5;
16059 if (!y (Apat, "A", 0))
16060 return 5;
16061 if (!y (apat, "\\\\", 0))
16062 return 5;
16063 if (!y (apat, "a", 0))
16064 return 5;
16065 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
16066 return 5;
16067 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
16068 return 5;
16069 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
16070 return 5;
16071 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
16072 return 5;
16073 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
16074 return 5;
16075 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
16076 return 5;
16077 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
16078 return 5;
16079 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
16080 return 5;
16081 $gl_fnmatch_gnu_start
16082 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
16083 result |= 8;
16084 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
16085 result |= 16;
16086 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
16087 result |= 32;
16088 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
16089 result |= 64;
16090 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
16091 result |= 64;
16092 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
16093 result |= 64;
16094 $gl_fnmatch_gnu_end
16095 return result;
8690e634
JK
16096
16097 ;
16098 return 0;
16099}
16100_ACEOF
6ec2e0f5
SDJ
16101if ac_fn_c_try_run "$LINENO"; then :
16102 eval "$gl_fnmatch_cache_var=yes"
8690e634 16103else
6ec2e0f5 16104 eval "$gl_fnmatch_cache_var=no"
8690e634 16105fi
6ec2e0f5
SDJ
16106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16107 conftest.$ac_objext conftest.beam conftest.$ac_ext
8690e634 16108fi
8690e634 16109
8690e634 16110
6ec2e0f5
SDJ
16111fi
16112eval ac_res=\$$gl_fnmatch_cache_var
16113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16114$as_echo "$ac_res" >&6; }
16115 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
16116 if test "$gl_fnmatch_result" = yes; then
16117 rm -f "$gl_source_base/fnmatch.h"
16118 else
16119 FNMATCH_H=fnmatch.h
8690e634
JK
16120 fi
16121
6ec2e0f5
SDJ
16122 if test -n "$FNMATCH_H"; then
16123 GL_GENERATE_FNMATCH_H_TRUE=
16124 GL_GENERATE_FNMATCH_H_FALSE='#'
16125else
16126 GL_GENERATE_FNMATCH_H_TRUE='#'
16127 GL_GENERATE_FNMATCH_H_FALSE=
16128fi
8690e634 16129
8690e634 16130
6ec2e0f5 16131 if test -n "$FNMATCH_H"; then
8690e634
JK
16132
16133
16134
6ec2e0f5
SDJ
16135
16136
16137
16138
16139
16140 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
16141
16142
16143
16144cat >>confdefs.h <<_ACEOF
16145#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
16146_ACEOF
16147
16148
16149 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
16150"
d0ac1c44 16151if test "x$ac_cv_have_decl_isblank" = xyes; then :
6ec2e0f5 16152 ac_have_decl=1
8690e634 16153else
6ec2e0f5 16154 ac_have_decl=0
8690e634
JK
16155fi
16156
6ec2e0f5
SDJ
16157cat >>confdefs.h <<_ACEOF
16158#define HAVE_DECL_ISBLANK $ac_have_decl
16159_ACEOF
8690e634
JK
16160
16161
472fa5ee
SM
16162 :
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190 :
16191
16192
16193
16194
8690e634
JK
16195
16196
6ec2e0f5 16197 fi
8690e634
JK
16198
16199
16200
16201
16202
6ec2e0f5 16203 if test -n "$FNMATCH_H"; then
8690e634
JK
16204
16205
8690e634 16206
8690e634 16207
8690e634 16208
8690e634 16209
8690e634
JK
16210
16211
6ec2e0f5 16212 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
8690e634 16213
8690e634 16214
8690e634 16215
6ec2e0f5
SDJ
16216cat >>confdefs.h <<_ACEOF
16217#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
16218_ACEOF
16219
16220
16221 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
16222"
d0ac1c44 16223if test "x$ac_cv_have_decl_isblank" = xyes; then :
6ec2e0f5 16224 ac_have_decl=1
8690e634 16225else
6ec2e0f5 16226 ac_have_decl=0
8690e634
JK
16227fi
16228
6ec2e0f5
SDJ
16229cat >>confdefs.h <<_ACEOF
16230#define HAVE_DECL_ISBLANK $ac_have_decl
16231_ACEOF
8690e634
JK
16232
16233
472fa5ee
SM
16234 :
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262 :
16263
16264
16265
16266
98399780
YQ
16267
16268
98399780
YQ
16269 fi
16270
98399780
YQ
16271
16272
6ec2e0f5
SDJ
16273 FREXP_LIBM=
16274 if test $gl_cv_func_frexp_no_libm = no; then
16275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
16276$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
d0ac1c44 16277if ${gl_cv_func_frexp_in_libm+:} false; then :
6ec2e0f5
SDJ
16278 $as_echo_n "(cached) " >&6
16279else
98399780 16280
6ec2e0f5
SDJ
16281 save_LIBS="$LIBS"
16282 LIBS="$LIBS -lm"
16283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16284/* end confdefs.h. */
16285#include <math.h>
16286 double x;
16287int
16288main ()
16289{
16290int e; return frexp (x, &e) > 0;
16291 ;
16292 return 0;
16293}
16294_ACEOF
16295if ac_fn_c_try_link "$LINENO"; then :
16296 gl_cv_func_frexp_in_libm=yes
16297else
16298 gl_cv_func_frexp_in_libm=no
16299fi
16300rm -f core conftest.err conftest.$ac_objext \
16301 conftest$ac_exeext conftest.$ac_ext
16302 LIBS="$save_LIBS"
98399780 16303
6ec2e0f5
SDJ
16304fi
16305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
16306$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
16307 if test $gl_cv_func_frexp_in_libm = yes; then
16308 FREXP_LIBM=-lm
16309 fi
16310 fi
16311 if test $gl_cv_func_frexp_no_libm = yes \
16312 || test $gl_cv_func_frexp_in_libm = yes; then
16313 save_LIBS="$LIBS"
16314 LIBS="$LIBS $FREXP_LIBM"
98399780
YQ
16315
16316
16317
472fa5ee
SM
16318 :
16319
16320
16321
16322
16323
6ec2e0f5
SDJ
16324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
16325$as_echo_n "checking whether frexp works... " >&6; }
d0ac1c44 16326if ${gl_cv_func_frexp_works+:} false; then :
6ec2e0f5
SDJ
16327 $as_echo_n "(cached) " >&6
16328else
98399780 16329
6ec2e0f5
SDJ
16330 if test "$cross_compiling" = yes; then :
16331 case "$host_os" in
16332 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
16333 *) gl_cv_func_frexp_works="guessing yes";;
16334 esac
98399780 16335
6ec2e0f5
SDJ
16336else
16337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16338/* end confdefs.h. */
98399780 16339
6ec2e0f5
SDJ
16340#include <float.h>
16341#include <math.h>
16342#include <string.h>
16343#if HAVE_DECL_ALARM
16344# include <signal.h>
16345# include <unistd.h>
16346#endif
16347/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
16348 ICC 10.0 has a bug when optimizing the expression -zero.
16349 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
16350 to PowerPC on Mac OS X 10.5. */
16351#if defined __hpux || defined __sgi || defined __ICC
16352static double
16353compute_minus_zero (void)
16354{
16355 return -DBL_MIN * DBL_MIN;
16356}
16357# define minus_zero compute_minus_zero ()
16358#else
16359double minus_zero = -0.0;
16360#endif
16361int main()
16362{
16363 int result = 0;
16364 int i;
16365 volatile double x;
16366 double zero = 0.0;
16367#if HAVE_DECL_ALARM
16368 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
16369 number. Let the test fail in this case. */
16370 signal (SIGALRM, SIG_DFL);
16371 alarm (5);
16372#endif
16373 /* Test on denormalized numbers. */
16374 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
16375 ;
16376 if (x > 0.0)
16377 {
16378 int exp;
16379 double y = frexp (x, &exp);
16380 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
16381 On NetBSD: y = 0.75. Correct: y = 0.5. */
16382 if (y != 0.5)
16383 result |= 1;
16384 }
16385 /* Test on infinite numbers. */
16386 x = 1.0 / zero;
16387 {
16388 int exp;
16389 double y = frexp (x, &exp);
16390 if (y != x)
16391 result |= 2;
16392 }
16393 /* Test on negative zero. */
16394 x = minus_zero;
16395 {
16396 int exp;
16397 double y = frexp (x, &exp);
16398 if (memcmp (&y, &x, sizeof x))
16399 result |= 4;
16400 }
16401 return result;
16402}
98399780 16403_ACEOF
6ec2e0f5
SDJ
16404if ac_fn_c_try_run "$LINENO"; then :
16405 gl_cv_func_frexp_works=yes
16406else
16407 gl_cv_func_frexp_works=no
16408fi
16409rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16410 conftest.$ac_objext conftest.beam conftest.$ac_ext
16411fi
98399780
YQ
16412
16413
6ec2e0f5
SDJ
16414fi
16415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
16416$as_echo "$gl_cv_func_frexp_works" >&6; }
98399780 16417
6ec2e0f5
SDJ
16418 LIBS="$save_LIBS"
16419 case "$gl_cv_func_frexp_works" in
16420 *yes) gl_func_frexp=yes ;;
16421 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
16422 esac
16423 else
16424 gl_func_frexp=no
16425 fi
16426 if test $gl_func_frexp = yes; then
98399780 16427
6ec2e0f5 16428$as_echo "#define HAVE_FREXP 1" >>confdefs.h
98399780 16429
6ec2e0f5 16430 fi
98399780
YQ
16431
16432
6ec2e0f5 16433 if test $gl_func_frexp != yes; then
6a29c58e
YQ
16434
16435
16436
16437
6a29c58e
YQ
16438
16439
16440
16441
6ec2e0f5 16442 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
8690e634
JK
16443
16444 fi
8690e634 16445
8690e634 16446
8690e634 16447
8690e634 16448
8690e634 16449
6ec2e0f5 16450 GNULIB_FREXP=1
8690e634 16451
8690e634 16452
4a626d0a 16453
8690e634 16454
8690e634 16455
6ec2e0f5 16456$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
8690e634
JK
16457
16458
16459
16460
16461
63ce7108 16462
e26b6bb0
TT
16463
16464
16465
6ec2e0f5
SDJ
16466 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
16467"
d0ac1c44 16468if test "x$ac_cv_have_decl_frexpl" = xyes; then :
e26b6bb0 16469
6ec2e0f5
SDJ
16470else
16471 HAVE_DECL_FREXPL=0
16472fi
e26b6bb0
TT
16473
16474
6ec2e0f5
SDJ
16475 FREXPL_LIBM=
16476 if test $HAVE_DECL_FREXPL = 1; then
e26b6bb0 16477
6ec2e0f5
SDJ
16478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
16479$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
d0ac1c44 16480if ${gl_cv_func_frexpl_no_libm+:} false; then :
e26b6bb0
TT
16481 $as_echo_n "(cached) " >&6
16482else
16483
6ec2e0f5 16484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e26b6bb0 16485/* end confdefs.h. */
6ec2e0f5
SDJ
16486#include <math.h>
16487 long double x;
16488int
16489main ()
16490{
16491int e; return frexpl (x, &e) > 0;
16492 ;
16493 return 0;
16494}
e26b6bb0 16495_ACEOF
6ec2e0f5
SDJ
16496if ac_fn_c_try_link "$LINENO"; then :
16497 gl_cv_func_frexpl_no_libm=yes
16498else
16499 gl_cv_func_frexpl_no_libm=no
e26b6bb0 16500fi
6ec2e0f5
SDJ
16501rm -f core conftest.err conftest.$ac_objext \
16502 conftest$ac_exeext conftest.$ac_ext
e26b6bb0 16503
6ec2e0f5
SDJ
16504fi
16505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
16506$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
e26b6bb0 16507
6ec2e0f5
SDJ
16508 if test $gl_cv_func_frexpl_no_libm = no; then
16509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
16510$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
d0ac1c44 16511if ${gl_cv_func_frexpl_in_libm+:} false; then :
e26b6bb0
TT
16512 $as_echo_n "(cached) " >&6
16513else
e26b6bb0 16514
6ec2e0f5
SDJ
16515 save_LIBS="$LIBS"
16516 LIBS="$LIBS -lm"
16517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16518/* end confdefs.h. */
16519#include <math.h>
16520 long double x;
e26b6bb0
TT
16521int
16522main ()
16523{
6ec2e0f5 16524int e; return frexpl (x, &e) > 0;
e26b6bb0
TT
16525 ;
16526 return 0;
16527}
16528_ACEOF
6ec2e0f5
SDJ
16529if ac_fn_c_try_link "$LINENO"; then :
16530 gl_cv_func_frexpl_in_libm=yes
e26b6bb0 16531else
6ec2e0f5 16532 gl_cv_func_frexpl_in_libm=no
e26b6bb0 16533fi
6ec2e0f5
SDJ
16534rm -f core conftest.err conftest.$ac_objext \
16535 conftest$ac_exeext conftest.$ac_ext
16536 LIBS="$save_LIBS"
e26b6bb0 16537
e26b6bb0 16538fi
6ec2e0f5
SDJ
16539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
16540$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
16541 if test $gl_cv_func_frexpl_in_libm = yes; then
16542 FREXPL_LIBM=-lm
16543 fi
16544 fi
16545 if test $gl_cv_func_frexpl_no_libm = yes \
16546 || test $gl_cv_func_frexpl_in_libm = yes; then
16547 save_LIBS="$LIBS"
16548 LIBS="$LIBS $FREXPL_LIBM"
18848e28 16549
18848e28 16550
6ec2e0f5
SDJ
16551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
16552$as_echo_n "checking whether frexpl works... " >&6; }
d0ac1c44 16553if ${gl_cv_func_frexpl_works+:} false; then :
6ec2e0f5 16554 $as_echo_n "(cached) " >&6
18848e28 16555else
18848e28 16556
6ec2e0f5 16557 if test "$cross_compiling" = yes; then :
18848e28 16558
6ec2e0f5
SDJ
16559 case "$host_os" in
16560 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
16561 gl_cv_func_frexpl_works="guessing no";;
16562 *) gl_cv_func_frexpl_works="guessing yes";;
16563 esac
18848e28 16564
18848e28
GF
16565else
16566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16567/* end confdefs.h. */
16568
6ec2e0f5
SDJ
16569#include <float.h>
16570#include <math.h>
16571/* Override the values of <float.h>, like done in float.in.h. */
16572#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
16573# undef LDBL_MIN_EXP
16574# define LDBL_MIN_EXP (-16381)
16575#endif
16576#if defined __i386__ && defined __FreeBSD__
16577# undef LDBL_MIN_EXP
16578# define LDBL_MIN_EXP (-16381)
16579#endif
16580#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
16581# undef LDBL_MIN_EXP
16582# define LDBL_MIN_EXP DBL_MIN_EXP
18848e28 16583#endif
6ec2e0f5
SDJ
16584#if defined __sgi && (LDBL_MANT_DIG >= 106)
16585# if defined __GNUC__
16586# undef LDBL_MIN_EXP
16587# define LDBL_MIN_EXP DBL_MIN_EXP
16588# endif
16589#endif
16590extern
16591#ifdef __cplusplus
16592"C"
16593#endif
16594long double frexpl (long double, int *);
16595int main()
16596{
16597 int result = 0;
16598 volatile long double x;
16599 /* Test on finite numbers that fails on AIX 5.1. */
16600 x = 16.0L;
16601 {
16602 int exp = -9999;
16603 frexpl (x, &exp);
16604 if (exp != 5)
16605 result |= 1;
16606 }
16607 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
16608 function returns an invalid (incorrectly normalized) value: it returns
16609 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
16610 but the correct result is
16611 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
16612 x = 1.01L;
16613 {
16614 int exp = -9999;
16615 long double y = frexpl (x, &exp);
16616 if (!(exp == 1 && y == 0.505L))
16617 result |= 2;
16618 }
16619 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
16620 LDBL_MAX_EXP = 16384.
16621 In the loop end test, we test x against Infinity, rather than comparing
16622 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
16623 {
16624 int i;
16625 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
16626 {
16627 int exp = -9999;
16628 frexpl (x, &exp);
16629 if (exp != i)
16630 {
16631 result |= 4;
16632 break;
16633 }
16634 }
16635 }
16636 /* Test on denormalized numbers. */
16637 {
16638 int i;
16639 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
16640 ;
16641 if (x > 0.0L)
16642 {
16643 int exp;
16644 long double y = frexpl (x, &exp);
16645 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
16646 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
16647 if (exp != LDBL_MIN_EXP - 1)
16648 result |= 8;
16649 }
16650 }
16651 /* Test on infinite numbers. */
16652 x = 1.0L / 0.0L;
16653 {
16654 int exp;
16655 long double y = frexpl (x, &exp);
16656 if (y != x)
16657 result |= 16;
16658 }
16659 return result;
16660}
18848e28 16661_ACEOF
6ec2e0f5
SDJ
16662if ac_fn_c_try_run "$LINENO"; then :
16663 gl_cv_func_frexpl_works=yes
18848e28 16664else
6ec2e0f5 16665 gl_cv_func_frexpl_works=no
18848e28 16666fi
6ec2e0f5
SDJ
16667rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16668 conftest.$ac_objext conftest.beam conftest.$ac_ext
18848e28 16669fi
18848e28
GF
16670
16671
6ec2e0f5
SDJ
16672fi
16673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
16674$as_echo "$gl_cv_func_frexpl_works" >&6; }
18848e28 16675
6ec2e0f5
SDJ
16676 LIBS="$save_LIBS"
16677 case "$gl_cv_func_frexpl_works" in
16678 *yes) gl_func_frexpl=yes ;;
16679 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
16680 esac
16681 else
16682 gl_func_frexpl=no
16683 fi
16684 if test $gl_func_frexpl = yes; then
18848e28 16685
6ec2e0f5 16686$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
18848e28 16687
6ec2e0f5
SDJ
16688 fi
16689 fi
16690 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
16691 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
18848e28 16692
6ec2e0f5
SDJ
16693 FREXPL_LIBM="$FREXP_LIBM"
16694 else
16695 FREXPL_LIBM=
16696 fi
16697 fi
18848e28 16698
18848e28 16699
6ec2e0f5 16700 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
18848e28 16701
18848e28 16702
18848e28 16703
18848e28
GF
16704
16705
18848e28 16706
18848e28 16707
18848e28 16708
6ec2e0f5 16709 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
18848e28
GF
16710
16711 fi
16712
16713
16714
16715
16716
6ec2e0f5 16717 GNULIB_FREXPL=1
18848e28
GF
16718
16719
16720
16721
16722
6ec2e0f5 16723$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
18848e28
GF
16724
16725
16726
16727
16728
16729
16730
6ec2e0f5
SDJ
16731 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16732 REPLACE_FSTAT=1
16733 fi
16734
16735
16736 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
16737 REPLACE_FSTAT=1
16738 fi
18848e28 16739
6a29c58e 16740
6a29c58e 16741
6a29c58e 16742
6ec2e0f5 16743
472fa5ee
SM
16744 :
16745
16746
16747
16748
16749
6ec2e0f5
SDJ
16750 if test $ac_cv_func_fchdir = no; then
16751 HAVE_FCHDIR=0
6a29c58e
YQ
16752 fi
16753
6ec2e0f5
SDJ
16754 if test $HAVE_FCHDIR = 0; then
16755 case "$gl_cv_func_open_directory_works" in
16756 *yes) ;;
16757 *)
16758 REPLACE_FSTAT=1
16759 ;;
16760 esac
16761 fi
6a29c58e
YQ
16762
16763
6ec2e0f5 16764 if test $REPLACE_FSTAT = 1; then
6a29c58e 16765
3d99e817
AK
16766
16767
16768
3d99e817
AK
16769
16770
16771
16772
6ec2e0f5 16773 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
3d99e817 16774
6ec2e0f5
SDJ
16775 :
16776 fi
3d99e817
AK
16777
16778
16779
16780
16781
6ec2e0f5 16782 GNULIB_FSTAT=1
3d99e817 16783
49e4877c 16784
49e4877c 16785
49e4877c 16786
49e4877c 16787
6ec2e0f5 16788$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
49e4877c 16789
6a29c58e
YQ
16790
16791
88b48903 16792
8690e634 16793
a512b375 16794
88b48903 16795
88b48903 16796
472fa5ee
SM
16797 :
16798
16799
16800
16801
16802
6ec2e0f5
SDJ
16803
16804 if test $ac_cv_func_fstatat = no; then
16805 HAVE_FSTATAT=0
16806 else
16807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
16808$as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
d0ac1c44 16809if ${gl_cv_func_fstatat_zero_flag+:} false; then :
6ec2e0f5
SDJ
16810 $as_echo_n "(cached) " >&6
16811else
16812 if test "$cross_compiling" = yes; then :
16813 case "$host_os" in
16814 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
16815 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
16816 esac
88b48903 16817
8690e634
JK
16818else
16819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16820/* end confdefs.h. */
8690e634 16821
6ec2e0f5
SDJ
16822 #include <fcntl.h>
16823 #include <sys/stat.h>
16824 int
16825 main (void)
16826 {
16827 struct stat a;
16828 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
16829 }
16830
88b48903
WN
16831_ACEOF
16832if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 16833 gl_cv_func_fstatat_zero_flag=yes
88b48903 16834else
6ec2e0f5 16835 gl_cv_func_fstatat_zero_flag=no
88b48903
WN
16836fi
16837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16838 conftest.$ac_objext conftest.beam conftest.$ac_ext
16839fi
16840
16841
16842fi
6ec2e0f5
SDJ
16843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
16844$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
88b48903 16845
6ec2e0f5
SDJ
16846 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
16847 *yes+*yes) ;;
16848 *) REPLACE_FSTATAT=1
16849 case $gl_cv_func_fstatat_zero_flag in
16850 *yes)
88b48903 16851
6ec2e0f5 16852$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
88b48903 16853
6ec2e0f5
SDJ
16854 ;;
16855 esac
16856 ;;
16857 esac
16858 fi
88b48903 16859
6ec2e0f5 16860 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
88b48903
WN
16861
16862
16863
16864
16865
88b48903 16866
4a626d0a
PA
16867
16868
6ec2e0f5
SDJ
16869 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
16870
16871 fi
16872
16873
16874
4a626d0a 16875
6ec2e0f5
SDJ
16876
16877 GNULIB_FSTATAT=1
16878
16879
16880
16881
16882
16883$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
16884
16885
16886
16887
16888
16889
16890
16891
16892 gl_abort_bug=no
4a626d0a
PA
16893 case "$host_os" in
16894 mingw*)
6ec2e0f5 16895 gl_cv_func_getcwd_path_max=yes
4a626d0a
PA
16896 ;;
16897 *)
88b48903 16898
88b48903 16899
472fa5ee
SM
16900 :
16901
16902
16903
16904
16905
16906
16907
16908 :
16909
16910
16911
88b48903
WN
16912
16913
88b48903 16914
6ec2e0f5
SDJ
16915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
16916$as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
d0ac1c44 16917if ${gl_cv_func_getcwd_path_max+:} false; then :
6ec2e0f5
SDJ
16918 $as_echo_n "(cached) " >&6
16919else
16920 # Arrange for deletion of the temporary directory this test creates.
16921 ac_clean_files="$ac_clean_files confdir3"
16922 if test "$cross_compiling" = yes; then :
16923 case "$host_os" in
16924 aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
16925 *) gl_cv_func_getcwd_path_max=no;;
16926 esac
16927else
16928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16929/* end confdefs.h. */
88b48903 16930
6ec2e0f5
SDJ
16931#include <errno.h>
16932#include <stdlib.h>
16933#if HAVE_UNISTD_H
16934# include <unistd.h>
16935#else
16936# include <direct.h>
16937#endif
16938#include <string.h>
16939#include <limits.h>
16940#include <sys/stat.h>
16941#include <sys/types.h>
16942#include <fcntl.h>
88b48903
WN
16943
16944
6ec2e0f5
SDJ
16945/* Arrange to define PATH_MAX, like "pathmax.h" does. */
16946#if HAVE_UNISTD_H
16947# include <unistd.h>
16948#endif
16949#include <limits.h>
16950#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
16951# include <sys/param.h>
16952#endif
16953#if !defined PATH_MAX && defined MAXPATHLEN
16954# define PATH_MAX MAXPATHLEN
16955#endif
16956#ifdef __hpux
16957# undef PATH_MAX
16958# define PATH_MAX 1024
16959#endif
16960#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16961# undef PATH_MAX
16962# define PATH_MAX 260
16963#endif
88b48903 16964
88b48903 16965
6ec2e0f5
SDJ
16966#ifndef AT_FDCWD
16967# define AT_FDCWD 0
16968#endif
16969#ifdef ENAMETOOLONG
16970# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
16971#else
16972# define is_ENAMETOOLONG(x) 0
16973#endif
88b48903 16974
6ec2e0f5
SDJ
16975/* Use the getcwd function, not any macro. */
16976#undef getcwd
88b48903 16977
6ec2e0f5
SDJ
16978/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
16979#undef mkdir
88b48903 16980
6ec2e0f5
SDJ
16981#ifndef S_IRWXU
16982# define S_IRWXU 0700
16983#endif
88b48903 16984
6ec2e0f5
SDJ
16985/* The length of this name must be 8. */
16986#define DIR_NAME "confdir3"
16987#define DIR_NAME_LEN 8
16988#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
88b48903 16989
6ec2e0f5
SDJ
16990/* The length of "../". */
16991#define DOTDOTSLASH_LEN 3
88b48903 16992
6ec2e0f5
SDJ
16993/* Leftover bytes in the buffer, to work around library or OS bugs. */
16994#define BUF_SLOP 20
88b48903 16995
6ec2e0f5
SDJ
16996int
16997main ()
16998{
16999#ifndef PATH_MAX
17000 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
17001 at least not on a local file system. And if we were to start worrying
17002 about remote file systems, we'd have to enable the wrapper function
17003 all of the time, just to be safe. That's not worth the cost. */
17004 exit (0);
17005#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
17006 - DIR_NAME_SIZE - BUF_SLOP) \
17007 <= PATH_MAX)
17008 /* FIXME: Assuming there's a system for which this is true,
17009 this should be done in a compile test. */
17010 exit (0);
17011#else
17012 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
17013 + DIR_NAME_SIZE + BUF_SLOP];
17014 char *cwd = getcwd (buf, PATH_MAX);
17015 size_t initial_cwd_len;
17016 size_t cwd_len;
17017 int fail = 0;
17018 size_t n_chdirs = 0;
88b48903 17019
6ec2e0f5
SDJ
17020 if (cwd == NULL)
17021 exit (10);
88b48903 17022
6ec2e0f5 17023 cwd_len = initial_cwd_len = strlen (cwd);
88b48903 17024
6ec2e0f5
SDJ
17025 while (1)
17026 {
17027 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
17028 char *c = NULL;
17029
17030 cwd_len += DIR_NAME_SIZE;
17031 /* If mkdir or chdir fails, it could be that this system cannot create
17032 any file with an absolute name longer than PATH_MAX, such as cygwin.
17033 If so, leave fail as 0, because the current working directory can't
17034 be too long for getcwd if it can't even be created. For other
17035 errors, be pessimistic and consider that as a failure, too. */
17036 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
17037 {
17038 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
17039 fail = 20;
17040 break;
17041 }
88b48903 17042
6ec2e0f5
SDJ
17043 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
17044 {
17045 struct stat sb;
88b48903 17046
6ec2e0f5
SDJ
17047 c = getcwd (buf, PATH_MAX);
17048 if (!c && errno == ENOENT)
17049 {
17050 fail = 11;
17051 break;
17052 }
17053 if (c)
17054 {
17055 fail = 31;
17056 break;
17057 }
17058 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
17059 {
17060 fail = 21;
17061 break;
17062 }
88b48903 17063
6ec2e0f5
SDJ
17064 /* Our replacement needs to be able to stat() long ../../paths,
17065 so generate a path larger than PATH_MAX to check,
17066 avoiding the replacement if we can't stat(). */
17067 c = getcwd (buf, cwd_len + 1);
17068 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
17069 {
17070 fail = 32;
17071 break;
17072 }
17073 }
88b48903 17074
6ec2e0f5
SDJ
17075 if (dotdot_max <= cwd_len - initial_cwd_len)
17076 {
17077 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
17078 break;
17079 c = getcwd (buf, cwd_len + 1);
17080 if (!c)
17081 {
17082 if (! (errno == ERANGE || errno == ENOENT
17083 || is_ENAMETOOLONG (errno)))
17084 {
17085 fail = 22;
17086 break;
17087 }
17088 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
17089 {
17090 fail = 12;
17091 break;
17092 }
17093 }
17094 }
88b48903 17095
6ec2e0f5
SDJ
17096 if (c && strlen (c) != cwd_len)
17097 {
17098 fail = 23;
17099 break;
17100 }
17101 ++n_chdirs;
17102 }
88b48903 17103
6ec2e0f5
SDJ
17104 /* Leaving behind such a deep directory is not polite.
17105 So clean up here, right away, even though the driving
17106 shell script would also clean up. */
17107 {
17108 size_t i;
88b48903 17109
6ec2e0f5
SDJ
17110 /* Try rmdir first, in case the chdir failed. */
17111 rmdir (DIR_NAME);
17112 for (i = 0; i <= n_chdirs; i++)
17113 {
17114 if (chdir ("..") < 0)
17115 break;
17116 if (rmdir (DIR_NAME) != 0)
17117 break;
17118 }
17119 }
88b48903 17120
6ec2e0f5
SDJ
17121 exit (fail);
17122#endif
17123}
88b48903 17124
6ec2e0f5
SDJ
17125_ACEOF
17126if ac_fn_c_try_run "$LINENO"; then :
17127 gl_cv_func_getcwd_path_max=yes
17128else
17129 case $? in
17130 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
17131 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
17132 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
17133 *) gl_cv_func_getcwd_path_max=no;;
17134 esac
17135fi
17136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17137 conftest.$ac_objext conftest.beam conftest.$ac_ext
17138fi
88b48903 17139
88b48903 17140
6ec2e0f5
SDJ
17141fi
17142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
17143$as_echo "$gl_cv_func_getcwd_path_max" >&6; }
88b48903 17144
6ec2e0f5
SDJ
17145 case "$gl_cv_func_getcwd_null" in
17146 *yes)
88b48903
WN
17147
17148
472fa5ee
SM
17149 :
17150
17151
17152
17153
17154
17155
17156 :
17157
17158
17159
17160
88b48903
WN
17161
17162
6ec2e0f5
SDJ
17163 for ac_func in getpagesize
17164do :
17165 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
d0ac1c44 17166if test "x$ac_cv_func_getpagesize" = xyes; then :
6ec2e0f5
SDJ
17167 cat >>confdefs.h <<_ACEOF
17168#define HAVE_GETPAGESIZE 1
17169_ACEOF
17170
17171fi
17172done
17173
17174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
17175$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
d0ac1c44 17176if ${gl_cv_func_getcwd_abort_bug+:} false; then :
88b48903
WN
17177 $as_echo_n "(cached) " >&6
17178else
6ec2e0f5
SDJ
17179 # Remove any remnants of a previous test.
17180 rm -rf confdir-14B---
17181 # Arrange for deletion of the temporary directory this test creates.
17182 ac_clean_files="$ac_clean_files confdir-14B---"
17183 if test "$cross_compiling" = yes; then :
17184 gl_cv_func_getcwd_abort_bug=yes
88b48903
WN
17185else
17186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17187/* end confdefs.h. */
6ec2e0f5
SDJ
17188
17189#include <errno.h>
17190#include <stdlib.h>
17191#if HAVE_UNISTD_H
17192# include <unistd.h>
17193#else /* on Windows with MSVC */
17194# include <direct.h>
17195#endif
17196#include <string.h>
17197#include <sys/stat.h>
17198
17199
17200/* Arrange to define PATH_MAX, like "pathmax.h" does. */
17201#if HAVE_UNISTD_H
17202# include <unistd.h>
17203#endif
17204#include <limits.h>
17205#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17206# include <sys/param.h>
17207#endif
17208#if !defined PATH_MAX && defined MAXPATHLEN
17209# define PATH_MAX MAXPATHLEN
17210#endif
17211#ifdef __hpux
17212# undef PATH_MAX
17213# define PATH_MAX 1024
17214#endif
17215#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17216# undef PATH_MAX
17217# define PATH_MAX 260
17218#endif
17219
17220
17221/* Don't get link errors because mkdir is redefined to rpl_mkdir. */
17222#undef mkdir
17223
17224#ifndef S_IRWXU
17225# define S_IRWXU 0700
17226#endif
17227
17228/* FIXME: skip the run-test altogether on systems without getpagesize. */
17229#if ! HAVE_GETPAGESIZE
17230# define getpagesize() 0
17231#endif
17232
17233/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
17234 the 16kB pagesize on ia64 linux. Those conditions make the code below
17235 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
17236#define TARGET_LEN (5 * 1024)
88b48903
WN
17237
17238int
17239main ()
17240{
6ec2e0f5
SDJ
17241 char *cwd;
17242 size_t initial_cwd_len;
17243 int fail = 0;
17244
17245 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
17246 this relatively expensive and invasive test if that's not true. */
17247#ifdef PATH_MAX
17248 int bug_possible = PATH_MAX < getpagesize ();
17249#else
17250 int bug_possible = 0;
17251#endif
17252 if (! bug_possible)
17253 return 0;
8690e634 17254
6ec2e0f5
SDJ
17255 cwd = getcwd (NULL, 0);
17256 if (cwd == NULL)
17257 return 2;
17258
17259 initial_cwd_len = strlen (cwd);
17260 free (cwd);
17261
17262 if (1)
17263 {
17264 static char const dir_name[] = "confdir-14B---";
17265 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
17266 / sizeof dir_name);
17267 size_t d;
17268 for (d = 0; d < desired_depth; d++)
17269 {
17270 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
17271 {
17272 if (! (errno == ERANGE || errno == ENAMETOOLONG
17273 || errno == ENOENT))
17274 fail = 3; /* Unable to construct deep hierarchy. */
17275 break;
17276 }
17277 }
17278
17279 /* If libc has the bug in question, this invocation of getcwd
17280 results in a failed assertion. */
17281 cwd = getcwd (NULL, 0);
17282 if (cwd == NULL)
17283 fail = 4; /* getcwd didn't assert, but it failed for a long name
17284 where the answer could have been learned. */
17285 free (cwd);
17286
17287 /* Call rmdir first, in case the above chdir failed. */
17288 rmdir (dir_name);
17289 while (0 < d--)
17290 {
17291 if (chdir ("..") < 0)
17292 {
17293 fail = 5;
17294 break;
17295 }
17296 rmdir (dir_name);
17297 }
17298 }
17299
17300 return fail;
8690e634 17301}
6ec2e0f5 17302
8690e634
JK
17303_ACEOF
17304if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17305 gl_cv_func_getcwd_abort_bug=no
8690e634 17306else
6ec2e0f5
SDJ
17307 ret=$?
17308 if test $ret -ge 128 || test $ret = 4; then
17309 gl_cv_func_getcwd_abort_bug=yes
17310 else
17311 gl_cv_func_getcwd_abort_bug=no
17312 fi
8690e634
JK
17313fi
17314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17315 conftest.$ac_objext conftest.beam conftest.$ac_ext
17316fi
17317
17318
17319fi
6ec2e0f5
SDJ
17320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
17321$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
17322 if test $gl_cv_func_getcwd_abort_bug = yes; then :
17323 gl_abort_bug=yes
17324fi
17325
17326 ;;
17327 esac
17328 ;;
17329 esac
17330 case "$gl_cv_func_getcwd_path_max" in
17331 "no"|"no, it has the AIX bug") ;;
17332 *)
17333
17334$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
17335
17336 ;;
17337 esac
17338 case "$gl_cv_func_getcwd_path_max" in
17339 "no, but it is partly working")
17340
17341$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
17342
17343 ;;
17344 "yes, but with shorter paths")
17345
17346$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
17347
17348 ;;
17349 esac
17350
17351 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
17352 || test $gl_cv_func_getcwd_posix_signature != yes \
17353 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
17354 || test $gl_abort_bug = yes; then
17355 REPLACE_GETCWD=1
8690e634
JK
17356 fi
17357
6ec2e0f5 17358 if test $REPLACE_GETCWD = 1; then
8690e634
JK
17359
17360
8690e634
JK
17361
17362
17363
17364
17365
17366
6ec2e0f5 17367 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
8690e634
JK
17368
17369
8690e634
JK
17370
17371
6ec2e0f5
SDJ
17372 :
17373
17374 fi
17375
8690e634
JK
17376
17377cat >>confdefs.h <<_ACEOF
6ec2e0f5 17378#define GNULIB_GETCWD 1
8690e634
JK
17379_ACEOF
17380
17381
8690e634 17382
8690e634
JK
17383
17384
c971b7fa 17385
c971b7fa 17386
6ec2e0f5
SDJ
17387 GNULIB_GETCWD=1
17388
17389
17390
17391
17392
17393$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
17394
c971b7fa 17395
c971b7fa 17396
c971b7fa 17397
c971b7fa 17398
c971b7fa 17399
c971b7fa 17400
c971b7fa 17401
6ec2e0f5
SDJ
17402 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
17403 *yes,yes) ;;
17404 *)
17405 REPLACE_GETCWD=1
17406 ;;
17407 esac
c971b7fa 17408
6ec2e0f5 17409 if test $REPLACE_GETCWD = 1; then
c971b7fa 17410
c971b7fa
PA
17411
17412
c971b7fa
PA
17413
17414
c971b7fa 17415
c971b7fa 17416
c971b7fa 17417
6ec2e0f5 17418 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
c971b7fa 17419
6ec2e0f5 17420 fi
c971b7fa 17421
c971b7fa 17422
c971b7fa 17423
c971b7fa 17424
8690e634 17425
6ec2e0f5 17426 GNULIB_GETCWD=1
c971b7fa 17427
88b48903
WN
17428
17429
17430
88b48903 17431
6ec2e0f5 17432$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
88b48903 17433
88b48903
WN
17434
17435
17436
6ec2e0f5
SDJ
17437
17438
17439
472fa5ee
SM
17440 :
17441
17442
17443
17444
17445
17446
17447 :
17448
17449
17450
17451
6ec2e0f5
SDJ
17452
17453 if test $ac_cv_func_getdtablesize = yes &&
17454 test $ac_cv_have_decl_getdtablesize = yes; then
17455 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
17456 # up to an unchangeable hard limit; all other platforms correctly
17457 # require setrlimit before getdtablesize() can report a larger value.
17458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
17459$as_echo_n "checking whether getdtablesize works... " >&6; }
d0ac1c44 17460if ${gl_cv_func_getdtablesize_works+:} false; then :
88b48903
WN
17461 $as_echo_n "(cached) " >&6
17462else
6ec2e0f5 17463 if test "$cross_compiling" = yes; then :
88b48903 17464 case "$host_os" in
6ec2e0f5
SDJ
17465 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
17466 gl_cv_func_getdtablesize_works="guessing no" ;;
17467 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
88b48903 17468 esac
88b48903
WN
17469else
17470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17471/* end confdefs.h. */
17472
6ec2e0f5
SDJ
17473 #include <unistd.h>
17474int
17475main ()
88b48903 17476{
6ec2e0f5
SDJ
17477int size = getdtablesize();
17478 if (dup2 (0, getdtablesize()) != -1)
17479 return 1;
17480 if (size != getdtablesize())
17481 return 2;
17482
17483 ;
17484 return 0;
88b48903
WN
17485}
17486_ACEOF
17487if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17488 gl_cv_func_getdtablesize_works=yes
88b48903 17489else
6ec2e0f5 17490 gl_cv_func_getdtablesize_works=no
88b48903
WN
17491fi
17492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17493 conftest.$ac_objext conftest.beam conftest.$ac_ext
17494fi
17495
17496
17497fi
6ec2e0f5
SDJ
17498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
17499$as_echo "$gl_cv_func_getdtablesize_works" >&6; }
17500 case "$gl_cv_func_getdtablesize_works" in
17501 *yes) ;;
17502 *) REPLACE_GETDTABLESIZE=1 ;;
88b48903
WN
17503 esac
17504 else
6ec2e0f5 17505 HAVE_GETDTABLESIZE=0
88b48903
WN
17506 fi
17507
6ec2e0f5 17508 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
88b48903
WN
17509
17510
17511
17512
17513
17514
17515
17516
6ec2e0f5 17517 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
88b48903 17518
6ec2e0f5 17519 :
88b48903
WN
17520 fi
17521
17522
17523
17524
17525
6ec2e0f5 17526 GNULIB_GETDTABLESIZE=1
88b48903
WN
17527
17528
17529
88b48903 17530
88b48903 17531
6ec2e0f5 17532$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
88b48903 17533
88b48903 17534
88b48903 17535
88b48903 17536
88b48903 17537
88b48903 17538
88b48903 17539
88b48903
WN
17540
17541
472fa5ee
SM
17542 :
17543
17544
17545
17546
17547
6ec2e0f5
SDJ
17548 if test $ac_cv_have_decl_getlogin_r = no; then
17549 HAVE_DECL_GETLOGIN_R=0
17550 fi
88b48903 17551
88b48903 17552
472fa5ee
SM
17553 :
17554
17555
17556
17557
17558
6ec2e0f5
SDJ
17559 if test $ac_cv_func_getlogin_r = no; then
17560 HAVE_GETLOGIN_R=0
17561 else
17562 HAVE_GETLOGIN_R=1
17563
17564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
17565$as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
d0ac1c44 17566if ${gl_cv_func_getlogin_r_works+:} false; then :
6ec2e0f5
SDJ
17567 $as_echo_n "(cached) " >&6
17568else
88b48903 17569
6ec2e0f5
SDJ
17570 case "$host_os" in
17571 # Guess no on OSF/1.
17572 osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
17573 # Guess yes otherwise.
17574 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
17575 esac
17576 if test "$cross_compiling" = yes; then :
17577 :
88b48903
WN
17578else
17579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17580/* end confdefs.h. */
17581
6ec2e0f5
SDJ
17582#include <stddef.h>
17583#include <unistd.h>
17584#if !HAVE_DECL_GETLOGIN_R
88b48903 17585extern
6ec2e0f5 17586# ifdef __cplusplus
88b48903 17587"C"
6ec2e0f5
SDJ
17588# endif
17589int getlogin_r (char *, size_t);
88b48903 17590#endif
6ec2e0f5
SDJ
17591int
17592main (void)
88b48903
WN
17593{
17594 int result = 0;
6ec2e0f5
SDJ
17595 char buf[100];
17596
17597 if (getlogin_r (buf, 0) == 0)
17598 result |= 16;
17599 if (getlogin_r (buf, 1) == 0)
17600 result |= 17;
88b48903
WN
17601 return result;
17602}
17603_ACEOF
17604if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 17605 gl_cv_func_getlogin_r_works=yes
88b48903 17606else
6ec2e0f5
SDJ
17607 case $? in
17608 16 | 17) gl_cv_func_getlogin_r_works=no ;;
17609 esac
17610
88b48903
WN
17611fi
17612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17613 conftest.$ac_objext conftest.beam conftest.$ac_ext
17614fi
17615
17616
4a626d0a 17617fi
6ec2e0f5
SDJ
17618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
17619$as_echo "$gl_cv_func_getlogin_r_works" >&6; }
17620 case "$gl_cv_func_getlogin_r_works" in
17621 *yes) ;;
17622 *) REPLACE_GETLOGIN_R=1 ;;
17623 esac
17624 fi
17625
17626 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
17627
17628
17629
17630
17631
17632
17633
17634
17635 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
4a626d0a 17636
4a626d0a 17637
4a626d0a 17638
472fa5ee
SM
17639 :
17640
17641
17642
17643
17644
4a626d0a 17645
4a626d0a
PA
17646 fi
17647
17648
4a626d0a
PA
17649
17650
17651
6ec2e0f5 17652 GNULIB_GETLOGIN_R=1
4a626d0a
PA
17653
17654
17655
17656
17657
6ec2e0f5 17658$as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
4a626d0a 17659
4a626d0a
PA
17660
17661
17662
17663
472fa5ee
SM
17664 :
17665
17666
17667
17668
17669
17670
17671
17672
4a626d0a 17673
6ec2e0f5
SDJ
17674 ac_found=0
17675 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
17676"
d0ac1c44 17677if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
6ec2e0f5
SDJ
17678 ac_have_decl=1
17679else
17680 ac_have_decl=0
17681fi
17682
17683cat >>confdefs.h <<_ACEOF
17684#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
17685_ACEOF
17686if test $ac_have_decl = 1; then :
17687 ac_found=1
17688fi
17689
17690 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
17691"
d0ac1c44 17692if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
6ec2e0f5
SDJ
17693 ac_have_decl=1
17694else
17695 ac_have_decl=0
17696fi
17697
17698cat >>confdefs.h <<_ACEOF
17699#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
17700_ACEOF
17701if test $ac_have_decl = 1; then :
17702 ac_found=1
17703fi
4a626d0a 17704
6ec2e0f5
SDJ
17705 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
17706"
d0ac1c44 17707if test "x$ac_cv_have_decl___argv" = xyes; then :
6ec2e0f5
SDJ
17708 ac_have_decl=1
17709else
17710 ac_have_decl=0
17711fi
4a626d0a 17712
6ec2e0f5
SDJ
17713cat >>confdefs.h <<_ACEOF
17714#define HAVE_DECL___ARGV $ac_have_decl
17715_ACEOF
17716if test $ac_have_decl = 1; then :
17717 ac_found=1
17718fi
4a626d0a
PA
17719
17720
6ec2e0f5
SDJ
17721 # Incur the cost of this test only if none of the above worked.
17722 if test $ac_found = 0; then
17723 # On OpenBSD 5.1, using the global __progname variable appears to be
17724 # the only way to implement getprogname.
17725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
17726$as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
d0ac1c44 17727if ${gl_cv_var___progname+:} false; then :
6ec2e0f5
SDJ
17728 $as_echo_n "(cached) " >&6
17729else
4a626d0a 17730
6ec2e0f5
SDJ
17731 gl_cv_var___progname=
17732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17733/* end confdefs.h. */
17734extern char *__progname;
17735int
17736main ()
17737{
17738return *__progname;
17739
17740 ;
17741 return 0;
17742}
17743_ACEOF
17744if ac_fn_c_try_link "$LINENO"; then :
17745 gl_cv_var___progname=yes
17746
17747fi
17748rm -f core conftest.err conftest.$ac_objext \
17749 conftest$ac_exeext conftest.$ac_ext
17750
17751
17752fi
17753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
17754$as_echo "$gl_cv_var___progname" >&6; }
17755 if test "$gl_cv_var___progname" = yes; then
17756
17757$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
17758
17759 fi
17760 fi
4a626d0a
PA
17761
17762
17763
17764
17765
17766
17767
17768
472fa5ee
SM
17769 :
17770
17771
17772
17773
17774
4a626d0a
PA
17775
17776 gl_gettimeofday_timezone=void
17777 if test $ac_cv_func_gettimeofday != yes; then
17778 HAVE_GETTIMEOFDAY=0
17779 else
17780
17781
17782
17783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
17784$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
d0ac1c44 17785if ${gl_cv_func_gettimeofday_clobber+:} false; then :
4a626d0a
PA
17786 $as_echo_n "(cached) " >&6
17787else
17788 if test "$cross_compiling" = yes; then :
17789 # When cross-compiling:
17790 case "$host_os" in
17791 # Guess all is fine on glibc systems.
17792 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
17793 # If we don't know, assume the worst.
17794 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
17795 esac
17796
17797else
17798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17799/* end confdefs.h. */
17800#include <string.h>
17801 #include <sys/time.h>
17802 #include <time.h>
17803 #include <stdlib.h>
17804
17805int
17806main ()
17807{
17808
17809 time_t t = 0;
17810 struct tm *lt;
17811 struct tm saved_lt;
17812 struct timeval tv;
17813 lt = localtime (&t);
17814 saved_lt = *lt;
17815 gettimeofday (&tv, NULL);
17816 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
17817
17818 ;
17819 return 0;
17820}
17821_ACEOF
17822if ac_fn_c_try_run "$LINENO"; then :
17823 gl_cv_func_gettimeofday_clobber=no
17824else
17825 gl_cv_func_gettimeofday_clobber=yes
17826fi
17827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17828 conftest.$ac_objext conftest.beam conftest.$ac_ext
17829fi
17830
17831fi
17832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
17833$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
17834
17835 case "$gl_cv_func_gettimeofday_clobber" in
17836 *yes)
17837 REPLACE_GETTIMEOFDAY=1
17838
17839 REPLACE_GMTIME=1
17840 REPLACE_LOCALTIME=1
17841
17842
17843$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
17844
17845 ;;
17846 esac
17847
17848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
17849$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
d0ac1c44 17850if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
4a626d0a
PA
17851 $as_echo_n "(cached) " >&6
17852else
17853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17854/* end confdefs.h. */
17855#include <sys/time.h>
17856 struct timeval c;
17857 int gettimeofday (struct timeval *restrict, void *restrict);
17858
17859int
17860main ()
17861{
17862/* glibc uses struct timezone * rather than the POSIX void *
17863 if _GNU_SOURCE is defined. However, since the only portable
17864 use of gettimeofday uses NULL as the second parameter, and
17865 since the glibc definition is actually more typesafe, it is
17866 not worth wrapping this to get a compliant signature. */
17867 int (*f) (struct timeval *restrict, void *restrict)
17868 = gettimeofday;
17869 int x = f (&c, 0);
17870 return !(x | c.tv_sec | c.tv_usec);
17871
17872 ;
17873 return 0;
17874}
17875_ACEOF
17876if ac_fn_c_try_compile "$LINENO"; then :
17877 gl_cv_func_gettimeofday_posix_signature=yes
17878else
17879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17880/* end confdefs.h. */
17881#include <sys/time.h>
17882int gettimeofday (struct timeval *restrict, struct timezone *restrict);
17883
17884int
17885main ()
17886{
17887
17888 ;
17889 return 0;
17890}
17891_ACEOF
17892if ac_fn_c_try_compile "$LINENO"; then :
17893 gl_cv_func_gettimeofday_posix_signature=almost
17894else
17895 gl_cv_func_gettimeofday_posix_signature=no
17896fi
17897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17898fi
17899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17900fi
17901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
17902$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
17903 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
17904 gl_gettimeofday_timezone='struct timezone'
17905 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
17906 REPLACE_GETTIMEOFDAY=1
17907 fi
17908 if test $REPLACE_STRUCT_TIMEVAL = 1; then
17909 REPLACE_GETTIMEOFDAY=1
17910 fi
17911
17912 fi
17913
17914cat >>confdefs.h <<_ACEOF
17915#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
17916_ACEOF
17917
88b48903 17918
4a626d0a 17919 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
88b48903 17920
88b48903 17921
88b48903 17922
88b48903
WN
17923
17924
88b48903
WN
17925
17926
17927
6ec2e0f5
SDJ
17928 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
17929
17930
17931 for ac_header in sys/timeb.h
17932do :
17933 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
d0ac1c44 17934if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
6ec2e0f5
SDJ
17935 cat >>confdefs.h <<_ACEOF
17936#define HAVE_SYS_TIMEB_H 1
17937_ACEOF
17938
17939fi
17940
17941done
17942
17943 for ac_func in _ftime
17944do :
17945 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
d0ac1c44 17946if test "x$ac_cv_func__ftime" = xyes; then :
6ec2e0f5
SDJ
17947 cat >>confdefs.h <<_ACEOF
17948#define HAVE__FTIME 1
17949_ACEOF
17950
17951fi
17952done
17953
17954
17955 fi
17956
17957
17958
17959
17960
17961 GNULIB_GETTIMEOFDAY=1
17962
17963
17964
17965
17966
17967$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
17968
17969
17970
17971 GLOB_H=
17972 for ac_header in glob.h
17973do :
17974 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
d0ac1c44 17975if test "x$ac_cv_header_glob_h" = xyes; then :
6ec2e0f5
SDJ
17976 cat >>confdefs.h <<_ACEOF
17977#define HAVE_GLOB_H 1
17978_ACEOF
17979
17980else
17981 GLOB_H=glob.h
17982fi
17983
17984done
17985
17986
17987 if test -z "$GLOB_H"; then
17988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5
17989$as_echo_n "checking for GNU glob interface version 1... " >&6; }
d0ac1c44 17990if ${gl_cv_gnu_glob_interface_version_1+:} false; then :
6ec2e0f5
SDJ
17991 $as_echo_n "(cached) " >&6
17992else
17993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17994/* end confdefs.h. */
17995#include <gnu-versions.h>
17996char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
17997_ACEOF
17998if ac_fn_c_try_compile "$LINENO"; then :
17999 gl_cv_gnu_glob_interface_version_1=yes
18000else
18001 gl_cv_gnu_glob_interface_version_1=no
18002fi
18003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18004fi
18005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5
18006$as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; }
18007
18008 if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
18009 GLOB_H=glob.h
18010 fi
18011 fi
18012
18013 if test -z "$GLOB_H"; then
18014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
18015$as_echo_n "checking whether glob lists broken symlinks... " >&6; }
d0ac1c44 18016if ${gl_cv_glob_lists_symlinks+:} false; then :
6ec2e0f5
SDJ
18017 $as_echo_n "(cached) " >&6
18018else
18019 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
18020 gl_cv_glob_lists_symlinks=maybe
18021 else
18022 # If we can't make a symlink, then we cannot test this issue. Be
18023 # pessimistic about this.
18024 gl_cv_glob_lists_symlinks=no
18025 fi
88b48903 18026
6ec2e0f5
SDJ
18027 if test $gl_cv_glob_lists_symlinks = maybe; then
18028 if test "$cross_compiling" = yes; then :
18029 gl_cv_glob_lists_symlinks=no
18030else
18031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18032/* end confdefs.h. */
88b48903 18033
6ec2e0f5
SDJ
18034#include <stddef.h>
18035#include <glob.h>
18036int
18037main ()
18038{
18039glob_t found;
18040if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
18041 ;
18042 return 0;
18043}
4a626d0a 18044_ACEOF
6ec2e0f5
SDJ
18045if ac_fn_c_try_run "$LINENO"; then :
18046 gl_cv_glob_lists_symlinks=yes
18047else
18048 gl_cv_glob_lists_symlinks=no
18049fi
18050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18051 conftest.$ac_objext conftest.beam conftest.$ac_ext
18052fi
88b48903 18053
6ec2e0f5 18054 fi
4a626d0a 18055fi
6ec2e0f5
SDJ
18056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
18057$as_echo "$gl_cv_glob_lists_symlinks" >&6; }
88b48903 18058
6ec2e0f5
SDJ
18059 if test $gl_cv_glob_lists_symlinks = no; then
18060 GLOB_H=glob.h
18061 fi
18062 fi
4a626d0a 18063
6ec2e0f5 18064 rm -f conf$$-globtest
4a626d0a 18065
88b48903 18066
6ec2e0f5
SDJ
18067 if test -n "$GLOB_H"; then
18068 GL_GENERATE_GLOB_H_TRUE=
18069 GL_GENERATE_GLOB_H_FALSE='#'
18070else
18071 GL_GENERATE_GLOB_H_TRUE='#'
18072 GL_GENERATE_GLOB_H_FALSE=
18073fi
88b48903 18074
88b48903 18075
472fa5ee
SM
18076 if test -n "$GLOB_H"; then
18077
18078
18079
18080
18081
18082
18083
18084
18085 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
18086
18087
18088
18089 :
18090
18091
18092
18093
18094
18095
18096
18097 if test $ac_cv_header_sys_cdefs_h = yes; then
18098 HAVE_SYS_CDEFS_H=1
18099 else
18100 HAVE_SYS_CDEFS_H=0
18101 fi
18102
88b48903 18103
472fa5ee 18104 :
88b48903
WN
18105
18106
18107
88b48903
WN
18108
18109
18110
18111
18112
88b48903
WN
18113
18114
18115
6ec2e0f5 18116 fi
88b48903 18117
49e4877c
PA
18118 :
18119
18120
88b48903
WN
18121
18122
18123
18124
18125 PRIPTR_PREFIX=
18126 if test -n "$STDINT_H"; then
18127 PRIPTR_PREFIX='"l"'
18128 else
18129 for glpfx in '' l ll I64; do
18130 case $glpfx in
18131 '') gltype1='int';;
18132 l) gltype1='long int';;
18133 ll) gltype1='long long int';;
18134 I64) gltype1='__int64';;
18135 esac
18136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18137/* end confdefs.h. */
18138#include <stdint.h>
18139 extern intptr_t foo;
18140 extern $gltype1 foo;
18141int
18142main ()
18143{
18144
18145 ;
18146 return 0;
18147}
18148_ACEOF
18149if ac_fn_c_try_compile "$LINENO"; then :
18150 PRIPTR_PREFIX='"'$glpfx'"'
18151fi
18152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18153 test -n "$PRIPTR_PREFIX" && break
18154 done
18155 fi
18156
18157
18158
18159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
18160$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
d0ac1c44 18161if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
88b48903
WN
18162 $as_echo_n "(cached) " >&6
18163else
18164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18165/* end confdefs.h. */
18166/* Work also in C++ mode. */
18167 #define __STDC_LIMIT_MACROS 1
18168
18169 /* Work if build is not clean. */
18170 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18171
18172 #include <limits.h>
18173 #if HAVE_STDINT_H
18174 #include <stdint.h>
18175 #endif
18176
18177 #if defined INT32_MAX && defined INTMAX_MAX
18178 #define CONDITION (INT32_MAX < INTMAX_MAX)
18179 #elif HAVE_LONG_LONG_INT
18180 #define CONDITION (sizeof (int) < sizeof (long long int))
18181 #else
18182 #define CONDITION 0
18183 #endif
18184 int test[CONDITION ? 1 : -1];
18185int
18186main ()
18187{
18188
18189 ;
18190 return 0;
18191}
18192_ACEOF
18193if ac_fn_c_try_compile "$LINENO"; then :
18194 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
18195else
18196 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
18197fi
18198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18199fi
18200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
18201$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
18202 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
18203 INT32_MAX_LT_INTMAX_MAX=1;
18204 else
18205 INT32_MAX_LT_INTMAX_MAX=0;
18206 fi
18207
18208
18209 if test $APPLE_UNIVERSAL_BUILD = 0; then
18210
18211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
18212$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
d0ac1c44 18213if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
88b48903
WN
18214 $as_echo_n "(cached) " >&6
18215else
18216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18217/* end confdefs.h. */
18218/* Work also in C++ mode. */
18219 #define __STDC_LIMIT_MACROS 1
18220
18221 /* Work if build is not clean. */
18222 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18223
18224 #include <limits.h>
18225 #if HAVE_STDINT_H
18226 #include <stdint.h>
18227 #endif
18228
18229 #if defined INT64_MAX
18230 #define CONDITION (INT64_MAX == LONG_MAX)
18231 #elif HAVE_LONG_LONG_INT
18232 #define CONDITION (sizeof (long long int) == sizeof (long int))
18233 #else
18234 #define CONDITION 0
18235 #endif
18236 int test[CONDITION ? 1 : -1];
18237int
18238main ()
18239{
18240
18241 ;
18242 return 0;
18243}
18244_ACEOF
18245if ac_fn_c_try_compile "$LINENO"; then :
18246 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
18247else
18248 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
18249fi
18250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18251fi
18252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
18253$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
18254 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
18255 INT64_MAX_EQ_LONG_MAX=1;
18256 else
18257 INT64_MAX_EQ_LONG_MAX=0;
18258 fi
18259
18260
18261 else
18262 INT64_MAX_EQ_LONG_MAX=-1
18263 fi
18264
18265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
18266$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
d0ac1c44 18267if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
88b48903
WN
18268 $as_echo_n "(cached) " >&6
18269else
18270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18271/* end confdefs.h. */
18272/* Work also in C++ mode. */
18273 #define __STDC_LIMIT_MACROS 1
18274
18275 /* Work if build is not clean. */
18276 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18277
18278 #include <limits.h>
18279 #if HAVE_STDINT_H
18280 #include <stdint.h>
18281 #endif
18282
18283 #if defined UINT32_MAX && defined UINTMAX_MAX
18284 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
18285 #elif HAVE_LONG_LONG_INT
18286 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
18287 #else
18288 #define CONDITION 0
18289 #endif
18290 int test[CONDITION ? 1 : -1];
18291int
18292main ()
18293{
18294
18295 ;
18296 return 0;
18297}
18298_ACEOF
18299if ac_fn_c_try_compile "$LINENO"; then :
18300 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
18301else
18302 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
18303fi
18304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18305fi
18306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
18307$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
18308 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
18309 UINT32_MAX_LT_UINTMAX_MAX=1;
18310 else
18311 UINT32_MAX_LT_UINTMAX_MAX=0;
18312 fi
18313
18314
18315 if test $APPLE_UNIVERSAL_BUILD = 0; then
18316
18317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
18318$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
d0ac1c44 18319if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
88b48903
WN
18320 $as_echo_n "(cached) " >&6
18321else
18322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18323/* end confdefs.h. */
18324/* Work also in C++ mode. */
18325 #define __STDC_LIMIT_MACROS 1
18326
18327 /* Work if build is not clean. */
18328 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
18329
18330 #include <limits.h>
18331 #if HAVE_STDINT_H
18332 #include <stdint.h>
18333 #endif
18334
18335 #if defined UINT64_MAX
18336 #define CONDITION (UINT64_MAX == ULONG_MAX)
18337 #elif HAVE_LONG_LONG_INT
18338 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
18339 #else
18340 #define CONDITION 0
18341 #endif
18342 int test[CONDITION ? 1 : -1];
18343int
18344main ()
18345{
18346
18347 ;
18348 return 0;
18349}
18350_ACEOF
18351if ac_fn_c_try_compile "$LINENO"; then :
18352 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
18353else
18354 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
18355fi
18356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18357fi
18358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
18359$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
18360 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
18361 UINT64_MAX_EQ_ULONG_MAX=1;
18362 else
18363 UINT64_MAX_EQ_ULONG_MAX=0;
18364 fi
18365
18366
18367 else
18368 UINT64_MAX_EQ_ULONG_MAX=-1
18369 fi
18370
18371
18372
18373
18374
18375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
18376$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
d0ac1c44 18377if ${gl_cv_func_isnand_no_libm+:} false; then :
88b48903
WN
18378 $as_echo_n "(cached) " >&6
18379else
18380
18381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18382/* end confdefs.h. */
18383#include <math.h>
18384 #if __GNUC__ >= 4
18385 # undef isnand
18386 # define isnand(x) __builtin_isnan ((double)(x))
18387 #else
18388 # undef isnand
18389 # define isnand(x) isnan ((double)(x))
18390 #endif
18391 double x;
18392int
18393main ()
18394{
18395return isnand (x);
18396 ;
18397 return 0;
18398}
18399_ACEOF
18400if ac_fn_c_try_link "$LINENO"; then :
18401 gl_cv_func_isnand_no_libm=yes
18402else
18403 gl_cv_func_isnand_no_libm=no
18404fi
18405rm -f core conftest.err conftest.$ac_objext \
18406 conftest$ac_exeext conftest.$ac_ext
18407
18408fi
18409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
18410$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
18411
18412 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
18413 if test $gl_cv_func_isnand_no_libm = yes; then
18414
18415$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
18416
18417 fi
18418
18419 if test $gl_func_isnand_no_libm != yes; then
18420
18421
18422
18423
18424
18425
18426
18427
18428 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
18429
18430
18431
18432
18433 fi
18434
18435
18436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
18437$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
d0ac1c44 18438if ${gl_cv_func_isnanl_no_libm+:} false; then :
88b48903
WN
18439 $as_echo_n "(cached) " >&6
18440else
18441
18442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18443/* end confdefs.h. */
18444#include <math.h>
18445 #if __GNUC__ >= 4
18446 # undef isnanl
18447 # define isnanl(x) __builtin_isnanl ((long double)(x))
18448 #elif defined isnan
18449 # undef isnanl
18450 # define isnanl(x) isnan ((long double)(x))
18451 #endif
18452 long double x;
18453int
18454main ()
18455{
18456return isnanl (x);
18457 ;
18458 return 0;
18459}
18460_ACEOF
18461if ac_fn_c_try_link "$LINENO"; then :
18462 gl_cv_func_isnanl_no_libm=yes
18463else
18464 gl_cv_func_isnanl_no_libm=no
18465fi
18466rm -f core conftest.err conftest.$ac_objext \
18467 conftest$ac_exeext conftest.$ac_ext
18468
18469fi
18470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
18471$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
18472
18473 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
18474 if test $gl_func_isnanl_no_libm = yes; then
18475
18476
18477
18478
18479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
18480$as_echo_n "checking whether isnanl works... " >&6; }
d0ac1c44 18481if ${gl_cv_func_isnanl_works+:} false; then :
88b48903
WN
18482 $as_echo_n "(cached) " >&6
18483else
18484
18485 if test "$cross_compiling" = yes; then :
4a626d0a 18486 gl_cv_func_isnanl_works="guessing yes"
88b48903
WN
18487else
18488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18489/* end confdefs.h. */
18490
18491#include <float.h>
18492#include <limits.h>
18493#include <math.h>
18494#if __GNUC__ >= 4
18495# undef isnanl
18496# define isnanl(x) __builtin_isnanl ((long double)(x))
18497#elif defined isnan
18498# undef isnanl
18499# define isnanl(x) isnan ((long double)(x))
18500#endif
18501#define NWORDS \
18502 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
18503typedef union { unsigned int word[NWORDS]; long double value; }
18504 memory_long_double;
18505/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
18506 runtime type conversion. */
18507#ifdef __sgi
18508static long double NaNl ()
18509{
18510 double zero = 0.0;
18511 return zero / zero;
18512}
18513#else
18514# define NaNl() (0.0L / 0.0L)
18515#endif
18516int main ()
18517{
18518 int result = 0;
18519
18520 if (!isnanl (NaNl ()))
18521 result |= 1;
18522
18523 {
18524 memory_long_double m;
18525 unsigned int i;
18526
18527 /* The isnanl function should be immune against changes in the sign bit and
18528 in the mantissa bits. The xor operation twiddles a bit that can only be
18529 a sign bit or a mantissa bit (since the exponent never extends to
18530 bit 31). */
18531 m.value = NaNl ();
18532 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
18533 for (i = 0; i < NWORDS; i++)
18534 m.word[i] |= 1;
18535 if (!isnanl (m.value))
18536 result |= 1;
18537 }
18538
18539#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
18540/* Representation of an 80-bit 'long double' as an initializer for a sequence
18541 of 'unsigned int' words. */
18542# ifdef WORDS_BIGENDIAN
18543# define LDBL80_WORDS(exponent,manthi,mantlo) \
18544 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
4a626d0a 18545 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
88b48903
WN
18546 (unsigned int) (mantlo) << 16 \
18547 }
18548# else
18549# define LDBL80_WORDS(exponent,manthi,mantlo) \
18550 { mantlo, manthi, exponent }
18551# endif
18552 { /* Quiet NaN. */
18553 static memory_long_double x =
18554 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
18555 if (!isnanl (x.value))
18556 result |= 2;
18557 }
18558 {
18559 /* Signalling NaN. */
18560 static memory_long_double x =
18561 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
18562 if (!isnanl (x.value))
18563 result |= 2;
18564 }
4a626d0a 18565 /* isnanl should return something even for noncanonical values. */
88b48903
WN
18566 { /* Pseudo-NaN. */
18567 static memory_long_double x =
18568 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
4a626d0a 18569 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
18570 result |= 4;
18571 }
18572 { /* Pseudo-Infinity. */
18573 static memory_long_double x =
18574 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
4a626d0a 18575 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
18576 result |= 8;
18577 }
18578 { /* Pseudo-Zero. */
18579 static memory_long_double x =
18580 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
4a626d0a 18581 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
18582 result |= 16;
18583 }
18584 { /* Unnormalized number. */
18585 static memory_long_double x =
18586 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
4a626d0a 18587 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
18588 result |= 32;
18589 }
18590 { /* Pseudo-Denormal. */
18591 static memory_long_double x =
18592 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
4a626d0a 18593 if (isnanl (x.value) && !isnanl (x.value))
88b48903
WN
18594 result |= 64;
18595 }
18596#endif
18597
18598 return result;
18599}
18600_ACEOF
18601if ac_fn_c_try_run "$LINENO"; then :
18602 gl_cv_func_isnanl_works=yes
18603else
18604 gl_cv_func_isnanl_works=no
18605fi
18606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18607 conftest.$ac_objext conftest.beam conftest.$ac_ext
18608fi
18609
18610
18611fi
18612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
18613$as_echo "$gl_cv_func_isnanl_works" >&6; }
18614
18615 case "$gl_cv_func_isnanl_works" in
18616 *yes) ;;
18617 *) gl_func_isnanl_no_libm=no ;;
18618 esac
18619 fi
18620 if test $gl_func_isnanl_no_libm = yes; then
18621
18622$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
18623
18624 fi
18625
18626 if test $gl_func_isnanl_no_libm != yes; then
18627
18628
18629
18630
18631
18632
18633
18634
18635 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
18636
18637
18638
18639
18640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
18641$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
d0ac1c44 18642if ${gl_cv_cc_long_double_expbit0+:} false; then :
88b48903
WN
18643 $as_echo_n "(cached) " >&6
18644else
18645
18646 if test "$cross_compiling" = yes; then :
18647
18648 gl_cv_cc_long_double_expbit0="unknown"
18649
18650else
18651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18652/* end confdefs.h. */
18653
18654#include <float.h>
18655#include <stddef.h>
18656#include <stdio.h>
18657#include <string.h>
18658#define NWORDS \
18659 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
18660typedef union { long double value; unsigned int word[NWORDS]; }
18661 memory_long_double;
18662static unsigned int ored_words[NWORDS];
18663static unsigned int anded_words[NWORDS];
18664static void add_to_ored_words (long double x)
18665{
18666 memory_long_double m;
18667 size_t i;
18668 /* Clear it first, in case
18669 sizeof (long double) < sizeof (memory_long_double). */
18670 memset (&m, 0, sizeof (memory_long_double));
18671 m.value = x;
18672 for (i = 0; i < NWORDS; i++)
18673 {
18674 ored_words[i] |= m.word[i];
18675 anded_words[i] &= m.word[i];
18676 }
18677}
18678int main ()
18679{
18680 size_t j;
18681 FILE *fp = fopen ("conftest.out", "w");
18682 if (fp == NULL)
18683 return 1;
18684 for (j = 0; j < NWORDS; j++)
18685 anded_words[j] = ~ (unsigned int) 0;
18686 add_to_ored_words (0.25L);
18687 add_to_ored_words (0.5L);
18688 add_to_ored_words (1.0L);
18689 add_to_ored_words (2.0L);
18690 add_to_ored_words (4.0L);
18691 /* Remove bits that are common (e.g. if representation of the first mantissa
18692 bit is explicit). */
18693 for (j = 0; j < NWORDS; j++)
18694 ored_words[j] &= ~anded_words[j];
18695 /* Now find the nonzero word. */
18696 for (j = 0; j < NWORDS; j++)
18697 if (ored_words[j] != 0)
18698 break;
18699 if (j < NWORDS)
18700 {
18701 size_t i;
18702 for (i = j + 1; i < NWORDS; i++)
18703 if (ored_words[i] != 0)
18704 {
18705 fprintf (fp, "unknown");
18706 return (fclose (fp) != 0);
18707 }
18708 for (i = 0; ; i++)
18709 if ((ored_words[j] >> i) & 1)
18710 {
18711 fprintf (fp, "word %d bit %d", (int) j, (int) i);
18712 return (fclose (fp) != 0);
18713 }
18714 }
18715 fprintf (fp, "unknown");
18716 return (fclose (fp) != 0);
18717}
18718
18719_ACEOF
18720if ac_fn_c_try_run "$LINENO"; then :
18721 gl_cv_cc_long_double_expbit0=`cat conftest.out`
18722else
18723 gl_cv_cc_long_double_expbit0="unknown"
18724fi
18725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18726 conftest.$ac_objext conftest.beam conftest.$ac_ext
18727fi
18728
18729 rm -f conftest.out
18730
18731fi
18732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
18733$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
18734 case "$gl_cv_cc_long_double_expbit0" in
18735 word*bit*)
18736 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
18737 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
18738
18739cat >>confdefs.h <<_ACEOF
18740#define LDBL_EXPBIT0_WORD $word
18741_ACEOF
18742
18743
18744cat >>confdefs.h <<_ACEOF
18745#define LDBL_EXPBIT0_BIT $bit
18746_ACEOF
18747
18748 ;;
18749 esac
18750
18751
18752
18753 fi
18754
18755
18756
18757
88b48903
WN
18758
18759
472fa5ee
SM
18760 :
18761
18762
18763
18764
18765
88b48903
WN
18766
18767
2196f55f 18768
49e4877c 18769
88b48903
WN
18770 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
18771
18772
18773
18774
472fa5ee
SM
18775 :
18776
18777
18778
18779
18780
f45c62c4
YQ
18781 if test $ac_cv_func_lstat = yes; then
18782
18783 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18784 *no)
18785 REPLACE_LSTAT=1
18786 ;;
18787 esac
18788 else
18789 HAVE_LSTAT=0
18790 fi
18791
18792 if test $REPLACE_LSTAT = 1; then
18793
18794
18795
18796
18797
18798
18799
18800
18801 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
18802
18803 :
18804 fi
18805
18806
18807
18808
18809
18810 GNULIB_LSTAT=1
18811
18812
18813
18814
18815
18816$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
18817
18818
18819
18820
18821
18822
6a29c58e
YQ
18823 if test $gl_cv_func_malloc_posix = yes; then
18824
18825$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
18826
18827 else
18828 REPLACE_MALLOC=1
18829 fi
18830
18831 if test $REPLACE_MALLOC = 1; then
18832
18833
18834
18835
18836
18837
18838
18839
18840 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
18841
18842 fi
18843
18844
18845
18846
18847
18848 GNULIB_MALLOC_POSIX=1
18849
18850
18851
18852
18853
18854$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
18855
18856
18857
18858
18859
18860
88b48903
WN
18861
18862
18863
18864
18865
88b48903 18866
c971b7fa 18867
c971b7fa 18868
98399780 18869
472fa5ee
SM
18870 :
18871
18872
18873
18874
18875
98399780
YQ
18876
18877
18878
88b48903
WN
18879 if test $gl_cv_have_include_next = yes; then
18880 gl_cv_next_math_h='<'math.h'>'
18881 else
18882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
18883$as_echo_n "checking absolute name of <math.h>... " >&6; }
d0ac1c44 18884if ${gl_cv_next_math_h+:} false; then :
88b48903
WN
18885 $as_echo_n "(cached) " >&6
18886else
c971b7fa 18887
88b48903 18888 if test $ac_cv_header_math_h = yes; then
c971b7fa
PA
18889
18890
4a626d0a
PA
18891
18892
18893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634 18894/* end confdefs.h. */
88b48903 18895#include <math.h>
8690e634 18896_ACEOF
4a626d0a
PA
18897 case "$host_os" in
18898 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18899 *) gl_absname_cpp="$ac_cpp" ;;
18900 esac
18901
18902 case "$host_os" in
18903 mingw*)
18904 gl_dirsep_regex='[/\\]'
18905 ;;
18906 *)
18907 gl_dirsep_regex='\/'
18908 ;;
18909 esac
18910 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18911 gl_header_literal_regex=`echo 'math.h' \
18912 | sed -e "$gl_make_literal_regex_sed"`
18913 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18914 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18915 s|^/[^/]|//&|
18916 p
18917 q
18918 }'
18919
18920 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18921 sed -n "$gl_absolute_header_sed"`
18922
18923 gl_header=$gl_cv_absolute_math_h
18924 gl_cv_next_math_h='"'$gl_header'"'
88b48903
WN
18925 else
18926 gl_cv_next_math_h='<'math.h'>'
18927 fi
8690e634 18928
c971b7fa 18929
88b48903
WN
18930fi
18931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
18932$as_echo "$gl_cv_next_math_h" >&6; }
18933 fi
18934 NEXT_MATH_H=$gl_cv_next_math_h
c971b7fa 18935
88b48903
WN
18936 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18937 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18938 gl_next_as_first_directive='<'math.h'>'
18939 else
18940 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18941 gl_next_as_first_directive=$gl_cv_next_math_h
18942 fi
18943 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
8690e634 18944
c971b7fa 18945
c971b7fa
PA
18946
18947
c971b7fa 18948
88b48903
WN
18949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
18950$as_echo_n "checking whether NAN macro works... " >&6; }
d0ac1c44 18951if ${gl_cv_header_math_nan_works+:} false; then :
c971b7fa
PA
18952 $as_echo_n "(cached) " >&6
18953else
8690e634
JK
18954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18955/* end confdefs.h. */
88b48903 18956#include <math.h>
c971b7fa
PA
18957int
18958main ()
18959{
88b48903
WN
18960/* Solaris 10 has a broken definition of NAN. Other platforms
18961 fail to provide NAN, or provide it only in C99 mode; this
18962 test only needs to fail when NAN is provided but wrong. */
18963 float f = 1.0f;
18964#ifdef NAN
18965 f = NAN;
18966#endif
18967 return f == 0;
c971b7fa
PA
18968 ;
18969 return 0;
18970}
18971_ACEOF
18972if ac_fn_c_try_compile "$LINENO"; then :
88b48903 18973 gl_cv_header_math_nan_works=yes
8690e634 18974else
88b48903 18975 gl_cv_header_math_nan_works=no
c971b7fa
PA
18976fi
18977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 18978fi
88b48903
WN
18979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
18980$as_echo "$gl_cv_header_math_nan_works" >&6; }
18981 if test $gl_cv_header_math_nan_works = no; then
18982 REPLACE_NAN=1
c971b7fa 18983 fi
88b48903
WN
18984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
18985$as_echo_n "checking whether HUGE_VAL works... " >&6; }
d0ac1c44 18986if ${gl_cv_header_math_huge_val_works+:} false; then :
c971b7fa
PA
18987 $as_echo_n "(cached) " >&6
18988else
8690e634 18989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 18990/* end confdefs.h. */
88b48903 18991#include <math.h>
c971b7fa
PA
18992int
18993main ()
18994{
88b48903
WN
18995/* Solaris 10 has a broken definition of HUGE_VAL. */
18996 double d = HUGE_VAL;
18997 return d == 0;
c971b7fa
PA
18998 ;
18999 return 0;
19000}
19001_ACEOF
19002if ac_fn_c_try_compile "$LINENO"; then :
88b48903 19003 gl_cv_header_math_huge_val_works=yes
8690e634 19004else
88b48903 19005 gl_cv_header_math_huge_val_works=no
c971b7fa
PA
19006fi
19007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 19008fi
88b48903
WN
19009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
19010$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
19011 if test $gl_cv_header_math_huge_val_works = no; then
19012 REPLACE_HUGE_VAL=1
8690e634 19013 fi
c971b7fa 19014
c971b7fa 19015
88b48903
WN
19016 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
19017 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19019$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
d0ac1c44 19020if eval \${$as_gl_Symbol+:} false; then :
8690e634
JK
19021 $as_echo_n "(cached) " >&6
19022else
19023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19024/* end confdefs.h. */
88b48903 19025#include <math.h>
8690e634
JK
19026int
19027main ()
19028{
88b48903
WN
19029#undef $gl_func
19030 (void) $gl_func;
8690e634
JK
19031 ;
19032 return 0;
19033}
19034_ACEOF
19035if ac_fn_c_try_compile "$LINENO"; then :
88b48903 19036 eval "$as_gl_Symbol=yes"
c971b7fa 19037else
88b48903 19038 eval "$as_gl_Symbol=no"
c971b7fa 19039fi
8690e634
JK
19040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19041fi
88b48903
WN
19042eval ac_res=\$$as_gl_Symbol
19043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19044$as_echo "$ac_res" >&6; }
d0ac1c44 19045 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
88b48903
WN
19046 cat >>confdefs.h <<_ACEOF
19047#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19048_ACEOF
c971b7fa 19049
88b48903
WN
19050 eval ac_cv_have_decl_$gl_func=yes
19051fi
19052 done
c971b7fa
PA
19053
19054
19055
19056
19057
c971b7fa 19058
c971b7fa 19059
c971b7fa 19060
c971b7fa
PA
19061
19062
c971b7fa 19063
472fa5ee
SM
19064 :
19065
19066
19067
19068
19069
19070
19071 :
19072
19073
19074
19075
8690e634
JK
19076
19077 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
19078
19079
19080
19081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
19082$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 19083if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
c971b7fa
PA
19084 $as_echo_n "(cached) " >&6
19085else
8690e634
JK
19086
19087 case "$host_os" in
19088 # Guess no on AIX and OSF/1.
19089 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
19090 # Guess yes otherwise.
19091 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
19092 esac
19093 if test $LOCALE_JA != none; then
19094 if test "$cross_compiling" = yes; then :
19095 :
19096else
c971b7fa
PA
19097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19098/* end confdefs.h. */
c971b7fa 19099
8690e634
JK
19100#include <locale.h>
19101#include <string.h>
19102/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19103 <wchar.h>.
19104 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19105 included before <wchar.h>. */
19106#include <stddef.h>
19107#include <stdio.h>
19108#include <time.h>
19109#include <wchar.h>
19110int main ()
c971b7fa 19111{
8690e634
JK
19112 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
19113 {
19114 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
19115 mbstate_t state;
19116 wchar_t wc;
19117
19118 memset (&state, '\0', sizeof (mbstate_t));
19119 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
19120 if (mbsinit (&state))
19121 return 1;
19122 }
c971b7fa
PA
19123 return 0;
19124}
19125_ACEOF
8690e634
JK
19126if ac_fn_c_try_run "$LINENO"; then :
19127 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 19128else
8690e634 19129 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa 19130fi
8690e634
JK
19131rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19132 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19133fi
c971b7fa 19134
8690e634 19135 fi
c971b7fa 19136
8690e634
JK
19137fi
19138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
19139$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa 19140
c971b7fa 19141
c971b7fa 19142
c971b7fa 19143
8690e634
JK
19144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
19145$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 19146if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
19147 $as_echo_n "(cached) " >&6
19148else
19149
8690e634
JK
19150 case "$host_os" in
19151 # Guess no on Solaris 8.
19152 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
19153 # Guess yes otherwise.
19154 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
19155 esac
19156 if test $LOCALE_ZH_CN != none; then
19157 if test "$cross_compiling" = yes; then :
19158 :
19159else
19160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
19161/* end confdefs.h. */
19162
8690e634
JK
19163#include <locale.h>
19164#include <stdlib.h>
19165#include <string.h>
19166/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19167 <wchar.h>.
19168 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19169 included before <wchar.h>. */
19170#include <stddef.h>
19171#include <stdio.h>
19172#include <time.h>
19173#include <wchar.h>
19174int main ()
c971b7fa 19175{
8690e634
JK
19176 /* This fails on Solaris 8:
19177 mbrtowc returns 2, and sets wc to 0x00F0.
19178 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
19179 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19180 {
19181 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
19182 mbstate_t state;
19183 wchar_t wc;
19184
19185 memset (&state, '\0', sizeof (mbstate_t));
19186 if (mbrtowc (&wc, input + 3, 6, &state) != 4
19187 && mbtowc (&wc, input + 3, 6) == 4)
19188 return 1;
19189 }
c971b7fa
PA
19190 return 0;
19191}
19192_ACEOF
8690e634
JK
19193if ac_fn_c_try_run "$LINENO"; then :
19194 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 19195else
8690e634 19196 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 19197fi
8690e634
JK
19198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19199 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 19200fi
c971b7fa 19201
8690e634 19202 fi
c971b7fa 19203
8690e634
JK
19204fi
19205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
19206$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
19207
19208 REPLACE_MBSTATE_T=0
19209 case "$gl_cv_func_mbrtowc_incomplete_state" in
19210 *yes) ;;
19211 *) REPLACE_MBSTATE_T=1 ;;
19212 esac
19213 case "$gl_cv_func_mbrtowc_sanitycheck" in
19214 *yes) ;;
19215 *) REPLACE_MBSTATE_T=1 ;;
19216 esac
c971b7fa 19217 else
8690e634 19218 REPLACE_MBSTATE_T=1
c971b7fa
PA
19219 fi
19220
19221
19222
472fa5ee
SM
19223 :
19224
19225
19226
19227
19228
8690e634
JK
19229 if test $ac_cv_func_mbrtowc = no; then
19230 HAVE_MBRTOWC=0
19231 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
19232/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19233 <wchar.h>.
19234 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19235 included before <wchar.h>. */
19236#include <stddef.h>
19237#include <stdio.h>
19238#include <time.h>
19239#include <wchar.h>
c971b7fa 19240
8690e634 19241"
d0ac1c44 19242if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
8690e634
JK
19243 ac_have_decl=1
19244else
19245 ac_have_decl=0
c971b7fa 19246fi
c971b7fa 19247
8690e634
JK
19248cat >>confdefs.h <<_ACEOF
19249#define HAVE_DECL_MBRTOWC $ac_have_decl
19250_ACEOF
c971b7fa 19251
8690e634
JK
19252 if test $ac_cv_have_decl_mbrtowc = yes; then
19253 REPLACE_MBRTOWC=1
19254 fi
19255 else
19256 if test $REPLACE_MBSTATE_T = 1; then
19257 REPLACE_MBRTOWC=1
19258 else
c971b7fa
PA
19259
19260
19261
8690e634
JK
19262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
19263$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
d0ac1c44 19264if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
8690e634 19265 $as_echo_n "(cached) " >&6
c971b7fa 19266else
c971b7fa 19267
8690e634
JK
19268 case "$host_os" in
19269 # Guess no on Solaris.
19270 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
19271 # Guess yes otherwise.
19272 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
19273 esac
19274 if test $LOCALE_FR_UTF8 != none; then
19275 if test "$cross_compiling" = yes; then :
19276 :
19277else
19278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
19279/* end confdefs.h. */
19280
8690e634
JK
19281#include <locale.h>
19282#include <stdlib.h>
19283#include <string.h>
19284/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19285 <wchar.h>.
19286 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19287 included before <wchar.h>. */
19288#include <stddef.h>
19289#include <stdio.h>
19290#include <time.h>
19291#include <wchar.h>
19292int main ()
19293{
19294 int result = 0;
19295
19296 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
19297 {
19298 char input[] = "\303\237er";
19299 mbstate_t state;
19300 wchar_t wc;
19301 size_t ret;
19302
19303 memset (&state, '\0', sizeof (mbstate_t));
19304 wc = (wchar_t) 0xBADFACE;
19305 ret = mbrtowc (&wc, input, 5, &state);
19306 if (ret != 2)
19307 result |= 1;
19308 if (!mbsinit (&state))
19309 result |= 2;
c971b7fa 19310
8690e634
JK
19311 memset (&state, '\0', sizeof (mbstate_t));
19312 ret = mbrtowc (NULL, input, 5, &state);
19313 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
19314 result |= 4;
19315 if (!mbsinit (&state))
19316 result |= 8;
19317 }
19318 return result;
19319}
c971b7fa 19320_ACEOF
8690e634
JK
19321if ac_fn_c_try_run "$LINENO"; then :
19322 gl_cv_func_mbrtowc_null_arg1=yes
19323else
19324 gl_cv_func_mbrtowc_null_arg1=no
19325fi
19326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19327 conftest.$ac_objext conftest.beam conftest.$ac_ext
19328fi
c971b7fa 19329
8690e634 19330 fi
c971b7fa 19331
c971b7fa 19332fi
8690e634
JK
19333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
19334$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
c971b7fa 19335
c971b7fa 19336
c971b7fa 19337
c971b7fa 19338
8690e634
JK
19339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
19340$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
d0ac1c44 19341if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
8690e634
JK
19342 $as_echo_n "(cached) " >&6
19343else
c971b7fa 19344
8690e634
JK
19345 case "$host_os" in
19346 # Guess no on OSF/1.
19347 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
19348 # Guess yes otherwise.
19349 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
19350 esac
19351 if test $LOCALE_FR_UTF8 != none; then
19352 if test "$cross_compiling" = yes; then :
c971b7fa 19353 :
8690e634
JK
19354else
19355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19356/* end confdefs.h. */
19357
19358#include <locale.h>
19359#include <string.h>
19360/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19361 <wchar.h>.
19362 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19363 included before <wchar.h>. */
19364#include <stddef.h>
19365#include <stdio.h>
19366#include <time.h>
19367#include <wchar.h>
19368int main ()
19369{
19370 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
19371 {
19372 mbstate_t state;
19373 wchar_t wc;
19374 int ret;
19375
19376 memset (&state, '\0', sizeof (mbstate_t));
19377 wc = (wchar_t) 0xBADFACE;
19378 mbrtowc (&wc, NULL, 5, &state);
19379 /* Check that wc was not modified. */
19380 if (wc != (wchar_t) 0xBADFACE)
19381 return 1;
19382 }
19383 return 0;
19384}
19385_ACEOF
19386if ac_fn_c_try_run "$LINENO"; then :
19387 gl_cv_func_mbrtowc_null_arg2=yes
19388else
19389 gl_cv_func_mbrtowc_null_arg2=no
19390fi
19391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19392 conftest.$ac_objext conftest.beam conftest.$ac_ext
19393fi
19394
19395 fi
19396
19397fi
19398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
19399$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
c971b7fa
PA
19400
19401
19402
19403
19404
19405
8690e634
JK
19406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
19407$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
d0ac1c44 19408if ${gl_cv_func_mbrtowc_retval+:} false; then :
8690e634
JK
19409 $as_echo_n "(cached) " >&6
19410else
19411
19412 case "$host_os" in
19413 # Guess no on HP-UX, Solaris, native Windows.
19414 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
19415 # Guess yes otherwise.
19416 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
19417 esac
19418 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
19419 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
19420 if test "$cross_compiling" = yes; then :
c971b7fa 19421 :
8690e634
JK
19422else
19423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19424/* end confdefs.h. */
c971b7fa 19425
8690e634
JK
19426#include <locale.h>
19427#include <string.h>
19428/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19429 <wchar.h>.
19430 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19431 included before <wchar.h>. */
19432#include <stddef.h>
19433#include <stdio.h>
19434#include <time.h>
19435#include <wchar.h>
19436int main ()
19437{
19438 int result = 0;
19439 int found_some_locale = 0;
19440 /* This fails on Solaris. */
19441 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
19442 {
19443 char input[] = "B\303\274\303\237er"; /* "Büßer" */
19444 mbstate_t state;
19445 wchar_t wc;
19446
19447 memset (&state, '\0', sizeof (mbstate_t));
19448 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
19449 {
19450 input[1] = '\0';
19451 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
19452 result |= 1;
19453 }
19454 found_some_locale = 1;
19455 }
19456 /* This fails on HP-UX 11.11. */
19457 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
19458 {
19459 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
19460 mbstate_t state;
19461 wchar_t wc;
19462
19463 memset (&state, '\0', sizeof (mbstate_t));
19464 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
19465 {
19466 input[1] = '\0';
19467 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
19468 result |= 2;
19469 }
19470 found_some_locale = 1;
19471 }
19472 /* This fails on native Windows. */
19473 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
19474 {
19475 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
19476 mbstate_t state;
19477 wchar_t wc;
19478
19479 memset (&state, '\0', sizeof (mbstate_t));
19480 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
19481 {
19482 input[3] = '\0';
19483 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
19484 result |= 4;
19485 }
19486 found_some_locale = 1;
19487 }
19488 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
19489 {
19490 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
19491 mbstate_t state;
19492 wchar_t wc;
19493
19494 memset (&state, '\0', sizeof (mbstate_t));
19495 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
19496 {
19497 input[3] = '\0';
19498 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
19499 result |= 8;
19500 }
19501 found_some_locale = 1;
19502 }
19503 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
19504 {
19505 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
19506 mbstate_t state;
19507 wchar_t wc;
19508
19509 memset (&state, '\0', sizeof (mbstate_t));
19510 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
19511 {
19512 input[3] = '\0';
19513 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
19514 result |= 16;
19515 }
19516 found_some_locale = 1;
19517 }
19518 return (found_some_locale ? result : 77);
19519}
19520_ACEOF
19521if ac_fn_c_try_run "$LINENO"; then :
19522 gl_cv_func_mbrtowc_retval=yes
19523else
19524 if test $? != 77; then
19525 gl_cv_func_mbrtowc_retval=no
19526 fi
c971b7fa 19527
8690e634
JK
19528fi
19529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19530 conftest.$ac_objext conftest.beam conftest.$ac_ext
19531fi
c971b7fa 19532
8690e634 19533 fi
c971b7fa 19534
8690e634
JK
19535fi
19536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
19537$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
c971b7fa
PA
19538
19539
19540
19541
8690e634
JK
19542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
19543$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
d0ac1c44 19544if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
c971b7fa
PA
19545 $as_echo_n "(cached) " >&6
19546else
8690e634
JK
19547
19548 case "$host_os" in
19549 # Guess no on Solaris 8 and 9.
19550 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
19551 # Guess yes otherwise.
19552 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
19553 esac
19554 if test $LOCALE_ZH_CN != none; then
19555 if test "$cross_compiling" = yes; then :
19556 :
c971b7fa
PA
19557else
19558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19559/* end confdefs.h. */
19560
8690e634 19561#include <locale.h>
c971b7fa 19562#include <string.h>
8690e634
JK
19563/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19564 <wchar.h>.
19565 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19566 included before <wchar.h>. */
19567#include <stddef.h>
19568#include <stdio.h>
19569#include <time.h>
19570#include <wchar.h>
19571int main ()
c971b7fa 19572{
8690e634
JK
19573 /* This fails on Solaris 8 and 9. */
19574 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
c971b7fa 19575 {
8690e634
JK
19576 mbstate_t state;
19577 wchar_t wc;
c971b7fa 19578
8690e634
JK
19579 memset (&state, '\0', sizeof (mbstate_t));
19580 if (mbrtowc (&wc, "", 1, &state) != 0)
19581 return 1;
19582 }
c971b7fa
PA
19583 return 0;
19584}
19585_ACEOF
19586if ac_fn_c_try_run "$LINENO"; then :
8690e634 19587 gl_cv_func_mbrtowc_nul_retval=yes
c971b7fa 19588else
8690e634 19589 gl_cv_func_mbrtowc_nul_retval=no
c971b7fa
PA
19590fi
19591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19592 conftest.$ac_objext conftest.beam conftest.$ac_ext
19593fi
19594
8690e634
JK
19595 fi
19596
c971b7fa 19597fi
8690e634
JK
19598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
19599$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
19600
4a626d0a
PA
19601
19602
19603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
19604$as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
d0ac1c44 19605if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
4a626d0a
PA
19606 $as_echo_n "(cached) " >&6
19607else
19608
19609 case "$host_os" in
19610 # Guess no on AIX and glibc systems.
19611 aix* | *-gnu*)
19612 gl_cv_func_mbrtowc_empty_input="guessing no" ;;
19613 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
19614 esac
19615 if test "$cross_compiling" = yes; then :
19616 :
19617else
19618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19619/* end confdefs.h. */
19620
19621 #include <wchar.h>
19622 static wchar_t wc;
19623 static mbstate_t mbs;
19624 int
19625 main (void)
19626 {
49e4877c 19627 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
4a626d0a
PA
19628 }
19629_ACEOF
19630if ac_fn_c_try_run "$LINENO"; then :
4a626d0a 19631 gl_cv_func_mbrtowc_empty_input=yes
49e4877c
PA
19632else
19633 gl_cv_func_mbrtowc_empty_input=no
4a626d0a
PA
19634fi
19635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19636 conftest.$ac_objext conftest.beam conftest.$ac_ext
19637fi
19638
19639
19640fi
19641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
19642$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
19643
49e4877c
PA
19644
19645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
19646$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
d0ac1c44 19647if ${gl_cv_C_locale_sans_EILSEQ+:} false; then :
49e4877c
PA
19648 $as_echo_n "(cached) " >&6
19649else
19650
19651 gl_cv_C_locale_sans_EILSEQ="guessing no"
19652
19653 if test "$cross_compiling" = yes; then :
19654 :
19655else
19656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19657/* end confdefs.h. */
19658#include <limits.h>
19659 #include <locale.h>
19660 #include <wchar.h>
19661
19662int
19663main ()
19664{
19665
19666 int i;
19667 char *locale = setlocale (LC_ALL, "C");
19668 if (! locale)
19669 return 1;
19670 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
19671 {
19672 char c = i;
19673 wchar_t wc;
19674 mbstate_t mbs = { 0, };
19675 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
19676 if (1 < ss)
19677 return 1;
19678 }
19679 return 0;
19680
6ec2e0f5
SDJ
19681 ;
19682 return 0;
19683}
19684_ACEOF
19685if ac_fn_c_try_run "$LINENO"; then :
19686 gl_cv_C_locale_sans_EILSEQ=yes
19687else
19688 gl_cv_C_locale_sans_EILSEQ=no
19689fi
19690rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19691 conftest.$ac_objext conftest.beam conftest.$ac_ext
19692fi
19693
19694fi
19695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
19696$as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; }
19697
19698 case "$gl_cv_func_mbrtowc_null_arg1" in
19699 *yes) ;;
19700 *)
19701$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
19702
19703 REPLACE_MBRTOWC=1
19704 ;;
19705 esac
19706 case "$gl_cv_func_mbrtowc_null_arg2" in
19707 *yes) ;;
19708 *)
19709$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
19710
19711 REPLACE_MBRTOWC=1
19712 ;;
19713 esac
19714 case "$gl_cv_func_mbrtowc_retval" in
19715 *yes) ;;
19716 *)
19717$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
19718
19719 REPLACE_MBRTOWC=1
19720 ;;
19721 esac
19722 case "$gl_cv_func_mbrtowc_nul_retval" in
19723 *yes) ;;
19724 *)
19725$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
19726
19727 REPLACE_MBRTOWC=1
19728 ;;
19729 esac
19730 case "$gl_cv_func_mbrtowc_empty_input" in
19731 *yes) ;;
19732 *)
19733$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
19734
19735 REPLACE_MBRTOWC=1
19736 ;;
19737 esac
19738 case $gl_cv_C_locale_sans_EILSEQ in
19739 *yes) ;;
19740 *)
19741$as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
19742
19743 REPLACE_MBRTOWC=1
19744 ;;
19745 esac
19746 fi
19747 fi
19748
19749 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
19750
19751
19752
19753
19754
19755
19756
19757
19758 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
19759
19760
19761 :
19762
19763 fi
19764
19765
19766
19767
19768
19769 GNULIB_MBRTOWC=1
19770
19771
19772
19773
19774
19775$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
472fa5ee
SM
19789 :
19790
19791
19792
19793
19794
19795
19796 :
19797
19798
19799
19800
6ec2e0f5
SDJ
19801
19802 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
19803
19804
19805
19806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
19807$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 19808if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
6ec2e0f5
SDJ
19809 $as_echo_n "(cached) " >&6
19810else
19811
19812 case "$host_os" in
19813 # Guess no on AIX and OSF/1.
19814 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
19815 # Guess yes otherwise.
19816 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
19817 esac
19818 if test $LOCALE_JA != none; then
19819 if test "$cross_compiling" = yes; then :
19820 :
19821else
19822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19823/* end confdefs.h. */
19824
19825#include <locale.h>
19826#include <string.h>
19827/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19828 <wchar.h>.
19829 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19830 included before <wchar.h>. */
19831#include <stddef.h>
19832#include <stdio.h>
19833#include <time.h>
19834#include <wchar.h>
19835int main ()
19836{
19837 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
19838 {
19839 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
19840 mbstate_t state;
19841 wchar_t wc;
19842
19843 memset (&state, '\0', sizeof (mbstate_t));
19844 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
19845 if (mbsinit (&state))
19846 return 1;
19847 }
19848 return 0;
19849}
19850_ACEOF
19851if ac_fn_c_try_run "$LINENO"; then :
19852 gl_cv_func_mbrtowc_incomplete_state=yes
19853else
19854 gl_cv_func_mbrtowc_incomplete_state=no
19855fi
19856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19857 conftest.$ac_objext conftest.beam conftest.$ac_ext
19858fi
19859
19860 fi
19861
19862fi
19863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
19864$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
19865
19866
19867
19868
19869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
19870$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 19871if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
6ec2e0f5
SDJ
19872 $as_echo_n "(cached) " >&6
19873else
19874
19875 case "$host_os" in
19876 # Guess no on Solaris 8.
19877 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
19878 # Guess yes otherwise.
19879 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
19880 esac
19881 if test $LOCALE_ZH_CN != none; then
19882 if test "$cross_compiling" = yes; then :
19883 :
19884else
19885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19886/* end confdefs.h. */
19887
19888#include <locale.h>
19889#include <stdlib.h>
19890#include <string.h>
19891/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19892 <wchar.h>.
19893 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19894 included before <wchar.h>. */
19895#include <stddef.h>
19896#include <stdio.h>
19897#include <time.h>
19898#include <wchar.h>
19899int main ()
19900{
19901 /* This fails on Solaris 8:
19902 mbrtowc returns 2, and sets wc to 0x00F0.
19903 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
19904 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
19905 {
19906 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
19907 mbstate_t state;
19908 wchar_t wc;
19909
19910 memset (&state, '\0', sizeof (mbstate_t));
19911 if (mbrtowc (&wc, input + 3, 6, &state) != 4
19912 && mbtowc (&wc, input + 3, 6) == 4)
19913 return 1;
19914 }
49e4877c
PA
19915 return 0;
19916}
19917_ACEOF
19918if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 19919 gl_cv_func_mbrtowc_sanitycheck=yes
49e4877c 19920else
6ec2e0f5 19921 gl_cv_func_mbrtowc_sanitycheck=no
49e4877c
PA
19922fi
19923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19924 conftest.$ac_objext conftest.beam conftest.$ac_ext
19925fi
19926
6ec2e0f5
SDJ
19927 fi
19928
49e4877c 19929fi
6ec2e0f5
SDJ
19930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
19931$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
49e4877c 19932
6ec2e0f5
SDJ
19933 REPLACE_MBSTATE_T=0
19934 case "$gl_cv_func_mbrtowc_incomplete_state" in
19935 *yes) ;;
19936 *) REPLACE_MBSTATE_T=1 ;;
19937 esac
19938 case "$gl_cv_func_mbrtowc_sanitycheck" in
19939 *yes) ;;
19940 *) REPLACE_MBSTATE_T=1 ;;
19941 esac
19942 else
19943 REPLACE_MBSTATE_T=1
19944 fi
8690e634 19945
8690e634 19946
8690e634 19947
472fa5ee
SM
19948 :
19949
19950
19951
19952
19953
6ec2e0f5
SDJ
19954 if test $ac_cv_func_mbsinit = no; then
19955 HAVE_MBSINIT=0
19956 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
19957/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19958 <wchar.h>.
19959 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19960 included before <wchar.h>. */
19961#include <stddef.h>
19962#include <stdio.h>
19963#include <time.h>
19964#include <wchar.h>
8690e634 19965
6ec2e0f5 19966"
d0ac1c44 19967if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
6ec2e0f5
SDJ
19968 ac_have_decl=1
19969else
19970 ac_have_decl=0
19971fi
4a626d0a 19972
6ec2e0f5
SDJ
19973cat >>confdefs.h <<_ACEOF
19974#define HAVE_DECL_MBSINIT $ac_have_decl
19975_ACEOF
49e4877c 19976
6ec2e0f5
SDJ
19977 if test $ac_cv_have_decl_mbsinit = yes; then
19978 REPLACE_MBSINIT=1
19979 fi
19980 else
19981 if test $REPLACE_MBSTATE_T = 1; then
19982 REPLACE_MBSINIT=1
19983 else
19984 case "$host_os" in
19985 mingw*) REPLACE_MBSINIT=1 ;;
8690e634 19986 esac
c971b7fa
PA
19987 fi
19988 fi
19989
6ec2e0f5 19990 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
c971b7fa 19991
c971b7fa 19992
c971b7fa
PA
19993
19994
19995
19996
19997
19998
6ec2e0f5 19999 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
8690e634
JK
20000
20001
20002 :
c971b7fa 20003
a512b375 20004 fi
c971b7fa 20005
8690e634
JK
20006
20007
20008
20009
6ec2e0f5 20010 GNULIB_MBSINIT=1
8690e634
JK
20011
20012
20013
20014
8690e634 20015
6ec2e0f5 20016$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
8690e634
JK
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
c971b7fa 20028
472fa5ee
SM
20029 :
20030
20031
20032
20033
20034
20035
20036 :
20037
20038
20039
20040
c971b7fa 20041
8690e634 20042 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
c971b7fa 20043
8690e634
JK
20044
20045
20046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
20047$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
d0ac1c44 20048if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
8690e634
JK
20049 $as_echo_n "(cached) " >&6
20050else
20051
20052 case "$host_os" in
20053 # Guess no on AIX and OSF/1.
20054 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
20055 # Guess yes otherwise.
20056 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
20057 esac
20058 if test $LOCALE_JA != none; then
20059 if test "$cross_compiling" = yes; then :
20060 :
c971b7fa
PA
20061else
20062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20063/* end confdefs.h. */
20064
8690e634
JK
20065#include <locale.h>
20066#include <string.h>
20067/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20068 <wchar.h>.
20069 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20070 included before <wchar.h>. */
20071#include <stddef.h>
20072#include <stdio.h>
20073#include <time.h>
20074#include <wchar.h>
20075int main ()
c971b7fa 20076{
8690e634 20077 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
c971b7fa 20078 {
8690e634
JK
20079 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
20080 mbstate_t state;
20081 wchar_t wc;
20082
20083 memset (&state, '\0', sizeof (mbstate_t));
20084 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
20085 if (mbsinit (&state))
20086 return 1;
c971b7fa 20087 }
c971b7fa
PA
20088 return 0;
20089}
20090_ACEOF
20091if ac_fn_c_try_run "$LINENO"; then :
8690e634 20092 gl_cv_func_mbrtowc_incomplete_state=yes
c971b7fa 20093else
8690e634 20094 gl_cv_func_mbrtowc_incomplete_state=no
c971b7fa
PA
20095fi
20096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20097 conftest.$ac_objext conftest.beam conftest.$ac_ext
20098fi
20099
8690e634 20100 fi
c971b7fa
PA
20101
20102fi
8690e634
JK
20103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
20104$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
c971b7fa
PA
20105
20106
c971b7fa
PA
20107
20108
8690e634
JK
20109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
20110$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
d0ac1c44 20111if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
c971b7fa
PA
20112 $as_echo_n "(cached) " >&6
20113else
8690e634
JK
20114
20115 case "$host_os" in
20116 # Guess no on Solaris 8.
20117 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
20118 # Guess yes otherwise.
20119 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
20120 esac
20121 if test $LOCALE_ZH_CN != none; then
20122 if test "$cross_compiling" = yes; then :
20123 :
20124else
c971b7fa
PA
20125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20126/* end confdefs.h. */
8690e634
JK
20127
20128#include <locale.h>
20129#include <stdlib.h>
20130#include <string.h>
20131/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20132 <wchar.h>.
20133 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20134 included before <wchar.h>. */
c971b7fa 20135#include <stddef.h>
8690e634
JK
20136#include <stdio.h>
20137#include <time.h>
20138#include <wchar.h>
20139int main ()
c971b7fa 20140{
8690e634
JK
20141 /* This fails on Solaris 8:
20142 mbrtowc returns 2, and sets wc to 0x00F0.
20143 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
20144 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20145 {
20146 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
20147 mbstate_t state;
20148 wchar_t wc;
20149
20150 memset (&state, '\0', sizeof (mbstate_t));
20151 if (mbrtowc (&wc, input + 3, 6, &state) != 4
20152 && mbtowc (&wc, input + 3, 6) == 4)
20153 return 1;
20154 }
c971b7fa
PA
20155 return 0;
20156}
20157_ACEOF
8690e634
JK
20158if ac_fn_c_try_run "$LINENO"; then :
20159 gl_cv_func_mbrtowc_sanitycheck=yes
c971b7fa 20160else
8690e634 20161 gl_cv_func_mbrtowc_sanitycheck=no
c971b7fa 20162fi
8690e634
JK
20163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20164 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 20165fi
c971b7fa 20166
8690e634
JK
20167 fi
20168
20169fi
20170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
20171$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
c971b7fa 20172
8690e634
JK
20173 REPLACE_MBSTATE_T=0
20174 case "$gl_cv_func_mbrtowc_incomplete_state" in
20175 *yes) ;;
20176 *) REPLACE_MBSTATE_T=1 ;;
20177 esac
20178 case "$gl_cv_func_mbrtowc_sanitycheck" in
20179 *yes) ;;
20180 *) REPLACE_MBSTATE_T=1 ;;
20181 esac
20182 else
20183 REPLACE_MBSTATE_T=1
c971b7fa
PA
20184 fi
20185
c971b7fa 20186
8690e634 20187
472fa5ee
SM
20188 :
20189
20190
20191
20192
20193
6ec2e0f5
SDJ
20194 if test $ac_cv_func_mbsrtowcs = no; then
20195 HAVE_MBSRTOWCS=0
20196 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
8690e634
JK
20197/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20198 <wchar.h>.
20199 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20200 included before <wchar.h>. */
20201#include <stddef.h>
20202#include <stdio.h>
20203#include <time.h>
20204#include <wchar.h>
20205
20206"
d0ac1c44 20207if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
8690e634
JK
20208 ac_have_decl=1
20209else
20210 ac_have_decl=0
c971b7fa 20211fi
c971b7fa 20212
8690e634 20213cat >>confdefs.h <<_ACEOF
6ec2e0f5 20214#define HAVE_DECL_MBSRTOWCS $ac_have_decl
c971b7fa 20215_ACEOF
c971b7fa 20216
6ec2e0f5
SDJ
20217 if test $ac_cv_have_decl_mbsrtowcs = yes; then
20218 REPLACE_MBSRTOWCS=1
8690e634
JK
20219 fi
20220 else
20221 if test $REPLACE_MBSTATE_T = 1; then
6ec2e0f5 20222 REPLACE_MBSRTOWCS=1
8690e634 20223 else
6ec2e0f5
SDJ
20224
20225
20226
20227
20228
20229
20230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
20231$as_echo_n "checking whether mbsrtowcs works... " >&6; }
d0ac1c44 20232if ${gl_cv_func_mbsrtowcs_works+:} false; then :
6ec2e0f5
SDJ
20233 $as_echo_n "(cached) " >&6
20234else
20235
20236 case "$host_os" in
20237 # Guess no on HP-UX, Solaris, mingw.
20238 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
20239 # Guess yes otherwise.
20240 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
20241 esac
20242 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
20243 if test "$cross_compiling" = yes; then :
20244 :
20245else
20246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20247/* end confdefs.h. */
20248
20249#include <locale.h>
20250#include <string.h>
20251/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20252 <wchar.h>.
20253 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20254 included before <wchar.h>. */
20255#include <stddef.h>
20256#include <stdio.h>
20257#include <time.h>
20258#include <wchar.h>
20259int main ()
20260{
20261 int result = 0;
20262 /* Test whether the function supports a NULL destination argument.
20263 This fails on native Windows. */
20264 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
20265 {
20266 const char input[] = "\337er";
20267 const char *src = input;
20268 mbstate_t state;
20269
20270 memset (&state, '\0', sizeof (mbstate_t));
20271 if (mbsrtowcs (NULL, &src, 1, &state) != 3
20272 || src != input)
20273 result |= 1;
20274 }
20275 /* Test whether the function works when started with a conversion state
20276 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
20277 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
20278 {
20279 const char input[] = "B\303\274\303\237er";
20280 mbstate_t state;
20281
20282 memset (&state, '\0', sizeof (mbstate_t));
20283 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
20284 if (!mbsinit (&state))
20285 {
20286 const char *src = input + 2;
20287 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
20288 result |= 2;
20289 }
20290 }
20291 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
20292 {
20293 const char input[] = "<\306\374\313\334\270\354>";
20294 mbstate_t state;
20295
20296 memset (&state, '\0', sizeof (mbstate_t));
20297 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
20298 if (!mbsinit (&state))
20299 {
20300 const char *src = input + 4;
20301 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
20302 result |= 4;
20303 }
20304 }
20305 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
20306 {
20307 const char input[] = "B\250\271\201\060\211\070er";
20308 mbstate_t state;
20309
20310 memset (&state, '\0', sizeof (mbstate_t));
20311 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
20312 if (!mbsinit (&state))
20313 {
20314 const char *src = input + 2;
20315 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
20316 result |= 8;
20317 }
20318 }
20319 return result;
20320}
20321_ACEOF
20322if ac_fn_c_try_run "$LINENO"; then :
20323 gl_cv_func_mbsrtowcs_works=yes
20324else
20325 gl_cv_func_mbsrtowcs_works=no
20326fi
20327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20328 conftest.$ac_objext conftest.beam conftest.$ac_ext
20329fi
20330
20331 fi
20332
20333fi
20334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
20335$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
20336
20337 case "$gl_cv_func_mbsrtowcs_works" in
20338 *yes) ;;
20339 *) REPLACE_MBSRTOWCS=1 ;;
8690e634
JK
20340 esac
20341 fi
20342 fi
c971b7fa 20343
6ec2e0f5 20344 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
c971b7fa
PA
20345
20346
20347
20348
20349
20350
20351
20352
6ec2e0f5
SDJ
20353 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
c971b7fa
PA
20364
20365
8690e634 20366 :
c971b7fa 20367
a512b375 20368 fi
c971b7fa 20369
c971b7fa 20370
c971b7fa 20371
c971b7fa
PA
20372
20373
6ec2e0f5 20374 GNULIB_MBSRTOWCS=1
c971b7fa 20375
c971b7fa
PA
20376
20377
20378
20379
6ec2e0f5 20380$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
c971b7fa
PA
20381
20382
c971b7fa 20383
c971b7fa 20384
6ec2e0f5 20385 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
c971b7fa
PA
20386
20387
20388
c971b7fa 20389
c971b7fa
PA
20390
20391
20392
20393
6ec2e0f5 20394 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
8690e634 20395
c971b7fa 20396
6ec2e0f5
SDJ
20397 for ac_header in bp-sym.h
20398do :
20399 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
d0ac1c44 20400if test "x$ac_cv_header_bp_sym_h" = xyes; then :
6ec2e0f5
SDJ
20401 cat >>confdefs.h <<_ACEOF
20402#define HAVE_BP_SYM_H 1
20403_ACEOF
c971b7fa 20404
6ec2e0f5 20405fi
c971b7fa 20406
6ec2e0f5
SDJ
20407done
20408
20409
20410 fi
20411
20412
20413
20414
20415
20416 GNULIB_MEMCHR=1
20417
20418
20419
20420
20421
20422$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
20423
20424
20425
20426
20427
20428 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
20429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
20430$as_echo_n "checking whether memmem works in linear time... " >&6; }
d0ac1c44 20431if ${gl_cv_func_memmem_works_fast+:} false; then :
8690e634
JK
20432 $as_echo_n "(cached) " >&6
20433else
6ec2e0f5
SDJ
20434 if test "$cross_compiling" = yes; then :
20435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20436/* end confdefs.h. */
20437
20438#include <features.h>
20439#ifdef __GNU_LIBRARY__
20440 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
20441 && !defined __UCLIBC__
20442 Lucky user
20443 #endif
20444#endif
20445#ifdef __CYGWIN__
20446 #include <cygwin/version.h>
20447 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
20448 Lucky user
20449 #endif
20450#endif
20451
20452_ACEOF
20453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20454 $EGREP "Lucky user" >/dev/null 2>&1; then :
20455 gl_cv_func_memmem_works_fast="guessing yes"
20456else
20457 gl_cv_func_memmem_works_fast="guessing no"
20458fi
20459rm -f conftest*
20460
c971b7fa 20461
8690e634
JK
20462else
20463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 20464/* end confdefs.h. */
c971b7fa 20465
6ec2e0f5
SDJ
20466#include <signal.h> /* for signal */
20467#include <string.h> /* for memmem */
20468#include <stdlib.h> /* for malloc */
20469#include <unistd.h> /* for alarm */
20470static void quit (int sig) { _exit (sig + 128); }
20471
20472int
20473main ()
8690e634 20474{
8690e634 20475
6ec2e0f5
SDJ
20476 int result = 0;
20477 size_t m = 1000000;
20478 char *haystack = (char *) malloc (2 * m + 1);
20479 char *needle = (char *) malloc (m + 1);
20480 /* Failure to compile this test due to missing alarm is okay,
20481 since all such platforms (mingw) also lack memmem. */
20482 signal (SIGALRM, quit);
20483 alarm (5);
20484 /* Check for quadratic performance. */
20485 if (haystack && needle)
20486 {
20487 memset (haystack, 'A', 2 * m);
20488 haystack[2 * m] = 'B';
20489 memset (needle, 'A', m);
20490 needle[m] = 'B';
20491 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
20492 result |= 1;
20493 }
20494 return result;
20495
20496 ;
c971b7fa
PA
20497 return 0;
20498}
20499_ACEOF
8690e634 20500if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 20501 gl_cv_func_memmem_works_fast=yes
8690e634 20502else
6ec2e0f5 20503 gl_cv_func_memmem_works_fast=no
8690e634
JK
20504fi
20505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20506 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 20507fi
c971b7fa
PA
20508
20509
8690e634 20510fi
6ec2e0f5
SDJ
20511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
20512$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
20513 case "$gl_cv_func_memmem_works_fast" in
20514 *yes) ;;
20515 *)
20516 REPLACE_MEMMEM=1
20517 ;;
20518 esac
20519 fi
c971b7fa 20520
6ec2e0f5 20521 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
8690e634
JK
20522
20523
20524
6ec2e0f5
SDJ
20525
20526
20527
20528
20529
20530 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
20531
20532 fi
20533
20534
20535
20536
20537 for ac_func in memmem
20538do :
20539 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
d0ac1c44 20540if test "x$ac_cv_func_memmem" = xyes; then :
6ec2e0f5
SDJ
20541 cat >>confdefs.h <<_ACEOF
20542#define HAVE_MEMMEM 1
20543_ACEOF
20544
20545fi
20546done
20547
20548 if test $ac_cv_func_memmem = yes; then
20549 HAVE_MEMMEM=1
20550 else
20551 HAVE_MEMMEM=0
20552 fi
20553
472fa5ee
SM
20554 :
20555
20556
20557
20558
20559
6ec2e0f5
SDJ
20560 if test $ac_cv_have_decl_memmem = no; then
20561 HAVE_DECL_MEMMEM=0
20562 else
20563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
20564$as_echo_n "checking whether memmem works... " >&6; }
d0ac1c44 20565if ${gl_cv_func_memmem_works_always+:} false; then :
c971b7fa
PA
20566 $as_echo_n "(cached) " >&6
20567else
6ec2e0f5
SDJ
20568 if test "$cross_compiling" = yes; then :
20569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20570/* end confdefs.h. */
20571
20572#ifdef __GNU_LIBRARY__
20573 #include <features.h>
20574 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
20575 || __GLIBC_MINOR__ > 12)) \
20576 || (__GLIBC__ > 2)) \
20577 || defined __UCLIBC__
20578 Lucky user
20579 #endif
20580#elif defined __CYGWIN__
20581 #include <cygwin/version.h>
20582 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
20583 Lucky user
20584 #endif
20585#else
20586 Lucky user
20587#endif
20588
20589_ACEOF
20590if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20591 $EGREP "Lucky user" >/dev/null 2>&1; then :
20592 gl_cv_func_memmem_works_always="guessing yes"
20593else
20594 gl_cv_func_memmem_works_always="guessing no"
20595fi
20596rm -f conftest*
20597
8690e634 20598
8690e634 20599else
c971b7fa
PA
20600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20601/* end confdefs.h. */
c971b7fa 20602
6ec2e0f5
SDJ
20603#include <string.h> /* for memmem */
20604#define P "_EF_BF_BD"
20605#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
20606#define NEEDLE P P P P P
20607
20608int
20609main ()
c971b7fa 20610{
8690e634 20611
6ec2e0f5
SDJ
20612 int result = 0;
20613 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
20614 result |= 1;
20615 /* Check for empty needle behavior. */
20616 {
20617 const char *haystack = "AAA";
20618 if (memmem (haystack, 3, NULL, 0) != haystack)
20619 result |= 2;
8690e634 20620 }
6ec2e0f5
SDJ
20621 return result;
20622
20623 ;
c971b7fa
PA
20624 return 0;
20625}
20626_ACEOF
8690e634 20627if ac_fn_c_try_run "$LINENO"; then :
6ec2e0f5 20628 gl_cv_func_memmem_works_always=yes
c971b7fa 20629else
6ec2e0f5 20630 gl_cv_func_memmem_works_always=no
c971b7fa 20631fi
8690e634
JK
20632rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20633 conftest.$ac_objext conftest.beam conftest.$ac_ext
c971b7fa 20634fi
8690e634 20635
8690e634
JK
20636
20637fi
6ec2e0f5
SDJ
20638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
20639$as_echo "$gl_cv_func_memmem_works_always" >&6; }
20640 case "$gl_cv_func_memmem_works_always" in
8690e634 20641 *yes) ;;
6ec2e0f5
SDJ
20642 *)
20643 REPLACE_MEMMEM=1
20644 ;;
8690e634 20645 esac
c971b7fa 20646 fi
6ec2e0f5 20647 :
c971b7fa 20648
6ec2e0f5 20649 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
c971b7fa 20650
c971b7fa 20651
8690e634 20652
c971b7fa 20653
6ec2e0f5
SDJ
20654
20655
20656
20657
20658 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
20659
20660 fi
20661
20662
20663
20664
20665
20666 GNULIB_MEMMEM=1
20667
20668
20669
20670
20671
20672$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682 for ac_func in mempcpy
20683do :
20684 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
d0ac1c44 20685if test "x$ac_cv_func_mempcpy" = xyes; then :
6ec2e0f5
SDJ
20686 cat >>confdefs.h <<_ACEOF
20687#define HAVE_MEMPCPY 1
8690e634 20688_ACEOF
c971b7fa 20689
6ec2e0f5
SDJ
20690fi
20691done
c971b7fa 20692
6ec2e0f5
SDJ
20693 if test $ac_cv_func_mempcpy = no; then
20694 HAVE_MEMPCPY=0
20695 fi
8690e634 20696
6ec2e0f5 20697 if test $HAVE_MEMPCPY = 0; then
8690e634
JK
20698
20699
20700
20701
8690e634 20702
6ec2e0f5
SDJ
20703
20704
20705
20706 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
20707
20708
8690e634 20709 :
c971b7fa 20710
6ec2e0f5 20711 fi
c971b7fa 20712
8690e634 20713
8690e634 20714
8690e634 20715
6ec2e0f5
SDJ
20716
20717 GNULIB_MEMPCPY=1
20718
20719
20720
20721
20722
20723$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
20724
20725
20726
20727
20728
20729
20730
20731
472fa5ee
SM
20732 :
20733
20734
20735
20736
20737
6ec2e0f5
SDJ
20738 if test $ac_cv_have_decl_memrchr = no; then
20739 HAVE_DECL_MEMRCHR=0
20740 fi
20741
20742 for ac_func in memrchr
20743do :
20744 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
d0ac1c44 20745if test "x$ac_cv_func_memrchr" = xyes; then :
6ec2e0f5
SDJ
20746 cat >>confdefs.h <<_ACEOF
20747#define HAVE_MEMRCHR 1
c971b7fa 20748_ACEOF
6ec2e0f5 20749
c971b7fa 20750fi
6ec2e0f5 20751done
8690e634 20752
8690e634 20753
6ec2e0f5 20754 if test $ac_cv_func_memrchr = no; then
8690e634 20755
6ec2e0f5
SDJ
20756
20757
20758
20759
20760
20761
20762
20763 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
20764
20765 :
c971b7fa
PA
20766 fi
20767
20768
c971b7fa 20769
c971b7fa 20770
c971b7fa 20771
6ec2e0f5
SDJ
20772 GNULIB_MEMRCHR=1
20773
20774
20775
20776
20777
20778$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
20779
20780
20781
20782
2d8adcbd
MM
20783
20784
20785
472fa5ee
SM
20786 :
20787
20788
20789
20790
20791
2d8adcbd
MM
20792 if test $ac_cv_func_mkstemp = yes; then
20793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
20794$as_echo_n "checking for working mkstemp... " >&6; }
d0ac1c44 20795if ${gl_cv_func_working_mkstemp+:} false; then :
2d8adcbd
MM
20796 $as_echo_n "(cached) " >&6
20797else
20798
20799 mkdir conftest.mkstemp
20800 if test "$cross_compiling" = yes; then :
20801 case "$host_os" in
20802 # Guess yes on glibc systems.
20803 *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
20804 # If we don't know, assume the worst.
20805 *) gl_cv_func_working_mkstemp="guessing no" ;;
20806 esac
20807
20808else
20809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20810/* end confdefs.h. */
20811$ac_includes_default
20812int
20813main ()
20814{
20815int result = 0;
20816 int i;
20817 off_t large = (off_t) 4294967295u;
20818 if (large < 0)
20819 large = 2147483647;
20820 umask (0);
20821 for (i = 0; i < 70; i++)
20822 {
20823 char templ[] = "conftest.mkstemp/coXXXXXX";
20824 int (*mkstemp_function) (char *) = mkstemp;
20825 int fd = mkstemp_function (templ);
20826 if (fd < 0)
20827 result |= 1;
20828 else
20829 {
20830 struct stat st;
20831 if (lseek (fd, large, SEEK_SET) != large)
20832 result |= 2;
20833 if (fstat (fd, &st) < 0)
20834 result |= 4;
20835 else if (st.st_mode & 0077)
20836 result |= 8;
20837 if (close (fd))
20838 result |= 16;
20839 }
20840 }
20841 return result;
20842 ;
20843 return 0;
20844}
20845_ACEOF
20846if ac_fn_c_try_run "$LINENO"; then :
20847 gl_cv_func_working_mkstemp=yes
20848else
20849 gl_cv_func_working_mkstemp=no
20850fi
20851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20852 conftest.$ac_objext conftest.beam conftest.$ac_ext
20853fi
20854
20855 rm -rf conftest.mkstemp
20856
20857fi
20858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
20859$as_echo "$gl_cv_func_working_mkstemp" >&6; }
20860 case "$gl_cv_func_working_mkstemp" in
20861 *yes) ;;
20862 *)
20863 REPLACE_MKSTEMP=1
20864 ;;
20865 esac
20866 else
20867 HAVE_MKSTEMP=0
20868 fi
20869
20870 if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
20871
20872
20873
20874
20875
20876
20877
20878
20879 gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
20880
20881
20882
20883 fi
20884
20885
20886
20887
20888
20889 GNULIB_MKSTEMP=1
20890
20891
20892
20893
20894
20895$as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
20896
20897
20898
20899
6ec2e0f5
SDJ
20900 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
20901
20902
20903
c971b7fa 20904
c971b7fa 20905
c971b7fa
PA
20906
20907
8690e634 20908
6ec2e0f5 20909 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
8690e634 20910
6ec2e0f5 20911 fi
8690e634 20912
6ec2e0f5 20913 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
8690e634
JK
20914
20915
20916
20917
20918
20919
8690e634
JK
20920
20921
6ec2e0f5 20922 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
8690e634 20923
a512b375 20924 fi
8690e634
JK
20925
20926
20927
6ec2e0f5
SDJ
20928 case "$host_os" in
20929 mingw* | pw*)
20930 REPLACE_OPEN=1
20931 ;;
20932 *)
20933
472fa5ee
SM
20934 :
20935
20936
20937
20938
20939
6ec2e0f5
SDJ
20940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
20941$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
d0ac1c44 20942if ${gl_cv_func_open_slash+:} false; then :
6ec2e0f5
SDJ
20943 $as_echo_n "(cached) " >&6
20944else
20945 # Assume that if we have lstat, we can also check symlinks.
20946 if test $ac_cv_func_lstat = yes; then
20947 touch conftest.tmp
20948 ln -s conftest.tmp conftest.lnk
20949 fi
20950 if test "$cross_compiling" = yes; then :
8690e634 20951
6ec2e0f5
SDJ
20952 case "$host_os" in
20953 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
20954 gl_cv_func_open_slash="guessing no" ;;
20955 *)
20956 gl_cv_func_open_slash="guessing yes" ;;
20957 esac
8690e634 20958
6ec2e0f5
SDJ
20959else
20960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20961/* end confdefs.h. */
20962
20963#include <fcntl.h>
20964#if HAVE_UNISTD_H
20965# include <unistd.h>
20966#endif
20967int main ()
20968{
20969 int result = 0;
20970#if HAVE_LSTAT
20971 if (open ("conftest.lnk/", O_RDONLY) != -1)
20972 result |= 1;
20973#endif
20974 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
20975 result |= 2;
20976 return result;
20977}
20978_ACEOF
20979if ac_fn_c_try_run "$LINENO"; then :
20980 gl_cv_func_open_slash=yes
20981else
20982 gl_cv_func_open_slash=no
20983fi
20984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20985 conftest.$ac_objext conftest.beam conftest.$ac_ext
20986fi
8690e634 20987
6ec2e0f5 20988 rm -f conftest.sl conftest.tmp conftest.lnk
8690e634 20989
6ec2e0f5
SDJ
20990fi
20991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
20992$as_echo "$gl_cv_func_open_slash" >&6; }
20993 case "$gl_cv_func_open_slash" in
20994 *no)
8690e634 20995
6ec2e0f5 20996$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
8690e634 20997
6ec2e0f5
SDJ
20998 REPLACE_OPEN=1
20999 ;;
21000 esac
21001 ;;
21002 esac
8690e634 21003
6ec2e0f5 21004 if test $REPLACE_OPEN = 0; then
c971b7fa
PA
21005
21006
21007
472fa5ee
SM
21008 :
21009
21010
21011
21012
21013
6ec2e0f5
SDJ
21014 if test $ac_cv_func_fchdir = no; then
21015 HAVE_FCHDIR=0
21016 fi
c971b7fa 21017
6ec2e0f5
SDJ
21018 if test $HAVE_FCHDIR = 0; then
21019 REPLACE_OPEN=1
21020 fi
21021 fi
c971b7fa
PA
21022
21023
21024
6ec2e0f5 21025 if test $REPLACE_OPEN = 1; then
c971b7fa
PA
21026
21027
21028
21029
21030
c971b7fa
PA
21031
21032
c971b7fa 21033
6ec2e0f5 21034 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
c971b7fa 21035
c971b7fa
PA
21036
21037
6ec2e0f5
SDJ
21038 :
21039
a512b375 21040 fi
c971b7fa
PA
21041
21042
21043
21044
21045
6ec2e0f5 21046 GNULIB_OPEN=1
c971b7fa
PA
21047
21048
21049
21050
21051
6ec2e0f5 21052$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
c971b7fa
PA
21053
21054
21055
21056
21057
c971b7fa 21058
c971b7fa 21059
472fa5ee
SM
21060 :
21061
21062
21063
21064
21065
63ce7108 21066
6ec2e0f5
SDJ
21067 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
21068 yes+*yes)
21069 ;;
21070 yes+*)
21071 # Solaris 9 has *at functions, but uniformly mishandles trailing
21072 # slash in all of them.
21073 REPLACE_OPENAT=1
21074 ;;
21075 *)
21076 HAVE_OPENAT=0
21077 ;;
21078 esac
63ce7108 21079
6ec2e0f5 21080 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
63ce7108 21081
63ce7108 21082
63ce7108 21083
63ce7108 21084
63ce7108
TT
21085
21086
63ce7108 21087
63ce7108 21088
6ec2e0f5 21089 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
63ce7108
TT
21090
21091
21092
6ec2e0f5 21093 :
63ce7108 21094
6ec2e0f5 21095 fi
63ce7108
TT
21096
21097
6ec2e0f5
SDJ
21098cat >>confdefs.h <<_ACEOF
21099#define GNULIB_OPENAT 1
21100_ACEOF
63ce7108 21101
63ce7108 21102
63ce7108
TT
21103
21104
21105
21106
6ec2e0f5 21107 GNULIB_OPENAT=1
63ce7108 21108
63ce7108 21109
63ce7108 21110
63ce7108 21111
63ce7108 21112
6ec2e0f5 21113$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
63ce7108
TT
21114
21115
63ce7108 21116
63ce7108 21117
63ce7108 21118
63ce7108 21119
6ec2e0f5
SDJ
21120 for ac_func in opendir
21121do :
21122 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
d0ac1c44 21123if test "x$ac_cv_func_opendir" = xyes; then :
6ec2e0f5
SDJ
21124 cat >>confdefs.h <<_ACEOF
21125#define HAVE_OPENDIR 1
63ce7108 21126_ACEOF
6ec2e0f5 21127
63ce7108 21128fi
6ec2e0f5 21129done
63ce7108 21130
6ec2e0f5
SDJ
21131 if test $ac_cv_func_opendir = no; then
21132 HAVE_OPENDIR=0
21133 fi
63ce7108 21134
6ec2e0f5
SDJ
21135
21136
21137
472fa5ee
SM
21138 :
21139
21140
21141
21142
21143
6ec2e0f5
SDJ
21144 if test $ac_cv_func_fchdir = no; then
21145 HAVE_FCHDIR=0
63ce7108 21146 fi
63ce7108 21147
6ec2e0f5
SDJ
21148 if test $HAVE_FCHDIR = 0; then
21149 if test $HAVE_OPENDIR = 1; then
21150 REPLACE_OPENDIR=1
21151 fi
21152 fi
21153
21154 case $host_os,$HAVE_OPENDIR in
21155 os2*,1)
21156 REPLACE_OPENDIR=1;;
21157 esac
21158
21159 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
63ce7108
TT
21160
21161
21162
21163
21164
21165
21166
21167
6ec2e0f5 21168 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
63ce7108
TT
21169
21170 fi
21171
21172
21173
21174
21175
6ec2e0f5 21176 GNULIB_OPENDIR=1
63ce7108
TT
21177
21178
21179
21180
63ce7108 21181
6ec2e0f5 21182$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
63ce7108
TT
21183
21184
21185
21186
21187
472fa5ee
SM
21188 :
21189
21190
21191
21192
21193
63ce7108
TT
21194
21195
2196f55f
YQ
21196
21197
8424cc97
SM
21198
21199 for ac_func in rawmemchr
21200do :
21201 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
d0ac1c44 21202if test "x$ac_cv_func_rawmemchr" = xyes; then :
8424cc97
SM
21203 cat >>confdefs.h <<_ACEOF
21204#define HAVE_RAWMEMCHR 1
21205_ACEOF
21206
21207fi
21208done
21209
21210 if test $ac_cv_func_rawmemchr = no; then
21211 HAVE_RAWMEMCHR=0
21212 fi
21213
21214 if test $HAVE_RAWMEMCHR = 0; then
21215
21216
21217
21218
21219
21220
21221
21222
21223 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
21224
21225 :
21226 fi
21227
21228
21229
21230
21231
21232 GNULIB_RAWMEMCHR=1
21233
21234
21235
21236
21237
21238$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
21239
21240
21241
21242
21243
21244
6ec2e0f5
SDJ
21245 for ac_func in readdir
21246do :
21247 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
d0ac1c44 21248if test "x$ac_cv_func_readdir" = xyes; then :
6ec2e0f5
SDJ
21249 cat >>confdefs.h <<_ACEOF
21250#define HAVE_READDIR 1
21251_ACEOF
21252
21253fi
21254done
21255
21256 if test $ac_cv_func_readdir = no; then
21257 HAVE_READDIR=0
21258 fi
21259
21260 if test $HAVE_READDIR = 0; then
21261
21262
21263
21264
21265
21266
21267
21268
21269 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
21270
21271 fi
21272
21273
21274
21275
21276
21277 GNULIB_READDIR=1
21278
21279
21280
21281
21282
21283$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
21284
21285
21286
21287
21288
21289
472fa5ee
SM
21290 :
21291
21292
21293
21294
21295
2196f55f
YQ
21296 if test $ac_cv_func_readlink = no; then
21297 HAVE_READLINK=0
21298 else
21299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
21300$as_echo_n "checking whether readlink signature is correct... " >&6; }
d0ac1c44 21301if ${gl_cv_decl_readlink_works+:} false; then :
2196f55f
YQ
21302 $as_echo_n "(cached) " >&6
21303else
21304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21305/* end confdefs.h. */
21306#include <unistd.h>
21307 /* Cause compilation failure if original declaration has wrong type. */
21308 ssize_t readlink (const char *, char *, size_t);
21309int
21310main ()
21311{
21312
21313 ;
21314 return 0;
21315}
21316_ACEOF
21317if ac_fn_c_try_compile "$LINENO"; then :
21318 gl_cv_decl_readlink_works=yes
21319else
21320 gl_cv_decl_readlink_works=no
21321fi
21322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21323fi
21324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
21325$as_echo "$gl_cv_decl_readlink_works" >&6; }
21326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
21327$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
d0ac1c44 21328if ${gl_cv_func_readlink_works+:} false; then :
2196f55f
YQ
21329 $as_echo_n "(cached) " >&6
21330else
21331 # We have readlink, so assume ln -s works.
21332 ln -s conftest.no-such conftest.link
21333 ln -s conftest.link conftest.lnk2
21334 if test "$cross_compiling" = yes; then :
21335 case "$host_os" in
21336 # Guess yes on glibc systems.
21337 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
21338 # If we don't know, assume the worst.
21339 *) gl_cv_func_readlink_works="guessing no" ;;
21340 esac
21341
21342else
21343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21344/* end confdefs.h. */
21345#include <unistd.h>
21346
21347int
21348main ()
21349{
21350char buf[20];
21351 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
21352 ;
21353 return 0;
21354}
21355_ACEOF
21356if ac_fn_c_try_run "$LINENO"; then :
21357 gl_cv_func_readlink_works=yes
21358else
21359 gl_cv_func_readlink_works=no
21360fi
21361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21362 conftest.$ac_objext conftest.beam conftest.$ac_ext
21363fi
21364
21365 rm -f conftest.link conftest.lnk2
21366fi
21367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
21368$as_echo "$gl_cv_func_readlink_works" >&6; }
21369 case "$gl_cv_func_readlink_works" in
21370 *yes)
21371 if test "$gl_cv_decl_readlink_works" != yes; then
21372 REPLACE_READLINK=1
21373 fi
21374 ;;
21375 *)
21376
21377$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
21378
21379 REPLACE_READLINK=1
21380 ;;
21381 esac
21382 fi
21383
21384 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
21385
21386
21387
21388
21389
21390
21391
21392
21393 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
21394
21395
21396 :
21397
21398 fi
21399
21400
21401
21402
21403
21404 GNULIB_READLINK=1
21405
21406
21407
21408
21409
21410$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
21411
21412
21413
21414
6a29c58e
YQ
21415
21416
6ec2e0f5
SDJ
21417 if test $gl_cv_func_malloc_posix = yes; then
21418
21419$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
21420
21421 else
21422 REPLACE_REALLOC=1
21423 fi
21424
21425 if test $REPLACE_REALLOC = 1; then
21426
21427
21428
21429
21430
21431
21432
21433
21434 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
21435
21436 fi
21437
21438
21439
21440
21441
21442 GNULIB_REALLOC_POSIX=1
21443
21444
21445
21446
21447
21448$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
21449
21450
21451
21452
21453
21454
6a29c58e 21455
472fa5ee
SM
21456 :
21457
21458
21459
21460
21461
6a29c58e
YQ
21462
21463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
21464$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
d0ac1c44 21465if ${gl_cv_func_rename_slash_dst_works+:} false; then :
6a29c58e
YQ
21466 $as_echo_n "(cached) " >&6
21467else
21468 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
21469 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 21470 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
21471 # Assume that if we have lstat, we can also check symlinks.
21472 if test $ac_cv_func_lstat = yes; then
21473 ln -s conftest.f conftest.lnk
21474 fi
21475 if test "$cross_compiling" = yes; then :
21476 case "$host_os" in
21477 # Guess yes on glibc systems.
21478 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
21479 # If we don't know, assume the worst.
21480 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
21481 esac
21482
21483else
21484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21485/* end confdefs.h. */
21486
21487# include <stdio.h>
21488# include <stdlib.h>
21489
21490int
21491main ()
21492{
21493int result = 0;
21494 if (rename ("conftest.f1", "conftest.f2/") == 0)
21495 result |= 1;
21496 if (rename ("conftest.d1", "conftest.d2/") != 0)
21497 result |= 2;
21498#if HAVE_LSTAT
21499 if (rename ("conftest.f", "conftest.lnk/") == 0)
21500 result |= 4;
21501#endif
21502 return result;
21503
21504 ;
21505 return 0;
21506}
21507_ACEOF
21508if ac_fn_c_try_run "$LINENO"; then :
21509 gl_cv_func_rename_slash_dst_works=yes
21510else
21511 gl_cv_func_rename_slash_dst_works=no
21512fi
21513rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21514 conftest.$ac_objext conftest.beam conftest.$ac_ext
21515fi
21516
21517 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
21518
21519fi
21520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
21521$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
21522 case "$gl_cv_func_rename_slash_dst_works" in
21523 *yes) ;;
21524 *)
21525 REPLACE_RENAME=1
21526
21527$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
21528
21529 ;;
21530 esac
21531
21532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
21533$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
d0ac1c44 21534if ${gl_cv_func_rename_slash_src_works+:} false; then :
6a29c58e
YQ
21535 $as_echo_n "(cached) " >&6
21536else
21537 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
21538 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
d0ac1c44 21539 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
21540 # Assume that if we have lstat, we can also check symlinks.
21541 if test $ac_cv_func_lstat = yes; then
21542 ln -s conftest.f conftest.lnk
21543 fi
21544 if test "$cross_compiling" = yes; then :
21545 case "$host_os" in
21546 # Guess yes on glibc systems.
21547 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
21548 # If we don't know, assume the worst.
21549 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
21550 esac
21551
21552else
21553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21554/* end confdefs.h. */
21555
21556# include <stdio.h>
21557# include <stdlib.h>
21558
21559int
21560main ()
21561{
21562int result = 0;
21563 if (rename ("conftest.f1/", "conftest.d3") == 0)
21564 result |= 1;
21565 if (rename ("conftest.d1/", "conftest.d2") != 0)
21566 result |= 2;
21567#if HAVE_LSTAT
21568 if (rename ("conftest.lnk/", "conftest.f") == 0)
21569 result |= 4;
21570#endif
21571 return result;
21572
21573 ;
21574 return 0;
21575}
21576_ACEOF
21577if ac_fn_c_try_run "$LINENO"; then :
21578 gl_cv_func_rename_slash_src_works=yes
21579else
21580 gl_cv_func_rename_slash_src_works=no
21581fi
21582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21583 conftest.$ac_objext conftest.beam conftest.$ac_ext
21584fi
21585
21586 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
21587
21588fi
21589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
21590$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
21591 case "$gl_cv_func_rename_slash_src_works" in
21592 *yes) ;;
21593 *)
21594 REPLACE_RENAME=1
21595
21596$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
21597
21598 ;;
21599 esac
21600
21601
472fa5ee
SM
21602 :
21603
21604
21605
21606
21607
6a29c58e
YQ
21608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
21609$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
d0ac1c44 21610if ${gl_cv_func_rename_link_works+:} false; then :
6a29c58e
YQ
21611 $as_echo_n "(cached) " >&6
21612else
21613 if test $ac_cv_func_link = yes; then
21614 rm -rf conftest.f conftest.f1
21615 if touch conftest.f && ln conftest.f conftest.f1 &&
21616 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
21617 if test "$cross_compiling" = yes; then :
21618 case "$host_os" in
21619 # Guess yes on glibc systems.
21620 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
21621 # If we don't know, assume the worst.
21622 *) gl_cv_func_rename_link_works="guessing no" ;;
21623 esac
21624
21625else
21626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21627/* end confdefs.h. */
21628
21629# include <stdio.h>
21630# include <stdlib.h>
21631# include <unistd.h>
21632
21633int
21634main ()
21635{
21636int result = 0;
21637 if (rename ("conftest.f", "conftest.f1"))
21638 result |= 1;
21639 if (unlink ("conftest.f1"))
21640 result |= 2;
21641 if (rename ("conftest.f", "conftest.f"))
21642 result |= 4;
21643 if (rename ("conftest.f1", "conftest.f1") == 0)
21644 result |= 8;
21645 return result;
21646
21647 ;
21648 return 0;
21649}
21650_ACEOF
21651if ac_fn_c_try_run "$LINENO"; then :
21652 gl_cv_func_rename_link_works=yes
21653else
21654 gl_cv_func_rename_link_works=no
21655fi
21656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21657 conftest.$ac_objext conftest.beam conftest.$ac_ext
21658fi
21659
21660 else
21661 gl_cv_func_rename_link_works="guessing no"
21662 fi
21663 rm -rf conftest.f conftest.f1
21664 else
21665 gl_cv_func_rename_link_works=yes
21666 fi
21667
21668fi
21669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
21670$as_echo "$gl_cv_func_rename_link_works" >&6; }
21671 case "$gl_cv_func_rename_link_works" in
21672 *yes) ;;
21673 *)
21674 REPLACE_RENAME=1
21675
21676$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
21677
21678 ;;
21679 esac
21680
21681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
21682$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
d0ac1c44 21683if ${gl_cv_func_rename_dest_works+:} false; then :
6a29c58e
YQ
21684 $as_echo_n "(cached) " >&6
21685else
21686 rm -rf conftest.f conftest.d1 conftest.d2
21687 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
d0ac1c44 21688 as_fn_error $? "cannot create temporary files" "$LINENO" 5
6a29c58e
YQ
21689 if test "$cross_compiling" = yes; then :
21690 case "$host_os" in
21691 # Guess yes on glibc systems.
21692 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
21693 # If we don't know, assume the worst.
21694 *) gl_cv_func_rename_dest_works="guessing no" ;;
21695 esac
21696
21697else
21698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21699/* end confdefs.h. */
21700
21701# include <stdio.h>
21702# include <stdlib.h>
21703
21704int
21705main ()
21706{
21707int result = 0;
21708 if (rename ("conftest.d1", "conftest.d2") != 0)
21709 result |= 1;
21710 if (rename ("conftest.d2", "conftest.f") == 0)
21711 result |= 2;
21712 return result;
21713
21714 ;
21715 return 0;
21716}
21717_ACEOF
21718if ac_fn_c_try_run "$LINENO"; then :
21719 gl_cv_func_rename_dest_works=yes
21720else
21721 gl_cv_func_rename_dest_works=no
21722fi
21723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21724 conftest.$ac_objext conftest.beam conftest.$ac_ext
21725fi
21726
21727 rm -rf conftest.f conftest.d1 conftest.d2
21728
21729fi
21730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
21731$as_echo "$gl_cv_func_rename_dest_works" >&6; }
21732 case "$gl_cv_func_rename_dest_works" in
21733 *yes) ;;
21734 *)
21735 REPLACE_RENAME=1
21736
21737$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
21738
21739 ;;
21740 esac
21741
21742 if test $REPLACE_RENAME = 1; then
21743
21744
21745
21746
21747
21748
21749
21750
21751 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
21752
21753 fi
21754
21755
21756
21757
21758
21759 GNULIB_RENAME=1
21760
21761
21762
21763
21764
21765$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
21766
21767
21768
21769
21770
21771
6ec2e0f5
SDJ
21772 for ac_func in rewinddir
21773do :
21774 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
d0ac1c44 21775if test "x$ac_cv_func_rewinddir" = xyes; then :
6ec2e0f5
SDJ
21776 cat >>confdefs.h <<_ACEOF
21777#define HAVE_REWINDDIR 1
21778_ACEOF
21779
21780fi
21781done
21782
21783 if test $ac_cv_func_rewinddir = no; then
21784 HAVE_REWINDDIR=0
21785 fi
21786
21787 if test $HAVE_REWINDDIR = 0; then
21788
21789
21790
21791
21792
21793
21794
21795
21796 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
21797
21798 fi
21799
21800
21801
21802
21803
21804 GNULIB_REWINDDIR=1
21805
21806
21807
21808
21809
21810$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
21811
21812
21813
21814
21815
21816
472fa5ee
SM
21817 :
21818
21819
21820
21821
21822
6a29c58e
YQ
21823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
21824$as_echo_n "checking whether rmdir works... " >&6; }
d0ac1c44 21825if ${gl_cv_func_rmdir_works+:} false; then :
6a29c58e
YQ
21826 $as_echo_n "(cached) " >&6
21827else
21828 mkdir conftest.dir
21829 touch conftest.file
21830 if test "$cross_compiling" = yes; then :
21831 case "$host_os" in
21832 # Guess yes on glibc systems.
21833 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
21834 # If we don't know, assume the worst.
21835 *) gl_cv_func_rmdir_works="guessing no" ;;
21836 esac
21837
21838else
21839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21840/* end confdefs.h. */
21841#include <stdio.h>
21842 #include <errno.h>
21843 #if HAVE_UNISTD_H
21844 # include <unistd.h>
21845 #else /* on Windows with MSVC */
21846 # include <direct.h>
21847 #endif
21848
21849int
21850main ()
21851{
21852int result = 0;
21853 if (!rmdir ("conftest.file/"))
21854 result |= 1;
21855 else if (errno != ENOTDIR)
21856 result |= 2;
21857 if (!rmdir ("conftest.dir/./"))
21858 result |= 4;
21859 return result;
21860
21861 ;
21862 return 0;
21863}
21864_ACEOF
21865if ac_fn_c_try_run "$LINENO"; then :
21866 gl_cv_func_rmdir_works=yes
21867else
21868 gl_cv_func_rmdir_works=no
21869fi
21870rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21871 conftest.$ac_objext conftest.beam conftest.$ac_ext
21872fi
21873
21874 rm -rf conftest.dir conftest.file
21875fi
21876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
21877$as_echo "$gl_cv_func_rmdir_works" >&6; }
21878 case "$gl_cv_func_rmdir_works" in
21879 *yes) ;;
21880 *)
21881 REPLACE_RMDIR=1
21882 ;;
21883 esac
21884
21885 if test $REPLACE_RMDIR = 1; then
21886
21887
21888
21889
21890
21891
21892
21893
21894 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
21895
21896 fi
21897
21898
21899
21900
21901
21902 GNULIB_RMDIR=1
21903
21904
21905
21906
21907
21908$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
21909
21910
21911
21912
0750520d 21913
472fa5ee
SM
21914 :
21915
21916
21917
21918
21919
21920
21921
21922
6ec2e0f5
SDJ
21923
21924
21925
472fa5ee
SM
21926 :
21927
21928
2d8adcbd
MM
21929
21930
21931
21932 if test $ac_cv_func_secure_getenv = no; then
21933 HAVE_SECURE_GETENV=0
21934 fi
21935
21936 if test $HAVE_SECURE_GETENV = 0; then
21937
21938
21939
21940
21941
21942
21943
21944
21945 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
21946
21947
21948 for ac_func in __secure_getenv
21949do :
21950 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
d0ac1c44 21951if test "x$ac_cv_func___secure_getenv" = xyes; then :
2d8adcbd
MM
21952 cat >>confdefs.h <<_ACEOF
21953#define HAVE___SECURE_GETENV 1
21954_ACEOF
21955
21956fi
21957done
21958
21959 if test $ac_cv_func___secure_getenv = no; then
21960 for ac_func in issetugid
21961do :
21962 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
d0ac1c44 21963if test "x$ac_cv_func_issetugid" = xyes; then :
2d8adcbd
MM
21964 cat >>confdefs.h <<_ACEOF
21965#define HAVE_ISSETUGID 1
21966_ACEOF
21967
21968fi
21969done
21970
21971 fi
21972
472fa5ee
SM
21973 :
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
2d8adcbd
MM
21988
21989 fi
21990
21991
21992
21993
21994
21995 GNULIB_SECURE_GETENV=1
21996
21997
21998
21999
22000
22001$as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
22002
22003
22004
22005
22006
3d99e817
AK
22007 if test $ac_cv_func_setenv = no; then
22008 HAVE_SETENV=0
22009 else
22010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
22011$as_echo_n "checking whether setenv validates arguments... " >&6; }
d0ac1c44 22012if ${gl_cv_func_setenv_works+:} false; then :
3d99e817
AK
22013 $as_echo_n "(cached) " >&6
22014else
22015 if test "$cross_compiling" = yes; then :
22016 case "$host_os" in
22017 # Guess yes on glibc systems.
22018 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
22019 # If we don't know, assume the worst.
22020 *) gl_cv_func_setenv_works="guessing no" ;;
22021 esac
22022
22023else
22024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22025/* end confdefs.h. */
22026
22027 #include <stdlib.h>
22028 #include <errno.h>
22029 #include <string.h>
22030
22031int
22032main ()
22033{
22034
22035 int result = 0;
22036 {
22037 if (setenv ("", "", 0) != -1)
22038 result |= 1;
22039 else if (errno != EINVAL)
22040 result |= 2;
22041 }
22042 {
22043 if (setenv ("a", "=", 1) != 0)
22044 result |= 4;
22045 else if (strcmp (getenv ("a"), "=") != 0)
22046 result |= 8;
22047 }
22048 return result;
22049
22050 ;
22051 return 0;
22052}
22053_ACEOF
22054if ac_fn_c_try_run "$LINENO"; then :
22055 gl_cv_func_setenv_works=yes
22056else
22057 gl_cv_func_setenv_works=no
22058fi
22059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22060 conftest.$ac_objext conftest.beam conftest.$ac_ext
22061fi
22062
22063fi
22064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
22065$as_echo "$gl_cv_func_setenv_works" >&6; }
22066 case "$gl_cv_func_setenv_works" in
22067 *yes) ;;
22068 *)
22069 REPLACE_SETENV=1
22070 ;;
22071 esac
22072 fi
22073
22074 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
22075
22076
22077
22078
22079
22080
22081
22082
22083 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
22084
22085 fi
22086
22087
22088
22089
22090
22091 GNULIB_SETENV=1
22092
22093
22094
22095
22096
22097$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
22098
22099
22100
22101
22102
0750520d
PA
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112 if test $gl_cv_have_include_next = yes; then
22113 gl_cv_next_signal_h='<'signal.h'>'
22114 else
22115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
22116$as_echo_n "checking absolute name of <signal.h>... " >&6; }
d0ac1c44 22117if ${gl_cv_next_signal_h+:} false; then :
0750520d
PA
22118 $as_echo_n "(cached) " >&6
22119else
22120
22121
22122
22123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22124/* end confdefs.h. */
22125#include <signal.h>
22126_ACEOF
22127 case "$host_os" in
22128 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22129 *) gl_absname_cpp="$ac_cpp" ;;
22130 esac
22131
22132 case "$host_os" in
22133 mingw*)
22134 gl_dirsep_regex='[/\\]'
22135 ;;
22136 *)
22137 gl_dirsep_regex='\/'
22138 ;;
22139 esac
22140 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22141 gl_header_literal_regex=`echo 'signal.h' \
22142 | sed -e "$gl_make_literal_regex_sed"`
22143 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22144 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22145 s|^/[^/]|//&|
22146 p
22147 q
22148 }'
22149
22150 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22151 sed -n "$gl_absolute_header_sed"`
22152
22153 gl_header=$gl_cv_absolute_signal_h
22154 gl_cv_next_signal_h='"'$gl_header'"'
22155
22156
22157fi
22158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
22159$as_echo "$gl_cv_next_signal_h" >&6; }
22160 fi
22161 NEXT_SIGNAL_H=$gl_cv_next_signal_h
22162
22163 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22164 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22165 gl_next_as_first_directive='<'signal.h'>'
22166 else
22167 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22168 gl_next_as_first_directive=$gl_cv_next_signal_h
22169 fi
22170 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
22171
22172
22173
22174
22175
22176# AIX declares sig_atomic_t to already include volatile, and C89 compilers
22177# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
22178 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
22179#include <signal.h>
22180
22181"
d0ac1c44 22182if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
0750520d
PA
22183
22184else
22185 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
22186fi
22187
22188
22189
22190
22191
22192
22193
22194 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
22195#include <signal.h>
22196
22197"
d0ac1c44 22198if test "x$ac_cv_type_sighandler_t" = xyes; then :
0750520d
PA
22199
22200else
22201 HAVE_SIGHANDLER_T=0
22202fi
22203
22204
22205
22206 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
22207 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22209$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
d0ac1c44 22210if eval \${$as_gl_Symbol+:} false; then :
0750520d
PA
22211 $as_echo_n "(cached) " >&6
22212else
22213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22214/* end confdefs.h. */
22215#include <signal.h>
22216
22217int
22218main ()
22219{
22220#undef $gl_func
22221 (void) $gl_func;
22222 ;
22223 return 0;
22224}
22225_ACEOF
22226if ac_fn_c_try_compile "$LINENO"; then :
22227 eval "$as_gl_Symbol=yes"
22228else
22229 eval "$as_gl_Symbol=no"
22230fi
22231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22232fi
22233eval ac_res=\$$as_gl_Symbol
22234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22235$as_echo "$ac_res" >&6; }
d0ac1c44 22236 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
0750520d
PA
22237 cat >>confdefs.h <<_ACEOF
22238#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22239_ACEOF
22240
22241 eval ac_cv_have_decl_$gl_func=yes
22242fi
22243 done
22244
22245
22246
63ce7108
TT
22247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
22248$as_echo_n "checking for ssize_t... " >&6; }
d0ac1c44 22249if ${gt_cv_ssize_t+:} false; then :
63ce7108
TT
22250 $as_echo_n "(cached) " >&6
22251else
22252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22253/* end confdefs.h. */
22254#include <sys/types.h>
22255int
22256main ()
22257{
22258int x = sizeof (ssize_t *) + sizeof (ssize_t);
22259 return !x;
22260 ;
22261 return 0;
22262}
22263_ACEOF
22264if ac_fn_c_try_compile "$LINENO"; then :
22265 gt_cv_ssize_t=yes
22266else
22267 gt_cv_ssize_t=no
22268fi
22269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22270fi
22271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
22272$as_echo "$gt_cv_ssize_t" >&6; }
22273 if test $gt_cv_ssize_t = no; then
22274
22275$as_echo "#define ssize_t int" >>confdefs.h
22276
22277 fi
22278
22279
22280
22281
472fa5ee
SM
22282 :
22283
22284
22285
22286
22287
2196f55f
YQ
22288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
22289$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
d0ac1c44 22290if ${gl_cv_func_stat_dir_slash+:} false; then :
2196f55f
YQ
22291 $as_echo_n "(cached) " >&6
22292else
22293 if test "$cross_compiling" = yes; then :
22294 case $host_os in
22295 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
22296 *) gl_cv_func_stat_dir_slash="guessing yes";;
22297 esac
22298else
22299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22300/* end confdefs.h. */
22301#include <sys/stat.h>
22302
22303int
22304main ()
22305{
22306struct stat st; return stat (".", &st) != stat ("./", &st);
22307 ;
22308 return 0;
22309}
22310_ACEOF
22311if ac_fn_c_try_run "$LINENO"; then :
22312 gl_cv_func_stat_dir_slash=yes
22313else
22314 gl_cv_func_stat_dir_slash=no
22315fi
22316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22317 conftest.$ac_objext conftest.beam conftest.$ac_ext
22318fi
22319
22320fi
22321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
22322$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
22323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
22324$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
d0ac1c44 22325if ${gl_cv_func_stat_file_slash+:} false; then :
2196f55f
YQ
22326 $as_echo_n "(cached) " >&6
22327else
22328 touch conftest.tmp
22329 # Assume that if we have lstat, we can also check symlinks.
22330 if test $ac_cv_func_lstat = yes; then
22331 ln -s conftest.tmp conftest.lnk
22332 fi
22333 if test "$cross_compiling" = yes; then :
22334 case "$host_os" in
22335 # Guess yes on glibc systems.
22336 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
22337 # If we don't know, assume the worst.
22338 *) gl_cv_func_stat_file_slash="guessing no" ;;
22339 esac
22340
22341else
22342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22343/* end confdefs.h. */
22344#include <sys/stat.h>
22345
22346int
22347main ()
22348{
22349int result = 0;
22350 struct stat st;
22351 if (!stat ("conftest.tmp/", &st))
22352 result |= 1;
22353#if HAVE_LSTAT
22354 if (!stat ("conftest.lnk/", &st))
22355 result |= 2;
22356#endif
22357 return result;
22358
22359 ;
22360 return 0;
22361}
22362_ACEOF
22363if ac_fn_c_try_run "$LINENO"; then :
22364 gl_cv_func_stat_file_slash=yes
22365else
22366 gl_cv_func_stat_file_slash=no
22367fi
22368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22369 conftest.$ac_objext conftest.beam conftest.$ac_ext
22370fi
22371
22372 rm -f conftest.tmp conftest.lnk
22373fi
22374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
22375$as_echo "$gl_cv_func_stat_file_slash" >&6; }
22376 case $gl_cv_func_stat_dir_slash in
22377 *no) REPLACE_STAT=1
22378
22379$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
22380;;
22381 esac
22382 case $gl_cv_func_stat_file_slash in
22383 *no) REPLACE_STAT=1
22384
22385$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
22386;;
22387 esac
22388
22389 if test $REPLACE_STAT = 1; then
22390
22391
22392
22393
22394
22395
22396
22397
22398 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
22399
22400 :
22401 fi
22402
22403
22404
22405
22406
22407 GNULIB_STAT=1
22408
22409
22410
22411
22412
22413$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
22414
22415
22416
22417
22418
22419
63ce7108
TT
22420 # Define two additional variables used in the Makefile substitution.
22421
22422 if test "$ac_cv_header_stdbool_h" = yes; then
22423 STDBOOL_H=''
22424 else
22425 STDBOOL_H='stdbool.h'
22426 fi
22427
22428 if test -n "$STDBOOL_H"; then
22429 GL_GENERATE_STDBOOL_H_TRUE=
22430 GL_GENERATE_STDBOOL_H_FALSE='#'
22431else
22432 GL_GENERATE_STDBOOL_H_TRUE='#'
22433 GL_GENERATE_STDBOOL_H_FALSE=
22434fi
22435
22436
22437 if test "$ac_cv_type__Bool" = yes; then
22438 HAVE__BOOL=1
22439 else
22440 HAVE__BOOL=0
22441 fi
22442
22443
22444
22445
22446
22447 STDDEF_H=
4a626d0a
PA
22448 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
22449
22450"
d0ac1c44 22451if test "x$ac_cv_type_max_align_t" = xyes; then :
4a626d0a
PA
22452
22453else
22454 HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h
22455fi
22456
63ce7108
TT
22457 if test $gt_cv_c_wchar_t = no; then
22458 HAVE_WCHAR_T=0
22459 STDDEF_H=stddef.h
22460 fi
22461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
22462$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
d0ac1c44 22463if ${gl_cv_decl_null_works+:} false; then :
63ce7108
TT
22464 $as_echo_n "(cached) " >&6
22465else
22466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22467/* end confdefs.h. */
22468#include <stddef.h>
22469 int test[2 * (sizeof NULL == sizeof (void *)) -1];
22470
22471int
22472main ()
22473{
22474
22475 ;
22476 return 0;
22477}
22478_ACEOF
22479if ac_fn_c_try_compile "$LINENO"; then :
22480 gl_cv_decl_null_works=yes
22481else
22482 gl_cv_decl_null_works=no
22483fi
22484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22485fi
22486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
22487$as_echo "$gl_cv_decl_null_works" >&6; }
22488 if test $gl_cv_decl_null_works = no; then
22489 REPLACE_NULL=1
22490 STDDEF_H=stddef.h
22491 fi
22492
22493 if test -n "$STDDEF_H"; then
22494 GL_GENERATE_STDDEF_H_TRUE=
22495 GL_GENERATE_STDDEF_H_FALSE='#'
22496else
22497 GL_GENERATE_STDDEF_H_TRUE='#'
22498 GL_GENERATE_STDDEF_H_FALSE=
22499fi
22500
22501 if test -n "$STDDEF_H"; then
22502
22503
22504
22505
22506
22507
22508
22509
22510 if test $gl_cv_have_include_next = yes; then
22511 gl_cv_next_stddef_h='<'stddef.h'>'
22512 else
22513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
22514$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
d0ac1c44 22515if ${gl_cv_next_stddef_h+:} false; then :
63ce7108
TT
22516 $as_echo_n "(cached) " >&6
22517else
22518
4a626d0a
PA
22519
22520
22521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63ce7108
TT
22522/* end confdefs.h. */
22523#include <stddef.h>
63ce7108 22524_ACEOF
4a626d0a
PA
22525 case "$host_os" in
22526 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22527 *) gl_absname_cpp="$ac_cpp" ;;
22528 esac
63ce7108 22529
4a626d0a
PA
22530 case "$host_os" in
22531 mingw*)
22532 gl_dirsep_regex='[/\\]'
22533 ;;
22534 *)
22535 gl_dirsep_regex='\/'
22536 ;;
22537 esac
22538 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22539 gl_header_literal_regex=`echo 'stddef.h' \
22540 | sed -e "$gl_make_literal_regex_sed"`
22541 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22542 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22543 s|^/[^/]|//&|
22544 p
22545 q
22546 }'
63ce7108 22547
4a626d0a
PA
22548 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22549 sed -n "$gl_absolute_header_sed"`
22550
22551 gl_header=$gl_cv_absolute_stddef_h
22552 gl_cv_next_stddef_h='"'$gl_header'"'
63ce7108
TT
22553
22554
22555fi
22556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
22557$as_echo "$gl_cv_next_stddef_h" >&6; }
22558 fi
22559 NEXT_STDDEF_H=$gl_cv_next_stddef_h
22560
22561 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22562 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22563 gl_next_as_first_directive='<'stddef.h'>'
22564 else
22565 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22566 gl_next_as_first_directive=$gl_cv_next_stddef_h
22567 fi
22568 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
22569
22570
22571
22572
22573 fi
22574
22575
22576
22577
49e4877c 22578 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
63ce7108
TT
22579
22580
22581
98399780
YQ
22582
22583
22584
22585
22586
4a626d0a
PA
22587
22588
6a29c58e
YQ
22589 if test $gl_cv_have_include_next = yes; then
22590 gl_cv_next_stdio_h='<'stdio.h'>'
22591 else
22592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
22593$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
d0ac1c44 22594if ${gl_cv_next_stdio_h+:} false; then :
6a29c58e
YQ
22595 $as_echo_n "(cached) " >&6
22596else
22597
4a626d0a
PA
22598
22599
22600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6a29c58e
YQ
22601/* end confdefs.h. */
22602#include <stdio.h>
6a29c58e 22603_ACEOF
4a626d0a
PA
22604 case "$host_os" in
22605 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22606 *) gl_absname_cpp="$ac_cpp" ;;
22607 esac
22608
22609 case "$host_os" in
22610 mingw*)
22611 gl_dirsep_regex='[/\\]'
22612 ;;
22613 *)
22614 gl_dirsep_regex='\/'
22615 ;;
22616 esac
22617 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22618 gl_header_literal_regex=`echo 'stdio.h' \
22619 | sed -e "$gl_make_literal_regex_sed"`
22620 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22621 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22622 s|^/[^/]|//&|
22623 p
22624 q
22625 }'
6a29c58e 22626
4a626d0a
PA
22627 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22628 sed -n "$gl_absolute_header_sed"`
6a29c58e 22629
4a626d0a
PA
22630 gl_header=$gl_cv_absolute_stdio_h
22631 gl_cv_next_stdio_h='"'$gl_header'"'
6a29c58e
YQ
22632
22633
22634fi
22635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
22636$as_echo "$gl_cv_next_stdio_h" >&6; }
22637 fi
22638 NEXT_STDIO_H=$gl_cv_next_stdio_h
22639
22640 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22641 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22642 gl_next_as_first_directive='<'stdio.h'>'
22643 else
22644 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22645 gl_next_as_first_directive=$gl_cv_next_stdio_h
22646 fi
22647 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
22648
22649
22650
22651
22652
4a626d0a
PA
22653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
22654$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
d0ac1c44 22655if ${gl_cv_func_printf_attribute_flavor+:} false; then :
4a626d0a
PA
22656 $as_echo_n "(cached) " >&6
22657else
22658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22659/* end confdefs.h. */
22660
22661 #define __STDC_FORMAT_MACROS 1
22662 #include <stdio.h>
22663 #include <inttypes.h>
22664 /* For non-mingw systems, compilation will trivially succeed.
22665 For mingw, compilation will succeed for older mingw (system
22666 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
22667 #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \
22668 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
22669 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
22670 #endif
22671
22672int
22673main ()
22674{
22675
22676 ;
22677 return 0;
22678}
22679_ACEOF
22680if ac_fn_c_try_compile "$LINENO"; then :
22681 gl_cv_func_printf_attribute_flavor=system
22682else
22683 gl_cv_func_printf_attribute_flavor=gnu
22684fi
22685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22686fi
22687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
22688$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
22689 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
22690
22691$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
22692
22693 fi
22694
6a29c58e
YQ
22695 GNULIB_FSCANF=1
22696
22697
22698cat >>confdefs.h <<_ACEOF
22699#define GNULIB_FSCANF 1
22700_ACEOF
22701
22702
22703 GNULIB_SCANF=1
22704
22705
22706cat >>confdefs.h <<_ACEOF
22707#define GNULIB_SCANF 1
22708_ACEOF
22709
22710
22711 GNULIB_FGETC=1
22712 GNULIB_GETC=1
22713 GNULIB_GETCHAR=1
22714 GNULIB_FGETS=1
22715 GNULIB_FREAD=1
22716
22717
22718 GNULIB_FPRINTF=1
22719 GNULIB_PRINTF=1
22720 GNULIB_VFPRINTF=1
22721 GNULIB_VPRINTF=1
22722 GNULIB_FPUTC=1
22723 GNULIB_PUTC=1
22724 GNULIB_PUTCHAR=1
22725 GNULIB_FPUTS=1
22726 GNULIB_PUTS=1
22727 GNULIB_FWRITE=1
22728
22729
22730
22731
22732 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
22733 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22735$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
d0ac1c44 22736if eval \${$as_gl_Symbol+:} false; then :
6a29c58e
YQ
22737 $as_echo_n "(cached) " >&6
22738else
22739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22740/* end confdefs.h. */
22741#include <stdio.h>
22742
22743int
22744main ()
22745{
22746#undef $gl_func
22747 (void) $gl_func;
22748 ;
22749 return 0;
22750}
22751_ACEOF
22752if ac_fn_c_try_compile "$LINENO"; then :
22753 eval "$as_gl_Symbol=yes"
22754else
22755 eval "$as_gl_Symbol=no"
22756fi
22757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22758fi
22759eval ac_res=\$$as_gl_Symbol
22760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22761$as_echo "$ac_res" >&6; }
d0ac1c44 22762 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
6a29c58e
YQ
22763 cat >>confdefs.h <<_ACEOF
22764#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22765_ACEOF
22766
22767 eval ac_cv_have_decl_$gl_func=yes
22768fi
22769 done
22770
22771
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
98399780
YQ
22782 if test $gl_cv_have_include_next = yes; then
22783 gl_cv_next_stdlib_h='<'stdlib.h'>'
22784 else
22785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
22786$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
d0ac1c44 22787if ${gl_cv_next_stdlib_h+:} false; then :
98399780
YQ
22788 $as_echo_n "(cached) " >&6
22789else
22790
4a626d0a
PA
22791
22792
22793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98399780
YQ
22794/* end confdefs.h. */
22795#include <stdlib.h>
98399780 22796_ACEOF
4a626d0a
PA
22797 case "$host_os" in
22798 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22799 *) gl_absname_cpp="$ac_cpp" ;;
22800 esac
22801
22802 case "$host_os" in
22803 mingw*)
22804 gl_dirsep_regex='[/\\]'
22805 ;;
22806 *)
22807 gl_dirsep_regex='\/'
22808 ;;
22809 esac
22810 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22811 gl_header_literal_regex=`echo 'stdlib.h' \
22812 | sed -e "$gl_make_literal_regex_sed"`
22813 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22814 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22815 s|^/[^/]|//&|
22816 p
22817 q
22818 }'
98399780 22819
4a626d0a
PA
22820 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22821 sed -n "$gl_absolute_header_sed"`
98399780 22822
4a626d0a
PA
22823 gl_header=$gl_cv_absolute_stdlib_h
22824 gl_cv_next_stdlib_h='"'$gl_header'"'
98399780
YQ
22825
22826
22827fi
22828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
22829$as_echo "$gl_cv_next_stdlib_h" >&6; }
22830 fi
22831 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
22832
22833 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22834 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22835 gl_next_as_first_directive='<'stdlib.h'>'
22836 else
22837 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22838 gl_next_as_first_directive=$gl_cv_next_stdlib_h
22839 fi
22840 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
22841
22842
22843
22844
22845
22846
4c62b19f 22847 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
98399780
YQ
22848 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22850$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
d0ac1c44 22851if eval \${$as_gl_Symbol+:} false; then :
98399780
YQ
22852 $as_echo_n "(cached) " >&6
22853else
22854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22855/* end confdefs.h. */
22856#include <stdlib.h>
22857#if HAVE_SYS_LOADAVG_H
22858# include <sys/loadavg.h>
22859#endif
22860#if HAVE_RANDOM_H
22861# include <random.h>
22862#endif
22863
22864int
22865main ()
22866{
22867#undef $gl_func
22868 (void) $gl_func;
22869 ;
22870 return 0;
22871}
22872_ACEOF
22873if ac_fn_c_try_compile "$LINENO"; then :
22874 eval "$as_gl_Symbol=yes"
22875else
22876 eval "$as_gl_Symbol=no"
22877fi
22878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22879fi
22880eval ac_res=\$$as_gl_Symbol
22881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22882$as_echo "$ac_res" >&6; }
d0ac1c44 22883 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
98399780
YQ
22884 cat >>confdefs.h <<_ACEOF
22885#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22886_ACEOF
22887
22888 eval ac_cv_have_decl_$gl_func=yes
22889fi
22890 done
22891
22892
22893
22894
22895
22896
8424cc97
SM
22897 for ac_func in strchrnul
22898do :
22899 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
d0ac1c44 22900if test "x$ac_cv_func_strchrnul" = xyes; then :
8424cc97
SM
22901 cat >>confdefs.h <<_ACEOF
22902#define HAVE_STRCHRNUL 1
22903_ACEOF
22904
22905fi
22906done
22907
22908 if test $ac_cv_func_strchrnul = no; then
22909 HAVE_STRCHRNUL=0
22910 else
22911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
22912$as_echo_n "checking whether strchrnul works... " >&6; }
d0ac1c44 22913if ${gl_cv_func_strchrnul_works+:} false; then :
8424cc97
SM
22914 $as_echo_n "(cached) " >&6
22915else
22916 if test "$cross_compiling" = yes; then :
22917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22918/* end confdefs.h. */
22919
22920#if defined __CYGWIN__
22921 #include <cygwin/version.h>
22922 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
22923 Lucky user
22924 #endif
22925#else
22926 Lucky user
22927#endif
22928
22929_ACEOF
22930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22931 $EGREP "Lucky user" >/dev/null 2>&1; then :
22932 gl_cv_func_strchrnul_works="guessing yes"
22933else
22934 gl_cv_func_strchrnul_works="guessing no"
22935fi
22936rm -f conftest*
22937
22938
22939else
22940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22941/* end confdefs.h. */
22942
22943#include <string.h> /* for strchrnul */
22944
22945int
22946main ()
22947{
22948const char *buf = "a";
22949 return strchrnul (buf, 'b') != buf + 1;
22950
22951 ;
22952 return 0;
22953}
22954_ACEOF
22955if ac_fn_c_try_run "$LINENO"; then :
22956 gl_cv_func_strchrnul_works=yes
22957else
22958 gl_cv_func_strchrnul_works=no
22959fi
22960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22961 conftest.$ac_objext conftest.beam conftest.$ac_ext
22962fi
22963
22964
22965fi
22966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
22967$as_echo "$gl_cv_func_strchrnul_works" >&6; }
22968 case "$gl_cv_func_strchrnul_works" in
22969 *yes) ;;
22970 *) REPLACE_STRCHRNUL=1 ;;
22971 esac
22972 fi
22973
22974 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
22975
22976
22977
22978
22979
22980
22981
22982
22983 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
22984
22985 :
22986 fi
22987
22988
22989
22990
22991
22992 GNULIB_STRCHRNUL=1
22993
22994
22995
22996
22997
22998$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
22999
23000
23001
23002
23003
23004
23005
472fa5ee
SM
23006 :
23007
23008
23009
23010
23011
6ec2e0f5
SDJ
23012 if test $ac_cv_func_strdup = yes; then
23013 if test $gl_cv_func_malloc_posix != yes; then
23014 REPLACE_STRDUP=1
23015 fi
23016 fi
23017
472fa5ee
SM
23018 :
23019
23020
23021
23022
23023
6ec2e0f5
SDJ
23024 if test $ac_cv_have_decl_strdup = no; then
23025 HAVE_DECL_STRDUP=0
23026 fi
23027
23028 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
23029
23030
23031
23032
23033
23034
23035
23036
23037 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
23038
23039 :
23040 fi
23041
23042
23043
23044
23045
23046 GNULIB_STRDUP=1
23047
23048
23049
23050
23051
23052$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
23053
23054
23055
23056
23057
23058
23059
23060
23061 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
23062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
23063$as_echo_n "checking for working strerror function... " >&6; }
d0ac1c44 23064if ${gl_cv_func_working_strerror+:} false; then :
6ec2e0f5
SDJ
23065 $as_echo_n "(cached) " >&6
23066else
23067 if test "$cross_compiling" = yes; then :
23068 case "$host_os" in
23069 # Guess yes on glibc systems.
23070 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
23071 # If we don't know, assume the worst.
23072 *) gl_cv_func_working_strerror="guessing no" ;;
23073 esac
23074
23075else
23076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23077/* end confdefs.h. */
23078#include <string.h>
23079
23080int
23081main ()
23082{
23083if (!*strerror (-2)) return 1;
23084 ;
23085 return 0;
23086}
23087_ACEOF
23088if ac_fn_c_try_run "$LINENO"; then :
23089 gl_cv_func_working_strerror=yes
23090else
23091 gl_cv_func_working_strerror=no
23092fi
23093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23094 conftest.$ac_objext conftest.beam conftest.$ac_ext
23095fi
23096
23097
23098fi
23099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
23100$as_echo "$gl_cv_func_working_strerror" >&6; }
23101 case "$gl_cv_func_working_strerror" in
23102 *yes) ;;
23103 *)
23104 REPLACE_STRERROR=1
23105 ;;
23106 esac
23107
23108 else
23109 REPLACE_STRERROR=1
23110 fi
23111
23112 if test $REPLACE_STRERROR = 1; then
23113
23114
23115
23116
23117
23118
23119
23120
23121 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
23122
23123 fi
23124
23125
23126cat >>confdefs.h <<_ACEOF
23127#define GNULIB_STRERROR 1
23128_ACEOF
23129
23130
23131
23132
23133
23134
23135
23136 GNULIB_STRERROR=1
23137
23138
23139
23140
23141
23142$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
23143
23144
23145
23146
23147
23148 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
23149
23150
23151
23152
23153
23154
23155
23156
23157 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
23158
23159
23160
23161
23162
472fa5ee
SM
23163 :
23164
23165
23166
23167
23168
6ec2e0f5
SDJ
23169 if test $ac_cv_header_sys_socket_h != yes; then
23170 for ac_header in winsock2.h
23171do :
23172 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
d0ac1c44 23173if test "x$ac_cv_header_winsock2_h" = xyes; then :
6ec2e0f5
SDJ
23174 cat >>confdefs.h <<_ACEOF
23175#define HAVE_WINSOCK2_H 1
23176_ACEOF
23177
23178fi
23179
23180done
23181
23182 fi
23183 if test "$ac_cv_header_winsock2_h" = yes; then
23184 HAVE_WINSOCK2_H=1
23185 UNISTD_H_HAVE_WINSOCK2_H=1
23186 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
23187 else
23188 HAVE_WINSOCK2_H=0
23189 fi
23190
23191
23192 fi
23193
23194
23195
23196
98399780 23197
63ce7108
TT
23198 if test $REPLACE_STRSTR = 0; then
23199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
23200$as_echo_n "checking whether strstr works in linear time... " >&6; }
d0ac1c44 23201if ${gl_cv_func_strstr_linear+:} false; then :
63ce7108
TT
23202 $as_echo_n "(cached) " >&6
23203else
23204 if test "$cross_compiling" = yes; then :
23205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23206/* end confdefs.h. */
23207
23208#include <features.h>
23209#ifdef __GNU_LIBRARY__
23210 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
23211 && !(defined __i386__ || defined __x86_64__) \
23212 && !defined __UCLIBC__
23213 Lucky user
23214 #endif
23215#endif
23216#ifdef __CYGWIN__
23217 #include <cygwin/version.h>
23218 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
23219 Lucky user
23220 #endif
23221#endif
23222
23223_ACEOF
23224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23225 $EGREP "Lucky user" >/dev/null 2>&1; then :
23226 gl_cv_func_strstr_linear="guessing yes"
c971b7fa 23227else
63ce7108 23228 gl_cv_func_strstr_linear="guessing no"
c971b7fa
PA
23229fi
23230rm -f conftest*
23231
23232
23233else
23234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23235/* end confdefs.h. */
23236
49e4877c
PA
23237#ifdef __MVS__
23238/* z/OS does not deliver signals while strstr() is running (thanks to
23239 restrictions on its LE runtime), which prevents us from limiting the
23240 running time of this test. */
23241# error "This test does not work properly on z/OS"
23242#endif
c971b7fa 23243#include <signal.h> /* for signal */
63ce7108 23244#include <string.h> /* for strstr */
c971b7fa
PA
23245#include <stdlib.h> /* for malloc */
23246#include <unistd.h> /* for alarm */
49e4877c 23247static void quit (int sig) { _exit (sig + 128); }
c971b7fa
PA
23248
23249int
23250main ()
23251{
23252
23253 int result = 0;
23254 size_t m = 1000000;
63ce7108
TT
23255 char *haystack = (char *) malloc (2 * m + 2);
23256 char *needle = (char *) malloc (m + 2);
c971b7fa 23257 /* Failure to compile this test due to missing alarm is okay,
63ce7108 23258 since all such platforms (mingw) also have quadratic strstr. */
c971b7fa
PA
23259 signal (SIGALRM, quit);
23260 alarm (5);
23261 /* Check for quadratic performance. */
23262 if (haystack && needle)
23263 {
23264 memset (haystack, 'A', 2 * m);
23265 haystack[2 * m] = 'B';
63ce7108 23266 haystack[2 * m + 1] = 0;
c971b7fa
PA
23267 memset (needle, 'A', m);
23268 needle[m] = 'B';
63ce7108
TT
23269 needle[m + 1] = 0;
23270 if (!strstr (haystack, needle))
c971b7fa
PA
23271 result |= 1;
23272 }
23273 return result;
23274
23275 ;
23276 return 0;
23277}
23278_ACEOF
23279if ac_fn_c_try_run "$LINENO"; then :
63ce7108 23280 gl_cv_func_strstr_linear=yes
c971b7fa 23281else
63ce7108 23282 gl_cv_func_strstr_linear=no
c971b7fa
PA
23283fi
23284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23285 conftest.$ac_objext conftest.beam conftest.$ac_ext
23286fi
23287
23288
23289fi
63ce7108
TT
23290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
23291$as_echo "$gl_cv_func_strstr_linear" >&6; }
23292 case "$gl_cv_func_strstr_linear" in
40a73391
JK
23293 *yes) ;;
23294 *)
63ce7108 23295 REPLACE_STRSTR=1
40a73391
JK
23296 ;;
23297 esac
c971b7fa
PA
23298 fi
23299
63ce7108 23300 if test $REPLACE_STRSTR = 1; then
c971b7fa
PA
23301
23302
23303
23304
23305
23306
23307
23308
63ce7108 23309 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
c971b7fa 23310
a512b375 23311 fi
c971b7fa
PA
23312
23313
23314
63ce7108
TT
23315 if test "$gl_cv_func_memchr_works" != yes; then
23316 REPLACE_STRSTR=1
c971b7fa 23317 else
63ce7108
TT
23318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
23319$as_echo_n "checking whether strstr works... " >&6; }
d0ac1c44 23320if ${gl_cv_func_strstr_works_always+:} false; then :
c971b7fa
PA
23321 $as_echo_n "(cached) " >&6
23322else
23323 if test "$cross_compiling" = yes; then :
63ce7108 23324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa
PA
23325/* end confdefs.h. */
23326
23327#ifdef __GNU_LIBRARY__
23328 #include <features.h>
63ce7108 23329 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
c971b7fa
PA
23330 || defined __UCLIBC__
23331 Lucky user
23332 #endif
23333#elif defined __CYGWIN__
23334 #include <cygwin/version.h>
23335 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
23336 Lucky user
23337 #endif
23338#else
23339 Lucky user
23340#endif
23341
23342_ACEOF
23343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23344 $EGREP "Lucky user" >/dev/null 2>&1; then :
63ce7108 23345 gl_cv_func_strstr_works_always="guessing yes"
c971b7fa 23346else
63ce7108 23347 gl_cv_func_strstr_works_always="guessing no"
c971b7fa
PA
23348fi
23349rm -f conftest*
23350
23351
23352else
23353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23354/* end confdefs.h. */
23355
63ce7108 23356#include <string.h> /* for strstr */
c971b7fa
PA
23357#define P "_EF_BF_BD"
23358#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
23359#define NEEDLE P P P P P
23360
23361int
23362main ()
23363{
63ce7108 23364return !!strstr (HAYSTACK, NEEDLE);
c971b7fa
PA
23365
23366 ;
23367 return 0;
23368}
23369_ACEOF
23370if ac_fn_c_try_run "$LINENO"; then :
63ce7108 23371 gl_cv_func_strstr_works_always=yes
c971b7fa 23372else
63ce7108 23373 gl_cv_func_strstr_works_always=no
c971b7fa
PA
23374fi
23375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23376 conftest.$ac_objext conftest.beam conftest.$ac_ext
23377fi
23378
23379
23380fi
63ce7108
TT
23381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
23382$as_echo "$gl_cv_func_strstr_works_always" >&6; }
23383 case "$gl_cv_func_strstr_works_always" in
40a73391
JK
23384 *yes) ;;
23385 *)
63ce7108 23386 REPLACE_STRSTR=1
40a73391
JK
23387 ;;
23388 esac
c971b7fa 23389 fi
8839a007 23390
63ce7108 23391 if test $REPLACE_STRSTR = 1; then
8839a007 23392
8690e634
JK
23393
23394
8690e634
JK
23395
23396
23397
23398
23399
63ce7108 23400 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
8690e634 23401
8690e634
JK
23402 fi
23403
8690e634
JK
23404
23405
8690e634 23406
8690e634 23407
63ce7108 23408 GNULIB_STRSTR=1
8690e634
JK
23409
23410
23411
8690e634
JK
23412
23413
63ce7108 23414$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
8690e634
JK
23415
23416
23417
23418
23419
23420
23421
421693b0
PA
23422 for ac_func in strtok_r
23423do :
23424 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
d0ac1c44 23425if test "x$ac_cv_func_strtok_r" = xyes; then :
421693b0
PA
23426 cat >>confdefs.h <<_ACEOF
23427#define HAVE_STRTOK_R 1
23428_ACEOF
23429
23430fi
23431done
23432
23433 if test $ac_cv_func_strtok_r = yes; then
23434 HAVE_STRTOK_R=1
23435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
23436$as_echo_n "checking whether strtok_r works... " >&6; }
d0ac1c44 23437if ${gl_cv_func_strtok_r_works+:} false; then :
421693b0
PA
23438 $as_echo_n "(cached) " >&6
23439else
23440 if test "$cross_compiling" = yes; then :
23441
23442 case "$host_os" in
23443 # Guess no on glibc systems.
23444 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
23445 *) gl_cv_func_strtok_r_works="guessing yes";;
23446 esac
23447
23448else
23449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23450/* end confdefs.h. */
23451
23452 #ifndef __OPTIMIZE__
23453 # define __OPTIMIZE__ 1
23454 #endif
23455 #undef __OPTIMIZE_SIZE__
23456 #undef __NO_INLINE__
23457 #include <stdlib.h>
23458 #include <string.h>
23459
23460int
23461main ()
23462{
23463static const char dummy[] = "\177\01a";
23464 char delimiters[] = "xxxxxxxx";
23465 char *save_ptr = (char *) dummy;
23466 strtok_r (delimiters, "x", &save_ptr);
23467 strtok_r (NULL, "x", &save_ptr);
23468 return 0;
23469
23470 ;
23471 return 0;
23472}
23473
23474_ACEOF
23475if ac_fn_c_try_run "$LINENO"; then :
23476 gl_cv_func_strtok_r_works=yes
23477else
23478 gl_cv_func_strtok_r_works=no
23479fi
23480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23481 conftest.$ac_objext conftest.beam conftest.$ac_ext
23482fi
23483
23484
23485fi
23486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
23487$as_echo "$gl_cv_func_strtok_r_works" >&6; }
23488 case "$gl_cv_func_strtok_r_works" in
23489 *no)
23490 UNDEFINE_STRTOK_R=1
23491 ;;
23492 esac
23493 else
23494 HAVE_STRTOK_R=0
23495 fi
23496
472fa5ee
SM
23497 :
23498
23499
23500
23501
23502
421693b0
PA
23503 if test $ac_cv_have_decl_strtok_r = no; then
23504 HAVE_DECL_STRTOK_R=0
23505 fi
23506
23507 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
23508
23509
23510
23511
23512
23513
23514
23515
23516 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
23517
23518
23519 :
23520
23521 fi
23522
23523
23524
23525
23526
23527 GNULIB_STRTOK_R=1
23528
23529
23530
23531
23532
23533$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
23534
23535
23536
23537
23538
23539
23540
8690e634
JK
23541
23542
23543
23544
23545
8690e634 23546
09607c9e 23547
472fa5ee
SM
23548 :
23549
23550
23551
23552
23553
09607c9e
TT
23554
23555
23556
23557 if test $gl_cv_have_include_next = yes; then
23558 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
23559 else
23560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
23561$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
d0ac1c44 23562if ${gl_cv_next_sys_stat_h+:} false; then :
09607c9e
TT
23563 $as_echo_n "(cached) " >&6
23564else
23565
23566 if test $ac_cv_header_sys_stat_h = yes; then
23567
23568
4a626d0a
PA
23569
23570
23571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
09607c9e
TT
23572/* end confdefs.h. */
23573#include <sys/stat.h>
09607c9e 23574_ACEOF
4a626d0a
PA
23575 case "$host_os" in
23576 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23577 *) gl_absname_cpp="$ac_cpp" ;;
23578 esac
23579
23580 case "$host_os" in
23581 mingw*)
23582 gl_dirsep_regex='[/\\]'
23583 ;;
23584 *)
23585 gl_dirsep_regex='\/'
23586 ;;
23587 esac
23588 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23589 gl_header_literal_regex=`echo 'sys/stat.h' \
23590 | sed -e "$gl_make_literal_regex_sed"`
23591 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23592 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23593 s|^/[^/]|//&|
23594 p
23595 q
23596 }'
23597
23598 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23599 sed -n "$gl_absolute_header_sed"`
23600
23601 gl_header=$gl_cv_absolute_sys_stat_h
23602 gl_cv_next_sys_stat_h='"'$gl_header'"'
09607c9e
TT
23603 else
23604 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
23605 fi
23606
23607
23608fi
23609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
23610$as_echo "$gl_cv_next_sys_stat_h" >&6; }
23611 fi
23612 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
23613
23614 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23615 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23616 gl_next_as_first_directive='<'sys/stat.h'>'
23617 else
23618 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23619 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
23620 fi
23621 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
23622
23623
23624
23625
23626
23627
23628
23629
2196f55f 23630
09607c9e
TT
23631
23632
23633 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
23634
23635$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
23636
23637 fi
23638
23639 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
23640 #include <sys/stat.h>
23641"
d0ac1c44 23642if test "x$ac_cv_type_nlink_t" = xyes; then :
09607c9e
TT
23643
23644else
23645
23646$as_echo "#define nlink_t int" >>confdefs.h
23647
23648fi
23649
23650
23651
23652 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
23653 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23655$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
d0ac1c44 23656if eval \${$as_gl_Symbol+:} false; then :
09607c9e
TT
23657 $as_echo_n "(cached) " >&6
23658else
23659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23660/* end confdefs.h. */
23661#include <sys/stat.h>
23662
23663int
23664main ()
23665{
23666#undef $gl_func
23667 (void) $gl_func;
23668 ;
23669 return 0;
23670}
23671_ACEOF
23672if ac_fn_c_try_compile "$LINENO"; then :
23673 eval "$as_gl_Symbol=yes"
23674else
23675 eval "$as_gl_Symbol=no"
23676fi
23677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23678fi
23679eval ac_res=\$$as_gl_Symbol
23680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23681$as_echo "$ac_res" >&6; }
d0ac1c44 23682 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
09607c9e
TT
23683 cat >>confdefs.h <<_ACEOF
23684#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23685_ACEOF
23686
23687 eval ac_cv_have_decl_$gl_func=yes
23688fi
23689 done
23690
23691
23692
23693
23694
23695
23696
23697
23698
23699
23700
2d8adcbd
MM
23701 :
23702
23703
23704
23705
09607c9e
TT
23706
23707
23708
8839a007
PA
23709
23710
23711
23712
09607c9e
TT
23713
23714
8839a007 23715
472fa5ee
SM
23716 :
23717
23718
23719
23720
23721
8839a007
PA
23722
23723
23724
23725 if test $gl_cv_have_include_next = yes; then
23726 gl_cv_next_unistd_h='<'unistd.h'>'
23727 else
23728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
23729$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
d0ac1c44 23730if ${gl_cv_next_unistd_h+:} false; then :
8839a007
PA
23731 $as_echo_n "(cached) " >&6
23732else
23733
23734 if test $ac_cv_header_unistd_h = yes; then
23735
23736
4a626d0a
PA
23737
23738
23739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8839a007
PA
23740/* end confdefs.h. */
23741#include <unistd.h>
8839a007 23742_ACEOF
4a626d0a
PA
23743 case "$host_os" in
23744 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23745 *) gl_absname_cpp="$ac_cpp" ;;
23746 esac
23747
23748 case "$host_os" in
23749 mingw*)
23750 gl_dirsep_regex='[/\\]'
23751 ;;
23752 *)
23753 gl_dirsep_regex='\/'
23754 ;;
23755 esac
23756 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23757 gl_header_literal_regex=`echo 'unistd.h' \
23758 | sed -e "$gl_make_literal_regex_sed"`
23759 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23760 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23761 s|^/[^/]|//&|
23762 p
23763 q
23764 }'
23765
23766 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23767 sed -n "$gl_absolute_header_sed"`
23768
23769 gl_header=$gl_cv_absolute_unistd_h
23770 gl_cv_next_unistd_h='"'$gl_header'"'
8839a007
PA
23771 else
23772 gl_cv_next_unistd_h='<'unistd.h'>'
23773 fi
23774
23775
23776fi
23777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
23778$as_echo "$gl_cv_next_unistd_h" >&6; }
23779 fi
23780 NEXT_UNISTD_H=$gl_cv_next_unistd_h
23781
23782 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23783 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23784 gl_next_as_first_directive='<'unistd.h'>'
23785 else
23786 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23787 gl_next_as_first_directive=$gl_cv_next_unistd_h
23788 fi
23789 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
23790
23791
23792
23793
23794 if test $ac_cv_header_unistd_h = yes; then
23795 HAVE_UNISTD_H=1
23796 else
23797 HAVE_UNISTD_H=0
23798 fi
23799
23800
23801
23802
23803
23804
23805
23806 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
23807 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
23808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
23809$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
d0ac1c44 23810if eval \${$as_gl_Symbol+:} false; then :
8839a007
PA
23811 $as_echo_n "(cached) " >&6
23812else
23813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23814/* end confdefs.h. */
23815
23816#if HAVE_UNISTD_H
23817# include <unistd.h>
23818#endif
23819/* Some systems declare various items in the wrong headers. */
23820#if !(defined __GLIBC__ && !defined __UCLIBC__)
23821# include <fcntl.h>
23822# include <stdio.h>
23823# include <stdlib.h>
23824# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
23825# include <io.h>
23826# endif
23827#endif
23828
23829int
23830main ()
23831{
23832#undef $gl_func
23833 (void) $gl_func;
23834 ;
23835 return 0;
23836}
23837_ACEOF
23838if ac_fn_c_try_compile "$LINENO"; then :
23839 eval "$as_gl_Symbol=yes"
23840else
23841 eval "$as_gl_Symbol=no"
23842fi
23843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23844fi
23845eval ac_res=\$$as_gl_Symbol
23846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23847$as_echo "$ac_res" >&6; }
d0ac1c44 23848 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
8839a007
PA
23849 cat >>confdefs.h <<_ACEOF
23850#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
23851_ACEOF
23852
23853 eval ac_cv_have_decl_$gl_func=yes
23854fi
23855 done
23856
23857
23858
23859
472fa5ee
SM
23860 :
23861
23862
23863
23864
23865
23866
23867
23868
23869
23870 :
23871
8839a007 23872
6ec2e0f5
SDJ
23873
23874
23875
3d99e817
AK
23876 if test $ac_cv_have_decl_unsetenv = no; then
23877 HAVE_DECL_UNSETENV=0
23878 fi
23879 for ac_func in unsetenv
23880do :
23881 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
d0ac1c44 23882if test "x$ac_cv_func_unsetenv" = xyes; then :
3d99e817
AK
23883 cat >>confdefs.h <<_ACEOF
23884#define HAVE_UNSETENV 1
23885_ACEOF
23886
23887fi
23888done
23889
23890 if test $ac_cv_func_unsetenv = no; then
23891 HAVE_UNSETENV=0
23892 else
23893 HAVE_UNSETENV=1
23894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
23895$as_echo_n "checking for unsetenv() return type... " >&6; }
d0ac1c44 23896if ${gt_cv_func_unsetenv_ret+:} false; then :
3d99e817
AK
23897 $as_echo_n "(cached) " >&6
23898else
23899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23900/* end confdefs.h. */
23901
23902#undef _BSD
23903#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
23904#include <stdlib.h>
23905extern
23906#ifdef __cplusplus
23907"C"
23908#endif
23909int unsetenv (const char *name);
23910
23911int
23912main ()
23913{
23914
23915 ;
23916 return 0;
23917}
23918_ACEOF
23919if ac_fn_c_try_compile "$LINENO"; then :
23920 gt_cv_func_unsetenv_ret='int'
23921else
23922 gt_cv_func_unsetenv_ret='void'
23923fi
23924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23925fi
23926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
23927$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
23928 if test $gt_cv_func_unsetenv_ret = 'void'; then
23929
23930$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
23931
23932 REPLACE_UNSETENV=1
23933 fi
23934
23935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
23936$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
d0ac1c44 23937if ${gl_cv_func_unsetenv_works+:} false; then :
3d99e817
AK
23938 $as_echo_n "(cached) " >&6
23939else
23940 if test "$cross_compiling" = yes; then :
23941 case "$host_os" in
23942 # Guess yes on glibc systems.
23943 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
23944 # If we don't know, assume the worst.
23945 *) gl_cv_func_unsetenv_works="guessing no" ;;
23946 esac
23947
23948else
23949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23950/* end confdefs.h. */
23951
23952 #include <stdlib.h>
23953 #include <errno.h>
23954 extern char **environ;
23955
23956int
23957main ()
23958{
23959
23960 char entry1[] = "a=1";
23961 char entry2[] = "b=2";
23962 char *env[] = { entry1, entry2, NULL };
23963 if (putenv ((char *) "a=1")) return 1;
23964 if (putenv (entry2)) return 2;
23965 entry2[0] = 'a';
23966 unsetenv ("a");
23967 if (getenv ("a")) return 3;
23968 if (!unsetenv ("") || errno != EINVAL) return 4;
23969 entry2[0] = 'b';
23970 environ = env;
23971 if (!getenv ("a")) return 5;
23972 entry2[0] = 'a';
23973 unsetenv ("a");
23974 if (getenv ("a")) return 6;
23975
23976 ;
23977 return 0;
23978}
23979_ACEOF
23980if ac_fn_c_try_run "$LINENO"; then :
23981 gl_cv_func_unsetenv_works=yes
23982else
23983 gl_cv_func_unsetenv_works=no
23984fi
23985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23986 conftest.$ac_objext conftest.beam conftest.$ac_ext
23987fi
23988
23989fi
23990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
23991$as_echo "$gl_cv_func_unsetenv_works" >&6; }
23992 case "$gl_cv_func_unsetenv_works" in
23993 *yes) ;;
23994 *)
23995 REPLACE_UNSETENV=1
23996 ;;
23997 esac
23998 fi
23999
24000 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
24001
24002
24003
24004
24005
24006
24007
24008
24009 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
24010
24011
24012
24013
472fa5ee
SM
24014 :
24015
24016
24017
24018
24019
3d99e817
AK
24020
24021 fi
24022
24023
24024
24025
24026
24027 GNULIB_UNSETENV=1
24028
24029
24030
24031
24032
24033$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
24034
24035
24036
24037
24038
24039
8839a007
PA
24040
24041
24042
24043
24044
24045
472fa5ee
SM
24046 :
24047
24048
24049
24050
24051
8839a007 24052
8690e634
JK
24053
24054
24055 if test $gl_cv_have_include_next = yes; then
24056 gl_cv_next_wchar_h='<'wchar.h'>'
24057 else
24058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
24059$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
d0ac1c44 24060if ${gl_cv_next_wchar_h+:} false; then :
8690e634
JK
24061 $as_echo_n "(cached) " >&6
24062else
24063
24064 if test $ac_cv_header_wchar_h = yes; then
24065
24066
4a626d0a
PA
24067
24068
24069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8690e634
JK
24070/* end confdefs.h. */
24071#include <wchar.h>
8690e634 24072_ACEOF
4a626d0a
PA
24073 case "$host_os" in
24074 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24075 *) gl_absname_cpp="$ac_cpp" ;;
24076 esac
24077
24078 case "$host_os" in
24079 mingw*)
24080 gl_dirsep_regex='[/\\]'
24081 ;;
24082 *)
24083 gl_dirsep_regex='\/'
24084 ;;
24085 esac
24086 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24087 gl_header_literal_regex=`echo 'wchar.h' \
24088 | sed -e "$gl_make_literal_regex_sed"`
24089 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24090 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24091 s|^/[^/]|//&|
24092 p
24093 q
24094 }'
24095
24096 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24097 sed -n "$gl_absolute_header_sed"`
24098
24099 gl_header=$gl_cv_absolute_wchar_h
24100 gl_cv_next_wchar_h='"'$gl_header'"'
8690e634
JK
24101 else
24102 gl_cv_next_wchar_h='<'wchar.h'>'
24103 fi
24104
24105
24106fi
24107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
24108$as_echo "$gl_cv_next_wchar_h" >&6; }
24109 fi
24110 NEXT_WCHAR_H=$gl_cv_next_wchar_h
24111
24112 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24113 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24114 gl_next_as_first_directive='<'wchar.h'>'
24115 else
24116 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24117 gl_next_as_first_directive=$gl_cv_next_wchar_h
24118 fi
24119 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
24120
24121
24122
24123
24124 if test $ac_cv_header_wchar_h = yes; then
24125 HAVE_WCHAR_H=1
24126 else
24127 HAVE_WCHAR_H=0
24128 fi
24129
c971b7fa
PA
24130
24131
24132
24133
8690e634
JK
24134 if test $gt_cv_c_wint_t = yes; then
24135 HAVE_WINT_T=1
24136 else
24137 HAVE_WINT_T=0
24138 fi
c971b7fa
PA
24139
24140
24141
8690e634
JK
24142 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
24143 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24145$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
d0ac1c44 24146if eval \${$as_gl_Symbol+:} false; then :
c971b7fa
PA
24147 $as_echo_n "(cached) " >&6
24148else
24149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24150/* end confdefs.h. */
8690e634
JK
24151
24152/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24153 <wchar.h>.
24154 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24155 included before <wchar.h>. */
24156#if !(defined __GLIBC__ && !defined __UCLIBC__)
24157# include <stddef.h>
24158# include <stdio.h>
24159# include <time.h>
24160#endif
24161#include <wchar.h>
c971b7fa
PA
24162
24163int
24164main ()
24165{
8690e634
JK
24166#undef $gl_func
24167 (void) $gl_func;
c971b7fa
PA
24168 ;
24169 return 0;
24170}
24171_ACEOF
24172if ac_fn_c_try_compile "$LINENO"; then :
8690e634 24173 eval "$as_gl_Symbol=yes"
c971b7fa 24174else
8690e634 24175 eval "$as_gl_Symbol=no"
c971b7fa
PA
24176fi
24177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24178fi
8690e634
JK
24179eval ac_res=\$$as_gl_Symbol
24180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24181$as_echo "$ac_res" >&6; }
d0ac1c44 24182 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
8690e634
JK
24183 cat >>confdefs.h <<_ACEOF
24184#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24185_ACEOF
c971b7fa 24186
8690e634 24187 eval ac_cv_have_decl_$gl_func=yes
c971b7fa 24188fi
8690e634
JK
24189 done
24190
24191
24192
24193
24194
24195
24196
472fa5ee
SM
24197 :
24198
24199
24200
24201
24202
8690e634
JK
24203 if test $ac_cv_func_iswcntrl = yes; then
24204 HAVE_ISWCNTRL=1
24205 else
24206 HAVE_ISWCNTRL=0
24207 fi
24208
24209
24210
8690e634
JK
24211 if test $gt_cv_c_wint_t = yes; then
24212 HAVE_WINT_T=1
24213 else
24214 HAVE_WINT_T=0
24215 fi
24216
24217
24218
24219
24220
24221
c971b7fa 24222
8690e634 24223
472fa5ee
SM
24224 :
24225
24226
24227
24228
24229
c971b7fa
PA
24230
24231
24232
24233 if test $gl_cv_have_include_next = yes; then
8690e634 24234 gl_cv_next_wctype_h='<'wctype.h'>'
c971b7fa 24235 else
8690e634
JK
24236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
24237$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
d0ac1c44 24238if ${gl_cv_next_wctype_h+:} false; then :
c971b7fa
PA
24239 $as_echo_n "(cached) " >&6
24240else
24241
8690e634
JK
24242 if test $ac_cv_header_wctype_h = yes; then
24243
24244
4a626d0a
PA
24245
24246
24247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c971b7fa 24248/* end confdefs.h. */
8690e634 24249#include <wctype.h>
c971b7fa 24250_ACEOF
4a626d0a
PA
24251 case "$host_os" in
24252 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24253 *) gl_absname_cpp="$ac_cpp" ;;
24254 esac
24255
24256 case "$host_os" in
24257 mingw*)
24258 gl_dirsep_regex='[/\\]'
24259 ;;
24260 *)
24261 gl_dirsep_regex='\/'
24262 ;;
24263 esac
24264 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24265 gl_header_literal_regex=`echo 'wctype.h' \
24266 | sed -e "$gl_make_literal_regex_sed"`
24267 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24268 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24269 s|^/[^/]|//&|
24270 p
24271 q
24272 }'
24273
24274 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24275 sed -n "$gl_absolute_header_sed"`
24276
24277 gl_header=$gl_cv_absolute_wctype_h
24278 gl_cv_next_wctype_h='"'$gl_header'"'
8690e634
JK
24279 else
24280 gl_cv_next_wctype_h='<'wctype.h'>'
24281 fi
c971b7fa
PA
24282
24283
24284fi
8690e634
JK
24285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
24286$as_echo "$gl_cv_next_wctype_h" >&6; }
c971b7fa 24287 fi
8690e634 24288 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
c971b7fa
PA
24289
24290 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24291 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8690e634 24292 gl_next_as_first_directive='<'wctype.h'>'
c971b7fa
PA
24293 else
24294 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8690e634 24295 gl_next_as_first_directive=$gl_cv_next_wctype_h
c971b7fa 24296 fi
8690e634
JK
24297 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
24298
24299
24300
24301
24302 if test $ac_cv_header_wctype_h = yes; then
24303 if test $ac_cv_func_iswcntrl = yes; then
24304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
24305$as_echo_n "checking whether iswcntrl works... " >&6; }
d0ac1c44 24306if ${gl_cv_func_iswcntrl_works+:} false; then :
8690e634
JK
24307 $as_echo_n "(cached) " >&6
24308else
24309
24310 if test "$cross_compiling" = yes; then :
24311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24312/* end confdefs.h. */
24313#include <stdlib.h>
24314 #if __GNU_LIBRARY__ == 1
24315 Linux libc5 i18n is broken.
24316 #endif
24317int
24318main ()
24319{
24320
24321 ;
24322 return 0;
24323}
24324_ACEOF
24325if ac_fn_c_try_compile "$LINENO"; then :
24326 gl_cv_func_iswcntrl_works="guessing yes"
24327else
24328 gl_cv_func_iswcntrl_works="guessing no"
24329fi
24330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24331
24332else
24333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24334/* end confdefs.h. */
24335
24336 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
24337 included before <wchar.h>.
24338 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
24339 must be included before <wchar.h>. */
24340 #include <stddef.h>
24341 #include <stdio.h>
24342 #include <time.h>
24343 #include <wchar.h>
24344 #include <wctype.h>
24345 int main () { return iswprint ('x') == 0; }
24346
24347_ACEOF
24348if ac_fn_c_try_run "$LINENO"; then :
24349 gl_cv_func_iswcntrl_works=yes
24350else
24351 gl_cv_func_iswcntrl_works=no
24352fi
24353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24354 conftest.$ac_objext conftest.beam conftest.$ac_ext
24355fi
24356
24357
24358fi
24359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
24360$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
24361 fi
24362 HAVE_WCTYPE_H=1
24363 else
24364 HAVE_WCTYPE_H=0
24365 fi
24366
24367
24368 case "$gl_cv_func_iswcntrl_works" in
24369 *yes) REPLACE_ISWCNTRL=0 ;;
24370 *) REPLACE_ISWCNTRL=1 ;;
24371 esac
24372
24373
24374 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
24375 :
24376 fi
24377
24378 if test $REPLACE_ISWCNTRL = 1; then
24379 REPLACE_TOWLOWER=1
24380 else
24381 for ac_func in towlower
24382do :
24383 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
d0ac1c44 24384if test "x$ac_cv_func_towlower" = xyes; then :
8690e634
JK
24385 cat >>confdefs.h <<_ACEOF
24386#define HAVE_TOWLOWER 1
24387_ACEOF
24388
24389fi
24390done
24391
24392 if test $ac_cv_func_towlower = yes; then
24393 REPLACE_TOWLOWER=0
24394 else
24395 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
24396 included before <wchar.h>.
24397 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
24398 must be included before <wchar.h>. */
24399 #include <stddef.h>
24400 #include <stdio.h>
24401 #include <time.h>
24402 #include <wchar.h>
24403 #if HAVE_WCTYPE_H
24404 # include <wctype.h>
24405 #endif
24406
24407"
d0ac1c44 24408if test "x$ac_cv_have_decl_towlower" = xyes; then :
8690e634
JK
24409 ac_have_decl=1
24410else
24411 ac_have_decl=0
24412fi
24413
24414cat >>confdefs.h <<_ACEOF
24415#define HAVE_DECL_TOWLOWER $ac_have_decl
24416_ACEOF
24417
24418 if test $ac_cv_have_decl_towlower = yes; then
24419 REPLACE_TOWLOWER=1
24420 else
24421 REPLACE_TOWLOWER=0
24422 fi
24423 fi
24424 fi
24425
24426
24427 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
24428 :
24429 fi
24430
24431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
24432$as_echo_n "checking for wctype_t... " >&6; }
d0ac1c44 24433if ${gl_cv_type_wctype_t+:} false; then :
8690e634
JK
24434 $as_echo_n "(cached) " >&6
24435else
24436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24437/* end confdefs.h. */
24438/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
24439 included before <wchar.h>.
24440 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
24441 must be included before <wchar.h>. */
24442 #include <stddef.h>
24443 #include <stdio.h>
24444 #include <time.h>
24445 #include <wchar.h>
24446 #if HAVE_WCTYPE_H
24447 # include <wctype.h>
24448 #endif
24449 wctype_t a;
24450
24451int
24452main ()
24453{
24454
24455 ;
24456 return 0;
24457}
24458_ACEOF
24459if ac_fn_c_try_compile "$LINENO"; then :
24460 gl_cv_type_wctype_t=yes
24461else
24462 gl_cv_type_wctype_t=no
24463fi
24464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 24465
8690e634
JK
24466fi
24467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
24468$as_echo "$gl_cv_type_wctype_t" >&6; }
24469 if test $gl_cv_type_wctype_t = no; then
24470 HAVE_WCTYPE_T=0
24471 fi
24472
24473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
24474$as_echo_n "checking for wctrans_t... " >&6; }
d0ac1c44 24475if ${gl_cv_type_wctrans_t+:} false; then :
8690e634
JK
24476 $as_echo_n "(cached) " >&6
24477else
24478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24479/* end confdefs.h. */
24480/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
24481 included before <wchar.h>.
24482 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
24483 must be included before <wchar.h>. */
24484 #include <stddef.h>
24485 #include <stdio.h>
24486 #include <time.h>
24487 #include <wchar.h>
24488 #include <wctype.h>
24489 wctrans_t a;
c971b7fa 24490
8690e634
JK
24491int
24492main ()
24493{
c971b7fa 24494
8690e634
JK
24495 ;
24496 return 0;
24497}
24498_ACEOF
24499if ac_fn_c_try_compile "$LINENO"; then :
24500 gl_cv_type_wctrans_t=yes
24501else
24502 gl_cv_type_wctrans_t=no
24503fi
24504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c971b7fa 24505
8690e634
JK
24506fi
24507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
24508$as_echo "$gl_cv_type_wctrans_t" >&6; }
24509 if test $gl_cv_type_wctrans_t = no; then
24510 HAVE_WCTRANS_T=0
c971b7fa
PA
24511 fi
24512
24513
8690e634
JK
24514 for gl_func in wctype iswctype wctrans towctrans ; do
24515 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24517$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
d0ac1c44 24518if eval \${$as_gl_Symbol+:} false; then :
8690e634
JK
24519 $as_echo_n "(cached) " >&6
24520else
24521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24522/* end confdefs.h. */
24523
24524/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24525 <wchar.h>.
24526 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24527 included before <wchar.h>. */
24528#if !(defined __GLIBC__ && !defined __UCLIBC__)
24529# include <stddef.h>
24530# include <stdio.h>
24531# include <time.h>
24532# include <wchar.h>
24533#endif
24534#include <wctype.h>
24535
24536int
24537main ()
24538{
24539#undef $gl_func
24540 (void) $gl_func;
24541 ;
24542 return 0;
24543}
24544_ACEOF
24545if ac_fn_c_try_compile "$LINENO"; then :
24546 eval "$as_gl_Symbol=yes"
24547else
24548 eval "$as_gl_Symbol=no"
24549fi
24550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24551fi
24552eval ac_res=\$$as_gl_Symbol
24553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24554$as_echo "$ac_res" >&6; }
d0ac1c44 24555 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
8690e634
JK
24556 cat >>confdefs.h <<_ACEOF
24557#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24558_ACEOF
c971b7fa 24559
8690e634
JK
24560 eval ac_cv_have_decl_$gl_func=yes
24561fi
24562 done
c971b7fa
PA
24563
24564
24565 # End of code from modules
24566
24567
24568
24569
24570
24571
24572
24573
24574
24575 gltests_libdeps=
24576 gltests_ltlibdeps=
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586 gl_source_base='tests'
24587 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
24588
24589 gl_module_indicator_condition=$gltests_WITNESS
24590
24591
24592
24593
24594
24595
24596
24597
24598
24599 LIBGNU_LIBDEPS="$gl_libdeps"
24600
24601 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
24602
24603
24604
24605# We don't use automake, but gnulib does. This line lets us generate
24606# its Makefile.in.
d0ac1c44 24607am__api_version='1.15'
c971b7fa
PA
24608
24609# Find a good install program. We prefer a C program (faster),
24610# so one script is as good as another. But avoid the broken or
24611# incompatible versions:
24612# SysV /etc/install, /usr/sbin/install
24613# SunOS /usr/etc/install
24614# IRIX /sbin/install
24615# AIX /bin/install
24616# AmigaOS /C/install, which installs bootblocks on floppy discs
24617# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
24618# AFS /usr/afsws/bin/install, which mishandles nonexistent args
24619# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
24620# OS/2's system install, which has a completely different semantic
24621# ./install, which can be erroneously created by make from ./install.sh.
24622# Reject install programs that cannot install multiple files.
24623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
24624$as_echo_n "checking for a BSD-compatible install... " >&6; }
24625if test -z "$INSTALL"; then
d0ac1c44 24626if ${ac_cv_path_install+:} false; then :
c971b7fa
PA
24627 $as_echo_n "(cached) " >&6
24628else
24629 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24630for as_dir in $PATH
24631do
24632 IFS=$as_save_IFS
24633 test -z "$as_dir" && as_dir=.
24634 # Account for people who put trailing slashes in PATH elements.
24635case $as_dir/ in #((
24636 ./ | .// | /[cC]/* | \
24637 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
24638 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
24639 /usr/ucb/* ) ;;
24640 *)
24641 # OSF1 and SCO ODT 3.0 have their own names for install.
24642 # Don't use installbsd from OSF since it installs stuff as root
24643 # by default.
24644 for ac_prog in ginstall scoinst install; do
24645 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 24646 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
c971b7fa
PA
24647 if test $ac_prog = install &&
24648 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
24649 # AIX install. It has an incompatible calling convention.
24650 :
24651 elif test $ac_prog = install &&
24652 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
24653 # program-specific install script used by HP pwplus--don't use.
24654 :
24655 else
24656 rm -rf conftest.one conftest.two conftest.dir
24657 echo one > conftest.one
24658 echo two > conftest.two
24659 mkdir conftest.dir
24660 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
24661 test -s conftest.one && test -s conftest.two &&
24662 test -s conftest.dir/conftest.one &&
24663 test -s conftest.dir/conftest.two
24664 then
24665 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
24666 break 3
24667 fi
24668 fi
24669 fi
24670 done
24671 done
24672 ;;
24673esac
24674
24675 done
24676IFS=$as_save_IFS
24677
24678rm -rf conftest.one conftest.two conftest.dir
24679
24680fi
24681 if test "${ac_cv_path_install+set}" = set; then
24682 INSTALL=$ac_cv_path_install
24683 else
24684 # As a last resort, use the slow shell script. Don't cache a
24685 # value for INSTALL within a source directory, because that will
24686 # break other packages using the cache if that directory is
24687 # removed, or if the value is a relative name.
24688 INSTALL=$ac_install_sh
24689 fi
24690fi
24691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
24692$as_echo "$INSTALL" >&6; }
24693
24694# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
24695# It thinks the first close brace ends the variable substitution.
24696test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
24697
24698test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
24699
24700test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
24701
24702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
24703$as_echo_n "checking whether build environment is sane... " >&6; }
c971b7fa
PA
24704# Reject unsafe characters in $srcdir or the absolute working directory
24705# name. Accept space and tab only in the latter.
24706am_lf='
24707'
24708case `pwd` in
24709 *[\\\"\#\$\&\'\`$am_lf]*)
d0ac1c44 24710 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
c971b7fa
PA
24711esac
24712case $srcdir in
24713 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
d0ac1c44 24714 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
c971b7fa
PA
24715esac
24716
d0ac1c44 24717# Do 'set' in a subshell so we don't clobber the current shell's
c971b7fa
PA
24718# arguments. Must try -L first in case configure is actually a
24719# symlink; some systems play weird games with the mod time of symlinks
24720# (eg FreeBSD returns the mod time of the symlink's containing
24721# directory).
24722if (
d0ac1c44
SM
24723 am_has_slept=no
24724 for am_try in 1 2; do
24725 echo "timestamp, slept: $am_has_slept" > conftest.file
24726 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
24727 if test "$*" = "X"; then
24728 # -L didn't work.
24729 set X `ls -t "$srcdir/configure" conftest.file`
24730 fi
24731 if test "$*" != "X $srcdir/configure conftest.file" \
24732 && test "$*" != "X conftest.file $srcdir/configure"; then
24733
24734 # If neither matched, then we have a broken ls. This can happen
24735 # if, for instance, CONFIG_SHELL is bash and it inherits a
24736 # broken ls alias from the environment. This has actually
24737 # happened. Such a system could not be considered "sane".
24738 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
24739 alias in your environment" "$LINENO" 5
24740 fi
24741 if test "$2" = conftest.file || test $am_try -eq 2; then
24742 break
24743 fi
24744 # Just in case.
24745 sleep 1
24746 am_has_slept=yes
24747 done
c971b7fa
PA
24748 test "$2" = conftest.file
24749 )
24750then
24751 # Ok.
24752 :
24753else
d0ac1c44 24754 as_fn_error $? "newly created file is older than distributed files!
c971b7fa
PA
24755Check your system clock" "$LINENO" 5
24756fi
24757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24758$as_echo "yes" >&6; }
d0ac1c44
SM
24759# If we didn't sleep, we still need to ensure time stamps of config.status and
24760# generated files are strictly newer.
24761am_sleep_pid=
24762if grep 'slept: no' conftest.file >/dev/null 2>&1; then
24763 ( sleep 1 ) &
24764 am_sleep_pid=$!
24765fi
24766
24767rm -f conftest.file
24768
c971b7fa
PA
24769test "$program_prefix" != NONE &&
24770 program_transform_name="s&^&$program_prefix&;$program_transform_name"
24771# Use a double $ so make ignores it.
24772test "$program_suffix" != NONE &&
24773 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
24774# Double any \ or $.
24775# By default was `s,x,x', remove it if useless.
24776ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
24777program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
24778
c971b7fa
PA
24779if test x"${MISSING+set}" != xset; then
24780 case $am_aux_dir in
24781 *\ * | *\ *)
24782 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
24783 *)
24784 MISSING="\${SHELL} $am_aux_dir/missing" ;;
24785 esac
24786fi
24787# Use eval to expand $SHELL
d0ac1c44
SM
24788if eval "$MISSING --is-lightweight"; then
24789 am_missing_run="$MISSING "
c971b7fa
PA
24790else
24791 am_missing_run=
d0ac1c44
SM
24792 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
24793$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
c971b7fa
PA
24794fi
24795
d0ac1c44 24796if test x"${install_sh+set}" != xset; then
c971b7fa
PA
24797 case $am_aux_dir in
24798 *\ * | *\ *)
24799 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
24800 *)
24801 install_sh="\${SHELL} $am_aux_dir/install-sh"
24802 esac
24803fi
24804
d0ac1c44
SM
24805# Installed binaries are usually stripped using 'strip' when the user
24806# run "make install-strip". However 'strip' might not be the right
c971b7fa 24807# tool to use in cross-compilation environments, therefore Automake
d0ac1c44 24808# will honor the 'STRIP' environment variable to overrule this program.
c971b7fa
PA
24809if test "$cross_compiling" != no; then
24810 if test -n "$ac_tool_prefix"; then
24811 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
24812set dummy ${ac_tool_prefix}strip; ac_word=$2
24813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24814$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 24815if ${ac_cv_prog_STRIP+:} false; then :
c971b7fa
PA
24816 $as_echo_n "(cached) " >&6
24817else
24818 if test -n "$STRIP"; then
24819 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
24820else
24821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24822for as_dir in $PATH
24823do
24824 IFS=$as_save_IFS
24825 test -z "$as_dir" && as_dir=.
24826 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 24827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
24828 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
24829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24830 break 2
24831 fi
24832done
24833 done
24834IFS=$as_save_IFS
24835
24836fi
24837fi
24838STRIP=$ac_cv_prog_STRIP
24839if test -n "$STRIP"; then
24840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24841$as_echo "$STRIP" >&6; }
24842else
24843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24844$as_echo "no" >&6; }
24845fi
24846
24847
24848fi
24849if test -z "$ac_cv_prog_STRIP"; then
24850 ac_ct_STRIP=$STRIP
24851 # Extract the first word of "strip", so it can be a program name with args.
24852set dummy strip; ac_word=$2
24853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24854$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 24855if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
c971b7fa
PA
24856 $as_echo_n "(cached) " >&6
24857else
24858 if test -n "$ac_ct_STRIP"; then
24859 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
24860else
24861as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24862for as_dir in $PATH
24863do
24864 IFS=$as_save_IFS
24865 test -z "$as_dir" && as_dir=.
24866 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 24867 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
24868 ac_cv_prog_ac_ct_STRIP="strip"
24869 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24870 break 2
24871 fi
24872done
24873 done
24874IFS=$as_save_IFS
24875
24876fi
24877fi
24878ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
24879if test -n "$ac_ct_STRIP"; then
24880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
24881$as_echo "$ac_ct_STRIP" >&6; }
24882else
24883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24884$as_echo "no" >&6; }
24885fi
24886
24887 if test "x$ac_ct_STRIP" = x; then
24888 STRIP=":"
24889 else
24890 case $cross_compiling:$ac_tool_warned in
24891yes:)
24892{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24893$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24894ac_tool_warned=yes ;;
24895esac
24896 STRIP=$ac_ct_STRIP
24897 fi
24898else
24899 STRIP="$ac_cv_prog_STRIP"
24900fi
24901
24902fi
24903INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
24904
c971b7fa
PA
24905for ac_prog in gawk mawk nawk awk
24906do
24907 # Extract the first word of "$ac_prog", so it can be a program name with args.
24908set dummy $ac_prog; ac_word=$2
24909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24910$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 24911if ${ac_cv_prog_AWK+:} false; then :
c971b7fa
PA
24912 $as_echo_n "(cached) " >&6
24913else
24914 if test -n "$AWK"; then
24915 ac_cv_prog_AWK="$AWK" # Let the user override the test.
24916else
24917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24918for as_dir in $PATH
24919do
24920 IFS=$as_save_IFS
24921 test -z "$as_dir" && as_dir=.
24922 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 24923 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
24924 ac_cv_prog_AWK="$ac_prog"
24925 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24926 break 2
24927 fi
24928done
24929 done
24930IFS=$as_save_IFS
24931
24932fi
24933fi
24934AWK=$ac_cv_prog_AWK
24935if test -n "$AWK"; then
24936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
24937$as_echo "$AWK" >&6; }
24938else
24939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24940$as_echo "no" >&6; }
24941fi
24942
24943
24944 test -n "$AWK" && break
24945done
24946
24947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
24948$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
24949set x ${MAKE-make}
24950ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
d0ac1c44 24951if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
c971b7fa
PA
24952 $as_echo_n "(cached) " >&6
24953else
24954 cat >conftest.make <<\_ACEOF
24955SHELL = /bin/sh
24956all:
24957 @echo '@@@%%%=$(MAKE)=@@@%%%'
24958_ACEOF
d0ac1c44 24959# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
c971b7fa
PA
24960case `${MAKE-make} -f conftest.make 2>/dev/null` in
24961 *@@@%%%=?*=@@@%%%*)
24962 eval ac_cv_prog_make_${ac_make}_set=yes;;
24963 *)
24964 eval ac_cv_prog_make_${ac_make}_set=no;;
24965esac
24966rm -f conftest.make
24967fi
24968if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
24969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24970$as_echo "yes" >&6; }
24971 SET_MAKE=
24972else
24973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24974$as_echo "no" >&6; }
24975 SET_MAKE="MAKE=${MAKE-make}"
24976fi
24977
24978rm -rf .tst 2>/dev/null
24979mkdir .tst 2>/dev/null
24980if test -d .tst; then
24981 am__leading_dot=.
24982else
24983 am__leading_dot=_
24984fi
24985rmdir .tst 2>/dev/null
24986
24987DEPDIR="${am__leading_dot}deps"
24988
24989ac_config_commands="$ac_config_commands depfiles"
24990
24991
24992am_make=${MAKE-make}
24993cat > confinc << 'END'
24994am__doit:
24995 @echo this is the am__doit target
24996.PHONY: am__doit
24997END
24998# If we don't find an include directive, just comment out the code.
24999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
25000$as_echo_n "checking for style of include used by $am_make... " >&6; }
25001am__include="#"
25002am__quote=
25003_am_result=none
25004# First try GNU make style include.
25005echo "include confinc" > confmf
d0ac1c44 25006# Ignore all kinds of additional output from 'make'.
c971b7fa
PA
25007case `$am_make -s -f confmf 2> /dev/null` in #(
25008*the\ am__doit\ target*)
25009 am__include=include
25010 am__quote=
25011 _am_result=GNU
25012 ;;
25013esac
25014# Now try BSD make style include.
25015if test "$am__include" = "#"; then
25016 echo '.include "confinc"' > confmf
25017 case `$am_make -s -f confmf 2> /dev/null` in #(
25018 *the\ am__doit\ target*)
25019 am__include=.include
25020 am__quote="\""
25021 _am_result=BSD
25022 ;;
25023 esac
25024fi
25025
25026
25027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
25028$as_echo "$_am_result" >&6; }
25029rm -f confinc confmf
25030
25031# Check whether --enable-dependency-tracking was given.
25032if test "${enable_dependency_tracking+set}" = set; then :
25033 enableval=$enable_dependency_tracking;
25034fi
25035
25036if test "x$enable_dependency_tracking" != xno; then
25037 am_depcomp="$ac_aux_dir/depcomp"
25038 AMDEPBACKSLASH='\'
d0ac1c44 25039 am__nodep='_no'
c971b7fa
PA
25040fi
25041 if test "x$enable_dependency_tracking" != xno; then
25042 AMDEP_TRUE=
25043 AMDEP_FALSE='#'
25044else
25045 AMDEP_TRUE='#'
25046 AMDEP_FALSE=
25047fi
25048
25049
d0ac1c44
SM
25050# Check whether --enable-silent-rules was given.
25051if test "${enable_silent_rules+set}" = set; then :
25052 enableval=$enable_silent_rules;
25053fi
25054
25055case $enable_silent_rules in # (((
25056 yes) AM_DEFAULT_VERBOSITY=0;;
25057 no) AM_DEFAULT_VERBOSITY=1;;
25058 *) AM_DEFAULT_VERBOSITY=1;;
25059esac
25060am_make=${MAKE-make}
25061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
25062$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
25063if ${am_cv_make_support_nested_variables+:} false; then :
25064 $as_echo_n "(cached) " >&6
25065else
25066 if $as_echo 'TRUE=$(BAR$(V))
25067BAR0=false
25068BAR1=true
25069V=1
25070am__doit:
25071 @$(TRUE)
25072.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
25073 am_cv_make_support_nested_variables=yes
25074else
25075 am_cv_make_support_nested_variables=no
25076fi
25077fi
25078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
25079$as_echo "$am_cv_make_support_nested_variables" >&6; }
25080if test $am_cv_make_support_nested_variables = yes; then
25081 AM_V='$(V)'
25082 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
25083else
25084 AM_V=$AM_DEFAULT_VERBOSITY
25085 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
25086fi
25087AM_BACKSLASH='\'
25088
c971b7fa
PA
25089if test "`cd $srcdir && pwd`" != "`pwd`"; then
25090 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
25091 # is not polluted with repeated "-I."
25092 am__isrc=' -I$(srcdir)'
25093 # test to see if srcdir already configured
25094 if test -f $srcdir/config.status; then
d0ac1c44 25095 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
c971b7fa
PA
25096 fi
25097fi
25098
25099# test whether we have cygpath
25100if test -z "$CYGPATH_W"; then
25101 if (cygpath --version) >/dev/null 2>/dev/null; then
25102 CYGPATH_W='cygpath -w'
25103 else
25104 CYGPATH_W=echo
25105 fi
25106fi
25107
25108
25109# Define the identity of the package.
d0ac1c44
SM
25110 PACKAGE='libgnu'
25111 VERSION='UNUSED-VERSION'
c971b7fa
PA
25112
25113
25114# Some tools Automake needs.
25115
25116ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
25117
25118
25119AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
25120
25121
25122AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
25123
25124
25125AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
25126
25127
25128MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
25129
d0ac1c44
SM
25130# For better backward compatibility. To be removed once Automake 1.9.x
25131# dies out for good. For more background, see:
25132# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
25133# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
25134mkdir_p='$(MKDIR_P)'
25135
25136# We need awk for the "check" target (and possibly the TAP driver). The
25137# system "awk" is bad on some platforms.
25138# Always define AMTAR for backward compatibility. Yes, it's still used
25139# in the wild :-( We should find a proper way to deprecate it ...
25140AMTAR='$${TAR-tar}'
25141
25142
25143# We'll loop over all known methods to create a tar archive until one works.
25144_am_tools='gnutar pax cpio none'
c971b7fa 25145
d0ac1c44 25146am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
c971b7fa 25147
c971b7fa
PA
25148
25149
25150
25151
25152depcc="$CC" am_compiler_list=
25153
25154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
25155$as_echo_n "checking dependency style of $depcc... " >&6; }
d0ac1c44 25156if ${am_cv_CC_dependencies_compiler_type+:} false; then :
c971b7fa
PA
25157 $as_echo_n "(cached) " >&6
25158else
25159 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
25160 # We make a subdir and do the tests there. Otherwise we can end up
25161 # making bogus files that we don't know about and never remove. For
25162 # instance it was reported that on HP-UX the gcc test will end up
d0ac1c44
SM
25163 # making a dummy file named 'D' -- because '-MD' means "put the output
25164 # in D".
25165 rm -rf conftest.dir
c971b7fa
PA
25166 mkdir conftest.dir
25167 # Copy depcomp to subdir because otherwise we won't find it if we're
25168 # using a relative directory.
25169 cp "$am_depcomp" conftest.dir
25170 cd conftest.dir
25171 # We will build objects and dependencies in a subdirectory because
25172 # it helps to detect inapplicable dependency modes. For instance
25173 # both Tru64's cc and ICC support -MD to output dependencies as a
25174 # side effect of compilation, but ICC will put the dependencies in
25175 # the current directory while Tru64 will put them in the object
25176 # directory.
25177 mkdir sub
25178
25179 am_cv_CC_dependencies_compiler_type=none
25180 if test "$am_compiler_list" = ""; then
25181 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
25182 fi
25183 am__universal=false
25184 case " $depcc " in #(
25185 *\ -arch\ *\ -arch\ *) am__universal=true ;;
25186 esac
25187
25188 for depmode in $am_compiler_list; do
25189 # Setup a source with many dependencies, because some compilers
25190 # like to wrap large dependency lists on column 80 (with \), and
25191 # we should not choose a depcomp mode which is confused by this.
25192 #
25193 # We need to recreate these files for each test, as the compiler may
25194 # overwrite some of them when testing with obscure command lines.
25195 # This happens at least with the AIX C compiler.
25196 : > sub/conftest.c
25197 for i in 1 2 3 4 5 6; do
25198 echo '#include "conftst'$i'.h"' >> sub/conftest.c
d0ac1c44
SM
25199 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
25200 # Solaris 10 /bin/sh.
25201 echo '/* dummy */' > sub/conftst$i.h
c971b7fa
PA
25202 done
25203 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
25204
d0ac1c44 25205 # We check with '-c' and '-o' for the sake of the "dashmstdout"
c971b7fa 25206 # mode. It turns out that the SunPro C++ compiler does not properly
d0ac1c44
SM
25207 # handle '-M -o', and we need to detect this. Also, some Intel
25208 # versions had trouble with output in subdirs.
c971b7fa
PA
25209 am__obj=sub/conftest.${OBJEXT-o}
25210 am__minus_obj="-o $am__obj"
25211 case $depmode in
25212 gcc)
25213 # This depmode causes a compiler race in universal mode.
25214 test "$am__universal" = false || continue
25215 ;;
25216 nosideeffect)
d0ac1c44
SM
25217 # After this tag, mechanisms are not by side-effect, so they'll
25218 # only be used when explicitly requested.
c971b7fa
PA
25219 if test "x$enable_dependency_tracking" = xyes; then
25220 continue
25221 else
25222 break
25223 fi
25224 ;;
d0ac1c44
SM
25225 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
25226 # This compiler won't grok '-c -o', but also, the minuso test has
c971b7fa
PA
25227 # not run yet. These depmodes are late enough in the game, and
25228 # so weak that their functioning should not be impacted.
25229 am__obj=conftest.${OBJEXT-o}
25230 am__minus_obj=
25231 ;;
25232 none) break ;;
25233 esac
25234 if depmode=$depmode \
25235 source=sub/conftest.c object=$am__obj \
25236 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
25237 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
25238 >/dev/null 2>conftest.err &&
25239 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
25240 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
25241 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
25242 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
25243 # icc doesn't choke on unknown options, it will just issue warnings
25244 # or remarks (even with -Werror). So we grep stderr for any message
25245 # that says an option was ignored or not supported.
25246 # When given -MP, icc 7.0 and 7.1 complain thusly:
25247 # icc: Command line warning: ignoring option '-M'; no argument required
25248 # The diagnosis changed in icc 8.0:
25249 # icc: Command line remark: option '-MP' not supported
25250 if (grep 'ignoring option' conftest.err ||
25251 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
25252 am_cv_CC_dependencies_compiler_type=$depmode
25253 break
25254 fi
25255 fi
25256 done
25257
25258 cd ..
25259 rm -rf conftest.dir
25260else
25261 am_cv_CC_dependencies_compiler_type=none
25262fi
25263
25264fi
25265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
25266$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
25267CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
25268
25269 if
25270 test "x$enable_dependency_tracking" != xno \
25271 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
25272 am__fastdepCC_TRUE=
25273 am__fastdepCC_FALSE='#'
25274else
25275 am__fastdepCC_TRUE='#'
25276 am__fastdepCC_FALSE=
25277fi
25278
25279
25280
d0ac1c44
SM
25281# POSIX will say in a future version that running "rm -f" with no argument
25282# is OK; and we want to be able to make that assumption in our Makefile
25283# recipes. So use an aggressive probe to check that the usage we want is
25284# actually supported "in the wild" to an acceptable degree.
25285# See automake bug#10828.
25286# To make any issue more visible, cause the running configure to be aborted
25287# by default if the 'rm' program in use doesn't match our expectations; the
25288# user can still override this though.
25289if rm -f && rm -fr && rm -rf; then : OK; else
25290 cat >&2 <<'END'
25291Oops!
25292
25293Your 'rm' program seems unable to run without file operands specified
25294on the command line, even when the '-f' option is present. This is contrary
25295to the behaviour of most rm programs out there, and not conforming with
25296the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
25297
25298Please tell bug-automake@gnu.org about your system, including the value
25299of your $PATH and any error possibly output before this message. This
25300can help us improve future automake versions.
25301
25302END
25303 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
25304 echo 'Configuration will proceed anyway, since you have set the' >&2
25305 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
25306 echo >&2
25307 else
25308 cat >&2 <<'END'
25309Aborting the configuration process, to ensure you take notice of the issue.
25310
25311You can download and install GNU coreutils to get an 'rm' implementation
25312that behaves properly: <http://www.gnu.org/software/coreutils/>.
25313
25314If you want to complete the configuration process using your problematic
25315'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
25316to "yes", and re-run configure.
25317
25318END
25319 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
25320 fi
25321fi
25322
c971b7fa 25323
39be3c7e
SM
25324# Check whether --enable-silent-rules was given.
25325if test "${enable_silent_rules+set}" = set; then :
25326 enableval=$enable_silent_rules;
25327fi
25328
d0ac1c44
SM
25329case $enable_silent_rules in # (((
25330 yes) AM_DEFAULT_VERBOSITY=0;;
25331 no) AM_DEFAULT_VERBOSITY=1;;
25332 *) AM_DEFAULT_VERBOSITY=0;;
39be3c7e 25333esac
d0ac1c44
SM
25334am_make=${MAKE-make}
25335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
25336$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
25337if ${am_cv_make_support_nested_variables+:} false; then :
25338 $as_echo_n "(cached) " >&6
25339else
25340 if $as_echo 'TRUE=$(BAR$(V))
25341BAR0=false
25342BAR1=true
25343V=1
25344am__doit:
25345 @$(TRUE)
25346.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
25347 am_cv_make_support_nested_variables=yes
25348else
25349 am_cv_make_support_nested_variables=no
25350fi
25351fi
25352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
25353$as_echo "$am_cv_make_support_nested_variables" >&6; }
25354if test $am_cv_make_support_nested_variables = yes; then
25355 AM_V='$(V)'
25356 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
25357else
25358 AM_V=$AM_DEFAULT_VERBOSITY
25359 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
25360fi
39be3c7e
SM
25361AM_BACKSLASH='\'
25362
25363
c971b7fa
PA
25364# --------------------- #
25365# Checks for programs. #
25366# --------------------- #
25367
25368
25369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
25370$as_echo_n "checking whether ln -s works... " >&6; }
25371LN_S=$as_ln_s
25372if test "$LN_S" = "ln -s"; then
25373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25374$as_echo "yes" >&6; }
25375else
25376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
25377$as_echo "no, using $LN_S" >&6; }
25378fi
25379
25380if test -n "$ac_tool_prefix"; then
25381 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
25382set dummy ${ac_tool_prefix}ranlib; ac_word=$2
25383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25384$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25385if ${ac_cv_prog_RANLIB+:} false; then :
c971b7fa
PA
25386 $as_echo_n "(cached) " >&6
25387else
25388 if test -n "$RANLIB"; then
25389 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
25390else
25391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25392for as_dir in $PATH
25393do
25394 IFS=$as_save_IFS
25395 test -z "$as_dir" && as_dir=.
25396 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25397 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25398 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
25399 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25400 break 2
25401 fi
25402done
25403 done
25404IFS=$as_save_IFS
25405
25406fi
25407fi
25408RANLIB=$ac_cv_prog_RANLIB
25409if test -n "$RANLIB"; then
25410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
25411$as_echo "$RANLIB" >&6; }
25412else
25413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25414$as_echo "no" >&6; }
25415fi
25416
25417
25418fi
25419if test -z "$ac_cv_prog_RANLIB"; then
25420 ac_ct_RANLIB=$RANLIB
25421 # Extract the first word of "ranlib", so it can be a program name with args.
25422set dummy ranlib; ac_word=$2
25423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25424$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25425if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
c971b7fa
PA
25426 $as_echo_n "(cached) " >&6
25427else
25428 if test -n "$ac_ct_RANLIB"; then
25429 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
25430else
25431as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25432for as_dir in $PATH
25433do
25434 IFS=$as_save_IFS
25435 test -z "$as_dir" && as_dir=.
25436 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25437 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25438 ac_cv_prog_ac_ct_RANLIB="ranlib"
25439 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25440 break 2
25441 fi
25442done
25443 done
25444IFS=$as_save_IFS
25445
25446fi
25447fi
25448ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
25449if test -n "$ac_ct_RANLIB"; then
25450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
25451$as_echo "$ac_ct_RANLIB" >&6; }
25452else
25453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25454$as_echo "no" >&6; }
25455fi
25456
25457 if test "x$ac_ct_RANLIB" = x; then
25458 RANLIB=":"
25459 else
25460 case $cross_compiling:$ac_tool_warned in
25461yes:)
25462{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25463$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25464ac_tool_warned=yes ;;
25465esac
25466 RANLIB=$ac_ct_RANLIB
25467 fi
25468else
25469 RANLIB="$ac_cv_prog_RANLIB"
25470fi
25471
25472
25473if test -n "$ac_tool_prefix"; then
25474 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
25475set dummy ${ac_tool_prefix}ar; ac_word=$2
25476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25477$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25478if ${ac_cv_prog_AR+:} false; then :
c971b7fa
PA
25479 $as_echo_n "(cached) " >&6
25480else
25481 if test -n "$AR"; then
25482 ac_cv_prog_AR="$AR" # Let the user override the test.
25483else
25484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25485for as_dir in $PATH
25486do
25487 IFS=$as_save_IFS
25488 test -z "$as_dir" && as_dir=.
25489 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25490 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25491 ac_cv_prog_AR="${ac_tool_prefix}ar"
25492 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25493 break 2
25494 fi
25495done
25496 done
25497IFS=$as_save_IFS
25498
25499fi
25500fi
25501AR=$ac_cv_prog_AR
25502if test -n "$AR"; then
25503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
25504$as_echo "$AR" >&6; }
25505else
25506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25507$as_echo "no" >&6; }
25508fi
25509
25510
25511fi
25512if test -z "$ac_cv_prog_AR"; then
25513 ac_ct_AR=$AR
25514 # Extract the first word of "ar", so it can be a program name with args.
25515set dummy ar; ac_word=$2
25516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25517$as_echo_n "checking for $ac_word... " >&6; }
d0ac1c44 25518if ${ac_cv_prog_ac_ct_AR+:} false; then :
c971b7fa
PA
25519 $as_echo_n "(cached) " >&6
25520else
25521 if test -n "$ac_ct_AR"; then
25522 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
25523else
25524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25525for as_dir in $PATH
25526do
25527 IFS=$as_save_IFS
25528 test -z "$as_dir" && as_dir=.
25529 for ac_exec_ext in '' $ac_executable_extensions; do
d0ac1c44 25530 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
c971b7fa
PA
25531 ac_cv_prog_ac_ct_AR="ar"
25532 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25533 break 2
25534 fi
25535done
25536 done
25537IFS=$as_save_IFS
25538
25539fi
25540fi
25541ac_ct_AR=$ac_cv_prog_ac_ct_AR
25542if test -n "$ac_ct_AR"; then
25543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
25544$as_echo "$ac_ct_AR" >&6; }
25545else
25546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25547$as_echo "no" >&6; }
25548fi
25549
25550 if test "x$ac_ct_AR" = x; then
25551 AR=""
25552 else
25553 case $cross_compiling:$ac_tool_warned in
25554yes:)
25555{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25556$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25557ac_tool_warned=yes ;;
25558esac
25559 AR=$ac_ct_AR
25560 fi
25561else
25562 AR="$ac_cv_prog_AR"
25563fi
25564
25565
25566# ---------------------- #
25567# Checks for libraries. #
25568# ---------------------- #
25569
25570ac_config_files="$ac_config_files Makefile import/Makefile"
25571
25572ac_config_commands="$ac_config_commands default"
25573
25574cat >confcache <<\_ACEOF
25575# This file is a shell script that caches the results of configure
25576# tests run on this system so they can be shared between configure
25577# scripts and configure runs, see configure's option --config-cache.
25578# It is not useful on other systems. If it contains results you don't
25579# want to keep, you may remove or edit it.
25580#
25581# config.status only pays attention to the cache file if you give it
25582# the --recheck option to rerun configure.
25583#
25584# `ac_cv_env_foo' variables (set or unset) will be overridden when
25585# loading this file, other *unset* `ac_cv_foo' will be assigned the
25586# following values.
25587
25588_ACEOF
25589
25590# The following way of writing the cache mishandles newlines in values,
25591# but we know of no workaround that is simple, portable, and efficient.
25592# So, we kill variables containing newlines.
25593# Ultrix sh set writes to stderr and can't be redirected directly,
25594# and sets the high bit in the cache file unless we assign to the vars.
25595(
25596 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25597 eval ac_val=\$$ac_var
25598 case $ac_val in #(
25599 *${as_nl}*)
25600 case $ac_var in #(
25601 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
25602$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
25603 esac
25604 case $ac_var in #(
25605 _ | IFS | as_nl) ;; #(
25606 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
25607 *) { eval $ac_var=; unset $ac_var;} ;;
25608 esac ;;
25609 esac
25610 done
25611
25612 (set) 2>&1 |
25613 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25614 *${as_nl}ac_space=\ *)
25615 # `set' does not quote correctly, so add quotes: double-quote
25616 # substitution turns \\\\ into \\, and sed turns \\ into \.
25617 sed -n \
25618 "s/'/'\\\\''/g;
25619 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
25620 ;; #(
25621 *)
25622 # `set' quotes correctly as required by POSIX, so do not add quotes.
25623 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
25624 ;;
25625 esac |
25626 sort
25627) |
25628 sed '
25629 /^ac_cv_env_/b end
25630 t clear
25631 :clear
25632 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25633 t end
25634 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25635 :end' >>confcache
25636if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25637 if test -w "$cache_file"; then
d0ac1c44 25638 if test "x$cache_file" != "x/dev/null"; then
c971b7fa
PA
25639 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
25640$as_echo "$as_me: updating cache $cache_file" >&6;}
d0ac1c44
SM
25641 if test ! -f "$cache_file" || test -h "$cache_file"; then
25642 cat confcache >"$cache_file"
25643 else
25644 case $cache_file in #(
25645 */* | ?:*)
25646 mv -f confcache "$cache_file"$$ &&
25647 mv -f "$cache_file"$$ "$cache_file" ;; #(
25648 *)
25649 mv -f confcache "$cache_file" ;;
25650 esac
25651 fi
25652 fi
c971b7fa
PA
25653 else
25654 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
25655$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
25656 fi
25657fi
25658rm -f confcache
25659
25660test "x$prefix" = xNONE && prefix=$ac_default_prefix
25661# Let make expand exec_prefix.
25662test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25663
25664DEFS=-DHAVE_CONFIG_H
25665
25666ac_libobjs=
25667ac_ltlibobjs=
25668for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25669 # 1. Remove the extension, and $U if already installed.
25670 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25671 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
25672 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25673 # will be set to the directory where LIBOBJS objects are built.
25674 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25675 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
25676done
25677LIBOBJS=$ac_libobjs
25678
25679LTLIBOBJS=$ac_ltlibobjs
25680
25681
25682if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
d0ac1c44 25683 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
c971b7fa
PA
25684Usually this means the macro was only invoked conditionally." "$LINENO" 5
25685fi
25686if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
d0ac1c44 25687 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
c971b7fa
PA
25688Usually this means the macro was only invoked conditionally." "$LINENO" 5
25689fi
8690e634 25690if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
d0ac1c44 25691 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
8690e634
JK
25692Usually this means the macro was only invoked conditionally." "$LINENO" 5
25693fi
18848e28 25694if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
d0ac1c44 25695 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
18848e28
GF
25696Usually this means the macro was only invoked conditionally." "$LINENO" 5
25697fi
88b48903 25698if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
d0ac1c44 25699 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
88b48903
WN
25700Usually this means the macro was only invoked conditionally." "$LINENO" 5
25701fi
8690e634 25702if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
d0ac1c44 25703 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
8690e634
JK
25704Usually this means the macro was only invoked conditionally." "$LINENO" 5
25705fi
6ec2e0f5 25706if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
d0ac1c44 25707 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
6ec2e0f5
SDJ
25708Usually this means the macro was only invoked conditionally." "$LINENO" 5
25709fi
49e4877c 25710if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 25711 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
25712Usually this means the macro was only invoked conditionally." "$LINENO" 5
25713fi
25714if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
d0ac1c44 25715 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
49e4877c
PA
25716Usually this means the macro was only invoked conditionally." "$LINENO" 5
25717fi
c971b7fa 25718if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
d0ac1c44 25719 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
c971b7fa
PA
25720Usually this means the macro was only invoked conditionally." "$LINENO" 5
25721fi
88b48903
WN
25722
25723
8690e634 25724if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
d0ac1c44 25725 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
8690e634
JK
25726Usually this means the macro was only invoked conditionally." "$LINENO" 5
25727fi
c971b7fa 25728if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
d0ac1c44 25729 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
c971b7fa
PA
25730Usually this means the macro was only invoked conditionally." "$LINENO" 5
25731fi
25732
25733 gl_libobjs=
25734 gl_ltlibobjs=
25735 if test -n "$gl_LIBOBJS"; then
25736 # Remove the extension.
25737 sed_drop_objext='s/\.o$//;s/\.obj$//'
25738 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
25739 gl_libobjs="$gl_libobjs $i.$ac_objext"
25740 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
25741 done
25742 fi
25743 gl_LIBOBJS=$gl_libobjs
25744
25745 gl_LTLIBOBJS=$gl_ltlibobjs
25746
25747
25748
25749 gltests_libobjs=
25750 gltests_ltlibobjs=
25751 if test -n "$gltests_LIBOBJS"; then
25752 # Remove the extension.
25753 sed_drop_objext='s/\.o$//;s/\.obj$//'
25754 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
25755 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
25756 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
25757 done
25758 fi
25759 gltests_LIBOBJS=$gltests_libobjs
25760
25761 gltests_LTLIBOBJS=$gltests_ltlibobjs
25762
25763
d0ac1c44
SM
25764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
25765$as_echo_n "checking that generated files are newer than configure... " >&6; }
25766 if test -n "$am_sleep_pid"; then
25767 # Hide warnings about reused PIDs.
25768 wait $am_sleep_pid 2>/dev/null
25769 fi
25770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
25771$as_echo "done" >&6; }
c971b7fa 25772if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
d0ac1c44 25773 as_fn_error $? "conditional \"AMDEP\" was never defined.
c971b7fa
PA
25774Usually this means the macro was only invoked conditionally." "$LINENO" 5
25775fi
25776if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
d0ac1c44 25777 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
c971b7fa
PA
25778Usually this means the macro was only invoked conditionally." "$LINENO" 5
25779fi
25780 if test -n "$EXEEXT"; then
25781 am__EXEEXT_TRUE=
25782 am__EXEEXT_FALSE='#'
25783else
25784 am__EXEEXT_TRUE='#'
25785 am__EXEEXT_FALSE=
25786fi
25787
25788
d0ac1c44 25789: "${CONFIG_STATUS=./config.status}"
c971b7fa
PA
25790ac_write_fail=0
25791ac_clean_files_save=$ac_clean_files
25792ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25793{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
25794$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
25795as_write_fail=0
25796cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
25797#! $SHELL
25798# Generated by $as_me.
25799# Run this file to recreate the current configuration.
25800# Compiler output produced by configure, useful for debugging
25801# configure, is in config.log if it exists.
25802
25803debug=false
25804ac_cs_recheck=false
25805ac_cs_silent=false
25806
25807SHELL=\${CONFIG_SHELL-$SHELL}
25808export SHELL
25809_ASEOF
25810cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
25811## -------------------- ##
25812## M4sh Initialization. ##
25813## -------------------- ##
25814
25815# Be more Bourne compatible
25816DUALCASE=1; export DUALCASE # for MKS sh
25817if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
25818 emulate sh
25819 NULLCMD=:
25820 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25821 # is contrary to our usage. Disable this feature.
25822 alias -g '${1+"$@"}'='"$@"'
25823 setopt NO_GLOB_SUBST
25824else
25825 case `(set -o) 2>/dev/null` in #(
25826 *posix*) :
25827 set -o posix ;; #(
25828 *) :
25829 ;;
25830esac
25831fi
25832
25833
25834as_nl='
25835'
25836export as_nl
25837# Printing a long string crashes Solaris 7 /usr/bin/printf.
25838as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
25839as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
25840as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
25841# Prefer a ksh shell builtin over an external printf program on Solaris,
25842# but without wasting forks for bash or zsh.
25843if test -z "$BASH_VERSION$ZSH_VERSION" \
25844 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
25845 as_echo='print -r --'
25846 as_echo_n='print -rn --'
25847elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
25848 as_echo='printf %s\n'
25849 as_echo_n='printf %s'
25850else
25851 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
25852 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
25853 as_echo_n='/usr/ucb/echo -n'
25854 else
25855 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
25856 as_echo_n_body='eval
25857 arg=$1;
25858 case $arg in #(
25859 *"$as_nl"*)
25860 expr "X$arg" : "X\\(.*\\)$as_nl";
25861 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
25862 esac;
25863 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
25864 '
25865 export as_echo_n_body
25866 as_echo_n='sh -c $as_echo_n_body as_echo'
25867 fi
25868 export as_echo_body
25869 as_echo='sh -c $as_echo_body as_echo'
25870fi
25871
25872# The user is always right.
25873if test "${PATH_SEPARATOR+set}" != set; then
25874 PATH_SEPARATOR=:
25875 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
25876 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
25877 PATH_SEPARATOR=';'
25878 }
25879fi
25880
25881
25882# IFS
25883# We need space, tab and new line, in precisely that order. Quoting is
25884# there to prevent editors from complaining about space-tab.
25885# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25886# splitting by setting IFS to empty value.)
25887IFS=" "" $as_nl"
25888
25889# Find who we are. Look in the path if we contain no directory separator.
d0ac1c44 25890as_myself=
c971b7fa
PA
25891case $0 in #((
25892 *[\\/]* ) as_myself=$0 ;;
25893 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25894for as_dir in $PATH
25895do
25896 IFS=$as_save_IFS
25897 test -z "$as_dir" && as_dir=.
25898 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25899 done
25900IFS=$as_save_IFS
25901
25902 ;;
25903esac
25904# We did not find ourselves, most probably we were run as `sh COMMAND'
25905# in which case we are not to be found in the path.
25906if test "x$as_myself" = x; then
25907 as_myself=$0
25908fi
25909if test ! -f "$as_myself"; then
25910 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25911 exit 1
25912fi
25913
25914# Unset variables that we do not need and which cause bugs (e.g. in
25915# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
25916# suppresses any "Segmentation fault" message there. '((' could
25917# trigger a bug in pdksh 5.2.14.
25918for as_var in BASH_ENV ENV MAIL MAILPATH
25919do eval test x\${$as_var+set} = xset \
25920 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
25921done
25922PS1='$ '
25923PS2='> '
25924PS4='+ '
25925
25926# NLS nuisances.
25927LC_ALL=C
25928export LC_ALL
25929LANGUAGE=C
25930export LANGUAGE
25931
25932# CDPATH.
25933(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25934
25935
d0ac1c44
SM
25936# as_fn_error STATUS ERROR [LINENO LOG_FD]
25937# ----------------------------------------
c971b7fa
PA
25938# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
25939# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
d0ac1c44 25940# script with STATUS, using 1 if that was 0.
c971b7fa
PA
25941as_fn_error ()
25942{
d0ac1c44
SM
25943 as_status=$1; test $as_status -eq 0 && as_status=1
25944 if test "$4"; then
25945 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25946 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
c971b7fa 25947 fi
d0ac1c44 25948 $as_echo "$as_me: error: $2" >&2
c971b7fa
PA
25949 as_fn_exit $as_status
25950} # as_fn_error
25951
25952
25953# as_fn_set_status STATUS
25954# -----------------------
25955# Set $? to STATUS, without forking.
25956as_fn_set_status ()
25957{
25958 return $1
25959} # as_fn_set_status
25960
25961# as_fn_exit STATUS
25962# -----------------
25963# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25964as_fn_exit ()
25965{
25966 set +e
25967 as_fn_set_status $1
25968 exit $1
25969} # as_fn_exit
25970
25971# as_fn_unset VAR
25972# ---------------
25973# Portably unset VAR.
25974as_fn_unset ()
25975{
25976 { eval $1=; unset $1;}
25977}
25978as_unset=as_fn_unset
25979# as_fn_append VAR VALUE
25980# ----------------------
25981# Append the text in VALUE to the end of the definition contained in VAR. Take
25982# advantage of any shell optimizations that allow amortized linear growth over
25983# repeated appends, instead of the typical quadratic growth present in naive
25984# implementations.
25985if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
25986 eval 'as_fn_append ()
25987 {
25988 eval $1+=\$2
25989 }'
25990else
25991 as_fn_append ()
25992 {
25993 eval $1=\$$1\$2
25994 }
25995fi # as_fn_append
25996
25997# as_fn_arith ARG...
25998# ------------------
25999# Perform arithmetic evaluation on the ARGs, and store the result in the
26000# global $as_val. Take advantage of shells that can avoid forks. The arguments
26001# must be portable across $(()) and expr.
26002if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
26003 eval 'as_fn_arith ()
26004 {
26005 as_val=$(( $* ))
26006 }'
26007else
26008 as_fn_arith ()
26009 {
26010 as_val=`expr "$@" || test $? -eq 1`
26011 }
26012fi # as_fn_arith
26013
26014
26015if expr a : '\(a\)' >/dev/null 2>&1 &&
26016 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26017 as_expr=expr
26018else
26019 as_expr=false
26020fi
26021
26022if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26023 as_basename=basename
26024else
26025 as_basename=false
26026fi
26027
26028if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26029 as_dirname=dirname
26030else
26031 as_dirname=false
26032fi
26033
26034as_me=`$as_basename -- "$0" ||
26035$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26036 X"$0" : 'X\(//\)$' \| \
26037 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
26038$as_echo X/"$0" |
26039 sed '/^.*\/\([^/][^/]*\)\/*$/{
26040 s//\1/
26041 q
26042 }
26043 /^X\/\(\/\/\)$/{
26044 s//\1/
26045 q
26046 }
26047 /^X\/\(\/\).*/{
26048 s//\1/
26049 q
26050 }
26051 s/.*/./; q'`
26052
26053# Avoid depending upon Character Ranges.
26054as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26055as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26056as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26057as_cr_digits='0123456789'
26058as_cr_alnum=$as_cr_Letters$as_cr_digits
26059
26060ECHO_C= ECHO_N= ECHO_T=
26061case `echo -n x` in #(((((
26062-n*)
26063 case `echo 'xy\c'` in
26064 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26065 xy) ECHO_C='\c';;
26066 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
26067 ECHO_T=' ';;
26068 esac;;
26069*)
26070 ECHO_N='-n';;
26071esac
26072
26073rm -f conf$$ conf$$.exe conf$$.file
26074if test -d conf$$.dir; then
26075 rm -f conf$$.dir/conf$$.file
26076else
26077 rm -f conf$$.dir
26078 mkdir conf$$.dir 2>/dev/null
26079fi
26080if (echo >conf$$.file) 2>/dev/null; then
26081 if ln -s conf$$.file conf$$ 2>/dev/null; then
26082 as_ln_s='ln -s'
26083 # ... but there are two gotchas:
26084 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26085 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
d0ac1c44 26086 # In both cases, we have to default to `cp -pR'.
c971b7fa 26087 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
d0ac1c44 26088 as_ln_s='cp -pR'
c971b7fa
PA
26089 elif ln conf$$.file conf$$ 2>/dev/null; then
26090 as_ln_s=ln
26091 else
d0ac1c44 26092 as_ln_s='cp -pR'
c971b7fa
PA
26093 fi
26094else
d0ac1c44 26095 as_ln_s='cp -pR'
c971b7fa
PA
26096fi
26097rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26098rmdir conf$$.dir 2>/dev/null
26099
26100
26101# as_fn_mkdir_p
26102# -------------
26103# Create "$as_dir" as a directory, including parents if necessary.
26104as_fn_mkdir_p ()
26105{
26106
26107 case $as_dir in #(
26108 -*) as_dir=./$as_dir;;
26109 esac
26110 test -d "$as_dir" || eval $as_mkdir_p || {
26111 as_dirs=
26112 while :; do
26113 case $as_dir in #(
26114 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
26115 *) as_qdir=$as_dir;;
26116 esac
26117 as_dirs="'$as_qdir' $as_dirs"
26118 as_dir=`$as_dirname -- "$as_dir" ||
26119$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26120 X"$as_dir" : 'X\(//\)[^/]' \| \
26121 X"$as_dir" : 'X\(//\)$' \| \
26122 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
26123$as_echo X"$as_dir" |
26124 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26125 s//\1/
26126 q
26127 }
26128 /^X\(\/\/\)[^/].*/{
26129 s//\1/
26130 q
26131 }
26132 /^X\(\/\/\)$/{
26133 s//\1/
26134 q
26135 }
26136 /^X\(\/\).*/{
26137 s//\1/
26138 q
26139 }
26140 s/.*/./; q'`
26141 test -d "$as_dir" && break
26142 done
26143 test -z "$as_dirs" || eval "mkdir $as_dirs"
d0ac1c44 26144 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
c971b7fa
PA
26145
26146
26147} # as_fn_mkdir_p
26148if mkdir -p . 2>/dev/null; then
26149 as_mkdir_p='mkdir -p "$as_dir"'
26150else
26151 test -d ./-p && rmdir ./-p
26152 as_mkdir_p=false
26153fi
26154
d0ac1c44
SM
26155
26156# as_fn_executable_p FILE
26157# -----------------------
26158# Test if FILE is an executable regular file.
26159as_fn_executable_p ()
26160{
26161 test -f "$1" && test -x "$1"
26162} # as_fn_executable_p
26163as_test_x='test -x'
26164as_executable_p=as_fn_executable_p
c971b7fa
PA
26165
26166# Sed expression to map a string onto a valid CPP name.
26167as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
26168
26169# Sed expression to map a string onto a valid variable name.
26170as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
26171
26172
26173exec 6>&1
26174## ----------------------------------- ##
26175## Main body of $CONFIG_STATUS script. ##
26176## ----------------------------------- ##
26177_ASEOF
26178test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
26179
26180cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26181# Save the log message, to keep $0 and so on meaningful, and to
26182# report actual input values of CONFIG_FILES etc. instead of their
26183# values after options handling.
26184ac_log="
d0ac1c44
SM
26185This file was extended by libgnu $as_me UNUSED-VERSION, which was
26186generated by GNU Autoconf 2.69. Invocation command line was
c971b7fa
PA
26187
26188 CONFIG_FILES = $CONFIG_FILES
26189 CONFIG_HEADERS = $CONFIG_HEADERS
26190 CONFIG_LINKS = $CONFIG_LINKS
26191 CONFIG_COMMANDS = $CONFIG_COMMANDS
26192 $ $0 $@
26193
26194on `(hostname || uname -n) 2>/dev/null | sed 1q`
26195"
26196
26197_ACEOF
26198
26199case $ac_config_files in *"
26200"*) set x $ac_config_files; shift; ac_config_files=$*;;
26201esac
26202
26203case $ac_config_headers in *"
26204"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
26205esac
26206
26207
26208cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26209# Files that config.status was made for.
26210config_files="$ac_config_files"
26211config_headers="$ac_config_headers"
26212config_commands="$ac_config_commands"
26213
26214_ACEOF
26215
26216cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26217ac_cs_usage="\
26218\`$as_me' instantiates files and other configuration actions
26219from templates according to the current configuration. Unless the files
26220and actions are specified as TAGs, all are instantiated by default.
26221
26222Usage: $0 [OPTION]... [TAG]...
26223
26224 -h, --help print this help, then exit
26225 -V, --version print version number and configuration settings, then exit
d0ac1c44 26226 --config print configuration, then exit
c971b7fa
PA
26227 -q, --quiet, --silent
26228 do not print progress messages
26229 -d, --debug don't remove temporary files
26230 --recheck update $as_me by reconfiguring in the same conditions
26231 --file=FILE[:TEMPLATE]
26232 instantiate the configuration file FILE
26233 --header=FILE[:TEMPLATE]
26234 instantiate the configuration header FILE
26235
26236Configuration files:
26237$config_files
26238
26239Configuration headers:
26240$config_headers
26241
26242Configuration commands:
26243$config_commands
26244
26245Report bugs to the package provider."
26246
26247_ACEOF
26248cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 26249ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
c971b7fa 26250ac_cs_version="\\
d0ac1c44
SM
26251libgnu config.status UNUSED-VERSION
26252configured by $0, generated by GNU Autoconf 2.69,
26253 with options \\"\$ac_cs_config\\"
c971b7fa 26254
d0ac1c44 26255Copyright (C) 2012 Free Software Foundation, Inc.
c971b7fa
PA
26256This config.status script is free software; the Free Software Foundation
26257gives unlimited permission to copy, distribute and modify it."
26258
26259ac_pwd='$ac_pwd'
26260srcdir='$srcdir'
26261INSTALL='$INSTALL'
26262MKDIR_P='$MKDIR_P'
26263AWK='$AWK'
26264test -n "\$AWK" || AWK=awk
26265_ACEOF
26266
26267cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26268# The default lists apply if the user does not specify any file.
26269ac_need_defaults=:
26270while test $# != 0
26271do
26272 case $1 in
d0ac1c44 26273 --*=?*)
c971b7fa
PA
26274 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26275 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
26276 ac_shift=:
26277 ;;
d0ac1c44
SM
26278 --*=)
26279 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26280 ac_optarg=
26281 ac_shift=:
26282 ;;
c971b7fa
PA
26283 *)
26284 ac_option=$1
26285 ac_optarg=$2
26286 ac_shift=shift
26287 ;;
26288 esac
26289
26290 case $ac_option in
26291 # Handling of the options.
26292 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26293 ac_cs_recheck=: ;;
26294 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
26295 $as_echo "$ac_cs_version"; exit ;;
d0ac1c44
SM
26296 --config | --confi | --conf | --con | --co | --c )
26297 $as_echo "$ac_cs_config"; exit ;;
c971b7fa
PA
26298 --debug | --debu | --deb | --de | --d | -d )
26299 debug=: ;;
26300 --file | --fil | --fi | --f )
26301 $ac_shift
26302 case $ac_optarg in
26303 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
d0ac1c44 26304 '') as_fn_error $? "missing file argument" ;;
c971b7fa
PA
26305 esac
26306 as_fn_append CONFIG_FILES " '$ac_optarg'"
26307 ac_need_defaults=false;;
26308 --header | --heade | --head | --hea )
26309 $ac_shift
26310 case $ac_optarg in
26311 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26312 esac
26313 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
26314 ac_need_defaults=false;;
26315 --he | --h)
26316 # Conflict between --help and --header
d0ac1c44 26317 as_fn_error $? "ambiguous option: \`$1'
c971b7fa
PA
26318Try \`$0 --help' for more information.";;
26319 --help | --hel | -h )
26320 $as_echo "$ac_cs_usage"; exit ;;
26321 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26322 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26323 ac_cs_silent=: ;;
26324
26325 # This is an error.
d0ac1c44 26326 -*) as_fn_error $? "unrecognized option: \`$1'
c971b7fa
PA
26327Try \`$0 --help' for more information." ;;
26328
26329 *) as_fn_append ac_config_targets " $1"
26330 ac_need_defaults=false ;;
26331
26332 esac
26333 shift
26334done
26335
26336ac_configure_extra_args=
26337
26338if $ac_cs_silent; then
26339 exec 6>/dev/null
26340 ac_configure_extra_args="$ac_configure_extra_args --silent"
26341fi
26342
26343_ACEOF
26344cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26345if \$ac_cs_recheck; then
d0ac1c44 26346 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
c971b7fa
PA
26347 shift
26348 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
26349 CONFIG_SHELL='$SHELL'
26350 export CONFIG_SHELL
26351 exec "\$@"
26352fi
26353
26354_ACEOF
26355cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26356exec 5>>config.log
26357{
26358 echo
26359 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26360## Running $as_me. ##
26361_ASBOX
26362 $as_echo "$ac_log"
26363} >&5
26364
26365_ACEOF
26366cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26367#
26368# INIT-COMMANDS
26369#
26370AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
26371
26372_ACEOF
26373
26374cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26375
26376# Handling of arguments.
26377for ac_config_target in $ac_config_targets
26378do
26379 case $ac_config_target in
26380 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
26381 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
26382 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
26383 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
26384 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
26385
d0ac1c44 26386 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
c971b7fa
PA
26387 esac
26388done
26389
26390
26391# If the user did not use the arguments to specify the items to instantiate,
26392# then the envvar interface is used. Set only those that are not.
26393# We use the long form for the default assignment because of an extremely
26394# bizarre bug on SunOS 4.1.3.
26395if $ac_need_defaults; then
26396 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26397 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26398 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
26399fi
26400
26401# Have a temporary directory for convenience. Make it in the build tree
26402# simply because there is no reason against having it here, and in addition,
26403# creating and moving files from /tmp can sometimes cause problems.
26404# Hook for its removal unless debugging.
26405# Note that there is a small window in which the directory will not be cleaned:
26406# after its creation but before its name has been assigned to `$tmp'.
26407$debug ||
26408{
d0ac1c44 26409 tmp= ac_tmp=
c971b7fa 26410 trap 'exit_status=$?
d0ac1c44
SM
26411 : "${ac_tmp:=$tmp}"
26412 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
c971b7fa
PA
26413' 0
26414 trap 'as_fn_exit 1' 1 2 13 15
26415}
26416# Create a (secure) tmp directory for tmp files.
26417
26418{
26419 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
d0ac1c44 26420 test -d "$tmp"
c971b7fa
PA
26421} ||
26422{
26423 tmp=./conf$$-$RANDOM
26424 (umask 077 && mkdir "$tmp")
d0ac1c44
SM
26425} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
26426ac_tmp=$tmp
c971b7fa
PA
26427
26428# Set up the scripts for CONFIG_FILES section.
26429# No need to generate them if there are no CONFIG_FILES.
26430# This happens for instance with `./config.status config.h'.
26431if test -n "$CONFIG_FILES"; then
26432
26433
26434ac_cr=`echo X | tr X '\015'`
26435# On cygwin, bash can eat \r inside `` if the user requested igncr.
26436# But we know of no other shell where ac_cr would be empty at this
26437# point, so we can use a bashism as a fallback.
26438if test "x$ac_cr" = x; then
26439 eval ac_cr=\$\'\\r\'
26440fi
26441ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
26442if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
d0ac1c44 26443 ac_cs_awk_cr='\\r'
c971b7fa
PA
26444else
26445 ac_cs_awk_cr=$ac_cr
26446fi
26447
d0ac1c44 26448echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
c971b7fa
PA
26449_ACEOF
26450
26451
26452{
26453 echo "cat >conf$$subs.awk <<_ACEOF" &&
26454 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
26455 echo "_ACEOF"
26456} >conf$$subs.sh ||
d0ac1c44
SM
26457 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
26458ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
c971b7fa
PA
26459ac_delim='%!_!# '
26460for ac_last_try in false false false false false :; do
26461 . ./conf$$subs.sh ||
d0ac1c44 26462 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
26463
26464 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
26465 if test $ac_delim_n = $ac_delim_num; then
26466 break
26467 elif $ac_last_try; then
d0ac1c44 26468 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
26469 else
26470 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26471 fi
26472done
26473rm -f conf$$subs.sh
26474
26475cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
d0ac1c44 26476cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
c971b7fa
PA
26477_ACEOF
26478sed -n '
26479h
26480s/^/S["/; s/!.*/"]=/
26481p
26482g
26483s/^[^!]*!//
26484:repl
26485t repl
26486s/'"$ac_delim"'$//
26487t delim
26488:nl
26489h
d0ac1c44 26490s/\(.\{148\}\)..*/\1/
c971b7fa
PA
26491t more1
26492s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26493p
26494n
26495b repl
26496:more1
26497s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26498p
26499g
26500s/.\{148\}//
26501t nl
26502:delim
26503h
d0ac1c44 26504s/\(.\{148\}\)..*/\1/
c971b7fa
PA
26505t more2
26506s/["\\]/\\&/g; s/^/"/; s/$/"/
26507p
26508b
26509:more2
26510s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26511p
26512g
26513s/.\{148\}//
26514t delim
26515' <conf$$subs.awk | sed '
26516/^[^""]/{
26517 N
26518 s/\n//
26519}
26520' >>$CONFIG_STATUS || ac_write_fail=1
26521rm -f conf$$subs.awk
26522cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26523_ACAWK
d0ac1c44 26524cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
c971b7fa
PA
26525 for (key in S) S_is_set[key] = 1
26526 FS = "\a"
26527
26528}
26529{
26530 line = $ 0
26531 nfields = split(line, field, "@")
26532 substed = 0
26533 len = length(field[1])
26534 for (i = 2; i < nfields; i++) {
26535 key = field[i]
26536 keylen = length(key)
26537 if (S_is_set[key]) {
26538 value = S[key]
26539 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
26540 len += length(value) + length(field[++i])
26541 substed = 1
26542 } else
26543 len += 1 + keylen
26544 }
26545
26546 print line
26547}
26548
26549_ACAWK
26550_ACEOF
26551cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26552if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
26553 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
26554else
26555 cat
d0ac1c44
SM
26556fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
26557 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
c971b7fa
PA
26558_ACEOF
26559
d0ac1c44
SM
26560# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
26561# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
c971b7fa
PA
26562# trailing colons and then remove the whole line if VPATH becomes empty
26563# (actually we leave an empty line to preserve line numbers).
26564if test "x$srcdir" = x.; then
d0ac1c44
SM
26565 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
26566h
26567s///
26568s/^/:/
26569s/[ ]*$/:/
26570s/:\$(srcdir):/:/g
26571s/:\${srcdir}:/:/g
26572s/:@srcdir@:/:/g
26573s/^:*//
c971b7fa 26574s/:*$//
d0ac1c44
SM
26575x
26576s/\(=[ ]*\).*/\1/
26577G
26578s/\n//
c971b7fa
PA
26579s/^[^=]*=[ ]*$//
26580}'
26581fi
26582
26583cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26584fi # test -n "$CONFIG_FILES"
26585
26586# Set up the scripts for CONFIG_HEADERS section.
26587# No need to generate them if there are no CONFIG_HEADERS.
26588# This happens for instance with `./config.status Makefile'.
26589if test -n "$CONFIG_HEADERS"; then
d0ac1c44 26590cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
c971b7fa
PA
26591BEGIN {
26592_ACEOF
26593
26594# Transform confdefs.h into an awk script `defines.awk', embedded as
26595# here-document in config.status, that substitutes the proper values into
26596# config.h.in to produce config.h.
26597
26598# Create a delimiter string that does not exist in confdefs.h, to ease
26599# handling of long lines.
26600ac_delim='%!_!# '
26601for ac_last_try in false false :; do
d0ac1c44
SM
26602 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
26603 if test -z "$ac_tt"; then
c971b7fa
PA
26604 break
26605 elif $ac_last_try; then
d0ac1c44 26606 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
c971b7fa
PA
26607 else
26608 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26609 fi
26610done
26611
26612# For the awk script, D is an array of macro values keyed by name,
26613# likewise P contains macro parameters if any. Preserve backslash
26614# newline sequences.
26615
26616ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26617sed -n '
26618s/.\{148\}/&'"$ac_delim"'/g
26619t rset
26620:rset
26621s/^[ ]*#[ ]*define[ ][ ]*/ /
26622t def
26623d
26624:def
26625s/\\$//
26626t bsnl
26627s/["\\]/\\&/g
26628s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26629D["\1"]=" \3"/p
26630s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
26631d
26632:bsnl
26633s/["\\]/\\&/g
26634s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26635D["\1"]=" \3\\\\\\n"\\/p
26636t cont
26637s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26638t cont
26639d
26640:cont
26641n
26642s/.\{148\}/&'"$ac_delim"'/g
26643t clear
26644:clear
26645s/\\$//
26646t bsnlc
26647s/["\\]/\\&/g; s/^/"/; s/$/"/p
26648d
26649:bsnlc
26650s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26651b cont
26652' <confdefs.h | sed '
26653s/'"$ac_delim"'/"\\\
26654"/g' >>$CONFIG_STATUS || ac_write_fail=1
26655
26656cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26657 for (key in D) D_is_set[key] = 1
26658 FS = "\a"
26659}
26660/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26661 line = \$ 0
26662 split(line, arg, " ")
26663 if (arg[1] == "#") {
26664 defundef = arg[2]
26665 mac1 = arg[3]
26666 } else {
26667 defundef = substr(arg[1], 2)
26668 mac1 = arg[2]
26669 }
26670 split(mac1, mac2, "(") #)
26671 macro = mac2[1]
26672 prefix = substr(line, 1, index(line, defundef) - 1)
26673 if (D_is_set[macro]) {
26674 # Preserve the white space surrounding the "#".
26675 print prefix "define", macro P[macro] D[macro]
26676 next
26677 } else {
26678 # Replace #undef with comments. This is necessary, for example,
26679 # in the case of _POSIX_SOURCE, which is predefined and required
26680 # on some systems where configure will not decide to define it.
26681 if (defundef == "undef") {
26682 print "/*", prefix defundef, macro, "*/"
26683 next
26684 }
26685 }
26686}
26687{ print }
26688_ACAWK
26689_ACEOF
26690cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
d0ac1c44 26691 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
c971b7fa
PA
26692fi # test -n "$CONFIG_HEADERS"
26693
26694
26695eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
26696shift
26697for ac_tag
26698do
26699 case $ac_tag in
26700 :[FHLC]) ac_mode=$ac_tag; continue;;
26701 esac
26702 case $ac_mode$ac_tag in
26703 :[FHL]*:*);;
d0ac1c44 26704 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
c971b7fa
PA
26705 :[FH]-) ac_tag=-:-;;
26706 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26707 esac
26708 ac_save_IFS=$IFS
26709 IFS=:
26710 set x $ac_tag
26711 IFS=$ac_save_IFS
26712 shift
26713 ac_file=$1
26714 shift
26715
26716 case $ac_mode in
26717 :L) ac_source=$1;;
26718 :[FH])
26719 ac_file_inputs=
26720 for ac_f
26721 do
26722 case $ac_f in
d0ac1c44 26723 -) ac_f="$ac_tmp/stdin";;
c971b7fa
PA
26724 *) # Look for the file first in the build tree, then in the source tree
26725 # (if the path is not absolute). The absolute path cannot be DOS-style,
26726 # because $ac_f cannot contain `:'.
26727 test -f "$ac_f" ||
26728 case $ac_f in
26729 [\\/$]*) false;;
26730 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26731 esac ||
d0ac1c44 26732 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
c971b7fa
PA
26733 esac
26734 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26735 as_fn_append ac_file_inputs " '$ac_f'"
26736 done
26737
26738 # Let's still pretend it is `configure' which instantiates (i.e., don't
26739 # use $as_me), people would be surprised to read:
26740 # /* config.h. Generated by config.status. */
26741 configure_input='Generated from '`
26742 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26743 `' by configure.'
26744 if test x"$ac_file" != x-; then
26745 configure_input="$ac_file. $configure_input"
26746 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
26747$as_echo "$as_me: creating $ac_file" >&6;}
26748 fi
26749 # Neutralize special characters interpreted by sed in replacement strings.
26750 case $configure_input in #(
26751 *\&* | *\|* | *\\* )
26752 ac_sed_conf_input=`$as_echo "$configure_input" |
26753 sed 's/[\\\\&|]/\\\\&/g'`;; #(
26754 *) ac_sed_conf_input=$configure_input;;
26755 esac
26756
26757 case $ac_tag in
d0ac1c44
SM
26758 *:-:* | *:-) cat >"$ac_tmp/stdin" \
26759 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
c971b7fa
PA
26760 esac
26761 ;;
26762 esac
26763
26764 ac_dir=`$as_dirname -- "$ac_file" ||
26765$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26766 X"$ac_file" : 'X\(//\)[^/]' \| \
26767 X"$ac_file" : 'X\(//\)$' \| \
26768 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26769$as_echo X"$ac_file" |
26770 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26771 s//\1/
26772 q
26773 }
26774 /^X\(\/\/\)[^/].*/{
26775 s//\1/
26776 q
26777 }
26778 /^X\(\/\/\)$/{
26779 s//\1/
26780 q
26781 }
26782 /^X\(\/\).*/{
26783 s//\1/
26784 q
26785 }
26786 s/.*/./; q'`
26787 as_dir="$ac_dir"; as_fn_mkdir_p
26788 ac_builddir=.
26789
26790case "$ac_dir" in
26791.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26792*)
26793 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
26794 # A ".." for each directory in $ac_dir_suffix.
26795 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
26796 case $ac_top_builddir_sub in
26797 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26798 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26799 esac ;;
26800esac
26801ac_abs_top_builddir=$ac_pwd
26802ac_abs_builddir=$ac_pwd$ac_dir_suffix
26803# for backward compatibility:
26804ac_top_builddir=$ac_top_build_prefix
26805
26806case $srcdir in
26807 .) # We are building in place.
26808 ac_srcdir=.
26809 ac_top_srcdir=$ac_top_builddir_sub
26810 ac_abs_top_srcdir=$ac_pwd ;;
26811 [\\/]* | ?:[\\/]* ) # Absolute name.
26812 ac_srcdir=$srcdir$ac_dir_suffix;
26813 ac_top_srcdir=$srcdir
26814 ac_abs_top_srcdir=$srcdir ;;
26815 *) # Relative name.
26816 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26817 ac_top_srcdir=$ac_top_build_prefix$srcdir
26818 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
26819esac
26820ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
26821
26822
26823 case $ac_mode in
26824 :F)
26825 #
26826 # CONFIG_FILE
26827 #
26828
26829 case $INSTALL in
26830 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26831 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
26832 esac
26833 ac_MKDIR_P=$MKDIR_P
26834 case $MKDIR_P in
26835 [\\/$]* | ?:[\\/]* ) ;;
26836 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
26837 esac
26838_ACEOF
26839
26840cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26841# If the template does not know about datarootdir, expand it.
26842# FIXME: This hack should be removed a few years after 2.60.
26843ac_datarootdir_hack=; ac_datarootdir_seen=
26844ac_sed_dataroot='
26845/datarootdir/ {
26846 p
26847 q
26848}
26849/@datadir@/p
26850/@docdir@/p
26851/@infodir@/p
26852/@localedir@/p
26853/@mandir@/p'
26854case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
26855*datarootdir*) ac_datarootdir_seen=yes;;
26856*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26858$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26859_ACEOF
26860cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26861 ac_datarootdir_hack='
26862 s&@datadir@&$datadir&g
26863 s&@docdir@&$docdir&g
26864 s&@infodir@&$infodir&g
26865 s&@localedir@&$localedir&g
26866 s&@mandir@&$mandir&g
26867 s&\\\${datarootdir}&$datarootdir&g' ;;
26868esac
26869_ACEOF
26870
26871# Neutralize VPATH when `$srcdir' = `.'.
26872# Shell code in configure.ac might set extrasub.
26873# FIXME: do we really want to maintain this feature?
26874cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26875ac_sed_extra="$ac_vpsub
26876$extrasub
26877_ACEOF
26878cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26879:t
26880/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26881s|@configure_input@|$ac_sed_conf_input|;t t
26882s&@top_builddir@&$ac_top_builddir_sub&;t t
26883s&@top_build_prefix@&$ac_top_build_prefix&;t t
26884s&@srcdir@&$ac_srcdir&;t t
26885s&@abs_srcdir@&$ac_abs_srcdir&;t t
26886s&@top_srcdir@&$ac_top_srcdir&;t t
26887s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26888s&@builddir@&$ac_builddir&;t t
26889s&@abs_builddir@&$ac_abs_builddir&;t t
26890s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26891s&@INSTALL@&$ac_INSTALL&;t t
26892s&@MKDIR_P@&$ac_MKDIR_P&;t t
26893$ac_datarootdir_hack
26894"
d0ac1c44
SM
26895eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
26896 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
26897
26898test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
d0ac1c44
SM
26899 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
26900 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
26901 "$ac_tmp/out"`; test -z "$ac_out"; } &&
c971b7fa 26902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 26903which seems to be undefined. Please make sure it is defined" >&5
c971b7fa 26904$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
d0ac1c44 26905which seems to be undefined. Please make sure it is defined" >&2;}
c971b7fa 26906
d0ac1c44 26907 rm -f "$ac_tmp/stdin"
c971b7fa 26908 case $ac_file in
d0ac1c44
SM
26909 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
26910 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
c971b7fa 26911 esac \
d0ac1c44 26912 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
26913 ;;
26914 :H)
26915 #
26916 # CONFIG_HEADER
26917 #
26918 if test x"$ac_file" != x-; then
26919 {
26920 $as_echo "/* $configure_input */" \
d0ac1c44
SM
26921 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
26922 } >"$ac_tmp/config.h" \
26923 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26924 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
c971b7fa
PA
26925 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26926$as_echo "$as_me: $ac_file is unchanged" >&6;}
26927 else
26928 rm -f "$ac_file"
d0ac1c44
SM
26929 mv "$ac_tmp/config.h" "$ac_file" \
26930 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
c971b7fa
PA
26931 fi
26932 else
26933 $as_echo "/* $configure_input */" \
d0ac1c44
SM
26934 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
26935 || as_fn_error $? "could not create -" "$LINENO" 5
c971b7fa
PA
26936 fi
26937# Compute "$ac_file"'s index in $config_headers.
26938_am_arg="$ac_file"
26939_am_stamp_count=1
26940for _am_header in $config_headers :; do
26941 case $_am_header in
26942 $_am_arg | $_am_arg:* )
26943 break ;;
26944 * )
26945 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
26946 esac
26947done
26948echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
26949$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26950 X"$_am_arg" : 'X\(//\)[^/]' \| \
26951 X"$_am_arg" : 'X\(//\)$' \| \
26952 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
26953$as_echo X"$_am_arg" |
26954 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26955 s//\1/
26956 q
26957 }
26958 /^X\(\/\/\)[^/].*/{
26959 s//\1/
26960 q
26961 }
26962 /^X\(\/\/\)$/{
26963 s//\1/
26964 q
26965 }
26966 /^X\(\/\).*/{
26967 s//\1/
26968 q
26969 }
26970 s/.*/./; q'`/stamp-h$_am_stamp_count
26971 ;;
26972
26973 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26974$as_echo "$as_me: executing $ac_file commands" >&6;}
26975 ;;
26976 esac
26977
26978
26979 case $ac_file$ac_mode in
26980 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
d0ac1c44 26981 # Older Autoconf quotes --file arguments for eval, but not when files
c971b7fa
PA
26982 # are listed without --file. Let's play safe and only enable the eval
26983 # if we detect the quoting.
26984 case $CONFIG_FILES in
26985 *\'*) eval set x "$CONFIG_FILES" ;;
26986 *) set x $CONFIG_FILES ;;
26987 esac
26988 shift
26989 for mf
26990 do
26991 # Strip MF so we end up with the name of the file.
26992 mf=`echo "$mf" | sed -e 's/:.*$//'`
26993 # Check whether this is an Automake generated Makefile or not.
d0ac1c44 26994 # We used to match only the files named 'Makefile.in', but
c971b7fa
PA
26995 # some people rename them; so instead we look at the file content.
26996 # Grep'ing the first line is not enough: some people post-process
26997 # each Makefile.in and add a new line on top of each file to say so.
26998 # Grep'ing the whole file is not good either: AIX grep has a line
26999 # limit of 2048, but all sed's we know have understand at least 4000.
27000 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
27001 dirpart=`$as_dirname -- "$mf" ||
27002$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27003 X"$mf" : 'X\(//\)[^/]' \| \
27004 X"$mf" : 'X\(//\)$' \| \
27005 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
27006$as_echo X"$mf" |
27007 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27008 s//\1/
27009 q
27010 }
27011 /^X\(\/\/\)[^/].*/{
27012 s//\1/
27013 q
27014 }
27015 /^X\(\/\/\)$/{
27016 s//\1/
27017 q
27018 }
27019 /^X\(\/\).*/{
27020 s//\1/
27021 q
27022 }
27023 s/.*/./; q'`
27024 else
27025 continue
27026 fi
27027 # Extract the definition of DEPDIR, am__include, and am__quote
d0ac1c44 27028 # from the Makefile without running 'make'.
c971b7fa
PA
27029 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
27030 test -z "$DEPDIR" && continue
27031 am__include=`sed -n 's/^am__include = //p' < "$mf"`
d0ac1c44 27032 test -z "$am__include" && continue
c971b7fa 27033 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
c971b7fa
PA
27034 # Find all dependency output files, they are included files with
27035 # $(DEPDIR) in their names. We invoke sed twice because it is the
27036 # simplest approach to changing $(DEPDIR) to its actual value in the
27037 # expansion.
27038 for file in `sed -n "
27039 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
d0ac1c44 27040 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
c971b7fa
PA
27041 # Make sure the directory exists.
27042 test -f "$dirpart/$file" && continue
27043 fdir=`$as_dirname -- "$file" ||
27044$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27045 X"$file" : 'X\(//\)[^/]' \| \
27046 X"$file" : 'X\(//\)$' \| \
27047 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
27048$as_echo X"$file" |
27049 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27050 s//\1/
27051 q
27052 }
27053 /^X\(\/\/\)[^/].*/{
27054 s//\1/
27055 q
27056 }
27057 /^X\(\/\/\)$/{
27058 s//\1/
27059 q
27060 }
27061 /^X\(\/\).*/{
27062 s//\1/
27063 q
27064 }
27065 s/.*/./; q'`
27066 as_dir=$dirpart/$fdir; as_fn_mkdir_p
27067 # echo "creating $dirpart/$file"
27068 echo '# dummy' > "$dirpart/$file"
27069 done
27070 done
27071}
27072 ;;
27073 "default":C)
27074case x$CONFIG_HEADERS in
27075xconfig.h:config.in)
27076echo > stamp-h ;;
27077esac
27078 ;;
27079
27080 esac
27081done # for ac_tag
27082
27083
27084as_fn_exit 0
27085_ACEOF
27086ac_clean_files=$ac_clean_files_save
27087
27088test $ac_write_fail = 0 ||
d0ac1c44 27089 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
c971b7fa
PA
27090
27091
27092# configure is writing to config.log, and then calls config.status.
27093# config.status does its own redirection, appending to config.log.
27094# Unfortunately, on DOS this fails, as config.log is still kept open
27095# by configure, so config.status won't be able to write to it; its
27096# output is simply discarded. So we exec the FD to /dev/null,
27097# effectively closing config.log, so it can be properly (re)opened and
27098# appended to by config.status. When coming back to configure, we
27099# need to make the FD available again.
27100if test "$no_create" != yes; then
27101 ac_cs_success=:
27102 ac_config_status_args=
27103 test "$silent" = yes &&
27104 ac_config_status_args="$ac_config_status_args --quiet"
27105 exec 5>/dev/null
27106 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
27107 exec 5>>config.log
27108 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27109 # would make configure fail if this is the last instruction.
d0ac1c44 27110 $ac_cs_success || as_fn_exit 1
c971b7fa
PA
27111fi
27112if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
27113 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
27114$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
27115fi
27116
27117
27118exit 0