blob: bf972d31d9c3a2c685230fbbdbf914cf49cfa30a [file] [log] [blame]
Andrew Sutherlandedc69332013-06-13 19:21:25 -05001#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for wget 1.14.
4#
5# Report bugs to <bug-wget@gnu.org>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20 emulate sh
21 NULLCMD=:
22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
25 setopt NO_GLOB_SUBST
26else
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
102IFS=$as_save_IFS
103
104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-wget@gnu.org
270$0: about your system, including any error possibly output
271$0: before this message. Then install a modern shell, or
272$0: manually run the script under such a shell if you do
273$0: have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417 fi
418 $as_echo "$as_me: error: $2" >&2
419 as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
477 sed '
478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
482 N
483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485 t loop
486 s/-\n.*//
487 ' >$as_me.lineno &&
488 chmod +x "$as_me.lineno" ||
489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
499 # Exit status is that of the last command.
500 exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506 case `echo 'xy\c'` in
507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
511 esac;;
512*)
513 ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
521 mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529 # In both cases, we have to default to `cp -pR'.
530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531 as_ln_s='cp -pR'
532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
535 as_ln_s='cp -pR'
536 fi
537else
538 as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544 as_mkdir_p='mkdir -p "$as_dir"'
545else
546 test -d ./-p && rmdir ./-p
547 as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='wget'
582PACKAGE_TARNAME='wget'
583PACKAGE_VERSION='1.14'
584PACKAGE_STRING='wget 1.14'
585PACKAGE_BUGREPORT='bug-wget@gnu.org'
586PACKAGE_URL=''
587
588ac_unique_file="src/wget.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
592#ifdef HAVE_SYS_TYPES_H
593# include <sys/types.h>
594#endif
595#ifdef HAVE_SYS_STAT_H
596# include <sys/stat.h>
597#endif
598#ifdef STDC_HEADERS
599# include <stdlib.h>
600# include <stddef.h>
601#else
602# ifdef HAVE_STDLIB_H
603# include <stdlib.h>
604# endif
605#endif
606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
608# include <memory.h>
609# endif
610# include <string.h>
611#endif
612#ifdef HAVE_STRINGS_H
613# include <strings.h>
614#endif
615#ifdef HAVE_INTTYPES_H
616# include <inttypes.h>
617#endif
618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
622# include <unistd.h>
623#endif"
624
625gl_use_threads_default=
626gt_needs=
627ac_header_list=
628ac_func_list=
629gl_getopt_required=POSIX
630gl_getopt_required=POSIX
631ac_subst_vars='gltests_LTLIBOBJS
632gltests_LIBOBJS
633gl_LTLIBOBJS
634gl_LIBOBJS
635CONFIG_INCLUDE
636am__EXEEXT_FALSE
637am__EXEEXT_TRUE
638LTLIBOBJS
639IRI_IS_ENABLED_FALSE
640IRI_IS_ENABLED_TRUE
641COMMENT_IF_NO_POD2MAN
642POD2MAN
643PERL
644LIBGNUTLS_PREFIX
645LTLIBGNUTLS
646LIBGNUTLS
647HAVE_LIBGNUTLS
648LIBSSL_PREFIX
649LTLIBSSL
650LIBSSL
651HAVE_LIBSSL
652LIBOBJS
653LIBGNU_LTLIBDEPS
654LIBGNU_LIBDEPS
655gltests_WITNESS
656REPLACE_TOWLOWER
657REPLACE_ISWCNTRL
658HAVE_WCTYPE_H
659NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
660NEXT_WCTYPE_H
661HAVE_ISWCNTRL
662REPLACE_ISWBLANK
663HAVE_WCTRANS_T
664HAVE_WCTYPE_T
665HAVE_ISWBLANK
666GNULIB_TOWCTRANS
667GNULIB_WCTRANS
668GNULIB_ISWCTYPE
669GNULIB_WCTYPE
670GNULIB_ISWBLANK
671HAVE_WINT_T
672NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
673NEXT_WCHAR_H
674HAVE_UNISTD_H
675NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
676NEXT_UNISTD_H
677PTHREAD_H_DEFINES_STRUCT_TIMESPEC
678SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
679TIME_H_DEFINES_STRUCT_TIMESPEC
680NEXT_AS_FIRST_DIRECTIVE_TIME_H
681NEXT_TIME_H
682REPLACE_TIMEGM
683REPLACE_NANOSLEEP
684REPLACE_MKTIME
685REPLACE_LOCALTIME_R
686HAVE_TIMEGM
687HAVE_STRPTIME
688HAVE_NANOSLEEP
689HAVE_DECL_LOCALTIME_R
690GNULIB_TIME_R
691GNULIB_TIMEGM
692GNULIB_STRPTIME
693GNULIB_NANOSLEEP
694GNULIB_MKTIME
695NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
696NEXT_SYS_WAIT_H
697GNULIB_WAITPID
698HAVE_SYS_UIO_H
699NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
700NEXT_SYS_UIO_H
701NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
702NEXT_SYS_IOCTL_H
703HAVE_SYS_IOCTL_H
704HAVE_STRINGS_H
705NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
706NEXT_STRINGS_H
707NEXT_AS_FIRST_DIRECTIVE_STRING_H
708NEXT_STRING_H
709HAVE_DECL_STRNCASECMP
710HAVE_STRCASECMP
711HAVE_FFS
712GNULIB_FFS
713NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
714NEXT_STDLIB_H
715NEXT_AS_FIRST_DIRECTIVE_STDIO_H
716NEXT_STDIO_H
717GL_GENERATE_STDINT_H_FALSE
718GL_GENERATE_STDINT_H_TRUE
719STDINT_H
720WINT_T_SUFFIX
721WCHAR_T_SUFFIX
722SIG_ATOMIC_T_SUFFIX
723SIZE_T_SUFFIX
724PTRDIFF_T_SUFFIX
725HAVE_SIGNED_WINT_T
726HAVE_SIGNED_WCHAR_T
727HAVE_SIGNED_SIG_ATOMIC_T
728BITSIZEOF_WINT_T
729BITSIZEOF_WCHAR_T
730BITSIZEOF_SIG_ATOMIC_T
731BITSIZEOF_SIZE_T
732BITSIZEOF_PTRDIFF_T
733HAVE_SYS_BITYPES_H
734HAVE_SYS_INTTYPES_H
735HAVE_STDINT_H
736NEXT_AS_FIRST_DIRECTIVE_STDINT_H
737NEXT_STDINT_H
738HAVE_SYS_TYPES_H
739HAVE_INTTYPES_H
740HAVE_WCHAR_H
741HAVE_UNSIGNED_LONG_LONG_INT
742HAVE_LONG_LONG_INT
743HAVE__BOOL
744GL_GENERATE_STDBOOL_H_FALSE
745GL_GENERATE_STDBOOL_H_TRUE
746STDBOOL_H
747GL_GENERATE_STDALIGN_H_FALSE
748GL_GENERATE_STDALIGN_H_TRUE
749STDALIGN_H
750HAVE_SPAWN_H
751NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
752NEXT_SPAWN_H
753ASM_SYMBOL_PREFIX
754NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
755NEXT_SIGNAL_H
756LIB_SELECT
757LIBSOCKET
758HAVE_SYS_SELECT_H
759NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
760NEXT_SYS_SELECT_H
761REPLACE_SELECT
762REPLACE_PSELECT
763HAVE_PSELECT
764GNULIB_SELECT
765GNULIB_PSELECT
766GL_GENERATE_SCHED_H_FALSE
767GL_GENERATE_SCHED_H_TRUE
768SCHED_H
769HAVE_STRUCT_SCHED_PARAM
770HAVE_SCHED_H
771NEXT_AS_FIRST_DIRECTIVE_SCHED_H
772NEXT_SCHED_H
773REPLACE_RAISE
774REPLACE_PTHREAD_SIGMASK
775HAVE_SIGHANDLER_T
776HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
777HAVE_STRUCT_SIGACTION_SA_SIGACTION
778HAVE_SIGACTION
779HAVE_SIGINFO_T
780HAVE_SIGSET_T
781HAVE_RAISE
782HAVE_PTHREAD_SIGMASK
783HAVE_POSIX_SIGNALBLOCKING
784GNULIB_SIGACTION
785GNULIB_SIGPROCMASK
786GNULIB_SIGNAL_H_SIGPIPE
787GNULIB_RAISE
788GNULIB_PTHREAD_SIGMASK
789REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
790REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
791REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
792REPLACE_POSIX_SPAWN
793HAVE_POSIX_SPAWN_FILE_ACTIONS_T
794HAVE_POSIX_SPAWNATTR_T
795HAVE_POSIX_SPAWN
796GNULIB_POSIX_SPAWNATTR_DESTROY
797GNULIB_POSIX_SPAWNATTR_SETSIGMASK
798GNULIB_POSIX_SPAWNATTR_GETSIGMASK
799GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
800GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
801GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
802GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
803GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
804GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
805GNULIB_POSIX_SPAWNATTR_SETPGROUP
806GNULIB_POSIX_SPAWNATTR_GETPGROUP
807GNULIB_POSIX_SPAWNATTR_SETFLAGS
808GNULIB_POSIX_SPAWNATTR_GETFLAGS
809GNULIB_POSIX_SPAWNATTR_INIT
810GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
811GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
812GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
813GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
814GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
815GNULIB_POSIX_SPAWNP
816GNULIB_POSIX_SPAWN
817GL_GENERATE_NETINET_IN_H_FALSE
818GL_GENERATE_NETINET_IN_H_TRUE
819NETINET_IN_H
820HAVE_NETINET_IN_H
821NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
822NEXT_NETINET_IN_H
823APPLE_UNIVERSAL_BUILD
824UNDEFINE_STRTOK_R
825REPLACE_STRTOK_R
826REPLACE_STRSIGNAL
827REPLACE_STRNLEN
828REPLACE_STRNDUP
829REPLACE_STRNCAT
830REPLACE_STRERROR_R
831REPLACE_STRERROR
832REPLACE_STRCHRNUL
833REPLACE_STRCASESTR
834REPLACE_STRSTR
835REPLACE_STRDUP
836REPLACE_STPNCPY
837REPLACE_MEMMEM
838REPLACE_MEMCHR
839HAVE_STRVERSCMP
840HAVE_DECL_STRSIGNAL
841HAVE_DECL_STRERROR_R
842HAVE_DECL_STRTOK_R
843HAVE_STRCASESTR
844HAVE_STRSEP
845HAVE_STRPBRK
846HAVE_DECL_STRNLEN
847HAVE_DECL_STRNDUP
848HAVE_DECL_STRDUP
849HAVE_STRCHRNUL
850HAVE_STPNCPY
851HAVE_STPCPY
852HAVE_RAWMEMCHR
853HAVE_DECL_MEMRCHR
854HAVE_MEMPCPY
855HAVE_DECL_MEMMEM
856HAVE_MEMCHR
857HAVE_FFSLL
858HAVE_FFSL
859HAVE_MBSLEN
860GNULIB_STRVERSCMP
861GNULIB_STRSIGNAL
862GNULIB_STRERROR_R
863GNULIB_STRERROR
864GNULIB_MBSTOK_R
865GNULIB_MBSSEP
866GNULIB_MBSSPN
867GNULIB_MBSPBRK
868GNULIB_MBSCSPN
869GNULIB_MBSCASESTR
870GNULIB_MBSPCASECMP
871GNULIB_MBSNCASECMP
872GNULIB_MBSCASECMP
873GNULIB_MBSSTR
874GNULIB_MBSRCHR
875GNULIB_MBSCHR
876GNULIB_MBSNLEN
877GNULIB_MBSLEN
878GNULIB_STRTOK_R
879GNULIB_STRCASESTR
880GNULIB_STRSTR
881GNULIB_STRSEP
882GNULIB_STRPBRK
883GNULIB_STRNLEN
884GNULIB_STRNDUP
885GNULIB_STRNCAT
886GNULIB_STRDUP
887GNULIB_STRCHRNUL
888GNULIB_STPNCPY
889GNULIB_STPCPY
890GNULIB_RAWMEMCHR
891GNULIB_MEMRCHR
892GNULIB_MEMPCPY
893GNULIB_MEMMEM
894GNULIB_MEMCHR
895GNULIB_FFSLL
896GNULIB_FFSL
897LOCALE_FR_UTF8
898LOCALE_ZH_CN
899LOCALE_JA
900REPLACE_WCTOMB
901REPLACE_UNSETENV
902REPLACE_STRTOD
903REPLACE_SETENV
904REPLACE_REALPATH
905REPLACE_REALLOC
906REPLACE_RANDOM_R
907REPLACE_PUTENV
908REPLACE_PTSNAME_R
909REPLACE_MKSTEMP
910REPLACE_MBTOWC
911REPLACE_MALLOC
912REPLACE_CANONICALIZE_FILE_NAME
913REPLACE_CALLOC
914HAVE_DECL_UNSETENV
915HAVE_UNLOCKPT
916HAVE_SYS_LOADAVG_H
917HAVE_STRUCT_RANDOM_DATA
918HAVE_STRTOULL
919HAVE_STRTOLL
920HAVE_STRTOD
921HAVE_DECL_SETENV
922HAVE_SETENV
923HAVE_RPMATCH
924HAVE_REALPATH
925HAVE_RANDOM_R
926HAVE_RANDOM_H
927HAVE_RANDOM
928HAVE_PTSNAME_R
929HAVE_PTSNAME
930HAVE_POSIX_OPENPT
931HAVE_MKSTEMPS
932HAVE_MKSTEMP
933HAVE_MKOSTEMPS
934HAVE_MKOSTEMP
935HAVE_MKDTEMP
936HAVE_GRANTPT
937HAVE_GETSUBOPT
938HAVE_DECL_GETLOADAVG
939HAVE_CANONICALIZE_FILE_NAME
940HAVE_ATOLL
941HAVE__EXIT
942GNULIB_WCTOMB
943GNULIB_UNSETENV
944GNULIB_UNLOCKPT
945GNULIB_SYSTEM_POSIX
946GNULIB_STRTOULL
947GNULIB_STRTOLL
948GNULIB_STRTOD
949GNULIB_SETENV
950GNULIB_RPMATCH
951GNULIB_REALPATH
952GNULIB_REALLOC_POSIX
953GNULIB_RANDOM_R
954GNULIB_RANDOM
955GNULIB_PUTENV
956GNULIB_PTSNAME_R
957GNULIB_PTSNAME
958GNULIB_POSIX_OPENPT
959GNULIB_MKSTEMPS
960GNULIB_MKSTEMP
961GNULIB_MKOSTEMPS
962GNULIB_MKOSTEMP
963GNULIB_MKDTEMP
964GNULIB_MBTOWC
965GNULIB_MALLOC_POSIX
966GNULIB_GRANTPT
967GNULIB_GETSUBOPT
968GNULIB_GETLOADAVG
969GNULIB_CANONICALIZE_FILE_NAME
970GNULIB_CALLOC_POSIX
971GNULIB_ATOLL
972GNULIB__EXIT
973LTLIBMULTITHREAD
974LIBMULTITHREAD
975LTLIBTHREAD
976LIBTHREAD
977LIBPTH_PREFIX
978LTLIBPTH
979LIBPTH
980NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
981NEXT_LOCALE_H
982HAVE_XLOCALE_H
983NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
984NEXT_STDDEF_H
985GL_GENERATE_STDDEF_H_FALSE
986GL_GENERATE_STDDEF_H_TRUE
987STDDEF_H
988HAVE_WCHAR_T
989REPLACE_NULL
990REPLACE_STRUCT_LCONV
991REPLACE_DUPLOCALE
992REPLACE_SETLOCALE
993REPLACE_LOCALECONV
994HAVE_DUPLOCALE
995GNULIB_DUPLOCALE
996GNULIB_SETLOCALE
997GNULIB_LOCALECONV
998LOCALCHARSET_TESTS_ENVIRONMENT
999GLIBC21
1000HAVE_LANGINFO_YESEXPR
1001HAVE_LANGINFO_ERA
1002HAVE_LANGINFO_T_FMT_AMPM
1003HAVE_LANGINFO_CODESET
1004HAVE_LANGINFO_H
1005NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
1006NEXT_LANGINFO_H
1007REPLACE_NL_LANGINFO
1008HAVE_NL_LANGINFO
1009GNULIB_NL_LANGINFO
1010NEXT_AS_FIRST_DIRECTIVE_ICONV_H
1011NEXT_ICONV_H
1012GL_GENERATE_ICONV_H_FALSE
1013GL_GENERATE_ICONV_H_TRUE
1014ICONV_H
1015REPLACE_ICONV_UTF
1016REPLACE_ICONV_OPEN
1017REPLACE_ICONV
1018ICONV_CONST
1019GNULIB_ICONV
1020NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1021NEXT_SYS_TIME_H
1022REPLACE_STRUCT_TIMEVAL
1023REPLACE_GETTIMEOFDAY
1024HAVE_SYS_TIME_H
1025HAVE_STRUCT_TIMEVAL
1026HAVE_GETTIMEOFDAY
1027GNULIB_GETTIMEOFDAY
1028GNULIB_GL_UNISTD_H_GETOPT
1029GETOPT_H
1030HAVE_GETOPT_H
1031NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1032NEXT_GETOPT_H
1033GETADDRINFO_LIB
1034INET_NTOP_LIB
1035SERVENT_LIB
1036HOSTENT_LIB
1037HAVE_NETDB_H
1038NEXT_AS_FIRST_DIRECTIVE_NETDB_H
1039NEXT_NETDB_H
1040REPLACE_GAI_STRERROR
1041HAVE_DECL_GETNAMEINFO
1042HAVE_DECL_GETADDRINFO
1043HAVE_DECL_GAI_STRERROR
1044HAVE_DECL_FREEADDRINFO
1045HAVE_STRUCT_ADDRINFO
1046GNULIB_GETADDRINFO
1047WINDOWS_64_BIT_ST_SIZE
1048NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1049NEXT_SYS_STAT_H
1050REPLACE_UTIMENSAT
1051REPLACE_STAT
1052REPLACE_MKNOD
1053REPLACE_MKFIFO
1054REPLACE_MKDIR
1055REPLACE_LSTAT
1056REPLACE_FUTIMENS
1057REPLACE_FSTATAT
1058REPLACE_FSTAT
1059HAVE_UTIMENSAT
1060HAVE_MKNODAT
1061HAVE_MKNOD
1062HAVE_MKFIFOAT
1063HAVE_MKFIFO
1064HAVE_MKDIRAT
1065HAVE_LSTAT
1066HAVE_LCHMOD
1067HAVE_FUTIMENS
1068HAVE_FSTATAT
1069HAVE_FCHMODAT
1070GNULIB_UTIMENSAT
1071GNULIB_STAT
1072GNULIB_MKNODAT
1073GNULIB_MKNOD
1074GNULIB_MKFIFOAT
1075GNULIB_MKFIFO
1076GNULIB_MKDIRAT
1077GNULIB_LSTAT
1078GNULIB_LCHMOD
1079GNULIB_FUTIMENS
1080GNULIB_FSTATAT
1081GNULIB_FSTAT
1082GNULIB_FCHMODAT
1083WINDOWS_64_BIT_OFF_T
1084NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
1085NEXT_SYS_TYPES_H
1086REPLACE_VSPRINTF
1087REPLACE_VSNPRINTF
1088REPLACE_VPRINTF
1089REPLACE_VFPRINTF
1090REPLACE_VDPRINTF
1091REPLACE_VASPRINTF
1092REPLACE_TMPFILE
1093REPLACE_STDIO_WRITE_FUNCS
1094REPLACE_STDIO_READ_FUNCS
1095REPLACE_SPRINTF
1096REPLACE_SNPRINTF
1097REPLACE_RENAMEAT
1098REPLACE_RENAME
1099REPLACE_REMOVE
1100REPLACE_PRINTF
1101REPLACE_POPEN
1102REPLACE_PERROR
1103REPLACE_OBSTACK_PRINTF
1104REPLACE_GETLINE
1105REPLACE_GETDELIM
1106REPLACE_FTELLO
1107REPLACE_FTELL
1108REPLACE_FSEEKO
1109REPLACE_FSEEK
1110REPLACE_FREOPEN
1111REPLACE_FPURGE
1112REPLACE_FPRINTF
1113REPLACE_FOPEN
1114REPLACE_FFLUSH
1115REPLACE_FDOPEN
1116REPLACE_FCLOSE
1117REPLACE_DPRINTF
1118HAVE_VDPRINTF
1119HAVE_VASPRINTF
1120HAVE_RENAMEAT
1121HAVE_POPEN
1122HAVE_PCLOSE
1123HAVE_FTELLO
1124HAVE_FSEEKO
1125HAVE_DPRINTF
1126HAVE_DECL_VSNPRINTF
1127HAVE_DECL_SNPRINTF
1128HAVE_DECL_OBSTACK_PRINTF
1129HAVE_DECL_GETLINE
1130HAVE_DECL_GETDELIM
1131HAVE_DECL_FTELLO
1132HAVE_DECL_FSEEKO
1133HAVE_DECL_FPURGE
1134GNULIB_VSPRINTF_POSIX
1135GNULIB_VSNPRINTF
1136GNULIB_VPRINTF_POSIX
1137GNULIB_VPRINTF
1138GNULIB_VFPRINTF_POSIX
1139GNULIB_VFPRINTF
1140GNULIB_VDPRINTF
1141GNULIB_VSCANF
1142GNULIB_VFSCANF
1143GNULIB_VASPRINTF
1144GNULIB_TMPFILE
1145GNULIB_STDIO_H_SIGPIPE
1146GNULIB_STDIO_H_NONBLOCKING
1147GNULIB_SPRINTF_POSIX
1148GNULIB_SNPRINTF
1149GNULIB_SCANF
1150GNULIB_RENAMEAT
1151GNULIB_RENAME
1152GNULIB_REMOVE
1153GNULIB_PUTS
1154GNULIB_PUTCHAR
1155GNULIB_PUTC
1156GNULIB_PRINTF_POSIX
1157GNULIB_PRINTF
1158GNULIB_POPEN
1159GNULIB_PERROR
1160GNULIB_PCLOSE
1161GNULIB_OBSTACK_PRINTF_POSIX
1162GNULIB_OBSTACK_PRINTF
1163GNULIB_GETLINE
1164GNULIB_GETDELIM
1165GNULIB_GETCHAR
1166GNULIB_GETC
1167GNULIB_FWRITE
1168GNULIB_FTELLO
1169GNULIB_FTELL
1170GNULIB_FSEEKO
1171GNULIB_FSEEK
1172GNULIB_FSCANF
1173GNULIB_FREOPEN
1174GNULIB_FREAD
1175GNULIB_FPUTS
1176GNULIB_FPUTC
1177GNULIB_FPURGE
1178GNULIB_FPRINTF_POSIX
1179GNULIB_FPRINTF
1180GNULIB_FOPEN
1181GNULIB_FGETS
1182GNULIB_FGETC
1183GNULIB_FFLUSH
1184GNULIB_FDOPEN
1185GNULIB_FCLOSE
1186GNULIB_DPRINTF
1187REPLACE_ITOLD
1188GL_GENERATE_FLOAT_H_FALSE
1189GL_GENERATE_FLOAT_H_TRUE
1190FLOAT_H
1191NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1192NEXT_FLOAT_H
1193NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1194NEXT_FCNTL_H
1195REPLACE_OPENAT
1196REPLACE_OPEN
1197REPLACE_FCNTL
1198HAVE_OPENAT
1199HAVE_FCNTL
1200GNULIB_OPENAT
1201GNULIB_OPEN
1202GNULIB_NONBLOCKING
1203GNULIB_FCNTL
1204EOVERFLOW_VALUE
1205EOVERFLOW_HIDDEN
1206ENOLINK_VALUE
1207ENOLINK_HIDDEN
1208EMULTIHOP_VALUE
1209EMULTIHOP_HIDDEN
1210GL_GENERATE_ERRNO_H_FALSE
1211GL_GENERATE_ERRNO_H_TRUE
1212ERRNO_H
1213NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1214NEXT_ERRNO_H
1215pkglibexecdir
1216lispdir
1217HAVE_MSVC_INVALID_PARAMETER_HANDLER
1218LIB_CLOCK_GETTIME
1219LOCALE_FR
1220REPLACE_WCSWIDTH
1221REPLACE_WCWIDTH
1222REPLACE_WCSNRTOMBS
1223REPLACE_WCSRTOMBS
1224REPLACE_WCRTOMB
1225REPLACE_MBSNRTOWCS
1226REPLACE_MBSRTOWCS
1227REPLACE_MBRLEN
1228REPLACE_MBRTOWC
1229REPLACE_MBSINIT
1230REPLACE_WCTOB
1231REPLACE_BTOWC
1232REPLACE_MBSTATE_T
1233HAVE_DECL_WCWIDTH
1234HAVE_DECL_WCTOB
1235HAVE_WCSWIDTH
1236HAVE_WCSTOK
1237HAVE_WCSSTR
1238HAVE_WCSPBRK
1239HAVE_WCSSPN
1240HAVE_WCSCSPN
1241HAVE_WCSRCHR
1242HAVE_WCSCHR
1243HAVE_WCSDUP
1244HAVE_WCSXFRM
1245HAVE_WCSCOLL
1246HAVE_WCSNCASECMP
1247HAVE_WCSCASECMP
1248HAVE_WCSNCMP
1249HAVE_WCSCMP
1250HAVE_WCSNCAT
1251HAVE_WCSCAT
1252HAVE_WCPNCPY
1253HAVE_WCSNCPY
1254HAVE_WCPCPY
1255HAVE_WCSCPY
1256HAVE_WCSNLEN
1257HAVE_WCSLEN
1258HAVE_WMEMSET
1259HAVE_WMEMMOVE
1260HAVE_WMEMCPY
1261HAVE_WMEMCMP
1262HAVE_WMEMCHR
1263HAVE_WCSNRTOMBS
1264HAVE_WCSRTOMBS
1265HAVE_WCRTOMB
1266HAVE_MBSNRTOWCS
1267HAVE_MBSRTOWCS
1268HAVE_MBRLEN
1269HAVE_MBRTOWC
1270HAVE_MBSINIT
1271HAVE_BTOWC
1272GNULIB_WCSWIDTH
1273GNULIB_WCSTOK
1274GNULIB_WCSSTR
1275GNULIB_WCSPBRK
1276GNULIB_WCSSPN
1277GNULIB_WCSCSPN
1278GNULIB_WCSRCHR
1279GNULIB_WCSCHR
1280GNULIB_WCSDUP
1281GNULIB_WCSXFRM
1282GNULIB_WCSCOLL
1283GNULIB_WCSNCASECMP
1284GNULIB_WCSCASECMP
1285GNULIB_WCSNCMP
1286GNULIB_WCSCMP
1287GNULIB_WCSNCAT
1288GNULIB_WCSCAT
1289GNULIB_WCPNCPY
1290GNULIB_WCSNCPY
1291GNULIB_WCPCPY
1292GNULIB_WCSCPY
1293GNULIB_WCSNLEN
1294GNULIB_WCSLEN
1295GNULIB_WMEMSET
1296GNULIB_WMEMMOVE
1297GNULIB_WMEMCPY
1298GNULIB_WMEMCMP
1299GNULIB_WMEMCHR
1300GNULIB_WCWIDTH
1301GNULIB_WCSNRTOMBS
1302GNULIB_WCSRTOMBS
1303GNULIB_WCRTOMB
1304GNULIB_MBSNRTOWCS
1305GNULIB_MBSRTOWCS
1306GNULIB_MBRLEN
1307GNULIB_MBRTOWC
1308GNULIB_MBSINIT
1309GNULIB_WCTOB
1310GNULIB_BTOWC
1311HAVE_FEATURES_H
1312NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
1313NEXT_ARPA_INET_H
1314HAVE_ARPA_INET_H
1315REPLACE_INET_PTON
1316REPLACE_INET_NTOP
1317HAVE_DECL_INET_PTON
1318HAVE_DECL_INET_NTOP
1319GNULIB_INET_PTON
1320GNULIB_INET_NTOP
1321GL_GENERATE_ALLOCA_H_FALSE
1322GL_GENERATE_ALLOCA_H_TRUE
1323ALLOCA_H
1324ALLOCA
1325HAVE_WINSOCK2_H
1326REPLACE_IOCTL
1327SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1328SYS_IOCTL_H_HAVE_WINSOCK2_H
1329GNULIB_IOCTL
1330UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1331UNISTD_H_HAVE_WINSOCK2_H
1332REPLACE_WRITE
1333REPLACE_USLEEP
1334REPLACE_UNLINKAT
1335REPLACE_UNLINK
1336REPLACE_TTYNAME_R
1337REPLACE_SYMLINK
1338REPLACE_SLEEP
1339REPLACE_RMDIR
1340REPLACE_READLINK
1341REPLACE_READ
1342REPLACE_PWRITE
1343REPLACE_PREAD
1344REPLACE_LSEEK
1345REPLACE_LINKAT
1346REPLACE_LINK
1347REPLACE_LCHOWN
1348REPLACE_ISATTY
1349REPLACE_GETPAGESIZE
1350REPLACE_GETGROUPS
1351REPLACE_GETLOGIN_R
1352REPLACE_GETDOMAINNAME
1353REPLACE_GETCWD
1354REPLACE_FTRUNCATE
1355REPLACE_FCHOWNAT
1356REPLACE_DUP2
1357REPLACE_DUP
1358REPLACE_CLOSE
1359REPLACE_CHOWN
1360HAVE_SYS_PARAM_H
1361HAVE_OS_H
1362HAVE_DECL_TTYNAME_R
1363HAVE_DECL_SETHOSTNAME
1364HAVE_DECL_GETUSERSHELL
1365HAVE_DECL_GETPAGESIZE
1366HAVE_DECL_GETLOGIN_R
1367HAVE_DECL_GETDOMAINNAME
1368HAVE_DECL_FDATASYNC
1369HAVE_DECL_FCHDIR
1370HAVE_DECL_ENVIRON
1371HAVE_USLEEP
1372HAVE_UNLINKAT
1373HAVE_SYMLINKAT
1374HAVE_SYMLINK
1375HAVE_SLEEP
1376HAVE_SETHOSTNAME
1377HAVE_READLINKAT
1378HAVE_READLINK
1379HAVE_PWRITE
1380HAVE_PREAD
1381HAVE_PIPE2
1382HAVE_PIPE
1383HAVE_LINKAT
1384HAVE_LINK
1385HAVE_LCHOWN
1386HAVE_GROUP_MEMBER
1387HAVE_GETPAGESIZE
1388HAVE_GETLOGIN
1389HAVE_GETHOSTNAME
1390HAVE_GETGROUPS
1391HAVE_GETDTABLESIZE
1392HAVE_FTRUNCATE
1393HAVE_FSYNC
1394HAVE_FDATASYNC
1395HAVE_FCHOWNAT
1396HAVE_FCHDIR
1397HAVE_FACCESSAT
1398HAVE_EUIDACCESS
1399HAVE_DUP3
1400HAVE_DUP2
1401HAVE_CHOWN
1402GNULIB_WRITE
1403GNULIB_USLEEP
1404GNULIB_UNLINKAT
1405GNULIB_UNLINK
1406GNULIB_UNISTD_H_SIGPIPE
1407GNULIB_UNISTD_H_NONBLOCKING
1408GNULIB_TTYNAME_R
1409GNULIB_SYMLINKAT
1410GNULIB_SYMLINK
1411GNULIB_SLEEP
1412GNULIB_SETHOSTNAME
1413GNULIB_RMDIR
1414GNULIB_READLINKAT
1415GNULIB_READLINK
1416GNULIB_READ
1417GNULIB_PWRITE
1418GNULIB_PREAD
1419GNULIB_PIPE2
1420GNULIB_PIPE
1421GNULIB_LSEEK
1422GNULIB_LINKAT
1423GNULIB_LINK
1424GNULIB_LCHOWN
1425GNULIB_ISATTY
1426GNULIB_GROUP_MEMBER
1427GNULIB_GETUSERSHELL
1428GNULIB_GETPAGESIZE
1429GNULIB_GETLOGIN_R
1430GNULIB_GETLOGIN
1431GNULIB_GETHOSTNAME
1432GNULIB_GETGROUPS
1433GNULIB_GETDTABLESIZE
1434GNULIB_GETDOMAINNAME
1435GNULIB_GETCWD
1436GNULIB_FTRUNCATE
1437GNULIB_FSYNC
1438GNULIB_FDATASYNC
1439GNULIB_FCHOWNAT
1440GNULIB_FCHDIR
1441GNULIB_FACCESSAT
1442GNULIB_EUIDACCESS
1443GNULIB_ENVIRON
1444GNULIB_DUP3
1445GNULIB_DUP2
1446GNULIB_DUP
1447GNULIB_CLOSE
1448GNULIB_CHOWN
1449GNULIB_CHDIR
1450HAVE_WS2TCPIP_H
1451HAVE_SYS_SOCKET_H
1452NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
1453NEXT_SYS_SOCKET_H
1454PRAGMA_COLUMNS
1455PRAGMA_SYSTEM_HEADER
1456INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1457INCLUDE_NEXT
1458HAVE_ACCEPT4
1459HAVE_SA_FAMILY_T
1460HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
1461HAVE_STRUCT_SOCKADDR_STORAGE
1462GNULIB_ACCEPT4
1463GNULIB_SHUTDOWN
1464GNULIB_SETSOCKOPT
1465GNULIB_SENDTO
1466GNULIB_RECVFROM
1467GNULIB_SEND
1468GNULIB_RECV
1469GNULIB_LISTEN
1470GNULIB_GETSOCKOPT
1471GNULIB_GETSOCKNAME
1472GNULIB_GETPEERNAME
1473GNULIB_BIND
1474GNULIB_ACCEPT
1475GNULIB_CONNECT
1476GNULIB_SOCKET
1477GL_COND_LIBTOOL_FALSE
1478GL_COND_LIBTOOL_TRUE
1479LEXLIB
1480LEX_OUTPUT_ROOT
1481LEX
1482POSUB
1483LTLIBINTL
1484LIBINTL
1485INTLLIBS
1486LTLIBICONV
1487LIBICONV
1488INTL_MACOSX_LIBS
1489XGETTEXT_EXTRA_OPTIONS
1490MSGMERGE
1491XGETTEXT_015
1492XGETTEXT
1493GMSGFMT_015
1494MSGFMT_015
1495GMSGFMT
1496MSGFMT
1497GETTEXT_MACRO_VERSION
1498USE_NLS
1499RANLIB
1500ARFLAGS
1501AR
1502EGREP
1503GREP
1504CPP
1505am__fastdepCC_FALSE
1506am__fastdepCC_TRUE
1507CCDEPMODE
1508am__nodep
1509AMDEPBACKSLASH
1510AMDEP_FALSE
1511AMDEP_TRUE
1512am__quote
1513am__include
1514DEPDIR
1515OBJEXT
1516EXEEXT
1517ac_ct_CC
1518CPPFLAGS
1519LDFLAGS
1520CFLAGS
1521CC
1522host_os
1523host_vendor
1524host_cpu
1525host
1526build_os
1527build_vendor
1528build_cpu
1529build
1530am__untar
1531am__tar
1532AMTAR
1533am__leading_dot
1534SET_MAKE
1535AWK
1536mkdir_p
1537MKDIR_P
1538INSTALL_STRIP_PROGRAM
1539STRIP
1540install_sh
1541MAKEINFO
1542AUTOHEADER
1543AUTOMAKE
1544AUTOCONF
1545ACLOCAL
1546VERSION
1547PACKAGE
1548CYGPATH_W
1549am__isrc
1550INSTALL_DATA
1551INSTALL_SCRIPT
1552INSTALL_PROGRAM
1553target_alias
1554host_alias
1555build_alias
1556LIBS
1557ECHO_T
1558ECHO_N
1559ECHO_C
1560DEFS
1561mandir
1562localedir
1563libdir
1564psdir
1565pdfdir
1566dvidir
1567htmldir
1568infodir
1569docdir
1570oldincludedir
1571includedir
1572localstatedir
1573sharedstatedir
1574sysconfdir
1575datadir
1576datarootdir
1577libexecdir
1578sbindir
1579bindir
1580program_transform_name
1581prefix
1582exec_prefix
1583PACKAGE_URL
1584PACKAGE_BUGREPORT
1585PACKAGE_STRING
1586PACKAGE_VERSION
1587PACKAGE_TARNAME
1588PACKAGE_NAME
1589PATH_SEPARATOR
1590SHELL'
1591ac_subst_files=''
1592ac_user_opts='
1593enable_option_checking
1594with_ssl
1595with_zlib
1596enable_opie
1597enable_digest
1598enable_ntlm
1599enable_debug
1600enable_dependency_tracking
1601enable_largefile
1602enable_threads
1603enable_nls
1604with_gnu_ld
1605enable_rpath
1606with_libiconv_prefix
1607with_libintl_prefix
1608with_libpth_prefix
1609with_included_regex
1610with_libssl_prefix
1611with_libgnutls_prefix
1612enable_ipv6
1613enable_iri
1614with_libidn
1615'
1616 ac_precious_vars='build_alias
1617host_alias
1618target_alias
1619CC
1620CFLAGS
1621LDFLAGS
1622LIBS
1623CPPFLAGS
1624CPP'
1625
1626
1627# Initialize some variables set by options.
1628ac_init_help=
1629ac_init_version=false
1630ac_unrecognized_opts=
1631ac_unrecognized_sep=
1632# The variables have the same names as the options, with
1633# dashes changed to underlines.
1634cache_file=/dev/null
1635exec_prefix=NONE
1636no_create=
1637no_recursion=
1638prefix=NONE
1639program_prefix=NONE
1640program_suffix=NONE
1641program_transform_name=s,x,x,
1642silent=
1643site=
1644srcdir=
1645verbose=
1646x_includes=NONE
1647x_libraries=NONE
1648
1649# Installation directory options.
1650# These are left unexpanded so users can "make install exec_prefix=/foo"
1651# and all the variables that are supposed to be based on exec_prefix
1652# by default will actually change.
1653# Use braces instead of parens because sh, perl, etc. also accept them.
1654# (The list follows the same order as the GNU Coding Standards.)
1655bindir='${exec_prefix}/bin'
1656sbindir='${exec_prefix}/sbin'
1657libexecdir='${exec_prefix}/libexec'
1658datarootdir='${prefix}/share'
1659datadir='${datarootdir}'
1660sysconfdir='${prefix}/etc'
1661sharedstatedir='${prefix}/com'
1662localstatedir='${prefix}/var'
1663includedir='${prefix}/include'
1664oldincludedir='/usr/include'
1665docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1666infodir='${datarootdir}/info'
1667htmldir='${docdir}'
1668dvidir='${docdir}'
1669pdfdir='${docdir}'
1670psdir='${docdir}'
1671libdir='${exec_prefix}/lib'
1672localedir='${datarootdir}/locale'
1673mandir='${datarootdir}/man'
1674
1675ac_prev=
1676ac_dashdash=
1677for ac_option
1678do
1679 # If the previous option needs an argument, assign it.
1680 if test -n "$ac_prev"; then
1681 eval $ac_prev=\$ac_option
1682 ac_prev=
1683 continue
1684 fi
1685
1686 case $ac_option in
1687 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1688 *=) ac_optarg= ;;
1689 *) ac_optarg=yes ;;
1690 esac
1691
1692 # Accept the important Cygnus configure options, so we can diagnose typos.
1693
1694 case $ac_dashdash$ac_option in
1695 --)
1696 ac_dashdash=yes ;;
1697
1698 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1699 ac_prev=bindir ;;
1700 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1701 bindir=$ac_optarg ;;
1702
1703 -build | --build | --buil | --bui | --bu)
1704 ac_prev=build_alias ;;
1705 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1706 build_alias=$ac_optarg ;;
1707
1708 -cache-file | --cache-file | --cache-fil | --cache-fi \
1709 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1710 ac_prev=cache_file ;;
1711 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1712 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1713 cache_file=$ac_optarg ;;
1714
1715 --config-cache | -C)
1716 cache_file=config.cache ;;
1717
1718 -datadir | --datadir | --datadi | --datad)
1719 ac_prev=datadir ;;
1720 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1721 datadir=$ac_optarg ;;
1722
1723 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1724 | --dataroo | --dataro | --datar)
1725 ac_prev=datarootdir ;;
1726 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1727 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1728 datarootdir=$ac_optarg ;;
1729
1730 -disable-* | --disable-*)
1731 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1732 # Reject names that are not valid shell variable names.
1733 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1734 as_fn_error $? "invalid feature name: $ac_useropt"
1735 ac_useropt_orig=$ac_useropt
1736 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1737 case $ac_user_opts in
1738 *"
1739"enable_$ac_useropt"
1740"*) ;;
1741 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1742 ac_unrecognized_sep=', ';;
1743 esac
1744 eval enable_$ac_useropt=no ;;
1745
1746 -docdir | --docdir | --docdi | --doc | --do)
1747 ac_prev=docdir ;;
1748 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1749 docdir=$ac_optarg ;;
1750
1751 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1752 ac_prev=dvidir ;;
1753 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1754 dvidir=$ac_optarg ;;
1755
1756 -enable-* | --enable-*)
1757 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1758 # Reject names that are not valid shell variable names.
1759 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1760 as_fn_error $? "invalid feature name: $ac_useropt"
1761 ac_useropt_orig=$ac_useropt
1762 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1763 case $ac_user_opts in
1764 *"
1765"enable_$ac_useropt"
1766"*) ;;
1767 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1768 ac_unrecognized_sep=', ';;
1769 esac
1770 eval enable_$ac_useropt=\$ac_optarg ;;
1771
1772 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1773 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1774 | --exec | --exe | --ex)
1775 ac_prev=exec_prefix ;;
1776 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1777 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1778 | --exec=* | --exe=* | --ex=*)
1779 exec_prefix=$ac_optarg ;;
1780
1781 -gas | --gas | --ga | --g)
1782 # Obsolete; use --with-gas.
1783 with_gas=yes ;;
1784
1785 -help | --help | --hel | --he | -h)
1786 ac_init_help=long ;;
1787 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1788 ac_init_help=recursive ;;
1789 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1790 ac_init_help=short ;;
1791
1792 -host | --host | --hos | --ho)
1793 ac_prev=host_alias ;;
1794 -host=* | --host=* | --hos=* | --ho=*)
1795 host_alias=$ac_optarg ;;
1796
1797 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1798 ac_prev=htmldir ;;
1799 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1800 | --ht=*)
1801 htmldir=$ac_optarg ;;
1802
1803 -includedir | --includedir | --includedi | --included | --include \
1804 | --includ | --inclu | --incl | --inc)
1805 ac_prev=includedir ;;
1806 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1807 | --includ=* | --inclu=* | --incl=* | --inc=*)
1808 includedir=$ac_optarg ;;
1809
1810 -infodir | --infodir | --infodi | --infod | --info | --inf)
1811 ac_prev=infodir ;;
1812 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1813 infodir=$ac_optarg ;;
1814
1815 -libdir | --libdir | --libdi | --libd)
1816 ac_prev=libdir ;;
1817 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1818 libdir=$ac_optarg ;;
1819
1820 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1821 | --libexe | --libex | --libe)
1822 ac_prev=libexecdir ;;
1823 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1824 | --libexe=* | --libex=* | --libe=*)
1825 libexecdir=$ac_optarg ;;
1826
1827 -localedir | --localedir | --localedi | --localed | --locale)
1828 ac_prev=localedir ;;
1829 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1830 localedir=$ac_optarg ;;
1831
1832 -localstatedir | --localstatedir | --localstatedi | --localstated \
1833 | --localstate | --localstat | --localsta | --localst | --locals)
1834 ac_prev=localstatedir ;;
1835 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1836 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1837 localstatedir=$ac_optarg ;;
1838
1839 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1840 ac_prev=mandir ;;
1841 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1842 mandir=$ac_optarg ;;
1843
1844 -nfp | --nfp | --nf)
1845 # Obsolete; use --without-fp.
1846 with_fp=no ;;
1847
1848 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1849 | --no-cr | --no-c | -n)
1850 no_create=yes ;;
1851
1852 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1853 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1854 no_recursion=yes ;;
1855
1856 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1857 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1858 | --oldin | --oldi | --old | --ol | --o)
1859 ac_prev=oldincludedir ;;
1860 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1861 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1862 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1863 oldincludedir=$ac_optarg ;;
1864
1865 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1866 ac_prev=prefix ;;
1867 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1868 prefix=$ac_optarg ;;
1869
1870 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1871 | --program-pre | --program-pr | --program-p)
1872 ac_prev=program_prefix ;;
1873 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1874 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1875 program_prefix=$ac_optarg ;;
1876
1877 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1878 | --program-suf | --program-su | --program-s)
1879 ac_prev=program_suffix ;;
1880 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1881 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1882 program_suffix=$ac_optarg ;;
1883
1884 -program-transform-name | --program-transform-name \
1885 | --program-transform-nam | --program-transform-na \
1886 | --program-transform-n | --program-transform- \
1887 | --program-transform | --program-transfor \
1888 | --program-transfo | --program-transf \
1889 | --program-trans | --program-tran \
1890 | --progr-tra | --program-tr | --program-t)
1891 ac_prev=program_transform_name ;;
1892 -program-transform-name=* | --program-transform-name=* \
1893 | --program-transform-nam=* | --program-transform-na=* \
1894 | --program-transform-n=* | --program-transform-=* \
1895 | --program-transform=* | --program-transfor=* \
1896 | --program-transfo=* | --program-transf=* \
1897 | --program-trans=* | --program-tran=* \
1898 | --progr-tra=* | --program-tr=* | --program-t=*)
1899 program_transform_name=$ac_optarg ;;
1900
1901 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1902 ac_prev=pdfdir ;;
1903 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1904 pdfdir=$ac_optarg ;;
1905
1906 -psdir | --psdir | --psdi | --psd | --ps)
1907 ac_prev=psdir ;;
1908 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1909 psdir=$ac_optarg ;;
1910
1911 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1912 | -silent | --silent | --silen | --sile | --sil)
1913 silent=yes ;;
1914
1915 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1916 ac_prev=sbindir ;;
1917 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1918 | --sbi=* | --sb=*)
1919 sbindir=$ac_optarg ;;
1920
1921 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1922 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1923 | --sharedst | --shareds | --shared | --share | --shar \
1924 | --sha | --sh)
1925 ac_prev=sharedstatedir ;;
1926 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1927 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1928 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1929 | --sha=* | --sh=*)
1930 sharedstatedir=$ac_optarg ;;
1931
1932 -site | --site | --sit)
1933 ac_prev=site ;;
1934 -site=* | --site=* | --sit=*)
1935 site=$ac_optarg ;;
1936
1937 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1938 ac_prev=srcdir ;;
1939 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1940 srcdir=$ac_optarg ;;
1941
1942 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1943 | --syscon | --sysco | --sysc | --sys | --sy)
1944 ac_prev=sysconfdir ;;
1945 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1946 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1947 sysconfdir=$ac_optarg ;;
1948
1949 -target | --target | --targe | --targ | --tar | --ta | --t)
1950 ac_prev=target_alias ;;
1951 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1952 target_alias=$ac_optarg ;;
1953
1954 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1955 verbose=yes ;;
1956
1957 -version | --version | --versio | --versi | --vers | -V)
1958 ac_init_version=: ;;
1959
1960 -with-* | --with-*)
1961 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1962 # Reject names that are not valid shell variable names.
1963 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1964 as_fn_error $? "invalid package name: $ac_useropt"
1965 ac_useropt_orig=$ac_useropt
1966 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1967 case $ac_user_opts in
1968 *"
1969"with_$ac_useropt"
1970"*) ;;
1971 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1972 ac_unrecognized_sep=', ';;
1973 esac
1974 eval with_$ac_useropt=\$ac_optarg ;;
1975
1976 -without-* | --without-*)
1977 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1978 # Reject names that are not valid shell variable names.
1979 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1980 as_fn_error $? "invalid package name: $ac_useropt"
1981 ac_useropt_orig=$ac_useropt
1982 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1983 case $ac_user_opts in
1984 *"
1985"with_$ac_useropt"
1986"*) ;;
1987 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1988 ac_unrecognized_sep=', ';;
1989 esac
1990 eval with_$ac_useropt=no ;;
1991
1992 --x)
1993 # Obsolete; use --with-x.
1994 with_x=yes ;;
1995
1996 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1997 | --x-incl | --x-inc | --x-in | --x-i)
1998 ac_prev=x_includes ;;
1999 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2000 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2001 x_includes=$ac_optarg ;;
2002
2003 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2004 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2005 ac_prev=x_libraries ;;
2006 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2007 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2008 x_libraries=$ac_optarg ;;
2009
2010 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2011Try \`$0 --help' for more information"
2012 ;;
2013
2014 *=*)
2015 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2016 # Reject names that are not valid shell variable names.
2017 case $ac_envvar in #(
2018 '' | [0-9]* | *[!_$as_cr_alnum]* )
2019 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2020 esac
2021 eval $ac_envvar=\$ac_optarg
2022 export $ac_envvar ;;
2023
2024 *)
2025 # FIXME: should be removed in autoconf 3.0.
2026 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2027 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2028 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2029 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2030 ;;
2031
2032 esac
2033done
2034
2035if test -n "$ac_prev"; then
2036 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2037 as_fn_error $? "missing argument to $ac_option"
2038fi
2039
2040if test -n "$ac_unrecognized_opts"; then
2041 case $enable_option_checking in
2042 no) ;;
2043 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2044 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2045 esac
2046fi
2047
2048# Check all directory arguments for consistency.
2049for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2050 datadir sysconfdir sharedstatedir localstatedir includedir \
2051 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2052 libdir localedir mandir
2053do
2054 eval ac_val=\$$ac_var
2055 # Remove trailing slashes.
2056 case $ac_val in
2057 */ )
2058 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2059 eval $ac_var=\$ac_val;;
2060 esac
2061 # Be sure to have absolute directory names.
2062 case $ac_val in
2063 [\\/$]* | ?:[\\/]* ) continue;;
2064 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2065 esac
2066 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2067done
2068
2069# There might be people who depend on the old broken behavior: `$host'
2070# used to hold the argument of --host etc.
2071# FIXME: To remove some day.
2072build=$build_alias
2073host=$host_alias
2074target=$target_alias
2075
2076# FIXME: To remove some day.
2077if test "x$host_alias" != x; then
2078 if test "x$build_alias" = x; then
2079 cross_compiling=maybe
2080 elif test "x$build_alias" != "x$host_alias"; then
2081 cross_compiling=yes
2082 fi
2083fi
2084
2085ac_tool_prefix=
2086test -n "$host_alias" && ac_tool_prefix=$host_alias-
2087
2088test "$silent" = yes && exec 6>/dev/null
2089
2090
2091ac_pwd=`pwd` && test -n "$ac_pwd" &&
2092ac_ls_di=`ls -di .` &&
2093ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2094 as_fn_error $? "working directory cannot be determined"
2095test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2096 as_fn_error $? "pwd does not report name of working directory"
2097
2098
2099# Find the source files, if location was not specified.
2100if test -z "$srcdir"; then
2101 ac_srcdir_defaulted=yes
2102 # Try the directory containing this script, then the parent directory.
2103 ac_confdir=`$as_dirname -- "$as_myself" ||
2104$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2105 X"$as_myself" : 'X\(//\)[^/]' \| \
2106 X"$as_myself" : 'X\(//\)$' \| \
2107 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2108$as_echo X"$as_myself" |
2109 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2110 s//\1/
2111 q
2112 }
2113 /^X\(\/\/\)[^/].*/{
2114 s//\1/
2115 q
2116 }
2117 /^X\(\/\/\)$/{
2118 s//\1/
2119 q
2120 }
2121 /^X\(\/\).*/{
2122 s//\1/
2123 q
2124 }
2125 s/.*/./; q'`
2126 srcdir=$ac_confdir
2127 if test ! -r "$srcdir/$ac_unique_file"; then
2128 srcdir=..
2129 fi
2130else
2131 ac_srcdir_defaulted=no
2132fi
2133if test ! -r "$srcdir/$ac_unique_file"; then
2134 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2135 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2136fi
2137ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2138ac_abs_confdir=`(
2139 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2140 pwd)`
2141# When building in place, set srcdir=.
2142if test "$ac_abs_confdir" = "$ac_pwd"; then
2143 srcdir=.
2144fi
2145# Remove unnecessary trailing slashes from srcdir.
2146# Double slashes in file names in object file debugging info
2147# mess up M-x gdb in Emacs.
2148case $srcdir in
2149*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2150esac
2151for ac_var in $ac_precious_vars; do
2152 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2153 eval ac_env_${ac_var}_value=\$${ac_var}
2154 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2155 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2156done
2157
2158#
2159# Report the --help message.
2160#
2161if test "$ac_init_help" = "long"; then
2162 # Omit some internal or obsolete options to make the list less imposing.
2163 # This message is too long to be a string in the A/UX 3.1 sh.
2164 cat <<_ACEOF
2165\`configure' configures wget 1.14 to adapt to many kinds of systems.
2166
2167Usage: $0 [OPTION]... [VAR=VALUE]...
2168
2169To assign environment variables (e.g., CC, CFLAGS...), specify them as
2170VAR=VALUE. See below for descriptions of some of the useful variables.
2171
2172Defaults for the options are specified in brackets.
2173
2174Configuration:
2175 -h, --help display this help and exit
2176 --help=short display options specific to this package
2177 --help=recursive display the short help of all the included packages
2178 -V, --version display version information and exit
2179 -q, --quiet, --silent do not print \`checking ...' messages
2180 --cache-file=FILE cache test results in FILE [disabled]
2181 -C, --config-cache alias for \`--cache-file=config.cache'
2182 -n, --no-create do not create output files
2183 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2184
2185Installation directories:
2186 --prefix=PREFIX install architecture-independent files in PREFIX
2187 [$ac_default_prefix]
2188 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2189 [PREFIX]
2190
2191By default, \`make install' will install all the files in
2192\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2193an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2194for instance \`--prefix=\$HOME'.
2195
2196For better control, use the options below.
2197
2198Fine tuning of the installation directories:
2199 --bindir=DIR user executables [EPREFIX/bin]
2200 --sbindir=DIR system admin executables [EPREFIX/sbin]
2201 --libexecdir=DIR program executables [EPREFIX/libexec]
2202 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2203 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2204 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2205 --libdir=DIR object code libraries [EPREFIX/lib]
2206 --includedir=DIR C header files [PREFIX/include]
2207 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2208 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2209 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2210 --infodir=DIR info documentation [DATAROOTDIR/info]
2211 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2212 --mandir=DIR man documentation [DATAROOTDIR/man]
2213 --docdir=DIR documentation root [DATAROOTDIR/doc/wget]
2214 --htmldir=DIR html documentation [DOCDIR]
2215 --dvidir=DIR dvi documentation [DOCDIR]
2216 --pdfdir=DIR pdf documentation [DOCDIR]
2217 --psdir=DIR ps documentation [DOCDIR]
2218_ACEOF
2219
2220 cat <<\_ACEOF
2221
2222Program names:
2223 --program-prefix=PREFIX prepend PREFIX to installed program names
2224 --program-suffix=SUFFIX append SUFFIX to installed program names
2225 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2226
2227System types:
2228 --build=BUILD configure for building on BUILD [guessed]
2229 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2230_ACEOF
2231fi
2232
2233if test -n "$ac_init_help"; then
2234 case $ac_init_help in
2235 short | recursive ) echo "Configuration of wget 1.14:";;
2236 esac
2237 cat <<\_ACEOF
2238
2239Optional Features:
2240 --disable-option-checking ignore unrecognized --enable/--with options
2241 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2242 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2243 --disable-opie disable support for opie or s/key FTP login
2244 --disable-digest disable support for HTTP digest authorization
2245 --disable-ntlm disable support for NTLM authorization
2246 --disable-debug disable support for debugging output
2247 --disable-dependency-tracking speeds up one-time build
2248 --enable-dependency-tracking do not reject slow dependency extractors
2249 --disable-largefile omit support for large files
2250 --enable-threads={posix|solaris|pth|windows}
2251 specify multithreading API
2252 --disable-threads build without multithread safety
2253 --disable-nls do not use Native Language Support
2254 --disable-rpath do not hardcode runtime library paths
2255 --disable-ipv6 disable IPv6 support
2256 --disable-iri disable IDN/IRIs support
2257
2258Optional Packages:
2259 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2260 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2261 --without-ssl disable SSL autodetection
2262 --with-ssl={gnutls,openssl} specify the SSL backend. GNU TLS is the default.
2263 --without-zlib disable zlib
2264 --with-gnu-ld assume the C compiler uses GNU ld default=no
2265 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
2266 --without-libiconv-prefix don't search for libiconv in includedir and libdir
2267 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
2268 --without-libintl-prefix don't search for libintl in includedir and libdir
2269 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
2270 --without-libpth-prefix don't search for libpth in includedir and libdir
2271 --without-included-regex
2272 don't compile regex; this is the default on systems
2273 with recent-enough versions of the GNU C Library
2274 (use with caution on other systems).
2275 --with-libssl-prefix[=DIR] search for libssl in DIR/include and DIR/lib
2276 --without-libssl-prefix don't search for libssl in includedir and libdir
2277 --with-libgnutls-prefix[=DIR] search for libgnutls in DIR/include and DIR/lib
2278 --without-libgnutls-prefix don't search for libgnutls in includedir and libdir
2279 --with-libidn=DIR Support IDN/IRIs (needs GNU Libidn)
2280
2281Some influential environment variables:
2282 CC C compiler command
2283 CFLAGS C compiler flags
2284 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2285 nonstandard directory <lib dir>
2286 LIBS libraries to pass to the linker, e.g. -l<library>
2287 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2288 you have headers in a nonstandard directory <include dir>
2289 CPP C preprocessor
2290
2291Use these variables to override the choices made by `configure' or to help
2292it to find libraries and programs with nonstandard names/locations.
2293
2294Report bugs to <bug-wget@gnu.org>.
2295_ACEOF
2296ac_status=$?
2297fi
2298
2299if test "$ac_init_help" = "recursive"; then
2300 # If there are subdirs, report their specific --help.
2301 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2302 test -d "$ac_dir" ||
2303 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2304 continue
2305 ac_builddir=.
2306
2307case "$ac_dir" in
2308.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2309*)
2310 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2311 # A ".." for each directory in $ac_dir_suffix.
2312 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2313 case $ac_top_builddir_sub in
2314 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2315 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2316 esac ;;
2317esac
2318ac_abs_top_builddir=$ac_pwd
2319ac_abs_builddir=$ac_pwd$ac_dir_suffix
2320# for backward compatibility:
2321ac_top_builddir=$ac_top_build_prefix
2322
2323case $srcdir in
2324 .) # We are building in place.
2325 ac_srcdir=.
2326 ac_top_srcdir=$ac_top_builddir_sub
2327 ac_abs_top_srcdir=$ac_pwd ;;
2328 [\\/]* | ?:[\\/]* ) # Absolute name.
2329 ac_srcdir=$srcdir$ac_dir_suffix;
2330 ac_top_srcdir=$srcdir
2331 ac_abs_top_srcdir=$srcdir ;;
2332 *) # Relative name.
2333 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2334 ac_top_srcdir=$ac_top_build_prefix$srcdir
2335 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2336esac
2337ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2338
2339 cd "$ac_dir" || { ac_status=$?; continue; }
2340 # Check for guested configure.
2341 if test -f "$ac_srcdir/configure.gnu"; then
2342 echo &&
2343 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2344 elif test -f "$ac_srcdir/configure"; then
2345 echo &&
2346 $SHELL "$ac_srcdir/configure" --help=recursive
2347 else
2348 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2349 fi || ac_status=$?
2350 cd "$ac_pwd" || { ac_status=$?; break; }
2351 done
2352fi
2353
2354test -n "$ac_init_help" && exit $ac_status
2355if $ac_init_version; then
2356 cat <<\_ACEOF
2357wget configure 1.14
2358generated by GNU Autoconf 2.69
2359
2360Copyright (C) 2012 Free Software Foundation, Inc.
2361This configure script is free software; the Free Software Foundation
2362gives unlimited permission to copy, distribute and modify it.
2363_ACEOF
2364 exit
2365fi
2366
2367## ------------------------ ##
2368## Autoconf initialization. ##
2369## ------------------------ ##
2370
2371# ac_fn_c_try_compile LINENO
2372# --------------------------
2373# Try to compile conftest.$ac_ext, and return whether this succeeded.
2374ac_fn_c_try_compile ()
2375{
2376 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2377 rm -f conftest.$ac_objext
2378 if { { ac_try="$ac_compile"
2379case "(($ac_try" in
2380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2381 *) ac_try_echo=$ac_try;;
2382esac
2383eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2384$as_echo "$ac_try_echo"; } >&5
2385 (eval "$ac_compile") 2>conftest.err
2386 ac_status=$?
2387 if test -s conftest.err; then
2388 grep -v '^ *+' conftest.err >conftest.er1
2389 cat conftest.er1 >&5
2390 mv -f conftest.er1 conftest.err
2391 fi
2392 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2393 test $ac_status = 0; } && {
2394 test -z "$ac_c_werror_flag" ||
2395 test ! -s conftest.err
2396 } && test -s conftest.$ac_objext; then :
2397 ac_retval=0
2398else
2399 $as_echo "$as_me: failed program was:" >&5
2400sed 's/^/| /' conftest.$ac_ext >&5
2401
2402 ac_retval=1
2403fi
2404 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2405 as_fn_set_status $ac_retval
2406
2407} # ac_fn_c_try_compile
2408
2409# ac_fn_c_try_cpp LINENO
2410# ----------------------
2411# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2412ac_fn_c_try_cpp ()
2413{
2414 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2415 if { { ac_try="$ac_cpp conftest.$ac_ext"
2416case "(($ac_try" in
2417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2418 *) ac_try_echo=$ac_try;;
2419esac
2420eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2421$as_echo "$ac_try_echo"; } >&5
2422 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2423 ac_status=$?
2424 if test -s conftest.err; then
2425 grep -v '^ *+' conftest.err >conftest.er1
2426 cat conftest.er1 >&5
2427 mv -f conftest.er1 conftest.err
2428 fi
2429 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2430 test $ac_status = 0; } > conftest.i && {
2431 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2432 test ! -s conftest.err
2433 }; then :
2434 ac_retval=0
2435else
2436 $as_echo "$as_me: failed program was:" >&5
2437sed 's/^/| /' conftest.$ac_ext >&5
2438
2439 ac_retval=1
2440fi
2441 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2442 as_fn_set_status $ac_retval
2443
2444} # ac_fn_c_try_cpp
2445
2446# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2447# -------------------------------------------------------
2448# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2449# the include files in INCLUDES and setting the cache variable VAR
2450# accordingly.
2451ac_fn_c_check_header_mongrel ()
2452{
2453 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2454 if eval \${$3+:} false; then :
2455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2456$as_echo_n "checking for $2... " >&6; }
2457if eval \${$3+:} false; then :
2458 $as_echo_n "(cached) " >&6
2459fi
2460eval ac_res=\$$3
2461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2462$as_echo "$ac_res" >&6; }
2463else
2464 # Is the header compilable?
2465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2466$as_echo_n "checking $2 usability... " >&6; }
2467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2468/* end confdefs.h. */
2469$4
2470#include <$2>
2471_ACEOF
2472if ac_fn_c_try_compile "$LINENO"; then :
2473 ac_header_compiler=yes
2474else
2475 ac_header_compiler=no
2476fi
2477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2479$as_echo "$ac_header_compiler" >&6; }
2480
2481# Is the header present?
2482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2483$as_echo_n "checking $2 presence... " >&6; }
2484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2485/* end confdefs.h. */
2486#include <$2>
2487_ACEOF
2488if ac_fn_c_try_cpp "$LINENO"; then :
2489 ac_header_preproc=yes
2490else
2491 ac_header_preproc=no
2492fi
2493rm -f conftest.err conftest.i conftest.$ac_ext
2494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2495$as_echo "$ac_header_preproc" >&6; }
2496
2497# So? What about this header?
2498case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2499 yes:no: )
2500 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2501$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2502 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2503$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2504 ;;
2505 no:yes:* )
2506 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2507$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2508 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2509$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2510 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2511$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2512 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2513$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2514 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2515$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2516( $as_echo "## ------------------------------- ##
2517## Report this to bug-wget@gnu.org ##
2518## ------------------------------- ##"
2519 ) | sed "s/^/$as_me: WARNING: /" >&2
2520 ;;
2521esac
2522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2523$as_echo_n "checking for $2... " >&6; }
2524if eval \${$3+:} false; then :
2525 $as_echo_n "(cached) " >&6
2526else
2527 eval "$3=\$ac_header_compiler"
2528fi
2529eval ac_res=\$$3
2530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2531$as_echo "$ac_res" >&6; }
2532fi
2533 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2534
2535} # ac_fn_c_check_header_mongrel
2536
2537# ac_fn_c_try_run LINENO
2538# ----------------------
2539# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2540# that executables *can* be run.
2541ac_fn_c_try_run ()
2542{
2543 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2544 if { { ac_try="$ac_link"
2545case "(($ac_try" in
2546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2547 *) ac_try_echo=$ac_try;;
2548esac
2549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2550$as_echo "$ac_try_echo"; } >&5
2551 (eval "$ac_link") 2>&5
2552 ac_status=$?
2553 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2554 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2555 { { case "(($ac_try" in
2556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2557 *) ac_try_echo=$ac_try;;
2558esac
2559eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2560$as_echo "$ac_try_echo"; } >&5
2561 (eval "$ac_try") 2>&5
2562 ac_status=$?
2563 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2564 test $ac_status = 0; }; }; then :
2565 ac_retval=0
2566else
2567 $as_echo "$as_me: program exited with status $ac_status" >&5
2568 $as_echo "$as_me: failed program was:" >&5
2569sed 's/^/| /' conftest.$ac_ext >&5
2570
2571 ac_retval=$ac_status
2572fi
2573 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2574 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2575 as_fn_set_status $ac_retval
2576
2577} # ac_fn_c_try_run
2578
2579# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2580# -------------------------------------------------------
2581# Tests whether HEADER exists and can be compiled using the include files in
2582# INCLUDES, setting the cache variable VAR accordingly.
2583ac_fn_c_check_header_compile ()
2584{
2585 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2587$as_echo_n "checking for $2... " >&6; }
2588if eval \${$3+:} false; then :
2589 $as_echo_n "(cached) " >&6
2590else
2591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2592/* end confdefs.h. */
2593$4
2594#include <$2>
2595_ACEOF
2596if ac_fn_c_try_compile "$LINENO"; then :
2597 eval "$3=yes"
2598else
2599 eval "$3=no"
2600fi
2601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2602fi
2603eval ac_res=\$$3
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2605$as_echo "$ac_res" >&6; }
2606 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2607
2608} # ac_fn_c_check_header_compile
2609
2610# ac_fn_c_try_link LINENO
2611# -----------------------
2612# Try to link conftest.$ac_ext, and return whether this succeeded.
2613ac_fn_c_try_link ()
2614{
2615 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2616 rm -f conftest.$ac_objext conftest$ac_exeext
2617 if { { ac_try="$ac_link"
2618case "(($ac_try" in
2619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2620 *) ac_try_echo=$ac_try;;
2621esac
2622eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2623$as_echo "$ac_try_echo"; } >&5
2624 (eval "$ac_link") 2>conftest.err
2625 ac_status=$?
2626 if test -s conftest.err; then
2627 grep -v '^ *+' conftest.err >conftest.er1
2628 cat conftest.er1 >&5
2629 mv -f conftest.er1 conftest.err
2630 fi
2631 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2632 test $ac_status = 0; } && {
2633 test -z "$ac_c_werror_flag" ||
2634 test ! -s conftest.err
2635 } && test -s conftest$ac_exeext && {
2636 test "$cross_compiling" = yes ||
2637 test -x conftest$ac_exeext
2638 }; then :
2639 ac_retval=0
2640else
2641 $as_echo "$as_me: failed program was:" >&5
2642sed 's/^/| /' conftest.$ac_ext >&5
2643
2644 ac_retval=1
2645fi
2646 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2647 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2648 # interfere with the next link command; also delete a directory that is
2649 # left behind by Apple's compiler. We do this before executing the actions.
2650 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2651 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2652 as_fn_set_status $ac_retval
2653
2654} # ac_fn_c_try_link
2655
2656# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2657# --------------------------------------------
2658# Tries to find the compile-time value of EXPR in a program that includes
2659# INCLUDES, setting VAR accordingly. Returns whether the value could be
2660# computed
2661ac_fn_c_compute_int ()
2662{
2663 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2664 if test "$cross_compiling" = yes; then
2665 # Depending upon the size, compute the lo and hi bounds.
2666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2667/* end confdefs.h. */
2668$4
2669int
2670main ()
2671{
2672static int test_array [1 - 2 * !(($2) >= 0)];
2673test_array [0] = 0;
2674return test_array [0];
2675
2676 ;
2677 return 0;
2678}
2679_ACEOF
2680if ac_fn_c_try_compile "$LINENO"; then :
2681 ac_lo=0 ac_mid=0
2682 while :; do
2683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2684/* end confdefs.h. */
2685$4
2686int
2687main ()
2688{
2689static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2690test_array [0] = 0;
2691return test_array [0];
2692
2693 ;
2694 return 0;
2695}
2696_ACEOF
2697if ac_fn_c_try_compile "$LINENO"; then :
2698 ac_hi=$ac_mid; break
2699else
2700 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2701 if test $ac_lo -le $ac_mid; then
2702 ac_lo= ac_hi=
2703 break
2704 fi
2705 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2706fi
2707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2708 done
2709else
2710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2711/* end confdefs.h. */
2712$4
2713int
2714main ()
2715{
2716static int test_array [1 - 2 * !(($2) < 0)];
2717test_array [0] = 0;
2718return test_array [0];
2719
2720 ;
2721 return 0;
2722}
2723_ACEOF
2724if ac_fn_c_try_compile "$LINENO"; then :
2725 ac_hi=-1 ac_mid=-1
2726 while :; do
2727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2728/* end confdefs.h. */
2729$4
2730int
2731main ()
2732{
2733static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2734test_array [0] = 0;
2735return test_array [0];
2736
2737 ;
2738 return 0;
2739}
2740_ACEOF
2741if ac_fn_c_try_compile "$LINENO"; then :
2742 ac_lo=$ac_mid; break
2743else
2744 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2745 if test $ac_mid -le $ac_hi; then
2746 ac_lo= ac_hi=
2747 break
2748 fi
2749 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2750fi
2751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2752 done
2753else
2754 ac_lo= ac_hi=
2755fi
2756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2757fi
2758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2759# Binary search between lo and hi bounds.
2760while test "x$ac_lo" != "x$ac_hi"; do
2761 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2763/* end confdefs.h. */
2764$4
2765int
2766main ()
2767{
2768static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2769test_array [0] = 0;
2770return test_array [0];
2771
2772 ;
2773 return 0;
2774}
2775_ACEOF
2776if ac_fn_c_try_compile "$LINENO"; then :
2777 ac_hi=$ac_mid
2778else
2779 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2780fi
2781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2782done
2783case $ac_lo in #((
2784?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2785'') ac_retval=1 ;;
2786esac
2787 else
2788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2789/* end confdefs.h. */
2790$4
2791static long int longval () { return $2; }
2792static unsigned long int ulongval () { return $2; }
2793#include <stdio.h>
2794#include <stdlib.h>
2795int
2796main ()
2797{
2798
2799 FILE *f = fopen ("conftest.val", "w");
2800 if (! f)
2801 return 1;
2802 if (($2) < 0)
2803 {
2804 long int i = longval ();
2805 if (i != ($2))
2806 return 1;
2807 fprintf (f, "%ld", i);
2808 }
2809 else
2810 {
2811 unsigned long int i = ulongval ();
2812 if (i != ($2))
2813 return 1;
2814 fprintf (f, "%lu", i);
2815 }
2816 /* Do not output a trailing newline, as this causes \r\n confusion
2817 on some platforms. */
2818 return ferror (f) || fclose (f) != 0;
2819
2820 ;
2821 return 0;
2822}
2823_ACEOF
2824if ac_fn_c_try_run "$LINENO"; then :
2825 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2826else
2827 ac_retval=1
2828fi
2829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2830 conftest.$ac_objext conftest.beam conftest.$ac_ext
2831rm -f conftest.val
2832
2833 fi
2834 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2835 as_fn_set_status $ac_retval
2836
2837} # ac_fn_c_compute_int
2838
2839# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2840# -------------------------------------------
2841# Tests whether TYPE exists after having included INCLUDES, setting cache
2842# variable VAR accordingly.
2843ac_fn_c_check_type ()
2844{
2845 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2847$as_echo_n "checking for $2... " >&6; }
2848if eval \${$3+:} false; then :
2849 $as_echo_n "(cached) " >&6
2850else
2851 eval "$3=no"
2852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2853/* end confdefs.h. */
2854$4
2855int
2856main ()
2857{
2858if (sizeof ($2))
2859 return 0;
2860 ;
2861 return 0;
2862}
2863_ACEOF
2864if ac_fn_c_try_compile "$LINENO"; then :
2865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2866/* end confdefs.h. */
2867$4
2868int
2869main ()
2870{
2871if (sizeof (($2)))
2872 return 0;
2873 ;
2874 return 0;
2875}
2876_ACEOF
2877if ac_fn_c_try_compile "$LINENO"; then :
2878
2879else
2880 eval "$3=yes"
2881fi
2882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2883fi
2884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2885fi
2886eval ac_res=\$$3
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2888$as_echo "$ac_res" >&6; }
2889 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2890
2891} # ac_fn_c_check_type
2892
2893# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2894# ---------------------------------------------
2895# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2896# accordingly.
2897ac_fn_c_check_decl ()
2898{
2899 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2900 as_decl_name=`echo $2|sed 's/ *(.*//'`
2901 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2903$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2904if eval \${$3+:} false; then :
2905 $as_echo_n "(cached) " >&6
2906else
2907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2908/* end confdefs.h. */
2909$4
2910int
2911main ()
2912{
2913#ifndef $as_decl_name
2914#ifdef __cplusplus
2915 (void) $as_decl_use;
2916#else
2917 (void) $as_decl_name;
2918#endif
2919#endif
2920
2921 ;
2922 return 0;
2923}
2924_ACEOF
2925if ac_fn_c_try_compile "$LINENO"; then :
2926 eval "$3=yes"
2927else
2928 eval "$3=no"
2929fi
2930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2931fi
2932eval ac_res=\$$3
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2934$as_echo "$ac_res" >&6; }
2935 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2936
2937} # ac_fn_c_check_decl
2938
2939# ac_fn_c_check_func LINENO FUNC VAR
2940# ----------------------------------
2941# Tests whether FUNC exists, setting the cache variable VAR accordingly
2942ac_fn_c_check_func ()
2943{
2944 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2946$as_echo_n "checking for $2... " >&6; }
2947if eval \${$3+:} false; then :
2948 $as_echo_n "(cached) " >&6
2949else
2950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2951/* end confdefs.h. */
2952/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2953 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2954#define $2 innocuous_$2
2955
2956/* System header to define __stub macros and hopefully few prototypes,
2957 which can conflict with char $2 (); below.
2958 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2959 <limits.h> exists even on freestanding compilers. */
2960
2961#ifdef __STDC__
2962# include <limits.h>
2963#else
2964# include <assert.h>
2965#endif
2966
2967#undef $2
2968
2969/* Override any GCC internal prototype to avoid an error.
2970 Use char because int might match the return type of a GCC
2971 builtin and then its argument prototype would still apply. */
2972#ifdef __cplusplus
2973extern "C"
2974#endif
2975char $2 ();
2976/* The GNU C library defines this for functions which it implements
2977 to always fail with ENOSYS. Some functions are actually named
2978 something starting with __ and the normal name is an alias. */
2979#if defined __stub_$2 || defined __stub___$2
2980choke me
2981#endif
2982
2983int
2984main ()
2985{
2986return $2 ();
2987 ;
2988 return 0;
2989}
2990_ACEOF
2991if ac_fn_c_try_link "$LINENO"; then :
2992 eval "$3=yes"
2993else
2994 eval "$3=no"
2995fi
2996rm -f core conftest.err conftest.$ac_objext \
2997 conftest$ac_exeext conftest.$ac_ext
2998fi
2999eval ac_res=\$$3
3000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3001$as_echo "$ac_res" >&6; }
3002 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3003
3004} # ac_fn_c_check_func
3005
3006# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3007# ----------------------------------------------------
3008# Tries to find if the field MEMBER exists in type AGGR, after including
3009# INCLUDES, setting cache variable VAR accordingly.
3010ac_fn_c_check_member ()
3011{
3012 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3014$as_echo_n "checking for $2.$3... " >&6; }
3015if eval \${$4+:} false; then :
3016 $as_echo_n "(cached) " >&6
3017else
3018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3019/* end confdefs.h. */
3020$5
3021int
3022main ()
3023{
3024static $2 ac_aggr;
3025if (ac_aggr.$3)
3026return 0;
3027 ;
3028 return 0;
3029}
3030_ACEOF
3031if ac_fn_c_try_compile "$LINENO"; then :
3032 eval "$4=yes"
3033else
3034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3035/* end confdefs.h. */
3036$5
3037int
3038main ()
3039{
3040static $2 ac_aggr;
3041if (sizeof ac_aggr.$3)
3042return 0;
3043 ;
3044 return 0;
3045}
3046_ACEOF
3047if ac_fn_c_try_compile "$LINENO"; then :
3048 eval "$4=yes"
3049else
3050 eval "$4=no"
3051fi
3052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3053fi
3054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3055fi
3056eval ac_res=\$$4
3057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3058$as_echo "$ac_res" >&6; }
3059 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3060
3061} # ac_fn_c_check_member
3062cat >config.log <<_ACEOF
3063This file contains any messages produced by compilers while
3064running configure, to aid debugging if configure makes a mistake.
3065
3066It was created by wget $as_me 1.14, which was
3067generated by GNU Autoconf 2.69. Invocation command line was
3068
3069 $ $0 $@
3070
3071_ACEOF
3072exec 5>>config.log
3073{
3074cat <<_ASUNAME
3075## --------- ##
3076## Platform. ##
3077## --------- ##
3078
3079hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3080uname -m = `(uname -m) 2>/dev/null || echo unknown`
3081uname -r = `(uname -r) 2>/dev/null || echo unknown`
3082uname -s = `(uname -s) 2>/dev/null || echo unknown`
3083uname -v = `(uname -v) 2>/dev/null || echo unknown`
3084
3085/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3086/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3087
3088/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3089/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3090/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3091/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3092/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3093/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3094/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3095
3096_ASUNAME
3097
3098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3099for as_dir in $PATH
3100do
3101 IFS=$as_save_IFS
3102 test -z "$as_dir" && as_dir=.
3103 $as_echo "PATH: $as_dir"
3104 done
3105IFS=$as_save_IFS
3106
3107} >&5
3108
3109cat >&5 <<_ACEOF
3110
3111
3112## ----------- ##
3113## Core tests. ##
3114## ----------- ##
3115
3116_ACEOF
3117
3118
3119# Keep a trace of the command line.
3120# Strip out --no-create and --no-recursion so they do not pile up.
3121# Strip out --silent because we don't want to record it for future runs.
3122# Also quote any args containing shell meta-characters.
3123# Make two passes to allow for proper duplicate-argument suppression.
3124ac_configure_args=
3125ac_configure_args0=
3126ac_configure_args1=
3127ac_must_keep_next=false
3128for ac_pass in 1 2
3129do
3130 for ac_arg
3131 do
3132 case $ac_arg in
3133 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3134 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3135 | -silent | --silent | --silen | --sile | --sil)
3136 continue ;;
3137 *\'*)
3138 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3139 esac
3140 case $ac_pass in
3141 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3142 2)
3143 as_fn_append ac_configure_args1 " '$ac_arg'"
3144 if test $ac_must_keep_next = true; then
3145 ac_must_keep_next=false # Got value, back to normal.
3146 else
3147 case $ac_arg in
3148 *=* | --config-cache | -C | -disable-* | --disable-* \
3149 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3150 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3151 | -with-* | --with-* | -without-* | --without-* | --x)
3152 case "$ac_configure_args0 " in
3153 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3154 esac
3155 ;;
3156 -* ) ac_must_keep_next=true ;;
3157 esac
3158 fi
3159 as_fn_append ac_configure_args " '$ac_arg'"
3160 ;;
3161 esac
3162 done
3163done
3164{ ac_configure_args0=; unset ac_configure_args0;}
3165{ ac_configure_args1=; unset ac_configure_args1;}
3166
3167# When interrupted or exit'd, cleanup temporary files, and complete
3168# config.log. We remove comments because anyway the quotes in there
3169# would cause problems or look ugly.
3170# WARNING: Use '\'' to represent an apostrophe within the trap.
3171# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3172trap 'exit_status=$?
3173 # Save into config.log some information that might help in debugging.
3174 {
3175 echo
3176
3177 $as_echo "## ---------------- ##
3178## Cache variables. ##
3179## ---------------- ##"
3180 echo
3181 # The following way of writing the cache mishandles newlines in values,
3182(
3183 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3184 eval ac_val=\$$ac_var
3185 case $ac_val in #(
3186 *${as_nl}*)
3187 case $ac_var in #(
3188 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3189$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3190 esac
3191 case $ac_var in #(
3192 _ | IFS | as_nl) ;; #(
3193 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3194 *) { eval $ac_var=; unset $ac_var;} ;;
3195 esac ;;
3196 esac
3197 done
3198 (set) 2>&1 |
3199 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3200 *${as_nl}ac_space=\ *)
3201 sed -n \
3202 "s/'\''/'\''\\\\'\'''\''/g;
3203 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3204 ;; #(
3205 *)
3206 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3207 ;;
3208 esac |
3209 sort
3210)
3211 echo
3212
3213 $as_echo "## ----------------- ##
3214## Output variables. ##
3215## ----------------- ##"
3216 echo
3217 for ac_var in $ac_subst_vars
3218 do
3219 eval ac_val=\$$ac_var
3220 case $ac_val in
3221 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3222 esac
3223 $as_echo "$ac_var='\''$ac_val'\''"
3224 done | sort
3225 echo
3226
3227 if test -n "$ac_subst_files"; then
3228 $as_echo "## ------------------- ##
3229## File substitutions. ##
3230## ------------------- ##"
3231 echo
3232 for ac_var in $ac_subst_files
3233 do
3234 eval ac_val=\$$ac_var
3235 case $ac_val in
3236 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3237 esac
3238 $as_echo "$ac_var='\''$ac_val'\''"
3239 done | sort
3240 echo
3241 fi
3242
3243 if test -s confdefs.h; then
3244 $as_echo "## ----------- ##
3245## confdefs.h. ##
3246## ----------- ##"
3247 echo
3248 cat confdefs.h
3249 echo
3250 fi
3251 test "$ac_signal" != 0 &&
3252 $as_echo "$as_me: caught signal $ac_signal"
3253 $as_echo "$as_me: exit $exit_status"
3254 } >&5
3255 rm -f core *.core core.conftest.* &&
3256 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3257 exit $exit_status
3258' 0
3259for ac_signal in 1 2 13 15; do
3260 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3261done
3262ac_signal=0
3263
3264# confdefs.h avoids OS command line length limits that DEFS can exceed.
3265rm -f -r conftest* confdefs.h
3266
3267$as_echo "/* confdefs.h */" > confdefs.h
3268
3269# Predefined preprocessor variables.
3270
3271cat >>confdefs.h <<_ACEOF
3272#define PACKAGE_NAME "$PACKAGE_NAME"
3273_ACEOF
3274
3275cat >>confdefs.h <<_ACEOF
3276#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3277_ACEOF
3278
3279cat >>confdefs.h <<_ACEOF
3280#define PACKAGE_VERSION "$PACKAGE_VERSION"
3281_ACEOF
3282
3283cat >>confdefs.h <<_ACEOF
3284#define PACKAGE_STRING "$PACKAGE_STRING"
3285_ACEOF
3286
3287cat >>confdefs.h <<_ACEOF
3288#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3289_ACEOF
3290
3291cat >>confdefs.h <<_ACEOF
3292#define PACKAGE_URL "$PACKAGE_URL"
3293_ACEOF
3294
3295
3296# Let the site file select an alternate cache file if it wants to.
3297# Prefer an explicitly selected file to automatically selected ones.
3298ac_site_file1=NONE
3299ac_site_file2=NONE
3300if test -n "$CONFIG_SITE"; then
3301 # We do not want a PATH search for config.site.
3302 case $CONFIG_SITE in #((
3303 -*) ac_site_file1=./$CONFIG_SITE;;
3304 */*) ac_site_file1=$CONFIG_SITE;;
3305 *) ac_site_file1=./$CONFIG_SITE;;
3306 esac
3307elif test "x$prefix" != xNONE; then
3308 ac_site_file1=$prefix/share/config.site
3309 ac_site_file2=$prefix/etc/config.site
3310else
3311 ac_site_file1=$ac_default_prefix/share/config.site
3312 ac_site_file2=$ac_default_prefix/etc/config.site
3313fi
3314for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3315do
3316 test "x$ac_site_file" = xNONE && continue
3317 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3318 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3319$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3320 sed 's/^/| /' "$ac_site_file" >&5
3321 . "$ac_site_file" \
3322 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3323$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3324as_fn_error $? "failed to load site script $ac_site_file
3325See \`config.log' for more details" "$LINENO" 5; }
3326 fi
3327done
3328
3329if test -r "$cache_file"; then
3330 # Some versions of bash will fail to source /dev/null (special files
3331 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3332 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3333 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3334$as_echo "$as_me: loading cache $cache_file" >&6;}
3335 case $cache_file in
3336 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3337 *) . "./$cache_file";;
3338 esac
3339 fi
3340else
3341 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3342$as_echo "$as_me: creating cache $cache_file" >&6;}
3343 >$cache_file
3344fi
3345
3346gt_needs="$gt_needs need-ngettext"
3347as_fn_append ac_header_list " sys/socket.h"
3348as_fn_append ac_header_list " arpa/inet.h"
3349as_fn_append ac_header_list " features.h"
3350as_fn_append ac_func_list " btowc"
3351as_fn_append ac_func_list " _set_invalid_parameter_handler"
3352as_fn_append ac_header_list " unistd.h"
3353as_fn_append ac_func_list " fcntl"
3354as_fn_append ac_func_list " symlink"
3355as_fn_append ac_header_list " sys/stat.h"
3356as_fn_append ac_func_list " futimens"
3357as_fn_append ac_header_list " netdb.h"
3358as_fn_append ac_header_list " netinet/in.h"
3359as_fn_append ac_func_list " getdelim"
3360as_fn_append ac_func_list " getdtablesize"
3361gl_getopt_required=GNU
3362as_fn_append ac_header_list " getopt.h"
3363as_fn_append ac_header_list " stdio_ext.h"
3364as_fn_append ac_header_list " termios.h"
3365as_fn_append ac_func_list " __fsetlocking"
3366as_fn_append ac_func_list " tcgetattr"
3367as_fn_append ac_func_list " tcsetattr"
3368as_fn_append ac_func_list " gettimeofday"
3369as_fn_append ac_func_list " nanotime"
3370as_fn_append ac_header_list " sys/time.h"
3371as_fn_append ac_header_list " iconv.h"
3372as_fn_append ac_header_list " langinfo.h"
3373as_fn_append ac_header_list " xlocale.h"
3374as_fn_append ac_func_list " lstat"
3375as_fn_append ac_func_list " mbsinit"
3376as_fn_append ac_func_list " mbrtowc"
3377as_fn_append ac_header_list " sys/mman.h"
3378as_fn_append ac_func_list " mprotect"
3379as_fn_append ac_func_list " mkstemp"
3380as_fn_append ac_func_list " nl_langinfo"
3381as_fn_append ac_header_list " sys/param.h"
3382as_fn_append ac_func_list " pipe2"
3383as_fn_append ac_func_list " posix_spawn"
3384as_fn_append ac_func_list " isblank"
3385as_fn_append ac_func_list " iswctype"
3386as_fn_append ac_func_list " wcscoll"
3387as_fn_append ac_header_list " sched.h"
3388as_fn_append ac_header_list " sys/select.h"
3389as_fn_append ac_func_list " sigaction"
3390as_fn_append ac_func_list " sigaltstack"
3391as_fn_append ac_func_list " siginterrupt"
3392as_fn_append ac_func_list " snprintf"
3393as_fn_append ac_header_list " spawn.h"
3394as_fn_append ac_header_list " wchar.h"
3395as_fn_append ac_header_list " stdint.h"
3396as_fn_append ac_func_list " strerror_r"
3397as_fn_append ac_func_list " __xpg_strerror_r"
3398as_fn_append ac_func_list " catgets"
3399as_fn_append ac_header_list " strings.h"
3400as_fn_append ac_header_list " sys/ioctl.h"
3401as_fn_append ac_header_list " sys/uio.h"
3402as_fn_append ac_header_list " sys/wait.h"
3403as_fn_append ac_func_list " pipe"
3404as_fn_append ac_header_list " utime.h"
3405as_fn_append ac_func_list " futimes"
3406as_fn_append ac_func_list " futimesat"
3407as_fn_append ac_func_list " utimensat"
3408as_fn_append ac_func_list " lutimes"
3409as_fn_append ac_func_list " vasnprintf"
3410as_fn_append ac_func_list " wcrtomb"
3411as_fn_append ac_func_list " iswcntrl"
3412as_fn_append ac_header_list " wctype.h"
3413as_fn_append ac_header_list " stdlib.h"
3414# Check that the precious variables saved in the cache have kept the same
3415# value.
3416ac_cache_corrupted=false
3417for ac_var in $ac_precious_vars; do
3418 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3419 eval ac_new_set=\$ac_env_${ac_var}_set
3420 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3421 eval ac_new_val=\$ac_env_${ac_var}_value
3422 case $ac_old_set,$ac_new_set in
3423 set,)
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3425$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3426 ac_cache_corrupted=: ;;
3427 ,set)
3428 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3429$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3430 ac_cache_corrupted=: ;;
3431 ,);;
3432 *)
3433 if test "x$ac_old_val" != "x$ac_new_val"; then
3434 # differences in whitespace do not lead to failure.
3435 ac_old_val_w=`echo x $ac_old_val`
3436 ac_new_val_w=`echo x $ac_new_val`
3437 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3439$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3440 ac_cache_corrupted=:
3441 else
3442 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3443$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3444 eval $ac_var=\$ac_old_val
3445 fi
3446 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3447$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3448 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3449$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3450 fi;;
3451 esac
3452 # Pass precious variables to config.status.
3453 if test "$ac_new_set" = set; then
3454 case $ac_new_val in
3455 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3456 *) ac_arg=$ac_var=$ac_new_val ;;
3457 esac
3458 case " $ac_configure_args " in
3459 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3460 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3461 esac
3462 fi
3463done
3464if $ac_cache_corrupted; then
3465 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3466$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3467 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3468$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3469 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3470fi
3471## -------------------- ##
3472## Main body of script. ##
3473## -------------------- ##
3474
3475ac_ext=c
3476ac_cpp='$CPP $CPPFLAGS'
3477ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3478ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3479ac_compiler_gnu=$ac_cv_c_compiler_gnu
3480
3481
3482
3483
3484{ $as_echo "$as_me:${as_lineno-$LINENO}: configuring for GNU Wget $PACKAGE_VERSION" >&5
3485$as_echo "$as_me: configuring for GNU Wget $PACKAGE_VERSION" >&6;}
3486
3487
3488ac_aux_dir=
3489for ac_dir in build-aux "$srcdir"/build-aux; do
3490 if test -f "$ac_dir/install-sh"; then
3491 ac_aux_dir=$ac_dir
3492 ac_install_sh="$ac_aux_dir/install-sh -c"
3493 break
3494 elif test -f "$ac_dir/install.sh"; then
3495 ac_aux_dir=$ac_dir
3496 ac_install_sh="$ac_aux_dir/install.sh -c"
3497 break
3498 elif test -f "$ac_dir/shtool"; then
3499 ac_aux_dir=$ac_dir
3500 ac_install_sh="$ac_aux_dir/shtool install -c"
3501 break
3502 fi
3503done
3504if test -z "$ac_aux_dir"; then
3505 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3506fi
3507
3508# These three variables are undocumented and unsupported,
3509# and are intended to be withdrawn in a future Autoconf release.
3510# They can cause serious problems if a builder's source tree is in a directory
3511# whose full name contains unusual characters.
3512ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3513ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3514ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3515
3516
3517
3518
3519
3520am__api_version='1.11'
3521
3522# Find a good install program. We prefer a C program (faster),
3523# so one script is as good as another. But avoid the broken or
3524# incompatible versions:
3525# SysV /etc/install, /usr/sbin/install
3526# SunOS /usr/etc/install
3527# IRIX /sbin/install
3528# AIX /bin/install
3529# AmigaOS /C/install, which installs bootblocks on floppy discs
3530# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3531# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3532# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3533# OS/2's system install, which has a completely different semantic
3534# ./install, which can be erroneously created by make from ./install.sh.
3535# Reject install programs that cannot install multiple files.
3536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3537$as_echo_n "checking for a BSD-compatible install... " >&6; }
3538if test -z "$INSTALL"; then
3539if ${ac_cv_path_install+:} false; then :
3540 $as_echo_n "(cached) " >&6
3541else
3542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3543for as_dir in $PATH
3544do
3545 IFS=$as_save_IFS
3546 test -z "$as_dir" && as_dir=.
3547 # Account for people who put trailing slashes in PATH elements.
3548case $as_dir/ in #((
3549 ./ | .// | /[cC]/* | \
3550 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3551 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3552 /usr/ucb/* ) ;;
3553 *)
3554 # OSF1 and SCO ODT 3.0 have their own names for install.
3555 # Don't use installbsd from OSF since it installs stuff as root
3556 # by default.
3557 for ac_prog in ginstall scoinst install; do
3558 for ac_exec_ext in '' $ac_executable_extensions; do
3559 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3560 if test $ac_prog = install &&
3561 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3562 # AIX install. It has an incompatible calling convention.
3563 :
3564 elif test $ac_prog = install &&
3565 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3566 # program-specific install script used by HP pwplus--don't use.
3567 :
3568 else
3569 rm -rf conftest.one conftest.two conftest.dir
3570 echo one > conftest.one
3571 echo two > conftest.two
3572 mkdir conftest.dir
3573 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3574 test -s conftest.one && test -s conftest.two &&
3575 test -s conftest.dir/conftest.one &&
3576 test -s conftest.dir/conftest.two
3577 then
3578 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3579 break 3
3580 fi
3581 fi
3582 fi
3583 done
3584 done
3585 ;;
3586esac
3587
3588 done
3589IFS=$as_save_IFS
3590
3591rm -rf conftest.one conftest.two conftest.dir
3592
3593fi
3594 if test "${ac_cv_path_install+set}" = set; then
3595 INSTALL=$ac_cv_path_install
3596 else
3597 # As a last resort, use the slow shell script. Don't cache a
3598 # value for INSTALL within a source directory, because that will
3599 # break other packages using the cache if that directory is
3600 # removed, or if the value is a relative name.
3601 INSTALL=$ac_install_sh
3602 fi
3603fi
3604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3605$as_echo "$INSTALL" >&6; }
3606
3607# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3608# It thinks the first close brace ends the variable substitution.
3609test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3610
3611test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3612
3613test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3614
3615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3616$as_echo_n "checking whether build environment is sane... " >&6; }
3617# Just in case
3618sleep 1
3619echo timestamp > conftest.file
3620# Reject unsafe characters in $srcdir or the absolute working directory
3621# name. Accept space and tab only in the latter.
3622am_lf='
3623'
3624case `pwd` in
3625 *[\\\"\#\$\&\'\`$am_lf]*)
3626 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3627esac
3628case $srcdir in
3629 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3630 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3631esac
3632
3633# Do `set' in a subshell so we don't clobber the current shell's
3634# arguments. Must try -L first in case configure is actually a
3635# symlink; some systems play weird games with the mod time of symlinks
3636# (eg FreeBSD returns the mod time of the symlink's containing
3637# directory).
3638if (
3639 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3640 if test "$*" = "X"; then
3641 # -L didn't work.
3642 set X `ls -t "$srcdir/configure" conftest.file`
3643 fi
3644 rm -f conftest.file
3645 if test "$*" != "X $srcdir/configure conftest.file" \
3646 && test "$*" != "X conftest.file $srcdir/configure"; then
3647
3648 # If neither matched, then we have a broken ls. This can happen
3649 # if, for instance, CONFIG_SHELL is bash and it inherits a
3650 # broken ls alias from the environment. This has actually
3651 # happened. Such a system could not be considered "sane".
3652 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3653alias in your environment" "$LINENO" 5
3654 fi
3655
3656 test "$2" = conftest.file
3657 )
3658then
3659 # Ok.
3660 :
3661else
3662 as_fn_error $? "newly created file is older than distributed files!
3663Check your system clock" "$LINENO" 5
3664fi
3665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3666$as_echo "yes" >&6; }
3667test "$program_prefix" != NONE &&
3668 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3669# Use a double $ so make ignores it.
3670test "$program_suffix" != NONE &&
3671 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3672# Double any \ or $.
3673# By default was `s,x,x', remove it if useless.
3674ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3675program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3676
3677# expand $ac_aux_dir to an absolute path
3678am_aux_dir=`cd $ac_aux_dir && pwd`
3679
3680if test x"${MISSING+set}" != xset; then
3681 case $am_aux_dir in
3682 *\ * | *\ *)
3683 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3684 *)
3685 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3686 esac
3687fi
3688# Use eval to expand $SHELL
3689if eval "$MISSING --run true"; then
3690 am_missing_run="$MISSING --run "
3691else
3692 am_missing_run=
3693 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3694$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3695fi
3696
3697if test x"${install_sh}" != xset; then
3698 case $am_aux_dir in
3699 *\ * | *\ *)
3700 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3701 *)
3702 install_sh="\${SHELL} $am_aux_dir/install-sh"
3703 esac
3704fi
3705
3706# Installed binaries are usually stripped using `strip' when the user
3707# run `make install-strip'. However `strip' might not be the right
3708# tool to use in cross-compilation environments, therefore Automake
3709# will honor the `STRIP' environment variable to overrule this program.
3710if test "$cross_compiling" != no; then
3711 if test -n "$ac_tool_prefix"; then
3712 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3713set dummy ${ac_tool_prefix}strip; ac_word=$2
3714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3715$as_echo_n "checking for $ac_word... " >&6; }
3716if ${ac_cv_prog_STRIP+:} false; then :
3717 $as_echo_n "(cached) " >&6
3718else
3719 if test -n "$STRIP"; then
3720 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3721else
3722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3723for as_dir in $PATH
3724do
3725 IFS=$as_save_IFS
3726 test -z "$as_dir" && as_dir=.
3727 for ac_exec_ext in '' $ac_executable_extensions; do
3728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3729 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3730 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3731 break 2
3732 fi
3733done
3734 done
3735IFS=$as_save_IFS
3736
3737fi
3738fi
3739STRIP=$ac_cv_prog_STRIP
3740if test -n "$STRIP"; then
3741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3742$as_echo "$STRIP" >&6; }
3743else
3744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3745$as_echo "no" >&6; }
3746fi
3747
3748
3749fi
3750if test -z "$ac_cv_prog_STRIP"; then
3751 ac_ct_STRIP=$STRIP
3752 # Extract the first word of "strip", so it can be a program name with args.
3753set dummy strip; ac_word=$2
3754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3755$as_echo_n "checking for $ac_word... " >&6; }
3756if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3757 $as_echo_n "(cached) " >&6
3758else
3759 if test -n "$ac_ct_STRIP"; then
3760 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3761else
3762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3763for as_dir in $PATH
3764do
3765 IFS=$as_save_IFS
3766 test -z "$as_dir" && as_dir=.
3767 for ac_exec_ext in '' $ac_executable_extensions; do
3768 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3769 ac_cv_prog_ac_ct_STRIP="strip"
3770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3771 break 2
3772 fi
3773done
3774 done
3775IFS=$as_save_IFS
3776
3777fi
3778fi
3779ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3780if test -n "$ac_ct_STRIP"; then
3781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3782$as_echo "$ac_ct_STRIP" >&6; }
3783else
3784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3785$as_echo "no" >&6; }
3786fi
3787
3788 if test "x$ac_ct_STRIP" = x; then
3789 STRIP=":"
3790 else
3791 case $cross_compiling:$ac_tool_warned in
3792yes:)
3793{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3794$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3795ac_tool_warned=yes ;;
3796esac
3797 STRIP=$ac_ct_STRIP
3798 fi
3799else
3800 STRIP="$ac_cv_prog_STRIP"
3801fi
3802
3803fi
3804INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3805
3806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3807$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3808if test -z "$MKDIR_P"; then
3809 if ${ac_cv_path_mkdir+:} false; then :
3810 $as_echo_n "(cached) " >&6
3811else
3812 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3813for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3814do
3815 IFS=$as_save_IFS
3816 test -z "$as_dir" && as_dir=.
3817 for ac_prog in mkdir gmkdir; do
3818 for ac_exec_ext in '' $ac_executable_extensions; do
3819 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3820 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3821 'mkdir (GNU coreutils) '* | \
3822 'mkdir (coreutils) '* | \
3823 'mkdir (fileutils) '4.1*)
3824 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3825 break 3;;
3826 esac
3827 done
3828 done
3829 done
3830IFS=$as_save_IFS
3831
3832fi
3833
3834 test -d ./--version && rmdir ./--version
3835 if test "${ac_cv_path_mkdir+set}" = set; then
3836 MKDIR_P="$ac_cv_path_mkdir -p"
3837 else
3838 # As a last resort, use the slow shell script. Don't cache a
3839 # value for MKDIR_P within a source directory, because that will
3840 # break other packages using the cache if that directory is
3841 # removed, or if the value is a relative name.
3842 MKDIR_P="$ac_install_sh -d"
3843 fi
3844fi
3845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3846$as_echo "$MKDIR_P" >&6; }
3847
3848
3849mkdir_p="$MKDIR_P"
3850case $mkdir_p in
3851 [\\/$]* | ?:[\\/]*) ;;
3852 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3853esac
3854
3855for ac_prog in gawk mawk nawk awk
3856do
3857 # Extract the first word of "$ac_prog", so it can be a program name with args.
3858set dummy $ac_prog; ac_word=$2
3859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3860$as_echo_n "checking for $ac_word... " >&6; }
3861if ${ac_cv_prog_AWK+:} false; then :
3862 $as_echo_n "(cached) " >&6
3863else
3864 if test -n "$AWK"; then
3865 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3866else
3867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3868for as_dir in $PATH
3869do
3870 IFS=$as_save_IFS
3871 test -z "$as_dir" && as_dir=.
3872 for ac_exec_ext in '' $ac_executable_extensions; do
3873 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3874 ac_cv_prog_AWK="$ac_prog"
3875 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3876 break 2
3877 fi
3878done
3879 done
3880IFS=$as_save_IFS
3881
3882fi
3883fi
3884AWK=$ac_cv_prog_AWK
3885if test -n "$AWK"; then
3886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3887$as_echo "$AWK" >&6; }
3888else
3889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3890$as_echo "no" >&6; }
3891fi
3892
3893
3894 test -n "$AWK" && break
3895done
3896
3897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3898$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3899set x ${MAKE-make}
3900ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3901if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3902 $as_echo_n "(cached) " >&6
3903else
3904 cat >conftest.make <<\_ACEOF
3905SHELL = /bin/sh
3906all:
3907 @echo '@@@%%%=$(MAKE)=@@@%%%'
3908_ACEOF
3909# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3910case `${MAKE-make} -f conftest.make 2>/dev/null` in
3911 *@@@%%%=?*=@@@%%%*)
3912 eval ac_cv_prog_make_${ac_make}_set=yes;;
3913 *)
3914 eval ac_cv_prog_make_${ac_make}_set=no;;
3915esac
3916rm -f conftest.make
3917fi
3918if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3920$as_echo "yes" >&6; }
3921 SET_MAKE=
3922else
3923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3924$as_echo "no" >&6; }
3925 SET_MAKE="MAKE=${MAKE-make}"
3926fi
3927
3928rm -rf .tst 2>/dev/null
3929mkdir .tst 2>/dev/null
3930if test -d .tst; then
3931 am__leading_dot=.
3932else
3933 am__leading_dot=_
3934fi
3935rmdir .tst 2>/dev/null
3936
3937if test "`cd $srcdir && pwd`" != "`pwd`"; then
3938 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3939 # is not polluted with repeated "-I."
3940 am__isrc=' -I$(srcdir)'
3941 # test to see if srcdir already configured
3942 if test -f $srcdir/config.status; then
3943 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3944 fi
3945fi
3946
3947# test whether we have cygpath
3948if test -z "$CYGPATH_W"; then
3949 if (cygpath --version) >/dev/null 2>/dev/null; then
3950 CYGPATH_W='cygpath -w'
3951 else
3952 CYGPATH_W=echo
3953 fi
3954fi
3955
3956
3957# Define the identity of the package.
3958 PACKAGE='wget'
3959 VERSION='1.14'
3960
3961
3962cat >>confdefs.h <<_ACEOF
3963#define PACKAGE "$PACKAGE"
3964_ACEOF
3965
3966
3967cat >>confdefs.h <<_ACEOF
3968#define VERSION "$VERSION"
3969_ACEOF
3970
3971# Some tools Automake needs.
3972
3973ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3974
3975
3976AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3977
3978
3979AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3980
3981
3982AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3983
3984
3985MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3986
3987# We need awk for the "check" target. The system "awk" is bad on
3988# some platforms.
3989# Always define AMTAR for backward compatibility. Yes, it's still used
3990# in the wild :-( We should find a proper way to deprecate it ...
3991AMTAR='$${TAR-tar}'
3992
3993am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3994
3995
3996
3997
3998
3999
4000# Make sure we can run config.sub.
4001$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4002 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4003
4004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4005$as_echo_n "checking build system type... " >&6; }
4006if ${ac_cv_build+:} false; then :
4007 $as_echo_n "(cached) " >&6
4008else
4009 ac_build_alias=$build_alias
4010test "x$ac_build_alias" = x &&
4011 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4012test "x$ac_build_alias" = x &&
4013 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4014ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4015 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4016
4017fi
4018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4019$as_echo "$ac_cv_build" >&6; }
4020case $ac_cv_build in
4021*-*-*) ;;
4022*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4023esac
4024build=$ac_cv_build
4025ac_save_IFS=$IFS; IFS='-'
4026set x $ac_cv_build
4027shift
4028build_cpu=$1
4029build_vendor=$2
4030shift; shift
4031# Remember, the first character of IFS is used to create $*,
4032# except with old shells:
4033build_os=$*
4034IFS=$ac_save_IFS
4035case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4036
4037
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4039$as_echo_n "checking host system type... " >&6; }
4040if ${ac_cv_host+:} false; then :
4041 $as_echo_n "(cached) " >&6
4042else
4043 if test "x$host_alias" = x; then
4044 ac_cv_host=$ac_cv_build
4045else
4046 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4047 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4048fi
4049
4050fi
4051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4052$as_echo "$ac_cv_host" >&6; }
4053case $ac_cv_host in
4054*-*-*) ;;
4055*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4056esac
4057host=$ac_cv_host
4058ac_save_IFS=$IFS; IFS='-'
4059set x $ac_cv_host
4060shift
4061host_cpu=$1
4062host_vendor=$2
4063shift; shift
4064# Remember, the first character of IFS is used to create $*,
4065# except with old shells:
4066host_os=$*
4067IFS=$ac_save_IFS
4068case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4069
4070
4071
4072cat >>confdefs.h <<_ACEOF
4073#define OS_TYPE "$host_os"
4074_ACEOF
4075
4076
4077
4078
4079# Check whether --with-ssl was given.
4080if test "${with_ssl+set}" = set; then :
4081 withval=$with_ssl;
4082fi
4083
4084
4085
4086# Check whether --with-zlib was given.
4087if test "${with_zlib+set}" = set; then :
4088 withval=$with_zlib;
4089fi
4090
4091
4092# Check whether --enable-opie was given.
4093if test "${enable_opie+set}" = set; then :
4094 enableval=$enable_opie; ENABLE_OPIE=$enableval
4095else
4096 ENABLE_OPIE=yes
4097fi
4098
4099test x"${ENABLE_OPIE}" = xyes &&
4100$as_echo "#define ENABLE_OPIE 1" >>confdefs.h
4101
4102
4103# Check whether --enable-digest was given.
4104if test "${enable_digest+set}" = set; then :
4105 enableval=$enable_digest; ENABLE_DIGEST=$enableval
4106else
4107 ENABLE_DIGEST=yes
4108fi
4109
4110test x"${ENABLE_DIGEST}" = xyes &&
4111$as_echo "#define ENABLE_DIGEST 1" >>confdefs.h
4112
4113
4114# Check whether --enable-ntlm was given.
4115if test "${enable_ntlm+set}" = set; then :
4116 enableval=$enable_ntlm; ENABLE_NTLM=$enableval
4117else
4118 ENABLE_NTLM=auto
4119fi
4120
4121
4122# Check whether --enable-debug was given.
4123if test "${enable_debug+set}" = set; then :
4124 enableval=$enable_debug; ENABLE_DEBUG=$enableval
4125else
4126 ENABLE_DEBUG=yes
4127fi
4128
4129test x"${ENABLE_DEBUG}" = xyes &&
4130$as_echo "#define ENABLE_DEBUG 1" >>confdefs.h
4131
4132
4133
4134test -z "$CFLAGS" && CFLAGS= auto_cflags=1
4135test -z "$CC" && cc_specified=yes
4136
4137ac_ext=c
4138ac_cpp='$CPP $CPPFLAGS'
4139ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4140ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4141ac_compiler_gnu=$ac_cv_c_compiler_gnu
4142if test -n "$ac_tool_prefix"; then
4143 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4144set dummy ${ac_tool_prefix}gcc; ac_word=$2
4145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4146$as_echo_n "checking for $ac_word... " >&6; }
4147if ${ac_cv_prog_CC+:} false; then :
4148 $as_echo_n "(cached) " >&6
4149else
4150 if test -n "$CC"; then
4151 ac_cv_prog_CC="$CC" # Let the user override the test.
4152else
4153as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4154for as_dir in $PATH
4155do
4156 IFS=$as_save_IFS
4157 test -z "$as_dir" && as_dir=.
4158 for ac_exec_ext in '' $ac_executable_extensions; do
4159 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4160 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4161 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4162 break 2
4163 fi
4164done
4165 done
4166IFS=$as_save_IFS
4167
4168fi
4169fi
4170CC=$ac_cv_prog_CC
4171if test -n "$CC"; then
4172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4173$as_echo "$CC" >&6; }
4174else
4175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4176$as_echo "no" >&6; }
4177fi
4178
4179
4180fi
4181if test -z "$ac_cv_prog_CC"; then
4182 ac_ct_CC=$CC
4183 # Extract the first word of "gcc", so it can be a program name with args.
4184set dummy gcc; ac_word=$2
4185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4186$as_echo_n "checking for $ac_word... " >&6; }
4187if ${ac_cv_prog_ac_ct_CC+:} false; then :
4188 $as_echo_n "(cached) " >&6
4189else
4190 if test -n "$ac_ct_CC"; then
4191 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4192else
4193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4194for as_dir in $PATH
4195do
4196 IFS=$as_save_IFS
4197 test -z "$as_dir" && as_dir=.
4198 for ac_exec_ext in '' $ac_executable_extensions; do
4199 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4200 ac_cv_prog_ac_ct_CC="gcc"
4201 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4202 break 2
4203 fi
4204done
4205 done
4206IFS=$as_save_IFS
4207
4208fi
4209fi
4210ac_ct_CC=$ac_cv_prog_ac_ct_CC
4211if test -n "$ac_ct_CC"; then
4212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4213$as_echo "$ac_ct_CC" >&6; }
4214else
4215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4216$as_echo "no" >&6; }
4217fi
4218
4219 if test "x$ac_ct_CC" = x; then
4220 CC=""
4221 else
4222 case $cross_compiling:$ac_tool_warned in
4223yes:)
4224{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4225$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4226ac_tool_warned=yes ;;
4227esac
4228 CC=$ac_ct_CC
4229 fi
4230else
4231 CC="$ac_cv_prog_CC"
4232fi
4233
4234if test -z "$CC"; then
4235 if test -n "$ac_tool_prefix"; then
4236 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4237set dummy ${ac_tool_prefix}cc; ac_word=$2
4238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4239$as_echo_n "checking for $ac_word... " >&6; }
4240if ${ac_cv_prog_CC+:} false; then :
4241 $as_echo_n "(cached) " >&6
4242else
4243 if test -n "$CC"; then
4244 ac_cv_prog_CC="$CC" # Let the user override the test.
4245else
4246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4247for as_dir in $PATH
4248do
4249 IFS=$as_save_IFS
4250 test -z "$as_dir" && as_dir=.
4251 for ac_exec_ext in '' $ac_executable_extensions; do
4252 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4253 ac_cv_prog_CC="${ac_tool_prefix}cc"
4254 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4255 break 2
4256 fi
4257done
4258 done
4259IFS=$as_save_IFS
4260
4261fi
4262fi
4263CC=$ac_cv_prog_CC
4264if test -n "$CC"; then
4265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4266$as_echo "$CC" >&6; }
4267else
4268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4269$as_echo "no" >&6; }
4270fi
4271
4272
4273 fi
4274fi
4275if test -z "$CC"; then
4276 # Extract the first word of "cc", so it can be a program name with args.
4277set dummy cc; ac_word=$2
4278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4279$as_echo_n "checking for $ac_word... " >&6; }
4280if ${ac_cv_prog_CC+:} false; then :
4281 $as_echo_n "(cached) " >&6
4282else
4283 if test -n "$CC"; then
4284 ac_cv_prog_CC="$CC" # Let the user override the test.
4285else
4286 ac_prog_rejected=no
4287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4288for as_dir in $PATH
4289do
4290 IFS=$as_save_IFS
4291 test -z "$as_dir" && as_dir=.
4292 for ac_exec_ext in '' $ac_executable_extensions; do
4293 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4294 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4295 ac_prog_rejected=yes
4296 continue
4297 fi
4298 ac_cv_prog_CC="cc"
4299 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4300 break 2
4301 fi
4302done
4303 done
4304IFS=$as_save_IFS
4305
4306if test $ac_prog_rejected = yes; then
4307 # We found a bogon in the path, so make sure we never use it.
4308 set dummy $ac_cv_prog_CC
4309 shift
4310 if test $# != 0; then
4311 # We chose a different compiler from the bogus one.
4312 # However, it has the same basename, so the bogon will be chosen
4313 # first if we set CC to just the basename; use the full file name.
4314 shift
4315 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4316 fi
4317fi
4318fi
4319fi
4320CC=$ac_cv_prog_CC
4321if test -n "$CC"; then
4322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4323$as_echo "$CC" >&6; }
4324else
4325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4326$as_echo "no" >&6; }
4327fi
4328
4329
4330fi
4331if test -z "$CC"; then
4332 if test -n "$ac_tool_prefix"; then
4333 for ac_prog in cl.exe
4334 do
4335 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4336set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4338$as_echo_n "checking for $ac_word... " >&6; }
4339if ${ac_cv_prog_CC+:} false; then :
4340 $as_echo_n "(cached) " >&6
4341else
4342 if test -n "$CC"; then
4343 ac_cv_prog_CC="$CC" # Let the user override the test.
4344else
4345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4346for as_dir in $PATH
4347do
4348 IFS=$as_save_IFS
4349 test -z "$as_dir" && as_dir=.
4350 for ac_exec_ext in '' $ac_executable_extensions; do
4351 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4352 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4353 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4354 break 2
4355 fi
4356done
4357 done
4358IFS=$as_save_IFS
4359
4360fi
4361fi
4362CC=$ac_cv_prog_CC
4363if test -n "$CC"; then
4364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4365$as_echo "$CC" >&6; }
4366else
4367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4368$as_echo "no" >&6; }
4369fi
4370
4371
4372 test -n "$CC" && break
4373 done
4374fi
4375if test -z "$CC"; then
4376 ac_ct_CC=$CC
4377 for ac_prog in cl.exe
4378do
4379 # Extract the first word of "$ac_prog", so it can be a program name with args.
4380set dummy $ac_prog; ac_word=$2
4381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4382$as_echo_n "checking for $ac_word... " >&6; }
4383if ${ac_cv_prog_ac_ct_CC+:} false; then :
4384 $as_echo_n "(cached) " >&6
4385else
4386 if test -n "$ac_ct_CC"; then
4387 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4388else
4389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4390for as_dir in $PATH
4391do
4392 IFS=$as_save_IFS
4393 test -z "$as_dir" && as_dir=.
4394 for ac_exec_ext in '' $ac_executable_extensions; do
4395 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4396 ac_cv_prog_ac_ct_CC="$ac_prog"
4397 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4398 break 2
4399 fi
4400done
4401 done
4402IFS=$as_save_IFS
4403
4404fi
4405fi
4406ac_ct_CC=$ac_cv_prog_ac_ct_CC
4407if test -n "$ac_ct_CC"; then
4408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4409$as_echo "$ac_ct_CC" >&6; }
4410else
4411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4412$as_echo "no" >&6; }
4413fi
4414
4415
4416 test -n "$ac_ct_CC" && break
4417done
4418
4419 if test "x$ac_ct_CC" = x; then
4420 CC=""
4421 else
4422 case $cross_compiling:$ac_tool_warned in
4423yes:)
4424{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4425$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4426ac_tool_warned=yes ;;
4427esac
4428 CC=$ac_ct_CC
4429 fi
4430fi
4431
4432fi
4433
4434
4435test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4436$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4437as_fn_error $? "no acceptable C compiler found in \$PATH
4438See \`config.log' for more details" "$LINENO" 5; }
4439
4440# Provide some information about the compiler.
4441$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4442set X $ac_compile
4443ac_compiler=$2
4444for ac_option in --version -v -V -qversion; do
4445 { { ac_try="$ac_compiler $ac_option >&5"
4446case "(($ac_try" in
4447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4448 *) ac_try_echo=$ac_try;;
4449esac
4450eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4451$as_echo "$ac_try_echo"; } >&5
4452 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4453 ac_status=$?
4454 if test -s conftest.err; then
4455 sed '10a\
4456... rest of stderr output deleted ...
4457 10q' conftest.err >conftest.er1
4458 cat conftest.er1 >&5
4459 fi
4460 rm -f conftest.er1 conftest.err
4461 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4462 test $ac_status = 0; }
4463done
4464
4465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h. */
4467
4468int
4469main ()
4470{
4471
4472 ;
4473 return 0;
4474}
4475_ACEOF
4476ac_clean_files_save=$ac_clean_files
4477ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4478# Try to create an executable without -o first, disregard a.out.
4479# It will help us diagnose broken compilers, and finding out an intuition
4480# of exeext.
4481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4482$as_echo_n "checking whether the C compiler works... " >&6; }
4483ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4484
4485# The possible output files:
4486ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4487
4488ac_rmfiles=
4489for ac_file in $ac_files
4490do
4491 case $ac_file in
4492 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4493 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4494 esac
4495done
4496rm -f $ac_rmfiles
4497
4498if { { ac_try="$ac_link_default"
4499case "(($ac_try" in
4500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4501 *) ac_try_echo=$ac_try;;
4502esac
4503eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4504$as_echo "$ac_try_echo"; } >&5
4505 (eval "$ac_link_default") 2>&5
4506 ac_status=$?
4507 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4508 test $ac_status = 0; }; then :
4509 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4510# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4511# in a Makefile. We should not override ac_cv_exeext if it was cached,
4512# so that the user can short-circuit this test for compilers unknown to
4513# Autoconf.
4514for ac_file in $ac_files ''
4515do
4516 test -f "$ac_file" || continue
4517 case $ac_file in
4518 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4519 ;;
4520 [ab].out )
4521 # We found the default executable, but exeext='' is most
4522 # certainly right.
4523 break;;
4524 *.* )
4525 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4526 then :; else
4527 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4528 fi
4529 # We set ac_cv_exeext here because the later test for it is not
4530 # safe: cross compilers may not add the suffix if given an `-o'
4531 # argument, so we may need to know it at that point already.
4532 # Even if this section looks crufty: it has the advantage of
4533 # actually working.
4534 break;;
4535 * )
4536 break;;
4537 esac
4538done
4539test "$ac_cv_exeext" = no && ac_cv_exeext=
4540
4541else
4542 ac_file=''
4543fi
4544if test -z "$ac_file"; then :
4545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4546$as_echo "no" >&6; }
4547$as_echo "$as_me: failed program was:" >&5
4548sed 's/^/| /' conftest.$ac_ext >&5
4549
4550{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4551$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4552as_fn_error 77 "C compiler cannot create executables
4553See \`config.log' for more details" "$LINENO" 5; }
4554else
4555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4556$as_echo "yes" >&6; }
4557fi
4558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4559$as_echo_n "checking for C compiler default output file name... " >&6; }
4560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4561$as_echo "$ac_file" >&6; }
4562ac_exeext=$ac_cv_exeext
4563
4564rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4565ac_clean_files=$ac_clean_files_save
4566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4567$as_echo_n "checking for suffix of executables... " >&6; }
4568if { { ac_try="$ac_link"
4569case "(($ac_try" in
4570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4571 *) ac_try_echo=$ac_try;;
4572esac
4573eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4574$as_echo "$ac_try_echo"; } >&5
4575 (eval "$ac_link") 2>&5
4576 ac_status=$?
4577 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4578 test $ac_status = 0; }; then :
4579 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4580# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4581# work properly (i.e., refer to `conftest.exe'), while it won't with
4582# `rm'.
4583for ac_file in conftest.exe conftest conftest.*; do
4584 test -f "$ac_file" || continue
4585 case $ac_file in
4586 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4587 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4588 break;;
4589 * ) break;;
4590 esac
4591done
4592else
4593 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4594$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4595as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4596See \`config.log' for more details" "$LINENO" 5; }
4597fi
4598rm -f conftest conftest$ac_cv_exeext
4599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4600$as_echo "$ac_cv_exeext" >&6; }
4601
4602rm -f conftest.$ac_ext
4603EXEEXT=$ac_cv_exeext
4604ac_exeext=$EXEEXT
4605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4606/* end confdefs.h. */
4607#include <stdio.h>
4608int
4609main ()
4610{
4611FILE *f = fopen ("conftest.out", "w");
4612 return ferror (f) || fclose (f) != 0;
4613
4614 ;
4615 return 0;
4616}
4617_ACEOF
4618ac_clean_files="$ac_clean_files conftest.out"
4619# Check that the compiler produces executables we can run. If not, either
4620# the compiler is broken, or we cross compile.
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4622$as_echo_n "checking whether we are cross compiling... " >&6; }
4623if test "$cross_compiling" != yes; then
4624 { { ac_try="$ac_link"
4625case "(($ac_try" in
4626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4627 *) ac_try_echo=$ac_try;;
4628esac
4629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4630$as_echo "$ac_try_echo"; } >&5
4631 (eval "$ac_link") 2>&5
4632 ac_status=$?
4633 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4634 test $ac_status = 0; }
4635 if { ac_try='./conftest$ac_cv_exeext'
4636 { { case "(($ac_try" in
4637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4638 *) ac_try_echo=$ac_try;;
4639esac
4640eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4641$as_echo "$ac_try_echo"; } >&5
4642 (eval "$ac_try") 2>&5
4643 ac_status=$?
4644 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4645 test $ac_status = 0; }; }; then
4646 cross_compiling=no
4647 else
4648 if test "$cross_compiling" = maybe; then
4649 cross_compiling=yes
4650 else
4651 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4652$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4653as_fn_error $? "cannot run C compiled programs.
4654If you meant to cross compile, use \`--host'.
4655See \`config.log' for more details" "$LINENO" 5; }
4656 fi
4657 fi
4658fi
4659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4660$as_echo "$cross_compiling" >&6; }
4661
4662rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4663ac_clean_files=$ac_clean_files_save
4664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4665$as_echo_n "checking for suffix of object files... " >&6; }
4666if ${ac_cv_objext+:} false; then :
4667 $as_echo_n "(cached) " >&6
4668else
4669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4670/* end confdefs.h. */
4671
4672int
4673main ()
4674{
4675
4676 ;
4677 return 0;
4678}
4679_ACEOF
4680rm -f conftest.o conftest.obj
4681if { { ac_try="$ac_compile"
4682case "(($ac_try" in
4683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4684 *) ac_try_echo=$ac_try;;
4685esac
4686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4687$as_echo "$ac_try_echo"; } >&5
4688 (eval "$ac_compile") 2>&5
4689 ac_status=$?
4690 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4691 test $ac_status = 0; }; then :
4692 for ac_file in conftest.o conftest.obj conftest.*; do
4693 test -f "$ac_file" || continue;
4694 case $ac_file in
4695 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4696 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4697 break;;
4698 esac
4699done
4700else
4701 $as_echo "$as_me: failed program was:" >&5
4702sed 's/^/| /' conftest.$ac_ext >&5
4703
4704{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4705$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4706as_fn_error $? "cannot compute suffix of object files: cannot compile
4707See \`config.log' for more details" "$LINENO" 5; }
4708fi
4709rm -f conftest.$ac_cv_objext conftest.$ac_ext
4710fi
4711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4712$as_echo "$ac_cv_objext" >&6; }
4713OBJEXT=$ac_cv_objext
4714ac_objext=$OBJEXT
4715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4716$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4717if ${ac_cv_c_compiler_gnu+:} false; then :
4718 $as_echo_n "(cached) " >&6
4719else
4720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4721/* end confdefs.h. */
4722
4723int
4724main ()
4725{
4726#ifndef __GNUC__
4727 choke me
4728#endif
4729
4730 ;
4731 return 0;
4732}
4733_ACEOF
4734if ac_fn_c_try_compile "$LINENO"; then :
4735 ac_compiler_gnu=yes
4736else
4737 ac_compiler_gnu=no
4738fi
4739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4740ac_cv_c_compiler_gnu=$ac_compiler_gnu
4741
4742fi
4743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4744$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4745if test $ac_compiler_gnu = yes; then
4746 GCC=yes
4747else
4748 GCC=
4749fi
4750ac_test_CFLAGS=${CFLAGS+set}
4751ac_save_CFLAGS=$CFLAGS
4752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4753$as_echo_n "checking whether $CC accepts -g... " >&6; }
4754if ${ac_cv_prog_cc_g+:} false; then :
4755 $as_echo_n "(cached) " >&6
4756else
4757 ac_save_c_werror_flag=$ac_c_werror_flag
4758 ac_c_werror_flag=yes
4759 ac_cv_prog_cc_g=no
4760 CFLAGS="-g"
4761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4762/* end confdefs.h. */
4763
4764int
4765main ()
4766{
4767
4768 ;
4769 return 0;
4770}
4771_ACEOF
4772if ac_fn_c_try_compile "$LINENO"; then :
4773 ac_cv_prog_cc_g=yes
4774else
4775 CFLAGS=""
4776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4777/* end confdefs.h. */
4778
4779int
4780main ()
4781{
4782
4783 ;
4784 return 0;
4785}
4786_ACEOF
4787if ac_fn_c_try_compile "$LINENO"; then :
4788
4789else
4790 ac_c_werror_flag=$ac_save_c_werror_flag
4791 CFLAGS="-g"
4792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4793/* end confdefs.h. */
4794
4795int
4796main ()
4797{
4798
4799 ;
4800 return 0;
4801}
4802_ACEOF
4803if ac_fn_c_try_compile "$LINENO"; then :
4804 ac_cv_prog_cc_g=yes
4805fi
4806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4807fi
4808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4809fi
4810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4811 ac_c_werror_flag=$ac_save_c_werror_flag
4812fi
4813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4814$as_echo "$ac_cv_prog_cc_g" >&6; }
4815if test "$ac_test_CFLAGS" = set; then
4816 CFLAGS=$ac_save_CFLAGS
4817elif test $ac_cv_prog_cc_g = yes; then
4818 if test "$GCC" = yes; then
4819 CFLAGS="-g -O2"
4820 else
4821 CFLAGS="-g"
4822 fi
4823else
4824 if test "$GCC" = yes; then
4825 CFLAGS="-O2"
4826 else
4827 CFLAGS=
4828 fi
4829fi
4830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4831$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4832if ${ac_cv_prog_cc_c89+:} false; then :
4833 $as_echo_n "(cached) " >&6
4834else
4835 ac_cv_prog_cc_c89=no
4836ac_save_CC=$CC
4837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4838/* end confdefs.h. */
4839#include <stdarg.h>
4840#include <stdio.h>
4841struct stat;
4842/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4843struct buf { int x; };
4844FILE * (*rcsopen) (struct buf *, struct stat *, int);
4845static char *e (p, i)
4846 char **p;
4847 int i;
4848{
4849 return p[i];
4850}
4851static char *f (char * (*g) (char **, int), char **p, ...)
4852{
4853 char *s;
4854 va_list v;
4855 va_start (v,p);
4856 s = g (p, va_arg (v,int));
4857 va_end (v);
4858 return s;
4859}
4860
4861/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4862 function prototypes and stuff, but not '\xHH' hex character constants.
4863 These don't provoke an error unfortunately, instead are silently treated
4864 as 'x'. The following induces an error, until -std is added to get
4865 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4866 array size at least. It's necessary to write '\x00'==0 to get something
4867 that's true only with -std. */
4868int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4869
4870/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4871 inside strings and character constants. */
4872#define FOO(x) 'x'
4873int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4874
4875int test (int i, double x);
4876struct s1 {int (*f) (int a);};
4877struct s2 {int (*f) (double a);};
4878int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4879int argc;
4880char **argv;
4881int
4882main ()
4883{
4884return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4885 ;
4886 return 0;
4887}
4888_ACEOF
4889for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4890 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4891do
4892 CC="$ac_save_CC $ac_arg"
4893 if ac_fn_c_try_compile "$LINENO"; then :
4894 ac_cv_prog_cc_c89=$ac_arg
4895fi
4896rm -f core conftest.err conftest.$ac_objext
4897 test "x$ac_cv_prog_cc_c89" != "xno" && break
4898done
4899rm -f conftest.$ac_ext
4900CC=$ac_save_CC
4901
4902fi
4903# AC_CACHE_VAL
4904case "x$ac_cv_prog_cc_c89" in
4905 x)
4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4907$as_echo "none needed" >&6; } ;;
4908 xno)
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4910$as_echo "unsupported" >&6; } ;;
4911 *)
4912 CC="$CC $ac_cv_prog_cc_c89"
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4914$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4915esac
4916if test "x$ac_cv_prog_cc_c89" != xno; then :
4917
4918fi
4919
4920ac_ext=c
4921ac_cpp='$CPP $CPPFLAGS'
4922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4924ac_compiler_gnu=$ac_cv_c_compiler_gnu
4925DEPDIR="${am__leading_dot}deps"
4926
4927ac_config_commands="$ac_config_commands depfiles"
4928
4929
4930am_make=${MAKE-make}
4931cat > confinc << 'END'
4932am__doit:
4933 @echo this is the am__doit target
4934.PHONY: am__doit
4935END
4936# If we don't find an include directive, just comment out the code.
4937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4938$as_echo_n "checking for style of include used by $am_make... " >&6; }
4939am__include="#"
4940am__quote=
4941_am_result=none
4942# First try GNU make style include.
4943echo "include confinc" > confmf
4944# Ignore all kinds of additional output from `make'.
4945case `$am_make -s -f confmf 2> /dev/null` in #(
4946*the\ am__doit\ target*)
4947 am__include=include
4948 am__quote=
4949 _am_result=GNU
4950 ;;
4951esac
4952# Now try BSD make style include.
4953if test "$am__include" = "#"; then
4954 echo '.include "confinc"' > confmf
4955 case `$am_make -s -f confmf 2> /dev/null` in #(
4956 *the\ am__doit\ target*)
4957 am__include=.include
4958 am__quote="\""
4959 _am_result=BSD
4960 ;;
4961 esac
4962fi
4963
4964
4965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4966$as_echo "$_am_result" >&6; }
4967rm -f confinc confmf
4968
4969# Check whether --enable-dependency-tracking was given.
4970if test "${enable_dependency_tracking+set}" = set; then :
4971 enableval=$enable_dependency_tracking;
4972fi
4973
4974if test "x$enable_dependency_tracking" != xno; then
4975 am_depcomp="$ac_aux_dir/depcomp"
4976 AMDEPBACKSLASH='\'
4977 am__nodep='_no'
4978fi
4979 if test "x$enable_dependency_tracking" != xno; then
4980 AMDEP_TRUE=
4981 AMDEP_FALSE='#'
4982else
4983 AMDEP_TRUE='#'
4984 AMDEP_FALSE=
4985fi
4986
4987
4988
4989depcc="$CC" am_compiler_list=
4990
4991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4992$as_echo_n "checking dependency style of $depcc... " >&6; }
4993if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4994 $as_echo_n "(cached) " >&6
4995else
4996 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4997 # We make a subdir and do the tests there. Otherwise we can end up
4998 # making bogus files that we don't know about and never remove. For
4999 # instance it was reported that on HP-UX the gcc test will end up
5000 # making a dummy file named `D' -- because `-MD' means `put the output
5001 # in D'.
5002 rm -rf conftest.dir
5003 mkdir conftest.dir
5004 # Copy depcomp to subdir because otherwise we won't find it if we're
5005 # using a relative directory.
5006 cp "$am_depcomp" conftest.dir
5007 cd conftest.dir
5008 # We will build objects and dependencies in a subdirectory because
5009 # it helps to detect inapplicable dependency modes. For instance
5010 # both Tru64's cc and ICC support -MD to output dependencies as a
5011 # side effect of compilation, but ICC will put the dependencies in
5012 # the current directory while Tru64 will put them in the object
5013 # directory.
5014 mkdir sub
5015
5016 am_cv_CC_dependencies_compiler_type=none
5017 if test "$am_compiler_list" = ""; then
5018 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5019 fi
5020 am__universal=false
5021 case " $depcc " in #(
5022 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5023 esac
5024
5025 for depmode in $am_compiler_list; do
5026 # Setup a source with many dependencies, because some compilers
5027 # like to wrap large dependency lists on column 80 (with \), and
5028 # we should not choose a depcomp mode which is confused by this.
5029 #
5030 # We need to recreate these files for each test, as the compiler may
5031 # overwrite some of them when testing with obscure command lines.
5032 # This happens at least with the AIX C compiler.
5033 : > sub/conftest.c
5034 for i in 1 2 3 4 5 6; do
5035 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5036 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5037 # Solaris 8's {/usr,}/bin/sh.
5038 touch sub/conftst$i.h
5039 done
5040 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5041
5042 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5043 # mode. It turns out that the SunPro C++ compiler does not properly
5044 # handle `-M -o', and we need to detect this. Also, some Intel
5045 # versions had trouble with output in subdirs
5046 am__obj=sub/conftest.${OBJEXT-o}
5047 am__minus_obj="-o $am__obj"
5048 case $depmode in
5049 gcc)
5050 # This depmode causes a compiler race in universal mode.
5051 test "$am__universal" = false || continue
5052 ;;
5053 nosideeffect)
5054 # after this tag, mechanisms are not by side-effect, so they'll
5055 # only be used when explicitly requested
5056 if test "x$enable_dependency_tracking" = xyes; then
5057 continue
5058 else
5059 break
5060 fi
5061 ;;
5062 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5063 # This compiler won't grok `-c -o', but also, the minuso test has
5064 # not run yet. These depmodes are late enough in the game, and
5065 # so weak that their functioning should not be impacted.
5066 am__obj=conftest.${OBJEXT-o}
5067 am__minus_obj=
5068 ;;
5069 none) break ;;
5070 esac
5071 if depmode=$depmode \
5072 source=sub/conftest.c object=$am__obj \
5073 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5074 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5075 >/dev/null 2>conftest.err &&
5076 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5077 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5078 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5079 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5080 # icc doesn't choke on unknown options, it will just issue warnings
5081 # or remarks (even with -Werror). So we grep stderr for any message
5082 # that says an option was ignored or not supported.
5083 # When given -MP, icc 7.0 and 7.1 complain thusly:
5084 # icc: Command line warning: ignoring option '-M'; no argument required
5085 # The diagnosis changed in icc 8.0:
5086 # icc: Command line remark: option '-MP' not supported
5087 if (grep 'ignoring option' conftest.err ||
5088 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5089 am_cv_CC_dependencies_compiler_type=$depmode
5090 break
5091 fi
5092 fi
5093 done
5094
5095 cd ..
5096 rm -rf conftest.dir
5097else
5098 am_cv_CC_dependencies_compiler_type=none
5099fi
5100
5101fi
5102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5103$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5104CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5105
5106 if
5107 test "x$enable_dependency_tracking" != xno \
5108 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5109 am__fastdepCC_TRUE=
5110 am__fastdepCC_FALSE='#'
5111else
5112 am__fastdepCC_TRUE='#'
5113 am__fastdepCC_FALSE=
5114fi
5115
5116
5117if test "x$CC" != xcc; then
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5119$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5120else
5121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5122$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5123fi
5124set dummy $CC; ac_cc=`$as_echo "$2" |
5125 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5126if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
5127 $as_echo_n "(cached) " >&6
5128else
5129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5130/* end confdefs.h. */
5131
5132int
5133main ()
5134{
5135
5136 ;
5137 return 0;
5138}
5139_ACEOF
5140# Make sure it works both with $CC and with simple cc.
5141# We do the test twice because some compilers refuse to overwrite an
5142# existing .o file with -o, though they will create one.
5143ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5144rm -f conftest2.*
5145if { { case "(($ac_try" in
5146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5147 *) ac_try_echo=$ac_try;;
5148esac
5149eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5150$as_echo "$ac_try_echo"; } >&5
5151 (eval "$ac_try") 2>&5
5152 ac_status=$?
5153 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5154 test $ac_status = 0; } &&
5155 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5157 *) ac_try_echo=$ac_try;;
5158esac
5159eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5160$as_echo "$ac_try_echo"; } >&5
5161 (eval "$ac_try") 2>&5
5162 ac_status=$?
5163 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5164 test $ac_status = 0; };
5165then
5166 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5167 if test "x$CC" != xcc; then
5168 # Test first that cc exists at all.
5169 if { ac_try='cc -c conftest.$ac_ext >&5'
5170 { { case "(($ac_try" in
5171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5172 *) ac_try_echo=$ac_try;;
5173esac
5174eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5175$as_echo "$ac_try_echo"; } >&5
5176 (eval "$ac_try") 2>&5
5177 ac_status=$?
5178 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5179 test $ac_status = 0; }; }; then
5180 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5181 rm -f conftest2.*
5182 if { { case "(($ac_try" in
5183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5184 *) ac_try_echo=$ac_try;;
5185esac
5186eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5187$as_echo "$ac_try_echo"; } >&5
5188 (eval "$ac_try") 2>&5
5189 ac_status=$?
5190 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5191 test $ac_status = 0; } &&
5192 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5194 *) ac_try_echo=$ac_try;;
5195esac
5196eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5197$as_echo "$ac_try_echo"; } >&5
5198 (eval "$ac_try") 2>&5
5199 ac_status=$?
5200 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5201 test $ac_status = 0; };
5202 then
5203 # cc works too.
5204 :
5205 else
5206 # cc exists but doesn't like -o.
5207 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5208 fi
5209 fi
5210 fi
5211else
5212 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5213fi
5214rm -f core conftest*
5215
5216fi
5217if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5219$as_echo "yes" >&6; }
5220else
5221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5222$as_echo "no" >&6; }
5223
5224$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5225
5226fi
5227
5228# FIXME: we rely on the cache variable name because
5229# there is no other way.
5230set dummy $CC
5231am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5232eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5233if test "$am_t" != yes; then
5234 # Losing compiler, so override with the script.
5235 # FIXME: It is wrong to rewrite CC.
5236 # But if we don't then we get into trouble of one sort or another.
5237 # A longer-term fix would be to have automake use am__CC in this case,
5238 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5239 CC="$am_aux_dir/compile $CC"
5240fi
5241
5242
5243
5244ac_ext=c
5245ac_cpp='$CPP $CPPFLAGS'
5246ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5247ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5248ac_compiler_gnu=$ac_cv_c_compiler_gnu
5249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5250$as_echo_n "checking how to run the C preprocessor... " >&6; }
5251# On Suns, sometimes $CPP names a directory.
5252if test -n "$CPP" && test -d "$CPP"; then
5253 CPP=
5254fi
5255if test -z "$CPP"; then
5256 if ${ac_cv_prog_CPP+:} false; then :
5257 $as_echo_n "(cached) " >&6
5258else
5259 # Double quotes because CPP needs to be expanded
5260 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5261 do
5262 ac_preproc_ok=false
5263for ac_c_preproc_warn_flag in '' yes
5264do
5265 # Use a header file that comes with gcc, so configuring glibc
5266 # with a fresh cross-compiler works.
5267 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5268 # <limits.h> exists even on freestanding compilers.
5269 # On the NeXT, cc -E runs the code through the compiler's parser,
5270 # not just through cpp. "Syntax error" is here to catch this case.
5271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5272/* end confdefs.h. */
5273#ifdef __STDC__
5274# include <limits.h>
5275#else
5276# include <assert.h>
5277#endif
5278 Syntax error
5279_ACEOF
5280if ac_fn_c_try_cpp "$LINENO"; then :
5281
5282else
5283 # Broken: fails on valid input.
5284continue
5285fi
5286rm -f conftest.err conftest.i conftest.$ac_ext
5287
5288 # OK, works on sane cases. Now check whether nonexistent headers
5289 # can be detected and how.
5290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5291/* end confdefs.h. */
5292#include <ac_nonexistent.h>
5293_ACEOF
5294if ac_fn_c_try_cpp "$LINENO"; then :
5295 # Broken: success on invalid input.
5296continue
5297else
5298 # Passes both tests.
5299ac_preproc_ok=:
5300break
5301fi
5302rm -f conftest.err conftest.i conftest.$ac_ext
5303
5304done
5305# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5306rm -f conftest.i conftest.err conftest.$ac_ext
5307if $ac_preproc_ok; then :
5308 break
5309fi
5310
5311 done
5312 ac_cv_prog_CPP=$CPP
5313
5314fi
5315 CPP=$ac_cv_prog_CPP
5316else
5317 ac_cv_prog_CPP=$CPP
5318fi
5319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5320$as_echo "$CPP" >&6; }
5321ac_preproc_ok=false
5322for ac_c_preproc_warn_flag in '' yes
5323do
5324 # Use a header file that comes with gcc, so configuring glibc
5325 # with a fresh cross-compiler works.
5326 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5327 # <limits.h> exists even on freestanding compilers.
5328 # On the NeXT, cc -E runs the code through the compiler's parser,
5329 # not just through cpp. "Syntax error" is here to catch this case.
5330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5331/* end confdefs.h. */
5332#ifdef __STDC__
5333# include <limits.h>
5334#else
5335# include <assert.h>
5336#endif
5337 Syntax error
5338_ACEOF
5339if ac_fn_c_try_cpp "$LINENO"; then :
5340
5341else
5342 # Broken: fails on valid input.
5343continue
5344fi
5345rm -f conftest.err conftest.i conftest.$ac_ext
5346
5347 # OK, works on sane cases. Now check whether nonexistent headers
5348 # can be detected and how.
5349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5350/* end confdefs.h. */
5351#include <ac_nonexistent.h>
5352_ACEOF
5353if ac_fn_c_try_cpp "$LINENO"; then :
5354 # Broken: success on invalid input.
5355continue
5356else
5357 # Passes both tests.
5358ac_preproc_ok=:
5359break
5360fi
5361rm -f conftest.err conftest.i conftest.$ac_ext
5362
5363done
5364# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5365rm -f conftest.i conftest.err conftest.$ac_ext
5366if $ac_preproc_ok; then :
5367
5368else
5369 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5370$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5371as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5372See \`config.log' for more details" "$LINENO" 5; }
5373fi
5374
5375ac_ext=c
5376ac_cpp='$CPP $CPPFLAGS'
5377ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5378ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5379ac_compiler_gnu=$ac_cv_c_compiler_gnu
5380
5381
5382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5383$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5384if ${ac_cv_path_GREP+:} false; then :
5385 $as_echo_n "(cached) " >&6
5386else
5387 if test -z "$GREP"; then
5388 ac_path_GREP_found=false
5389 # Loop through the user's path and test for each of PROGNAME-LIST
5390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5391for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5392do
5393 IFS=$as_save_IFS
5394 test -z "$as_dir" && as_dir=.
5395 for ac_prog in grep ggrep; do
5396 for ac_exec_ext in '' $ac_executable_extensions; do
5397 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5398 as_fn_executable_p "$ac_path_GREP" || continue
5399# Check for GNU ac_path_GREP and select it if it is found.
5400 # Check for GNU $ac_path_GREP
5401case `"$ac_path_GREP" --version 2>&1` in
5402*GNU*)
5403 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5404*)
5405 ac_count=0
5406 $as_echo_n 0123456789 >"conftest.in"
5407 while :
5408 do
5409 cat "conftest.in" "conftest.in" >"conftest.tmp"
5410 mv "conftest.tmp" "conftest.in"
5411 cp "conftest.in" "conftest.nl"
5412 $as_echo 'GREP' >> "conftest.nl"
5413 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5414 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5415 as_fn_arith $ac_count + 1 && ac_count=$as_val
5416 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5417 # Best one so far, save it but keep looking for a better one
5418 ac_cv_path_GREP="$ac_path_GREP"
5419 ac_path_GREP_max=$ac_count
5420 fi
5421 # 10*(2^10) chars as input seems more than enough
5422 test $ac_count -gt 10 && break
5423 done
5424 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5425esac
5426
5427 $ac_path_GREP_found && break 3
5428 done
5429 done
5430 done
5431IFS=$as_save_IFS
5432 if test -z "$ac_cv_path_GREP"; then
5433 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5434 fi
5435else
5436 ac_cv_path_GREP=$GREP
5437fi
5438
5439fi
5440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5441$as_echo "$ac_cv_path_GREP" >&6; }
5442 GREP="$ac_cv_path_GREP"
5443
5444
5445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5446$as_echo_n "checking for egrep... " >&6; }
5447if ${ac_cv_path_EGREP+:} false; then :
5448 $as_echo_n "(cached) " >&6
5449else
5450 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5451 then ac_cv_path_EGREP="$GREP -E"
5452 else
5453 if test -z "$EGREP"; then
5454 ac_path_EGREP_found=false
5455 # Loop through the user's path and test for each of PROGNAME-LIST
5456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5457for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5458do
5459 IFS=$as_save_IFS
5460 test -z "$as_dir" && as_dir=.
5461 for ac_prog in egrep; do
5462 for ac_exec_ext in '' $ac_executable_extensions; do
5463 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5464 as_fn_executable_p "$ac_path_EGREP" || continue
5465# Check for GNU ac_path_EGREP and select it if it is found.
5466 # Check for GNU $ac_path_EGREP
5467case `"$ac_path_EGREP" --version 2>&1` in
5468*GNU*)
5469 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5470*)
5471 ac_count=0
5472 $as_echo_n 0123456789 >"conftest.in"
5473 while :
5474 do
5475 cat "conftest.in" "conftest.in" >"conftest.tmp"
5476 mv "conftest.tmp" "conftest.in"
5477 cp "conftest.in" "conftest.nl"
5478 $as_echo 'EGREP' >> "conftest.nl"
5479 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5480 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5481 as_fn_arith $ac_count + 1 && ac_count=$as_val
5482 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5483 # Best one so far, save it but keep looking for a better one
5484 ac_cv_path_EGREP="$ac_path_EGREP"
5485 ac_path_EGREP_max=$ac_count
5486 fi
5487 # 10*(2^10) chars as input seems more than enough
5488 test $ac_count -gt 10 && break
5489 done
5490 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5491esac
5492
5493 $ac_path_EGREP_found && break 3
5494 done
5495 done
5496 done
5497IFS=$as_save_IFS
5498 if test -z "$ac_cv_path_EGREP"; then
5499 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5500 fi
5501else
5502 ac_cv_path_EGREP=$EGREP
5503fi
5504
5505 fi
5506fi
5507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5508$as_echo "$ac_cv_path_EGREP" >&6; }
5509 EGREP="$ac_cv_path_EGREP"
5510
5511
5512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5513$as_echo_n "checking for ANSI C header files... " >&6; }
5514if ${ac_cv_header_stdc+:} false; then :
5515 $as_echo_n "(cached) " >&6
5516else
5517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5518/* end confdefs.h. */
5519#include <stdlib.h>
5520#include <stdarg.h>
5521#include <string.h>
5522#include <float.h>
5523
5524int
5525main ()
5526{
5527
5528 ;
5529 return 0;
5530}
5531_ACEOF
5532if ac_fn_c_try_compile "$LINENO"; then :
5533 ac_cv_header_stdc=yes
5534else
5535 ac_cv_header_stdc=no
5536fi
5537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5538
5539if test $ac_cv_header_stdc = yes; then
5540 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5542/* end confdefs.h. */
5543#include <string.h>
5544
5545_ACEOF
5546if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5547 $EGREP "memchr" >/dev/null 2>&1; then :
5548
5549else
5550 ac_cv_header_stdc=no
5551fi
5552rm -f conftest*
5553
5554fi
5555
5556if test $ac_cv_header_stdc = yes; then
5557 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5559/* end confdefs.h. */
5560#include <stdlib.h>
5561
5562_ACEOF
5563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5564 $EGREP "free" >/dev/null 2>&1; then :
5565
5566else
5567 ac_cv_header_stdc=no
5568fi
5569rm -f conftest*
5570
5571fi
5572
5573if test $ac_cv_header_stdc = yes; then
5574 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5575 if test "$cross_compiling" = yes; then :
5576 :
5577else
5578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5579/* end confdefs.h. */
5580#include <ctype.h>
5581#include <stdlib.h>
5582#if ((' ' & 0x0FF) == 0x020)
5583# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5584# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5585#else
5586# define ISLOWER(c) \
5587 (('a' <= (c) && (c) <= 'i') \
5588 || ('j' <= (c) && (c) <= 'r') \
5589 || ('s' <= (c) && (c) <= 'z'))
5590# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5591#endif
5592
5593#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5594int
5595main ()
5596{
5597 int i;
5598 for (i = 0; i < 256; i++)
5599 if (XOR (islower (i), ISLOWER (i))
5600 || toupper (i) != TOUPPER (i))
5601 return 2;
5602 return 0;
5603}
5604_ACEOF
5605if ac_fn_c_try_run "$LINENO"; then :
5606
5607else
5608 ac_cv_header_stdc=no
5609fi
5610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5611 conftest.$ac_objext conftest.beam conftest.$ac_ext
5612fi
5613
5614fi
5615fi
5616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5617$as_echo "$ac_cv_header_stdc" >&6; }
5618if test $ac_cv_header_stdc = yes; then
5619
5620$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5621
5622fi
5623
5624# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5625for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5626 inttypes.h stdint.h unistd.h
5627do :
5628 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5629ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5630"
5631if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5632 cat >>confdefs.h <<_ACEOF
5633#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5634_ACEOF
5635
5636fi
5637
5638done
5639
5640
5641
5642
5643
5644 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5645if test "x$ac_cv_header_minix_config_h" = xyes; then :
5646 MINIX=yes
5647else
5648 MINIX=
5649fi
5650
5651
5652 if test "$MINIX" = yes; then
5653
5654$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5655
5656
5657$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5658
5659
5660$as_echo "#define _MINIX 1" >>confdefs.h
5661
5662 fi
5663
5664 case "$host_os" in
5665 hpux*)
5666
5667$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5668
5669 ;;
5670 esac
5671
5672
5673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5674$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5675if ${ac_cv_safe_to_define___extensions__+:} false; then :
5676 $as_echo_n "(cached) " >&6
5677else
5678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5679/* end confdefs.h. */
5680
5681# define __EXTENSIONS__ 1
5682 $ac_includes_default
5683int
5684main ()
5685{
5686
5687 ;
5688 return 0;
5689}
5690_ACEOF
5691if ac_fn_c_try_compile "$LINENO"; then :
5692 ac_cv_safe_to_define___extensions__=yes
5693else
5694 ac_cv_safe_to_define___extensions__=no
5695fi
5696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5697fi
5698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5699$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5700 test $ac_cv_safe_to_define___extensions__ = yes &&
5701 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5702
5703 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5704
5705 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5706
5707 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5708
5709 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5710
5711 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5712
5713
5714
5715
5716
5717
5718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5719$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5720if ${gl_cv_c_amsterdam_compiler+:} false; then :
5721 $as_echo_n "(cached) " >&6
5722else
5723
5724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5725/* end confdefs.h. */
5726
5727#ifdef __ACK__
5728Amsterdam
5729#endif
5730
5731_ACEOF
5732if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5733 $EGREP "Amsterdam" >/dev/null 2>&1; then :
5734 gl_cv_c_amsterdam_compiler=yes
5735else
5736 gl_cv_c_amsterdam_compiler=no
5737fi
5738rm -f conftest*
5739
5740
5741fi
5742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5743$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5744 if test -z "$AR"; then
5745 if test $gl_cv_c_amsterdam_compiler = yes; then
5746 AR='cc -c.a'
5747 if test -z "$ARFLAGS"; then
5748 ARFLAGS='-o'
5749 fi
5750 else
5751 if test -n "$ac_tool_prefix"; then
5752 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5753set dummy ${ac_tool_prefix}ar; ac_word=$2
5754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5755$as_echo_n "checking for $ac_word... " >&6; }
5756if ${ac_cv_prog_AR+:} false; then :
5757 $as_echo_n "(cached) " >&6
5758else
5759 if test -n "$AR"; then
5760 ac_cv_prog_AR="$AR" # Let the user override the test.
5761else
5762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5763for as_dir in $PATH
5764do
5765 IFS=$as_save_IFS
5766 test -z "$as_dir" && as_dir=.
5767 for ac_exec_ext in '' $ac_executable_extensions; do
5768 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5769 ac_cv_prog_AR="${ac_tool_prefix}ar"
5770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5771 break 2
5772 fi
5773done
5774 done
5775IFS=$as_save_IFS
5776
5777fi
5778fi
5779AR=$ac_cv_prog_AR
5780if test -n "$AR"; then
5781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5782$as_echo "$AR" >&6; }
5783else
5784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5785$as_echo "no" >&6; }
5786fi
5787
5788
5789fi
5790if test -z "$ac_cv_prog_AR"; then
5791 ac_ct_AR=$AR
5792 # Extract the first word of "ar", so it can be a program name with args.
5793set dummy ar; ac_word=$2
5794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5795$as_echo_n "checking for $ac_word... " >&6; }
5796if ${ac_cv_prog_ac_ct_AR+:} false; then :
5797 $as_echo_n "(cached) " >&6
5798else
5799 if test -n "$ac_ct_AR"; then
5800 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5801else
5802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5803for as_dir in $PATH
5804do
5805 IFS=$as_save_IFS
5806 test -z "$as_dir" && as_dir=.
5807 for ac_exec_ext in '' $ac_executable_extensions; do
5808 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5809 ac_cv_prog_ac_ct_AR="ar"
5810 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5811 break 2
5812 fi
5813done
5814 done
5815IFS=$as_save_IFS
5816
5817fi
5818fi
5819ac_ct_AR=$ac_cv_prog_ac_ct_AR
5820if test -n "$ac_ct_AR"; then
5821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5822$as_echo "$ac_ct_AR" >&6; }
5823else
5824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5825$as_echo "no" >&6; }
5826fi
5827
5828 if test "x$ac_ct_AR" = x; then
5829 AR="ar"
5830 else
5831 case $cross_compiling:$ac_tool_warned in
5832yes:)
5833{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5834$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5835ac_tool_warned=yes ;;
5836esac
5837 AR=$ac_ct_AR
5838 fi
5839else
5840 AR="$ac_cv_prog_AR"
5841fi
5842
5843 if test -z "$ARFLAGS"; then
5844 ARFLAGS='cru'
5845 fi
5846 fi
5847 else
5848 if test -z "$ARFLAGS"; then
5849 ARFLAGS='cru'
5850 fi
5851 fi
5852
5853
5854 if test -z "$RANLIB"; then
5855 if test $gl_cv_c_amsterdam_compiler = yes; then
5856 RANLIB=':'
5857 else
5858 if test -n "$ac_tool_prefix"; then
5859 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5860set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5862$as_echo_n "checking for $ac_word... " >&6; }
5863if ${ac_cv_prog_RANLIB+:} false; then :
5864 $as_echo_n "(cached) " >&6
5865else
5866 if test -n "$RANLIB"; then
5867 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5868else
5869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5870for as_dir in $PATH
5871do
5872 IFS=$as_save_IFS
5873 test -z "$as_dir" && as_dir=.
5874 for ac_exec_ext in '' $ac_executable_extensions; do
5875 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5876 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5878 break 2
5879 fi
5880done
5881 done
5882IFS=$as_save_IFS
5883
5884fi
5885fi
5886RANLIB=$ac_cv_prog_RANLIB
5887if test -n "$RANLIB"; then
5888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5889$as_echo "$RANLIB" >&6; }
5890else
5891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5892$as_echo "no" >&6; }
5893fi
5894
5895
5896fi
5897if test -z "$ac_cv_prog_RANLIB"; then
5898 ac_ct_RANLIB=$RANLIB
5899 # Extract the first word of "ranlib", so it can be a program name with args.
5900set dummy ranlib; ac_word=$2
5901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5902$as_echo_n "checking for $ac_word... " >&6; }
5903if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5904 $as_echo_n "(cached) " >&6
5905else
5906 if test -n "$ac_ct_RANLIB"; then
5907 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5908else
5909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5910for as_dir in $PATH
5911do
5912 IFS=$as_save_IFS
5913 test -z "$as_dir" && as_dir=.
5914 for ac_exec_ext in '' $ac_executable_extensions; do
5915 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5916 ac_cv_prog_ac_ct_RANLIB="ranlib"
5917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5918 break 2
5919 fi
5920done
5921 done
5922IFS=$as_save_IFS
5923
5924fi
5925fi
5926ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5927if test -n "$ac_ct_RANLIB"; then
5928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5929$as_echo "$ac_ct_RANLIB" >&6; }
5930else
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932$as_echo "no" >&6; }
5933fi
5934
5935 if test "x$ac_ct_RANLIB" = x; then
5936 RANLIB=":"
5937 else
5938 case $cross_compiling:$ac_tool_warned in
5939yes:)
5940{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5941$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5942ac_tool_warned=yes ;;
5943esac
5944 RANLIB=$ac_ct_RANLIB
5945 fi
5946else
5947 RANLIB="$ac_cv_prog_RANLIB"
5948fi
5949
5950 fi
5951 fi
5952
5953
5954
5955
5956
5957
5958
5959
5960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
5961$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
5962if ${ac_cv_sys_largefile_source+:} false; then :
5963 $as_echo_n "(cached) " >&6
5964else
5965 while :; do
5966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5967/* end confdefs.h. */
5968#include <sys/types.h> /* for off_t */
5969 #include <stdio.h>
5970int
5971main ()
5972{
5973int (*fp) (FILE *, off_t, int) = fseeko;
5974 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5975 ;
5976 return 0;
5977}
5978_ACEOF
5979if ac_fn_c_try_link "$LINENO"; then :
5980 ac_cv_sys_largefile_source=no; break
5981fi
5982rm -f core conftest.err conftest.$ac_objext \
5983 conftest$ac_exeext conftest.$ac_ext
5984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5985/* end confdefs.h. */
5986#define _LARGEFILE_SOURCE 1
5987#include <sys/types.h> /* for off_t */
5988 #include <stdio.h>
5989int
5990main ()
5991{
5992int (*fp) (FILE *, off_t, int) = fseeko;
5993 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5994 ;
5995 return 0;
5996}
5997_ACEOF
5998if ac_fn_c_try_link "$LINENO"; then :
5999 ac_cv_sys_largefile_source=1; break
6000fi
6001rm -f core conftest.err conftest.$ac_objext \
6002 conftest$ac_exeext conftest.$ac_ext
6003 ac_cv_sys_largefile_source=unknown
6004 break
6005done
6006fi
6007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6008$as_echo "$ac_cv_sys_largefile_source" >&6; }
6009case $ac_cv_sys_largefile_source in #(
6010 no | unknown) ;;
6011 *)
6012cat >>confdefs.h <<_ACEOF
6013#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6014_ACEOF
6015;;
6016esac
6017rm -rf conftest*
6018
6019# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6020# in glibc 2.1.3, but that breaks too many other things.
6021# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6022if test $ac_cv_sys_largefile_source != unknown; then
6023
6024$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
6025
6026fi
6027
6028# Check whether --enable-largefile was given.
6029if test "${enable_largefile+set}" = set; then :
6030 enableval=$enable_largefile;
6031fi
6032
6033if test "$enable_largefile" != no; then
6034
6035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6036$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6037if ${ac_cv_sys_largefile_CC+:} false; then :
6038 $as_echo_n "(cached) " >&6
6039else
6040 ac_cv_sys_largefile_CC=no
6041 if test "$GCC" != yes; then
6042 ac_save_CC=$CC
6043 while :; do
6044 # IRIX 6.2 and later do not support large files by default,
6045 # so use the C compiler's -n32 option if that helps.
6046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6047/* end confdefs.h. */
6048#include <sys/types.h>
6049 /* Check that off_t can represent 2**63 - 1 correctly.
6050 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6051 since some C++ compilers masquerading as C compilers
6052 incorrectly reject 9223372036854775807. */
6053#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6054 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6055 && LARGE_OFF_T % 2147483647 == 1)
6056 ? 1 : -1];
6057int
6058main ()
6059{
6060
6061 ;
6062 return 0;
6063}
6064_ACEOF
6065 if ac_fn_c_try_compile "$LINENO"; then :
6066 break
6067fi
6068rm -f core conftest.err conftest.$ac_objext
6069 CC="$CC -n32"
6070 if ac_fn_c_try_compile "$LINENO"; then :
6071 ac_cv_sys_largefile_CC=' -n32'; break
6072fi
6073rm -f core conftest.err conftest.$ac_objext
6074 break
6075 done
6076 CC=$ac_save_CC
6077 rm -f conftest.$ac_ext
6078 fi
6079fi
6080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6081$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6082 if test "$ac_cv_sys_largefile_CC" != no; then
6083 CC=$CC$ac_cv_sys_largefile_CC
6084 fi
6085
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6087$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6088if ${ac_cv_sys_file_offset_bits+:} false; then :
6089 $as_echo_n "(cached) " >&6
6090else
6091 while :; do
6092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6093/* end confdefs.h. */
6094#include <sys/types.h>
6095 /* Check that off_t can represent 2**63 - 1 correctly.
6096 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6097 since some C++ compilers masquerading as C compilers
6098 incorrectly reject 9223372036854775807. */
6099#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6100 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6101 && LARGE_OFF_T % 2147483647 == 1)
6102 ? 1 : -1];
6103int
6104main ()
6105{
6106
6107 ;
6108 return 0;
6109}
6110_ACEOF
6111if ac_fn_c_try_compile "$LINENO"; then :
6112 ac_cv_sys_file_offset_bits=no; break
6113fi
6114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6116/* end confdefs.h. */
6117#define _FILE_OFFSET_BITS 64
6118#include <sys/types.h>
6119 /* Check that off_t can represent 2**63 - 1 correctly.
6120 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6121 since some C++ compilers masquerading as C compilers
6122 incorrectly reject 9223372036854775807. */
6123#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6124 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6125 && LARGE_OFF_T % 2147483647 == 1)
6126 ? 1 : -1];
6127int
6128main ()
6129{
6130
6131 ;
6132 return 0;
6133}
6134_ACEOF
6135if ac_fn_c_try_compile "$LINENO"; then :
6136 ac_cv_sys_file_offset_bits=64; break
6137fi
6138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6139 ac_cv_sys_file_offset_bits=unknown
6140 break
6141done
6142fi
6143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6144$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6145case $ac_cv_sys_file_offset_bits in #(
6146 no | unknown) ;;
6147 *)
6148cat >>confdefs.h <<_ACEOF
6149#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6150_ACEOF
6151;;
6152esac
6153rm -rf conftest*
6154 if test $ac_cv_sys_file_offset_bits = unknown; then
6155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6156$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6157if ${ac_cv_sys_large_files+:} false; then :
6158 $as_echo_n "(cached) " >&6
6159else
6160 while :; do
6161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6162/* end confdefs.h. */
6163#include <sys/types.h>
6164 /* Check that off_t can represent 2**63 - 1 correctly.
6165 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6166 since some C++ compilers masquerading as C compilers
6167 incorrectly reject 9223372036854775807. */
6168#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6169 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6170 && LARGE_OFF_T % 2147483647 == 1)
6171 ? 1 : -1];
6172int
6173main ()
6174{
6175
6176 ;
6177 return 0;
6178}
6179_ACEOF
6180if ac_fn_c_try_compile "$LINENO"; then :
6181 ac_cv_sys_large_files=no; break
6182fi
6183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6185/* end confdefs.h. */
6186#define _LARGE_FILES 1
6187#include <sys/types.h>
6188 /* Check that off_t can represent 2**63 - 1 correctly.
6189 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6190 since some C++ compilers masquerading as C compilers
6191 incorrectly reject 9223372036854775807. */
6192#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6193 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6194 && LARGE_OFF_T % 2147483647 == 1)
6195 ? 1 : -1];
6196int
6197main ()
6198{
6199
6200 ;
6201 return 0;
6202}
6203_ACEOF
6204if ac_fn_c_try_compile "$LINENO"; then :
6205 ac_cv_sys_large_files=1; break
6206fi
6207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6208 ac_cv_sys_large_files=unknown
6209 break
6210done
6211fi
6212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6213$as_echo "$ac_cv_sys_large_files" >&6; }
6214case $ac_cv_sys_large_files in #(
6215 no | unknown) ;;
6216 *)
6217cat >>confdefs.h <<_ACEOF
6218#define _LARGE_FILES $ac_cv_sys_large_files
6219_ACEOF
6220;;
6221esac
6222rm -rf conftest*
6223 fi
6224
6225
6226fi
6227
6228
6229
6230
6231
6232
6233 # Check whether --enable-threads was given.
6234if test "${enable_threads+set}" = set; then :
6235 enableval=$enable_threads; gl_use_threads=$enableval
6236else
6237 if test -n "$gl_use_threads_default"; then
6238 gl_use_threads="$gl_use_threads_default"
6239 else
6240 case "$host_os" in
6241 osf*) gl_use_threads=no ;;
6242 cygwin*)
6243 case `uname -r` in
6244 1.[0-5].*) gl_use_threads=no ;;
6245 *) gl_use_threads=yes ;;
6246 esac
6247 ;;
6248 *) gl_use_threads=yes ;;
6249 esac
6250 fi
6251
6252fi
6253
6254 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
6255 # For using <pthread.h>:
6256 case "$host_os" in
6257 osf*)
6258 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6259 # groks <pthread.h>. cc also understands the flag -pthread, but
6260 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6261 # 2. putting a flag into CPPFLAGS that has an effect on the linker
6262 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
6263 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6264 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
6265 ;;
6266 esac
6267 # Some systems optimize for single-threaded programs by default, and
6268 # need special flags to disable these optimizations. For example, the
6269 # definition of 'errno' in <errno.h>.
6270 case "$host_os" in
6271 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
6272 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
6273 esac
6274 fi
6275
6276
6277
6278
6279 # Code from module accept:
6280 # Code from module alloca:
6281 # Code from module alloca-opt:
6282 # Code from module announce-gen:
6283 # Code from module arpa_inet:
6284 # Code from module base32:
6285 # Code from module binary-io:
6286 # Code from module bind:
6287 # Code from module btowc:
6288 # Code from module c-ctype:
6289 # Code from module c-strcase:
6290 # Code from module c-strcaseeq:
6291 # Code from module clock-time:
6292 # Code from module cloexec:
6293 # Code from module close:
6294 # Code from module configmake:
6295 # Code from module connect:
6296 # Code from module crypto/md5:
6297 # Code from module crypto/sha1:
6298 # Code from module dirname-lgpl:
6299 # Code from module dosname:
6300 # Code from module double-slash-root:
6301 # Code from module dup2:
6302 # Code from module environ:
6303 # Code from module errno:
6304 # Code from module error:
6305 # Code from module exitfail:
6306 # Code from module extensions:
6307
6308 # Code from module extern-inline:
6309 # Code from module fatal-signal:
6310 # Code from module fcntl:
6311 # Code from module fcntl-h:
6312 # Code from module fd-hook:
6313 # Code from module fd-safer-flag:
6314 # Code from module float:
6315 # Code from module fseek:
6316 # Code from module fseeko:
6317
6318 # Code from module fstat:
6319 # Code from module ftell:
6320 # Code from module ftello:
6321
6322 # Code from module futimens:
6323 # Code from module getaddrinfo:
6324 # Code from module getdelim:
6325 # Code from module getdtablesize:
6326 # Code from module getline:
6327 # Code from module getopt-gnu:
6328 # Code from module getopt-posix:
6329 # Code from module getpass-gnu:
6330 # Code from module getpeername:
6331 # Code from module getsockname:
6332 # Code from module gettext-h:
6333 # Code from module gettime:
6334 # Code from module gettimeofday:
6335 # Code from module git-version-gen:
6336 # Code from module gnumakefile:
6337 # Code from module gnupload:
6338 # Code from module havelib:
6339 # Code from module hostent:
6340 # Code from module iconv:
6341 # Code from module iconv-h:
6342 # Code from module include_next:
6343 # Code from module inet_ntop:
6344 # Code from module inline:
6345 # Code from module intprops:
6346 # Code from module ioctl:
6347 # Code from module langinfo:
6348 # Code from module largefile:
6349
6350 # Code from module listen:
6351 # Code from module localcharset:
6352 # Code from module locale:
6353 # Code from module localeconv:
6354 # Code from module lock:
6355 # Code from module lseek:
6356 # Code from module lstat:
6357 # Code from module maintainer-makefile:
6358 # Code from module malloc-gnu:
6359 # Code from module malloc-posix:
6360 # Code from module mbrtowc:
6361 # Code from module mbsinit:
6362 # Code from module mbtowc:
6363 # Code from module memchr:
6364 # Code from module mkdir:
6365 # Code from module mkstemp:
6366 # Code from module msvc-inval:
6367 # Code from module msvc-nothrow:
6368 # Code from module multiarch:
6369 # Code from module netdb:
6370 # Code from module netinet_in:
6371 # Code from module nl_langinfo:
6372 # Code from module nocrash:
6373 # Code from module open:
6374 # Code from module pathmax:
6375 # Code from module pipe:
6376 # Code from module pipe2:
6377 # Code from module pipe2-safer:
6378 # Code from module posix_spawn-internal:
6379 # Code from module posix_spawn_file_actions_addclose:
6380 # Code from module posix_spawn_file_actions_adddup2:
6381 # Code from module posix_spawn_file_actions_addopen:
6382 # Code from module posix_spawn_file_actions_destroy:
6383 # Code from module posix_spawn_file_actions_init:
6384 # Code from module posix_spawnattr_destroy:
6385 # Code from module posix_spawnattr_init:
6386 # Code from module posix_spawnattr_setflags:
6387 # Code from module posix_spawnattr_setsigmask:
6388 # Code from module posix_spawnp:
6389 # Code from module quote:
6390 # Code from module quotearg:
6391 # Code from module quotearg-simple:
6392 # Code from module raise:
6393 # Code from module rawmemchr:
6394 # Code from module realloc-posix:
6395 # Code from module recv:
6396 # Code from module regex:
6397 # Code from module sched:
6398 # Code from module select:
6399 # Code from module send:
6400 # Code from module servent:
6401 # Code from module setsockopt:
6402 # Code from module sigaction:
6403 # Code from module signal-h:
6404 # Code from module sigpipe:
6405 # Code from module sigprocmask:
6406 # Code from module size_max:
6407 # Code from module snippet/_Noreturn:
6408 # Code from module snippet/arg-nonnull:
6409 # Code from module snippet/c++defs:
6410 # Code from module snippet/warn-on-use:
6411 # Code from module snprintf:
6412 # Code from module socket:
6413 # Code from module socketlib:
6414 # Code from module sockets:
6415 # Code from module socklen:
6416 # Code from module spawn:
6417 # Code from module spawn-pipe:
6418 # Code from module ssize_t:
6419 # Code from module stat:
6420 # Code from module stat-time:
6421 # Code from module stdalign:
6422 # Code from module stdbool:
6423 # Code from module stddef:
6424 # Code from module stdint:
6425 # Code from module stdio:
6426 # Code from module stdlib:
6427 # Code from module strcase:
6428 # Code from module strcasestr:
6429 # Code from module strcasestr-simple:
6430 # Code from module strchrnul:
6431 # Code from module streq:
6432 # Code from module strerror:
6433 # Code from module strerror-override:
6434 # Code from module strerror_r-posix:
6435 # Code from module string:
6436 # Code from module strings:
6437 # Code from module strtok_r:
6438 # Code from module sys_ioctl:
6439 # Code from module sys_select:
6440 # Code from module sys_socket:
6441 # Code from module sys_stat:
6442 # Code from module sys_time:
6443 # Code from module sys_types:
6444 # Code from module sys_uio:
6445 # Code from module sys_wait:
6446 # Code from module tempname:
6447 # Code from module threadlib:
6448
6449
6450
6451 # Code from module time:
6452 # Code from module timespec:
6453 # Code from module tmpdir:
6454 # Code from module unistd:
6455 # Code from module unistd-safer:
6456 # Code from module unlocked-io:
6457 # Code from module update-copyright:
6458 # Code from module useless-if-before-free:
6459 # Code from module utimens:
6460 # Code from module vasnprintf:
6461 # Code from module vasprintf:
6462 # Code from module vc-list-files:
6463 # Code from module verify:
6464 # Code from module vsnprintf:
6465 # Code from module wait-process:
6466 # Code from module waitpid:
6467 # Code from module wchar:
6468 # Code from module wcrtomb:
6469 # Code from module wctype-h:
6470 # Code from module write:
6471 # Code from module xalloc:
6472 # Code from module xalloc-die:
6473 # Code from module xalloc-oversized:
6474 # Code from module xsize:
6475
6476
6477
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6479$as_echo_n "checking whether NLS is requested... " >&6; }
6480 # Check whether --enable-nls was given.
6481if test "${enable_nls+set}" = set; then :
6482 enableval=$enable_nls; USE_NLS=$enableval
6483else
6484 USE_NLS=yes
6485fi
6486
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
6488$as_echo "$USE_NLS" >&6; }
6489
6490
6491
6492
6493 GETTEXT_MACRO_VERSION=0.17
6494
6495
6496
6497 # Extract the first word of "msgfmt", so it can be a program name with args.
6498set dummy msgfmt; ac_word=$2
6499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6500$as_echo_n "checking for $ac_word... " >&6; }
6501if ${ac_cv_path_MSGFMT+:} false; then :
6502 $as_echo_n "(cached) " >&6
6503else
6504 case "$MSGFMT" in
6505 /*)
6506 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6507 ;;
6508 *)
6509 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6510 for ac_dir in $PATH; do
6511 test -z "$ac_dir" && ac_dir=.
6512 if test -f $ac_dir/$ac_word; then
6513 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
6514 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
6515 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6516 break
6517 fi
6518 fi
6519 done
6520 IFS="$ac_save_ifs"
6521 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
6522 ;;
6523esac
6524fi
6525MSGFMT="$ac_cv_path_MSGFMT"
6526if test -n "$MSGFMT"; then
6527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
6528$as_echo "$MSGFMT" >&6; }
6529else
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; }
6532fi
6533
6534 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6535set dummy gmsgfmt; ac_word=$2
6536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6537$as_echo_n "checking for $ac_word... " >&6; }
6538if ${ac_cv_path_GMSGFMT+:} false; then :
6539 $as_echo_n "(cached) " >&6
6540else
6541 case $GMSGFMT in
6542 [\\/]* | ?:[\\/]*)
6543 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6544 ;;
6545 *)
6546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6547for as_dir in $PATH
6548do
6549 IFS=$as_save_IFS
6550 test -z "$as_dir" && as_dir=.
6551 for ac_exec_ext in '' $ac_executable_extensions; do
6552 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6553 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
6554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6555 break 2
6556 fi
6557done
6558 done
6559IFS=$as_save_IFS
6560
6561 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6562 ;;
6563esac
6564fi
6565GMSGFMT=$ac_cv_path_GMSGFMT
6566if test -n "$GMSGFMT"; then
6567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
6568$as_echo "$GMSGFMT" >&6; }
6569else
6570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6571$as_echo "no" >&6; }
6572fi
6573
6574
6575
6576 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
6577 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
6578 *) MSGFMT_015=$MSGFMT ;;
6579 esac
6580
6581 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
6582 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
6583 *) GMSGFMT_015=$GMSGFMT ;;
6584 esac
6585
6586
6587 # Extract the first word of "xgettext", so it can be a program name with args.
6588set dummy xgettext; ac_word=$2
6589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6590$as_echo_n "checking for $ac_word... " >&6; }
6591if ${ac_cv_path_XGETTEXT+:} false; then :
6592 $as_echo_n "(cached) " >&6
6593else
6594 case "$XGETTEXT" in
6595 /*)
6596 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6597 ;;
6598 *)
6599 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6600 for ac_dir in $PATH; do
6601 test -z "$ac_dir" && ac_dir=.
6602 if test -f $ac_dir/$ac_word; then
6603 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
6604 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
6605 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6606 break
6607 fi
6608 fi
6609 done
6610 IFS="$ac_save_ifs"
6611 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6612 ;;
6613esac
6614fi
6615XGETTEXT="$ac_cv_path_XGETTEXT"
6616if test -n "$XGETTEXT"; then
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
6618$as_echo "$XGETTEXT" >&6; }
6619else
6620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6621$as_echo "no" >&6; }
6622fi
6623
6624 rm -f messages.po
6625
6626 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
6627 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
6628 *) XGETTEXT_015=$XGETTEXT ;;
6629 esac
6630
6631
6632 # Extract the first word of "msgmerge", so it can be a program name with args.
6633set dummy msgmerge; ac_word=$2
6634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6635$as_echo_n "checking for $ac_word... " >&6; }
6636if ${ac_cv_path_MSGMERGE+:} false; then :
6637 $as_echo_n "(cached) " >&6
6638else
6639 case "$MSGMERGE" in
6640 /*)
6641 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
6642 ;;
6643 *)
6644 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6645 for ac_dir in $PATH; do
6646 test -z "$ac_dir" && ac_dir=.
6647 if test -f $ac_dir/$ac_word; then
6648 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
6649 ac_cv_path_MSGMERGE="$ac_dir/$ac_word"
6650 break
6651 fi
6652 fi
6653 done
6654 IFS="$ac_save_ifs"
6655 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
6656 ;;
6657esac
6658fi
6659MSGMERGE="$ac_cv_path_MSGMERGE"
6660if test -n "$MSGMERGE"; then
6661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
6662$as_echo "$MSGMERGE" >&6; }
6663else
6664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6665$as_echo "no" >&6; }
6666fi
6667
6668
6669 test -n "$localedir" || localedir='${datadir}/locale'
6670
6671
6672 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
6673
6674
6675 ac_config_commands="$ac_config_commands po-directories"
6676
6677
6678
6679 if test "X$prefix" = "XNONE"; then
6680 acl_final_prefix="$ac_default_prefix"
6681 else
6682 acl_final_prefix="$prefix"
6683 fi
6684 if test "X$exec_prefix" = "XNONE"; then
6685 acl_final_exec_prefix='${prefix}'
6686 else
6687 acl_final_exec_prefix="$exec_prefix"
6688 fi
6689 acl_save_prefix="$prefix"
6690 prefix="$acl_final_prefix"
6691 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
6692 prefix="$acl_save_prefix"
6693
6694
6695# Check whether --with-gnu-ld was given.
6696if test "${with_gnu_ld+set}" = set; then :
6697 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6698else
6699 with_gnu_ld=no
6700fi
6701
6702# Prepare PATH_SEPARATOR.
6703# The user is always right.
6704if test "${PATH_SEPARATOR+set}" != set; then
6705 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
6706 # contains only /bin. Note that ksh looks also at the FPATH variable,
6707 # so we have to set that as well for the test.
6708 PATH_SEPARATOR=:
6709 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
6710 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
6711 || PATH_SEPARATOR=';'
6712 }
6713fi
6714ac_prog=ld
6715if test "$GCC" = yes; then
6716 # Check if gcc -print-prog-name=ld gives a path.
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6718$as_echo_n "checking for ld used by GCC... " >&6; }
6719 case $host in
6720 *-*-mingw*)
6721 # gcc leaves a trailing carriage return which upsets mingw
6722 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6723 *)
6724 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6725 esac
6726 case $ac_prog in
6727 # Accept absolute paths.
6728 [\\/]* | [A-Za-z]:[\\/]*)
6729 re_direlt='/[^/][^/]*/\.\./'
6730 # Canonicalize the path of ld
6731 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6732 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6733 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6734 done
6735 test -z "$LD" && LD="$ac_prog"
6736 ;;
6737 "")
6738 # If it fails, then pretend we aren't using GCC.
6739 ac_prog=ld
6740 ;;
6741 *)
6742 # If it is relative, then search for the first ld in PATH.
6743 with_gnu_ld=unknown
6744 ;;
6745 esac
6746elif test "$with_gnu_ld" = yes; then
6747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6748$as_echo_n "checking for GNU ld... " >&6; }
6749else
6750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6751$as_echo_n "checking for non-GNU ld... " >&6; }
6752fi
6753if ${acl_cv_path_LD+:} false; then :
6754 $as_echo_n "(cached) " >&6
6755else
6756 if test -z "$LD"; then
6757 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6758 for ac_dir in $PATH; do
6759 test -z "$ac_dir" && ac_dir=.
6760 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6761 acl_cv_path_LD="$ac_dir/$ac_prog"
6762 # Check to see if the program is GNU ld. I'd rather use --version,
6763 # but apparently some GNU ld's only accept -v.
6764 # Break only if it was the GNU/non-GNU ld that we prefer.
6765 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
6766 *GNU* | *'with BFD'*)
6767 test "$with_gnu_ld" != no && break ;;
6768 *)
6769 test "$with_gnu_ld" != yes && break ;;
6770 esac
6771 fi
6772 done
6773 IFS="$ac_save_ifs"
6774else
6775 acl_cv_path_LD="$LD" # Let the user override the test with a path.
6776fi
6777fi
6778
6779LD="$acl_cv_path_LD"
6780if test -n "$LD"; then
6781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6782$as_echo "$LD" >&6; }
6783else
6784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6785$as_echo "no" >&6; }
6786fi
6787test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6789$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6790if ${acl_cv_prog_gnu_ld+:} false; then :
6791 $as_echo_n "(cached) " >&6
6792else
6793 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6794case `$LD -v 2>&1 </dev/null` in
6795*GNU* | *'with BFD'*)
6796 acl_cv_prog_gnu_ld=yes ;;
6797*)
6798 acl_cv_prog_gnu_ld=no ;;
6799esac
6800fi
6801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
6802$as_echo "$acl_cv_prog_gnu_ld" >&6; }
6803with_gnu_ld=$acl_cv_prog_gnu_ld
6804
6805
6806
6807
6808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
6809$as_echo_n "checking for shared library run path origin... " >&6; }
6810if ${acl_cv_rpath+:} false; then :
6811 $as_echo_n "(cached) " >&6
6812else
6813
6814 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
6815 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
6816 . ./conftest.sh
6817 rm -f ./conftest.sh
6818 acl_cv_rpath=done
6819
6820fi
6821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
6822$as_echo "$acl_cv_rpath" >&6; }
6823 wl="$acl_cv_wl"
6824 acl_libext="$acl_cv_libext"
6825 acl_shlibext="$acl_cv_shlibext"
6826 acl_libname_spec="$acl_cv_libname_spec"
6827 acl_library_names_spec="$acl_cv_library_names_spec"
6828 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
6829 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
6830 acl_hardcode_direct="$acl_cv_hardcode_direct"
6831 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
6832 # Check whether --enable-rpath was given.
6833if test "${enable_rpath+set}" = set; then :
6834 enableval=$enable_rpath; :
6835else
6836 enable_rpath=yes
6837fi
6838
6839
6840
6841
6842 acl_libdirstem=lib
6843 acl_libdirstem2=
6844 case "$host_os" in
6845 solaris*)
6846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
6847$as_echo_n "checking for 64-bit host... " >&6; }
6848if ${gl_cv_solaris_64bit+:} false; then :
6849 $as_echo_n "(cached) " >&6
6850else
6851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6852/* end confdefs.h. */
6853
6854#ifdef _LP64
6855sixtyfour bits
6856#endif
6857
6858_ACEOF
6859if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6860 $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
6861 gl_cv_solaris_64bit=yes
6862else
6863 gl_cv_solaris_64bit=no
6864fi
6865rm -f conftest*
6866
6867
6868fi
6869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
6870$as_echo "$gl_cv_solaris_64bit" >&6; }
6871 if test $gl_cv_solaris_64bit = yes; then
6872 acl_libdirstem=lib/64
6873 case "$host_cpu" in
6874 sparc*) acl_libdirstem2=lib/sparcv9 ;;
6875 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
6876 esac
6877 fi
6878 ;;
6879 *)
6880 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
6881 if test -n "$searchpath"; then
6882 acl_save_IFS="${IFS= }"; IFS=":"
6883 for searchdir in $searchpath; do
6884 if test -d "$searchdir"; then
6885 case "$searchdir" in
6886 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
6887 */../ | */.. )
6888 # Better ignore directories of this form. They are misleading.
6889 ;;
6890 *) searchdir=`cd "$searchdir" && pwd`
6891 case "$searchdir" in
6892 */lib64 ) acl_libdirstem=lib64 ;;
6893 esac ;;
6894 esac
6895 fi
6896 done
6897 IFS="$acl_save_IFS"
6898 fi
6899 ;;
6900 esac
6901 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914 use_additional=yes
6915
6916 acl_save_prefix="$prefix"
6917 prefix="$acl_final_prefix"
6918 acl_save_exec_prefix="$exec_prefix"
6919 exec_prefix="$acl_final_exec_prefix"
6920
6921 eval additional_includedir=\"$includedir\"
6922 eval additional_libdir=\"$libdir\"
6923
6924 exec_prefix="$acl_save_exec_prefix"
6925 prefix="$acl_save_prefix"
6926
6927
6928# Check whether --with-libiconv-prefix was given.
6929if test "${with_libiconv_prefix+set}" = set; then :
6930 withval=$with_libiconv_prefix;
6931 if test "X$withval" = "Xno"; then
6932 use_additional=no
6933 else
6934 if test "X$withval" = "X"; then
6935
6936 acl_save_prefix="$prefix"
6937 prefix="$acl_final_prefix"
6938 acl_save_exec_prefix="$exec_prefix"
6939 exec_prefix="$acl_final_exec_prefix"
6940
6941 eval additional_includedir=\"$includedir\"
6942 eval additional_libdir=\"$libdir\"
6943
6944 exec_prefix="$acl_save_exec_prefix"
6945 prefix="$acl_save_prefix"
6946
6947 else
6948 additional_includedir="$withval/include"
6949 additional_libdir="$withval/$acl_libdirstem"
6950 if test "$acl_libdirstem2" != "$acl_libdirstem" \
6951 && ! test -d "$withval/$acl_libdirstem"; then
6952 additional_libdir="$withval/$acl_libdirstem2"
6953 fi
6954 fi
6955 fi
6956
6957fi
6958
6959 LIBICONV=
6960 LTLIBICONV=
6961 INCICONV=
6962 LIBICONV_PREFIX=
6963 HAVE_LIBICONV=
6964 rpathdirs=
6965 ltrpathdirs=
6966 names_already_handled=
6967 names_next_round='iconv '
6968 while test -n "$names_next_round"; do
6969 names_this_round="$names_next_round"
6970 names_next_round=
6971 for name in $names_this_round; do
6972 already_handled=
6973 for n in $names_already_handled; do
6974 if test "$n" = "$name"; then
6975 already_handled=yes
6976 break
6977 fi
6978 done
6979 if test -z "$already_handled"; then
6980 names_already_handled="$names_already_handled $name"
6981 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
6982 eval value=\"\$HAVE_LIB$uppername\"
6983 if test -n "$value"; then
6984 if test "$value" = yes; then
6985 eval value=\"\$LIB$uppername\"
6986 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
6987 eval value=\"\$LTLIB$uppername\"
6988 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
6989 else
6990 :
6991 fi
6992 else
6993 found_dir=
6994 found_la=
6995 found_so=
6996 found_a=
6997 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
6998 if test -n "$acl_shlibext"; then
6999 shrext=".$acl_shlibext" # typically: shrext=.so
7000 else
7001 shrext=
7002 fi
7003 if test $use_additional = yes; then
7004 dir="$additional_libdir"
7005 if test -n "$acl_shlibext"; then
7006 if test -f "$dir/$libname$shrext"; then
7007 found_dir="$dir"
7008 found_so="$dir/$libname$shrext"
7009 else
7010 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
7011 ver=`(cd "$dir" && \
7012 for f in "$libname$shrext".*; do echo "$f"; done \
7013 | sed -e "s,^$libname$shrext\\\\.,," \
7014 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
7015 | sed 1q ) 2>/dev/null`
7016 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
7017 found_dir="$dir"
7018 found_so="$dir/$libname$shrext.$ver"
7019 fi
7020 else
7021 eval library_names=\"$acl_library_names_spec\"
7022 for f in $library_names; do
7023 if test -f "$dir/$f"; then
7024 found_dir="$dir"
7025 found_so="$dir/$f"
7026 break
7027 fi
7028 done
7029 fi
7030 fi
7031 fi
7032 if test "X$found_dir" = "X"; then
7033 if test -f "$dir/$libname.$acl_libext"; then
7034 found_dir="$dir"
7035 found_a="$dir/$libname.$acl_libext"
7036 fi
7037 fi
7038 if test "X$found_dir" != "X"; then
7039 if test -f "$dir/$libname.la"; then
7040 found_la="$dir/$libname.la"
7041 fi
7042 fi
7043 fi
7044 if test "X$found_dir" = "X"; then
7045 for x in $LDFLAGS $LTLIBICONV; do
7046
7047 acl_save_prefix="$prefix"
7048 prefix="$acl_final_prefix"
7049 acl_save_exec_prefix="$exec_prefix"
7050 exec_prefix="$acl_final_exec_prefix"
7051 eval x=\"$x\"
7052 exec_prefix="$acl_save_exec_prefix"
7053 prefix="$acl_save_prefix"
7054
7055 case "$x" in
7056 -L*)
7057 dir=`echo "X$x" | sed -e 's/^X-L//'`
7058 if test -n "$acl_shlibext"; then
7059 if test -f "$dir/$libname$shrext"; then
7060 found_dir="$dir"
7061 found_so="$dir/$libname$shrext"
7062 else
7063 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
7064 ver=`(cd "$dir" && \
7065 for f in "$libname$shrext".*; do echo "$f"; done \
7066 | sed -e "s,^$libname$shrext\\\\.,," \
7067 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
7068 | sed 1q ) 2>/dev/null`
7069 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
7070 found_dir="$dir"
7071 found_so="$dir/$libname$shrext.$ver"
7072 fi
7073 else
7074 eval library_names=\"$acl_library_names_spec\"
7075 for f in $library_names; do
7076 if test -f "$dir/$f"; then
7077 found_dir="$dir"
7078 found_so="$dir/$f"
7079 break
7080 fi
7081 done
7082 fi
7083 fi
7084 fi
7085 if test "X$found_dir" = "X"; then
7086 if test -f "$dir/$libname.$acl_libext"; then
7087 found_dir="$dir"
7088 found_a="$dir/$libname.$acl_libext"
7089 fi
7090 fi
7091 if test "X$found_dir" != "X"; then
7092 if test -f "$dir/$libname.la"; then
7093 found_la="$dir/$libname.la"
7094 fi
7095 fi
7096 ;;
7097 esac
7098 if test "X$found_dir" != "X"; then
7099 break
7100 fi
7101 done
7102 fi
7103 if test "X$found_dir" != "X"; then
7104 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
7105 if test "X$found_so" != "X"; then
7106 if test "$enable_rpath" = no \
7107 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
7108 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
7109 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7110 else
7111 haveit=
7112 for x in $ltrpathdirs; do
7113 if test "X$x" = "X$found_dir"; then
7114 haveit=yes
7115 break
7116 fi
7117 done
7118 if test -z "$haveit"; then
7119 ltrpathdirs="$ltrpathdirs $found_dir"
7120 fi
7121 if test "$acl_hardcode_direct" = yes; then
7122 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7123 else
7124 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
7125 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7126 haveit=
7127 for x in $rpathdirs; do
7128 if test "X$x" = "X$found_dir"; then
7129 haveit=yes
7130 break
7131 fi
7132 done
7133 if test -z "$haveit"; then
7134 rpathdirs="$rpathdirs $found_dir"
7135 fi
7136 else
7137 haveit=
7138 for x in $LDFLAGS $LIBICONV; do
7139
7140 acl_save_prefix="$prefix"
7141 prefix="$acl_final_prefix"
7142 acl_save_exec_prefix="$exec_prefix"
7143 exec_prefix="$acl_final_exec_prefix"
7144 eval x=\"$x\"
7145 exec_prefix="$acl_save_exec_prefix"
7146 prefix="$acl_save_prefix"
7147
7148 if test "X$x" = "X-L$found_dir"; then
7149 haveit=yes
7150 break
7151 fi
7152 done
7153 if test -z "$haveit"; then
7154 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
7155 fi
7156 if test "$acl_hardcode_minus_L" != no; then
7157 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
7158 else
7159 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7160 fi
7161 fi
7162 fi
7163 fi
7164 else
7165 if test "X$found_a" != "X"; then
7166 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
7167 else
7168 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
7169 fi
7170 fi
7171 additional_includedir=
7172 case "$found_dir" in
7173 */$acl_libdirstem | */$acl_libdirstem/)
7174 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
7175 if test "$name" = 'iconv'; then
7176 LIBICONV_PREFIX="$basedir"
7177 fi
7178 additional_includedir="$basedir/include"
7179 ;;
7180 */$acl_libdirstem2 | */$acl_libdirstem2/)
7181 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
7182 if test "$name" = 'iconv'; then
7183 LIBICONV_PREFIX="$basedir"
7184 fi
7185 additional_includedir="$basedir/include"
7186 ;;
7187 esac
7188 if test "X$additional_includedir" != "X"; then
7189 if test "X$additional_includedir" != "X/usr/include"; then
7190 haveit=
7191 if test "X$additional_includedir" = "X/usr/local/include"; then
7192 if test -n "$GCC"; then
7193 case $host_os in
7194 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
7195 esac
7196 fi
7197 fi
7198 if test -z "$haveit"; then
7199 for x in $CPPFLAGS $INCICONV; do
7200
7201 acl_save_prefix="$prefix"
7202 prefix="$acl_final_prefix"
7203 acl_save_exec_prefix="$exec_prefix"
7204 exec_prefix="$acl_final_exec_prefix"
7205 eval x=\"$x\"
7206 exec_prefix="$acl_save_exec_prefix"
7207 prefix="$acl_save_prefix"
7208
7209 if test "X$x" = "X-I$additional_includedir"; then
7210 haveit=yes
7211 break
7212 fi
7213 done
7214 if test -z "$haveit"; then
7215 if test -d "$additional_includedir"; then
7216 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
7217 fi
7218 fi
7219 fi
7220 fi
7221 fi
7222 if test -n "$found_la"; then
7223 save_libdir="$libdir"
7224 case "$found_la" in
7225 */* | *\\*) . "$found_la" ;;
7226 *) . "./$found_la" ;;
7227 esac
7228 libdir="$save_libdir"
7229 for dep in $dependency_libs; do
7230 case "$dep" in
7231 -L*)
7232 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7233 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
7234 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
7235 haveit=
7236 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
7237 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
7238 if test -n "$GCC"; then
7239 case $host_os in
7240 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
7241 esac
7242 fi
7243 fi
7244 if test -z "$haveit"; then
7245 haveit=
7246 for x in $LDFLAGS $LIBICONV; do
7247
7248 acl_save_prefix="$prefix"
7249 prefix="$acl_final_prefix"
7250 acl_save_exec_prefix="$exec_prefix"
7251 exec_prefix="$acl_final_exec_prefix"
7252 eval x=\"$x\"
7253 exec_prefix="$acl_save_exec_prefix"
7254 prefix="$acl_save_prefix"
7255
7256 if test "X$x" = "X-L$additional_libdir"; then
7257 haveit=yes
7258 break
7259 fi
7260 done
7261 if test -z "$haveit"; then
7262 if test -d "$additional_libdir"; then
7263 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
7264 fi
7265 fi
7266 haveit=
7267 for x in $LDFLAGS $LTLIBICONV; do
7268
7269 acl_save_prefix="$prefix"
7270 prefix="$acl_final_prefix"
7271 acl_save_exec_prefix="$exec_prefix"
7272 exec_prefix="$acl_final_exec_prefix"
7273 eval x=\"$x\"
7274 exec_prefix="$acl_save_exec_prefix"
7275 prefix="$acl_save_prefix"
7276
7277 if test "X$x" = "X-L$additional_libdir"; then
7278 haveit=yes
7279 break
7280 fi
7281 done
7282 if test -z "$haveit"; then
7283 if test -d "$additional_libdir"; then
7284 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
7285 fi
7286 fi
7287 fi
7288 fi
7289 ;;
7290 -R*)
7291 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7292 if test "$enable_rpath" != no; then
7293 haveit=
7294 for x in $rpathdirs; do
7295 if test "X$x" = "X$dir"; then
7296 haveit=yes
7297 break
7298 fi
7299 done
7300 if test -z "$haveit"; then
7301 rpathdirs="$rpathdirs $dir"
7302 fi
7303 haveit=
7304 for x in $ltrpathdirs; do
7305 if test "X$x" = "X$dir"; then
7306 haveit=yes
7307 break
7308 fi
7309 done
7310 if test -z "$haveit"; then
7311 ltrpathdirs="$ltrpathdirs $dir"
7312 fi
7313 fi
7314 ;;
7315 -l*)
7316 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7317 ;;
7318 *.la)
7319 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7320 ;;
7321 *)
7322 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
7323 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
7324 ;;
7325 esac
7326 done
7327 fi
7328 else
7329 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
7330 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
7331 fi
7332 fi
7333 fi
7334 done
7335 done
7336 if test "X$rpathdirs" != "X"; then
7337 if test -n "$acl_hardcode_libdir_separator"; then
7338 alldirs=
7339 for found_dir in $rpathdirs; do
7340 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
7341 done
7342 acl_save_libdir="$libdir"
7343 libdir="$alldirs"
7344 eval flag=\"$acl_hardcode_libdir_flag_spec\"
7345 libdir="$acl_save_libdir"
7346 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7347 else
7348 for found_dir in $rpathdirs; do
7349 acl_save_libdir="$libdir"
7350 libdir="$found_dir"
7351 eval flag=\"$acl_hardcode_libdir_flag_spec\"
7352 libdir="$acl_save_libdir"
7353 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
7354 done
7355 fi
7356 fi
7357 if test "X$ltrpathdirs" != "X"; then
7358 for found_dir in $ltrpathdirs; do
7359 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
7360 done
7361 fi
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
7393$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
7394if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
7395 $as_echo_n "(cached) " >&6
7396else
7397 gt_save_LIBS="$LIBS"
7398 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
7399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7400/* end confdefs.h. */
7401#include <CoreFoundation/CFPreferences.h>
7402int
7403main ()
7404{
7405CFPreferencesCopyAppValue(NULL, NULL)
7406 ;
7407 return 0;
7408}
7409_ACEOF
7410if ac_fn_c_try_link "$LINENO"; then :
7411 gt_cv_func_CFPreferencesCopyAppValue=yes
7412else
7413 gt_cv_func_CFPreferencesCopyAppValue=no
7414fi
7415rm -f core conftest.err conftest.$ac_objext \
7416 conftest$ac_exeext conftest.$ac_ext
7417 LIBS="$gt_save_LIBS"
7418fi
7419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
7420$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
7421 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
7422
7423$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
7424
7425 fi
7426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
7427$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
7428if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
7429 $as_echo_n "(cached) " >&6
7430else
7431 gt_save_LIBS="$LIBS"
7432 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
7433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7434/* end confdefs.h. */
7435#include <CoreFoundation/CFLocale.h>
7436int
7437main ()
7438{
7439CFLocaleCopyCurrent();
7440 ;
7441 return 0;
7442}
7443_ACEOF
7444if ac_fn_c_try_link "$LINENO"; then :
7445 gt_cv_func_CFLocaleCopyCurrent=yes
7446else
7447 gt_cv_func_CFLocaleCopyCurrent=no
7448fi
7449rm -f core conftest.err conftest.$ac_objext \
7450 conftest$ac_exeext conftest.$ac_ext
7451 LIBS="$gt_save_LIBS"
7452fi
7453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
7454$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
7455 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
7456
7457$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
7458
7459 fi
7460 INTL_MACOSX_LIBS=
7461 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
7462 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
7463 fi
7464
7465
7466
7467
7468
7469
7470 LIBINTL=
7471 LTLIBINTL=
7472 POSUB=
7473
7474 case " $gt_needs " in
7475 *" need-formatstring-macros "*) gt_api_version=3 ;;
7476 *" need-ngettext "*) gt_api_version=2 ;;
7477 *) gt_api_version=1 ;;
7478 esac
7479 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
7480 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
7481
7482 if test "$USE_NLS" = "yes"; then
7483 gt_use_preinstalled_gnugettext=no
7484
7485
7486 if test $gt_api_version -ge 3; then
7487 gt_revision_test_code='
7488#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
7489#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
7490#endif
7491typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
7492'
7493 else
7494 gt_revision_test_code=
7495 fi
7496 if test $gt_api_version -ge 2; then
7497 gt_expression_test_code=' + * ngettext ("", "", 0)'
7498 else
7499 gt_expression_test_code=
7500 fi
7501
7502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
7503$as_echo_n "checking for GNU gettext in libc... " >&6; }
7504if eval \${$gt_func_gnugettext_libc+:} false; then :
7505 $as_echo_n "(cached) " >&6
7506else
7507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7508/* end confdefs.h. */
7509#include <libintl.h>
7510$gt_revision_test_code
7511extern int _nl_msg_cat_cntr;
7512extern int *_nl_domain_bindings;
7513int
7514main ()
7515{
7516bindtextdomain ("", "");
7517return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
7518 ;
7519 return 0;
7520}
7521_ACEOF
7522if ac_fn_c_try_link "$LINENO"; then :
7523 eval "$gt_func_gnugettext_libc=yes"
7524else
7525 eval "$gt_func_gnugettext_libc=no"
7526fi
7527rm -f core conftest.err conftest.$ac_objext \
7528 conftest$ac_exeext conftest.$ac_ext
7529fi
7530eval ac_res=\$$gt_func_gnugettext_libc
7531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7532$as_echo "$ac_res" >&6; }
7533
7534 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
7535
7536
7537
7538
7539
7540 am_save_CPPFLAGS="$CPPFLAGS"
7541
7542 for element in $INCICONV; do
7543 haveit=
7544 for x in $CPPFLAGS; do
7545
7546 acl_save_prefix="$prefix"
7547 prefix="$acl_final_prefix"
7548 acl_save_exec_prefix="$exec_prefix"
7549 exec_prefix="$acl_final_exec_prefix"
7550 eval x=\"$x\"
7551 exec_prefix="$acl_save_exec_prefix"
7552 prefix="$acl_save_prefix"
7553
7554 if test "X$x" = "X$element"; then
7555 haveit=yes
7556 break
7557 fi
7558 done
7559 if test -z "$haveit"; then
7560 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
7561 fi
7562 done
7563
7564
7565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
7566$as_echo_n "checking for iconv... " >&6; }
7567if ${am_cv_func_iconv+:} false; then :
7568 $as_echo_n "(cached) " >&6
7569else
7570
7571 am_cv_func_iconv="no, consider installing GNU libiconv"
7572 am_cv_lib_iconv=no
7573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7574/* end confdefs.h. */
7575
7576#include <stdlib.h>
7577#include <iconv.h>
7578
7579int
7580main ()
7581{
7582iconv_t cd = iconv_open("","");
7583 iconv(cd,NULL,NULL,NULL,NULL);
7584 iconv_close(cd);
7585 ;
7586 return 0;
7587}
7588_ACEOF
7589if ac_fn_c_try_link "$LINENO"; then :
7590 am_cv_func_iconv=yes
7591fi
7592rm -f core conftest.err conftest.$ac_objext \
7593 conftest$ac_exeext conftest.$ac_ext
7594 if test "$am_cv_func_iconv" != yes; then
7595 am_save_LIBS="$LIBS"
7596 LIBS="$LIBS $LIBICONV"
7597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7598/* end confdefs.h. */
7599
7600#include <stdlib.h>
7601#include <iconv.h>
7602
7603int
7604main ()
7605{
7606iconv_t cd = iconv_open("","");
7607 iconv(cd,NULL,NULL,NULL,NULL);
7608 iconv_close(cd);
7609 ;
7610 return 0;
7611}
7612_ACEOF
7613if ac_fn_c_try_link "$LINENO"; then :
7614 am_cv_lib_iconv=yes
7615 am_cv_func_iconv=yes
7616fi
7617rm -f core conftest.err conftest.$ac_objext \
7618 conftest$ac_exeext conftest.$ac_ext
7619 LIBS="$am_save_LIBS"
7620 fi
7621
7622fi
7623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
7624$as_echo "$am_cv_func_iconv" >&6; }
7625 if test "$am_cv_func_iconv" = yes; then
7626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
7627$as_echo_n "checking for working iconv... " >&6; }
7628if ${am_cv_func_iconv_works+:} false; then :
7629 $as_echo_n "(cached) " >&6
7630else
7631
7632 am_save_LIBS="$LIBS"
7633 if test $am_cv_lib_iconv = yes; then
7634 LIBS="$LIBS $LIBICONV"
7635 fi
7636 if test "$cross_compiling" = yes; then :
7637
7638 case "$host_os" in
7639 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
7640 *) am_cv_func_iconv_works="guessing yes" ;;
7641 esac
7642
7643else
7644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7645/* end confdefs.h. */
7646
7647#include <iconv.h>
7648#include <string.h>
7649int main ()
7650{
7651 int result = 0;
7652 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
7653 returns. */
7654 {
7655 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
7656 if (cd_utf8_to_88591 != (iconv_t)(-1))
7657 {
7658 static const char input[] = "\342\202\254"; /* EURO SIGN */
7659 char buf[10];
7660 const char *inptr = input;
7661 size_t inbytesleft = strlen (input);
7662 char *outptr = buf;
7663 size_t outbytesleft = sizeof (buf);
7664 size_t res = iconv (cd_utf8_to_88591,
7665 (char **) &inptr, &inbytesleft,
7666 &outptr, &outbytesleft);
7667 if (res == 0)
7668 result |= 1;
7669 iconv_close (cd_utf8_to_88591);
7670 }
7671 }
7672 /* Test against Solaris 10 bug: Failures are not distinguishable from
7673 successful returns. */
7674 {
7675 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
7676 if (cd_ascii_to_88591 != (iconv_t)(-1))
7677 {
7678 static const char input[] = "\263";
7679 char buf[10];
7680 const char *inptr = input;
7681 size_t inbytesleft = strlen (input);
7682 char *outptr = buf;
7683 size_t outbytesleft = sizeof (buf);
7684 size_t res = iconv (cd_ascii_to_88591,
7685 (char **) &inptr, &inbytesleft,
7686 &outptr, &outbytesleft);
7687 if (res == 0)
7688 result |= 2;
7689 iconv_close (cd_ascii_to_88591);
7690 }
7691 }
7692 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
7693 {
7694 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
7695 if (cd_88591_to_utf8 != (iconv_t)(-1))
7696 {
7697 static const char input[] = "\304";
7698 static char buf[2] = { (char)0xDE, (char)0xAD };
7699 const char *inptr = input;
7700 size_t inbytesleft = 1;
7701 char *outptr = buf;
7702 size_t outbytesleft = 1;
7703 size_t res = iconv (cd_88591_to_utf8,
7704 (char **) &inptr, &inbytesleft,
7705 &outptr, &outbytesleft);
7706 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
7707 result |= 4;
7708 iconv_close (cd_88591_to_utf8);
7709 }
7710 }
7711#if 0 /* This bug could be worked around by the caller. */
7712 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
7713 {
7714 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
7715 if (cd_88591_to_utf8 != (iconv_t)(-1))
7716 {
7717 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
7718 char buf[50];
7719 const char *inptr = input;
7720 size_t inbytesleft = strlen (input);
7721 char *outptr = buf;
7722 size_t outbytesleft = sizeof (buf);
7723 size_t res = iconv (cd_88591_to_utf8,
7724 (char **) &inptr, &inbytesleft,
7725 &outptr, &outbytesleft);
7726 if ((int)res > 0)
7727 result |= 8;
7728 iconv_close (cd_88591_to_utf8);
7729 }
7730 }
7731#endif
7732 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
7733 provided. */
7734 if (/* Try standardized names. */
7735 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
7736 /* Try IRIX, OSF/1 names. */
7737 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
7738 /* Try AIX names. */
7739 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
7740 /* Try HP-UX names. */
7741 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
7742 result |= 16;
7743 return result;
7744}
7745_ACEOF
7746if ac_fn_c_try_run "$LINENO"; then :
7747 am_cv_func_iconv_works=yes
7748else
7749 am_cv_func_iconv_works=no
7750fi
7751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7752 conftest.$ac_objext conftest.beam conftest.$ac_ext
7753fi
7754
7755 LIBS="$am_save_LIBS"
7756
7757fi
7758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
7759$as_echo "$am_cv_func_iconv_works" >&6; }
7760 case "$am_cv_func_iconv_works" in
7761 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
7762 *) am_func_iconv=yes ;;
7763 esac
7764 else
7765 am_func_iconv=no am_cv_lib_iconv=no
7766 fi
7767 if test "$am_func_iconv" = yes; then
7768
7769$as_echo "#define HAVE_ICONV 1" >>confdefs.h
7770
7771 fi
7772 if test "$am_cv_lib_iconv" = yes; then
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
7774$as_echo_n "checking how to link with libiconv... " >&6; }
7775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
7776$as_echo "$LIBICONV" >&6; }
7777 else
7778 CPPFLAGS="$am_save_CPPFLAGS"
7779 LIBICONV=
7780 LTLIBICONV=
7781 fi
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793 use_additional=yes
7794
7795 acl_save_prefix="$prefix"
7796 prefix="$acl_final_prefix"
7797 acl_save_exec_prefix="$exec_prefix"
7798 exec_prefix="$acl_final_exec_prefix"
7799
7800 eval additional_includedir=\"$includedir\"
7801 eval additional_libdir=\"$libdir\"
7802
7803 exec_prefix="$acl_save_exec_prefix"
7804 prefix="$acl_save_prefix"
7805
7806
7807# Check whether --with-libintl-prefix was given.
7808if test "${with_libintl_prefix+set}" = set; then :
7809 withval=$with_libintl_prefix;
7810 if test "X$withval" = "Xno"; then
7811 use_additional=no
7812 else
7813 if test "X$withval" = "X"; then
7814
7815 acl_save_prefix="$prefix"
7816 prefix="$acl_final_prefix"
7817 acl_save_exec_prefix="$exec_prefix"
7818 exec_prefix="$acl_final_exec_prefix"
7819
7820 eval additional_includedir=\"$includedir\"
7821 eval additional_libdir=\"$libdir\"
7822
7823 exec_prefix="$acl_save_exec_prefix"
7824 prefix="$acl_save_prefix"
7825
7826 else
7827 additional_includedir="$withval/include"
7828 additional_libdir="$withval/$acl_libdirstem"
7829 if test "$acl_libdirstem2" != "$acl_libdirstem" \
7830 && ! test -d "$withval/$acl_libdirstem"; then
7831 additional_libdir="$withval/$acl_libdirstem2"
7832 fi
7833 fi
7834 fi
7835
7836fi
7837
7838 LIBINTL=
7839 LTLIBINTL=
7840 INCINTL=
7841 LIBINTL_PREFIX=
7842 HAVE_LIBINTL=
7843 rpathdirs=
7844 ltrpathdirs=
7845 names_already_handled=
7846 names_next_round='intl '
7847 while test -n "$names_next_round"; do
7848 names_this_round="$names_next_round"
7849 names_next_round=
7850 for name in $names_this_round; do
7851 already_handled=
7852 for n in $names_already_handled; do
7853 if test "$n" = "$name"; then
7854 already_handled=yes
7855 break
7856 fi
7857 done
7858 if test -z "$already_handled"; then
7859 names_already_handled="$names_already_handled $name"
7860 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
7861 eval value=\"\$HAVE_LIB$uppername\"
7862 if test -n "$value"; then
7863 if test "$value" = yes; then
7864 eval value=\"\$LIB$uppername\"
7865 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
7866 eval value=\"\$LTLIB$uppername\"
7867 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
7868 else
7869 :
7870 fi
7871 else
7872 found_dir=
7873 found_la=
7874 found_so=
7875 found_a=
7876 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
7877 if test -n "$acl_shlibext"; then
7878 shrext=".$acl_shlibext" # typically: shrext=.so
7879 else
7880 shrext=
7881 fi
7882 if test $use_additional = yes; then
7883 dir="$additional_libdir"
7884 if test -n "$acl_shlibext"; then
7885 if test -f "$dir/$libname$shrext"; then
7886 found_dir="$dir"
7887 found_so="$dir/$libname$shrext"
7888 else
7889 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
7890 ver=`(cd "$dir" && \
7891 for f in "$libname$shrext".*; do echo "$f"; done \
7892 | sed -e "s,^$libname$shrext\\\\.,," \
7893 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
7894 | sed 1q ) 2>/dev/null`
7895 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
7896 found_dir="$dir"
7897 found_so="$dir/$libname$shrext.$ver"
7898 fi
7899 else
7900 eval library_names=\"$acl_library_names_spec\"
7901 for f in $library_names; do
7902 if test -f "$dir/$f"; then
7903 found_dir="$dir"
7904 found_so="$dir/$f"
7905 break
7906 fi
7907 done
7908 fi
7909 fi
7910 fi
7911 if test "X$found_dir" = "X"; then
7912 if test -f "$dir/$libname.$acl_libext"; then
7913 found_dir="$dir"
7914 found_a="$dir/$libname.$acl_libext"
7915 fi
7916 fi
7917 if test "X$found_dir" != "X"; then
7918 if test -f "$dir/$libname.la"; then
7919 found_la="$dir/$libname.la"
7920 fi
7921 fi
7922 fi
7923 if test "X$found_dir" = "X"; then
7924 for x in $LDFLAGS $LTLIBINTL; do
7925
7926 acl_save_prefix="$prefix"
7927 prefix="$acl_final_prefix"
7928 acl_save_exec_prefix="$exec_prefix"
7929 exec_prefix="$acl_final_exec_prefix"
7930 eval x=\"$x\"
7931 exec_prefix="$acl_save_exec_prefix"
7932 prefix="$acl_save_prefix"
7933
7934 case "$x" in
7935 -L*)
7936 dir=`echo "X$x" | sed -e 's/^X-L//'`
7937 if test -n "$acl_shlibext"; then
7938 if test -f "$dir/$libname$shrext"; then
7939 found_dir="$dir"
7940 found_so="$dir/$libname$shrext"
7941 else
7942 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
7943 ver=`(cd "$dir" && \
7944 for f in "$libname$shrext".*; do echo "$f"; done \
7945 | sed -e "s,^$libname$shrext\\\\.,," \
7946 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
7947 | sed 1q ) 2>/dev/null`
7948 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
7949 found_dir="$dir"
7950 found_so="$dir/$libname$shrext.$ver"
7951 fi
7952 else
7953 eval library_names=\"$acl_library_names_spec\"
7954 for f in $library_names; do
7955 if test -f "$dir/$f"; then
7956 found_dir="$dir"
7957 found_so="$dir/$f"
7958 break
7959 fi
7960 done
7961 fi
7962 fi
7963 fi
7964 if test "X$found_dir" = "X"; then
7965 if test -f "$dir/$libname.$acl_libext"; then
7966 found_dir="$dir"
7967 found_a="$dir/$libname.$acl_libext"
7968 fi
7969 fi
7970 if test "X$found_dir" != "X"; then
7971 if test -f "$dir/$libname.la"; then
7972 found_la="$dir/$libname.la"
7973 fi
7974 fi
7975 ;;
7976 esac
7977 if test "X$found_dir" != "X"; then
7978 break
7979 fi
7980 done
7981 fi
7982 if test "X$found_dir" != "X"; then
7983 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
7984 if test "X$found_so" != "X"; then
7985 if test "$enable_rpath" = no \
7986 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
7987 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
7988 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
7989 else
7990 haveit=
7991 for x in $ltrpathdirs; do
7992 if test "X$x" = "X$found_dir"; then
7993 haveit=yes
7994 break
7995 fi
7996 done
7997 if test -z "$haveit"; then
7998 ltrpathdirs="$ltrpathdirs $found_dir"
7999 fi
8000 if test "$acl_hardcode_direct" = yes; then
8001 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
8002 else
8003 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
8004 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
8005 haveit=
8006 for x in $rpathdirs; do
8007 if test "X$x" = "X$found_dir"; then
8008 haveit=yes
8009 break
8010 fi
8011 done
8012 if test -z "$haveit"; then
8013 rpathdirs="$rpathdirs $found_dir"
8014 fi
8015 else
8016 haveit=
8017 for x in $LDFLAGS $LIBINTL; do
8018
8019 acl_save_prefix="$prefix"
8020 prefix="$acl_final_prefix"
8021 acl_save_exec_prefix="$exec_prefix"
8022 exec_prefix="$acl_final_exec_prefix"
8023 eval x=\"$x\"
8024 exec_prefix="$acl_save_exec_prefix"
8025 prefix="$acl_save_prefix"
8026
8027 if test "X$x" = "X-L$found_dir"; then
8028 haveit=yes
8029 break
8030 fi
8031 done
8032 if test -z "$haveit"; then
8033 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
8034 fi
8035 if test "$acl_hardcode_minus_L" != no; then
8036 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
8037 else
8038 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
8039 fi
8040 fi
8041 fi
8042 fi
8043 else
8044 if test "X$found_a" != "X"; then
8045 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
8046 else
8047 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
8048 fi
8049 fi
8050 additional_includedir=
8051 case "$found_dir" in
8052 */$acl_libdirstem | */$acl_libdirstem/)
8053 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
8054 if test "$name" = 'intl'; then
8055 LIBINTL_PREFIX="$basedir"
8056 fi
8057 additional_includedir="$basedir/include"
8058 ;;
8059 */$acl_libdirstem2 | */$acl_libdirstem2/)
8060 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
8061 if test "$name" = 'intl'; then
8062 LIBINTL_PREFIX="$basedir"
8063 fi
8064 additional_includedir="$basedir/include"
8065 ;;
8066 esac
8067 if test "X$additional_includedir" != "X"; then
8068 if test "X$additional_includedir" != "X/usr/include"; then
8069 haveit=
8070 if test "X$additional_includedir" = "X/usr/local/include"; then
8071 if test -n "$GCC"; then
8072 case $host_os in
8073 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
8074 esac
8075 fi
8076 fi
8077 if test -z "$haveit"; then
8078 for x in $CPPFLAGS $INCINTL; do
8079
8080 acl_save_prefix="$prefix"
8081 prefix="$acl_final_prefix"
8082 acl_save_exec_prefix="$exec_prefix"
8083 exec_prefix="$acl_final_exec_prefix"
8084 eval x=\"$x\"
8085 exec_prefix="$acl_save_exec_prefix"
8086 prefix="$acl_save_prefix"
8087
8088 if test "X$x" = "X-I$additional_includedir"; then
8089 haveit=yes
8090 break
8091 fi
8092 done
8093 if test -z "$haveit"; then
8094 if test -d "$additional_includedir"; then
8095 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
8096 fi
8097 fi
8098 fi
8099 fi
8100 fi
8101 if test -n "$found_la"; then
8102 save_libdir="$libdir"
8103 case "$found_la" in
8104 */* | *\\*) . "$found_la" ;;
8105 *) . "./$found_la" ;;
8106 esac
8107 libdir="$save_libdir"
8108 for dep in $dependency_libs; do
8109 case "$dep" in
8110 -L*)
8111 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8112 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
8113 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
8114 haveit=
8115 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
8116 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
8117 if test -n "$GCC"; then
8118 case $host_os in
8119 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
8120 esac
8121 fi
8122 fi
8123 if test -z "$haveit"; then
8124 haveit=
8125 for x in $LDFLAGS $LIBINTL; do
8126
8127 acl_save_prefix="$prefix"
8128 prefix="$acl_final_prefix"
8129 acl_save_exec_prefix="$exec_prefix"
8130 exec_prefix="$acl_final_exec_prefix"
8131 eval x=\"$x\"
8132 exec_prefix="$acl_save_exec_prefix"
8133 prefix="$acl_save_prefix"
8134
8135 if test "X$x" = "X-L$additional_libdir"; then
8136 haveit=yes
8137 break
8138 fi
8139 done
8140 if test -z "$haveit"; then
8141 if test -d "$additional_libdir"; then
8142 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
8143 fi
8144 fi
8145 haveit=
8146 for x in $LDFLAGS $LTLIBINTL; do
8147
8148 acl_save_prefix="$prefix"
8149 prefix="$acl_final_prefix"
8150 acl_save_exec_prefix="$exec_prefix"
8151 exec_prefix="$acl_final_exec_prefix"
8152 eval x=\"$x\"
8153 exec_prefix="$acl_save_exec_prefix"
8154 prefix="$acl_save_prefix"
8155
8156 if test "X$x" = "X-L$additional_libdir"; then
8157 haveit=yes
8158 break
8159 fi
8160 done
8161 if test -z "$haveit"; then
8162 if test -d "$additional_libdir"; then
8163 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
8164 fi
8165 fi
8166 fi
8167 fi
8168 ;;
8169 -R*)
8170 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8171 if test "$enable_rpath" != no; then
8172 haveit=
8173 for x in $rpathdirs; do
8174 if test "X$x" = "X$dir"; then
8175 haveit=yes
8176 break
8177 fi
8178 done
8179 if test -z "$haveit"; then
8180 rpathdirs="$rpathdirs $dir"
8181 fi
8182 haveit=
8183 for x in $ltrpathdirs; do
8184 if test "X$x" = "X$dir"; then
8185 haveit=yes
8186 break
8187 fi
8188 done
8189 if test -z "$haveit"; then
8190 ltrpathdirs="$ltrpathdirs $dir"
8191 fi
8192 fi
8193 ;;
8194 -l*)
8195 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8196 ;;
8197 *.la)
8198 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8199 ;;
8200 *)
8201 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
8202 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
8203 ;;
8204 esac
8205 done
8206 fi
8207 else
8208 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
8209 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
8210 fi
8211 fi
8212 fi
8213 done
8214 done
8215 if test "X$rpathdirs" != "X"; then
8216 if test -n "$acl_hardcode_libdir_separator"; then
8217 alldirs=
8218 for found_dir in $rpathdirs; do
8219 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
8220 done
8221 acl_save_libdir="$libdir"
8222 libdir="$alldirs"
8223 eval flag=\"$acl_hardcode_libdir_flag_spec\"
8224 libdir="$acl_save_libdir"
8225 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
8226 else
8227 for found_dir in $rpathdirs; do
8228 acl_save_libdir="$libdir"
8229 libdir="$found_dir"
8230 eval flag=\"$acl_hardcode_libdir_flag_spec\"
8231 libdir="$acl_save_libdir"
8232 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
8233 done
8234 fi
8235 fi
8236 if test "X$ltrpathdirs" != "X"; then
8237 for found_dir in $ltrpathdirs; do
8238 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
8239 done
8240 fi
8241
8242
8243
8244
8245
8246
8247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
8248$as_echo_n "checking for GNU gettext in libintl... " >&6; }
8249if eval \${$gt_func_gnugettext_libintl+:} false; then :
8250 $as_echo_n "(cached) " >&6
8251else
8252 gt_save_CPPFLAGS="$CPPFLAGS"
8253 CPPFLAGS="$CPPFLAGS $INCINTL"
8254 gt_save_LIBS="$LIBS"
8255 LIBS="$LIBS $LIBINTL"
8256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8257/* end confdefs.h. */
8258#include <libintl.h>
8259$gt_revision_test_code
8260extern int _nl_msg_cat_cntr;
8261extern
8262#ifdef __cplusplus
8263"C"
8264#endif
8265const char *_nl_expand_alias (const char *);
8266int
8267main ()
8268{
8269bindtextdomain ("", "");
8270return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
8271 ;
8272 return 0;
8273}
8274_ACEOF
8275if ac_fn_c_try_link "$LINENO"; then :
8276 eval "$gt_func_gnugettext_libintl=yes"
8277else
8278 eval "$gt_func_gnugettext_libintl=no"
8279fi
8280rm -f core conftest.err conftest.$ac_objext \
8281 conftest$ac_exeext conftest.$ac_ext
8282 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
8283 LIBS="$LIBS $LIBICONV"
8284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8285/* end confdefs.h. */
8286#include <libintl.h>
8287$gt_revision_test_code
8288extern int _nl_msg_cat_cntr;
8289extern
8290#ifdef __cplusplus
8291"C"
8292#endif
8293const char *_nl_expand_alias (const char *);
8294int
8295main ()
8296{
8297bindtextdomain ("", "");
8298return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
8299 ;
8300 return 0;
8301}
8302_ACEOF
8303if ac_fn_c_try_link "$LINENO"; then :
8304 LIBINTL="$LIBINTL $LIBICONV"
8305 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
8306 eval "$gt_func_gnugettext_libintl=yes"
8307
8308fi
8309rm -f core conftest.err conftest.$ac_objext \
8310 conftest$ac_exeext conftest.$ac_ext
8311 fi
8312 CPPFLAGS="$gt_save_CPPFLAGS"
8313 LIBS="$gt_save_LIBS"
8314fi
8315eval ac_res=\$$gt_func_gnugettext_libintl
8316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8317$as_echo "$ac_res" >&6; }
8318 fi
8319
8320 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
8321 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
8322 && test "$PACKAGE" != gettext-runtime \
8323 && test "$PACKAGE" != gettext-tools; }; then
8324 gt_use_preinstalled_gnugettext=yes
8325 else
8326 LIBINTL=
8327 LTLIBINTL=
8328 INCINTL=
8329 fi
8330
8331
8332
8333 if test -n "$INTL_MACOSX_LIBS"; then
8334 if test "$gt_use_preinstalled_gnugettext" = "yes" \
8335 || test "$nls_cv_use_gnu_gettext" = "yes"; then
8336 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
8337 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
8338 fi
8339 fi
8340
8341 if test "$gt_use_preinstalled_gnugettext" = "yes" \
8342 || test "$nls_cv_use_gnu_gettext" = "yes"; then
8343
8344$as_echo "#define ENABLE_NLS 1" >>confdefs.h
8345
8346 else
8347 USE_NLS=no
8348 fi
8349 fi
8350
8351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
8352$as_echo_n "checking whether to use NLS... " >&6; }
8353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
8354$as_echo "$USE_NLS" >&6; }
8355 if test "$USE_NLS" = "yes"; then
8356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
8357$as_echo_n "checking where the gettext function comes from... " >&6; }
8358 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
8359 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
8360 gt_source="external libintl"
8361 else
8362 gt_source="libc"
8363 fi
8364 else
8365 gt_source="included intl directory"
8366 fi
8367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
8368$as_echo "$gt_source" >&6; }
8369 fi
8370
8371 if test "$USE_NLS" = "yes"; then
8372
8373 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
8374 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
8375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
8376$as_echo_n "checking how to link with libintl... " >&6; }
8377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
8378$as_echo "$LIBINTL" >&6; }
8379
8380 for element in $INCINTL; do
8381 haveit=
8382 for x in $CPPFLAGS; do
8383
8384 acl_save_prefix="$prefix"
8385 prefix="$acl_final_prefix"
8386 acl_save_exec_prefix="$exec_prefix"
8387 exec_prefix="$acl_final_exec_prefix"
8388 eval x=\"$x\"
8389 exec_prefix="$acl_save_exec_prefix"
8390 prefix="$acl_save_prefix"
8391
8392 if test "X$x" = "X$element"; then
8393 haveit=yes
8394 break
8395 fi
8396 done
8397 if test -z "$haveit"; then
8398 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8399 fi
8400 done
8401
8402 fi
8403
8404
8405$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
8406
8407
8408$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
8409
8410 fi
8411
8412 POSUB=po
8413 fi
8414
8415
8416
8417 INTLLIBS="$LIBINTL"
8418
8419
8420
8421
8422
8423
8424
8425
8426if test -n "$ac_tool_prefix"; then
8427 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8428set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8430$as_echo_n "checking for $ac_word... " >&6; }
8431if ${ac_cv_prog_RANLIB+:} false; then :
8432 $as_echo_n "(cached) " >&6
8433else
8434 if test -n "$RANLIB"; then
8435 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8436else
8437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8438for as_dir in $PATH
8439do
8440 IFS=$as_save_IFS
8441 test -z "$as_dir" && as_dir=.
8442 for ac_exec_ext in '' $ac_executable_extensions; do
8443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8444 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8446 break 2
8447 fi
8448done
8449 done
8450IFS=$as_save_IFS
8451
8452fi
8453fi
8454RANLIB=$ac_cv_prog_RANLIB
8455if test -n "$RANLIB"; then
8456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8457$as_echo "$RANLIB" >&6; }
8458else
8459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8460$as_echo "no" >&6; }
8461fi
8462
8463
8464fi
8465if test -z "$ac_cv_prog_RANLIB"; then
8466 ac_ct_RANLIB=$RANLIB
8467 # Extract the first word of "ranlib", so it can be a program name with args.
8468set dummy ranlib; ac_word=$2
8469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8470$as_echo_n "checking for $ac_word... " >&6; }
8471if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8472 $as_echo_n "(cached) " >&6
8473else
8474 if test -n "$ac_ct_RANLIB"; then
8475 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8476else
8477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8478for as_dir in $PATH
8479do
8480 IFS=$as_save_IFS
8481 test -z "$as_dir" && as_dir=.
8482 for ac_exec_ext in '' $ac_executable_extensions; do
8483 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8484 ac_cv_prog_ac_ct_RANLIB="ranlib"
8485 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8486 break 2
8487 fi
8488done
8489 done
8490IFS=$as_save_IFS
8491
8492fi
8493fi
8494ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8495if test -n "$ac_ct_RANLIB"; then
8496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8497$as_echo "$ac_ct_RANLIB" >&6; }
8498else
8499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8500$as_echo "no" >&6; }
8501fi
8502
8503 if test "x$ac_ct_RANLIB" = x; then
8504 RANLIB=":"
8505 else
8506 case $cross_compiling:$ac_tool_warned in
8507yes:)
8508{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8509$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8510ac_tool_warned=yes ;;
8511esac
8512 RANLIB=$ac_ct_RANLIB
8513 fi
8514else
8515 RANLIB="$ac_cv_prog_RANLIB"
8516fi
8517
8518
8519for ac_prog in flex lex
8520do
8521 # Extract the first word of "$ac_prog", so it can be a program name with args.
8522set dummy $ac_prog; ac_word=$2
8523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8524$as_echo_n "checking for $ac_word... " >&6; }
8525if ${ac_cv_prog_LEX+:} false; then :
8526 $as_echo_n "(cached) " >&6
8527else
8528 if test -n "$LEX"; then
8529 ac_cv_prog_LEX="$LEX" # Let the user override the test.
8530else
8531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8532for as_dir in $PATH
8533do
8534 IFS=$as_save_IFS
8535 test -z "$as_dir" && as_dir=.
8536 for ac_exec_ext in '' $ac_executable_extensions; do
8537 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8538 ac_cv_prog_LEX="$ac_prog"
8539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8540 break 2
8541 fi
8542done
8543 done
8544IFS=$as_save_IFS
8545
8546fi
8547fi
8548LEX=$ac_cv_prog_LEX
8549if test -n "$LEX"; then
8550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
8551$as_echo "$LEX" >&6; }
8552else
8553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8554$as_echo "no" >&6; }
8555fi
8556
8557
8558 test -n "$LEX" && break
8559done
8560test -n "$LEX" || LEX=":"
8561
8562if test "x$LEX" != "x:"; then
8563 cat >conftest.l <<_ACEOF
8564%%
8565a { ECHO; }
8566b { REJECT; }
8567c { yymore (); }
8568d { yyless (1); }
8569e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
8570 yyless ((input () != 0)); }
8571f { unput (yytext[0]); }
8572. { BEGIN INITIAL; }
8573%%
8574#ifdef YYTEXT_POINTER
8575extern char *yytext;
8576#endif
8577int
8578main (void)
8579{
8580 return ! yylex () + ! yywrap ();
8581}
8582_ACEOF
8583{ { ac_try="$LEX conftest.l"
8584case "(($ac_try" in
8585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8586 *) ac_try_echo=$ac_try;;
8587esac
8588eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8589$as_echo "$ac_try_echo"; } >&5
8590 (eval "$LEX conftest.l") 2>&5
8591 ac_status=$?
8592 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8593 test $ac_status = 0; }
8594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
8595$as_echo_n "checking lex output file root... " >&6; }
8596if ${ac_cv_prog_lex_root+:} false; then :
8597 $as_echo_n "(cached) " >&6
8598else
8599
8600if test -f lex.yy.c; then
8601 ac_cv_prog_lex_root=lex.yy
8602elif test -f lexyy.c; then
8603 ac_cv_prog_lex_root=lexyy
8604else
8605 as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
8606fi
8607fi
8608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
8609$as_echo "$ac_cv_prog_lex_root" >&6; }
8610LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
8611
8612if test -z "${LEXLIB+set}"; then
8613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
8614$as_echo_n "checking lex library... " >&6; }
8615if ${ac_cv_lib_lex+:} false; then :
8616 $as_echo_n "(cached) " >&6
8617else
8618
8619 ac_save_LIBS=$LIBS
8620 ac_cv_lib_lex='none needed'
8621 for ac_lib in '' -lfl -ll; do
8622 LIBS="$ac_lib $ac_save_LIBS"
8623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8624/* end confdefs.h. */
8625`cat $LEX_OUTPUT_ROOT.c`
8626_ACEOF
8627if ac_fn_c_try_link "$LINENO"; then :
8628 ac_cv_lib_lex=$ac_lib
8629fi
8630rm -f core conftest.err conftest.$ac_objext \
8631 conftest$ac_exeext conftest.$ac_ext
8632 test "$ac_cv_lib_lex" != 'none needed' && break
8633 done
8634 LIBS=$ac_save_LIBS
8635
8636fi
8637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
8638$as_echo "$ac_cv_lib_lex" >&6; }
8639 test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
8640fi
8641
8642
8643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
8644$as_echo_n "checking whether yytext is a pointer... " >&6; }
8645if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
8646 $as_echo_n "(cached) " >&6
8647else
8648 # POSIX says lex can declare yytext either as a pointer or an array; the
8649# default is implementation-dependent. Figure out which it is, since
8650# not all implementations provide the %pointer and %array declarations.
8651ac_cv_prog_lex_yytext_pointer=no
8652ac_save_LIBS=$LIBS
8653LIBS="$LEXLIB $ac_save_LIBS"
8654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8655/* end confdefs.h. */
8656
8657 #define YYTEXT_POINTER 1
8658`cat $LEX_OUTPUT_ROOT.c`
8659_ACEOF
8660if ac_fn_c_try_link "$LINENO"; then :
8661 ac_cv_prog_lex_yytext_pointer=yes
8662fi
8663rm -f core conftest.err conftest.$ac_objext \
8664 conftest$ac_exeext conftest.$ac_ext
8665LIBS=$ac_save_LIBS
8666
8667fi
8668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
8669$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
8670if test $ac_cv_prog_lex_yytext_pointer = yes; then
8671
8672$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
8673
8674fi
8675rm -f conftest.l $LEX_OUTPUT_ROOT.c
8676
8677fi
8678
8679if test -n "$auto_cflags"; then
8680 if test -n "$GCC"; then
8681 CFLAGS="$CFLAGS -O2 -Wall"
8682 else
8683 case "$host_os" in
8684 *hpux*) CFLAGS="$CFLAGS +O3" ;;
8685 *ultrix* | *osf*) CFLAGS="$CFLAGS -O -Olimit 2000" ;;
8686 *) CFLAGS="$CFLAGS -O" ;;
8687 esac
8688 fi
8689fi
8690
8691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
8692$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
8693if ${ac_cv_c_const+:} false; then :
8694 $as_echo_n "(cached) " >&6
8695else
8696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8697/* end confdefs.h. */
8698
8699int
8700main ()
8701{
8702
8703#ifndef __cplusplus
8704 /* Ultrix mips cc rejects this sort of thing. */
8705 typedef int charset[2];
8706 const charset cs = { 0, 0 };
8707 /* SunOS 4.1.1 cc rejects this. */
8708 char const *const *pcpcc;
8709 char **ppc;
8710 /* NEC SVR4.0.2 mips cc rejects this. */
8711 struct point {int x, y;};
8712 static struct point const zero = {0,0};
8713 /* AIX XL C 1.02.0.0 rejects this.
8714 It does not let you subtract one const X* pointer from another in
8715 an arm of an if-expression whose if-part is not a constant
8716 expression */
8717 const char *g = "string";
8718 pcpcc = &g + (g ? g-g : 0);
8719 /* HPUX 7.0 cc rejects these. */
8720 ++pcpcc;
8721 ppc = (char**) pcpcc;
8722 pcpcc = (char const *const *) ppc;
8723 { /* SCO 3.2v4 cc rejects this sort of thing. */
8724 char tx;
8725 char *t = &tx;
8726 char const *s = 0 ? (char *) 0 : (char const *) 0;
8727
8728 *t++ = 0;
8729 if (s) return 0;
8730 }
8731 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8732 int x[] = {25, 17};
8733 const int *foo = &x[0];
8734 ++foo;
8735 }
8736 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8737 typedef const int *iptr;
8738 iptr p = 0;
8739 ++p;
8740 }
8741 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
8742 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8743 struct s { int j; const int *ap[3]; } bx;
8744 struct s *b = &bx; b->j = 5;
8745 }
8746 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8747 const int foo = 10;
8748 if (!foo) return 0;
8749 }
8750 return !cs[0] && !zero.x;
8751#endif
8752
8753 ;
8754 return 0;
8755}
8756_ACEOF
8757if ac_fn_c_try_compile "$LINENO"; then :
8758 ac_cv_c_const=yes
8759else
8760 ac_cv_c_const=no
8761fi
8762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8763fi
8764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
8765$as_echo "$ac_cv_c_const" >&6; }
8766if test $ac_cv_c_const = no; then
8767
8768$as_echo "#define const /**/" >>confdefs.h
8769
8770fi
8771
8772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
8773$as_echo_n "checking for inline... " >&6; }
8774if ${ac_cv_c_inline+:} false; then :
8775 $as_echo_n "(cached) " >&6
8776else
8777 ac_cv_c_inline=no
8778for ac_kw in inline __inline__ __inline; do
8779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8780/* end confdefs.h. */
8781#ifndef __cplusplus
8782typedef int foo_t;
8783static $ac_kw foo_t static_foo () {return 0; }
8784$ac_kw foo_t foo () {return 0; }
8785#endif
8786
8787_ACEOF
8788if ac_fn_c_try_compile "$LINENO"; then :
8789 ac_cv_c_inline=$ac_kw
8790fi
8791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8792 test "$ac_cv_c_inline" != no && break
8793done
8794
8795fi
8796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
8797$as_echo "$ac_cv_c_inline" >&6; }
8798
8799case $ac_cv_c_inline in
8800 inline | yes) ;;
8801 *)
8802 case $ac_cv_c_inline in
8803 no) ac_val=;;
8804 *) ac_val=$ac_cv_c_inline;;
8805 esac
8806 cat >>confdefs.h <<_ACEOF
8807#ifndef __cplusplus
8808#define inline $ac_val
8809#endif
8810_ACEOF
8811 ;;
8812esac
8813
8814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
8815$as_echo_n "checking for working volatile... " >&6; }
8816if ${ac_cv_c_volatile+:} false; then :
8817 $as_echo_n "(cached) " >&6
8818else
8819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8820/* end confdefs.h. */
8821
8822int
8823main ()
8824{
8825
8826volatile int x;
8827int * volatile y = (int *) 0;
8828return !x && !y;
8829 ;
8830 return 0;
8831}
8832_ACEOF
8833if ac_fn_c_try_compile "$LINENO"; then :
8834 ac_cv_c_volatile=yes
8835else
8836 ac_cv_c_volatile=no
8837fi
8838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8839fi
8840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
8841$as_echo "$ac_cv_c_volatile" >&6; }
8842if test $ac_cv_c_volatile = no; then
8843
8844$as_echo "#define volatile /**/" >>confdefs.h
8845
8846fi
8847
8848
8849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8850$as_echo_n "checking for ANSI C header files... " >&6; }
8851if ${ac_cv_header_stdc+:} false; then :
8852 $as_echo_n "(cached) " >&6
8853else
8854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8855/* end confdefs.h. */
8856#include <stdlib.h>
8857#include <stdarg.h>
8858#include <string.h>
8859#include <float.h>
8860
8861int
8862main ()
8863{
8864
8865 ;
8866 return 0;
8867}
8868_ACEOF
8869if ac_fn_c_try_compile "$LINENO"; then :
8870 ac_cv_header_stdc=yes
8871else
8872 ac_cv_header_stdc=no
8873fi
8874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8875
8876if test $ac_cv_header_stdc = yes; then
8877 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8879/* end confdefs.h. */
8880#include <string.h>
8881
8882_ACEOF
8883if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8884 $EGREP "memchr" >/dev/null 2>&1; then :
8885
8886else
8887 ac_cv_header_stdc=no
8888fi
8889rm -f conftest*
8890
8891fi
8892
8893if test $ac_cv_header_stdc = yes; then
8894 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8896/* end confdefs.h. */
8897#include <stdlib.h>
8898
8899_ACEOF
8900if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8901 $EGREP "free" >/dev/null 2>&1; then :
8902
8903else
8904 ac_cv_header_stdc=no
8905fi
8906rm -f conftest*
8907
8908fi
8909
8910if test $ac_cv_header_stdc = yes; then
8911 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8912 if test "$cross_compiling" = yes; then :
8913 :
8914else
8915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8916/* end confdefs.h. */
8917#include <ctype.h>
8918#include <stdlib.h>
8919#if ((' ' & 0x0FF) == 0x020)
8920# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8921# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8922#else
8923# define ISLOWER(c) \
8924 (('a' <= (c) && (c) <= 'i') \
8925 || ('j' <= (c) && (c) <= 'r') \
8926 || ('s' <= (c) && (c) <= 'z'))
8927# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8928#endif
8929
8930#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8931int
8932main ()
8933{
8934 int i;
8935 for (i = 0; i < 256; i++)
8936 if (XOR (islower (i), ISLOWER (i))
8937 || toupper (i) != TOUPPER (i))
8938 return 2;
8939 return 0;
8940}
8941_ACEOF
8942if ac_fn_c_try_run "$LINENO"; then :
8943
8944else
8945 ac_cv_header_stdc=no
8946fi
8947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8948 conftest.$ac_objext conftest.beam conftest.$ac_ext
8949fi
8950
8951fi
8952fi
8953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8954$as_echo "$ac_cv_header_stdc" >&6; }
8955if test $ac_cv_header_stdc = yes; then
8956
8957$as_echo "#define STDC_HEADERS 1" >>confdefs.h
8958
8959fi
8960
8961
8962# Check whether --enable-largefile was given.
8963if test "${enable_largefile+set}" = set; then :
8964 enableval=$enable_largefile;
8965fi
8966
8967if test "$enable_largefile" != no; then
8968
8969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
8970$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
8971if ${ac_cv_sys_largefile_CC+:} false; then :
8972 $as_echo_n "(cached) " >&6
8973else
8974 ac_cv_sys_largefile_CC=no
8975 if test "$GCC" != yes; then
8976 ac_save_CC=$CC
8977 while :; do
8978 # IRIX 6.2 and later do not support large files by default,
8979 # so use the C compiler's -n32 option if that helps.
8980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8981/* end confdefs.h. */
8982#include <sys/types.h>
8983 /* Check that off_t can represent 2**63 - 1 correctly.
8984 We can't simply define LARGE_OFF_T to be 9223372036854775807,
8985 since some C++ compilers masquerading as C compilers
8986 incorrectly reject 9223372036854775807. */
8987#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8988 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8989 && LARGE_OFF_T % 2147483647 == 1)
8990 ? 1 : -1];
8991int
8992main ()
8993{
8994
8995 ;
8996 return 0;
8997}
8998_ACEOF
8999 if ac_fn_c_try_compile "$LINENO"; then :
9000 break
9001fi
9002rm -f core conftest.err conftest.$ac_objext
9003 CC="$CC -n32"
9004 if ac_fn_c_try_compile "$LINENO"; then :
9005 ac_cv_sys_largefile_CC=' -n32'; break
9006fi
9007rm -f core conftest.err conftest.$ac_objext
9008 break
9009 done
9010 CC=$ac_save_CC
9011 rm -f conftest.$ac_ext
9012 fi
9013fi
9014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
9015$as_echo "$ac_cv_sys_largefile_CC" >&6; }
9016 if test "$ac_cv_sys_largefile_CC" != no; then
9017 CC=$CC$ac_cv_sys_largefile_CC
9018 fi
9019
9020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9021$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
9022if ${ac_cv_sys_file_offset_bits+:} false; then :
9023 $as_echo_n "(cached) " >&6
9024else
9025 while :; do
9026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9027/* end confdefs.h. */
9028#include <sys/types.h>
9029 /* Check that off_t can represent 2**63 - 1 correctly.
9030 We can't simply define LARGE_OFF_T to be 9223372036854775807,
9031 since some C++ compilers masquerading as C compilers
9032 incorrectly reject 9223372036854775807. */
9033#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9034 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9035 && LARGE_OFF_T % 2147483647 == 1)
9036 ? 1 : -1];
9037int
9038main ()
9039{
9040
9041 ;
9042 return 0;
9043}
9044_ACEOF
9045if ac_fn_c_try_compile "$LINENO"; then :
9046 ac_cv_sys_file_offset_bits=no; break
9047fi
9048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9050/* end confdefs.h. */
9051#define _FILE_OFFSET_BITS 64
9052#include <sys/types.h>
9053 /* Check that off_t can represent 2**63 - 1 correctly.
9054 We can't simply define LARGE_OFF_T to be 9223372036854775807,
9055 since some C++ compilers masquerading as C compilers
9056 incorrectly reject 9223372036854775807. */
9057#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9058 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9059 && LARGE_OFF_T % 2147483647 == 1)
9060 ? 1 : -1];
9061int
9062main ()
9063{
9064
9065 ;
9066 return 0;
9067}
9068_ACEOF
9069if ac_fn_c_try_compile "$LINENO"; then :
9070 ac_cv_sys_file_offset_bits=64; break
9071fi
9072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9073 ac_cv_sys_file_offset_bits=unknown
9074 break
9075done
9076fi
9077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
9078$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
9079case $ac_cv_sys_file_offset_bits in #(
9080 no | unknown) ;;
9081 *)
9082cat >>confdefs.h <<_ACEOF
9083#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9084_ACEOF
9085;;
9086esac
9087rm -rf conftest*
9088 if test $ac_cv_sys_file_offset_bits = unknown; then
9089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
9090$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
9091if ${ac_cv_sys_large_files+:} false; then :
9092 $as_echo_n "(cached) " >&6
9093else
9094 while :; do
9095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9096/* end confdefs.h. */
9097#include <sys/types.h>
9098 /* Check that off_t can represent 2**63 - 1 correctly.
9099 We can't simply define LARGE_OFF_T to be 9223372036854775807,
9100 since some C++ compilers masquerading as C compilers
9101 incorrectly reject 9223372036854775807. */
9102#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9103 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9104 && LARGE_OFF_T % 2147483647 == 1)
9105 ? 1 : -1];
9106int
9107main ()
9108{
9109
9110 ;
9111 return 0;
9112}
9113_ACEOF
9114if ac_fn_c_try_compile "$LINENO"; then :
9115 ac_cv_sys_large_files=no; break
9116fi
9117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9119/* end confdefs.h. */
9120#define _LARGE_FILES 1
9121#include <sys/types.h>
9122 /* Check that off_t can represent 2**63 - 1 correctly.
9123 We can't simply define LARGE_OFF_T to be 9223372036854775807,
9124 since some C++ compilers masquerading as C compilers
9125 incorrectly reject 9223372036854775807. */
9126#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9127 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9128 && LARGE_OFF_T % 2147483647 == 1)
9129 ? 1 : -1];
9130int
9131main ()
9132{
9133
9134 ;
9135 return 0;
9136}
9137_ACEOF
9138if ac_fn_c_try_compile "$LINENO"; then :
9139 ac_cv_sys_large_files=1; break
9140fi
9141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9142 ac_cv_sys_large_files=unknown
9143 break
9144done
9145fi
9146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
9147$as_echo "$ac_cv_sys_large_files" >&6; }
9148case $ac_cv_sys_large_files in #(
9149 no | unknown) ;;
9150 *)
9151cat >>confdefs.h <<_ACEOF
9152#define _LARGE_FILES $ac_cv_sys_large_files
9153_ACEOF
9154;;
9155esac
9156rm -rf conftest*
9157 fi
9158
9159
9160fi
9161
9162# The cast to long int works around a bug in the HP C Compiler
9163# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9164# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9165# This bug is HP SR number 8606223364.
9166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
9167$as_echo_n "checking size of off_t... " >&6; }
9168if ${ac_cv_sizeof_off_t+:} false; then :
9169 $as_echo_n "(cached) " >&6
9170else
9171 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
9172
9173else
9174 if test "$ac_cv_type_off_t" = yes; then
9175 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9176$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9177as_fn_error 77 "cannot compute sizeof (off_t)
9178See \`config.log' for more details" "$LINENO" 5; }
9179 else
9180 ac_cv_sizeof_off_t=0
9181 fi
9182fi
9183
9184fi
9185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
9186$as_echo "$ac_cv_sizeof_off_t" >&6; }
9187
9188
9189
9190cat >>confdefs.h <<_ACEOF
9191#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
9192_ACEOF
9193
9194
9195
9196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
9197$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
9198if ${ac_cv_header_stdbool_h+:} false; then :
9199 $as_echo_n "(cached) " >&6
9200else
9201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9202/* end confdefs.h. */
9203
9204 #include <stdbool.h>
9205 #ifndef bool
9206 "error: bool is not defined"
9207 #endif
9208 #ifndef false
9209 "error: false is not defined"
9210 #endif
9211 #if false
9212 "error: false is not 0"
9213 #endif
9214 #ifndef true
9215 "error: true is not defined"
9216 #endif
9217 #if true != 1
9218 "error: true is not 1"
9219 #endif
9220 #ifndef __bool_true_false_are_defined
9221 "error: __bool_true_false_are_defined is not defined"
9222 #endif
9223
9224 struct s { _Bool s: 1; _Bool t; } s;
9225
9226 char a[true == 1 ? 1 : -1];
9227 char b[false == 0 ? 1 : -1];
9228 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
9229 char d[(bool) 0.5 == true ? 1 : -1];
9230 /* See body of main program for 'e'. */
9231 char f[(_Bool) 0.0 == false ? 1 : -1];
9232 char g[true];
9233 char h[sizeof (_Bool)];
9234 char i[sizeof s.t];
9235 enum { j = false, k = true, l = false * true, m = true * 256 };
9236 /* The following fails for
9237 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
9238 _Bool n[m];
9239 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
9240 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
9241 /* Catch a bug in an HP-UX C compiler. See
9242 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
9243 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
9244 */
9245 _Bool q = true;
9246 _Bool *pq = &q;
9247
9248int
9249main ()
9250{
9251
9252 bool e = &s;
9253 *pq |= q;
9254 *pq |= ! q;
9255 /* Refer to every declared value, to avoid compiler optimizations. */
9256 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
9257 + !m + !n + !o + !p + !q + !pq);
9258
9259 ;
9260 return 0;
9261}
9262_ACEOF
9263if ac_fn_c_try_compile "$LINENO"; then :
9264 ac_cv_header_stdbool_h=yes
9265else
9266 ac_cv_header_stdbool_h=no
9267fi
9268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9269fi
9270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
9271$as_echo "$ac_cv_header_stdbool_h" >&6; }
9272 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
9273if test "x$ac_cv_type__Bool" = xyes; then :
9274
9275cat >>confdefs.h <<_ACEOF
9276#define HAVE__BOOL 1
9277_ACEOF
9278
9279
9280fi
9281
9282
9283if test $ac_cv_header_stdbool_h = yes; then
9284
9285$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
9286
9287fi
9288
9289for ac_header in unistd.h sys/time.h
9290do :
9291 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9292ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9293if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9294 cat >>confdefs.h <<_ACEOF
9295#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9296_ACEOF
9297
9298fi
9299
9300done
9301
9302for ac_header in termios.h sys/ioctl.h sys/select.h utime.h sys/utime.h
9303do :
9304 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9305ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9306if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9307 cat >>confdefs.h <<_ACEOF
9308#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9309_ACEOF
9310
9311fi
9312
9313done
9314
9315for ac_header in stdint.h inttypes.h pwd.h wchar.h
9316do :
9317 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9318ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9319if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9320 cat >>confdefs.h <<_ACEOF
9321#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9322_ACEOF
9323
9324fi
9325
9326done
9327
9328
9329ac_fn_c_check_decl "$LINENO" "h_errno" "ac_cv_have_decl_h_errno" "#include <netdb.h>
9330"
9331if test "x$ac_cv_have_decl_h_errno" = xyes; then :
9332 ac_have_decl=1
9333else
9334 ac_have_decl=0
9335fi
9336
9337cat >>confdefs.h <<_ACEOF
9338#define HAVE_DECL_H_ERRNO $ac_have_decl
9339_ACEOF
9340
9341
9342# The cast to long int works around a bug in the HP C Compiler
9343# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9344# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9345# This bug is HP SR number 8606223364.
9346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
9347$as_echo_n "checking size of short... " >&6; }
9348if ${ac_cv_sizeof_short+:} false; then :
9349 $as_echo_n "(cached) " >&6
9350else
9351 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
9352
9353else
9354 if test "$ac_cv_type_short" = yes; then
9355 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9356$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9357as_fn_error 77 "cannot compute sizeof (short)
9358See \`config.log' for more details" "$LINENO" 5; }
9359 else
9360 ac_cv_sizeof_short=0
9361 fi
9362fi
9363
9364fi
9365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
9366$as_echo "$ac_cv_sizeof_short" >&6; }
9367
9368
9369
9370cat >>confdefs.h <<_ACEOF
9371#define SIZEOF_SHORT $ac_cv_sizeof_short
9372_ACEOF
9373
9374
9375# The cast to long int works around a bug in the HP C Compiler
9376# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9377# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9378# This bug is HP SR number 8606223364.
9379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
9380$as_echo_n "checking size of int... " >&6; }
9381if ${ac_cv_sizeof_int+:} false; then :
9382 $as_echo_n "(cached) " >&6
9383else
9384 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
9385
9386else
9387 if test "$ac_cv_type_int" = yes; then
9388 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9389$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9390as_fn_error 77 "cannot compute sizeof (int)
9391See \`config.log' for more details" "$LINENO" 5; }
9392 else
9393 ac_cv_sizeof_int=0
9394 fi
9395fi
9396
9397fi
9398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
9399$as_echo "$ac_cv_sizeof_int" >&6; }
9400
9401
9402
9403cat >>confdefs.h <<_ACEOF
9404#define SIZEOF_INT $ac_cv_sizeof_int
9405_ACEOF
9406
9407
9408# The cast to long int works around a bug in the HP C Compiler
9409# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9410# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9411# This bug is HP SR number 8606223364.
9412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
9413$as_echo_n "checking size of long... " >&6; }
9414if ${ac_cv_sizeof_long+:} false; then :
9415 $as_echo_n "(cached) " >&6
9416else
9417 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
9418
9419else
9420 if test "$ac_cv_type_long" = yes; then
9421 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9422$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9423as_fn_error 77 "cannot compute sizeof (long)
9424See \`config.log' for more details" "$LINENO" 5; }
9425 else
9426 ac_cv_sizeof_long=0
9427 fi
9428fi
9429
9430fi
9431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
9432$as_echo "$ac_cv_sizeof_long" >&6; }
9433
9434
9435
9436cat >>confdefs.h <<_ACEOF
9437#define SIZEOF_LONG $ac_cv_sizeof_long
9438_ACEOF
9439
9440
9441# The cast to long int works around a bug in the HP C Compiler
9442# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9443# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9444# This bug is HP SR number 8606223364.
9445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9446$as_echo_n "checking size of long long... " >&6; }
9447if ${ac_cv_sizeof_long_long+:} false; then :
9448 $as_echo_n "(cached) " >&6
9449else
9450 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
9451
9452else
9453 if test "$ac_cv_type_long_long" = yes; then
9454 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9455$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9456as_fn_error 77 "cannot compute sizeof (long long)
9457See \`config.log' for more details" "$LINENO" 5; }
9458 else
9459 ac_cv_sizeof_long_long=0
9460 fi
9461fi
9462
9463fi
9464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
9465$as_echo "$ac_cv_sizeof_long_long" >&6; }
9466
9467
9468
9469cat >>confdefs.h <<_ACEOF
9470#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
9471_ACEOF
9472
9473
9474# The cast to long int works around a bug in the HP C Compiler
9475# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9476# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9477# This bug is HP SR number 8606223364.
9478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
9479$as_echo_n "checking size of void *... " >&6; }
9480if ${ac_cv_sizeof_void_p+:} false; then :
9481 $as_echo_n "(cached) " >&6
9482else
9483 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
9484
9485else
9486 if test "$ac_cv_type_void_p" = yes; then
9487 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9488$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9489as_fn_error 77 "cannot compute sizeof (void *)
9490See \`config.log' for more details" "$LINENO" 5; }
9491 else
9492 ac_cv_sizeof_void_p=0
9493 fi
9494fi
9495
9496fi
9497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
9498$as_echo "$ac_cv_sizeof_void_p" >&6; }
9499
9500
9501
9502cat >>confdefs.h <<_ACEOF
9503#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
9504_ACEOF
9505
9506
9507
9508ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
9509if test "x$ac_cv_type_size_t" = xyes; then :
9510
9511else
9512
9513cat >>confdefs.h <<_ACEOF
9514#define size_t unsigned int
9515_ACEOF
9516
9517fi
9518
9519ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
9520if test "x$ac_cv_type_pid_t" = xyes; then :
9521
9522else
9523
9524cat >>confdefs.h <<_ACEOF
9525#define pid_t int
9526_ACEOF
9527
9528fi
9529
9530ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
9531if test "x$ac_cv_type_uint32_t" = xyes; then :
9532
9533cat >>confdefs.h <<_ACEOF
9534#define HAVE_UINT32_T 1
9535_ACEOF
9536
9537
9538fi
9539ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
9540if test "x$ac_cv_type_uintptr_t" = xyes; then :
9541
9542cat >>confdefs.h <<_ACEOF
9543#define HAVE_UINTPTR_T 1
9544_ACEOF
9545
9546
9547fi
9548ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
9549if test "x$ac_cv_type_intptr_t" = xyes; then :
9550
9551cat >>confdefs.h <<_ACEOF
9552#define HAVE_INTPTR_T 1
9553_ACEOF
9554
9555
9556fi
9557ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
9558if test "x$ac_cv_type_int64_t" = xyes; then :
9559
9560cat >>confdefs.h <<_ACEOF
9561#define HAVE_INT64_T 1
9562_ACEOF
9563
9564
9565fi
9566
9567ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "
9568#include <stdio.h>
9569#include <sys/types.h>
9570#if HAVE_INTTYPES_H
9571# include <inttypes.h>
9572#endif
9573#include <signal.h>
9574
9575"
9576if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
9577
9578cat >>confdefs.h <<_ACEOF
9579#define HAVE_SIG_ATOMIC_T 1
9580_ACEOF
9581
9582
9583fi
9584
9585
9586# gnulib
9587
9588
9589
9590
9591
9592 LIBC_FATAL_STDERR_=1
9593 export LIBC_FATAL_STDERR_
9594
9595
9596 GNULIB_SOCKET=0;
9597 GNULIB_CONNECT=0;
9598 GNULIB_ACCEPT=0;
9599 GNULIB_BIND=0;
9600 GNULIB_GETPEERNAME=0;
9601 GNULIB_GETSOCKNAME=0;
9602 GNULIB_GETSOCKOPT=0;
9603 GNULIB_LISTEN=0;
9604 GNULIB_RECV=0;
9605 GNULIB_SEND=0;
9606 GNULIB_RECVFROM=0;
9607 GNULIB_SENDTO=0;
9608 GNULIB_SETSOCKOPT=0;
9609 GNULIB_SHUTDOWN=0;
9610 GNULIB_ACCEPT4=0;
9611 HAVE_STRUCT_SOCKADDR_STORAGE=1;
9612 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
9613
9614 HAVE_SA_FAMILY_T=1;
9615 HAVE_ACCEPT4=1;
9616
9617
9618
9619
9620 for ac_header in $ac_header_list
9621do :
9622 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9623ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9624"
9625if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9626 cat >>confdefs.h <<_ACEOF
9627#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9628_ACEOF
9629
9630fi
9631
9632done
9633
9634
9635
9636
9637 if test $ac_cv_header_sys_socket_h = no; then
9638 for ac_header in ws2tcpip.h
9639do :
9640 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
9641if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
9642 cat >>confdefs.h <<_ACEOF
9643#define HAVE_WS2TCPIP_H 1
9644_ACEOF
9645
9646fi
9647
9648done
9649
9650 fi
9651
9652
9653
9654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9655$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
9656if ${gl_cv_have_include_next+:} false; then :
9657 $as_echo_n "(cached) " >&6
9658else
9659 rm -rf conftestd1a conftestd1b conftestd2
9660 mkdir conftestd1a conftestd1b conftestd2
9661 cat <<EOF > conftestd1a/conftest.h
9662#define DEFINED_IN_CONFTESTD1
9663#include_next <conftest.h>
9664#ifdef DEFINED_IN_CONFTESTD2
9665int foo;
9666#else
9667#error "include_next doesn't work"
9668#endif
9669EOF
9670 cat <<EOF > conftestd1b/conftest.h
9671#define DEFINED_IN_CONFTESTD1
9672#include <stdio.h>
9673#include_next <conftest.h>
9674#ifdef DEFINED_IN_CONFTESTD2
9675int foo;
9676#else
9677#error "include_next doesn't work"
9678#endif
9679EOF
9680 cat <<EOF > conftestd2/conftest.h
9681#ifndef DEFINED_IN_CONFTESTD1
9682#error "include_next test doesn't work"
9683#endif
9684#define DEFINED_IN_CONFTESTD2
9685EOF
9686 gl_save_CPPFLAGS="$CPPFLAGS"
9687 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9689/* end confdefs.h. */
9690#include <conftest.h>
9691_ACEOF
9692if ac_fn_c_try_compile "$LINENO"; then :
9693 gl_cv_have_include_next=yes
9694else
9695 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9697/* end confdefs.h. */
9698#include <conftest.h>
9699_ACEOF
9700if ac_fn_c_try_compile "$LINENO"; then :
9701 gl_cv_have_include_next=buggy
9702else
9703 gl_cv_have_include_next=no
9704fi
9705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9706
9707fi
9708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9709 CPPFLAGS="$gl_save_CPPFLAGS"
9710 rm -rf conftestd1a conftestd1b conftestd2
9711
9712fi
9713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9714$as_echo "$gl_cv_have_include_next" >&6; }
9715 PRAGMA_SYSTEM_HEADER=
9716 if test $gl_cv_have_include_next = yes; then
9717 INCLUDE_NEXT=include_next
9718 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9719 if test -n "$GCC"; then
9720 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9721 fi
9722 else
9723 if test $gl_cv_have_include_next = buggy; then
9724 INCLUDE_NEXT=include
9725 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9726 else
9727 INCLUDE_NEXT=include
9728 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9729 fi
9730 fi
9731
9732
9733
9734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9735$as_echo_n "checking whether system header files limit the line length... " >&6; }
9736if ${gl_cv_pragma_columns+:} false; then :
9737 $as_echo_n "(cached) " >&6
9738else
9739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9740/* end confdefs.h. */
9741
9742#ifdef __TANDEM
9743choke me
9744#endif
9745
9746_ACEOF
9747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9748 $EGREP "choke me" >/dev/null 2>&1; then :
9749 gl_cv_pragma_columns=yes
9750else
9751 gl_cv_pragma_columns=no
9752fi
9753rm -f conftest*
9754
9755
9756fi
9757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9758$as_echo "$gl_cv_pragma_columns" >&6; }
9759 if test $gl_cv_pragma_columns = yes; then
9760 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9761 else
9762 PRAGMA_COLUMNS=
9763 fi
9764
9765
9766
9767 GNULIB_CHDIR=0;
9768 GNULIB_CHOWN=0;
9769 GNULIB_CLOSE=0;
9770 GNULIB_DUP=0;
9771 GNULIB_DUP2=0;
9772 GNULIB_DUP3=0;
9773 GNULIB_ENVIRON=0;
9774 GNULIB_EUIDACCESS=0;
9775 GNULIB_FACCESSAT=0;
9776 GNULIB_FCHDIR=0;
9777 GNULIB_FCHOWNAT=0;
9778 GNULIB_FDATASYNC=0;
9779 GNULIB_FSYNC=0;
9780 GNULIB_FTRUNCATE=0;
9781 GNULIB_GETCWD=0;
9782 GNULIB_GETDOMAINNAME=0;
9783 GNULIB_GETDTABLESIZE=0;
9784 GNULIB_GETGROUPS=0;
9785 GNULIB_GETHOSTNAME=0;
9786 GNULIB_GETLOGIN=0;
9787 GNULIB_GETLOGIN_R=0;
9788 GNULIB_GETPAGESIZE=0;
9789 GNULIB_GETUSERSHELL=0;
9790 GNULIB_GROUP_MEMBER=0;
9791 GNULIB_ISATTY=0;
9792 GNULIB_LCHOWN=0;
9793 GNULIB_LINK=0;
9794 GNULIB_LINKAT=0;
9795 GNULIB_LSEEK=0;
9796 GNULIB_PIPE=0;
9797 GNULIB_PIPE2=0;
9798 GNULIB_PREAD=0;
9799 GNULIB_PWRITE=0;
9800 GNULIB_READ=0;
9801 GNULIB_READLINK=0;
9802 GNULIB_READLINKAT=0;
9803 GNULIB_RMDIR=0;
9804 GNULIB_SETHOSTNAME=0;
9805 GNULIB_SLEEP=0;
9806 GNULIB_SYMLINK=0;
9807 GNULIB_SYMLINKAT=0;
9808 GNULIB_TTYNAME_R=0;
9809 GNULIB_UNISTD_H_NONBLOCKING=0;
9810 GNULIB_UNISTD_H_SIGPIPE=0;
9811 GNULIB_UNLINK=0;
9812 GNULIB_UNLINKAT=0;
9813 GNULIB_USLEEP=0;
9814 GNULIB_WRITE=0;
9815 HAVE_CHOWN=1;
9816 HAVE_DUP2=1;
9817 HAVE_DUP3=1;
9818 HAVE_EUIDACCESS=1;
9819 HAVE_FACCESSAT=1;
9820 HAVE_FCHDIR=1;
9821 HAVE_FCHOWNAT=1;
9822 HAVE_FDATASYNC=1;
9823 HAVE_FSYNC=1;
9824 HAVE_FTRUNCATE=1;
9825 HAVE_GETDTABLESIZE=1;
9826 HAVE_GETGROUPS=1;
9827 HAVE_GETHOSTNAME=1;
9828 HAVE_GETLOGIN=1;
9829 HAVE_GETPAGESIZE=1;
9830 HAVE_GROUP_MEMBER=1;
9831 HAVE_LCHOWN=1;
9832 HAVE_LINK=1;
9833 HAVE_LINKAT=1;
9834 HAVE_PIPE=1;
9835 HAVE_PIPE2=1;
9836 HAVE_PREAD=1;
9837 HAVE_PWRITE=1;
9838 HAVE_READLINK=1;
9839 HAVE_READLINKAT=1;
9840 HAVE_SETHOSTNAME=1;
9841 HAVE_SLEEP=1;
9842 HAVE_SYMLINK=1;
9843 HAVE_SYMLINKAT=1;
9844 HAVE_UNLINKAT=1;
9845 HAVE_USLEEP=1;
9846 HAVE_DECL_ENVIRON=1;
9847 HAVE_DECL_FCHDIR=1;
9848 HAVE_DECL_FDATASYNC=1;
9849 HAVE_DECL_GETDOMAINNAME=1;
9850 HAVE_DECL_GETLOGIN_R=1;
9851 HAVE_DECL_GETPAGESIZE=1;
9852 HAVE_DECL_GETUSERSHELL=1;
9853 HAVE_DECL_SETHOSTNAME=1;
9854 HAVE_DECL_TTYNAME_R=1;
9855 HAVE_OS_H=0;
9856 HAVE_SYS_PARAM_H=0;
9857 REPLACE_CHOWN=0;
9858 REPLACE_CLOSE=0;
9859 REPLACE_DUP=0;
9860 REPLACE_DUP2=0;
9861 REPLACE_FCHOWNAT=0;
9862 REPLACE_FTRUNCATE=0;
9863 REPLACE_GETCWD=0;
9864 REPLACE_GETDOMAINNAME=0;
9865 REPLACE_GETLOGIN_R=0;
9866 REPLACE_GETGROUPS=0;
9867 REPLACE_GETPAGESIZE=0;
9868 REPLACE_ISATTY=0;
9869 REPLACE_LCHOWN=0;
9870 REPLACE_LINK=0;
9871 REPLACE_LINKAT=0;
9872 REPLACE_LSEEK=0;
9873 REPLACE_PREAD=0;
9874 REPLACE_PWRITE=0;
9875 REPLACE_READ=0;
9876 REPLACE_READLINK=0;
9877 REPLACE_RMDIR=0;
9878 REPLACE_SLEEP=0;
9879 REPLACE_SYMLINK=0;
9880 REPLACE_TTYNAME_R=0;
9881 REPLACE_UNLINK=0;
9882 REPLACE_UNLINKAT=0;
9883 REPLACE_USLEEP=0;
9884 REPLACE_WRITE=0;
9885 UNISTD_H_HAVE_WINSOCK2_H=0;
9886 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9887
9888
9889
9890 GNULIB_IOCTL=0;
9891 SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
9892 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9893
9894 REPLACE_IOCTL=0;
9895
9896
9897
9898
9899
9900
9901 case "$host_os" in
9902 osf*)
9903
9904$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
9905
9906 ;;
9907 esac
9908
9909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
9910$as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
9911if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
9912 $as_echo_n "(cached) " >&6
9913else
9914
9915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9916/* end confdefs.h. */
9917#include <sys/socket.h>
9918int
9919main ()
9920{
9921
9922 ;
9923 return 0;
9924}
9925_ACEOF
9926if ac_fn_c_try_compile "$LINENO"; then :
9927 gl_cv_header_sys_socket_h_selfcontained=yes
9928else
9929 gl_cv_header_sys_socket_h_selfcontained=no
9930fi
9931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9932
9933fi
9934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
9935$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
9936 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
9937 for ac_func in shutdown
9938do :
9939 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
9940if test "x$ac_cv_func_shutdown" = xyes; then :
9941 cat >>confdefs.h <<_ACEOF
9942#define HAVE_SHUTDOWN 1
9943_ACEOF
9944
9945fi
9946done
9947
9948 if test $ac_cv_func_shutdown = yes; then
9949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
9950$as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
9951if ${gl_cv_header_sys_socket_h_shut+:} false; then :
9952 $as_echo_n "(cached) " >&6
9953else
9954
9955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9956/* end confdefs.h. */
9957#include <sys/socket.h>
9958int
9959main ()
9960{
9961int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
9962 ;
9963 return 0;
9964}
9965_ACEOF
9966if ac_fn_c_try_compile "$LINENO"; then :
9967 gl_cv_header_sys_socket_h_shut=yes
9968else
9969 gl_cv_header_sys_socket_h_shut=no
9970fi
9971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9972
9973fi
9974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
9975$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
9976 if test $gl_cv_header_sys_socket_h_shut = no; then
9977 SYS_SOCKET_H='sys/socket.h'
9978 fi
9979 fi
9980 fi
9981 # We need to check for ws2tcpip.h now.
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993 if test $gl_cv_have_include_next = yes; then
9994 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
9995 else
9996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
9997$as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
9998if ${gl_cv_next_sys_socket_h+:} false; then :
9999 $as_echo_n "(cached) " >&6
10000else
10001
10002 if test $ac_cv_header_sys_socket_h = yes; then
10003
10004
10005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10006/* end confdefs.h. */
10007#include <sys/socket.h>
10008
10009_ACEOF
10010 case "$host_os" in
10011 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10012 *) gl_absname_cpp="$ac_cpp" ;;
10013 esac
10014
10015 case "$host_os" in
10016 mingw*)
10017 gl_dirsep_regex='[/\\]'
10018 ;;
10019 *)
10020 gl_dirsep_regex='\/'
10021 ;;
10022 esac
10023 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10024
10025 gl_header_literal_regex=`echo 'sys/socket.h' \
10026 | sed -e "$gl_make_literal_regex_sed"`
10027 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10028 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10029 s|^/[^/]|//&|
10030 p
10031 q
10032 }'
10033 gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10034 sed -n "$gl_absolute_header_sed"`'"'
10035 else
10036 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
10037 fi
10038
10039
10040fi
10041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
10042$as_echo "$gl_cv_next_sys_socket_h" >&6; }
10043 fi
10044 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
10045
10046 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10047 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10048 gl_next_as_first_directive='<'sys/socket.h'>'
10049 else
10050 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10051 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
10052 fi
10053 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
10054
10055
10056
10057
10058 if test $ac_cv_header_sys_socket_h = yes; then
10059 HAVE_SYS_SOCKET_H=1
10060 HAVE_WS2TCPIP_H=0
10061 else
10062 HAVE_SYS_SOCKET_H=0
10063 if test $ac_cv_header_ws2tcpip_h = yes; then
10064 HAVE_WS2TCPIP_H=1
10065 else
10066 HAVE_WS2TCPIP_H=0
10067 fi
10068 fi
10069
10070
10071
10072 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
10073 /* sys/types.h is not needed according to POSIX, but the
10074 sys/socket.h in i386-unknown-freebsd4.10 and
10075 powerpc-apple-darwin5.5 required it. */
10076#include <sys/types.h>
10077#ifdef HAVE_SYS_SOCKET_H
10078#include <sys/socket.h>
10079#endif
10080#ifdef HAVE_WS2TCPIP_H
10081#include <ws2tcpip.h>
10082#endif
10083
10084"
10085if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10086
10087cat >>confdefs.h <<_ACEOF
10088#define HAVE_STRUCT_SOCKADDR_STORAGE 1
10089_ACEOF
10090
10091
10092fi
10093ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
10094 /* sys/types.h is not needed according to POSIX, but the
10095 sys/socket.h in i386-unknown-freebsd4.10 and
10096 powerpc-apple-darwin5.5 required it. */
10097#include <sys/types.h>
10098#ifdef HAVE_SYS_SOCKET_H
10099#include <sys/socket.h>
10100#endif
10101#ifdef HAVE_WS2TCPIP_H
10102#include <ws2tcpip.h>
10103#endif
10104
10105"
10106if test "x$ac_cv_type_sa_family_t" = xyes; then :
10107
10108cat >>confdefs.h <<_ACEOF
10109#define HAVE_SA_FAMILY_T 1
10110_ACEOF
10111
10112
10113fi
10114
10115 if test $ac_cv_type_struct_sockaddr_storage = no; then
10116 HAVE_STRUCT_SOCKADDR_STORAGE=0
10117 fi
10118 if test $ac_cv_type_sa_family_t = no; then
10119 HAVE_SA_FAMILY_T=0
10120 fi
10121 if test $ac_cv_type_struct_sockaddr_storage != no; then
10122 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
10123 #ifdef HAVE_SYS_SOCKET_H
10124 #include <sys/socket.h>
10125 #endif
10126 #ifdef HAVE_WS2TCPIP_H
10127 #include <ws2tcpip.h>
10128 #endif
10129
10130"
10131if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
10132
10133cat >>confdefs.h <<_ACEOF
10134#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
10135_ACEOF
10136
10137
10138else
10139 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
10140fi
10141
10142 fi
10143 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
10144 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
10145 SYS_SOCKET_H='sys/socket.h'
10146 fi
10147
10148
10149
10150
10151 if test $ac_cv_header_sys_socket_h != yes; then
10152 for ac_header in winsock2.h
10153do :
10154 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
10155if test "x$ac_cv_header_winsock2_h" = xyes; then :
10156 cat >>confdefs.h <<_ACEOF
10157#define HAVE_WINSOCK2_H 1
10158_ACEOF
10159
10160fi
10161
10162done
10163
10164 fi
10165 if test "$ac_cv_header_winsock2_h" = yes; then
10166 HAVE_WINSOCK2_H=1
10167 UNISTD_H_HAVE_WINSOCK2_H=1
10168 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
10169 else
10170 HAVE_WINSOCK2_H=0
10171 fi
10172
10173
10174
10175
10176 for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do
10177 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10179$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10180if eval \${$as_gl_Symbol+:} false; then :
10181 $as_echo_n "(cached) " >&6
10182else
10183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10184/* end confdefs.h. */
10185
10186/* Some systems require prerequisite headers. */
10187#include <sys/types.h>
10188#include <sys/socket.h>
10189
10190int
10191main ()
10192{
10193#undef $gl_func
10194 (void) $gl_func;
10195 ;
10196 return 0;
10197}
10198_ACEOF
10199if ac_fn_c_try_compile "$LINENO"; then :
10200 eval "$as_gl_Symbol=yes"
10201else
10202 eval "$as_gl_Symbol=no"
10203fi
10204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10205fi
10206eval ac_res=\$$as_gl_Symbol
10207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10208$as_echo "$ac_res" >&6; }
10209 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
10210 cat >>confdefs.h <<_ACEOF
10211#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10212_ACEOF
10213
10214 eval ac_cv_have_decl_$gl_func=yes
10215fi
10216 done
10217
10218
10219# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10220# for constant arguments. Useless!
10221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10222$as_echo_n "checking for working alloca.h... " >&6; }
10223if ${ac_cv_working_alloca_h+:} false; then :
10224 $as_echo_n "(cached) " >&6
10225else
10226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10227/* end confdefs.h. */
10228#include <alloca.h>
10229int
10230main ()
10231{
10232char *p = (char *) alloca (2 * sizeof (int));
10233 if (p) return 0;
10234 ;
10235 return 0;
10236}
10237_ACEOF
10238if ac_fn_c_try_link "$LINENO"; then :
10239 ac_cv_working_alloca_h=yes
10240else
10241 ac_cv_working_alloca_h=no
10242fi
10243rm -f core conftest.err conftest.$ac_objext \
10244 conftest$ac_exeext conftest.$ac_ext
10245fi
10246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10247$as_echo "$ac_cv_working_alloca_h" >&6; }
10248if test $ac_cv_working_alloca_h = yes; then
10249
10250$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10251
10252fi
10253
10254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10255$as_echo_n "checking for alloca... " >&6; }
10256if ${ac_cv_func_alloca_works+:} false; then :
10257 $as_echo_n "(cached) " >&6
10258else
10259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10260/* end confdefs.h. */
10261#ifdef __GNUC__
10262# define alloca __builtin_alloca
10263#else
10264# ifdef _MSC_VER
10265# include <malloc.h>
10266# define alloca _alloca
10267# else
10268# ifdef HAVE_ALLOCA_H
10269# include <alloca.h>
10270# else
10271# ifdef _AIX
10272 #pragma alloca
10273# else
10274# ifndef alloca /* predefined by HP cc +Olibcalls */
10275void *alloca (size_t);
10276# endif
10277# endif
10278# endif
10279# endif
10280#endif
10281
10282int
10283main ()
10284{
10285char *p = (char *) alloca (1);
10286 if (p) return 0;
10287 ;
10288 return 0;
10289}
10290_ACEOF
10291if ac_fn_c_try_link "$LINENO"; then :
10292 ac_cv_func_alloca_works=yes
10293else
10294 ac_cv_func_alloca_works=no
10295fi
10296rm -f core conftest.err conftest.$ac_objext \
10297 conftest$ac_exeext conftest.$ac_ext
10298fi
10299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10300$as_echo "$ac_cv_func_alloca_works" >&6; }
10301
10302if test $ac_cv_func_alloca_works = yes; then
10303
10304$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10305
10306else
10307 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10308# that cause trouble. Some versions do not even contain alloca or
10309# contain a buggy version. If you still want to use their alloca,
10310# use ar to extract alloca.o from them instead of compiling alloca.c.
10311
10312
10313
10314
10315
10316ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10317
10318$as_echo "#define C_ALLOCA 1" >>confdefs.h
10319
10320
10321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10322$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10323if ${ac_cv_os_cray+:} false; then :
10324 $as_echo_n "(cached) " >&6
10325else
10326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10327/* end confdefs.h. */
10328#if defined CRAY && ! defined CRAY2
10329webecray
10330#else
10331wenotbecray
10332#endif
10333
10334_ACEOF
10335if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10336 $EGREP "webecray" >/dev/null 2>&1; then :
10337 ac_cv_os_cray=yes
10338else
10339 ac_cv_os_cray=no
10340fi
10341rm -f conftest*
10342
10343fi
10344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10345$as_echo "$ac_cv_os_cray" >&6; }
10346if test $ac_cv_os_cray = yes; then
10347 for ac_func in _getb67 GETB67 getb67; do
10348 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10349ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10350if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10351
10352cat >>confdefs.h <<_ACEOF
10353#define CRAY_STACKSEG_END $ac_func
10354_ACEOF
10355
10356 break
10357fi
10358
10359 done
10360fi
10361
10362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10363$as_echo_n "checking stack direction for C alloca... " >&6; }
10364if ${ac_cv_c_stack_direction+:} false; then :
10365 $as_echo_n "(cached) " >&6
10366else
10367 if test "$cross_compiling" = yes; then :
10368 ac_cv_c_stack_direction=0
10369else
10370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10371/* end confdefs.h. */
10372$ac_includes_default
10373int
10374find_stack_direction (int *addr, int depth)
10375{
10376 int dir, dummy = 0;
10377 if (! addr)
10378 addr = &dummy;
10379 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
10380 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
10381 return dir + dummy;
10382}
10383
10384int
10385main (int argc, char **argv)
10386{
10387 return find_stack_direction (0, argc + !argv + 20) < 0;
10388}
10389_ACEOF
10390if ac_fn_c_try_run "$LINENO"; then :
10391 ac_cv_c_stack_direction=1
10392else
10393 ac_cv_c_stack_direction=-1
10394fi
10395rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10396 conftest.$ac_objext conftest.beam conftest.$ac_ext
10397fi
10398
10399fi
10400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10401$as_echo "$ac_cv_c_stack_direction" >&6; }
10402cat >>confdefs.h <<_ACEOF
10403#define STACK_DIRECTION $ac_cv_c_stack_direction
10404_ACEOF
10405
10406
10407fi
10408
10409
10410 GNULIB_INET_NTOP=0;
10411 GNULIB_INET_PTON=0;
10412 HAVE_DECL_INET_NTOP=1;
10413 HAVE_DECL_INET_PTON=1;
10414 REPLACE_INET_NTOP=0;
10415 REPLACE_INET_PTON=0;
10416
10417
10418
10419
10420
10421
10422
10423 if test $ac_cv_header_features_h = yes; then
10424 HAVE_FEATURES_H=1
10425 else
10426 HAVE_FEATURES_H=0
10427 fi
10428
10429
10430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10431$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
10432if ${ac_cv_c_restrict+:} false; then :
10433 $as_echo_n "(cached) " >&6
10434else
10435 ac_cv_c_restrict=no
10436 # The order here caters to the fact that C++ does not require restrict.
10437 for ac_kw in __restrict __restrict__ _Restrict restrict; do
10438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10439/* end confdefs.h. */
10440typedef int * int_ptr;
10441 int foo (int_ptr $ac_kw ip) {
10442 return ip[0];
10443 }
10444int
10445main ()
10446{
10447int s[1];
10448 int * $ac_kw t = s;
10449 t[0] = 0;
10450 return foo(t)
10451 ;
10452 return 0;
10453}
10454_ACEOF
10455if ac_fn_c_try_compile "$LINENO"; then :
10456 ac_cv_c_restrict=$ac_kw
10457fi
10458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10459 test "$ac_cv_c_restrict" != no && break
10460 done
10461
10462fi
10463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
10464$as_echo "$ac_cv_c_restrict" >&6; }
10465
10466 case $ac_cv_c_restrict in
10467 restrict) ;;
10468 no) $as_echo "#define restrict /**/" >>confdefs.h
10469 ;;
10470 *) cat >>confdefs.h <<_ACEOF
10471#define restrict $ac_cv_c_restrict
10472_ACEOF
10473 ;;
10474 esac
10475
10476
10477 GNULIB_BTOWC=0;
10478 GNULIB_WCTOB=0;
10479 GNULIB_MBSINIT=0;
10480 GNULIB_MBRTOWC=0;
10481 GNULIB_MBRLEN=0;
10482 GNULIB_MBSRTOWCS=0;
10483 GNULIB_MBSNRTOWCS=0;
10484 GNULIB_WCRTOMB=0;
10485 GNULIB_WCSRTOMBS=0;
10486 GNULIB_WCSNRTOMBS=0;
10487 GNULIB_WCWIDTH=0;
10488 GNULIB_WMEMCHR=0;
10489 GNULIB_WMEMCMP=0;
10490 GNULIB_WMEMCPY=0;
10491 GNULIB_WMEMMOVE=0;
10492 GNULIB_WMEMSET=0;
10493 GNULIB_WCSLEN=0;
10494 GNULIB_WCSNLEN=0;
10495 GNULIB_WCSCPY=0;
10496 GNULIB_WCPCPY=0;
10497 GNULIB_WCSNCPY=0;
10498 GNULIB_WCPNCPY=0;
10499 GNULIB_WCSCAT=0;
10500 GNULIB_WCSNCAT=0;
10501 GNULIB_WCSCMP=0;
10502 GNULIB_WCSNCMP=0;
10503 GNULIB_WCSCASECMP=0;
10504 GNULIB_WCSNCASECMP=0;
10505 GNULIB_WCSCOLL=0;
10506 GNULIB_WCSXFRM=0;
10507 GNULIB_WCSDUP=0;
10508 GNULIB_WCSCHR=0;
10509 GNULIB_WCSRCHR=0;
10510 GNULIB_WCSCSPN=0;
10511 GNULIB_WCSSPN=0;
10512 GNULIB_WCSPBRK=0;
10513 GNULIB_WCSSTR=0;
10514 GNULIB_WCSTOK=0;
10515 GNULIB_WCSWIDTH=0;
10516 HAVE_BTOWC=1;
10517 HAVE_MBSINIT=1;
10518 HAVE_MBRTOWC=1;
10519 HAVE_MBRLEN=1;
10520 HAVE_MBSRTOWCS=1;
10521 HAVE_MBSNRTOWCS=1;
10522 HAVE_WCRTOMB=1;
10523 HAVE_WCSRTOMBS=1;
10524 HAVE_WCSNRTOMBS=1;
10525 HAVE_WMEMCHR=1;
10526 HAVE_WMEMCMP=1;
10527 HAVE_WMEMCPY=1;
10528 HAVE_WMEMMOVE=1;
10529 HAVE_WMEMSET=1;
10530 HAVE_WCSLEN=1;
10531 HAVE_WCSNLEN=1;
10532 HAVE_WCSCPY=1;
10533 HAVE_WCPCPY=1;
10534 HAVE_WCSNCPY=1;
10535 HAVE_WCPNCPY=1;
10536 HAVE_WCSCAT=1;
10537 HAVE_WCSNCAT=1;
10538 HAVE_WCSCMP=1;
10539 HAVE_WCSNCMP=1;
10540 HAVE_WCSCASECMP=1;
10541 HAVE_WCSNCASECMP=1;
10542 HAVE_WCSCOLL=1;
10543 HAVE_WCSXFRM=1;
10544 HAVE_WCSDUP=1;
10545 HAVE_WCSCHR=1;
10546 HAVE_WCSRCHR=1;
10547 HAVE_WCSCSPN=1;
10548 HAVE_WCSSPN=1;
10549 HAVE_WCSPBRK=1;
10550 HAVE_WCSSTR=1;
10551 HAVE_WCSTOK=1;
10552 HAVE_WCSWIDTH=1;
10553 HAVE_DECL_WCTOB=1;
10554 HAVE_DECL_WCWIDTH=1;
10555 REPLACE_MBSTATE_T=0;
10556 REPLACE_BTOWC=0;
10557 REPLACE_WCTOB=0;
10558 REPLACE_MBSINIT=0;
10559 REPLACE_MBRTOWC=0;
10560 REPLACE_MBRLEN=0;
10561 REPLACE_MBSRTOWCS=0;
10562 REPLACE_MBSNRTOWCS=0;
10563 REPLACE_WCRTOMB=0;
10564 REPLACE_WCSRTOMBS=0;
10565 REPLACE_WCSNRTOMBS=0;
10566 REPLACE_WCWIDTH=0;
10567 REPLACE_WCSWIDTH=0;
10568
10569
10570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
10571$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
10572if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
10573 $as_echo_n "(cached) " >&6
10574else
10575 gl_cv_header_wchar_h_correct_inline=yes
10576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10577/* end confdefs.h. */
10578
10579 #define wcstod renamed_wcstod
10580/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10581 <wchar.h>.
10582 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10583 included before <wchar.h>. */
10584#include <stddef.h>
10585#include <stdio.h>
10586#include <time.h>
10587#include <wchar.h>
10588extern int zero (void);
10589int main () { return zero(); }
10590
10591_ACEOF
10592 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10593 (eval $ac_compile) 2>&5
10594 ac_status=$?
10595 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10596 test $ac_status = 0; }; then
10597 mv conftest.$ac_objext conftest1.$ac_objext
10598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10599/* end confdefs.h. */
10600
10601 #define wcstod renamed_wcstod
10602/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10603 <wchar.h>.
10604 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10605 included before <wchar.h>. */
10606#include <stddef.h>
10607#include <stdio.h>
10608#include <time.h>
10609#include <wchar.h>
10610int zero (void) { return 0; }
10611
10612_ACEOF
10613 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
10614 (eval $ac_compile) 2>&5
10615 ac_status=$?
10616 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10617 test $ac_status = 0; }; then
10618 mv conftest.$ac_objext conftest2.$ac_objext
10619 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
10620 :
10621 else
10622 gl_cv_header_wchar_h_correct_inline=no
10623 fi
10624 fi
10625 fi
10626 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
10627
10628fi
10629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
10630$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
10631 if test $gl_cv_header_wchar_h_correct_inline = no; then
10632 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
10633This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
10634C99 mode. You have four options:
10635 - Add the flag -fgnu89-inline to CC and reconfigure, or
10636 - Fix your include files, using parts of
10637 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
10638 - Use a gcc version older than 4.3, or
10639 - Don't use the flags -std=c99 or -std=gnu99.
10640Configuration aborted." "$LINENO" 5
10641 fi
10642
10643
10644
10645
10646 for ac_func in $ac_func_list
10647do :
10648 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10649ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10650if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10651 cat >>confdefs.h <<_ACEOF
10652#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10653_ACEOF
10654
10655fi
10656done
10657
10658
10659
10660
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
10662$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
10663if ${am_cv_langinfo_codeset+:} false; then :
10664 $as_echo_n "(cached) " >&6
10665else
10666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10667/* end confdefs.h. */
10668#include <langinfo.h>
10669int
10670main ()
10671{
10672char* cs = nl_langinfo(CODESET); return !cs;
10673 ;
10674 return 0;
10675}
10676_ACEOF
10677if ac_fn_c_try_link "$LINENO"; then :
10678 am_cv_langinfo_codeset=yes
10679else
10680 am_cv_langinfo_codeset=no
10681fi
10682rm -f core conftest.err conftest.$ac_objext \
10683 conftest$ac_exeext conftest.$ac_ext
10684
10685fi
10686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
10687$as_echo "$am_cv_langinfo_codeset" >&6; }
10688 if test $am_cv_langinfo_codeset = yes; then
10689
10690$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
10691
10692 fi
10693
10694
10695
10696
10697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
10698$as_echo_n "checking for a traditional french locale... " >&6; }
10699if ${gt_cv_locale_fr+:} false; then :
10700 $as_echo_n "(cached) " >&6
10701else
10702
10703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10704/* end confdefs.h. */
10705
10706#include <locale.h>
10707#include <time.h>
10708#if HAVE_LANGINFO_CODESET
10709# include <langinfo.h>
10710#endif
10711#include <stdlib.h>
10712#include <string.h>
10713struct tm t;
10714char buf[16];
10715int main () {
10716 /* Check whether the given locale name is recognized by the system. */
10717#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
10718 /* On native Windows, setlocale(category, "") looks at the system settings,
10719 not at the environment variables. Also, when an encoding suffix such
10720 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
10721 category of the locale to "C". */
10722 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
10723 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
10724 return 1;
10725#else
10726 if (setlocale (LC_ALL, "") == NULL) return 1;
10727#endif
10728 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
10729 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
10730 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
10731 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
10732 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
10733 some unit tests fail.
10734 On MirBSD 10, when an unsupported locale is specified, setlocale()
10735 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
10736#if HAVE_LANGINFO_CODESET
10737 {
10738 const char *cs = nl_langinfo (CODESET);
10739 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
10740 || strcmp (cs, "UTF-8") == 0)
10741 return 1;
10742 }
10743#endif
10744#ifdef __CYGWIN__
10745 /* On Cygwin, avoid locale names without encoding suffix, because the
10746 locale_charset() function relies on the encoding suffix. Note that
10747 LC_ALL is set on the command line. */
10748 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
10749#endif
10750 /* Check whether in the abbreviation of the second month, the second
10751 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
10752 one byte long. This excludes the UTF-8 encoding. */
10753 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
10754 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
10755#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
10756 /* Check whether the decimal separator is a comma.
10757 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
10758 are nl_langinfo(RADIXCHAR) are both ".". */
10759 if (localeconv () ->decimal_point[0] != ',') return 1;
10760#endif
10761 return 0;
10762}
10763
10764_ACEOF
10765 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10766 (eval $ac_link) 2>&5
10767 ac_status=$?
10768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10769 test $ac_status = 0; } && test -s conftest$ac_exeext; then
10770 case "$host_os" in
10771 # Handle native Windows specially, because there setlocale() interprets
10772 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
10773 # "fr" or "fra" as "French" or "French_France.1252",
10774 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
10775 # "ja" as "Japanese" or "Japanese_Japan.932",
10776 # and similar.
10777 mingw*)
10778 # Test for the native Windows locale name.
10779 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10780 gt_cv_locale_fr=French_France.1252
10781 else
10782 # None found.
10783 gt_cv_locale_fr=none
10784 fi
10785 ;;
10786 *)
10787 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
10788 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
10789 # configure script would override the LC_ALL setting. Likewise for
10790 # LC_CTYPE, which is also set at the beginning of the configure script.
10791 # Test for the usual locale name.
10792 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10793 gt_cv_locale_fr=fr_FR
10794 else
10795 # Test for the locale name with explicit encoding suffix.
10796 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10797 gt_cv_locale_fr=fr_FR.ISO-8859-1
10798 else
10799 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
10800 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10801 gt_cv_locale_fr=fr_FR.ISO8859-1
10802 else
10803 # Test for the HP-UX locale name.
10804 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10805 gt_cv_locale_fr=fr_FR.iso88591
10806 else
10807 # Test for the Solaris 7 locale name.
10808 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
10809 gt_cv_locale_fr=fr
10810 else
10811 # None found.
10812 gt_cv_locale_fr=none
10813 fi
10814 fi
10815 fi
10816 fi
10817 fi
10818 ;;
10819 esac
10820 fi
10821 rm -fr conftest*
10822
10823fi
10824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
10825$as_echo "$gt_cv_locale_fr" >&6; }
10826 LOCALE_FR=$gt_cv_locale_fr
10827
10828
10829
10830
10831
10832
10833 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
10834 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
10835
10836$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
10837
10838 else
10839 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
10840 fi
10841
10842
10843
10844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10845$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10846if ${ac_cv_c_bigendian+:} false; then :
10847 $as_echo_n "(cached) " >&6
10848else
10849 ac_cv_c_bigendian=unknown
10850 # See if we're dealing with a universal compiler.
10851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10852/* end confdefs.h. */
10853#ifndef __APPLE_CC__
10854 not a universal capable compiler
10855 #endif
10856 typedef int dummy;
10857
10858_ACEOF
10859if ac_fn_c_try_compile "$LINENO"; then :
10860
10861 # Check for potential -arch flags. It is not universal unless
10862 # there are at least two -arch flags with different values.
10863 ac_arch=
10864 ac_prev=
10865 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10866 if test -n "$ac_prev"; then
10867 case $ac_word in
10868 i?86 | x86_64 | ppc | ppc64)
10869 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10870 ac_arch=$ac_word
10871 else
10872 ac_cv_c_bigendian=universal
10873 break
10874 fi
10875 ;;
10876 esac
10877 ac_prev=
10878 elif test "x$ac_word" = "x-arch"; then
10879 ac_prev=arch
10880 fi
10881 done
10882fi
10883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10884 if test $ac_cv_c_bigendian = unknown; then
10885 # See if sys/param.h defines the BYTE_ORDER macro.
10886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10887/* end confdefs.h. */
10888#include <sys/types.h>
10889 #include <sys/param.h>
10890
10891int
10892main ()
10893{
10894#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10895 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10896 && LITTLE_ENDIAN)
10897 bogus endian macros
10898 #endif
10899
10900 ;
10901 return 0;
10902}
10903_ACEOF
10904if ac_fn_c_try_compile "$LINENO"; then :
10905 # It does; now see whether it defined to BIG_ENDIAN or not.
10906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10907/* end confdefs.h. */
10908#include <sys/types.h>
10909 #include <sys/param.h>
10910
10911int
10912main ()
10913{
10914#if BYTE_ORDER != BIG_ENDIAN
10915 not big endian
10916 #endif
10917
10918 ;
10919 return 0;
10920}
10921_ACEOF
10922if ac_fn_c_try_compile "$LINENO"; then :
10923 ac_cv_c_bigendian=yes
10924else
10925 ac_cv_c_bigendian=no
10926fi
10927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10928fi
10929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10930 fi
10931 if test $ac_cv_c_bigendian = unknown; then
10932 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10934/* end confdefs.h. */
10935#include <limits.h>
10936
10937int
10938main ()
10939{
10940#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
10941 bogus endian macros
10942 #endif
10943
10944 ;
10945 return 0;
10946}
10947_ACEOF
10948if ac_fn_c_try_compile "$LINENO"; then :
10949 # It does; now see whether it defined to _BIG_ENDIAN or not.
10950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10951/* end confdefs.h. */
10952#include <limits.h>
10953
10954int
10955main ()
10956{
10957#ifndef _BIG_ENDIAN
10958 not big endian
10959 #endif
10960
10961 ;
10962 return 0;
10963}
10964_ACEOF
10965if ac_fn_c_try_compile "$LINENO"; then :
10966 ac_cv_c_bigendian=yes
10967else
10968 ac_cv_c_bigendian=no
10969fi
10970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10971fi
10972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10973 fi
10974 if test $ac_cv_c_bigendian = unknown; then
10975 # Compile a test program.
10976 if test "$cross_compiling" = yes; then :
10977 # Try to guess by grepping values from an object file.
10978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10979/* end confdefs.h. */
10980short int ascii_mm[] =
10981 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
10982 short int ascii_ii[] =
10983 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
10984 int use_ascii (int i) {
10985 return ascii_mm[i] + ascii_ii[i];
10986 }
10987 short int ebcdic_ii[] =
10988 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
10989 short int ebcdic_mm[] =
10990 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
10991 int use_ebcdic (int i) {
10992 return ebcdic_mm[i] + ebcdic_ii[i];
10993 }
10994 extern int foo;
10995
10996int
10997main ()
10998{
10999return use_ascii (foo) == use_ebcdic (foo);
11000 ;
11001 return 0;
11002}
11003_ACEOF
11004if ac_fn_c_try_compile "$LINENO"; then :
11005 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11006 ac_cv_c_bigendian=yes
11007 fi
11008 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11009 if test "$ac_cv_c_bigendian" = unknown; then
11010 ac_cv_c_bigendian=no
11011 else
11012 # finding both strings is unlikely to happen, but who knows?
11013 ac_cv_c_bigendian=unknown
11014 fi
11015 fi
11016fi
11017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11018else
11019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11020/* end confdefs.h. */
11021$ac_includes_default
11022int
11023main ()
11024{
11025
11026 /* Are we little or big endian? From Harbison&Steele. */
11027 union
11028 {
11029 long int l;
11030 char c[sizeof (long int)];
11031 } u;
11032 u.l = 1;
11033 return u.c[sizeof (long int) - 1] == 1;
11034
11035 ;
11036 return 0;
11037}
11038_ACEOF
11039if ac_fn_c_try_run "$LINENO"; then :
11040 ac_cv_c_bigendian=no
11041else
11042 ac_cv_c_bigendian=yes
11043fi
11044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11045 conftest.$ac_objext conftest.beam conftest.$ac_ext
11046fi
11047
11048 fi
11049fi
11050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11051$as_echo "$ac_cv_c_bigendian" >&6; }
11052 case $ac_cv_c_bigendian in #(
11053 yes)
11054 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11055;; #(
11056 no)
11057 ;; #(
11058 universal)
11059
11060$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11061
11062 ;; #(
11063 *)
11064 as_fn_error $? "unknown endianness
11065 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11066 esac
11067
11068
11069
11070
11071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
11072$as_echo_n "checking whether // is distinct from /... " >&6; }
11073if ${gl_cv_double_slash_root+:} false; then :
11074 $as_echo_n "(cached) " >&6
11075else
11076 if test x"$cross_compiling" = xyes ; then
11077 # When cross-compiling, there is no way to tell whether // is special
11078 # short of a list of hosts. However, the only known hosts to date
11079 # that have a distinct // are Apollo DomainOS (too old to port to),
11080 # Cygwin, and z/OS. If anyone knows of another system for which // has
11081 # special semantics and is distinct from /, please report it to
11082 # <bug-gnulib@gnu.org>.
11083 case $host in
11084 *-cygwin | i370-ibm-openedition)
11085 gl_cv_double_slash_root=yes ;;
11086 *)
11087 # Be optimistic and assume that / and // are the same when we
11088 # don't know.
11089 gl_cv_double_slash_root='unknown, assuming no' ;;
11090 esac
11091 else
11092 set x `ls -di / // 2>/dev/null`
11093 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
11094 gl_cv_double_slash_root=no
11095 else
11096 gl_cv_double_slash_root=yes
11097 fi
11098 fi
11099fi
11100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
11101$as_echo "$gl_cv_double_slash_root" >&6; }
11102 if test "$gl_cv_double_slash_root" = yes; then
11103
11104$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
11105
11106 fi
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
11118$as_echo_n "checking if environ is properly declared... " >&6; }
11119 if ${gt_cv_var_environ_declaration+:} false; then :
11120 $as_echo_n "(cached) " >&6
11121else
11122
11123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11124/* end confdefs.h. */
11125#if HAVE_UNISTD_H
11126 #include <unistd.h>
11127 #endif
11128 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
11129 #include <stdlib.h>
11130
11131 extern struct { int foo; } environ;
11132int
11133main ()
11134{
11135environ.foo = 1;
11136 ;
11137 return 0;
11138}
11139_ACEOF
11140if ac_fn_c_try_compile "$LINENO"; then :
11141 gt_cv_var_environ_declaration=no
11142else
11143 gt_cv_var_environ_declaration=yes
11144fi
11145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11146fi
11147
11148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
11149$as_echo "$gt_cv_var_environ_declaration" >&6; }
11150 if test $gt_cv_var_environ_declaration = yes; then
11151
11152$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
11153
11154 fi
11155
11156
11157 if test $gt_cv_var_environ_declaration != yes; then
11158 HAVE_DECL_ENVIRON=0
11159 fi
11160
11161
11162
11163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
11164$as_echo_n "checking for complete errno.h... " >&6; }
11165if ${gl_cv_header_errno_h_complete+:} false; then :
11166 $as_echo_n "(cached) " >&6
11167else
11168
11169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11170/* end confdefs.h. */
11171
11172#include <errno.h>
11173#if !defined ETXTBSY
11174booboo
11175#endif
11176#if !defined ENOMSG
11177booboo
11178#endif
11179#if !defined EIDRM
11180booboo
11181#endif
11182#if !defined ENOLINK
11183booboo
11184#endif
11185#if !defined EPROTO
11186booboo
11187#endif
11188#if !defined EMULTIHOP
11189booboo
11190#endif
11191#if !defined EBADMSG
11192booboo
11193#endif
11194#if !defined EOVERFLOW
11195booboo
11196#endif
11197#if !defined ENOTSUP
11198booboo
11199#endif
11200#if !defined ENETRESET
11201booboo
11202#endif
11203#if !defined ECONNABORTED
11204booboo
11205#endif
11206#if !defined ESTALE
11207booboo
11208#endif
11209#if !defined EDQUOT
11210booboo
11211#endif
11212#if !defined ECANCELED
11213booboo
11214#endif
11215#if !defined EOWNERDEAD
11216booboo
11217#endif
11218#if !defined ENOTRECOVERABLE
11219booboo
11220#endif
11221
11222_ACEOF
11223if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11224 $EGREP "booboo" >/dev/null 2>&1; then :
11225 gl_cv_header_errno_h_complete=no
11226else
11227 gl_cv_header_errno_h_complete=yes
11228fi
11229rm -f conftest*
11230
11231
11232fi
11233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
11234$as_echo "$gl_cv_header_errno_h_complete" >&6; }
11235 if test $gl_cv_header_errno_h_complete = yes; then
11236 ERRNO_H=''
11237 else
11238
11239
11240
11241
11242
11243
11244
11245
11246 if test $gl_cv_have_include_next = yes; then
11247 gl_cv_next_errno_h='<'errno.h'>'
11248 else
11249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
11250$as_echo_n "checking absolute name of <errno.h>... " >&6; }
11251if ${gl_cv_next_errno_h+:} false; then :
11252 $as_echo_n "(cached) " >&6
11253else
11254
11255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11256/* end confdefs.h. */
11257#include <errno.h>
11258
11259_ACEOF
11260 case "$host_os" in
11261 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11262 *) gl_absname_cpp="$ac_cpp" ;;
11263 esac
11264
11265 case "$host_os" in
11266 mingw*)
11267 gl_dirsep_regex='[/\\]'
11268 ;;
11269 *)
11270 gl_dirsep_regex='\/'
11271 ;;
11272 esac
11273 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11274
11275 gl_header_literal_regex=`echo 'errno.h' \
11276 | sed -e "$gl_make_literal_regex_sed"`
11277 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11278 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11279 s|^/[^/]|//&|
11280 p
11281 q
11282 }'
11283 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11284 sed -n "$gl_absolute_header_sed"`'"'
11285
11286
11287fi
11288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
11289$as_echo "$gl_cv_next_errno_h" >&6; }
11290 fi
11291 NEXT_ERRNO_H=$gl_cv_next_errno_h
11292
11293 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11294 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11295 gl_next_as_first_directive='<'errno.h'>'
11296 else
11297 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11298 gl_next_as_first_directive=$gl_cv_next_errno_h
11299 fi
11300 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
11301
11302
11303
11304
11305 ERRNO_H='errno.h'
11306 fi
11307
11308 if test -n "$ERRNO_H"; then
11309 GL_GENERATE_ERRNO_H_TRUE=
11310 GL_GENERATE_ERRNO_H_FALSE='#'
11311else
11312 GL_GENERATE_ERRNO_H_TRUE='#'
11313 GL_GENERATE_ERRNO_H_FALSE=
11314fi
11315
11316
11317 if test -n "$ERRNO_H"; then
11318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
11319$as_echo_n "checking for EMULTIHOP value... " >&6; }
11320if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
11321 $as_echo_n "(cached) " >&6
11322else
11323
11324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11325/* end confdefs.h. */
11326
11327#include <errno.h>
11328#ifdef EMULTIHOP
11329yes
11330#endif
11331
11332_ACEOF
11333if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11334 $EGREP "yes" >/dev/null 2>&1; then :
11335 gl_cv_header_errno_h_EMULTIHOP=yes
11336else
11337 gl_cv_header_errno_h_EMULTIHOP=no
11338fi
11339rm -f conftest*
11340
11341 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
11342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11343/* end confdefs.h. */
11344
11345#define _XOPEN_SOURCE_EXTENDED 1
11346#include <errno.h>
11347#ifdef EMULTIHOP
11348yes
11349#endif
11350
11351_ACEOF
11352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11353 $EGREP "yes" >/dev/null 2>&1; then :
11354 gl_cv_header_errno_h_EMULTIHOP=hidden
11355fi
11356rm -f conftest*
11357
11358 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
11359 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
11360#define _XOPEN_SOURCE_EXTENDED 1
11361#include <errno.h>
11362/* The following two lines are a workaround against an autoconf-2.52 bug. */
11363#include <stdio.h>
11364#include <stdlib.h>
11365"; then :
11366
11367fi
11368
11369 fi
11370 fi
11371
11372fi
11373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
11374$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
11375 case $gl_cv_header_errno_h_EMULTIHOP in
11376 yes | no)
11377 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
11378 ;;
11379 *)
11380 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
11381 ;;
11382 esac
11383
11384
11385 fi
11386
11387
11388 if test -n "$ERRNO_H"; then
11389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
11390$as_echo_n "checking for ENOLINK value... " >&6; }
11391if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
11392 $as_echo_n "(cached) " >&6
11393else
11394
11395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11396/* end confdefs.h. */
11397
11398#include <errno.h>
11399#ifdef ENOLINK
11400yes
11401#endif
11402
11403_ACEOF
11404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11405 $EGREP "yes" >/dev/null 2>&1; then :
11406 gl_cv_header_errno_h_ENOLINK=yes
11407else
11408 gl_cv_header_errno_h_ENOLINK=no
11409fi
11410rm -f conftest*
11411
11412 if test $gl_cv_header_errno_h_ENOLINK = no; then
11413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11414/* end confdefs.h. */
11415
11416#define _XOPEN_SOURCE_EXTENDED 1
11417#include <errno.h>
11418#ifdef ENOLINK
11419yes
11420#endif
11421
11422_ACEOF
11423if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11424 $EGREP "yes" >/dev/null 2>&1; then :
11425 gl_cv_header_errno_h_ENOLINK=hidden
11426fi
11427rm -f conftest*
11428
11429 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
11430 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
11431#define _XOPEN_SOURCE_EXTENDED 1
11432#include <errno.h>
11433/* The following two lines are a workaround against an autoconf-2.52 bug. */
11434#include <stdio.h>
11435#include <stdlib.h>
11436"; then :
11437
11438fi
11439
11440 fi
11441 fi
11442
11443fi
11444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
11445$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
11446 case $gl_cv_header_errno_h_ENOLINK in
11447 yes | no)
11448 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
11449 ;;
11450 *)
11451 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
11452 ;;
11453 esac
11454
11455
11456 fi
11457
11458
11459 if test -n "$ERRNO_H"; then
11460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
11461$as_echo_n "checking for EOVERFLOW value... " >&6; }
11462if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
11463 $as_echo_n "(cached) " >&6
11464else
11465
11466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11467/* end confdefs.h. */
11468
11469#include <errno.h>
11470#ifdef EOVERFLOW
11471yes
11472#endif
11473
11474_ACEOF
11475if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11476 $EGREP "yes" >/dev/null 2>&1; then :
11477 gl_cv_header_errno_h_EOVERFLOW=yes
11478else
11479 gl_cv_header_errno_h_EOVERFLOW=no
11480fi
11481rm -f conftest*
11482
11483 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
11484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11485/* end confdefs.h. */
11486
11487#define _XOPEN_SOURCE_EXTENDED 1
11488#include <errno.h>
11489#ifdef EOVERFLOW
11490yes
11491#endif
11492
11493_ACEOF
11494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11495 $EGREP "yes" >/dev/null 2>&1; then :
11496 gl_cv_header_errno_h_EOVERFLOW=hidden
11497fi
11498rm -f conftest*
11499
11500 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
11501 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
11502#define _XOPEN_SOURCE_EXTENDED 1
11503#include <errno.h>
11504/* The following two lines are a workaround against an autoconf-2.52 bug. */
11505#include <stdio.h>
11506#include <stdlib.h>
11507"; then :
11508
11509fi
11510
11511 fi
11512 fi
11513
11514fi
11515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
11516$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
11517 case $gl_cv_header_errno_h_EOVERFLOW in
11518 yes | no)
11519 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
11520 ;;
11521 *)
11522 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
11523 ;;
11524 esac
11525
11526
11527 fi
11528
11529
11530ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
11531if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
11532 ac_have_decl=1
11533else
11534 ac_have_decl=0
11535fi
11536
11537cat >>confdefs.h <<_ACEOF
11538#define HAVE_DECL_STRERROR_R $ac_have_decl
11539_ACEOF
11540
11541for ac_func in strerror_r
11542do :
11543 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11544if test "x$ac_cv_func_strerror_r" = xyes; then :
11545 cat >>confdefs.h <<_ACEOF
11546#define HAVE_STRERROR_R 1
11547_ACEOF
11548
11549fi
11550done
11551
11552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
11553$as_echo_n "checking whether strerror_r returns char *... " >&6; }
11554if ${ac_cv_func_strerror_r_char_p+:} false; then :
11555 $as_echo_n "(cached) " >&6
11556else
11557
11558 ac_cv_func_strerror_r_char_p=no
11559 if test $ac_cv_have_decl_strerror_r = yes; then
11560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11561/* end confdefs.h. */
11562$ac_includes_default
11563int
11564main ()
11565{
11566
11567 char buf[100];
11568 char x = *strerror_r (0, buf, sizeof buf);
11569 char *p = strerror_r (0, buf, sizeof buf);
11570 return !p || x;
11571
11572 ;
11573 return 0;
11574}
11575_ACEOF
11576if ac_fn_c_try_compile "$LINENO"; then :
11577 ac_cv_func_strerror_r_char_p=yes
11578fi
11579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11580 else
11581 # strerror_r is not declared. Choose between
11582 # systems that have relatively inaccessible declarations for the
11583 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
11584 # former has a strerror_r that returns char*, while the latter
11585 # has a strerror_r that returns `int'.
11586 # This test should segfault on the DEC system.
11587 if test "$cross_compiling" = yes; then :
11588 :
11589else
11590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11591/* end confdefs.h. */
11592$ac_includes_default
11593 extern char *strerror_r ();
11594int
11595main ()
11596{
11597char buf[100];
11598 char x = *strerror_r (0, buf, sizeof buf);
11599 return ! isalpha (x);
11600 ;
11601 return 0;
11602}
11603_ACEOF
11604if ac_fn_c_try_run "$LINENO"; then :
11605 ac_cv_func_strerror_r_char_p=yes
11606fi
11607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11608 conftest.$ac_objext conftest.beam conftest.$ac_ext
11609fi
11610
11611 fi
11612
11613fi
11614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
11615$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
11616if test $ac_cv_func_strerror_r_char_p = yes; then
11617
11618$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
11619
11620fi
11621
11622
11623 XGETTEXT_EXTRA_OPTIONS=
11624
11625
11626
11627
11628
11629
11630 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
11631"
11632if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
11633
11634cat >>confdefs.h <<_ACEOF
11635#define HAVE_SIG_ATOMIC_T 1
11636_ACEOF
11637
11638
11639else
11640
11641$as_echo "#define sig_atomic_t int" >>confdefs.h
11642
11643fi
11644
11645
11646
11647 GNULIB_FCNTL=0;
11648 GNULIB_NONBLOCKING=0;
11649 GNULIB_OPEN=0;
11650 GNULIB_OPENAT=0;
11651 HAVE_FCNTL=1;
11652 HAVE_OPENAT=1;
11653 REPLACE_FCNTL=0;
11654 REPLACE_OPEN=0;
11655 REPLACE_OPENAT=0;
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
11667$as_echo_n "checking for working fcntl.h... " >&6; }
11668if ${gl_cv_header_working_fcntl_h+:} false; then :
11669 $as_echo_n "(cached) " >&6
11670else
11671 if test "$cross_compiling" = yes; then :
11672 gl_cv_header_working_fcntl_h=cross-compiling
11673else
11674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11675/* end confdefs.h. */
11676#include <sys/types.h>
11677 #include <sys/stat.h>
11678 #if HAVE_UNISTD_H
11679 # include <unistd.h>
11680 #else /* on Windows with MSVC */
11681 # include <io.h>
11682 # include <stdlib.h>
11683 # defined sleep(n) _sleep ((n) * 1000)
11684 #endif
11685 #include <fcntl.h>
11686 #ifndef O_NOATIME
11687 #define O_NOATIME 0
11688 #endif
11689 #ifndef O_NOFOLLOW
11690 #define O_NOFOLLOW 0
11691 #endif
11692 static int const constants[] =
11693 {
11694 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
11695 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
11696 };
11697
11698int
11699main ()
11700{
11701
11702 int result = !constants;
11703 #if HAVE_SYMLINK
11704 {
11705 static char const sym[] = "conftest.sym";
11706 if (symlink (".", sym) != 0)
11707 result |= 2;
11708 else
11709 {
11710 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
11711 if (fd >= 0)
11712 {
11713 close (fd);
11714 result |= 4;
11715 }
11716 }
11717 unlink (sym);
11718 }
11719 #endif
11720 {
11721 static char const file[] = "confdefs.h";
11722 int fd = open (file, O_RDONLY | O_NOATIME);
11723 if (fd < 0)
11724 result |= 8;
11725 else
11726 {
11727 struct stat st0;
11728 if (fstat (fd, &st0) != 0)
11729 result |= 16;
11730 else
11731 {
11732 char c;
11733 sleep (1);
11734 if (read (fd, &c, 1) != 1)
11735 result |= 24;
11736 else
11737 {
11738 if (close (fd) != 0)
11739 result |= 32;
11740 else
11741 {
11742 struct stat st1;
11743 if (stat (file, &st1) != 0)
11744 result |= 40;
11745 else
11746 if (st0.st_atime != st1.st_atime)
11747 result |= 64;
11748 }
11749 }
11750 }
11751 }
11752 }
11753 return result;
11754 ;
11755 return 0;
11756}
11757_ACEOF
11758if ac_fn_c_try_run "$LINENO"; then :
11759 gl_cv_header_working_fcntl_h=yes
11760else
11761 case $? in #(
11762 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
11763 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
11764 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
11765 *) gl_cv_header_working_fcntl_h='no';;
11766 esac
11767fi
11768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11769 conftest.$ac_objext conftest.beam conftest.$ac_ext
11770fi
11771
11772fi
11773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
11774$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
11775
11776 case $gl_cv_header_working_fcntl_h in #(
11777 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
11778 *) ac_val=1;;
11779 esac
11780
11781cat >>confdefs.h <<_ACEOF
11782#define HAVE_WORKING_O_NOATIME $ac_val
11783_ACEOF
11784
11785
11786 case $gl_cv_header_working_fcntl_h in #(
11787 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
11788 *) ac_val=1;;
11789 esac
11790
11791cat >>confdefs.h <<_ACEOF
11792#define HAVE_WORKING_O_NOFOLLOW $ac_val
11793_ACEOF
11794
11795
11796ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
11797if test "x$ac_cv_type_mode_t" = xyes; then :
11798
11799else
11800
11801cat >>confdefs.h <<_ACEOF
11802#define mode_t int
11803_ACEOF
11804
11805fi
11806
11807
11808 GNULIB_DPRINTF=0;
11809 GNULIB_FCLOSE=0;
11810 GNULIB_FDOPEN=0;
11811 GNULIB_FFLUSH=0;
11812 GNULIB_FGETC=0;
11813 GNULIB_FGETS=0;
11814 GNULIB_FOPEN=0;
11815 GNULIB_FPRINTF=0;
11816 GNULIB_FPRINTF_POSIX=0;
11817 GNULIB_FPURGE=0;
11818 GNULIB_FPUTC=0;
11819 GNULIB_FPUTS=0;
11820 GNULIB_FREAD=0;
11821 GNULIB_FREOPEN=0;
11822 GNULIB_FSCANF=0;
11823 GNULIB_FSEEK=0;
11824 GNULIB_FSEEKO=0;
11825 GNULIB_FTELL=0;
11826 GNULIB_FTELLO=0;
11827 GNULIB_FWRITE=0;
11828 GNULIB_GETC=0;
11829 GNULIB_GETCHAR=0;
11830 GNULIB_GETDELIM=0;
11831 GNULIB_GETLINE=0;
11832 GNULIB_OBSTACK_PRINTF=0;
11833 GNULIB_OBSTACK_PRINTF_POSIX=0;
11834 GNULIB_PCLOSE=0;
11835 GNULIB_PERROR=0;
11836 GNULIB_POPEN=0;
11837 GNULIB_PRINTF=0;
11838 GNULIB_PRINTF_POSIX=0;
11839 GNULIB_PUTC=0;
11840 GNULIB_PUTCHAR=0;
11841 GNULIB_PUTS=0;
11842 GNULIB_REMOVE=0;
11843 GNULIB_RENAME=0;
11844 GNULIB_RENAMEAT=0;
11845 GNULIB_SCANF=0;
11846 GNULIB_SNPRINTF=0;
11847 GNULIB_SPRINTF_POSIX=0;
11848 GNULIB_STDIO_H_NONBLOCKING=0;
11849 GNULIB_STDIO_H_SIGPIPE=0;
11850 GNULIB_TMPFILE=0;
11851 GNULIB_VASPRINTF=0;
11852 GNULIB_VFSCANF=0;
11853 GNULIB_VSCANF=0;
11854 GNULIB_VDPRINTF=0;
11855 GNULIB_VFPRINTF=0;
11856 GNULIB_VFPRINTF_POSIX=0;
11857 GNULIB_VPRINTF=0;
11858 GNULIB_VPRINTF_POSIX=0;
11859 GNULIB_VSNPRINTF=0;
11860 GNULIB_VSPRINTF_POSIX=0;
11861 HAVE_DECL_FPURGE=1;
11862 HAVE_DECL_FSEEKO=1;
11863 HAVE_DECL_FTELLO=1;
11864 HAVE_DECL_GETDELIM=1;
11865 HAVE_DECL_GETLINE=1;
11866 HAVE_DECL_OBSTACK_PRINTF=1;
11867 HAVE_DECL_SNPRINTF=1;
11868 HAVE_DECL_VSNPRINTF=1;
11869 HAVE_DPRINTF=1;
11870 HAVE_FSEEKO=1;
11871 HAVE_FTELLO=1;
11872 HAVE_PCLOSE=1;
11873 HAVE_POPEN=1;
11874 HAVE_RENAMEAT=1;
11875 HAVE_VASPRINTF=1;
11876 HAVE_VDPRINTF=1;
11877 REPLACE_DPRINTF=0;
11878 REPLACE_FCLOSE=0;
11879 REPLACE_FDOPEN=0;
11880 REPLACE_FFLUSH=0;
11881 REPLACE_FOPEN=0;
11882 REPLACE_FPRINTF=0;
11883 REPLACE_FPURGE=0;
11884 REPLACE_FREOPEN=0;
11885 REPLACE_FSEEK=0;
11886 REPLACE_FSEEKO=0;
11887 REPLACE_FTELL=0;
11888 REPLACE_FTELLO=0;
11889 REPLACE_GETDELIM=0;
11890 REPLACE_GETLINE=0;
11891 REPLACE_OBSTACK_PRINTF=0;
11892 REPLACE_PERROR=0;
11893 REPLACE_POPEN=0;
11894 REPLACE_PRINTF=0;
11895 REPLACE_REMOVE=0;
11896 REPLACE_RENAME=0;
11897 REPLACE_RENAMEAT=0;
11898 REPLACE_SNPRINTF=0;
11899 REPLACE_SPRINTF=0;
11900 REPLACE_STDIO_READ_FUNCS=0;
11901 REPLACE_STDIO_WRITE_FUNCS=0;
11902 REPLACE_TMPFILE=0;
11903 REPLACE_VASPRINTF=0;
11904 REPLACE_VDPRINTF=0;
11905 REPLACE_VFPRINTF=0;
11906 REPLACE_VPRINTF=0;
11907 REPLACE_VSNPRINTF=0;
11908 REPLACE_VSPRINTF=0;
11909
11910
11911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
11912$as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
11913if ${gl_cv_var_stdin_large_offset+:} false; then :
11914 $as_echo_n "(cached) " >&6
11915else
11916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11917/* end confdefs.h. */
11918#include <stdio.h>
11919int
11920main ()
11921{
11922#if defined __SL64 && defined __SCLE /* cygwin */
11923 /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
11924 fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
11925 it is easier to do a version check than building a runtime test. */
11926# include <cygwin/version.h>
11927# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
11928 choke me
11929# endif
11930#endif
11931 ;
11932 return 0;
11933}
11934_ACEOF
11935if ac_fn_c_try_link "$LINENO"; then :
11936 gl_cv_var_stdin_large_offset=yes
11937else
11938 gl_cv_var_stdin_large_offset=no
11939fi
11940rm -f core conftest.err conftest.$ac_objext \
11941 conftest$ac_exeext conftest.$ac_ext
11942fi
11943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
11944$as_echo "$gl_cv_var_stdin_large_offset" >&6; }
11945
11946
11947
11948
11949
11950 case "$host_os" in
11951 mingw*)
11952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
11953$as_echo_n "checking for 64-bit off_t... " >&6; }
11954if ${gl_cv_type_off_t_64+:} false; then :
11955 $as_echo_n "(cached) " >&6
11956else
11957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11958/* end confdefs.h. */
11959#include <sys/types.h>
11960 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
11961
11962int
11963main ()
11964{
11965
11966 ;
11967 return 0;
11968}
11969_ACEOF
11970if ac_fn_c_try_compile "$LINENO"; then :
11971 gl_cv_type_off_t_64=yes
11972else
11973 gl_cv_type_off_t_64=no
11974fi
11975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11976
11977fi
11978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
11979$as_echo "$gl_cv_type_off_t_64" >&6; }
11980 if test $gl_cv_type_off_t_64 = no; then
11981 WINDOWS_64_BIT_OFF_T=1
11982 else
11983 WINDOWS_64_BIT_OFF_T=0
11984 fi
11985 WINDOWS_64_BIT_ST_SIZE=1
11986 ;;
11987 *)
11988 WINDOWS_64_BIT_OFF_T=0
11989 WINDOWS_64_BIT_ST_SIZE=0
11990 ;;
11991 esac
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009 if test $gl_cv_have_include_next = yes; then
12010 gl_cv_next_sys_types_h='<'sys/types.h'>'
12011 else
12012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
12013$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
12014if ${gl_cv_next_sys_types_h+:} false; then :
12015 $as_echo_n "(cached) " >&6
12016else
12017
12018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12019/* end confdefs.h. */
12020#include <sys/types.h>
12021
12022_ACEOF
12023 case "$host_os" in
12024 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12025 *) gl_absname_cpp="$ac_cpp" ;;
12026 esac
12027
12028 case "$host_os" in
12029 mingw*)
12030 gl_dirsep_regex='[/\\]'
12031 ;;
12032 *)
12033 gl_dirsep_regex='\/'
12034 ;;
12035 esac
12036 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12037
12038 gl_header_literal_regex=`echo 'sys/types.h' \
12039 | sed -e "$gl_make_literal_regex_sed"`
12040 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12041 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12042 s|^/[^/]|//&|
12043 p
12044 q
12045 }'
12046 gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12047 sed -n "$gl_absolute_header_sed"`'"'
12048
12049
12050fi
12051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
12052$as_echo "$gl_cv_next_sys_types_h" >&6; }
12053 fi
12054 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
12055
12056 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12057 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12058 gl_next_as_first_directive='<'sys/types.h'>'
12059 else
12060 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12061 gl_next_as_first_directive=$gl_cv_next_sys_types_h
12062 fi
12063 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
12076if test "x$ac_cv_have_decl_fseeko" = xyes; then :
12077 ac_have_decl=1
12078else
12079 ac_have_decl=0
12080fi
12081
12082cat >>confdefs.h <<_ACEOF
12083#define HAVE_DECL_FSEEKO $ac_have_decl
12084_ACEOF
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
12095$as_echo_n "checking for fseeko... " >&6; }
12096if ${gl_cv_func_fseeko+:} false; then :
12097 $as_echo_n "(cached) " >&6
12098else
12099
12100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12101/* end confdefs.h. */
12102#include <stdio.h>
12103
12104int
12105main ()
12106{
12107fseeko (stdin, 0, 0);
12108 ;
12109 return 0;
12110}
12111_ACEOF
12112if ac_fn_c_try_link "$LINENO"; then :
12113 gl_cv_func_fseeko=yes
12114else
12115 gl_cv_func_fseeko=no
12116fi
12117rm -f core conftest.err conftest.$ac_objext \
12118 conftest$ac_exeext conftest.$ac_ext
12119
12120fi
12121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
12122$as_echo "$gl_cv_func_fseeko" >&6; }
12123
12124
12125 if test $ac_cv_have_decl_fseeko = no; then
12126 HAVE_DECL_FSEEKO=0
12127 fi
12128
12129 if test $gl_cv_func_fseeko = no; then
12130 HAVE_FSEEKO=0
12131 else
12132 if test $WINDOWS_64_BIT_OFF_T = 1; then
12133 REPLACE_FSEEKO=1
12134 fi
12135 if test $gl_cv_var_stdin_large_offset = no; then
12136 REPLACE_FSEEKO=1
12137 fi
12138
12139 fi
12140
12141
12142 GNULIB_FCHMODAT=0;
12143 GNULIB_FSTAT=0;
12144 GNULIB_FSTATAT=0;
12145 GNULIB_FUTIMENS=0;
12146 GNULIB_LCHMOD=0;
12147 GNULIB_LSTAT=0;
12148 GNULIB_MKDIRAT=0;
12149 GNULIB_MKFIFO=0;
12150 GNULIB_MKFIFOAT=0;
12151 GNULIB_MKNOD=0;
12152 GNULIB_MKNODAT=0;
12153 GNULIB_STAT=0;
12154 GNULIB_UTIMENSAT=0;
12155 HAVE_FCHMODAT=1;
12156 HAVE_FSTATAT=1;
12157 HAVE_FUTIMENS=1;
12158 HAVE_LCHMOD=1;
12159 HAVE_LSTAT=1;
12160 HAVE_MKDIRAT=1;
12161 HAVE_MKFIFO=1;
12162 HAVE_MKFIFOAT=1;
12163 HAVE_MKNOD=1;
12164 HAVE_MKNODAT=1;
12165 HAVE_UTIMENSAT=1;
12166 REPLACE_FSTAT=0;
12167 REPLACE_FSTATAT=0;
12168 REPLACE_FUTIMENS=0;
12169 REPLACE_LSTAT=0;
12170 REPLACE_MKDIR=0;
12171 REPLACE_MKFIFO=0;
12172 REPLACE_MKNOD=0;
12173 REPLACE_STAT=0;
12174 REPLACE_UTIMENSAT=0;
12175
12176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
12177$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
12178if ${ac_cv_header_stat_broken+:} false; then :
12179 $as_echo_n "(cached) " >&6
12180else
12181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12182/* end confdefs.h. */
12183#include <sys/types.h>
12184#include <sys/stat.h>
12185
12186#if defined S_ISBLK && defined S_IFDIR
12187extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
12188#endif
12189
12190#if defined S_ISBLK && defined S_IFCHR
12191extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
12192#endif
12193
12194#if defined S_ISLNK && defined S_IFREG
12195extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
12196#endif
12197
12198#if defined S_ISSOCK && defined S_IFREG
12199extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
12200#endif
12201
12202_ACEOF
12203if ac_fn_c_try_compile "$LINENO"; then :
12204 ac_cv_header_stat_broken=no
12205else
12206 ac_cv_header_stat_broken=yes
12207fi
12208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12209fi
12210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
12211$as_echo "$ac_cv_header_stat_broken" >&6; }
12212if test $ac_cv_header_stat_broken = yes; then
12213
12214$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
12215
12216fi
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236 if test $gl_cv_have_include_next = yes; then
12237 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12238 else
12239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
12240$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
12241if ${gl_cv_next_sys_stat_h+:} false; then :
12242 $as_echo_n "(cached) " >&6
12243else
12244
12245 if test $ac_cv_header_sys_stat_h = yes; then
12246
12247
12248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12249/* end confdefs.h. */
12250#include <sys/stat.h>
12251
12252_ACEOF
12253 case "$host_os" in
12254 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12255 *) gl_absname_cpp="$ac_cpp" ;;
12256 esac
12257
12258 case "$host_os" in
12259 mingw*)
12260 gl_dirsep_regex='[/\\]'
12261 ;;
12262 *)
12263 gl_dirsep_regex='\/'
12264 ;;
12265 esac
12266 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12267
12268 gl_header_literal_regex=`echo 'sys/stat.h' \
12269 | sed -e "$gl_make_literal_regex_sed"`
12270 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12271 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12272 s|^/[^/]|//&|
12273 p
12274 q
12275 }'
12276 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12277 sed -n "$gl_absolute_header_sed"`'"'
12278 else
12279 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
12280 fi
12281
12282
12283fi
12284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
12285$as_echo "$gl_cv_next_sys_stat_h" >&6; }
12286 fi
12287 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
12288
12289 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12290 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12291 gl_next_as_first_directive='<'sys/stat.h'>'
12292 else
12293 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12294 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
12295 fi
12296 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
12309
12310$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
12311
12312 fi
12313
12314 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
12315 #include <sys/stat.h>
12316"
12317if test "x$ac_cv_type_nlink_t" = xyes; then :
12318
12319else
12320
12321$as_echo "#define nlink_t int" >>confdefs.h
12322
12323fi
12324
12325
12326
12327 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
12328 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12330$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12331if eval \${$as_gl_Symbol+:} false; then :
12332 $as_echo_n "(cached) " >&6
12333else
12334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12335/* end confdefs.h. */
12336#include <sys/stat.h>
12337
12338int
12339main ()
12340{
12341#undef $gl_func
12342 (void) $gl_func;
12343 ;
12344 return 0;
12345}
12346_ACEOF
12347if ac_fn_c_try_compile "$LINENO"; then :
12348 eval "$as_gl_Symbol=yes"
12349else
12350 eval "$as_gl_Symbol=no"
12351fi
12352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12353fi
12354eval ac_res=\$$as_gl_Symbol
12355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12356$as_echo "$ac_res" >&6; }
12357 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
12358 cat >>confdefs.h <<_ACEOF
12359#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12360_ACEOF
12361
12362 eval ac_cv_have_decl_$gl_func=yes
12363fi
12364 done
12365
12366
12367ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
12368if test "x$ac_cv_have_decl_ftello" = xyes; then :
12369 ac_have_decl=1
12370else
12371 ac_have_decl=0
12372fi
12373
12374cat >>confdefs.h <<_ACEOF
12375#define HAVE_DECL_FTELLO $ac_have_decl
12376_ACEOF
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387 if test $ac_cv_have_decl_ftello = no; then
12388 HAVE_DECL_FTELLO=0
12389 fi
12390
12391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
12392$as_echo_n "checking for ftello... " >&6; }
12393if ${gl_cv_func_ftello+:} false; then :
12394 $as_echo_n "(cached) " >&6
12395else
12396
12397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12398/* end confdefs.h. */
12399#include <stdio.h>
12400int
12401main ()
12402{
12403ftello (stdin);
12404 ;
12405 return 0;
12406}
12407_ACEOF
12408if ac_fn_c_try_link "$LINENO"; then :
12409 gl_cv_func_ftello=yes
12410else
12411 gl_cv_func_ftello=no
12412fi
12413rm -f core conftest.err conftest.$ac_objext \
12414 conftest$ac_exeext conftest.$ac_ext
12415
12416fi
12417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
12418$as_echo "$gl_cv_func_ftello" >&6; }
12419 if test $gl_cv_func_ftello = no; then
12420 HAVE_FTELLO=0
12421 else
12422 if test $WINDOWS_64_BIT_OFF_T = 1; then
12423 REPLACE_FTELLO=1
12424 fi
12425 if test $gl_cv_var_stdin_large_offset = no; then
12426 REPLACE_FTELLO=1
12427 fi
12428 if test $REPLACE_FTELLO = 0; then
12429
12430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
12431$as_echo_n "checking whether ftello works... " >&6; }
12432if ${gl_cv_func_ftello_works+:} false; then :
12433 $as_echo_n "(cached) " >&6
12434else
12435
12436 case "$host_os" in
12437 # Guess no on Solaris.
12438 solaris*) gl_cv_func_ftello_works="guessing no" ;;
12439 # Guess yes otherwise.
12440 *) gl_cv_func_ftello_works="guessing yes" ;;
12441 esac
12442 if test "$cross_compiling" = yes; then :
12443 :
12444else
12445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12446/* end confdefs.h. */
12447
12448#include <stdio.h>
12449#include <stdlib.h>
12450#include <string.h>
12451#define TESTFILE "conftest.tmp"
12452int
12453main (void)
12454{
12455 FILE *fp;
12456
12457 /* Create a file with some contents. */
12458 fp = fopen (TESTFILE, "w");
12459 if (fp == NULL)
12460 return 70;
12461 if (fwrite ("foogarsh", 1, 8, fp) < 8)
12462 return 71;
12463 if (fclose (fp))
12464 return 72;
12465
12466 /* The file's contents is now "foogarsh". */
12467
12468 /* Try writing after reading to EOF. */
12469 fp = fopen (TESTFILE, "r+");
12470 if (fp == NULL)
12471 return 73;
12472 if (fseek (fp, -1, SEEK_END))
12473 return 74;
12474 if (!(getc (fp) == 'h'))
12475 return 1;
12476 if (!(getc (fp) == EOF))
12477 return 2;
12478 if (!(ftell (fp) == 8))
12479 return 3;
12480 if (!(ftell (fp) == 8))
12481 return 4;
12482 if (!(putc ('!', fp) == '!'))
12483 return 5;
12484 if (!(ftell (fp) == 9))
12485 return 6;
12486 if (!(fclose (fp) == 0))
12487 return 7;
12488 fp = fopen (TESTFILE, "r");
12489 if (fp == NULL)
12490 return 75;
12491 {
12492 char buf[10];
12493 if (!(fread (buf, 1, 10, fp) == 9))
12494 return 10;
12495 if (!(memcmp (buf, "foogarsh!", 9) == 0))
12496 return 11;
12497 }
12498 if (!(fclose (fp) == 0))
12499 return 12;
12500
12501 /* The file's contents is now "foogarsh!". */
12502
12503 return 0;
12504}
12505_ACEOF
12506if ac_fn_c_try_run "$LINENO"; then :
12507 gl_cv_func_ftello_works=yes
12508else
12509 gl_cv_func_ftello_works=no
12510fi
12511rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12512 conftest.$ac_objext conftest.beam conftest.$ac_ext
12513fi
12514
12515
12516fi
12517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
12518$as_echo "$gl_cv_func_ftello_works" >&6; }
12519 case "$gl_cv_func_ftello_works" in
12520 *yes) ;;
12521 *)
12522 REPLACE_FTELLO=1
12523
12524$as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
12525
12526 ;;
12527 esac
12528 fi
12529 fi
12530
12531
12532
12533
12534 GNULIB_GETADDRINFO=0;
12535 HAVE_STRUCT_ADDRINFO=1;
12536 HAVE_DECL_FREEADDRINFO=1;
12537 HAVE_DECL_GAI_STRERROR=1;
12538 HAVE_DECL_GETADDRINFO=1;
12539 HAVE_DECL_GETNAMEINFO=1;
12540 REPLACE_GAI_STRERROR=0;
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555 if test $gl_cv_have_include_next = yes; then
12556 gl_cv_next_netdb_h='<'netdb.h'>'
12557 else
12558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
12559$as_echo_n "checking absolute name of <netdb.h>... " >&6; }
12560if ${gl_cv_next_netdb_h+:} false; then :
12561 $as_echo_n "(cached) " >&6
12562else
12563
12564 if test $ac_cv_header_netdb_h = yes; then
12565
12566
12567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12568/* end confdefs.h. */
12569#include <netdb.h>
12570
12571_ACEOF
12572 case "$host_os" in
12573 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12574 *) gl_absname_cpp="$ac_cpp" ;;
12575 esac
12576
12577 case "$host_os" in
12578 mingw*)
12579 gl_dirsep_regex='[/\\]'
12580 ;;
12581 *)
12582 gl_dirsep_regex='\/'
12583 ;;
12584 esac
12585 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12586
12587 gl_header_literal_regex=`echo 'netdb.h' \
12588 | sed -e "$gl_make_literal_regex_sed"`
12589 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12590 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12591 s|^/[^/]|//&|
12592 p
12593 q
12594 }'
12595 gl_cv_next_netdb_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12596 sed -n "$gl_absolute_header_sed"`'"'
12597 else
12598 gl_cv_next_netdb_h='<'netdb.h'>'
12599 fi
12600
12601
12602fi
12603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
12604$as_echo "$gl_cv_next_netdb_h" >&6; }
12605 fi
12606 NEXT_NETDB_H=$gl_cv_next_netdb_h
12607
12608 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12609 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12610 gl_next_as_first_directive='<'netdb.h'>'
12611 else
12612 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12613 gl_next_as_first_directive=$gl_cv_next_netdb_h
12614 fi
12615 NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
12616
12617
12618
12619
12620 if test $ac_cv_header_netdb_h = yes; then
12621 HAVE_NETDB_H=1
12622 else
12623 HAVE_NETDB_H=0
12624 fi
12625
12626
12627
12628 for gl_func in getaddrinfo freeaddrinfo gai_strerror getnameinfo; do
12629 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12631$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12632if eval \${$as_gl_Symbol+:} false; then :
12633 $as_echo_n "(cached) " >&6
12634else
12635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12636/* end confdefs.h. */
12637#include <netdb.h>
12638int
12639main ()
12640{
12641#undef $gl_func
12642 (void) $gl_func;
12643 ;
12644 return 0;
12645}
12646_ACEOF
12647if ac_fn_c_try_compile "$LINENO"; then :
12648 eval "$as_gl_Symbol=yes"
12649else
12650 eval "$as_gl_Symbol=no"
12651fi
12652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12653fi
12654eval ac_res=\$$as_gl_Symbol
12655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12656$as_echo "$ac_res" >&6; }
12657 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
12658 cat >>confdefs.h <<_ACEOF
12659#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12660_ACEOF
12661
12662 eval ac_cv_have_decl_$gl_func=yes
12663fi
12664 done
12665
12666
12667
12668 HOSTENT_LIB=
12669 gl_saved_libs="$LIBS"
12670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
12671$as_echo_n "checking for library containing gethostbyname... " >&6; }
12672if ${ac_cv_search_gethostbyname+:} false; then :
12673 $as_echo_n "(cached) " >&6
12674else
12675 ac_func_search_save_LIBS=$LIBS
12676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12677/* end confdefs.h. */
12678
12679/* Override any GCC internal prototype to avoid an error.
12680 Use char because int might match the return type of a GCC
12681 builtin and then its argument prototype would still apply. */
12682#ifdef __cplusplus
12683extern "C"
12684#endif
12685char gethostbyname ();
12686int
12687main ()
12688{
12689return gethostbyname ();
12690 ;
12691 return 0;
12692}
12693_ACEOF
12694for ac_lib in '' nsl network net; do
12695 if test -z "$ac_lib"; then
12696 ac_res="none required"
12697 else
12698 ac_res=-l$ac_lib
12699 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12700 fi
12701 if ac_fn_c_try_link "$LINENO"; then :
12702 ac_cv_search_gethostbyname=$ac_res
12703fi
12704rm -f core conftest.err conftest.$ac_objext \
12705 conftest$ac_exeext
12706 if ${ac_cv_search_gethostbyname+:} false; then :
12707 break
12708fi
12709done
12710if ${ac_cv_search_gethostbyname+:} false; then :
12711
12712else
12713 ac_cv_search_gethostbyname=no
12714fi
12715rm conftest.$ac_ext
12716LIBS=$ac_func_search_save_LIBS
12717fi
12718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
12719$as_echo "$ac_cv_search_gethostbyname" >&6; }
12720ac_res=$ac_cv_search_gethostbyname
12721if test "$ac_res" != no; then :
12722 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12723 if test "$ac_cv_search_gethostbyname" != "none required"; then
12724 HOSTENT_LIB="$ac_cv_search_gethostbyname"
12725 fi
12726fi
12727
12728 LIBS="$gl_saved_libs"
12729 if test -z "$HOSTENT_LIB"; then
12730 for ac_func in gethostbyname
12731do :
12732 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
12733if test "x$ac_cv_func_gethostbyname" = xyes; then :
12734 cat >>confdefs.h <<_ACEOF
12735#define HAVE_GETHOSTBYNAME 1
12736_ACEOF
12737
12738else
12739
12740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in winsock2.h and -lws2_32" >&5
12741$as_echo_n "checking for gethostbyname in winsock2.h and -lws2_32... " >&6; }
12742if ${gl_cv_w32_gethostbyname+:} false; then :
12743 $as_echo_n "(cached) " >&6
12744else
12745 gl_cv_w32_gethostbyname=no
12746 gl_save_LIBS="$LIBS"
12747 LIBS="$LIBS -lws2_32"
12748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12749/* end confdefs.h. */
12750
12751#ifdef HAVE_WINSOCK2_H
12752#include <winsock2.h>
12753#endif
12754#include <stddef.h>
12755
12756int
12757main ()
12758{
12759gethostbyname(NULL);
12760 ;
12761 return 0;
12762}
12763_ACEOF
12764if ac_fn_c_try_link "$LINENO"; then :
12765 gl_cv_w32_gethostbyname=yes
12766fi
12767rm -f core conftest.err conftest.$ac_objext \
12768 conftest$ac_exeext conftest.$ac_ext
12769 LIBS="$gl_save_LIBS"
12770
12771fi
12772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_gethostbyname" >&5
12773$as_echo "$gl_cv_w32_gethostbyname" >&6; }
12774 if test "$gl_cv_w32_gethostbyname" = "yes"; then
12775 HOSTENT_LIB="-lws2_32"
12776 fi
12777
12778fi
12779done
12780
12781 fi
12782
12783
12784
12785 SERVENT_LIB=
12786 gl_saved_libs="$LIBS"
12787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getservbyname" >&5
12788$as_echo_n "checking for library containing getservbyname... " >&6; }
12789if ${ac_cv_search_getservbyname+:} false; then :
12790 $as_echo_n "(cached) " >&6
12791else
12792 ac_func_search_save_LIBS=$LIBS
12793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12794/* end confdefs.h. */
12795
12796/* Override any GCC internal prototype to avoid an error.
12797 Use char because int might match the return type of a GCC
12798 builtin and then its argument prototype would still apply. */
12799#ifdef __cplusplus
12800extern "C"
12801#endif
12802char getservbyname ();
12803int
12804main ()
12805{
12806return getservbyname ();
12807 ;
12808 return 0;
12809}
12810_ACEOF
12811for ac_lib in '' socket network net; do
12812 if test -z "$ac_lib"; then
12813 ac_res="none required"
12814 else
12815 ac_res=-l$ac_lib
12816 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12817 fi
12818 if ac_fn_c_try_link "$LINENO"; then :
12819 ac_cv_search_getservbyname=$ac_res
12820fi
12821rm -f core conftest.err conftest.$ac_objext \
12822 conftest$ac_exeext
12823 if ${ac_cv_search_getservbyname+:} false; then :
12824 break
12825fi
12826done
12827if ${ac_cv_search_getservbyname+:} false; then :
12828
12829else
12830 ac_cv_search_getservbyname=no
12831fi
12832rm conftest.$ac_ext
12833LIBS=$ac_func_search_save_LIBS
12834fi
12835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getservbyname" >&5
12836$as_echo "$ac_cv_search_getservbyname" >&6; }
12837ac_res=$ac_cv_search_getservbyname
12838if test "$ac_res" != no; then :
12839 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12840 if test "$ac_cv_search_getservbyname" != "none required"; then
12841 SERVENT_LIB="$ac_cv_search_getservbyname"
12842 fi
12843fi
12844
12845 LIBS="$gl_saved_libs"
12846 if test -z "$SERVENT_LIB"; then
12847 for ac_func in getservbyname
12848do :
12849 ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname"
12850if test "x$ac_cv_func_getservbyname" = xyes; then :
12851 cat >>confdefs.h <<_ACEOF
12852#define HAVE_GETSERVBYNAME 1
12853_ACEOF
12854
12855else
12856
12857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getservbyname in winsock2.h and -lws2_32" >&5
12858$as_echo_n "checking for getservbyname in winsock2.h and -lws2_32... " >&6; }
12859if ${gl_cv_w32_getservbyname+:} false; then :
12860 $as_echo_n "(cached) " >&6
12861else
12862 gl_cv_w32_getservbyname=no
12863 gl_save_LIBS="$LIBS"
12864 LIBS="$LIBS -lws2_32"
12865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12866/* end confdefs.h. */
12867
12868#ifdef HAVE_WINSOCK2_H
12869#include <winsock2.h>
12870#endif
12871#include <stddef.h>
12872
12873int
12874main ()
12875{
12876getservbyname(NULL,NULL);
12877 ;
12878 return 0;
12879}
12880_ACEOF
12881if ac_fn_c_try_link "$LINENO"; then :
12882 gl_cv_w32_getservbyname=yes
12883fi
12884rm -f core conftest.err conftest.$ac_objext \
12885 conftest$ac_exeext conftest.$ac_ext
12886 LIBS="$gl_save_LIBS"
12887
12888fi
12889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_getservbyname" >&5
12890$as_echo "$gl_cv_w32_getservbyname" >&6; }
12891 if test "$gl_cv_w32_getservbyname" = "yes"; then
12892 SERVENT_LIB="-lws2_32"
12893 fi
12894
12895fi
12896done
12897
12898 fi
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908 HAVE_INET_NTOP=1
12909 INET_NTOP_LIB=
12910
12911
12912
12913
12914 if test $ac_cv_header_sys_socket_h != yes; then
12915 for ac_header in winsock2.h
12916do :
12917 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12918if test "x$ac_cv_header_winsock2_h" = xyes; then :
12919 cat >>confdefs.h <<_ACEOF
12920#define HAVE_WINSOCK2_H 1
12921_ACEOF
12922
12923fi
12924
12925done
12926
12927 fi
12928 if test "$ac_cv_header_winsock2_h" = yes; then
12929 HAVE_WINSOCK2_H=1
12930 UNISTD_H_HAVE_WINSOCK2_H=1
12931 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
12932 else
12933 HAVE_WINSOCK2_H=0
12934 fi
12935
12936
12937 if test $HAVE_WINSOCK2_H = 1; then
12938 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
12939"
12940if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
12941 ac_have_decl=1
12942else
12943 ac_have_decl=0
12944fi
12945
12946cat >>confdefs.h <<_ACEOF
12947#define HAVE_DECL_INET_NTOP $ac_have_decl
12948_ACEOF
12949
12950 if test $ac_cv_have_decl_inet_ntop = yes; then
12951 REPLACE_INET_NTOP=1
12952 INET_NTOP_LIB="-lws2_32"
12953 else
12954 HAVE_DECL_INET_NTOP=0
12955 HAVE_INET_NTOP=0
12956 fi
12957 else
12958 gl_save_LIBS=$LIBS
12959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
12960$as_echo_n "checking for library containing inet_ntop... " >&6; }
12961if ${ac_cv_search_inet_ntop+:} false; then :
12962 $as_echo_n "(cached) " >&6
12963else
12964 ac_func_search_save_LIBS=$LIBS
12965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12966/* end confdefs.h. */
12967
12968/* Override any GCC internal prototype to avoid an error.
12969 Use char because int might match the return type of a GCC
12970 builtin and then its argument prototype would still apply. */
12971#ifdef __cplusplus
12972extern "C"
12973#endif
12974char inet_ntop ();
12975int
12976main ()
12977{
12978return inet_ntop ();
12979 ;
12980 return 0;
12981}
12982_ACEOF
12983for ac_lib in '' nsl resolv; do
12984 if test -z "$ac_lib"; then
12985 ac_res="none required"
12986 else
12987 ac_res=-l$ac_lib
12988 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12989 fi
12990 if ac_fn_c_try_link "$LINENO"; then :
12991 ac_cv_search_inet_ntop=$ac_res
12992fi
12993rm -f core conftest.err conftest.$ac_objext \
12994 conftest$ac_exeext
12995 if ${ac_cv_search_inet_ntop+:} false; then :
12996 break
12997fi
12998done
12999if ${ac_cv_search_inet_ntop+:} false; then :
13000
13001else
13002 ac_cv_search_inet_ntop=no
13003fi
13004rm conftest.$ac_ext
13005LIBS=$ac_func_search_save_LIBS
13006fi
13007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
13008$as_echo "$ac_cv_search_inet_ntop" >&6; }
13009ac_res=$ac_cv_search_inet_ntop
13010if test "$ac_res" != no; then :
13011 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13012
13013else
13014 for ac_func in inet_ntop
13015do :
13016 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
13017if test "x$ac_cv_func_inet_ntop" = xyes; then :
13018 cat >>confdefs.h <<_ACEOF
13019#define HAVE_INET_NTOP 1
13020_ACEOF
13021
13022fi
13023done
13024
13025 if test $ac_cv_func_inet_ntop = no; then
13026 HAVE_INET_NTOP=0
13027 fi
13028
13029fi
13030
13031 LIBS=$gl_save_LIBS
13032
13033 if test "$ac_cv_search_inet_ntop" != "no" \
13034 && test "$ac_cv_search_inet_ntop" != "none required"; then
13035 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
13036 fi
13037
13038
13039 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
13040 #if HAVE_NETDB_H
13041 # include <netdb.h>
13042 #endif
13043
13044"
13045if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
13046 ac_have_decl=1
13047else
13048 ac_have_decl=0
13049fi
13050
13051cat >>confdefs.h <<_ACEOF
13052#define HAVE_DECL_INET_NTOP $ac_have_decl
13053_ACEOF
13054
13055 if test $ac_cv_have_decl_inet_ntop = no; then
13056 HAVE_DECL_INET_NTOP=0
13057 fi
13058 fi
13059
13060
13061
13062
13063
13064
13065
13066
13067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
13068$as_echo_n "checking for IPv4 sockets... " >&6; }
13069 if ${gl_cv_socket_ipv4+:} false; then :
13070 $as_echo_n "(cached) " >&6
13071else
13072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13073/* end confdefs.h. */
13074#include <sys/types.h>
13075#ifdef HAVE_SYS_SOCKET_H
13076#include <sys/socket.h>
13077#endif
13078#ifdef HAVE_NETINET_IN_H
13079#include <netinet/in.h>
13080#endif
13081#ifdef HAVE_WINSOCK2_H
13082#include <winsock2.h>
13083#endif
13084int
13085main ()
13086{
13087int x = AF_INET; struct in_addr y; struct sockaddr_in z;
13088 if (&x && &y && &z) return 0;
13089 ;
13090 return 0;
13091}
13092_ACEOF
13093if ac_fn_c_try_compile "$LINENO"; then :
13094 gl_cv_socket_ipv4=yes
13095else
13096 gl_cv_socket_ipv4=no
13097fi
13098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13099fi
13100
13101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
13102$as_echo "$gl_cv_socket_ipv4" >&6; }
13103 if test $gl_cv_socket_ipv4 = yes; then
13104
13105$as_echo "#define HAVE_IPV4 1" >>confdefs.h
13106
13107 fi
13108
13109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
13110$as_echo_n "checking for IPv6 sockets... " >&6; }
13111 if ${gl_cv_socket_ipv6+:} false; then :
13112 $as_echo_n "(cached) " >&6
13113else
13114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13115/* end confdefs.h. */
13116#include <sys/types.h>
13117#ifdef HAVE_SYS_SOCKET_H
13118#include <sys/socket.h>
13119#endif
13120#ifdef HAVE_NETINET_IN_H
13121#include <netinet/in.h>
13122#endif
13123#ifdef HAVE_WINSOCK2_H
13124#include <winsock2.h>
13125#endif
13126#ifdef HAVE_WS2TCPIP_H
13127#include <ws2tcpip.h>
13128#endif
13129int
13130main ()
13131{
13132int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
13133 if (&x && &y && &z) return 0;
13134 ;
13135 return 0;
13136}
13137_ACEOF
13138if ac_fn_c_try_compile "$LINENO"; then :
13139 gl_cv_socket_ipv6=yes
13140else
13141 gl_cv_socket_ipv6=no
13142fi
13143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13144fi
13145
13146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
13147$as_echo "$gl_cv_socket_ipv6" >&6; }
13148 if test $gl_cv_socket_ipv6 = yes; then
13149
13150$as_echo "#define HAVE_IPV6 1" >>confdefs.h
13151
13152 fi
13153
13154ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
13155if test "x$ac_cv_have_decl_getdelim" = xyes; then :
13156 ac_have_decl=1
13157else
13158 ac_have_decl=0
13159fi
13160
13161cat >>confdefs.h <<_ACEOF
13162#define HAVE_DECL_GETDELIM $ac_have_decl
13163_ACEOF
13164
13165
13166
13167
13168
13169ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
13170if test "x$ac_cv_have_decl_getline" = xyes; then :
13171 ac_have_decl=1
13172else
13173 ac_have_decl=0
13174fi
13175
13176cat >>confdefs.h <<_ACEOF
13177#define HAVE_DECL_GETLINE $ac_have_decl
13178_ACEOF
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195 if test $gl_cv_have_include_next = yes; then
13196 gl_cv_next_getopt_h='<'getopt.h'>'
13197 else
13198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
13199$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
13200if ${gl_cv_next_getopt_h+:} false; then :
13201 $as_echo_n "(cached) " >&6
13202else
13203
13204 if test $ac_cv_header_getopt_h = yes; then
13205
13206
13207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13208/* end confdefs.h. */
13209#include <getopt.h>
13210
13211_ACEOF
13212 case "$host_os" in
13213 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13214 *) gl_absname_cpp="$ac_cpp" ;;
13215 esac
13216
13217 case "$host_os" in
13218 mingw*)
13219 gl_dirsep_regex='[/\\]'
13220 ;;
13221 *)
13222 gl_dirsep_regex='\/'
13223 ;;
13224 esac
13225 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13226
13227 gl_header_literal_regex=`echo 'getopt.h' \
13228 | sed -e "$gl_make_literal_regex_sed"`
13229 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13230 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13231 s|^/[^/]|//&|
13232 p
13233 q
13234 }'
13235 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13236 sed -n "$gl_absolute_header_sed"`'"'
13237 else
13238 gl_cv_next_getopt_h='<'getopt.h'>'
13239 fi
13240
13241
13242fi
13243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
13244$as_echo "$gl_cv_next_getopt_h" >&6; }
13245 fi
13246 NEXT_GETOPT_H=$gl_cv_next_getopt_h
13247
13248 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13249 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13250 gl_next_as_first_directive='<'getopt.h'>'
13251 else
13252 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13253 gl_next_as_first_directive=$gl_cv_next_getopt_h
13254 fi
13255 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
13256
13257
13258
13259
13260 if test $ac_cv_header_getopt_h = yes; then
13261 HAVE_GETOPT_H=1
13262 else
13263 HAVE_GETOPT_H=0
13264 fi
13265
13266
13267 gl_replace_getopt=
13268
13269 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
13270 for ac_header in getopt.h
13271do :
13272 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
13273if test "x$ac_cv_header_getopt_h" = xyes; then :
13274 cat >>confdefs.h <<_ACEOF
13275#define HAVE_GETOPT_H 1
13276_ACEOF
13277
13278else
13279 gl_replace_getopt=yes
13280fi
13281
13282done
13283
13284 fi
13285
13286 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
13287 for ac_func in getopt_long_only
13288do :
13289 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
13290if test "x$ac_cv_func_getopt_long_only" = xyes; then :
13291 cat >>confdefs.h <<_ACEOF
13292#define HAVE_GETOPT_LONG_ONLY 1
13293_ACEOF
13294
13295else
13296 gl_replace_getopt=yes
13297fi
13298done
13299
13300 fi
13301
13302 if test -z "$gl_replace_getopt"; then
13303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
13304$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
13305if ${gl_cv_func_getopt_posix+:} false; then :
13306 $as_echo_n "(cached) " >&6
13307else
13308
13309 if test $cross_compiling = no; then
13310 if test "$cross_compiling" = yes; then :
13311 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13312$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13313as_fn_error $? "cannot run test program while cross compiling
13314See \`config.log' for more details" "$LINENO" 5; }
13315else
13316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13317/* end confdefs.h. */
13318
13319#include <unistd.h>
13320#include <stdlib.h>
13321#include <string.h>
13322
13323int
13324main ()
13325{
13326 static char program[] = "program";
13327 static char a[] = "-a";
13328 static char foo[] = "foo";
13329 static char bar[] = "bar";
13330 char *argv[] = { program, a, foo, bar, NULL };
13331 int c;
13332
13333 c = getopt (4, argv, "ab");
13334 if (!(c == 'a'))
13335 return 1;
13336 c = getopt (4, argv, "ab");
13337 if (!(c == -1))
13338 return 2;
13339 if (!(optind == 2))
13340 return 3;
13341 return 0;
13342}
13343
13344_ACEOF
13345if ac_fn_c_try_run "$LINENO"; then :
13346 gl_cv_func_getopt_posix=maybe
13347else
13348 gl_cv_func_getopt_posix=no
13349fi
13350rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13351 conftest.$ac_objext conftest.beam conftest.$ac_ext
13352fi
13353
13354 if test $gl_cv_func_getopt_posix = maybe; then
13355 if test "$cross_compiling" = yes; then :
13356 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13357$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13358as_fn_error $? "cannot run test program while cross compiling
13359See \`config.log' for more details" "$LINENO" 5; }
13360else
13361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13362/* end confdefs.h. */
13363
13364#include <unistd.h>
13365#include <stdlib.h>
13366#include <string.h>
13367
13368int
13369main ()
13370{
13371 static char program[] = "program";
13372 static char donald[] = "donald";
13373 static char p[] = "-p";
13374 static char billy[] = "billy";
13375 static char duck[] = "duck";
13376 static char a[] = "-a";
13377 static char bar[] = "bar";
13378 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
13379 int c;
13380
13381 c = getopt (7, argv, "+abp:q:");
13382 if (!(c == -1))
13383 return 4;
13384 if (!(strcmp (argv[0], "program") == 0))
13385 return 5;
13386 if (!(strcmp (argv[1], "donald") == 0))
13387 return 6;
13388 if (!(strcmp (argv[2], "-p") == 0))
13389 return 7;
13390 if (!(strcmp (argv[3], "billy") == 0))
13391 return 8;
13392 if (!(strcmp (argv[4], "duck") == 0))
13393 return 9;
13394 if (!(strcmp (argv[5], "-a") == 0))
13395 return 10;
13396 if (!(strcmp (argv[6], "bar") == 0))
13397 return 11;
13398 if (!(optind == 1))
13399 return 12;
13400 return 0;
13401}
13402
13403_ACEOF
13404if ac_fn_c_try_run "$LINENO"; then :
13405 gl_cv_func_getopt_posix=maybe
13406else
13407 gl_cv_func_getopt_posix=no
13408fi
13409rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13410 conftest.$ac_objext conftest.beam conftest.$ac_ext
13411fi
13412
13413 fi
13414 if test $gl_cv_func_getopt_posix = maybe; then
13415 if test "$cross_compiling" = yes; then :
13416 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13417$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13418as_fn_error $? "cannot run test program while cross compiling
13419See \`config.log' for more details" "$LINENO" 5; }
13420else
13421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13422/* end confdefs.h. */
13423
13424#include <unistd.h>
13425#include <stdlib.h>
13426#include <string.h>
13427
13428int
13429main ()
13430{
13431 static char program[] = "program";
13432 static char ab[] = "-ab";
13433 char *argv[3] = { program, ab, NULL };
13434 if (getopt (2, argv, "ab:") != 'a')
13435 return 13;
13436 if (getopt (2, argv, "ab:") != '?')
13437 return 14;
13438 if (optopt != 'b')
13439 return 15;
13440 if (optind != 2)
13441 return 16;
13442 return 0;
13443}
13444
13445_ACEOF
13446if ac_fn_c_try_run "$LINENO"; then :
13447 gl_cv_func_getopt_posix=yes
13448else
13449 gl_cv_func_getopt_posix=no
13450fi
13451rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13452 conftest.$ac_objext conftest.beam conftest.$ac_ext
13453fi
13454
13455 fi
13456 else
13457 case "$host_os" in
13458 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
13459 *) gl_cv_func_getopt_posix="guessing yes";;
13460 esac
13461 fi
13462
13463fi
13464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
13465$as_echo "$gl_cv_func_getopt_posix" >&6; }
13466 case "$gl_cv_func_getopt_posix" in
13467 *no) gl_replace_getopt=yes ;;
13468 esac
13469 fi
13470
13471 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
13472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
13473$as_echo_n "checking for working GNU getopt function... " >&6; }
13474if ${gl_cv_func_getopt_gnu+:} false; then :
13475 $as_echo_n "(cached) " >&6
13476else
13477 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
13478 # optstring is necessary for programs like m4 that have POSIX-mandated
13479 # semantics for supporting options interspersed with files.
13480 # Also, since getopt_long is a GNU extension, we require optind=0.
13481 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
13482 # so take care to revert to the correct (non-)export state.
13483 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
13484 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
13485 xx) gl_had_POSIXLY_CORRECT=exported ;;
13486 x) gl_had_POSIXLY_CORRECT=yes ;;
13487 *) gl_had_POSIXLY_CORRECT= ;;
13488 esac
13489 POSIXLY_CORRECT=1
13490 export POSIXLY_CORRECT
13491 if test "$cross_compiling" = yes; then :
13492 gl_cv_func_getopt_gnu="guessing no"
13493
13494else
13495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13496/* end confdefs.h. */
13497#include <getopt.h>
13498 #include <stddef.h>
13499 #include <string.h>
13500
13501#include <stdlib.h>
13502#if defined __MACH__ && defined __APPLE__
13503/* Avoid a crash on Mac OS X. */
13504#include <mach/mach.h>
13505#include <mach/mach_error.h>
13506#include <mach/thread_status.h>
13507#include <mach/exception.h>
13508#include <mach/task.h>
13509#include <pthread.h>
13510/* The exception port on which our thread listens. */
13511static mach_port_t our_exception_port;
13512/* The main function of the thread listening for exceptions of type
13513 EXC_BAD_ACCESS. */
13514static void *
13515mach_exception_thread (void *arg)
13516{
13517 /* Buffer for a message to be received. */
13518 struct {
13519 mach_msg_header_t head;
13520 mach_msg_body_t msgh_body;
13521 char data[1024];
13522 } msg;
13523 mach_msg_return_t retval;
13524 /* Wait for a message on the exception port. */
13525 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
13526 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
13527 if (retval != MACH_MSG_SUCCESS)
13528 abort ();
13529 exit (1);
13530}
13531static void
13532nocrash_init (void)
13533{
13534 mach_port_t self = mach_task_self ();
13535 /* Allocate a port on which the thread shall listen for exceptions. */
13536 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
13537 == KERN_SUCCESS) {
13538 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
13539 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
13540 MACH_MSG_TYPE_MAKE_SEND)
13541 == KERN_SUCCESS) {
13542 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
13543 for us. */
13544 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
13545 /* Create the thread listening on the exception port. */
13546 pthread_attr_t attr;
13547 pthread_t thread;
13548 if (pthread_attr_init (&attr) == 0
13549 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
13550 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
13551 pthread_attr_destroy (&attr);
13552 /* Replace the exception port info for these exceptions with our own.
13553 Note that we replace the exception port for the entire task, not only
13554 for a particular thread. This has the effect that when our exception
13555 port gets the message, the thread specific exception port has already
13556 been asked, and we don't need to bother about it.
13557 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
13558 task_set_exception_ports (self, mask, our_exception_port,
13559 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
13560 }
13561 }
13562 }
13563}
13564#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13565/* Avoid a crash on native Windows. */
13566#define WIN32_LEAN_AND_MEAN
13567#include <windows.h>
13568#include <winerror.h>
13569static LONG WINAPI
13570exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
13571{
13572 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
13573 {
13574 case EXCEPTION_ACCESS_VIOLATION:
13575 case EXCEPTION_IN_PAGE_ERROR:
13576 case EXCEPTION_STACK_OVERFLOW:
13577 case EXCEPTION_GUARD_PAGE:
13578 case EXCEPTION_PRIV_INSTRUCTION:
13579 case EXCEPTION_ILLEGAL_INSTRUCTION:
13580 case EXCEPTION_DATATYPE_MISALIGNMENT:
13581 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
13582 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
13583 exit (1);
13584 }
13585 return EXCEPTION_CONTINUE_SEARCH;
13586}
13587static void
13588nocrash_init (void)
13589{
13590 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
13591}
13592#else
13593/* Avoid a crash on POSIX systems. */
13594#include <signal.h>
13595/* A POSIX signal handler. */
13596static void
13597exception_handler (int sig)
13598{
13599 exit (1);
13600}
13601static void
13602nocrash_init (void)
13603{
13604#ifdef SIGSEGV
13605 signal (SIGSEGV, exception_handler);
13606#endif
13607#ifdef SIGBUS
13608 signal (SIGBUS, exception_handler);
13609#endif
13610}
13611#endif
13612
13613
13614int
13615main ()
13616{
13617
13618 int result = 0;
13619
13620 nocrash_init();
13621
13622 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
13623 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
13624 OSF/1 5.1, Solaris 10. */
13625 {
13626 static char conftest[] = "conftest";
13627 static char plus[] = "-+";
13628 char *argv[3] = { conftest, plus, NULL };
13629 opterr = 0;
13630 if (getopt (2, argv, "+a") != '?')
13631 result |= 1;
13632 }
13633 /* This code succeeds on glibc 2.8, mingw,
13634 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
13635 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
13636 {
13637 static char program[] = "program";
13638 static char p[] = "-p";
13639 static char foo[] = "foo";
13640 static char bar[] = "bar";
13641 char *argv[] = { program, p, foo, bar, NULL };
13642
13643 optind = 1;
13644 if (getopt (4, argv, "p::") != 'p')
13645 result |= 2;
13646 else if (optarg != NULL)
13647 result |= 4;
13648 else if (getopt (4, argv, "p::") != -1)
13649 result |= 6;
13650 else if (optind != 2)
13651 result |= 8;
13652 }
13653 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
13654 {
13655 static char program[] = "program";
13656 static char foo[] = "foo";
13657 static char p[] = "-p";
13658 char *argv[] = { program, foo, p, NULL };
13659 optind = 0;
13660 if (getopt (3, argv, "-p") != 1)
13661 result |= 16;
13662 else if (getopt (3, argv, "-p") != 'p')
13663 result |= 16;
13664 }
13665 /* This code fails on glibc 2.11. */
13666 {
13667 static char program[] = "program";
13668 static char b[] = "-b";
13669 static char a[] = "-a";
13670 char *argv[] = { program, b, a, NULL };
13671 optind = opterr = 0;
13672 if (getopt (3, argv, "+:a:b") != 'b')
13673 result |= 32;
13674 else if (getopt (3, argv, "+:a:b") != ':')
13675 result |= 32;
13676 }
13677 /* This code dumps core on glibc 2.14. */
13678 {
13679 static char program[] = "program";
13680 static char w[] = "-W";
13681 static char dummy[] = "dummy";
13682 char *argv[] = { program, w, dummy, NULL };
13683 optind = opterr = 1;
13684 if (getopt (3, argv, "W;") != 'W')
13685 result |= 64;
13686 }
13687 return result;
13688
13689 ;
13690 return 0;
13691}
13692_ACEOF
13693if ac_fn_c_try_run "$LINENO"; then :
13694 gl_cv_func_getopt_gnu=yes
13695else
13696 gl_cv_func_getopt_gnu=no
13697fi
13698rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13699 conftest.$ac_objext conftest.beam conftest.$ac_ext
13700fi
13701
13702 case $gl_had_POSIXLY_CORRECT in
13703 exported) ;;
13704 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
13705 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
13706 esac
13707
13708fi
13709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
13710$as_echo "$gl_cv_func_getopt_gnu" >&6; }
13711 if test "$gl_cv_func_getopt_gnu" != yes; then
13712 gl_replace_getopt=yes
13713 else
13714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
13715$as_echo_n "checking for working GNU getopt_long function... " >&6; }
13716if ${gl_cv_func_getopt_long_gnu+:} false; then :
13717 $as_echo_n "(cached) " >&6
13718else
13719 if test "$cross_compiling" = yes; then :
13720 case "$host_os" in
13721 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
13722 *) gl_cv_func_getopt_long_gnu="guessing yes";;
13723 esac
13724
13725else
13726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13727/* end confdefs.h. */
13728#include <getopt.h>
13729 #include <stddef.h>
13730 #include <string.h>
13731
13732int
13733main ()
13734{
13735static const struct option long_options[] =
13736 {
13737 { "xtremely-",no_argument, NULL, 1003 },
13738 { "xtra", no_argument, NULL, 1001 },
13739 { "xtreme", no_argument, NULL, 1002 },
13740 { "xtremely", no_argument, NULL, 1003 },
13741 { NULL, 0, NULL, 0 }
13742 };
13743 /* This code fails on OpenBSD 5.0. */
13744 {
13745 static char program[] = "program";
13746 static char xtremel[] = "--xtremel";
13747 char *argv[] = { program, xtremel, NULL };
13748 int option_index;
13749 optind = 1; opterr = 0;
13750 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
13751 return 1;
13752 }
13753 return 0;
13754
13755 ;
13756 return 0;
13757}
13758_ACEOF
13759if ac_fn_c_try_run "$LINENO"; then :
13760 gl_cv_func_getopt_long_gnu=yes
13761else
13762 gl_cv_func_getopt_long_gnu=no
13763fi
13764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13765 conftest.$ac_objext conftest.beam conftest.$ac_ext
13766fi
13767
13768
13769fi
13770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
13771$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
13772 case "$gl_cv_func_getopt_long_gnu" in
13773 *yes) ;;
13774 *) gl_replace_getopt=yes ;;
13775 esac
13776 fi
13777 fi
13778
13779
13780
13781
13782
13783
13784 REPLACE_GETOPT=0
13785 if test -n "$gl_replace_getopt"; then
13786 REPLACE_GETOPT=1
13787 fi
13788
13789 if test $REPLACE_GETOPT = 1; then
13790
13791 GETOPT_H=getopt.h
13792
13793$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
13794
13795
13796
13797 fi
13798
13799ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
13800if test "x$ac_cv_have_decl_getenv" = xyes; then :
13801 ac_have_decl=1
13802else
13803 ac_have_decl=0
13804fi
13805
13806cat >>confdefs.h <<_ACEOF
13807#define HAVE_DECL_GETENV $ac_have_decl
13808_ACEOF
13809
13810ac_fn_c_check_decl "$LINENO" "getpass" "ac_cv_have_decl_getpass" "$ac_includes_default"
13811if test "x$ac_cv_have_decl_getpass" = xyes; then :
13812 ac_have_decl=1
13813else
13814 ac_have_decl=0
13815fi
13816
13817cat >>confdefs.h <<_ACEOF
13818#define HAVE_DECL_GETPASS $ac_have_decl
13819_ACEOF
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
13832if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
13833 ac_have_decl=1
13834else
13835 ac_have_decl=0
13836fi
13837
13838cat >>confdefs.h <<_ACEOF
13839#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
13840_ACEOF
13841
13842ac_fn_c_check_decl "$LINENO" "flockfile" "ac_cv_have_decl_flockfile" "$ac_includes_default"
13843if test "x$ac_cv_have_decl_flockfile" = xyes; then :
13844 ac_have_decl=1
13845else
13846 ac_have_decl=0
13847fi
13848
13849cat >>confdefs.h <<_ACEOF
13850#define HAVE_DECL_FLOCKFILE $ac_have_decl
13851_ACEOF
13852
13853ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
13854if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
13855 ac_have_decl=1
13856else
13857 ac_have_decl=0
13858fi
13859
13860cat >>confdefs.h <<_ACEOF
13861#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
13862_ACEOF
13863
13864ac_fn_c_check_decl "$LINENO" "funlockfile" "ac_cv_have_decl_funlockfile" "$ac_includes_default"
13865if test "x$ac_cv_have_decl_funlockfile" = xyes; then :
13866 ac_have_decl=1
13867else
13868 ac_have_decl=0
13869fi
13870
13871cat >>confdefs.h <<_ACEOF
13872#define HAVE_DECL_FUNLOCKFILE $ac_have_decl
13873_ACEOF
13874
13875ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
13876if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
13877 ac_have_decl=1
13878else
13879 ac_have_decl=0
13880fi
13881
13882cat >>confdefs.h <<_ACEOF
13883#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
13884_ACEOF
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894 GNULIB_GETTIMEOFDAY=0;
13895 HAVE_GETTIMEOFDAY=1;
13896 HAVE_STRUCT_TIMEVAL=1;
13897 HAVE_SYS_TIME_H=1;
13898 REPLACE_GETTIMEOFDAY=0;
13899 REPLACE_STRUCT_TIMEVAL=0;
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916 if test $gl_cv_have_include_next = yes; then
13917 gl_cv_next_sys_time_h='<'sys/time.h'>'
13918 else
13919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
13920$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
13921if ${gl_cv_next_sys_time_h+:} false; then :
13922 $as_echo_n "(cached) " >&6
13923else
13924
13925 if test $ac_cv_header_sys_time_h = yes; then
13926
13927
13928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13929/* end confdefs.h. */
13930#include <sys/time.h>
13931
13932_ACEOF
13933 case "$host_os" in
13934 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13935 *) gl_absname_cpp="$ac_cpp" ;;
13936 esac
13937
13938 case "$host_os" in
13939 mingw*)
13940 gl_dirsep_regex='[/\\]'
13941 ;;
13942 *)
13943 gl_dirsep_regex='\/'
13944 ;;
13945 esac
13946 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13947
13948 gl_header_literal_regex=`echo 'sys/time.h' \
13949 | sed -e "$gl_make_literal_regex_sed"`
13950 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13951 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13952 s|^/[^/]|//&|
13953 p
13954 q
13955 }'
13956 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13957 sed -n "$gl_absolute_header_sed"`'"'
13958 else
13959 gl_cv_next_sys_time_h='<'sys/time.h'>'
13960 fi
13961
13962
13963fi
13964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
13965$as_echo "$gl_cv_next_sys_time_h" >&6; }
13966 fi
13967 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
13968
13969 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13970 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13971 gl_next_as_first_directive='<'sys/time.h'>'
13972 else
13973 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13974 gl_next_as_first_directive=$gl_cv_next_sys_time_h
13975 fi
13976 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
13977
13978
13979
13980
13981
13982 if test $ac_cv_header_sys_time_h != yes; then
13983 HAVE_SYS_TIME_H=0
13984 fi
13985
13986
13987
13988
13989
13990 if test $ac_cv_header_sys_socket_h != yes; then
13991 for ac_header in winsock2.h
13992do :
13993 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13994if test "x$ac_cv_header_winsock2_h" = xyes; then :
13995 cat >>confdefs.h <<_ACEOF
13996#define HAVE_WINSOCK2_H 1
13997_ACEOF
13998
13999fi
14000
14001done
14002
14003 fi
14004 if test "$ac_cv_header_winsock2_h" = yes; then
14005 HAVE_WINSOCK2_H=1
14006 UNISTD_H_HAVE_WINSOCK2_H=1
14007 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
14008 else
14009 HAVE_WINSOCK2_H=0
14010 fi
14011
14012
14013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
14014$as_echo_n "checking for struct timeval... " >&6; }
14015if ${gl_cv_sys_struct_timeval+:} false; then :
14016 $as_echo_n "(cached) " >&6
14017else
14018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14019/* end confdefs.h. */
14020#if HAVE_SYS_TIME_H
14021 #include <sys/time.h>
14022 #endif
14023 #include <time.h>
14024 #if HAVE_WINSOCK2_H
14025 # include <winsock2.h>
14026 #endif
14027
14028int
14029main ()
14030{
14031static struct timeval x; x.tv_sec = x.tv_usec;
14032 ;
14033 return 0;
14034}
14035_ACEOF
14036if ac_fn_c_try_compile "$LINENO"; then :
14037 gl_cv_sys_struct_timeval=yes
14038else
14039 gl_cv_sys_struct_timeval=no
14040fi
14041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14042
14043fi
14044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
14045$as_echo "$gl_cv_sys_struct_timeval" >&6; }
14046 if test $gl_cv_sys_struct_timeval != yes; then
14047 HAVE_STRUCT_TIMEVAL=0
14048 else
14049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
14050$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
14051if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
14052 $as_echo_n "(cached) " >&6
14053else
14054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14055/* end confdefs.h. */
14056#if HAVE_SYS_TIME_H
14057 #include <sys/time.h>
14058 #endif
14059 #include <time.h>
14060 #if HAVE_WINSOCK2_H
14061 # include <winsock2.h>
14062 #endif
14063
14064int
14065main ()
14066{
14067static struct timeval x;
14068 typedef int verify_tv_sec_type[
14069 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
14070 ];
14071
14072 ;
14073 return 0;
14074}
14075_ACEOF
14076if ac_fn_c_try_compile "$LINENO"; then :
14077 gl_cv_sys_struct_timeval_tv_sec=yes
14078else
14079 gl_cv_sys_struct_timeval_tv_sec=no
14080fi
14081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14082
14083fi
14084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
14085$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
14086 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
14087 REPLACE_STRUCT_TIMEVAL=1
14088 fi
14089 fi
14090
14091
14092 for gl_func in gettimeofday; do
14093 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14095$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
14096if eval \${$as_gl_Symbol+:} false; then :
14097 $as_echo_n "(cached) " >&6
14098else
14099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14100/* end confdefs.h. */
14101
14102#if HAVE_SYS_TIME_H
14103# include <sys/time.h>
14104#endif
14105#include <time.h>
14106
14107int
14108main ()
14109{
14110#undef $gl_func
14111 (void) $gl_func;
14112 ;
14113 return 0;
14114}
14115_ACEOF
14116if ac_fn_c_try_compile "$LINENO"; then :
14117 eval "$as_gl_Symbol=yes"
14118else
14119 eval "$as_gl_Symbol=no"
14120fi
14121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14122fi
14123eval ac_res=\$$as_gl_Symbol
14124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14125$as_echo "$ac_res" >&6; }
14126 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
14127 cat >>confdefs.h <<_ACEOF
14128#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14129_ACEOF
14130
14131 eval ac_cv_have_decl_$gl_func=yes
14132fi
14133 done
14134
14135
14136
14137
14138
14139
14140 GNULIB_ICONV=0;
14141 ICONV_CONST=;
14142 REPLACE_ICONV=0;
14143 REPLACE_ICONV_OPEN=0;
14144 REPLACE_ICONV_UTF=0;
14145 ICONV_H='';
14146 if test -n "$ICONV_H"; then
14147 GL_GENERATE_ICONV_H_TRUE=
14148 GL_GENERATE_ICONV_H_FALSE='#'
14149else
14150 GL_GENERATE_ICONV_H_TRUE='#'
14151 GL_GENERATE_ICONV_H_FALSE=
14152fi
14153
14154
14155
14156
14157
14158
14159
14160 am_save_CPPFLAGS="$CPPFLAGS"
14161
14162 for element in $INCICONV; do
14163 haveit=
14164 for x in $CPPFLAGS; do
14165
14166 acl_save_prefix="$prefix"
14167 prefix="$acl_final_prefix"
14168 acl_save_exec_prefix="$exec_prefix"
14169 exec_prefix="$acl_final_exec_prefix"
14170 eval x=\"$x\"
14171 exec_prefix="$acl_save_exec_prefix"
14172 prefix="$acl_save_prefix"
14173
14174 if test "X$x" = "X$element"; then
14175 haveit=yes
14176 break
14177 fi
14178 done
14179 if test -z "$haveit"; then
14180 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14181 fi
14182 done
14183
14184
14185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
14186$as_echo_n "checking for iconv... " >&6; }
14187if ${am_cv_func_iconv+:} false; then :
14188 $as_echo_n "(cached) " >&6
14189else
14190
14191 am_cv_func_iconv="no, consider installing GNU libiconv"
14192 am_cv_lib_iconv=no
14193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14194/* end confdefs.h. */
14195
14196#include <stdlib.h>
14197#include <iconv.h>
14198
14199int
14200main ()
14201{
14202iconv_t cd = iconv_open("","");
14203 iconv(cd,NULL,NULL,NULL,NULL);
14204 iconv_close(cd);
14205 ;
14206 return 0;
14207}
14208_ACEOF
14209if ac_fn_c_try_link "$LINENO"; then :
14210 am_cv_func_iconv=yes
14211fi
14212rm -f core conftest.err conftest.$ac_objext \
14213 conftest$ac_exeext conftest.$ac_ext
14214 if test "$am_cv_func_iconv" != yes; then
14215 am_save_LIBS="$LIBS"
14216 LIBS="$LIBS $LIBICONV"
14217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14218/* end confdefs.h. */
14219
14220#include <stdlib.h>
14221#include <iconv.h>
14222
14223int
14224main ()
14225{
14226iconv_t cd = iconv_open("","");
14227 iconv(cd,NULL,NULL,NULL,NULL);
14228 iconv_close(cd);
14229 ;
14230 return 0;
14231}
14232_ACEOF
14233if ac_fn_c_try_link "$LINENO"; then :
14234 am_cv_lib_iconv=yes
14235 am_cv_func_iconv=yes
14236fi
14237rm -f core conftest.err conftest.$ac_objext \
14238 conftest$ac_exeext conftest.$ac_ext
14239 LIBS="$am_save_LIBS"
14240 fi
14241
14242fi
14243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
14244$as_echo "$am_cv_func_iconv" >&6; }
14245 if test "$am_cv_func_iconv" = yes; then
14246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
14247$as_echo_n "checking for working iconv... " >&6; }
14248if ${am_cv_func_iconv_works+:} false; then :
14249 $as_echo_n "(cached) " >&6
14250else
14251
14252 am_save_LIBS="$LIBS"
14253 if test $am_cv_lib_iconv = yes; then
14254 LIBS="$LIBS $LIBICONV"
14255 fi
14256 if test "$cross_compiling" = yes; then :
14257
14258 case "$host_os" in
14259 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
14260 *) am_cv_func_iconv_works="guessing yes" ;;
14261 esac
14262
14263else
14264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14265/* end confdefs.h. */
14266
14267#include <iconv.h>
14268#include <string.h>
14269int main ()
14270{
14271 int result = 0;
14272 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
14273 returns. */
14274 {
14275 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
14276 if (cd_utf8_to_88591 != (iconv_t)(-1))
14277 {
14278 static const char input[] = "\342\202\254"; /* EURO SIGN */
14279 char buf[10];
14280 const char *inptr = input;
14281 size_t inbytesleft = strlen (input);
14282 char *outptr = buf;
14283 size_t outbytesleft = sizeof (buf);
14284 size_t res = iconv (cd_utf8_to_88591,
14285 (char **) &inptr, &inbytesleft,
14286 &outptr, &outbytesleft);
14287 if (res == 0)
14288 result |= 1;
14289 iconv_close (cd_utf8_to_88591);
14290 }
14291 }
14292 /* Test against Solaris 10 bug: Failures are not distinguishable from
14293 successful returns. */
14294 {
14295 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
14296 if (cd_ascii_to_88591 != (iconv_t)(-1))
14297 {
14298 static const char input[] = "\263";
14299 char buf[10];
14300 const char *inptr = input;
14301 size_t inbytesleft = strlen (input);
14302 char *outptr = buf;
14303 size_t outbytesleft = sizeof (buf);
14304 size_t res = iconv (cd_ascii_to_88591,
14305 (char **) &inptr, &inbytesleft,
14306 &outptr, &outbytesleft);
14307 if (res == 0)
14308 result |= 2;
14309 iconv_close (cd_ascii_to_88591);
14310 }
14311 }
14312 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
14313 {
14314 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
14315 if (cd_88591_to_utf8 != (iconv_t)(-1))
14316 {
14317 static const char input[] = "\304";
14318 static char buf[2] = { (char)0xDE, (char)0xAD };
14319 const char *inptr = input;
14320 size_t inbytesleft = 1;
14321 char *outptr = buf;
14322 size_t outbytesleft = 1;
14323 size_t res = iconv (cd_88591_to_utf8,
14324 (char **) &inptr, &inbytesleft,
14325 &outptr, &outbytesleft);
14326 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
14327 result |= 4;
14328 iconv_close (cd_88591_to_utf8);
14329 }
14330 }
14331#if 0 /* This bug could be worked around by the caller. */
14332 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
14333 {
14334 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
14335 if (cd_88591_to_utf8 != (iconv_t)(-1))
14336 {
14337 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
14338 char buf[50];
14339 const char *inptr = input;
14340 size_t inbytesleft = strlen (input);
14341 char *outptr = buf;
14342 size_t outbytesleft = sizeof (buf);
14343 size_t res = iconv (cd_88591_to_utf8,
14344 (char **) &inptr, &inbytesleft,
14345 &outptr, &outbytesleft);
14346 if ((int)res > 0)
14347 result |= 8;
14348 iconv_close (cd_88591_to_utf8);
14349 }
14350 }
14351#endif
14352 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
14353 provided. */
14354 if (/* Try standardized names. */
14355 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
14356 /* Try IRIX, OSF/1 names. */
14357 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
14358 /* Try AIX names. */
14359 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
14360 /* Try HP-UX names. */
14361 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
14362 result |= 16;
14363 return result;
14364}
14365_ACEOF
14366if ac_fn_c_try_run "$LINENO"; then :
14367 am_cv_func_iconv_works=yes
14368else
14369 am_cv_func_iconv_works=no
14370fi
14371rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14372 conftest.$ac_objext conftest.beam conftest.$ac_ext
14373fi
14374
14375 LIBS="$am_save_LIBS"
14376
14377fi
14378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
14379$as_echo "$am_cv_func_iconv_works" >&6; }
14380 case "$am_cv_func_iconv_works" in
14381 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
14382 *) am_func_iconv=yes ;;
14383 esac
14384 else
14385 am_func_iconv=no am_cv_lib_iconv=no
14386 fi
14387 if test "$am_func_iconv" = yes; then
14388
14389$as_echo "#define HAVE_ICONV 1" >>confdefs.h
14390
14391 fi
14392 if test "$am_cv_lib_iconv" = yes; then
14393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
14394$as_echo_n "checking how to link with libiconv... " >&6; }
14395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
14396$as_echo "$LIBICONV" >&6; }
14397 else
14398 CPPFLAGS="$am_save_CPPFLAGS"
14399 LIBICONV=
14400 LTLIBICONV=
14401 fi
14402
14403
14404
14405 if test "$am_cv_func_iconv" = yes; then
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
14407$as_echo_n "checking for iconv declaration... " >&6; }
14408 if ${am_cv_proto_iconv+:} false; then :
14409 $as_echo_n "(cached) " >&6
14410else
14411
14412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14413/* end confdefs.h. */
14414
14415#include <stdlib.h>
14416#include <iconv.h>
14417extern
14418#ifdef __cplusplus
14419"C"
14420#endif
14421#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
14422size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
14423#else
14424size_t iconv();
14425#endif
14426
14427int
14428main ()
14429{
14430
14431 ;
14432 return 0;
14433}
14434_ACEOF
14435if ac_fn_c_try_compile "$LINENO"; then :
14436 am_cv_proto_iconv_arg1=""
14437else
14438 am_cv_proto_iconv_arg1="const"
14439fi
14440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14441 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
14442fi
14443
14444 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
14445 { $as_echo "$as_me:${as_lineno-$LINENO}: result:
14446 $am_cv_proto_iconv" >&5
14447$as_echo "
14448 $am_cv_proto_iconv" >&6; }
14449
14450cat >>confdefs.h <<_ACEOF
14451#define ICONV_CONST $am_cv_proto_iconv_arg1
14452_ACEOF
14453
14454
14455 if test -n "$am_cv_proto_iconv_arg1"; then
14456 ICONV_CONST="const"
14457 fi
14458
14459 fi
14460
14461
14462
14463
14464 GNULIB_NL_LANGINFO=0;
14465 HAVE_NL_LANGINFO=1;
14466 REPLACE_NL_LANGINFO=0;
14467
14468
14469
14470ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
14471if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
14472 ac_have_decl=1
14473else
14474 ac_have_decl=0
14475fi
14476
14477cat >>confdefs.h <<_ACEOF
14478#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
14479_ACEOF
14480
14481
14482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
14483$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
14484if ${ac_cv_gnu_library_2_1+:} false; then :
14485 $as_echo_n "(cached) " >&6
14486else
14487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14488/* end confdefs.h. */
14489
14490#include <features.h>
14491#ifdef __GNU_LIBRARY__
14492 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
14493 Lucky GNU user
14494 #endif
14495#endif
14496#ifdef __UCLIBC__
14497 Lucky user
14498#endif
14499
14500_ACEOF
14501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14502 $EGREP "Lucky" >/dev/null 2>&1; then :
14503 ac_cv_gnu_library_2_1=yes
14504else
14505 ac_cv_gnu_library_2_1=no
14506fi
14507rm -f conftest*
14508
14509
14510
14511fi
14512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
14513$as_echo "$ac_cv_gnu_library_2_1" >&6; }
14514
14515 GLIBC21="$ac_cv_gnu_library_2_1"
14516
14517
14518
14519 GNULIB_LOCALECONV=0;
14520 GNULIB_SETLOCALE=0;
14521 GNULIB_DUPLOCALE=0;
14522 HAVE_DUPLOCALE=1;
14523 REPLACE_LOCALECONV=0;
14524 REPLACE_SETLOCALE=0;
14525 REPLACE_DUPLOCALE=0;
14526 REPLACE_STRUCT_LCONV=0;
14527
14528
14529 REPLACE_NULL=0;
14530 HAVE_WCHAR_T=1;
14531
14532
14533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
14534$as_echo_n "checking for wchar_t... " >&6; }
14535if ${gt_cv_c_wchar_t+:} false; then :
14536 $as_echo_n "(cached) " >&6
14537else
14538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14539/* end confdefs.h. */
14540#include <stddef.h>
14541 wchar_t foo = (wchar_t)'\0';
14542int
14543main ()
14544{
14545
14546 ;
14547 return 0;
14548}
14549_ACEOF
14550if ac_fn_c_try_compile "$LINENO"; then :
14551 gt_cv_c_wchar_t=yes
14552else
14553 gt_cv_c_wchar_t=no
14554fi
14555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14556fi
14557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
14558$as_echo "$gt_cv_c_wchar_t" >&6; }
14559 if test $gt_cv_c_wchar_t = yes; then
14560
14561$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
14562
14563 fi
14564
14565
14566
14567
14568 STDDEF_H=
14569 if test $gt_cv_c_wchar_t = no; then
14570 HAVE_WCHAR_T=0
14571 STDDEF_H=stddef.h
14572 fi
14573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
14574$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
14575if ${gl_cv_decl_null_works+:} false; then :
14576 $as_echo_n "(cached) " >&6
14577else
14578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14579/* end confdefs.h. */
14580#include <stddef.h>
14581 int test[2 * (sizeof NULL == sizeof (void *)) -1];
14582
14583int
14584main ()
14585{
14586
14587 ;
14588 return 0;
14589}
14590_ACEOF
14591if ac_fn_c_try_compile "$LINENO"; then :
14592 gl_cv_decl_null_works=yes
14593else
14594 gl_cv_decl_null_works=no
14595fi
14596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14597fi
14598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
14599$as_echo "$gl_cv_decl_null_works" >&6; }
14600 if test $gl_cv_decl_null_works = no; then
14601 REPLACE_NULL=1
14602 STDDEF_H=stddef.h
14603 fi
14604
14605 if test -n "$STDDEF_H"; then
14606 GL_GENERATE_STDDEF_H_TRUE=
14607 GL_GENERATE_STDDEF_H_FALSE='#'
14608else
14609 GL_GENERATE_STDDEF_H_TRUE='#'
14610 GL_GENERATE_STDDEF_H_FALSE=
14611fi
14612
14613 if test -n "$STDDEF_H"; then
14614
14615
14616
14617
14618
14619
14620
14621
14622 if test $gl_cv_have_include_next = yes; then
14623 gl_cv_next_stddef_h='<'stddef.h'>'
14624 else
14625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
14626$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
14627if ${gl_cv_next_stddef_h+:} false; then :
14628 $as_echo_n "(cached) " >&6
14629else
14630
14631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14632/* end confdefs.h. */
14633#include <stddef.h>
14634
14635_ACEOF
14636 case "$host_os" in
14637 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14638 *) gl_absname_cpp="$ac_cpp" ;;
14639 esac
14640
14641 case "$host_os" in
14642 mingw*)
14643 gl_dirsep_regex='[/\\]'
14644 ;;
14645 *)
14646 gl_dirsep_regex='\/'
14647 ;;
14648 esac
14649 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14650
14651 gl_header_literal_regex=`echo 'stddef.h' \
14652 | sed -e "$gl_make_literal_regex_sed"`
14653 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14654 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14655 s|^/[^/]|//&|
14656 p
14657 q
14658 }'
14659 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14660 sed -n "$gl_absolute_header_sed"`'"'
14661
14662
14663fi
14664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
14665$as_echo "$gl_cv_next_stddef_h" >&6; }
14666 fi
14667 NEXT_STDDEF_H=$gl_cv_next_stddef_h
14668
14669 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14670 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14671 gl_next_as_first_directive='<'stddef.h'>'
14672 else
14673 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14674 gl_next_as_first_directive=$gl_cv_next_stddef_h
14675 fi
14676 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
14677
14678
14679
14680
14681 fi
14682
14683
14684
14685
14686
14687 gl_threads_api=none
14688 LIBTHREAD=
14689 LTLIBTHREAD=
14690 LIBMULTITHREAD=
14691 LTLIBMULTITHREAD=
14692 if test "$gl_use_threads" != no; then
14693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14694$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
14695if ${gl_cv_have_weak+:} false; then :
14696 $as_echo_n "(cached) " >&6
14697else
14698 gl_cv_have_weak=no
14699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14700/* end confdefs.h. */
14701extern void xyzzy ();
14702#pragma weak xyzzy
14703int
14704main ()
14705{
14706xyzzy();
14707 ;
14708 return 0;
14709}
14710_ACEOF
14711if ac_fn_c_try_link "$LINENO"; then :
14712 gl_cv_have_weak=maybe
14713fi
14714rm -f core conftest.err conftest.$ac_objext \
14715 conftest$ac_exeext conftest.$ac_ext
14716 if test $gl_cv_have_weak = maybe; then
14717 if test "$cross_compiling" = yes; then :
14718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14719/* end confdefs.h. */
14720#ifdef __ELF__
14721 Extensible Linking Format
14722 #endif
14723
14724_ACEOF
14725if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14726 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
14727 gl_cv_have_weak="guessing yes"
14728else
14729 gl_cv_have_weak="guessing no"
14730fi
14731rm -f conftest*
14732
14733
14734else
14735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14736/* end confdefs.h. */
14737
14738#include <stdio.h>
14739#pragma weak fputs
14740int main ()
14741{
14742 return (fputs == NULL);
14743}
14744_ACEOF
14745if ac_fn_c_try_run "$LINENO"; then :
14746 gl_cv_have_weak=yes
14747else
14748 gl_cv_have_weak=no
14749fi
14750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14751 conftest.$ac_objext conftest.beam conftest.$ac_ext
14752fi
14753
14754 fi
14755
14756fi
14757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14758$as_echo "$gl_cv_have_weak" >&6; }
14759 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
14760 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14761 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
14762 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14763if test "x$ac_cv_header_pthread_h" = xyes; then :
14764 gl_have_pthread_h=yes
14765else
14766 gl_have_pthread_h=no
14767fi
14768
14769
14770 if test "$gl_have_pthread_h" = yes; then
14771 # Other possible tests:
14772 # -lpthreads (FSU threads, PCthreads)
14773 # -lgthreads
14774 gl_have_pthread=
14775 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14776 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14777 # the second one only in libpthread, and lock.c needs it.
14778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14779/* end confdefs.h. */
14780#include <pthread.h>
14781int
14782main ()
14783{
14784pthread_mutex_lock((pthread_mutex_t*)0);
14785 pthread_mutexattr_init((pthread_mutexattr_t*)0);
14786 ;
14787 return 0;
14788}
14789_ACEOF
14790if ac_fn_c_try_link "$LINENO"; then :
14791 gl_have_pthread=yes
14792fi
14793rm -f core conftest.err conftest.$ac_objext \
14794 conftest$ac_exeext conftest.$ac_ext
14795 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14796 # since it is defined as a macro on OSF/1.)
14797 if test -n "$gl_have_pthread"; then
14798 # The program links fine without libpthread. But it may actually
14799 # need to link with libpthread in order to create multiple threads.
14800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14801$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14802if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14803 $as_echo_n "(cached) " >&6
14804else
14805 ac_check_lib_save_LIBS=$LIBS
14806LIBS="-lpthread $LIBS"
14807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14808/* end confdefs.h. */
14809
14810/* Override any GCC internal prototype to avoid an error.
14811 Use char because int might match the return type of a GCC
14812 builtin and then its argument prototype would still apply. */
14813#ifdef __cplusplus
14814extern "C"
14815#endif
14816char pthread_kill ();
14817int
14818main ()
14819{
14820return pthread_kill ();
14821 ;
14822 return 0;
14823}
14824_ACEOF
14825if ac_fn_c_try_link "$LINENO"; then :
14826 ac_cv_lib_pthread_pthread_kill=yes
14827else
14828 ac_cv_lib_pthread_pthread_kill=no
14829fi
14830rm -f core conftest.err conftest.$ac_objext \
14831 conftest$ac_exeext conftest.$ac_ext
14832LIBS=$ac_check_lib_save_LIBS
14833fi
14834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14835$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14836if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14837 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
14838 # On Solaris and HP-UX, most pthread functions exist also in libc.
14839 # Therefore pthread_in_use() needs to actually try to create a
14840 # thread: pthread_create from libc will fail, whereas
14841 # pthread_create will actually create a thread.
14842 case "$host_os" in
14843 solaris* | hpux*)
14844
14845$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14846
14847 esac
14848
14849fi
14850
14851 else
14852 # Some library is needed. Try libpthread and libc_r.
14853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14854$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14855if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14856 $as_echo_n "(cached) " >&6
14857else
14858 ac_check_lib_save_LIBS=$LIBS
14859LIBS="-lpthread $LIBS"
14860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14861/* end confdefs.h. */
14862
14863/* Override any GCC internal prototype to avoid an error.
14864 Use char because int might match the return type of a GCC
14865 builtin and then its argument prototype would still apply. */
14866#ifdef __cplusplus
14867extern "C"
14868#endif
14869char pthread_kill ();
14870int
14871main ()
14872{
14873return pthread_kill ();
14874 ;
14875 return 0;
14876}
14877_ACEOF
14878if ac_fn_c_try_link "$LINENO"; then :
14879 ac_cv_lib_pthread_pthread_kill=yes
14880else
14881 ac_cv_lib_pthread_pthread_kill=no
14882fi
14883rm -f core conftest.err conftest.$ac_objext \
14884 conftest$ac_exeext conftest.$ac_ext
14885LIBS=$ac_check_lib_save_LIBS
14886fi
14887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14888$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14889if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14890 gl_have_pthread=yes
14891 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
14892 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
14893fi
14894
14895 if test -z "$gl_have_pthread"; then
14896 # For FreeBSD 4.
14897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
14898$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
14899if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
14900 $as_echo_n "(cached) " >&6
14901else
14902 ac_check_lib_save_LIBS=$LIBS
14903LIBS="-lc_r $LIBS"
14904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14905/* end confdefs.h. */
14906
14907/* Override any GCC internal prototype to avoid an error.
14908 Use char because int might match the return type of a GCC
14909 builtin and then its argument prototype would still apply. */
14910#ifdef __cplusplus
14911extern "C"
14912#endif
14913char pthread_kill ();
14914int
14915main ()
14916{
14917return pthread_kill ();
14918 ;
14919 return 0;
14920}
14921_ACEOF
14922if ac_fn_c_try_link "$LINENO"; then :
14923 ac_cv_lib_c_r_pthread_kill=yes
14924else
14925 ac_cv_lib_c_r_pthread_kill=no
14926fi
14927rm -f core conftest.err conftest.$ac_objext \
14928 conftest$ac_exeext conftest.$ac_ext
14929LIBS=$ac_check_lib_save_LIBS
14930fi
14931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
14932$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
14933if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
14934 gl_have_pthread=yes
14935 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
14936 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
14937fi
14938
14939 fi
14940 fi
14941 if test -n "$gl_have_pthread"; then
14942 gl_threads_api=posix
14943
14944$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
14945
14946 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14947 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14948
14949$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
14950
14951 LIBTHREAD=
14952 LTLIBTHREAD=
14953 fi
14954 fi
14955 fi
14956 fi
14957 fi
14958 if test -z "$gl_have_pthread"; then
14959 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
14960 gl_have_solaristhread=
14961 gl_save_LIBS="$LIBS"
14962 LIBS="$LIBS -lthread"
14963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14964/* end confdefs.h. */
14965
14966#include <thread.h>
14967#include <synch.h>
14968
14969int
14970main ()
14971{
14972thr_self();
14973 ;
14974 return 0;
14975}
14976_ACEOF
14977if ac_fn_c_try_link "$LINENO"; then :
14978 gl_have_solaristhread=yes
14979fi
14980rm -f core conftest.err conftest.$ac_objext \
14981 conftest$ac_exeext conftest.$ac_ext
14982 LIBS="$gl_save_LIBS"
14983 if test -n "$gl_have_solaristhread"; then
14984 gl_threads_api=solaris
14985 LIBTHREAD=-lthread
14986 LTLIBTHREAD=-lthread
14987 LIBMULTITHREAD="$LIBTHREAD"
14988 LTLIBMULTITHREAD="$LTLIBTHREAD"
14989
14990$as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
14991
14992 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14993
14994$as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
14995
14996 LIBTHREAD=
14997 LTLIBTHREAD=
14998 fi
14999 fi
15000 fi
15001 fi
15002 if test "$gl_use_threads" = pth; then
15003 gl_save_CPPFLAGS="$CPPFLAGS"
15004
15005
15006
15007
15008
15009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
15010$as_echo_n "checking how to link with libpth... " >&6; }
15011if ${ac_cv_libpth_libs+:} false; then :
15012 $as_echo_n "(cached) " >&6
15013else
15014
15015
15016
15017
15018
15019
15020
15021
15022 use_additional=yes
15023
15024 acl_save_prefix="$prefix"
15025 prefix="$acl_final_prefix"
15026 acl_save_exec_prefix="$exec_prefix"
15027 exec_prefix="$acl_final_exec_prefix"
15028
15029 eval additional_includedir=\"$includedir\"
15030 eval additional_libdir=\"$libdir\"
15031
15032 exec_prefix="$acl_save_exec_prefix"
15033 prefix="$acl_save_prefix"
15034
15035
15036# Check whether --with-libpth-prefix was given.
15037if test "${with_libpth_prefix+set}" = set; then :
15038 withval=$with_libpth_prefix;
15039 if test "X$withval" = "Xno"; then
15040 use_additional=no
15041 else
15042 if test "X$withval" = "X"; then
15043
15044 acl_save_prefix="$prefix"
15045 prefix="$acl_final_prefix"
15046 acl_save_exec_prefix="$exec_prefix"
15047 exec_prefix="$acl_final_exec_prefix"
15048
15049 eval additional_includedir=\"$includedir\"
15050 eval additional_libdir=\"$libdir\"
15051
15052 exec_prefix="$acl_save_exec_prefix"
15053 prefix="$acl_save_prefix"
15054
15055 else
15056 additional_includedir="$withval/include"
15057 additional_libdir="$withval/$acl_libdirstem"
15058 if test "$acl_libdirstem2" != "$acl_libdirstem" \
15059 && ! test -d "$withval/$acl_libdirstem"; then
15060 additional_libdir="$withval/$acl_libdirstem2"
15061 fi
15062 fi
15063 fi
15064
15065fi
15066
15067 LIBPTH=
15068 LTLIBPTH=
15069 INCPTH=
15070 LIBPTH_PREFIX=
15071 HAVE_LIBPTH=
15072 rpathdirs=
15073 ltrpathdirs=
15074 names_already_handled=
15075 names_next_round='pth '
15076 while test -n "$names_next_round"; do
15077 names_this_round="$names_next_round"
15078 names_next_round=
15079 for name in $names_this_round; do
15080 already_handled=
15081 for n in $names_already_handled; do
15082 if test "$n" = "$name"; then
15083 already_handled=yes
15084 break
15085 fi
15086 done
15087 if test -z "$already_handled"; then
15088 names_already_handled="$names_already_handled $name"
15089 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
15090 eval value=\"\$HAVE_LIB$uppername\"
15091 if test -n "$value"; then
15092 if test "$value" = yes; then
15093 eval value=\"\$LIB$uppername\"
15094 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
15095 eval value=\"\$LTLIB$uppername\"
15096 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
15097 else
15098 :
15099 fi
15100 else
15101 found_dir=
15102 found_la=
15103 found_so=
15104 found_a=
15105 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
15106 if test -n "$acl_shlibext"; then
15107 shrext=".$acl_shlibext" # typically: shrext=.so
15108 else
15109 shrext=
15110 fi
15111 if test $use_additional = yes; then
15112 dir="$additional_libdir"
15113 if test -n "$acl_shlibext"; then
15114 if test -f "$dir/$libname$shrext"; then
15115 found_dir="$dir"
15116 found_so="$dir/$libname$shrext"
15117 else
15118 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
15119 ver=`(cd "$dir" && \
15120 for f in "$libname$shrext".*; do echo "$f"; done \
15121 | sed -e "s,^$libname$shrext\\\\.,," \
15122 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
15123 | sed 1q ) 2>/dev/null`
15124 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
15125 found_dir="$dir"
15126 found_so="$dir/$libname$shrext.$ver"
15127 fi
15128 else
15129 eval library_names=\"$acl_library_names_spec\"
15130 for f in $library_names; do
15131 if test -f "$dir/$f"; then
15132 found_dir="$dir"
15133 found_so="$dir/$f"
15134 break
15135 fi
15136 done
15137 fi
15138 fi
15139 fi
15140 if test "X$found_dir" = "X"; then
15141 if test -f "$dir/$libname.$acl_libext"; then
15142 found_dir="$dir"
15143 found_a="$dir/$libname.$acl_libext"
15144 fi
15145 fi
15146 if test "X$found_dir" != "X"; then
15147 if test -f "$dir/$libname.la"; then
15148 found_la="$dir/$libname.la"
15149 fi
15150 fi
15151 fi
15152 if test "X$found_dir" = "X"; then
15153 for x in $LDFLAGS $LTLIBPTH; do
15154
15155 acl_save_prefix="$prefix"
15156 prefix="$acl_final_prefix"
15157 acl_save_exec_prefix="$exec_prefix"
15158 exec_prefix="$acl_final_exec_prefix"
15159 eval x=\"$x\"
15160 exec_prefix="$acl_save_exec_prefix"
15161 prefix="$acl_save_prefix"
15162
15163 case "$x" in
15164 -L*)
15165 dir=`echo "X$x" | sed -e 's/^X-L//'`
15166 if test -n "$acl_shlibext"; then
15167 if test -f "$dir/$libname$shrext"; then
15168 found_dir="$dir"
15169 found_so="$dir/$libname$shrext"
15170 else
15171 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
15172 ver=`(cd "$dir" && \
15173 for f in "$libname$shrext".*; do echo "$f"; done \
15174 | sed -e "s,^$libname$shrext\\\\.,," \
15175 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
15176 | sed 1q ) 2>/dev/null`
15177 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
15178 found_dir="$dir"
15179 found_so="$dir/$libname$shrext.$ver"
15180 fi
15181 else
15182 eval library_names=\"$acl_library_names_spec\"
15183 for f in $library_names; do
15184 if test -f "$dir/$f"; then
15185 found_dir="$dir"
15186 found_so="$dir/$f"
15187 break
15188 fi
15189 done
15190 fi
15191 fi
15192 fi
15193 if test "X$found_dir" = "X"; then
15194 if test -f "$dir/$libname.$acl_libext"; then
15195 found_dir="$dir"
15196 found_a="$dir/$libname.$acl_libext"
15197 fi
15198 fi
15199 if test "X$found_dir" != "X"; then
15200 if test -f "$dir/$libname.la"; then
15201 found_la="$dir/$libname.la"
15202 fi
15203 fi
15204 ;;
15205 esac
15206 if test "X$found_dir" != "X"; then
15207 break
15208 fi
15209 done
15210 fi
15211 if test "X$found_dir" != "X"; then
15212 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
15213 if test "X$found_so" != "X"; then
15214 if test "$enable_rpath" = no \
15215 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
15216 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
15217 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15218 else
15219 haveit=
15220 for x in $ltrpathdirs; do
15221 if test "X$x" = "X$found_dir"; then
15222 haveit=yes
15223 break
15224 fi
15225 done
15226 if test -z "$haveit"; then
15227 ltrpathdirs="$ltrpathdirs $found_dir"
15228 fi
15229 if test "$acl_hardcode_direct" = yes; then
15230 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15231 else
15232 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
15233 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15234 haveit=
15235 for x in $rpathdirs; do
15236 if test "X$x" = "X$found_dir"; then
15237 haveit=yes
15238 break
15239 fi
15240 done
15241 if test -z "$haveit"; then
15242 rpathdirs="$rpathdirs $found_dir"
15243 fi
15244 else
15245 haveit=
15246 for x in $LDFLAGS $LIBPTH; do
15247
15248 acl_save_prefix="$prefix"
15249 prefix="$acl_final_prefix"
15250 acl_save_exec_prefix="$exec_prefix"
15251 exec_prefix="$acl_final_exec_prefix"
15252 eval x=\"$x\"
15253 exec_prefix="$acl_save_exec_prefix"
15254 prefix="$acl_save_prefix"
15255
15256 if test "X$x" = "X-L$found_dir"; then
15257 haveit=yes
15258 break
15259 fi
15260 done
15261 if test -z "$haveit"; then
15262 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
15263 fi
15264 if test "$acl_hardcode_minus_L" != no; then
15265 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15266 else
15267 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
15268 fi
15269 fi
15270 fi
15271 fi
15272 else
15273 if test "X$found_a" != "X"; then
15274 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
15275 else
15276 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
15277 fi
15278 fi
15279 additional_includedir=
15280 case "$found_dir" in
15281 */$acl_libdirstem | */$acl_libdirstem/)
15282 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
15283 if test "$name" = 'pth'; then
15284 LIBPTH_PREFIX="$basedir"
15285 fi
15286 additional_includedir="$basedir/include"
15287 ;;
15288 */$acl_libdirstem2 | */$acl_libdirstem2/)
15289 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
15290 if test "$name" = 'pth'; then
15291 LIBPTH_PREFIX="$basedir"
15292 fi
15293 additional_includedir="$basedir/include"
15294 ;;
15295 esac
15296 if test "X$additional_includedir" != "X"; then
15297 if test "X$additional_includedir" != "X/usr/include"; then
15298 haveit=
15299 if test "X$additional_includedir" = "X/usr/local/include"; then
15300 if test -n "$GCC"; then
15301 case $host_os in
15302 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
15303 esac
15304 fi
15305 fi
15306 if test -z "$haveit"; then
15307 for x in $CPPFLAGS $INCPTH; do
15308
15309 acl_save_prefix="$prefix"
15310 prefix="$acl_final_prefix"
15311 acl_save_exec_prefix="$exec_prefix"
15312 exec_prefix="$acl_final_exec_prefix"
15313 eval x=\"$x\"
15314 exec_prefix="$acl_save_exec_prefix"
15315 prefix="$acl_save_prefix"
15316
15317 if test "X$x" = "X-I$additional_includedir"; then
15318 haveit=yes
15319 break
15320 fi
15321 done
15322 if test -z "$haveit"; then
15323 if test -d "$additional_includedir"; then
15324 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
15325 fi
15326 fi
15327 fi
15328 fi
15329 fi
15330 if test -n "$found_la"; then
15331 save_libdir="$libdir"
15332 case "$found_la" in
15333 */* | *\\*) . "$found_la" ;;
15334 *) . "./$found_la" ;;
15335 esac
15336 libdir="$save_libdir"
15337 for dep in $dependency_libs; do
15338 case "$dep" in
15339 -L*)
15340 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15341 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
15342 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
15343 haveit=
15344 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
15345 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
15346 if test -n "$GCC"; then
15347 case $host_os in
15348 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
15349 esac
15350 fi
15351 fi
15352 if test -z "$haveit"; then
15353 haveit=
15354 for x in $LDFLAGS $LIBPTH; do
15355
15356 acl_save_prefix="$prefix"
15357 prefix="$acl_final_prefix"
15358 acl_save_exec_prefix="$exec_prefix"
15359 exec_prefix="$acl_final_exec_prefix"
15360 eval x=\"$x\"
15361 exec_prefix="$acl_save_exec_prefix"
15362 prefix="$acl_save_prefix"
15363
15364 if test "X$x" = "X-L$additional_libdir"; then
15365 haveit=yes
15366 break
15367 fi
15368 done
15369 if test -z "$haveit"; then
15370 if test -d "$additional_libdir"; then
15371 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
15372 fi
15373 fi
15374 haveit=
15375 for x in $LDFLAGS $LTLIBPTH; do
15376
15377 acl_save_prefix="$prefix"
15378 prefix="$acl_final_prefix"
15379 acl_save_exec_prefix="$exec_prefix"
15380 exec_prefix="$acl_final_exec_prefix"
15381 eval x=\"$x\"
15382 exec_prefix="$acl_save_exec_prefix"
15383 prefix="$acl_save_prefix"
15384
15385 if test "X$x" = "X-L$additional_libdir"; then
15386 haveit=yes
15387 break
15388 fi
15389 done
15390 if test -z "$haveit"; then
15391 if test -d "$additional_libdir"; then
15392 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
15393 fi
15394 fi
15395 fi
15396 fi
15397 ;;
15398 -R*)
15399 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15400 if test "$enable_rpath" != no; then
15401 haveit=
15402 for x in $rpathdirs; do
15403 if test "X$x" = "X$dir"; then
15404 haveit=yes
15405 break
15406 fi
15407 done
15408 if test -z "$haveit"; then
15409 rpathdirs="$rpathdirs $dir"
15410 fi
15411 haveit=
15412 for x in $ltrpathdirs; do
15413 if test "X$x" = "X$dir"; then
15414 haveit=yes
15415 break
15416 fi
15417 done
15418 if test -z "$haveit"; then
15419 ltrpathdirs="$ltrpathdirs $dir"
15420 fi
15421 fi
15422 ;;
15423 -l*)
15424 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15425 ;;
15426 *.la)
15427 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15428 ;;
15429 *)
15430 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
15431 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
15432 ;;
15433 esac
15434 done
15435 fi
15436 else
15437 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
15438 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
15439 fi
15440 fi
15441 fi
15442 done
15443 done
15444 if test "X$rpathdirs" != "X"; then
15445 if test -n "$acl_hardcode_libdir_separator"; then
15446 alldirs=
15447 for found_dir in $rpathdirs; do
15448 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
15449 done
15450 acl_save_libdir="$libdir"
15451 libdir="$alldirs"
15452 eval flag=\"$acl_hardcode_libdir_flag_spec\"
15453 libdir="$acl_save_libdir"
15454 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
15455 else
15456 for found_dir in $rpathdirs; do
15457 acl_save_libdir="$libdir"
15458 libdir="$found_dir"
15459 eval flag=\"$acl_hardcode_libdir_flag_spec\"
15460 libdir="$acl_save_libdir"
15461 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
15462 done
15463 fi
15464 fi
15465 if test "X$ltrpathdirs" != "X"; then
15466 for found_dir in $ltrpathdirs; do
15467 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
15468 done
15469 fi
15470
15471
15472
15473
15474
15475
15476 ac_cv_libpth_libs="$LIBPTH"
15477 ac_cv_libpth_ltlibs="$LTLIBPTH"
15478 ac_cv_libpth_cppflags="$INCPTH"
15479 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
15480
15481fi
15482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
15483$as_echo "$ac_cv_libpth_libs" >&6; }
15484 LIBPTH="$ac_cv_libpth_libs"
15485 LTLIBPTH="$ac_cv_libpth_ltlibs"
15486 INCPTH="$ac_cv_libpth_cppflags"
15487 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
15488
15489 for element in $INCPTH; do
15490 haveit=
15491 for x in $CPPFLAGS; do
15492
15493 acl_save_prefix="$prefix"
15494 prefix="$acl_final_prefix"
15495 acl_save_exec_prefix="$exec_prefix"
15496 exec_prefix="$acl_final_exec_prefix"
15497 eval x=\"$x\"
15498 exec_prefix="$acl_save_exec_prefix"
15499 prefix="$acl_save_prefix"
15500
15501 if test "X$x" = "X$element"; then
15502 haveit=yes
15503 break
15504 fi
15505 done
15506 if test -z "$haveit"; then
15507 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15508 fi
15509 done
15510
15511
15512
15513
15514 HAVE_LIBPTH=yes
15515
15516
15517
15518 gl_have_pth=
15519 gl_save_LIBS="$LIBS"
15520 LIBS="$LIBS $LIBPTH"
15521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15522/* end confdefs.h. */
15523#include <pth.h>
15524int
15525main ()
15526{
15527pth_self();
15528 ;
15529 return 0;
15530}
15531_ACEOF
15532if ac_fn_c_try_link "$LINENO"; then :
15533 gl_have_pth=yes
15534fi
15535rm -f core conftest.err conftest.$ac_objext \
15536 conftest$ac_exeext conftest.$ac_ext
15537 LIBS="$gl_save_LIBS"
15538 if test -n "$gl_have_pth"; then
15539 gl_threads_api=pth
15540 LIBTHREAD="$LIBPTH"
15541 LTLIBTHREAD="$LTLIBPTH"
15542 LIBMULTITHREAD="$LIBTHREAD"
15543 LTLIBMULTITHREAD="$LTLIBTHREAD"
15544
15545$as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
15546
15547 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
15548 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15549
15550$as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
15551
15552 LIBTHREAD=
15553 LTLIBTHREAD=
15554 fi
15555 fi
15556 else
15557 CPPFLAGS="$gl_save_CPPFLAGS"
15558 fi
15559 fi
15560 if test -z "$gl_have_pthread"; then
15561 case "$gl_use_threads" in
15562 yes | windows | win32) # The 'win32' is for backward compatibility.
15563 if { case "$host_os" in
15564 mingw*) true;;
15565 *) false;;
15566 esac
15567 }; then
15568 gl_threads_api=windows
15569
15570$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
15571
15572 fi
15573 ;;
15574 esac
15575 fi
15576 fi
15577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
15578$as_echo_n "checking for multithread API to use... " >&6; }
15579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
15580$as_echo "$gl_threads_api" >&6; }
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
15594$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
15595if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
15596 $as_echo_n "(cached) " >&6
15597else
15598 rm -f conftest.sym conftest.file
15599 echo >conftest.file
15600 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
15601 if test "$cross_compiling" = yes; then :
15602 case "$host_os" in
15603 # Guess yes on glibc systems.
15604 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
15605 # If we don't know, assume the worst.
15606 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
15607 esac
15608
15609else
15610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15611/* end confdefs.h. */
15612$ac_includes_default
15613int
15614main ()
15615{
15616struct stat sbuf;
15617 /* Linux will dereference the symlink and fail, as required by
15618 POSIX. That is better in the sense that it means we will not
15619 have to compile and use the lstat wrapper. */
15620 return lstat ("conftest.sym/", &sbuf) == 0;
15621
15622 ;
15623 return 0;
15624}
15625_ACEOF
15626if ac_fn_c_try_run "$LINENO"; then :
15627 gl_cv_func_lstat_dereferences_slashed_symlink=yes
15628else
15629 gl_cv_func_lstat_dereferences_slashed_symlink=no
15630fi
15631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15632 conftest.$ac_objext conftest.beam conftest.$ac_ext
15633fi
15634
15635 else
15636 # If the 'ln -s' command failed, then we probably don't even
15637 # have an lstat function.
15638 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
15639 fi
15640 rm -f conftest.sym conftest.file
15641
15642fi
15643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
15644$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
15645 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
15646 *yes)
15647
15648cat >>confdefs.h <<_ACEOF
15649#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
15650_ACEOF
15651
15652 ;;
15653 esac
15654
15655
15656 GNULIB__EXIT=0;
15657 GNULIB_ATOLL=0;
15658 GNULIB_CALLOC_POSIX=0;
15659 GNULIB_CANONICALIZE_FILE_NAME=0;
15660 GNULIB_GETLOADAVG=0;
15661 GNULIB_GETSUBOPT=0;
15662 GNULIB_GRANTPT=0;
15663 GNULIB_MALLOC_POSIX=0;
15664 GNULIB_MBTOWC=0;
15665 GNULIB_MKDTEMP=0;
15666 GNULIB_MKOSTEMP=0;
15667 GNULIB_MKOSTEMPS=0;
15668 GNULIB_MKSTEMP=0;
15669 GNULIB_MKSTEMPS=0;
15670 GNULIB_POSIX_OPENPT=0;
15671 GNULIB_PTSNAME=0;
15672 GNULIB_PTSNAME_R=0;
15673 GNULIB_PUTENV=0;
15674 GNULIB_RANDOM=0;
15675 GNULIB_RANDOM_R=0;
15676 GNULIB_REALLOC_POSIX=0;
15677 GNULIB_REALPATH=0;
15678 GNULIB_RPMATCH=0;
15679 GNULIB_SETENV=0;
15680 GNULIB_STRTOD=0;
15681 GNULIB_STRTOLL=0;
15682 GNULIB_STRTOULL=0;
15683 GNULIB_SYSTEM_POSIX=0;
15684 GNULIB_UNLOCKPT=0;
15685 GNULIB_UNSETENV=0;
15686 GNULIB_WCTOMB=0;
15687 HAVE__EXIT=1;
15688 HAVE_ATOLL=1;
15689 HAVE_CANONICALIZE_FILE_NAME=1;
15690 HAVE_DECL_GETLOADAVG=1;
15691 HAVE_GETSUBOPT=1;
15692 HAVE_GRANTPT=1;
15693 HAVE_MKDTEMP=1;
15694 HAVE_MKOSTEMP=1;
15695 HAVE_MKOSTEMPS=1;
15696 HAVE_MKSTEMP=1;
15697 HAVE_MKSTEMPS=1;
15698 HAVE_POSIX_OPENPT=1;
15699 HAVE_PTSNAME=1;
15700 HAVE_PTSNAME_R=1;
15701 HAVE_RANDOM=1;
15702 HAVE_RANDOM_H=1;
15703 HAVE_RANDOM_R=1;
15704 HAVE_REALPATH=1;
15705 HAVE_RPMATCH=1;
15706 HAVE_SETENV=1;
15707 HAVE_DECL_SETENV=1;
15708 HAVE_STRTOD=1;
15709 HAVE_STRTOLL=1;
15710 HAVE_STRTOULL=1;
15711 HAVE_STRUCT_RANDOM_DATA=1;
15712 HAVE_SYS_LOADAVG_H=0;
15713 HAVE_UNLOCKPT=1;
15714 HAVE_DECL_UNSETENV=1;
15715 REPLACE_CALLOC=0;
15716 REPLACE_CANONICALIZE_FILE_NAME=0;
15717 REPLACE_MALLOC=0;
15718 REPLACE_MBTOWC=0;
15719 REPLACE_MKSTEMP=0;
15720 REPLACE_PTSNAME_R=0;
15721 REPLACE_PUTENV=0;
15722 REPLACE_RANDOM_R=0;
15723 REPLACE_REALLOC=0;
15724 REPLACE_REALPATH=0;
15725 REPLACE_SETENV=0;
15726 REPLACE_STRTOD=0;
15727 REPLACE_UNSETENV=0;
15728 REPLACE_WCTOMB=0;
15729
15730
15731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
15732$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
15733if ${gl_cv_func_malloc_posix+:} false; then :
15734 $as_echo_n "(cached) " >&6
15735else
15736
15737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15738/* end confdefs.h. */
15739
15740int
15741main ()
15742{
15743#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
15744 choke me
15745 #endif
15746
15747 ;
15748 return 0;
15749}
15750_ACEOF
15751if ac_fn_c_try_compile "$LINENO"; then :
15752 gl_cv_func_malloc_posix=yes
15753else
15754 gl_cv_func_malloc_posix=no
15755fi
15756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15757
15758fi
15759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
15760$as_echo "$gl_cv_func_malloc_posix" >&6; }
15761
15762
15763
15764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
15765$as_echo_n "checking for mbstate_t... " >&6; }
15766if ${ac_cv_type_mbstate_t+:} false; then :
15767 $as_echo_n "(cached) " >&6
15768else
15769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15770/* end confdefs.h. */
15771$ac_includes_default
15772/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15773 <wchar.h>.
15774 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15775 included before <wchar.h>. */
15776#include <stddef.h>
15777#include <stdio.h>
15778#include <time.h>
15779#include <wchar.h>
15780int
15781main ()
15782{
15783mbstate_t x; return sizeof x;
15784 ;
15785 return 0;
15786}
15787_ACEOF
15788if ac_fn_c_try_compile "$LINENO"; then :
15789 ac_cv_type_mbstate_t=yes
15790else
15791 ac_cv_type_mbstate_t=no
15792fi
15793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15794fi
15795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
15796$as_echo "$ac_cv_type_mbstate_t" >&6; }
15797 if test $ac_cv_type_mbstate_t = yes; then
15798
15799$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
15800
15801 else
15802
15803$as_echo "#define mbstate_t int" >>confdefs.h
15804
15805 fi
15806
15807
15808
15809
15810
15811
15812
15813
15814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
15815$as_echo_n "checking for a traditional japanese locale... " >&6; }
15816if ${gt_cv_locale_ja+:} false; then :
15817 $as_echo_n "(cached) " >&6
15818else
15819
15820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15821/* end confdefs.h. */
15822
15823#include <locale.h>
15824#include <time.h>
15825#if HAVE_LANGINFO_CODESET
15826# include <langinfo.h>
15827#endif
15828#include <stdlib.h>
15829#include <string.h>
15830struct tm t;
15831char buf[16];
15832int main ()
15833{
15834 const char *p;
15835 /* Check whether the given locale name is recognized by the system. */
15836#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
15837 /* On native Windows, setlocale(category, "") looks at the system settings,
15838 not at the environment variables. Also, when an encoding suffix such
15839 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15840 category of the locale to "C". */
15841 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15842 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15843 return 1;
15844#else
15845 if (setlocale (LC_ALL, "") == NULL) return 1;
15846#endif
15847 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15848 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15849 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15850 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15851 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15852 some unit tests fail.
15853 On MirBSD 10, when an unsupported locale is specified, setlocale()
15854 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15855#if HAVE_LANGINFO_CODESET
15856 {
15857 const char *cs = nl_langinfo (CODESET);
15858 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15859 || strcmp (cs, "UTF-8") == 0)
15860 return 1;
15861 }
15862#endif
15863#ifdef __CYGWIN__
15864 /* On Cygwin, avoid locale names without encoding suffix, because the
15865 locale_charset() function relies on the encoding suffix. Note that
15866 LC_ALL is set on the command line. */
15867 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15868#endif
15869 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
15870 on Cygwin 1.5.x. */
15871 if (MB_CUR_MAX == 1)
15872 return 1;
15873 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15874 This excludes the UTF-8 encoding (except on MirBSD). */
15875 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15876 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15877 for (p = buf; *p != '\0'; p++)
15878 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15879 return 1;
15880 return 0;
15881}
15882
15883_ACEOF
15884 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15885 (eval $ac_link) 2>&5
15886 ac_status=$?
15887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15888 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15889 case "$host_os" in
15890 # Handle native Windows specially, because there setlocale() interprets
15891 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15892 # "fr" or "fra" as "French" or "French_France.1252",
15893 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15894 # "ja" as "Japanese" or "Japanese_Japan.932",
15895 # and similar.
15896 mingw*)
15897 # Note that on native Windows, the Japanese locale is
15898 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
15899 # cannot use it here.
15900 gt_cv_locale_ja=none
15901 ;;
15902 *)
15903 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15904 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15905 # configure script would override the LC_ALL setting. Likewise for
15906 # LC_CTYPE, which is also set at the beginning of the configure script.
15907 # Test for the AIX locale name.
15908 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15909 gt_cv_locale_ja=ja_JP
15910 else
15911 # Test for the locale name with explicit encoding suffix.
15912 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15913 gt_cv_locale_ja=ja_JP.EUC-JP
15914 else
15915 # Test for the HP-UX, OSF/1, NetBSD locale name.
15916 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15917 gt_cv_locale_ja=ja_JP.eucJP
15918 else
15919 # Test for the IRIX, FreeBSD locale name.
15920 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15921 gt_cv_locale_ja=ja_JP.EUC
15922 else
15923 # Test for the Solaris 7 locale name.
15924 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15925 gt_cv_locale_ja=ja
15926 else
15927 # Special test for NetBSD 1.6.
15928 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
15929 gt_cv_locale_ja=ja_JP.eucJP
15930 else
15931 # None found.
15932 gt_cv_locale_ja=none
15933 fi
15934 fi
15935 fi
15936 fi
15937 fi
15938 fi
15939 ;;
15940 esac
15941 fi
15942 rm -fr conftest*
15943
15944fi
15945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
15946$as_echo "$gt_cv_locale_ja" >&6; }
15947 LOCALE_JA=$gt_cv_locale_ja
15948
15949
15950
15951
15952
15953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
15954$as_echo_n "checking for a transitional chinese locale... " >&6; }
15955if ${gt_cv_locale_zh_CN+:} false; then :
15956 $as_echo_n "(cached) " >&6
15957else
15958
15959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15960/* end confdefs.h. */
15961
15962#include <locale.h>
15963#include <stdlib.h>
15964#include <time.h>
15965#if HAVE_LANGINFO_CODESET
15966# include <langinfo.h>
15967#endif
15968#include <stdlib.h>
15969#include <string.h>
15970struct tm t;
15971char buf[16];
15972int main ()
15973{
15974 const char *p;
15975 /* Check whether the given locale name is recognized by the system. */
15976#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
15977 /* On native Windows, setlocale(category, "") looks at the system settings,
15978 not at the environment variables. Also, when an encoding suffix such
15979 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15980 category of the locale to "C". */
15981 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15982 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15983 return 1;
15984#else
15985 if (setlocale (LC_ALL, "") == NULL) return 1;
15986#endif
15987 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15988 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15989 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15990 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15991 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15992 some unit tests fail.
15993 On MirBSD 10, when an unsupported locale is specified, setlocale()
15994 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15995#if HAVE_LANGINFO_CODESET
15996 {
15997 const char *cs = nl_langinfo (CODESET);
15998 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15999 || strcmp (cs, "UTF-8") == 0)
16000 return 1;
16001 }
16002#endif
16003#ifdef __CYGWIN__
16004 /* On Cygwin, avoid locale names without encoding suffix, because the
16005 locale_charset() function relies on the encoding suffix. Note that
16006 LC_ALL is set on the command line. */
16007 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
16008#endif
16009 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
16010 This excludes the UTF-8 encoding (except on MirBSD). */
16011 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
16012 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
16013 for (p = buf; *p != '\0'; p++)
16014 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
16015 return 1;
16016 /* Check whether a typical GB18030 multibyte sequence is recognized as a
16017 single wide character. This excludes the GB2312 and GBK encodings. */
16018 if (mblen ("\203\062\332\066", 5) != 4)
16019 return 1;
16020 return 0;
16021}
16022
16023_ACEOF
16024 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16025 (eval $ac_link) 2>&5
16026 ac_status=$?
16027 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16028 test $ac_status = 0; } && test -s conftest$ac_exeext; then
16029 case "$host_os" in
16030 # Handle native Windows specially, because there setlocale() interprets
16031 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
16032 # "fr" or "fra" as "French" or "French_France.1252",
16033 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
16034 # "ja" as "Japanese" or "Japanese_Japan.932",
16035 # and similar.
16036 mingw*)
16037 # Test for the hypothetical native Windows locale name.
16038 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16039 gt_cv_locale_zh_CN=Chinese_China.54936
16040 else
16041 # None found.
16042 gt_cv_locale_zh_CN=none
16043 fi
16044 ;;
16045 solaris2.8)
16046 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
16047 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
16048 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
16049 gt_cv_locale_zh_CN=none
16050 ;;
16051 *)
16052 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
16053 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
16054 # configure script would override the LC_ALL setting. Likewise for
16055 # LC_CTYPE, which is also set at the beginning of the configure script.
16056 # Test for the locale name without encoding suffix.
16057 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16058 gt_cv_locale_zh_CN=zh_CN
16059 else
16060 # Test for the locale name with explicit encoding suffix.
16061 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16062 gt_cv_locale_zh_CN=zh_CN.GB18030
16063 else
16064 # None found.
16065 gt_cv_locale_zh_CN=none
16066 fi
16067 fi
16068 ;;
16069 esac
16070 else
16071 # If there was a link error, due to mblen(), the system is so old that
16072 # it certainly doesn't have a chinese locale.
16073 gt_cv_locale_zh_CN=none
16074 fi
16075 rm -fr conftest*
16076
16077fi
16078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
16079$as_echo "$gt_cv_locale_zh_CN" >&6; }
16080 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
16081
16082
16083
16084
16085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
16086$as_echo_n "checking for a french Unicode locale... " >&6; }
16087if ${gt_cv_locale_fr_utf8+:} false; then :
16088 $as_echo_n "(cached) " >&6
16089else
16090
16091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16092/* end confdefs.h. */
16093
16094#include <locale.h>
16095#include <time.h>
16096#if HAVE_LANGINFO_CODESET
16097# include <langinfo.h>
16098#endif
16099#include <stdlib.h>
16100#include <string.h>
16101struct tm t;
16102char buf[16];
16103int main () {
16104 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
16105 imitates locale dependent behaviour by looking at the environment
16106 variables, and all locales use the UTF-8 encoding. */
16107#if !(defined __BEOS__ || defined __HAIKU__)
16108 /* Check whether the given locale name is recognized by the system. */
16109# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
16110 /* On native Windows, setlocale(category, "") looks at the system settings,
16111 not at the environment variables. Also, when an encoding suffix such
16112 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
16113 category of the locale to "C". */
16114 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
16115 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
16116 return 1;
16117# else
16118 if (setlocale (LC_ALL, "") == NULL) return 1;
16119# endif
16120 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
16121 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
16122 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
16123 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
16124 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
16125 some unit tests fail. */
16126# if HAVE_LANGINFO_CODESET
16127 {
16128 const char *cs = nl_langinfo (CODESET);
16129 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
16130 return 1;
16131 }
16132# endif
16133# ifdef __CYGWIN__
16134 /* On Cygwin, avoid locale names without encoding suffix, because the
16135 locale_charset() function relies on the encoding suffix. Note that
16136 LC_ALL is set on the command line. */
16137 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
16138# endif
16139 /* Check whether in the abbreviation of the second month, the second
16140 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
16141 two bytes long, with UTF-8 encoding. */
16142 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
16143 if (strftime (buf, sizeof (buf), "%b", &t) < 4
16144 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
16145 return 1;
16146#endif
16147#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
16148 /* Check whether the decimal separator is a comma.
16149 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
16150 are nl_langinfo(RADIXCHAR) are both ".". */
16151 if (localeconv () ->decimal_point[0] != ',') return 1;
16152#endif
16153 return 0;
16154}
16155
16156_ACEOF
16157 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16158 (eval $ac_link) 2>&5
16159 ac_status=$?
16160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16161 test $ac_status = 0; } && test -s conftest$ac_exeext; then
16162 case "$host_os" in
16163 # Handle native Windows specially, because there setlocale() interprets
16164 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
16165 # "fr" or "fra" as "French" or "French_France.1252",
16166 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
16167 # "ja" as "Japanese" or "Japanese_Japan.932",
16168 # and similar.
16169 mingw*)
16170 # Test for the hypothetical native Windows locale name.
16171 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16172 gt_cv_locale_fr_utf8=French_France.65001
16173 else
16174 # None found.
16175 gt_cv_locale_fr_utf8=none
16176 fi
16177 ;;
16178 *)
16179 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
16180 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
16181 # configure script would override the LC_ALL setting. Likewise for
16182 # LC_CTYPE, which is also set at the beginning of the configure script.
16183 # Test for the usual locale name.
16184 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16185 gt_cv_locale_fr_utf8=fr_FR
16186 else
16187 # Test for the locale name with explicit encoding suffix.
16188 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16189 gt_cv_locale_fr_utf8=fr_FR.UTF-8
16190 else
16191 # Test for the Solaris 7 locale name.
16192 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16193 gt_cv_locale_fr_utf8=fr.UTF-8
16194 else
16195 # None found.
16196 gt_cv_locale_fr_utf8=none
16197 fi
16198 fi
16199 fi
16200 ;;
16201 esac
16202 fi
16203 rm -fr conftest*
16204
16205fi
16206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
16207$as_echo "$gt_cv_locale_fr_utf8" >&6; }
16208 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
16209
16210
16211
16212
16213
16214
16215
16216 GNULIB_FFSL=0;
16217 GNULIB_FFSLL=0;
16218 GNULIB_MEMCHR=0;
16219 GNULIB_MEMMEM=0;
16220 GNULIB_MEMPCPY=0;
16221 GNULIB_MEMRCHR=0;
16222 GNULIB_RAWMEMCHR=0;
16223 GNULIB_STPCPY=0;
16224 GNULIB_STPNCPY=0;
16225 GNULIB_STRCHRNUL=0;
16226 GNULIB_STRDUP=0;
16227 GNULIB_STRNCAT=0;
16228 GNULIB_STRNDUP=0;
16229 GNULIB_STRNLEN=0;
16230 GNULIB_STRPBRK=0;
16231 GNULIB_STRSEP=0;
16232 GNULIB_STRSTR=0;
16233 GNULIB_STRCASESTR=0;
16234 GNULIB_STRTOK_R=0;
16235 GNULIB_MBSLEN=0;
16236 GNULIB_MBSNLEN=0;
16237 GNULIB_MBSCHR=0;
16238 GNULIB_MBSRCHR=0;
16239 GNULIB_MBSSTR=0;
16240 GNULIB_MBSCASECMP=0;
16241 GNULIB_MBSNCASECMP=0;
16242 GNULIB_MBSPCASECMP=0;
16243 GNULIB_MBSCASESTR=0;
16244 GNULIB_MBSCSPN=0;
16245 GNULIB_MBSPBRK=0;
16246 GNULIB_MBSSPN=0;
16247 GNULIB_MBSSEP=0;
16248 GNULIB_MBSTOK_R=0;
16249 GNULIB_STRERROR=0;
16250 GNULIB_STRERROR_R=0;
16251 GNULIB_STRSIGNAL=0;
16252 GNULIB_STRVERSCMP=0;
16253 HAVE_MBSLEN=0;
16254 HAVE_FFSL=1;
16255 HAVE_FFSLL=1;
16256 HAVE_MEMCHR=1;
16257 HAVE_DECL_MEMMEM=1;
16258 HAVE_MEMPCPY=1;
16259 HAVE_DECL_MEMRCHR=1;
16260 HAVE_RAWMEMCHR=1;
16261 HAVE_STPCPY=1;
16262 HAVE_STPNCPY=1;
16263 HAVE_STRCHRNUL=1;
16264 HAVE_DECL_STRDUP=1;
16265 HAVE_DECL_STRNDUP=1;
16266 HAVE_DECL_STRNLEN=1;
16267 HAVE_STRPBRK=1;
16268 HAVE_STRSEP=1;
16269 HAVE_STRCASESTR=1;
16270 HAVE_DECL_STRTOK_R=1;
16271 HAVE_DECL_STRERROR_R=1;
16272 HAVE_DECL_STRSIGNAL=1;
16273 HAVE_STRVERSCMP=1;
16274 REPLACE_MEMCHR=0;
16275 REPLACE_MEMMEM=0;
16276 REPLACE_STPNCPY=0;
16277 REPLACE_STRDUP=0;
16278 REPLACE_STRSTR=0;
16279 REPLACE_STRCASESTR=0;
16280 REPLACE_STRCHRNUL=0;
16281 REPLACE_STRERROR=0;
16282 REPLACE_STRERROR_R=0;
16283 REPLACE_STRNCAT=0;
16284 REPLACE_STRNDUP=0;
16285 REPLACE_STRNLEN=0;
16286 REPLACE_STRSIGNAL=0;
16287 REPLACE_STRTOK_R=0;
16288 UNDEFINE_STRTOK_R=0;
16289
16290
16291
16292
16293
16294 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
16295 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
16296 # irrelevant for anonymous mappings.
16297 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
16298if test "x$ac_cv_func_mmap" = xyes; then :
16299 gl_have_mmap=yes
16300else
16301 gl_have_mmap=no
16302fi
16303
16304
16305 # Try to allow MAP_ANONYMOUS.
16306 gl_have_mmap_anonymous=no
16307 if test $gl_have_mmap = yes; then
16308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
16309$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
16310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16311/* end confdefs.h. */
16312
16313#include <sys/mman.h>
16314#ifdef MAP_ANONYMOUS
16315 I cannot identify this map
16316#endif
16317
16318_ACEOF
16319if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16320 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
16321 gl_have_mmap_anonymous=yes
16322fi
16323rm -f conftest*
16324
16325 if test $gl_have_mmap_anonymous != yes; then
16326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16327/* end confdefs.h. */
16328
16329#include <sys/mman.h>
16330#ifdef MAP_ANON
16331 I cannot identify this map
16332#endif
16333
16334_ACEOF
16335if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16336 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
16337
16338$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
16339
16340 gl_have_mmap_anonymous=yes
16341fi
16342rm -f conftest*
16343
16344 fi
16345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
16346$as_echo "$gl_have_mmap_anonymous" >&6; }
16347 if test $gl_have_mmap_anonymous = yes; then
16348
16349$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
16350
16351 fi
16352 fi
16353
16354
16355
16356
16357
16358
16359 if test $HAVE_MEMCHR = 1; then
16360 # Detect platform-specific bugs in some versions of glibc:
16361 # memchr should not dereference anything with length 0
16362 # http://bugzilla.redhat.com/499689
16363 # memchr should not dereference overestimated length after a match
16364 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
16365 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
16366 # Assume that memchr works on platforms that lack mprotect.
16367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
16368$as_echo_n "checking whether memchr works... " >&6; }
16369if ${gl_cv_func_memchr_works+:} false; then :
16370 $as_echo_n "(cached) " >&6
16371else
16372 if test "$cross_compiling" = yes; then :
16373 gl_cv_func_memchr_works="guessing no"
16374else
16375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16376/* end confdefs.h. */
16377
16378#include <string.h>
16379#if HAVE_SYS_MMAN_H
16380# include <fcntl.h>
16381# include <unistd.h>
16382# include <sys/types.h>
16383# include <sys/mman.h>
16384# ifndef MAP_FILE
16385# define MAP_FILE 0
16386# endif
16387#endif
16388
16389int
16390main ()
16391{
16392
16393 int result = 0;
16394 char *fence = NULL;
16395#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
16396# if HAVE_MAP_ANONYMOUS
16397 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
16398 const int fd = -1;
16399# else /* !HAVE_MAP_ANONYMOUS */
16400 const int flags = MAP_FILE | MAP_PRIVATE;
16401 int fd = open ("/dev/zero", O_RDONLY, 0666);
16402 if (fd >= 0)
16403# endif
16404 {
16405 int pagesize = getpagesize ();
16406 char *two_pages =
16407 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
16408 flags, fd, 0);
16409 if (two_pages != (char *)(-1)
16410 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
16411 fence = two_pages + pagesize;
16412 }
16413#endif
16414 if (fence)
16415 {
16416 if (memchr (fence, 0, 0))
16417 result |= 1;
16418 strcpy (fence - 9, "12345678");
16419 if (memchr (fence - 9, 0, 79) != fence - 1)
16420 result |= 2;
16421 if (memchr (fence - 1, 0, 3) != fence - 1)
16422 result |= 4;
16423 }
16424 return result;
16425
16426 ;
16427 return 0;
16428}
16429_ACEOF
16430if ac_fn_c_try_run "$LINENO"; then :
16431 gl_cv_func_memchr_works=yes
16432else
16433 gl_cv_func_memchr_works=no
16434fi
16435rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16436 conftest.$ac_objext conftest.beam conftest.$ac_ext
16437fi
16438
16439fi
16440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
16441$as_echo "$gl_cv_func_memchr_works" >&6; }
16442 if test "$gl_cv_func_memchr_works" != yes; then
16443 REPLACE_MEMCHR=1
16444 fi
16445 fi
16446
16447
16448
16449
16450 gl_cv_c_multiarch=no
16451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16452/* end confdefs.h. */
16453#ifndef __APPLE_CC__
16454 not a universal capable compiler
16455 #endif
16456 typedef int dummy;
16457
16458_ACEOF
16459if ac_fn_c_try_compile "$LINENO"; then :
16460
16461 arch=
16462 prev=
16463 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
16464 if test -n "$prev"; then
16465 case $word in
16466 i?86 | x86_64 | ppc | ppc64)
16467 if test -z "$arch" || test "$arch" = "$word"; then
16468 arch="$word"
16469 else
16470 gl_cv_c_multiarch=yes
16471 fi
16472 ;;
16473 esac
16474 prev=
16475 else
16476 if test "x$word" = "x-arch"; then
16477 prev=arch
16478 fi
16479 fi
16480 done
16481
16482fi
16483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16484 if test $gl_cv_c_multiarch = yes; then
16485 APPLE_UNIVERSAL_BUILD=1
16486 else
16487 APPLE_UNIVERSAL_BUILD=0
16488 fi
16489
16490
16491
16492
16493
16494
16495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
16496$as_echo_n "checking for promoted mode_t type... " >&6; }
16497if ${gl_cv_promoted_mode_t+:} false; then :
16498 $as_echo_n "(cached) " >&6
16499else
16500
16501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16502/* end confdefs.h. */
16503#include <sys/types.h>
16504int
16505main ()
16506{
16507typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
16508 ;
16509 return 0;
16510}
16511_ACEOF
16512if ac_fn_c_try_compile "$LINENO"; then :
16513 gl_cv_promoted_mode_t='int'
16514else
16515 gl_cv_promoted_mode_t='mode_t'
16516fi
16517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16518
16519fi
16520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
16521$as_echo "$gl_cv_promoted_mode_t" >&6; }
16522
16523cat >>confdefs.h <<_ACEOF
16524#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
16525_ACEOF
16526
16527
16528
16529
16530
16531
16532
16533 GNULIB_POSIX_SPAWN=0;
16534 GNULIB_POSIX_SPAWNP=0;
16535 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0;
16536 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
16537 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
16538 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
16539 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0;
16540 GNULIB_POSIX_SPAWNATTR_INIT=0;
16541 GNULIB_POSIX_SPAWNATTR_GETFLAGS=0;
16542 GNULIB_POSIX_SPAWNATTR_SETFLAGS=0;
16543 GNULIB_POSIX_SPAWNATTR_GETPGROUP=0;
16544 GNULIB_POSIX_SPAWNATTR_SETPGROUP=0;
16545 GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0;
16546 GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0;
16547 GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0;
16548 GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0;
16549 GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0;
16550 GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0;
16551 GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0;
16552 GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0;
16553 GNULIB_POSIX_SPAWNATTR_DESTROY=0;
16554 HAVE_POSIX_SPAWN=1;
16555 HAVE_POSIX_SPAWNATTR_T=1;
16556 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
16557
16558 REPLACE_POSIX_SPAWN=0;
16559 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
16560
16561 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
16562
16563 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
16564
16565
16566
16567
16568
16569
16570
16571
16572 if test $ac_cv_func_posix_spawn != yes; then
16573 HAVE_POSIX_SPAWN=0
16574 fi
16575
16576
16577
16578
16579 if test $ac_cv_func_posix_spawn = yes; then
16580
16581
16582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
16583$as_echo_n "checking whether posix_spawn works... " >&6; }
16584if ${gl_cv_func_posix_spawn_works+:} false; then :
16585 $as_echo_n "(cached) " >&6
16586else
16587 if test $cross_compiling = no; then
16588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16589/* end confdefs.h. */
16590
16591#include <errno.h>
16592#include <fcntl.h>
16593#include <signal.h>
16594#include <spawn.h>
16595#include <stdbool.h>
16596#include <stdio.h>
16597#include <stdlib.h>
16598#include <string.h>
16599#include <unistd.h>
16600#include <sys/types.h>
16601#include <sys/wait.h>
16602
16603extern char **environ;
16604
16605#ifndef STDIN_FILENO
16606# define STDIN_FILENO 0
16607#endif
16608#ifndef STDOUT_FILENO
16609# define STDOUT_FILENO 1
16610#endif
16611#ifndef STDERR_FILENO
16612# define STDERR_FILENO 2
16613#endif
16614
16615#ifndef WTERMSIG
16616# define WTERMSIG(x) ((x) & 0x7f)
16617#endif
16618#ifndef WIFEXITED
16619# define WIFEXITED(x) (WTERMSIG (x) == 0)
16620#endif
16621#ifndef WEXITSTATUS
16622# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
16623#endif
16624
16625#define CHILD_PROGRAM_FILENAME "/non/exist/ent"
16626
16627static int
16628fd_safer (int fd)
16629{
16630 if (0 <= fd && fd <= 2)
16631 {
16632 int f = fd_safer (dup (fd));
16633 int e = errno;
16634 close (fd);
16635 errno = e;
16636 fd = f;
16637 }
16638
16639 return fd;
16640}
16641
16642int
16643main ()
16644{
16645 char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
16646 int ofd[2];
16647 sigset_t blocked_signals;
16648 sigset_t fatal_signal_set;
16649 posix_spawn_file_actions_t actions;
16650 bool actions_allocated;
16651 posix_spawnattr_t attrs;
16652 bool attrs_allocated;
16653 int err;
16654 pid_t child;
16655 int status;
16656 int exitstatus;
16657
16658 setvbuf (stdout, NULL, _IOFBF, 0);
16659 puts ("This should be seen only once.");
16660 if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
16661 {
16662 perror ("cannot create pipe");
16663 exit (1);
16664 }
16665 sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
16666 sigemptyset (&fatal_signal_set);
16667 sigaddset (&fatal_signal_set, SIGINT);
16668 sigaddset (&fatal_signal_set, SIGTERM);
16669 sigaddset (&fatal_signal_set, SIGHUP);
16670 sigaddset (&fatal_signal_set, SIGPIPE);
16671 sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
16672 actions_allocated = false;
16673 attrs_allocated = false;
16674 if ((err = posix_spawn_file_actions_init (&actions)) != 0
16675 || (actions_allocated = true,
16676 (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
16677 || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
16678 || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
16679 || (err = posix_spawnattr_init (&attrs)) != 0
16680 || (attrs_allocated = true,
16681 (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
16682 || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
16683 || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
16684 {
16685 if (actions_allocated)
16686 posix_spawn_file_actions_destroy (&actions);
16687 if (attrs_allocated)
16688 posix_spawnattr_destroy (&attrs);
16689 sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
16690 if (err == ENOENT)
16691 return 0;
16692 else
16693 {
16694 errno = err;
16695 perror ("subprocess failed");
16696 exit (1);
16697 }
16698 }
16699 posix_spawn_file_actions_destroy (&actions);
16700 posix_spawnattr_destroy (&attrs);
16701 sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
16702 close (ofd[0]);
16703 close (ofd[1]);
16704 status = 0;
16705 while (waitpid (child, &status, 0) != child)
16706 ;
16707 if (!WIFEXITED (status))
16708 {
16709 fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
16710 exit (1);
16711 }
16712 exitstatus = WEXITSTATUS (status);
16713 if (exitstatus != 127)
16714 {
16715 fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
16716 exit (1);
16717 }
16718 return 0;
16719}
16720
16721_ACEOF
16722if ac_fn_c_try_link "$LINENO"; then :
16723 if test -s conftest$ac_exeext \
16724 && ./conftest$ac_exeext > conftest.out \
16725 && echo 'This should be seen only once.' > conftest.ok \
16726 && cmp conftest.out conftest.ok > /dev/null; then
16727 gl_cv_func_posix_spawn_works=yes
16728 else
16729 gl_cv_func_posix_spawn_works=no
16730 fi
16731else
16732 gl_cv_func_posix_spawn_works=no
16733fi
16734rm -f core conftest.err conftest.$ac_objext \
16735 conftest$ac_exeext conftest.$ac_ext
16736 if test $gl_cv_func_posix_spawn_works = yes; then
16737 if test "$cross_compiling" = yes; then :
16738 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16739$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16740as_fn_error $? "cannot run test program while cross compiling
16741See \`config.log' for more details" "$LINENO" 5; }
16742else
16743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16744/* end confdefs.h. */
16745
16746/* Test whether posix_spawn_file_actions_addopen supports filename arguments
16747 that contain special characters such as '*'. */
16748
16749#include <errno.h>
16750#include <fcntl.h>
16751#include <signal.h>
16752#include <spawn.h>
16753#include <stdbool.h>
16754#include <stdio.h>
16755#include <string.h>
16756#include <unistd.h>
16757#include <sys/types.h>
16758#include <sys/wait.h>
16759
16760extern char **environ;
16761
16762#ifndef STDIN_FILENO
16763# define STDIN_FILENO 0
16764#endif
16765#ifndef STDOUT_FILENO
16766# define STDOUT_FILENO 1
16767#endif
16768#ifndef STDERR_FILENO
16769# define STDERR_FILENO 2
16770#endif
16771
16772#ifndef WTERMSIG
16773# define WTERMSIG(x) ((x) & 0x7f)
16774#endif
16775#ifndef WIFEXITED
16776# define WIFEXITED(x) (WTERMSIG (x) == 0)
16777#endif
16778#ifndef WEXITSTATUS
16779# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
16780#endif
16781
16782#define CHILD_PROGRAM_FILENAME "conftest"
16783#define DATA_FILENAME "conftest%=*#?"
16784
16785static int
16786parent_main (void)
16787{
16788 FILE *fp;
16789 char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
16790 posix_spawn_file_actions_t actions;
16791 bool actions_allocated;
16792 int err;
16793 pid_t child;
16794 int status;
16795 int exitstatus;
16796
16797 /* Create a data file with specific contents. */
16798 fp = fopen (DATA_FILENAME, "wb");
16799 if (fp == NULL)
16800 {
16801 perror ("cannot create data file");
16802 return 1;
16803 }
16804 fwrite ("Halle Potta", 1, 11, fp);
16805 if (fflush (fp) || fclose (fp))
16806 {
16807 perror ("cannot prepare data file");
16808 return 2;
16809 }
16810
16811 /* Avoid reading from our stdin, as it could block. */
16812 freopen ("/dev/null", "rb", stdin);
16813
16814 /* Test whether posix_spawn_file_actions_addopen with this file name
16815 actually works, but spawning a child that reads from this file. */
16816 actions_allocated = false;
16817 if ((err = posix_spawn_file_actions_init (&actions)) != 0
16818 || (actions_allocated = true,
16819 (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
16820 || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
16821 {
16822 if (actions_allocated)
16823 posix_spawn_file_actions_destroy (&actions);
16824 errno = err;
16825 perror ("subprocess failed");
16826 return 3;
16827 }
16828 posix_spawn_file_actions_destroy (&actions);
16829 status = 0;
16830 while (waitpid (child, &status, 0) != child)
16831 ;
16832 if (!WIFEXITED (status))
16833 {
16834 fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
16835 return 4;
16836 }
16837 exitstatus = WEXITSTATUS (status);
16838 if (exitstatus != 0)
16839 {
16840 fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
16841 return 5;
16842 }
16843 return 0;
16844}
16845
16846static int
16847child_main (void)
16848{
16849 char buf[1024];
16850
16851 /* See if reading from STDIN_FILENO yields the expected contents. */
16852 if (fread (buf, 1, sizeof (buf), stdin) == 11
16853 && memcmp (buf, "Halle Potta", 11) == 0)
16854 return 0;
16855 else
16856 return 8;
16857}
16858
16859static void
16860cleanup_then_die (int sig)
16861{
16862 /* Clean up data file. */
16863 unlink (DATA_FILENAME);
16864
16865 /* Re-raise the signal and die from it. */
16866 signal (sig, SIG_DFL);
16867 raise (sig);
16868}
16869
16870int
16871main (int argc, char *argv[])
16872{
16873 int exitstatus;
16874
16875 if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
16876 {
16877 /* This is the parent process. */
16878 signal (SIGINT, cleanup_then_die);
16879 signal (SIGTERM, cleanup_then_die);
16880 #ifdef SIGHUP
16881 signal (SIGHUP, cleanup_then_die);
16882 #endif
16883
16884 exitstatus = parent_main ();
16885 }
16886 else
16887 {
16888 /* This is the child process. */
16889
16890 exitstatus = child_main ();
16891 }
16892 unlink (DATA_FILENAME);
16893 return exitstatus;
16894}
16895
16896_ACEOF
16897if ac_fn_c_try_run "$LINENO"; then :
16898
16899else
16900 gl_cv_func_posix_spawn_works=no
16901fi
16902rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16903 conftest.$ac_objext conftest.beam conftest.$ac_ext
16904fi
16905
16906 fi
16907 else
16908 case "$host_os" in
16909 aix*) gl_cv_func_posix_spawn_works="guessing no";;
16910 *) gl_cv_func_posix_spawn_works="guessing yes";;
16911 esac
16912 fi
16913
16914fi
16915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
16916$as_echo "$gl_cv_func_posix_spawn_works" >&6; }
16917
16918 case "$gl_cv_func_posix_spawn_works" in
16919 *yes)
16920
16921$as_echo "#define HAVE_WORKING_POSIX_SPAWN 1" >>confdefs.h
16922
16923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5
16924$as_echo_n "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; }
16925if ${gl_cv_func_spawnattr_setschedpolicy+:} false; then :
16926 $as_echo_n "(cached) " >&6
16927else
16928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16929/* end confdefs.h. */
16930
16931#include <spawn.h>
16932#if POSIX_SPAWN_SETSCHEDULER
16933 POSIX scheduling supported
16934#endif
16935
16936_ACEOF
16937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16938 $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
16939 gl_cv_func_spawnattr_setschedpolicy=yes
16940else
16941 gl_cv_func_spawnattr_setschedpolicy=no
16942fi
16943rm -f conftest*
16944
16945
16946fi
16947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedpolicy" >&5
16948$as_echo "$gl_cv_func_spawnattr_setschedpolicy" >&6; }
16949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5
16950$as_echo_n "checking whether posix_spawnattr_setschedparam is supported... " >&6; }
16951if ${gl_cv_func_spawnattr_setschedparam+:} false; then :
16952 $as_echo_n "(cached) " >&6
16953else
16954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16955/* end confdefs.h. */
16956
16957#include <spawn.h>
16958#if POSIX_SPAWN_SETSCHEDPARAM
16959 POSIX scheduling supported
16960#endif
16961
16962_ACEOF
16963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16964 $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then :
16965 gl_cv_func_spawnattr_setschedparam=yes
16966else
16967 gl_cv_func_spawnattr_setschedparam=no
16968fi
16969rm -f conftest*
16970
16971
16972fi
16973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5
16974$as_echo "$gl_cv_func_spawnattr_setschedparam" >&6; }
16975 ;;
16976 *) REPLACE_POSIX_SPAWN=1 ;;
16977 esac
16978 fi
16979
16980
16981 GNULIB_PTHREAD_SIGMASK=0;
16982 GNULIB_RAISE=0;
16983 GNULIB_SIGNAL_H_SIGPIPE=0;
16984 GNULIB_SIGPROCMASK=0;
16985 GNULIB_SIGACTION=0;
16986 HAVE_POSIX_SIGNALBLOCKING=1;
16987 HAVE_PTHREAD_SIGMASK=1;
16988 HAVE_RAISE=1;
16989 HAVE_SIGSET_T=1;
16990 HAVE_SIGINFO_T=1;
16991 HAVE_SIGACTION=1;
16992 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
16993
16994 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
16995
16996 HAVE_SIGHANDLER_T=1;
16997 REPLACE_PTHREAD_SIGMASK=0;
16998 REPLACE_RAISE=0;
16999
17000
17001 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
17002 #include <signal.h>
17003 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
17004 #include <sys/types.h>
17005
17006"
17007if test "x$ac_cv_type_sigset_t" = xyes; then :
17008
17009cat >>confdefs.h <<_ACEOF
17010#define HAVE_SIGSET_T 1
17011_ACEOF
17012
17013gl_cv_type_sigset_t=yes
17014else
17015 gl_cv_type_sigset_t=no
17016fi
17017
17018 if test $gl_cv_type_sigset_t != yes; then
17019 HAVE_SIGSET_T=0
17020 fi
17021
17022
17023
17024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPIPE" >&5
17025$as_echo_n "checking for SIGPIPE... " >&6; }
17026if ${gl_cv_header_signal_h_SIGPIPE+:} false; then :
17027 $as_echo_n "(cached) " >&6
17028else
17029
17030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17031/* end confdefs.h. */
17032
17033#include <signal.h>
17034#if !defined SIGPIPE
17035booboo
17036#endif
17037
17038_ACEOF
17039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17040 $EGREP "booboo" >/dev/null 2>&1; then :
17041 gl_cv_header_signal_h_SIGPIPE=no
17042else
17043 gl_cv_header_signal_h_SIGPIPE=yes
17044fi
17045rm -f conftest*
17046
17047
17048fi
17049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_signal_h_SIGPIPE" >&5
17050$as_echo "$gl_cv_header_signal_h_SIGPIPE" >&6; }
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061 GNULIB_PSELECT=0;
17062 GNULIB_SELECT=0;
17063 HAVE_PSELECT=1;
17064 REPLACE_PSELECT=0;
17065 REPLACE_SELECT=0;
17066
17067
17068
17069
17070
17071
17072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
17073$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
17074if ${gl_cv_header_sys_select_h_selfcontained+:} false; then :
17075 $as_echo_n "(cached) " >&6
17076else
17077
17078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17079/* end confdefs.h. */
17080#include <sys/select.h>
17081int
17082main ()
17083{
17084struct timeval b;
17085 ;
17086 return 0;
17087}
17088_ACEOF
17089if ac_fn_c_try_compile "$LINENO"; then :
17090 gl_cv_header_sys_select_h_selfcontained=yes
17091else
17092 gl_cv_header_sys_select_h_selfcontained=no
17093fi
17094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17095 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
17096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17097/* end confdefs.h. */
17098#include <sys/select.h>
17099int
17100main ()
17101{
17102int memset; int bzero;
17103 ;
17104 return 0;
17105}
17106
17107_ACEOF
17108if ac_fn_c_try_compile "$LINENO"; then :
17109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17110/* end confdefs.h. */
17111#include <sys/select.h>
17112int
17113main ()
17114{
17115
17116 #undef memset
17117 #define memset nonexistent_memset
17118 extern
17119 #ifdef __cplusplus
17120 "C"
17121 #endif
17122 void *memset (void *, int, unsigned long);
17123 #undef bzero
17124 #define bzero nonexistent_bzero
17125 extern
17126 #ifdef __cplusplus
17127 "C"
17128 #endif
17129 void bzero (void *, unsigned long);
17130 fd_set fds;
17131 FD_ZERO (&fds);
17132
17133 ;
17134 return 0;
17135}
17136
17137_ACEOF
17138if ac_fn_c_try_link "$LINENO"; then :
17139
17140else
17141 gl_cv_header_sys_select_h_selfcontained=no
17142fi
17143rm -f core conftest.err conftest.$ac_objext \
17144 conftest$ac_exeext conftest.$ac_ext
17145
17146fi
17147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17148 fi
17149
17150fi
17151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
17152$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162 if test $gl_cv_have_include_next = yes; then
17163 gl_cv_next_sys_select_h='<'sys/select.h'>'
17164 else
17165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
17166$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
17167if ${gl_cv_next_sys_select_h+:} false; then :
17168 $as_echo_n "(cached) " >&6
17169else
17170
17171 if test $ac_cv_header_sys_select_h = yes; then
17172
17173
17174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17175/* end confdefs.h. */
17176#include <sys/select.h>
17177
17178_ACEOF
17179 case "$host_os" in
17180 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17181 *) gl_absname_cpp="$ac_cpp" ;;
17182 esac
17183
17184 case "$host_os" in
17185 mingw*)
17186 gl_dirsep_regex='[/\\]'
17187 ;;
17188 *)
17189 gl_dirsep_regex='\/'
17190 ;;
17191 esac
17192 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17193
17194 gl_header_literal_regex=`echo 'sys/select.h' \
17195 | sed -e "$gl_make_literal_regex_sed"`
17196 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17197 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17198 s|^/[^/]|//&|
17199 p
17200 q
17201 }'
17202 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17203 sed -n "$gl_absolute_header_sed"`'"'
17204 else
17205 gl_cv_next_sys_select_h='<'sys/select.h'>'
17206 fi
17207
17208
17209fi
17210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
17211$as_echo "$gl_cv_next_sys_select_h" >&6; }
17212 fi
17213 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
17214
17215 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17216 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17217 gl_next_as_first_directive='<'sys/select.h'>'
17218 else
17219 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17220 gl_next_as_first_directive=$gl_cv_next_sys_select_h
17221 fi
17222 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
17223
17224
17225
17226
17227 if test $ac_cv_header_sys_select_h = yes; then
17228 HAVE_SYS_SELECT_H=1
17229 else
17230 HAVE_SYS_SELECT_H=0
17231 fi
17232
17233
17234
17235
17236
17237 if test $ac_cv_header_sys_socket_h != yes; then
17238 for ac_header in winsock2.h
17239do :
17240 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17241if test "x$ac_cv_header_winsock2_h" = xyes; then :
17242 cat >>confdefs.h <<_ACEOF
17243#define HAVE_WINSOCK2_H 1
17244_ACEOF
17245
17246fi
17247
17248done
17249
17250 fi
17251 if test "$ac_cv_header_winsock2_h" = yes; then
17252 HAVE_WINSOCK2_H=1
17253 UNISTD_H_HAVE_WINSOCK2_H=1
17254 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17255 else
17256 HAVE_WINSOCK2_H=0
17257 fi
17258
17259
17260
17261
17262 for gl_func in pselect select; do
17263 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17265$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17266if eval \${$as_gl_Symbol+:} false; then :
17267 $as_echo_n "(cached) " >&6
17268else
17269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17270/* end confdefs.h. */
17271
17272/* Some systems require prerequisite headers. */
17273#include <sys/types.h>
17274#if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H
17275# include <sys/time.h>
17276#endif
17277#include <sys/select.h>
17278
17279int
17280main ()
17281{
17282#undef $gl_func
17283 (void) $gl_func;
17284 ;
17285 return 0;
17286}
17287_ACEOF
17288if ac_fn_c_try_compile "$LINENO"; then :
17289 eval "$as_gl_Symbol=yes"
17290else
17291 eval "$as_gl_Symbol=no"
17292fi
17293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17294fi
17295eval ac_res=\$$as_gl_Symbol
17296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17297$as_echo "$ac_res" >&6; }
17298 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17299 cat >>confdefs.h <<_ACEOF
17300#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17301_ACEOF
17302
17303 eval ac_cv_have_decl_$gl_func=yes
17304fi
17305 done
17306
17307
17308
17309
17310
17311
17312
17313 if test $ac_cv_header_sys_socket_h != yes; then
17314 for ac_header in winsock2.h
17315do :
17316 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17317if test "x$ac_cv_header_winsock2_h" = xyes; then :
17318 cat >>confdefs.h <<_ACEOF
17319#define HAVE_WINSOCK2_H 1
17320_ACEOF
17321
17322fi
17323
17324done
17325
17326 fi
17327 if test "$ac_cv_header_winsock2_h" = yes; then
17328 HAVE_WINSOCK2_H=1
17329 UNISTD_H_HAVE_WINSOCK2_H=1
17330 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17331 else
17332 HAVE_WINSOCK2_H=0
17333 fi
17334
17335 LIBSOCKET=
17336 if test $HAVE_WINSOCK2_H = 1; then
17337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5
17338$as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; }
17339if ${gl_cv_func_wsastartup+:} false; then :
17340 $as_echo_n "(cached) " >&6
17341else
17342
17343 gl_save_LIBS="$LIBS"
17344 LIBS="$LIBS -lws2_32"
17345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17346/* end confdefs.h. */
17347
17348#ifdef HAVE_WINSOCK2_H
17349# include <winsock2.h>
17350#endif
17351int
17352main ()
17353{
17354
17355 WORD wVersionRequested = MAKEWORD(1, 1);
17356 WSADATA wsaData;
17357 int err = WSAStartup(wVersionRequested, &wsaData);
17358 WSACleanup ();
17359 ;
17360 return 0;
17361}
17362_ACEOF
17363if ac_fn_c_try_link "$LINENO"; then :
17364 gl_cv_func_wsastartup=yes
17365else
17366 gl_cv_func_wsastartup=no
17367fi
17368rm -f core conftest.err conftest.$ac_objext \
17369 conftest$ac_exeext conftest.$ac_ext
17370 LIBS="$gl_save_LIBS"
17371
17372fi
17373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
17374$as_echo "$gl_cv_func_wsastartup" >&6; }
17375 if test "$gl_cv_func_wsastartup" = "yes"; then
17376
17377$as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
17378
17379 LIBSOCKET='-lws2_32'
17380 fi
17381 else
17382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
17383$as_echo_n "checking for library containing setsockopt... " >&6; }
17384if ${gl_cv_lib_socket+:} false; then :
17385 $as_echo_n "(cached) " >&6
17386else
17387
17388 gl_cv_lib_socket=
17389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17390/* end confdefs.h. */
17391extern
17392#ifdef __cplusplus
17393"C"
17394#endif
17395char setsockopt();
17396int
17397main ()
17398{
17399setsockopt();
17400 ;
17401 return 0;
17402}
17403_ACEOF
17404if ac_fn_c_try_link "$LINENO"; then :
17405
17406else
17407 gl_save_LIBS="$LIBS"
17408 LIBS="$gl_save_LIBS -lsocket"
17409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17410/* end confdefs.h. */
17411extern
17412#ifdef __cplusplus
17413"C"
17414#endif
17415char setsockopt();
17416int
17417main ()
17418{
17419setsockopt();
17420 ;
17421 return 0;
17422}
17423_ACEOF
17424if ac_fn_c_try_link "$LINENO"; then :
17425 gl_cv_lib_socket="-lsocket"
17426fi
17427rm -f core conftest.err conftest.$ac_objext \
17428 conftest$ac_exeext conftest.$ac_ext
17429 if test -z "$gl_cv_lib_socket"; then
17430 LIBS="$gl_save_LIBS -lnetwork"
17431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17432/* end confdefs.h. */
17433extern
17434#ifdef __cplusplus
17435"C"
17436#endif
17437char setsockopt();
17438int
17439main ()
17440{
17441setsockopt();
17442 ;
17443 return 0;
17444}
17445_ACEOF
17446if ac_fn_c_try_link "$LINENO"; then :
17447 gl_cv_lib_socket="-lnetwork"
17448fi
17449rm -f core conftest.err conftest.$ac_objext \
17450 conftest$ac_exeext conftest.$ac_ext
17451 if test -z "$gl_cv_lib_socket"; then
17452 LIBS="$gl_save_LIBS -lnet"
17453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17454/* end confdefs.h. */
17455extern
17456#ifdef __cplusplus
17457"C"
17458#endif
17459char setsockopt();
17460int
17461main ()
17462{
17463setsockopt();
17464 ;
17465 return 0;
17466}
17467_ACEOF
17468if ac_fn_c_try_link "$LINENO"; then :
17469 gl_cv_lib_socket="-lnet"
17470fi
17471rm -f core conftest.err conftest.$ac_objext \
17472 conftest$ac_exeext conftest.$ac_ext
17473 fi
17474 fi
17475 LIBS="$gl_save_LIBS"
17476
17477fi
17478rm -f core conftest.err conftest.$ac_objext \
17479 conftest$ac_exeext conftest.$ac_ext
17480 if test -z "$gl_cv_lib_socket"; then
17481 gl_cv_lib_socket="none needed"
17482 fi
17483
17484fi
17485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
17486$as_echo "$gl_cv_lib_socket" >&6; }
17487 if test "$gl_cv_lib_socket" != "none needed"; then
17488 LIBSOCKET="$gl_cv_lib_socket"
17489 fi
17490 fi
17491
17492
17493
17494
17495
17496
17497 :
17498
17499
17500
17501
17502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
17503$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
17504if ${ac_cv_type_uid_t+:} false; then :
17505 $as_echo_n "(cached) " >&6
17506else
17507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17508/* end confdefs.h. */
17509#include <sys/types.h>
17510
17511_ACEOF
17512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17513 $EGREP "uid_t" >/dev/null 2>&1; then :
17514 ac_cv_type_uid_t=yes
17515else
17516 ac_cv_type_uid_t=no
17517fi
17518rm -f conftest*
17519
17520fi
17521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
17522$as_echo "$ac_cv_type_uid_t" >&6; }
17523if test $ac_cv_type_uid_t = no; then
17524
17525$as_echo "#define uid_t int" >>confdefs.h
17526
17527
17528$as_echo "#define gid_t int" >>confdefs.h
17529
17530fi
17531
17532
17533
17534
17535
17536
17537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17538/* end confdefs.h. */
17539
17540#ifdef _MSC_VER
17541MicrosoftCompiler
17542#endif
17543
17544_ACEOF
17545if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17546 $EGREP "MicrosoftCompiler" >/dev/null 2>&1; then :
17547 gl_asmext='asm'
17548 gl_c_asm_opt='-c -Fa'
17549
17550else
17551 gl_asmext='s'
17552 gl_c_asm_opt='-S'
17553
17554fi
17555rm -f conftest*
17556
17557
17558
17559
17560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5
17561$as_echo_n "checking whether C symbols are prefixed with underscore at the linker level... " >&6; }
17562if ${gl_cv_prog_as_underscore+:} false; then :
17563 $as_echo_n "(cached) " >&6
17564else
17565 cat > conftest.c <<EOF
17566#ifdef __cplusplus
17567extern "C" int foo (void);
17568#endif
17569int foo(void) { return 0; }
17570EOF
17571 # Look for the assembly language name in the .s file.
17572 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
17573 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
17574 (eval $ac_try) 2>&5
17575 ac_status=$?
17576 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17577 test $ac_status = 0; }; } >/dev/null 2>&1
17578 if grep _foo conftest.$gl_asmext >/dev/null ; then
17579 gl_cv_prog_as_underscore=yes
17580 else
17581 gl_cv_prog_as_underscore=no
17582 fi
17583 rm -f conftest*
17584
17585fi
17586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5
17587$as_echo "$gl_cv_prog_as_underscore" >&6; }
17588 if test $gl_cv_prog_as_underscore = yes; then
17589 USER_LABEL_PREFIX=_
17590 else
17591 USER_LABEL_PREFIX=
17592 fi
17593
17594cat >>confdefs.h <<_ACEOF
17595#define USER_LABEL_PREFIX $USER_LABEL_PREFIX
17596_ACEOF
17597
17598 ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
17610$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
17611if ${gl_cv_func_snprintf_retval_c99+:} false; then :
17612 $as_echo_n "(cached) " >&6
17613else
17614
17615 if test "$cross_compiling" = yes; then :
17616
17617 case "$host_os" in
17618 # Guess yes on glibc systems.
17619 *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
17620 # Guess yes on FreeBSD >= 5.
17621 freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
17622 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
17623 # Guess yes on Mac OS X >= 10.3.
17624 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
17625 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
17626 # Guess yes on OpenBSD >= 3.9.
17627 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
17628 gl_cv_func_snprintf_retval_c99="guessing no";;
17629 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
17630 # Guess yes on Solaris >= 2.10.
17631 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
17632 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
17633 # Guess yes on AIX >= 4.
17634 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
17635 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
17636 # Guess yes on NetBSD >= 3.
17637 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
17638 gl_cv_func_snprintf_retval_c99="guessing no";;
17639 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
17640 # Guess yes on BeOS.
17641 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
17642 # If we don't know, assume the worst.
17643 *) gl_cv_func_snprintf_retval_c99="guessing no";;
17644 esac
17645
17646else
17647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17648/* end confdefs.h. */
17649
17650#include <stdio.h>
17651#include <string.h>
17652#if HAVE_SNPRINTF
17653# define my_snprintf snprintf
17654#else
17655# include <stdarg.h>
17656static int my_snprintf (char *buf, int size, const char *format, ...)
17657{
17658 va_list args;
17659 int ret;
17660 va_start (args, format);
17661 ret = vsnprintf (buf, size, format, args);
17662 va_end (args);
17663 return ret;
17664}
17665#endif
17666static char buf[100];
17667int main ()
17668{
17669 strcpy (buf, "ABCDEF");
17670 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
17671 return 1;
17672 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
17673 return 2;
17674 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
17675 return 3;
17676 return 0;
17677}
17678_ACEOF
17679if ac_fn_c_try_run "$LINENO"; then :
17680 gl_cv_func_snprintf_retval_c99=yes
17681else
17682 gl_cv_func_snprintf_retval_c99=no
17683fi
17684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17685 conftest.$ac_objext conftest.beam conftest.$ac_ext
17686fi
17687
17688
17689fi
17690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
17691$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
17692
17693ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
17694if test "x$ac_cv_have_decl_snprintf" = xyes; then :
17695 ac_have_decl=1
17696else
17697 ac_have_decl=0
17698fi
17699
17700cat >>confdefs.h <<_ACEOF
17701#define HAVE_DECL_SNPRINTF $ac_have_decl
17702_ACEOF
17703
17704
17705
17706
17707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
17708$as_echo_n "checking for unsigned long long int... " >&6; }
17709if ${ac_cv_type_unsigned_long_long_int+:} false; then :
17710 $as_echo_n "(cached) " >&6
17711else
17712 ac_cv_type_unsigned_long_long_int=yes
17713 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
17714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17715/* end confdefs.h. */
17716
17717 /* For now, do not test the preprocessor; as of 2007 there are too many
17718 implementations with broken preprocessors. Perhaps this can
17719 be revisited in 2012. In the meantime, code should not expect
17720 #if to work with literals wider than 32 bits. */
17721 /* Test literals. */
17722 long long int ll = 9223372036854775807ll;
17723 long long int nll = -9223372036854775807LL;
17724 unsigned long long int ull = 18446744073709551615ULL;
17725 /* Test constant expressions. */
17726 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
17727 ? 1 : -1)];
17728 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
17729 ? 1 : -1)];
17730 int i = 63;
17731int
17732main ()
17733{
17734/* Test availability of runtime routines for shift and division. */
17735 long long int llmax = 9223372036854775807ll;
17736 unsigned long long int ullmax = 18446744073709551615ull;
17737 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
17738 | (llmax / ll) | (llmax % ll)
17739 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
17740 | (ullmax / ull) | (ullmax % ull));
17741 ;
17742 return 0;
17743}
17744
17745_ACEOF
17746if ac_fn_c_try_link "$LINENO"; then :
17747
17748else
17749 ac_cv_type_unsigned_long_long_int=no
17750fi
17751rm -f core conftest.err conftest.$ac_objext \
17752 conftest$ac_exeext conftest.$ac_ext
17753 fi
17754fi
17755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
17756$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
17757 if test $ac_cv_type_unsigned_long_long_int = yes; then
17758
17759$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
17760
17761 fi
17762
17763
17764
17765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
17766$as_echo_n "checking for long long int... " >&6; }
17767if ${ac_cv_type_long_long_int+:} false; then :
17768 $as_echo_n "(cached) " >&6
17769else
17770 ac_cv_type_long_long_int=yes
17771 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
17772 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
17773 if test $ac_cv_type_long_long_int = yes; then
17774 if test "$cross_compiling" = yes; then :
17775 :
17776else
17777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17778/* end confdefs.h. */
17779#include <limits.h>
17780 #ifndef LLONG_MAX
17781 # define HALF \
17782 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
17783 # define LLONG_MAX (HALF - 1 + HALF)
17784 #endif
17785int
17786main ()
17787{
17788long long int n = 1;
17789 int i;
17790 for (i = 0; ; i++)
17791 {
17792 long long int m = n << i;
17793 if (m >> i != n)
17794 return 1;
17795 if (LLONG_MAX / 2 < m)
17796 break;
17797 }
17798 return 0;
17799 ;
17800 return 0;
17801}
17802_ACEOF
17803if ac_fn_c_try_run "$LINENO"; then :
17804
17805else
17806 ac_cv_type_long_long_int=no
17807fi
17808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17809 conftest.$ac_objext conftest.beam conftest.$ac_ext
17810fi
17811
17812 fi
17813 fi
17814fi
17815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
17816$as_echo "$ac_cv_type_long_long_int" >&6; }
17817 if test $ac_cv_type_long_long_int = yes; then
17818
17819$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
17820
17821 fi
17822
17823
17824
17825
17826
17827
17828
17829
17830 if test $ac_cv_type_long_long_int = yes; then
17831 HAVE_LONG_LONG_INT=1
17832 else
17833 HAVE_LONG_LONG_INT=0
17834 fi
17835
17836
17837 if test $ac_cv_type_unsigned_long_long_int = yes; then
17838 HAVE_UNSIGNED_LONG_LONG_INT=1
17839 else
17840 HAVE_UNSIGNED_LONG_LONG_INT=0
17841 fi
17842
17843
17844
17845 if test $ac_cv_header_wchar_h = yes; then
17846 HAVE_WCHAR_H=1
17847 else
17848 HAVE_WCHAR_H=0
17849 fi
17850
17851
17852 if test $ac_cv_header_inttypes_h = yes; then
17853 HAVE_INTTYPES_H=1
17854 else
17855 HAVE_INTTYPES_H=0
17856 fi
17857
17858
17859 if test $ac_cv_header_sys_types_h = yes; then
17860 HAVE_SYS_TYPES_H=1
17861 else
17862 HAVE_SYS_TYPES_H=0
17863 fi
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875 if test $gl_cv_have_include_next = yes; then
17876 gl_cv_next_stdint_h='<'stdint.h'>'
17877 else
17878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
17879$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
17880if ${gl_cv_next_stdint_h+:} false; then :
17881 $as_echo_n "(cached) " >&6
17882else
17883
17884 if test $ac_cv_header_stdint_h = yes; then
17885
17886
17887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17888/* end confdefs.h. */
17889#include <stdint.h>
17890
17891_ACEOF
17892 case "$host_os" in
17893 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17894 *) gl_absname_cpp="$ac_cpp" ;;
17895 esac
17896
17897 case "$host_os" in
17898 mingw*)
17899 gl_dirsep_regex='[/\\]'
17900 ;;
17901 *)
17902 gl_dirsep_regex='\/'
17903 ;;
17904 esac
17905 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17906
17907 gl_header_literal_regex=`echo 'stdint.h' \
17908 | sed -e "$gl_make_literal_regex_sed"`
17909 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17910 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17911 s|^/[^/]|//&|
17912 p
17913 q
17914 }'
17915 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17916 sed -n "$gl_absolute_header_sed"`'"'
17917 else
17918 gl_cv_next_stdint_h='<'stdint.h'>'
17919 fi
17920
17921
17922fi
17923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
17924$as_echo "$gl_cv_next_stdint_h" >&6; }
17925 fi
17926 NEXT_STDINT_H=$gl_cv_next_stdint_h
17927
17928 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17929 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17930 gl_next_as_first_directive='<'stdint.h'>'
17931 else
17932 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17933 gl_next_as_first_directive=$gl_cv_next_stdint_h
17934 fi
17935 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
17936
17937
17938
17939
17940 if test $ac_cv_header_stdint_h = yes; then
17941 HAVE_STDINT_H=1
17942 else
17943 HAVE_STDINT_H=0
17944 fi
17945
17946
17947 if test $ac_cv_header_stdint_h = yes; then
17948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
17949$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
17950if ${gl_cv_header_working_stdint_h+:} false; then :
17951 $as_echo_n "(cached) " >&6
17952else
17953 gl_cv_header_working_stdint_h=no
17954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17955/* end confdefs.h. */
17956
17957
17958#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17959#include <stdint.h>
17960/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
17961#if !(defined WCHAR_MIN && defined WCHAR_MAX)
17962#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
17963#endif
17964
17965
17966 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17967 included before <wchar.h>. */
17968 #include <stddef.h>
17969 #include <signal.h>
17970 #if HAVE_WCHAR_H
17971 # include <stdio.h>
17972 # include <time.h>
17973 # include <wchar.h>
17974 #endif
17975
17976
17977#ifdef INT8_MAX
17978int8_t a1 = INT8_MAX;
17979int8_t a1min = INT8_MIN;
17980#endif
17981#ifdef INT16_MAX
17982int16_t a2 = INT16_MAX;
17983int16_t a2min = INT16_MIN;
17984#endif
17985#ifdef INT32_MAX
17986int32_t a3 = INT32_MAX;
17987int32_t a3min = INT32_MIN;
17988#endif
17989#ifdef INT64_MAX
17990int64_t a4 = INT64_MAX;
17991int64_t a4min = INT64_MIN;
17992#endif
17993#ifdef UINT8_MAX
17994uint8_t b1 = UINT8_MAX;
17995#else
17996typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
17997#endif
17998#ifdef UINT16_MAX
17999uint16_t b2 = UINT16_MAX;
18000#endif
18001#ifdef UINT32_MAX
18002uint32_t b3 = UINT32_MAX;
18003#endif
18004#ifdef UINT64_MAX
18005uint64_t b4 = UINT64_MAX;
18006#endif
18007int_least8_t c1 = INT8_C (0x7f);
18008int_least8_t c1max = INT_LEAST8_MAX;
18009int_least8_t c1min = INT_LEAST8_MIN;
18010int_least16_t c2 = INT16_C (0x7fff);
18011int_least16_t c2max = INT_LEAST16_MAX;
18012int_least16_t c2min = INT_LEAST16_MIN;
18013int_least32_t c3 = INT32_C (0x7fffffff);
18014int_least32_t c3max = INT_LEAST32_MAX;
18015int_least32_t c3min = INT_LEAST32_MIN;
18016int_least64_t c4 = INT64_C (0x7fffffffffffffff);
18017int_least64_t c4max = INT_LEAST64_MAX;
18018int_least64_t c4min = INT_LEAST64_MIN;
18019uint_least8_t d1 = UINT8_C (0xff);
18020uint_least8_t d1max = UINT_LEAST8_MAX;
18021uint_least16_t d2 = UINT16_C (0xffff);
18022uint_least16_t d2max = UINT_LEAST16_MAX;
18023uint_least32_t d3 = UINT32_C (0xffffffff);
18024uint_least32_t d3max = UINT_LEAST32_MAX;
18025uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
18026uint_least64_t d4max = UINT_LEAST64_MAX;
18027int_fast8_t e1 = INT_FAST8_MAX;
18028int_fast8_t e1min = INT_FAST8_MIN;
18029int_fast16_t e2 = INT_FAST16_MAX;
18030int_fast16_t e2min = INT_FAST16_MIN;
18031int_fast32_t e3 = INT_FAST32_MAX;
18032int_fast32_t e3min = INT_FAST32_MIN;
18033int_fast64_t e4 = INT_FAST64_MAX;
18034int_fast64_t e4min = INT_FAST64_MIN;
18035uint_fast8_t f1 = UINT_FAST8_MAX;
18036uint_fast16_t f2 = UINT_FAST16_MAX;
18037uint_fast32_t f3 = UINT_FAST32_MAX;
18038uint_fast64_t f4 = UINT_FAST64_MAX;
18039#ifdef INTPTR_MAX
18040intptr_t g = INTPTR_MAX;
18041intptr_t gmin = INTPTR_MIN;
18042#endif
18043#ifdef UINTPTR_MAX
18044uintptr_t h = UINTPTR_MAX;
18045#endif
18046intmax_t i = INTMAX_MAX;
18047uintmax_t j = UINTMAX_MAX;
18048
18049#include <limits.h> /* for CHAR_BIT */
18050#define TYPE_MINIMUM(t) \
18051 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
18052#define TYPE_MAXIMUM(t) \
18053 ((t) ((t) 0 < (t) -1 \
18054 ? (t) -1 \
18055 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
18056struct s {
18057 int check_PTRDIFF:
18058 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
18059 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
18060 ? 1 : -1;
18061 /* Detect bug in FreeBSD 6.0 / ia64. */
18062 int check_SIG_ATOMIC:
18063 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
18064 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
18065 ? 1 : -1;
18066 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
18067 int check_WCHAR:
18068 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
18069 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
18070 ? 1 : -1;
18071 /* Detect bug in mingw. */
18072 int check_WINT:
18073 WINT_MIN == TYPE_MINIMUM (wint_t)
18074 && WINT_MAX == TYPE_MAXIMUM (wint_t)
18075 ? 1 : -1;
18076
18077 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
18078 int check_UINT8_C:
18079 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
18080 int check_UINT16_C:
18081 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
18082
18083 /* Detect bugs in OpenBSD 3.9 stdint.h. */
18084#ifdef UINT8_MAX
18085 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
18086#endif
18087#ifdef UINT16_MAX
18088 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
18089#endif
18090#ifdef UINT32_MAX
18091 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
18092#endif
18093#ifdef UINT64_MAX
18094 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
18095#endif
18096 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
18097 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
18098 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
18099 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
18100 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
18101 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
18102 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
18103 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
18104 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
18105 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
18106 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
18107};
18108
18109int
18110main ()
18111{
18112
18113 ;
18114 return 0;
18115}
18116_ACEOF
18117if ac_fn_c_try_compile "$LINENO"; then :
18118 if test "$cross_compiling" = yes; then :
18119 gl_cv_header_working_stdint_h=yes
18120
18121else
18122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18123/* end confdefs.h. */
18124
18125
18126#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18127#include <stdint.h>
18128
18129
18130 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18131 included before <wchar.h>. */
18132 #include <stddef.h>
18133 #include <signal.h>
18134 #if HAVE_WCHAR_H
18135 # include <stdio.h>
18136 # include <time.h>
18137 # include <wchar.h>
18138 #endif
18139
18140
18141#include <stdio.h>
18142#include <string.h>
18143#define MVAL(macro) MVAL1(macro)
18144#define MVAL1(expression) #expression
18145static const char *macro_values[] =
18146 {
18147#ifdef INT8_MAX
18148 MVAL (INT8_MAX),
18149#endif
18150#ifdef INT16_MAX
18151 MVAL (INT16_MAX),
18152#endif
18153#ifdef INT32_MAX
18154 MVAL (INT32_MAX),
18155#endif
18156#ifdef INT64_MAX
18157 MVAL (INT64_MAX),
18158#endif
18159#ifdef UINT8_MAX
18160 MVAL (UINT8_MAX),
18161#endif
18162#ifdef UINT16_MAX
18163 MVAL (UINT16_MAX),
18164#endif
18165#ifdef UINT32_MAX
18166 MVAL (UINT32_MAX),
18167#endif
18168#ifdef UINT64_MAX
18169 MVAL (UINT64_MAX),
18170#endif
18171 NULL
18172 };
18173
18174int
18175main ()
18176{
18177
18178 const char **mv;
18179 for (mv = macro_values; *mv != NULL; mv++)
18180 {
18181 const char *value = *mv;
18182 /* Test whether it looks like a cast expression. */
18183 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
18184 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
18185 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
18186 || strncmp (value, "((int)"/*)*/, 6) == 0
18187 || strncmp (value, "((signed short)"/*)*/, 15) == 0
18188 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
18189 return mv - macro_values + 1;
18190 }
18191 return 0;
18192
18193 ;
18194 return 0;
18195}
18196_ACEOF
18197if ac_fn_c_try_run "$LINENO"; then :
18198 gl_cv_header_working_stdint_h=yes
18199fi
18200rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18201 conftest.$ac_objext conftest.beam conftest.$ac_ext
18202fi
18203
18204
18205fi
18206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18207
18208fi
18209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
18210$as_echo "$gl_cv_header_working_stdint_h" >&6; }
18211 fi
18212 if test "$gl_cv_header_working_stdint_h" = yes; then
18213 STDINT_H=
18214 else
18215 for ac_header in sys/inttypes.h sys/bitypes.h
18216do :
18217 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18218ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18219if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18220 cat >>confdefs.h <<_ACEOF
18221#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18222_ACEOF
18223
18224fi
18225
18226done
18227
18228 if test $ac_cv_header_sys_inttypes_h = yes; then
18229 HAVE_SYS_INTTYPES_H=1
18230 else
18231 HAVE_SYS_INTTYPES_H=0
18232 fi
18233
18234 if test $ac_cv_header_sys_bitypes_h = yes; then
18235 HAVE_SYS_BITYPES_H=1
18236 else
18237 HAVE_SYS_BITYPES_H=0
18238 fi
18239
18240
18241
18242
18243 if test $APPLE_UNIVERSAL_BUILD = 0; then
18244
18245
18246 for gltype in ptrdiff_t size_t ; do
18247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18248$as_echo_n "checking for bit size of $gltype... " >&6; }
18249if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
18250 $as_echo_n "(cached) " >&6
18251else
18252 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18253 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18254 included before <wchar.h>. */
18255 #include <stddef.h>
18256 #include <signal.h>
18257 #if HAVE_WCHAR_H
18258 # include <stdio.h>
18259 # include <time.h>
18260 # include <wchar.h>
18261 #endif
18262
18263#include <limits.h>"; then :
18264
18265else
18266 result=unknown
18267fi
18268
18269 eval gl_cv_bitsizeof_${gltype}=\$result
18270
18271fi
18272eval ac_res=\$gl_cv_bitsizeof_${gltype}
18273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18274$as_echo "$ac_res" >&6; }
18275 eval result=\$gl_cv_bitsizeof_${gltype}
18276 if test $result = unknown; then
18277 result=0
18278 fi
18279 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18280 cat >>confdefs.h <<_ACEOF
18281#define BITSIZEOF_${GLTYPE} $result
18282_ACEOF
18283
18284 eval BITSIZEOF_${GLTYPE}=\$result
18285 done
18286
18287
18288 fi
18289
18290
18291 for gltype in sig_atomic_t wchar_t wint_t ; do
18292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18293$as_echo_n "checking for bit size of $gltype... " >&6; }
18294if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
18295 $as_echo_n "(cached) " >&6
18296else
18297 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18298 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18299 included before <wchar.h>. */
18300 #include <stddef.h>
18301 #include <signal.h>
18302 #if HAVE_WCHAR_H
18303 # include <stdio.h>
18304 # include <time.h>
18305 # include <wchar.h>
18306 #endif
18307
18308#include <limits.h>"; then :
18309
18310else
18311 result=unknown
18312fi
18313
18314 eval gl_cv_bitsizeof_${gltype}=\$result
18315
18316fi
18317eval ac_res=\$gl_cv_bitsizeof_${gltype}
18318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18319$as_echo "$ac_res" >&6; }
18320 eval result=\$gl_cv_bitsizeof_${gltype}
18321 if test $result = unknown; then
18322 result=0
18323 fi
18324 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18325 cat >>confdefs.h <<_ACEOF
18326#define BITSIZEOF_${GLTYPE} $result
18327_ACEOF
18328
18329 eval BITSIZEOF_${GLTYPE}=\$result
18330 done
18331
18332
18333
18334
18335 for gltype in sig_atomic_t wchar_t wint_t ; do
18336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
18337$as_echo_n "checking whether $gltype is signed... " >&6; }
18338if eval \${gl_cv_type_${gltype}_signed+:} false; then :
18339 $as_echo_n "(cached) " >&6
18340else
18341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18342/* end confdefs.h. */
18343
18344 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18345 included before <wchar.h>. */
18346 #include <stddef.h>
18347 #include <signal.h>
18348 #if HAVE_WCHAR_H
18349 # include <stdio.h>
18350 # include <time.h>
18351 # include <wchar.h>
18352 #endif
18353
18354 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
18355int
18356main ()
18357{
18358
18359 ;
18360 return 0;
18361}
18362_ACEOF
18363if ac_fn_c_try_compile "$LINENO"; then :
18364 result=yes
18365else
18366 result=no
18367fi
18368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18369 eval gl_cv_type_${gltype}_signed=\$result
18370
18371fi
18372eval ac_res=\$gl_cv_type_${gltype}_signed
18373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18374$as_echo "$ac_res" >&6; }
18375 eval result=\$gl_cv_type_${gltype}_signed
18376 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18377 if test "$result" = yes; then
18378 cat >>confdefs.h <<_ACEOF
18379#define HAVE_SIGNED_${GLTYPE} 1
18380_ACEOF
18381
18382 eval HAVE_SIGNED_${GLTYPE}=1
18383 else
18384 eval HAVE_SIGNED_${GLTYPE}=0
18385 fi
18386 done
18387
18388
18389 gl_cv_type_ptrdiff_t_signed=yes
18390 gl_cv_type_size_t_signed=no
18391 if test $APPLE_UNIVERSAL_BUILD = 0; then
18392
18393
18394 for gltype in ptrdiff_t size_t ; do
18395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18396$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
18397if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
18398 $as_echo_n "(cached) " >&6
18399else
18400 eval gl_cv_type_${gltype}_suffix=no
18401 eval result=\$gl_cv_type_${gltype}_signed
18402 if test "$result" = yes; then
18403 glsufu=
18404 else
18405 glsufu=u
18406 fi
18407 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18408 case $glsuf in
18409 '') gltype1='int';;
18410 l) gltype1='long int';;
18411 ll) gltype1='long long int';;
18412 i64) gltype1='__int64';;
18413 u) gltype1='unsigned int';;
18414 ul) gltype1='unsigned long int';;
18415 ull) gltype1='unsigned long long int';;
18416 ui64)gltype1='unsigned __int64';;
18417 esac
18418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18419/* end confdefs.h. */
18420
18421 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18422 included before <wchar.h>. */
18423 #include <stddef.h>
18424 #include <signal.h>
18425 #if HAVE_WCHAR_H
18426 # include <stdio.h>
18427 # include <time.h>
18428 # include <wchar.h>
18429 #endif
18430
18431 extern $gltype foo;
18432 extern $gltype1 foo;
18433int
18434main ()
18435{
18436
18437 ;
18438 return 0;
18439}
18440_ACEOF
18441if ac_fn_c_try_compile "$LINENO"; then :
18442 eval gl_cv_type_${gltype}_suffix=\$glsuf
18443fi
18444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18445 eval result=\$gl_cv_type_${gltype}_suffix
18446 test "$result" != no && break
18447 done
18448fi
18449eval ac_res=\$gl_cv_type_${gltype}_suffix
18450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18451$as_echo "$ac_res" >&6; }
18452 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18453 eval result=\$gl_cv_type_${gltype}_suffix
18454 test "$result" = no && result=
18455 eval ${GLTYPE}_SUFFIX=\$result
18456 cat >>confdefs.h <<_ACEOF
18457#define ${GLTYPE}_SUFFIX $result
18458_ACEOF
18459
18460 done
18461
18462
18463 fi
18464
18465
18466 for gltype in sig_atomic_t wchar_t wint_t ; do
18467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18468$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
18469if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
18470 $as_echo_n "(cached) " >&6
18471else
18472 eval gl_cv_type_${gltype}_suffix=no
18473 eval result=\$gl_cv_type_${gltype}_signed
18474 if test "$result" = yes; then
18475 glsufu=
18476 else
18477 glsufu=u
18478 fi
18479 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18480 case $glsuf in
18481 '') gltype1='int';;
18482 l) gltype1='long int';;
18483 ll) gltype1='long long int';;
18484 i64) gltype1='__int64';;
18485 u) gltype1='unsigned int';;
18486 ul) gltype1='unsigned long int';;
18487 ull) gltype1='unsigned long long int';;
18488 ui64)gltype1='unsigned __int64';;
18489 esac
18490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18491/* end confdefs.h. */
18492
18493 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18494 included before <wchar.h>. */
18495 #include <stddef.h>
18496 #include <signal.h>
18497 #if HAVE_WCHAR_H
18498 # include <stdio.h>
18499 # include <time.h>
18500 # include <wchar.h>
18501 #endif
18502
18503 extern $gltype foo;
18504 extern $gltype1 foo;
18505int
18506main ()
18507{
18508
18509 ;
18510 return 0;
18511}
18512_ACEOF
18513if ac_fn_c_try_compile "$LINENO"; then :
18514 eval gl_cv_type_${gltype}_suffix=\$glsuf
18515fi
18516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18517 eval result=\$gl_cv_type_${gltype}_suffix
18518 test "$result" != no && break
18519 done
18520fi
18521eval ac_res=\$gl_cv_type_${gltype}_suffix
18522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18523$as_echo "$ac_res" >&6; }
18524 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18525 eval result=\$gl_cv_type_${gltype}_suffix
18526 test "$result" = no && result=
18527 eval ${GLTYPE}_SUFFIX=\$result
18528 cat >>confdefs.h <<_ACEOF
18529#define ${GLTYPE}_SUFFIX $result
18530_ACEOF
18531
18532 done
18533
18534
18535
18536 if test $BITSIZEOF_WINT_T -lt 32; then
18537 BITSIZEOF_WINT_T=32
18538 fi
18539
18540 STDINT_H=stdint.h
18541 fi
18542
18543 if test -n "$STDINT_H"; then
18544 GL_GENERATE_STDINT_H_TRUE=
18545 GL_GENERATE_STDINT_H_FALSE='#'
18546else
18547 GL_GENERATE_STDINT_H_TRUE='#'
18548 GL_GENERATE_STDINT_H_FALSE=
18549fi
18550
18551
18552
18553 GNULIB_FFS=0;
18554 HAVE_FFS=1;
18555 HAVE_STRCASECMP=1;
18556 HAVE_DECL_STRNCASECMP=1;
18557
18558
18559
18560
18561
18562
18563
18564 for ac_func in strcasestr
18565do :
18566 ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
18567if test "x$ac_cv_func_strcasestr" = xyes; then :
18568 cat >>confdefs.h <<_ACEOF
18569#define HAVE_STRCASESTR 1
18570_ACEOF
18571
18572fi
18573done
18574
18575 if test $ac_cv_func_strcasestr = no; then
18576 HAVE_STRCASESTR=0
18577 else
18578 if test "$gl_cv_func_memchr_works" != yes; then
18579 REPLACE_STRCASESTR=1
18580 else
18581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works" >&5
18582$as_echo_n "checking whether strcasestr works... " >&6; }
18583if ${gl_cv_func_strcasestr_works_always+:} false; then :
18584 $as_echo_n "(cached) " >&6
18585else
18586 if test "$cross_compiling" = yes; then :
18587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18588/* end confdefs.h. */
18589
18590#ifdef __GNU_LIBRARY__
18591 #include <features.h>
18592 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
18593 || defined __UCLIBC__
18594 Lucky user
18595 #endif
18596#elif defined __CYGWIN__
18597 #include <cygwin/version.h>
18598 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
18599 Lucky user
18600 #endif
18601#else
18602 Lucky user
18603#endif
18604
18605_ACEOF
18606if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18607 $EGREP "Lucky user" >/dev/null 2>&1; then :
18608 gl_cv_func_strcasestr_works_always="guessing yes"
18609else
18610 gl_cv_func_strcasestr_works_always="guessing no"
18611fi
18612rm -f conftest*
18613
18614
18615else
18616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18617/* end confdefs.h. */
18618
18619#include <string.h> /* for strcasestr */
18620#define P "_EF_BF_BD"
18621#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
18622#define NEEDLE P P P P P
18623
18624int
18625main ()
18626{
18627return !!strcasestr (HAYSTACK, NEEDLE);
18628
18629 ;
18630 return 0;
18631}
18632_ACEOF
18633if ac_fn_c_try_run "$LINENO"; then :
18634 gl_cv_func_strcasestr_works_always=yes
18635else
18636 gl_cv_func_strcasestr_works_always=no
18637fi
18638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18639 conftest.$ac_objext conftest.beam conftest.$ac_ext
18640fi
18641
18642
18643fi
18644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_works_always" >&5
18645$as_echo "$gl_cv_func_strcasestr_works_always" >&6; }
18646 case "$gl_cv_func_strcasestr_works_always" in
18647 *yes) ;;
18648 *)
18649 REPLACE_STRCASESTR=1
18650 ;;
18651 esac
18652 fi
18653 fi
18654
18655
18656 REPLACE_STRERROR_0=0
18657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
18658$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
18659if ${gl_cv_func_strerror_0_works+:} false; then :
18660 $as_echo_n "(cached) " >&6
18661else
18662 if test "$cross_compiling" = yes; then :
18663 case "$host_os" in
18664 # Guess yes on glibc systems.
18665 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
18666 # If we don't know, assume the worst.
18667 *) gl_cv_func_strerror_0_works="guessing no" ;;
18668 esac
18669
18670else
18671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18672/* end confdefs.h. */
18673#include <string.h>
18674 #include <errno.h>
18675
18676int
18677main ()
18678{
18679int result = 0;
18680 char *str;
18681 errno = 0;
18682 str = strerror (0);
18683 if (!*str) result |= 1;
18684 if (errno) result |= 2;
18685 if (strstr (str, "nknown") || strstr (str, "ndefined"))
18686 result |= 4;
18687 return result;
18688 ;
18689 return 0;
18690}
18691_ACEOF
18692if ac_fn_c_try_run "$LINENO"; then :
18693 gl_cv_func_strerror_0_works=yes
18694else
18695 gl_cv_func_strerror_0_works=no
18696fi
18697rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18698 conftest.$ac_objext conftest.beam conftest.$ac_ext
18699fi
18700
18701
18702fi
18703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
18704$as_echo "$gl_cv_func_strerror_0_works" >&6; }
18705 case "$gl_cv_func_strerror_0_works" in
18706 *yes) ;;
18707 *)
18708 REPLACE_STRERROR_0=1
18709
18710$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
18711
18712 ;;
18713 esac
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724 if test $ac_cv_func_strerror_r = yes; then
18725 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
18726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
18727$as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
18728if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
18729 $as_echo_n "(cached) " >&6
18730else
18731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18732/* end confdefs.h. */
18733#include <string.h>
18734 int strerror_r (int, char *, size_t);
18735
18736int
18737main ()
18738{
18739
18740 ;
18741 return 0;
18742}
18743_ACEOF
18744if ac_fn_c_try_compile "$LINENO"; then :
18745 gl_cv_func_strerror_r_posix_signature=yes
18746else
18747 gl_cv_func_strerror_r_posix_signature=no
18748fi
18749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18750
18751fi
18752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
18753$as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
18754 if test $gl_cv_func_strerror_r_posix_signature = yes; then
18755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
18756$as_echo_n "checking whether strerror_r works... " >&6; }
18757if ${gl_cv_func_strerror_r_works+:} false; then :
18758 $as_echo_n "(cached) " >&6
18759else
18760 if test "$cross_compiling" = yes; then :
18761
18762 case "$host_os" in
18763 # Guess no on AIX.
18764 aix*) gl_cv_func_strerror_r_works="guessing no";;
18765 # Guess no on HP-UX.
18766 hpux*) gl_cv_func_strerror_r_works="guessing no";;
18767 # Guess no on BSD variants.
18768 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
18769 # Guess yes otherwise.
18770 *) gl_cv_func_strerror_r_works="guessing yes";;
18771 esac
18772
18773else
18774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18775/* end confdefs.h. */
18776#include <errno.h>
18777 #include <string.h>
18778
18779int
18780main ()
18781{
18782int result = 0;
18783 char buf[79];
18784 if (strerror_r (EACCES, buf, 0) < 0)
18785 result |= 1;
18786 errno = 0;
18787 if (strerror_r (EACCES, buf, sizeof buf) != 0)
18788 result |= 2;
18789 strcpy (buf, "Unknown");
18790 if (strerror_r (0, buf, sizeof buf) != 0)
18791 result |= 4;
18792 if (errno)
18793 result |= 8;
18794 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
18795 result |= 0x10;
18796 errno = 0;
18797 *buf = 0;
18798 if (strerror_r (-3, buf, sizeof buf) < 0)
18799 result |= 0x20;
18800 if (errno)
18801 result |= 0x40;
18802 if (!*buf)
18803 result |= 0x80;
18804 return result;
18805
18806 ;
18807 return 0;
18808}
18809_ACEOF
18810if ac_fn_c_try_run "$LINENO"; then :
18811 gl_cv_func_strerror_r_works=yes
18812else
18813 gl_cv_func_strerror_r_works=no
18814fi
18815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18816 conftest.$ac_objext conftest.beam conftest.$ac_ext
18817fi
18818
18819
18820fi
18821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
18822$as_echo "$gl_cv_func_strerror_r_works" >&6; }
18823 else
18824
18825 if test $ac_cv_func___xpg_strerror_r = yes; then
18826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
18827$as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
18828if ${gl_cv_func_strerror_r_works+:} false; then :
18829 $as_echo_n "(cached) " >&6
18830else
18831 if test "$cross_compiling" = yes; then :
18832 gl_cv_func_strerror_r_works="guessing no"
18833
18834else
18835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18836/* end confdefs.h. */
18837#include <errno.h>
18838 #include <string.h>
18839 extern
18840 #ifdef __cplusplus
18841 "C"
18842 #endif
18843 int __xpg_strerror_r(int, char *, size_t);
18844
18845int
18846main ()
18847{
18848int result = 0;
18849 char buf[256] = "^";
18850 char copy[256];
18851 char *str = strerror (-1);
18852 strcpy (copy, str);
18853 if (__xpg_strerror_r (-2, buf, 1) == 0)
18854 result |= 1;
18855 if (*buf)
18856 result |= 2;
18857 __xpg_strerror_r (-2, buf, 256);
18858 if (strcmp (str, copy))
18859 result |= 4;
18860 return result;
18861
18862 ;
18863 return 0;
18864}
18865_ACEOF
18866if ac_fn_c_try_run "$LINENO"; then :
18867 gl_cv_func_strerror_r_works=yes
18868else
18869 gl_cv_func_strerror_r_works=no
18870fi
18871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18872 conftest.$ac_objext conftest.beam conftest.$ac_ext
18873fi
18874
18875
18876fi
18877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
18878$as_echo "$gl_cv_func_strerror_r_works" >&6; }
18879 fi
18880 fi
18881 fi
18882 fi
18883
18884ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
18885if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
18886 ac_have_decl=1
18887else
18888 ac_have_decl=0
18889fi
18890
18891cat >>confdefs.h <<_ACEOF
18892#define HAVE_DECL_STRERROR_R $ac_have_decl
18893_ACEOF
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908 if test $gl_cv_have_include_next = yes; then
18909 gl_cv_next_string_h='<'string.h'>'
18910 else
18911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
18912$as_echo_n "checking absolute name of <string.h>... " >&6; }
18913if ${gl_cv_next_string_h+:} false; then :
18914 $as_echo_n "(cached) " >&6
18915else
18916
18917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18918/* end confdefs.h. */
18919#include <string.h>
18920
18921_ACEOF
18922 case "$host_os" in
18923 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18924 *) gl_absname_cpp="$ac_cpp" ;;
18925 esac
18926
18927 case "$host_os" in
18928 mingw*)
18929 gl_dirsep_regex='[/\\]'
18930 ;;
18931 *)
18932 gl_dirsep_regex='\/'
18933 ;;
18934 esac
18935 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18936
18937 gl_header_literal_regex=`echo 'string.h' \
18938 | sed -e "$gl_make_literal_regex_sed"`
18939 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18940 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18941 s|^/[^/]|//&|
18942 p
18943 q
18944 }'
18945 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18946 sed -n "$gl_absolute_header_sed"`'"'
18947
18948
18949fi
18950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
18951$as_echo "$gl_cv_next_string_h" >&6; }
18952 fi
18953 NEXT_STRING_H=$gl_cv_next_string_h
18954
18955 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18956 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18957 gl_next_as_first_directive='<'string.h'>'
18958 else
18959 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18960 gl_next_as_first_directive=$gl_cv_next_string_h
18961 fi
18962 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
18963
18964
18965
18966
18967
18968
18969 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
18970 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18972$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18973if eval \${$as_gl_Symbol+:} false; then :
18974 $as_echo_n "(cached) " >&6
18975else
18976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18977/* end confdefs.h. */
18978#include <string.h>
18979
18980int
18981main ()
18982{
18983#undef $gl_func
18984 (void) $gl_func;
18985 ;
18986 return 0;
18987}
18988_ACEOF
18989if ac_fn_c_try_compile "$LINENO"; then :
18990 eval "$as_gl_Symbol=yes"
18991else
18992 eval "$as_gl_Symbol=no"
18993fi
18994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18995fi
18996eval ac_res=\$$as_gl_Symbol
18997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18998$as_echo "$ac_res" >&6; }
18999 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
19000 cat >>confdefs.h <<_ACEOF
19001#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19002_ACEOF
19003
19004 eval ac_cv_have_decl_$gl_func=yes
19005fi
19006 done
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023 if test $gl_cv_have_include_next = yes; then
19024 gl_cv_next_strings_h='<'strings.h'>'
19025 else
19026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
19027$as_echo_n "checking absolute name of <strings.h>... " >&6; }
19028if ${gl_cv_next_strings_h+:} false; then :
19029 $as_echo_n "(cached) " >&6
19030else
19031
19032 if test $ac_cv_header_strings_h = yes; then
19033
19034
19035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19036/* end confdefs.h. */
19037#include <strings.h>
19038
19039_ACEOF
19040 case "$host_os" in
19041 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19042 *) gl_absname_cpp="$ac_cpp" ;;
19043 esac
19044
19045 case "$host_os" in
19046 mingw*)
19047 gl_dirsep_regex='[/\\]'
19048 ;;
19049 *)
19050 gl_dirsep_regex='\/'
19051 ;;
19052 esac
19053 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19054
19055 gl_header_literal_regex=`echo 'strings.h' \
19056 | sed -e "$gl_make_literal_regex_sed"`
19057 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19058 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19059 s|^/[^/]|//&|
19060 p
19061 q
19062 }'
19063 gl_cv_next_strings_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19064 sed -n "$gl_absolute_header_sed"`'"'
19065 else
19066 gl_cv_next_strings_h='<'strings.h'>'
19067 fi
19068
19069
19070fi
19071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
19072$as_echo "$gl_cv_next_strings_h" >&6; }
19073 fi
19074 NEXT_STRINGS_H=$gl_cv_next_strings_h
19075
19076 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19077 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19078 gl_next_as_first_directive='<'strings.h'>'
19079 else
19080 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19081 gl_next_as_first_directive=$gl_cv_next_strings_h
19082 fi
19083 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
19084
19085
19086
19087
19088 if test $ac_cv_header_strings_h = yes; then
19089 HAVE_STRINGS_H=1
19090 else
19091 HAVE_STRINGS_H=0
19092 fi
19093
19094
19095
19096 for gl_func in ffs strcasecmp strncasecmp; do
19097 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19099$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
19100if eval \${$as_gl_Symbol+:} false; then :
19101 $as_echo_n "(cached) " >&6
19102else
19103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19104/* end confdefs.h. */
19105
19106 /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
19107 <strings.h>. */
19108 #include <sys/types.h>
19109 #include <strings.h>
19110
19111int
19112main ()
19113{
19114#undef $gl_func
19115 (void) $gl_func;
19116 ;
19117 return 0;
19118}
19119_ACEOF
19120if ac_fn_c_try_compile "$LINENO"; then :
19121 eval "$as_gl_Symbol=yes"
19122else
19123 eval "$as_gl_Symbol=no"
19124fi
19125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19126fi
19127eval ac_res=\$$as_gl_Symbol
19128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19129$as_echo "$ac_res" >&6; }
19130 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
19131 cat >>confdefs.h <<_ACEOF
19132#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19133_ACEOF
19134
19135 eval ac_cv_have_decl_$gl_func=yes
19136fi
19137 done
19138
19139
19140ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
19141if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
19142 ac_have_decl=1
19143else
19144 ac_have_decl=0
19145fi
19146
19147cat >>confdefs.h <<_ACEOF
19148#define HAVE_DECL_STRTOK_R $ac_have_decl
19149_ACEOF
19150
19151
19152
19153
19154
19155
19156
19157
19158 GNULIB_WAITPID=0;
19159
19160
19161
19162
19163 GNULIB_MKTIME=0;
19164 GNULIB_NANOSLEEP=0;
19165 GNULIB_STRPTIME=0;
19166 GNULIB_TIMEGM=0;
19167 GNULIB_TIME_R=0;
19168 HAVE_DECL_LOCALTIME_R=1;
19169 HAVE_NANOSLEEP=1;
19170 HAVE_STRPTIME=1;
19171 HAVE_TIMEGM=1;
19172 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
19173 REPLACE_MKTIME=GNULIB_PORTCHECK;
19174 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
19175 REPLACE_TIMEGM=GNULIB_PORTCHECK;
19176
19177
19178
19179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
19180$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
19181if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
19182 $as_echo_n "(cached) " >&6
19183else
19184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19185/* end confdefs.h. */
19186#include <time.h>
19187
19188int
19189main ()
19190{
19191static struct timespec x; x.tv_sec = x.tv_nsec;
19192 ;
19193 return 0;
19194}
19195_ACEOF
19196if ac_fn_c_try_compile "$LINENO"; then :
19197 gl_cv_sys_struct_timespec_in_time_h=yes
19198else
19199 gl_cv_sys_struct_timespec_in_time_h=no
19200fi
19201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19202fi
19203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
19204$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
19205
19206 TIME_H_DEFINES_STRUCT_TIMESPEC=0
19207 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
19208 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
19209 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
19210 TIME_H_DEFINES_STRUCT_TIMESPEC=1
19211 else
19212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
19213$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
19214if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
19215 $as_echo_n "(cached) " >&6
19216else
19217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19218/* end confdefs.h. */
19219#include <sys/time.h>
19220
19221int
19222main ()
19223{
19224static struct timespec x; x.tv_sec = x.tv_nsec;
19225 ;
19226 return 0;
19227}
19228_ACEOF
19229if ac_fn_c_try_compile "$LINENO"; then :
19230 gl_cv_sys_struct_timespec_in_sys_time_h=yes
19231else
19232 gl_cv_sys_struct_timespec_in_sys_time_h=no
19233fi
19234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19235fi
19236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
19237$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
19238 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
19239 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
19240 else
19241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
19242$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
19243if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
19244 $as_echo_n "(cached) " >&6
19245else
19246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19247/* end confdefs.h. */
19248#include <pthread.h>
19249
19250int
19251main ()
19252{
19253static struct timespec x; x.tv_sec = x.tv_nsec;
19254 ;
19255 return 0;
19256}
19257_ACEOF
19258if ac_fn_c_try_compile "$LINENO"; then :
19259 gl_cv_sys_struct_timespec_in_pthread_h=yes
19260else
19261 gl_cv_sys_struct_timespec_in_pthread_h=no
19262fi
19263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19264fi
19265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
19266$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
19267 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
19268 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
19269 fi
19270 fi
19271 fi
19272
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287 if test $gl_cv_have_include_next = yes; then
19288 gl_cv_next_time_h='<'time.h'>'
19289 else
19290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
19291$as_echo_n "checking absolute name of <time.h>... " >&6; }
19292if ${gl_cv_next_time_h+:} false; then :
19293 $as_echo_n "(cached) " >&6
19294else
19295
19296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19297/* end confdefs.h. */
19298#include <time.h>
19299
19300_ACEOF
19301 case "$host_os" in
19302 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19303 *) gl_absname_cpp="$ac_cpp" ;;
19304 esac
19305
19306 case "$host_os" in
19307 mingw*)
19308 gl_dirsep_regex='[/\\]'
19309 ;;
19310 *)
19311 gl_dirsep_regex='\/'
19312 ;;
19313 esac
19314 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19315
19316 gl_header_literal_regex=`echo 'time.h' \
19317 | sed -e "$gl_make_literal_regex_sed"`
19318 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19319 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19320 s|^/[^/]|//&|
19321 p
19322 q
19323 }'
19324 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19325 sed -n "$gl_absolute_header_sed"`'"'
19326
19327
19328fi
19329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
19330$as_echo "$gl_cv_next_time_h" >&6; }
19331 fi
19332 NEXT_TIME_H=$gl_cv_next_time_h
19333
19334 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19335 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19336 gl_next_as_first_directive='<'time.h'>'
19337 else
19338 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19339 gl_next_as_first_directive=$gl_cv_next_time_h
19340 fi
19341 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
19342
19343
19344
19345
19346
19347
19348
19349
19350ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
19351if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
19352 ac_have_decl=1
19353else
19354 ac_have_decl=0
19355fi
19356
19357cat >>confdefs.h <<_ACEOF
19358#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
19359_ACEOF
19360
19361ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
19362if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
19363 ac_have_decl=1
19364else
19365 ac_have_decl=0
19366fi
19367
19368cat >>confdefs.h <<_ACEOF
19369#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
19370_ACEOF
19371
19372ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
19373if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
19374 ac_have_decl=1
19375else
19376 ac_have_decl=0
19377fi
19378
19379cat >>confdefs.h <<_ACEOF
19380#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
19381_ACEOF
19382
19383ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
19384if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
19385 ac_have_decl=1
19386else
19387 ac_have_decl=0
19388fi
19389
19390cat >>confdefs.h <<_ACEOF
19391#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
19392_ACEOF
19393
19394ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
19395if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
19396 ac_have_decl=1
19397else
19398 ac_have_decl=0
19399fi
19400
19401cat >>confdefs.h <<_ACEOF
19402#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
19403_ACEOF
19404
19405ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
19406if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
19407 ac_have_decl=1
19408else
19409 ac_have_decl=0
19410fi
19411
19412cat >>confdefs.h <<_ACEOF
19413#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
19414_ACEOF
19415
19416ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
19417if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
19418 ac_have_decl=1
19419else
19420 ac_have_decl=0
19421fi
19422
19423cat >>confdefs.h <<_ACEOF
19424#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
19425_ACEOF
19426
19427ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
19428if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
19429 ac_have_decl=1
19430else
19431 ac_have_decl=0
19432fi
19433
19434cat >>confdefs.h <<_ACEOF
19435#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
19436_ACEOF
19437
19438ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
19439if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
19440 ac_have_decl=1
19441else
19442 ac_have_decl=0
19443fi
19444
19445cat >>confdefs.h <<_ACEOF
19446#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
19447_ACEOF
19448
19449
19450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
19451$as_echo_n "checking whether the utimes function works... " >&6; }
19452if ${gl_cv_func_working_utimes+:} false; then :
19453 $as_echo_n "(cached) " >&6
19454else
19455
19456 if test "$cross_compiling" = yes; then :
19457 gl_cv_func_working_utimes=no
19458else
19459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19460/* end confdefs.h. */
19461
19462#include <sys/types.h>
19463#include <sys/stat.h>
19464#include <fcntl.h>
19465#include <sys/time.h>
19466#include <time.h>
19467#include <unistd.h>
19468#include <stdlib.h>
19469#include <stdio.h>
19470#include <utime.h>
19471
19472static int
19473inorder (time_t a, time_t b, time_t c)
19474{
19475 return a <= b && b <= c;
19476}
19477
19478int
19479main ()
19480{
19481 int result = 0;
19482 char const *file = "conftest.utimes";
19483 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
19484
19485 /* Test whether utimes() essentially works. */
19486 {
19487 struct stat sbuf;
19488 FILE *f = fopen (file, "w");
19489 if (f == NULL)
19490 result |= 1;
19491 else if (fclose (f) != 0)
19492 result |= 1;
19493 else if (utimes (file, timeval) != 0)
19494 result |= 2;
19495 else if (lstat (file, &sbuf) != 0)
19496 result |= 1;
19497 else if (!(sbuf.st_atime == timeval[0].tv_sec
19498 && sbuf.st_mtime == timeval[1].tv_sec))
19499 result |= 4;
19500 if (unlink (file) != 0)
19501 result |= 1;
19502 }
19503
19504 /* Test whether utimes() with a NULL argument sets the file's timestamp
19505 to the current time. Use 'fstat' as well as 'time' to
19506 determine the "current" time, to accommodate NFS file systems
19507 if there is a time skew between the host and the NFS server. */
19508 {
19509 int fd = open (file, O_WRONLY|O_CREAT, 0644);
19510 if (fd < 0)
19511 result |= 1;
19512 else
19513 {
19514 time_t t0, t2;
19515 struct stat st0, st1, st2;
19516 if (time (&t0) == (time_t) -1)
19517 result |= 1;
19518 else if (fstat (fd, &st0) != 0)
19519 result |= 1;
19520 else if (utimes (file, timeval) != 0)
19521 result |= 2;
19522 else if (utimes (file, NULL) != 0)
19523 result |= 8;
19524 else if (fstat (fd, &st1) != 0)
19525 result |= 1;
19526 else if (write (fd, "\n", 1) != 1)
19527 result |= 1;
19528 else if (fstat (fd, &st2) != 0)
19529 result |= 1;
19530 else if (time (&t2) == (time_t) -1)
19531 result |= 1;
19532 else
19533 {
19534 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
19535 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
19536 if (! (st1.st_atime == st1.st_mtime))
19537 result |= 16;
19538 if (! (m_ok_POSIX || m_ok_NFS))
19539 result |= 32;
19540 }
19541 if (close (fd) != 0)
19542 result |= 1;
19543 }
19544 if (unlink (file) != 0)
19545 result |= 1;
19546 }
19547
19548 /* Test whether utimes() with a NULL argument works on read-only files. */
19549 {
19550 int fd = open (file, O_WRONLY|O_CREAT, 0444);
19551 if (fd < 0)
19552 result |= 1;
19553 else if (close (fd) != 0)
19554 result |= 1;
19555 else if (utimes (file, NULL) != 0)
19556 result |= 64;
19557 if (unlink (file) != 0)
19558 result |= 1;
19559 }
19560
19561 return result;
19562}
19563
19564_ACEOF
19565if ac_fn_c_try_run "$LINENO"; then :
19566 gl_cv_func_working_utimes=yes
19567else
19568 gl_cv_func_working_utimes=no
19569fi
19570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19571 conftest.$ac_objext conftest.beam conftest.$ac_ext
19572fi
19573
19574fi
19575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
19576$as_echo "$gl_cv_func_working_utimes" >&6; }
19577
19578 if test $gl_cv_func_working_utimes = yes; then
19579
19580$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
19581
19582 fi
19583
19584
19585
19586
19587
19588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
19589$as_echo_n "checking for struct utimbuf... " >&6; }
19590if ${gl_cv_sys_struct_utimbuf+:} false; then :
19591 $as_echo_n "(cached) " >&6
19592else
19593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19594/* end confdefs.h. */
19595#if HAVE_SYS_TIME_H
19596 #include <sys/time.h>
19597 #endif
19598 #include <time.h>
19599 #ifdef HAVE_UTIME_H
19600 #include <utime.h>
19601 #endif
19602
19603int
19604main ()
19605{
19606static struct utimbuf x; x.actime = x.modtime;
19607 ;
19608 return 0;
19609}
19610_ACEOF
19611if ac_fn_c_try_compile "$LINENO"; then :
19612 gl_cv_sys_struct_utimbuf=yes
19613else
19614 gl_cv_sys_struct_utimbuf=no
19615fi
19616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19617fi
19618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
19619$as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
19620
19621 if test $gl_cv_sys_struct_utimbuf = yes; then
19622
19623$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
19624
19625 fi
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
19639$as_echo_n "checking for wint_t... " >&6; }
19640if ${gt_cv_c_wint_t+:} false; then :
19641 $as_echo_n "(cached) " >&6
19642else
19643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19644/* end confdefs.h. */
19645
19646/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19647 <wchar.h>.
19648 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
19649 before <wchar.h>. */
19650#include <stddef.h>
19651#include <stdio.h>
19652#include <time.h>
19653#include <wchar.h>
19654 wint_t foo = (wchar_t)'\0';
19655int
19656main ()
19657{
19658
19659 ;
19660 return 0;
19661}
19662_ACEOF
19663if ac_fn_c_try_compile "$LINENO"; then :
19664 gt_cv_c_wint_t=yes
19665else
19666 gt_cv_c_wint_t=no
19667fi
19668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19669fi
19670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
19671$as_echo "$gt_cv_c_wint_t" >&6; }
19672 if test $gt_cv_c_wint_t = yes; then
19673
19674$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
19675
19676 fi
19677
19678
19679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
19680$as_echo_n "checking for inttypes.h... " >&6; }
19681if ${gl_cv_header_inttypes_h+:} false; then :
19682 $as_echo_n "(cached) " >&6
19683else
19684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19685/* end confdefs.h. */
19686
19687#include <sys/types.h>
19688#include <inttypes.h>
19689
19690int
19691main ()
19692{
19693uintmax_t i = (uintmax_t) -1; return !i;
19694 ;
19695 return 0;
19696}
19697_ACEOF
19698if ac_fn_c_try_compile "$LINENO"; then :
19699 gl_cv_header_inttypes_h=yes
19700else
19701 gl_cv_header_inttypes_h=no
19702fi
19703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19704fi
19705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
19706$as_echo "$gl_cv_header_inttypes_h" >&6; }
19707 if test $gl_cv_header_inttypes_h = yes; then
19708
19709cat >>confdefs.h <<_ACEOF
19710#define HAVE_INTTYPES_H_WITH_UINTMAX 1
19711_ACEOF
19712
19713 fi
19714
19715
19716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
19717$as_echo_n "checking for stdint.h... " >&6; }
19718if ${gl_cv_header_stdint_h+:} false; then :
19719 $as_echo_n "(cached) " >&6
19720else
19721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19722/* end confdefs.h. */
19723#include <sys/types.h>
19724 #include <stdint.h>
19725int
19726main ()
19727{
19728uintmax_t i = (uintmax_t) -1; return !i;
19729 ;
19730 return 0;
19731}
19732_ACEOF
19733if ac_fn_c_try_compile "$LINENO"; then :
19734 gl_cv_header_stdint_h=yes
19735else
19736 gl_cv_header_stdint_h=no
19737fi
19738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19739fi
19740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
19741$as_echo "$gl_cv_header_stdint_h" >&6; }
19742 if test $gl_cv_header_stdint_h = yes; then
19743
19744cat >>confdefs.h <<_ACEOF
19745#define HAVE_STDINT_H_WITH_UINTMAX 1
19746_ACEOF
19747
19748 fi
19749
19750
19751
19752
19753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
19754$as_echo_n "checking for intmax_t... " >&6; }
19755if ${gt_cv_c_intmax_t+:} false; then :
19756 $as_echo_n "(cached) " >&6
19757else
19758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19759/* end confdefs.h. */
19760
19761#include <stddef.h>
19762#include <stdlib.h>
19763#if HAVE_STDINT_H_WITH_UINTMAX
19764#include <stdint.h>
19765#endif
19766#if HAVE_INTTYPES_H_WITH_UINTMAX
19767#include <inttypes.h>
19768#endif
19769
19770int
19771main ()
19772{
19773intmax_t x = -1; return !x;
19774 ;
19775 return 0;
19776}
19777_ACEOF
19778if ac_fn_c_try_compile "$LINENO"; then :
19779 gt_cv_c_intmax_t=yes
19780else
19781 gt_cv_c_intmax_t=no
19782fi
19783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19784fi
19785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
19786$as_echo "$gt_cv_c_intmax_t" >&6; }
19787 if test $gt_cv_c_intmax_t = yes; then
19788
19789$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
19790
19791 else
19792
19793 test $ac_cv_type_long_long_int = yes \
19794 && ac_type='long long' \
19795 || ac_type='long'
19796
19797cat >>confdefs.h <<_ACEOF
19798#define intmax_t $ac_type
19799_ACEOF
19800
19801 fi
19802
19803
19804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
19805$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
19806if ${gl_cv_cc_double_expbit0+:} false; then :
19807 $as_echo_n "(cached) " >&6
19808else
19809
19810 if test "$cross_compiling" = yes; then :
19811
19812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19813/* end confdefs.h. */
19814
19815#if defined arm || defined __arm || defined __arm__
19816 mixed_endianness
19817#endif
19818
19819_ACEOF
19820if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19821 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
19822 gl_cv_cc_double_expbit0="unknown"
19823else
19824
19825 :
19826if ${ac_cv_c_bigendian+:} false; then :
19827 $as_echo_n "(cached) " >&6
19828else
19829 ac_cv_c_bigendian=unknown
19830 # See if we're dealing with a universal compiler.
19831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19832/* end confdefs.h. */
19833#ifndef __APPLE_CC__
19834 not a universal capable compiler
19835 #endif
19836 typedef int dummy;
19837
19838_ACEOF
19839if ac_fn_c_try_compile "$LINENO"; then :
19840
19841 # Check for potential -arch flags. It is not universal unless
19842 # there are at least two -arch flags with different values.
19843 ac_arch=
19844 ac_prev=
19845 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
19846 if test -n "$ac_prev"; then
19847 case $ac_word in
19848 i?86 | x86_64 | ppc | ppc64)
19849 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
19850 ac_arch=$ac_word
19851 else
19852 ac_cv_c_bigendian=universal
19853 break
19854 fi
19855 ;;
19856 esac
19857 ac_prev=
19858 elif test "x$ac_word" = "x-arch"; then
19859 ac_prev=arch
19860 fi
19861 done
19862fi
19863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19864 if test $ac_cv_c_bigendian = unknown; then
19865 # See if sys/param.h defines the BYTE_ORDER macro.
19866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19867/* end confdefs.h. */
19868#include <sys/types.h>
19869 #include <sys/param.h>
19870
19871int
19872main ()
19873{
19874#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
19875 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
19876 && LITTLE_ENDIAN)
19877 bogus endian macros
19878 #endif
19879
19880 ;
19881 return 0;
19882}
19883_ACEOF
19884if ac_fn_c_try_compile "$LINENO"; then :
19885 # It does; now see whether it defined to BIG_ENDIAN or not.
19886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19887/* end confdefs.h. */
19888#include <sys/types.h>
19889 #include <sys/param.h>
19890
19891int
19892main ()
19893{
19894#if BYTE_ORDER != BIG_ENDIAN
19895 not big endian
19896 #endif
19897
19898 ;
19899 return 0;
19900}
19901_ACEOF
19902if ac_fn_c_try_compile "$LINENO"; then :
19903 ac_cv_c_bigendian=yes
19904else
19905 ac_cv_c_bigendian=no
19906fi
19907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19908fi
19909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19910 fi
19911 if test $ac_cv_c_bigendian = unknown; then
19912 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
19913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19914/* end confdefs.h. */
19915#include <limits.h>
19916
19917int
19918main ()
19919{
19920#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
19921 bogus endian macros
19922 #endif
19923
19924 ;
19925 return 0;
19926}
19927_ACEOF
19928if ac_fn_c_try_compile "$LINENO"; then :
19929 # It does; now see whether it defined to _BIG_ENDIAN or not.
19930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19931/* end confdefs.h. */
19932#include <limits.h>
19933
19934int
19935main ()
19936{
19937#ifndef _BIG_ENDIAN
19938 not big endian
19939 #endif
19940
19941 ;
19942 return 0;
19943}
19944_ACEOF
19945if ac_fn_c_try_compile "$LINENO"; then :
19946 ac_cv_c_bigendian=yes
19947else
19948 ac_cv_c_bigendian=no
19949fi
19950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19951fi
19952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19953 fi
19954 if test $ac_cv_c_bigendian = unknown; then
19955 # Compile a test program.
19956 if test "$cross_compiling" = yes; then :
19957 # Try to guess by grepping values from an object file.
19958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19959/* end confdefs.h. */
19960short int ascii_mm[] =
19961 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
19962 short int ascii_ii[] =
19963 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
19964 int use_ascii (int i) {
19965 return ascii_mm[i] + ascii_ii[i];
19966 }
19967 short int ebcdic_ii[] =
19968 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
19969 short int ebcdic_mm[] =
19970 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
19971 int use_ebcdic (int i) {
19972 return ebcdic_mm[i] + ebcdic_ii[i];
19973 }
19974 extern int foo;
19975
19976int
19977main ()
19978{
19979return use_ascii (foo) == use_ebcdic (foo);
19980 ;
19981 return 0;
19982}
19983_ACEOF
19984if ac_fn_c_try_compile "$LINENO"; then :
19985 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
19986 ac_cv_c_bigendian=yes
19987 fi
19988 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
19989 if test "$ac_cv_c_bigendian" = unknown; then
19990 ac_cv_c_bigendian=no
19991 else
19992 # finding both strings is unlikely to happen, but who knows?
19993 ac_cv_c_bigendian=unknown
19994 fi
19995 fi
19996fi
19997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19998else
19999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20000/* end confdefs.h. */
20001$ac_includes_default
20002int
20003main ()
20004{
20005
20006 /* Are we little or big endian? From Harbison&Steele. */
20007 union
20008 {
20009 long int l;
20010 char c[sizeof (long int)];
20011 } u;
20012 u.l = 1;
20013 return u.c[sizeof (long int) - 1] == 1;
20014
20015 ;
20016 return 0;
20017}
20018_ACEOF
20019if ac_fn_c_try_run "$LINENO"; then :
20020 ac_cv_c_bigendian=no
20021else
20022 ac_cv_c_bigendian=yes
20023fi
20024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20025 conftest.$ac_objext conftest.beam conftest.$ac_ext
20026fi
20027
20028 fi
20029fi
20030:
20031 case $ac_cv_c_bigendian in #(
20032 yes)
20033 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
20034 no)
20035 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
20036 universal)
20037
20038$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
20039
20040 ;; #(
20041 *)
20042 gl_cv_cc_double_expbit0="unknown" ;;
20043 esac
20044
20045
20046fi
20047rm -f conftest*
20048
20049
20050else
20051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20052/* end confdefs.h. */
20053
20054#include <float.h>
20055#include <stddef.h>
20056#include <stdio.h>
20057#include <string.h>
20058#define NWORDS \
20059 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
20060typedef union { double value; unsigned int word[NWORDS]; } memory_double;
20061static unsigned int ored_words[NWORDS];
20062static unsigned int anded_words[NWORDS];
20063static void add_to_ored_words (double x)
20064{
20065 memory_double m;
20066 size_t i;
20067 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
20068 memset (&m, 0, sizeof (memory_double));
20069 m.value = x;
20070 for (i = 0; i < NWORDS; i++)
20071 {
20072 ored_words[i] |= m.word[i];
20073 anded_words[i] &= m.word[i];
20074 }
20075}
20076int main ()
20077{
20078 size_t j;
20079 FILE *fp = fopen ("conftest.out", "w");
20080 if (fp == NULL)
20081 return 1;
20082 for (j = 0; j < NWORDS; j++)
20083 anded_words[j] = ~ (unsigned int) 0;
20084 add_to_ored_words (0.25);
20085 add_to_ored_words (0.5);
20086 add_to_ored_words (1.0);
20087 add_to_ored_words (2.0);
20088 add_to_ored_words (4.0);
20089 /* Remove bits that are common (e.g. if representation of the first mantissa
20090 bit is explicit). */
20091 for (j = 0; j < NWORDS; j++)
20092 ored_words[j] &= ~anded_words[j];
20093 /* Now find the nonzero word. */
20094 for (j = 0; j < NWORDS; j++)
20095 if (ored_words[j] != 0)
20096 break;
20097 if (j < NWORDS)
20098 {
20099 size_t i;
20100 for (i = j + 1; i < NWORDS; i++)
20101 if (ored_words[i] != 0)
20102 {
20103 fprintf (fp, "unknown");
20104 return (fclose (fp) != 0);
20105 }
20106 for (i = 0; ; i++)
20107 if ((ored_words[j] >> i) & 1)
20108 {
20109 fprintf (fp, "word %d bit %d", (int) j, (int) i);
20110 return (fclose (fp) != 0);
20111 }
20112 }
20113 fprintf (fp, "unknown");
20114 return (fclose (fp) != 0);
20115}
20116
20117_ACEOF
20118if ac_fn_c_try_run "$LINENO"; then :
20119 gl_cv_cc_double_expbit0=`cat conftest.out`
20120else
20121 gl_cv_cc_double_expbit0="unknown"
20122fi
20123rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20124 conftest.$ac_objext conftest.beam conftest.$ac_ext
20125fi
20126
20127 rm -f conftest.out
20128
20129fi
20130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
20131$as_echo "$gl_cv_cc_double_expbit0" >&6; }
20132 case "$gl_cv_cc_double_expbit0" in
20133 word*bit*)
20134 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
20135 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
20136
20137cat >>confdefs.h <<_ACEOF
20138#define DBL_EXPBIT0_WORD $word
20139_ACEOF
20140
20141
20142cat >>confdefs.h <<_ACEOF
20143#define DBL_EXPBIT0_BIT $bit
20144_ACEOF
20145
20146 ;;
20147 esac
20148
20149
20150
20151
20152
20153
20154
20155 for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
20156do :
20157 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20158ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20159if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20160 cat >>confdefs.h <<_ACEOF
20161#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20162_ACEOF
20163
20164fi
20165done
20166
20167 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
20168"
20169if test "x$ac_cv_have_decl__snprintf" = xyes; then :
20170 ac_have_decl=1
20171else
20172 ac_have_decl=0
20173fi
20174
20175cat >>confdefs.h <<_ACEOF
20176#define HAVE_DECL__SNPRINTF $ac_have_decl
20177_ACEOF
20178
20179
20180
20181 case "$gl_cv_func_snprintf_retval_c99" in
20182 *yes)
20183
20184$as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
20185
20186 ;;
20187 esac
20188
20189ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
20190if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
20191 ac_have_decl=1
20192else
20193 ac_have_decl=0
20194fi
20195
20196cat >>confdefs.h <<_ACEOF
20197#define HAVE_DECL_VSNPRINTF $ac_have_decl
20198_ACEOF
20199
20200
20201
20202
20203 GNULIB_ISWBLANK=0;
20204 GNULIB_WCTYPE=0;
20205 GNULIB_ISWCTYPE=0;
20206 GNULIB_WCTRANS=0;
20207 GNULIB_TOWCTRANS=0;
20208 HAVE_ISWBLANK=1;
20209 HAVE_WCTYPE_T=1;
20210 HAVE_WCTRANS_T=1;
20211 REPLACE_ISWBLANK=0;
20212
20213
20214
20215
20216
20217
20218 if false; then
20219 GL_COND_LIBTOOL_TRUE=
20220 GL_COND_LIBTOOL_FALSE='#'
20221else
20222 GL_COND_LIBTOOL_TRUE='#'
20223 GL_COND_LIBTOOL_FALSE=
20224fi
20225
20226 gl_cond_libtool=false
20227 gl_libdeps=
20228 gl_ltlibdeps=
20229 gl_m4_base='m4'
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239 gl_source_base='lib'
20240
20241if test "$ac_cv_header_winsock2_h" = yes; then
20242
20243
20244
20245
20246
20247
20248
20249
20250 gl_LIBOBJS="$gl_LIBOBJS accept.$ac_objext"
20251
20252fi
20253
20254
20255
20256
20257
20258 GNULIB_ACCEPT=1
20259
20260
20261
20262
20263
20264$as_echo "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
20265
20266
20267
20268
20269
20270 if test $ac_cv_func_alloca_works = no; then
20271 :
20272 fi
20273
20274 # Define an additional variable used in the Makefile substitution.
20275 if test $ac_cv_working_alloca_h = yes; then
20276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
20277$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
20278if ${gl_cv_rpl_alloca+:} false; then :
20279 $as_echo_n "(cached) " >&6
20280else
20281
20282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20283/* end confdefs.h. */
20284
20285#if defined __GNUC__ || defined _AIX || defined _MSC_VER
20286 Need own alloca
20287#endif
20288
20289_ACEOF
20290if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20291 $EGREP "Need own alloca" >/dev/null 2>&1; then :
20292 gl_cv_rpl_alloca=yes
20293else
20294 gl_cv_rpl_alloca=no
20295fi
20296rm -f conftest*
20297
20298
20299fi
20300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
20301$as_echo "$gl_cv_rpl_alloca" >&6; }
20302 if test $gl_cv_rpl_alloca = yes; then
20303
20304$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
20305
20306 ALLOCA_H=alloca.h
20307 else
20308 ALLOCA_H=
20309 fi
20310 else
20311 ALLOCA_H=alloca.h
20312 fi
20313
20314 if test -n "$ALLOCA_H"; then
20315 GL_GENERATE_ALLOCA_H_TRUE=
20316 GL_GENERATE_ALLOCA_H_FALSE='#'
20317else
20318 GL_GENERATE_ALLOCA_H_TRUE='#'
20319 GL_GENERATE_ALLOCA_H_FALSE=
20320fi
20321
20322
20323
20324
20325
20326
20327 if test $ac_cv_header_arpa_inet_h = yes; then
20328 HAVE_ARPA_INET_H=1
20329 else
20330 HAVE_ARPA_INET_H=0
20331 fi
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342 if test $gl_cv_have_include_next = yes; then
20343 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
20344 else
20345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
20346$as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
20347if ${gl_cv_next_arpa_inet_h+:} false; then :
20348 $as_echo_n "(cached) " >&6
20349else
20350
20351 if test $ac_cv_header_arpa_inet_h = yes; then
20352
20353
20354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20355/* end confdefs.h. */
20356#include <arpa/inet.h>
20357
20358_ACEOF
20359 case "$host_os" in
20360 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20361 *) gl_absname_cpp="$ac_cpp" ;;
20362 esac
20363
20364 case "$host_os" in
20365 mingw*)
20366 gl_dirsep_regex='[/\\]'
20367 ;;
20368 *)
20369 gl_dirsep_regex='\/'
20370 ;;
20371 esac
20372 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20373
20374 gl_header_literal_regex=`echo 'arpa/inet.h' \
20375 | sed -e "$gl_make_literal_regex_sed"`
20376 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20377 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20378 s|^/[^/]|//&|
20379 p
20380 q
20381 }'
20382 gl_cv_next_arpa_inet_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20383 sed -n "$gl_absolute_header_sed"`'"'
20384 else
20385 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
20386 fi
20387
20388
20389fi
20390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
20391$as_echo "$gl_cv_next_arpa_inet_h" >&6; }
20392 fi
20393 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
20394
20395 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20396 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20397 gl_next_as_first_directive='<'arpa/inet.h'>'
20398 else
20399 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20400 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
20401 fi
20402 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
20403
20404
20405
20406
20407
20408
20409
20410
20411 for gl_func in inet_ntop inet_pton; do
20412 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
20413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
20414$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
20415if eval \${$as_gl_Symbol+:} false; then :
20416 $as_echo_n "(cached) " >&6
20417else
20418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20419/* end confdefs.h. */
20420
20421/* On some systems, this header is not self-consistent. */
20422#if !(defined __GLIBC__ || defined __UCLIBC__)
20423# include <sys/socket.h>
20424#endif
20425#ifdef __TANDEM
20426# include <netdb.h>
20427#endif
20428#include <arpa/inet.h>
20429
20430int
20431main ()
20432{
20433#undef $gl_func
20434 (void) $gl_func;
20435 ;
20436 return 0;
20437}
20438_ACEOF
20439if ac_fn_c_try_compile "$LINENO"; then :
20440 eval "$as_gl_Symbol=yes"
20441else
20442 eval "$as_gl_Symbol=no"
20443fi
20444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20445fi
20446eval ac_res=\$$as_gl_Symbol
20447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20448$as_echo "$ac_res" >&6; }
20449 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
20450 cat >>confdefs.h <<_ACEOF
20451#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
20452_ACEOF
20453
20454 eval ac_cv_have_decl_$gl_func=yes
20455fi
20456 done
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468if test "$ac_cv_header_winsock2_h" = yes; then
20469
20470
20471
20472
20473
20474
20475
20476
20477 gl_LIBOBJS="$gl_LIBOBJS bind.$ac_objext"
20478
20479fi
20480
20481
20482
20483
20484
20485 GNULIB_BIND=1
20486
20487
20488
20489
20490
20491$as_echo "#define GNULIB_TEST_BIND 1" >>confdefs.h
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501 if test $ac_cv_func_btowc = no; then
20502 HAVE_BTOWC=0
20503 else
20504
20505
20506
20507
20508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
20509$as_echo_n "checking whether btowc(0) is correct... " >&6; }
20510if ${gl_cv_func_btowc_nul+:} false; then :
20511 $as_echo_n "(cached) " >&6
20512else
20513
20514 if test "$cross_compiling" = yes; then :
20515
20516 case "$host_os" in
20517 # Guess no on Cygwin.
20518 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
20519 # Guess yes otherwise.
20520 *) gl_cv_func_btowc_nul="guessing yes" ;;
20521 esac
20522
20523else
20524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20525/* end confdefs.h. */
20526
20527#include <string.h>
20528/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20529 <wchar.h>.
20530 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20531 included before <wchar.h>. */
20532#include <stddef.h>
20533#include <stdio.h>
20534#include <time.h>
20535#include <wchar.h>
20536int main ()
20537{
20538 if (btowc ('\0') != 0)
20539 return 1;
20540 return 0;
20541}
20542_ACEOF
20543if ac_fn_c_try_run "$LINENO"; then :
20544 gl_cv_func_btowc_nul=yes
20545else
20546 gl_cv_func_btowc_nul=no
20547fi
20548rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20549 conftest.$ac_objext conftest.beam conftest.$ac_ext
20550fi
20551
20552
20553fi
20554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
20555$as_echo "$gl_cv_func_btowc_nul" >&6; }
20556
20557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
20558$as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
20559if ${gl_cv_func_btowc_eof+:} false; then :
20560 $as_echo_n "(cached) " >&6
20561else
20562
20563 case "$host_os" in
20564 # Guess no on IRIX.
20565 irix*) gl_cv_func_btowc_eof="guessing no" ;;
20566 # Guess yes otherwise.
20567 *) gl_cv_func_btowc_eof="guessing yes" ;;
20568 esac
20569 if test $LOCALE_FR != none; then
20570 if test "$cross_compiling" = yes; then :
20571 :
20572else
20573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20574/* end confdefs.h. */
20575
20576#include <locale.h>
20577#include <string.h>
20578/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20579 <wchar.h>.
20580 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20581 included before <wchar.h>. */
20582#include <stddef.h>
20583#include <stdio.h>
20584#include <time.h>
20585#include <wchar.h>
20586int main ()
20587{
20588 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
20589 {
20590 if (btowc (EOF) != WEOF)
20591 return 1;
20592 }
20593 return 0;
20594}
20595_ACEOF
20596if ac_fn_c_try_run "$LINENO"; then :
20597 gl_cv_func_btowc_eof=yes
20598else
20599 gl_cv_func_btowc_eof=no
20600fi
20601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20602 conftest.$ac_objext conftest.beam conftest.$ac_ext
20603fi
20604
20605 fi
20606
20607fi
20608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
20609$as_echo "$gl_cv_func_btowc_eof" >&6; }
20610
20611 case "$gl_cv_func_btowc_nul" in
20612 *yes) ;;
20613 *) REPLACE_BTOWC=1 ;;
20614 esac
20615 case "$gl_cv_func_btowc_eof" in
20616 *yes) ;;
20617 *) REPLACE_BTOWC=1 ;;
20618 esac
20619 fi
20620
20621if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
20622
20623
20624
20625
20626
20627
20628
20629
20630 gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
20631
20632
20633 :
20634
20635fi
20636
20637
20638
20639
20640
20641 GNULIB_BTOWC=1
20642
20643
20644
20645
20646
20647$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
20648
20649
20650
20651
20652
20653
20654 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
20655 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
20656
20657 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
20658 # programs in the package would end up linked with that potentially-shared
20659 # library, inducing unnecessary run-time overhead.
20660 LIB_CLOCK_GETTIME=
20661
20662 gl_saved_libs=$LIBS
20663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20664$as_echo_n "checking for library containing clock_gettime... " >&6; }
20665if ${ac_cv_search_clock_gettime+:} false; then :
20666 $as_echo_n "(cached) " >&6
20667else
20668 ac_func_search_save_LIBS=$LIBS
20669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20670/* end confdefs.h. */
20671
20672/* Override any GCC internal prototype to avoid an error.
20673 Use char because int might match the return type of a GCC
20674 builtin and then its argument prototype would still apply. */
20675#ifdef __cplusplus
20676extern "C"
20677#endif
20678char clock_gettime ();
20679int
20680main ()
20681{
20682return clock_gettime ();
20683 ;
20684 return 0;
20685}
20686_ACEOF
20687for ac_lib in '' rt posix4; do
20688 if test -z "$ac_lib"; then
20689 ac_res="none required"
20690 else
20691 ac_res=-l$ac_lib
20692 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20693 fi
20694 if ac_fn_c_try_link "$LINENO"; then :
20695 ac_cv_search_clock_gettime=$ac_res
20696fi
20697rm -f core conftest.err conftest.$ac_objext \
20698 conftest$ac_exeext
20699 if ${ac_cv_search_clock_gettime+:} false; then :
20700 break
20701fi
20702done
20703if ${ac_cv_search_clock_gettime+:} false; then :
20704
20705else
20706 ac_cv_search_clock_gettime=no
20707fi
20708rm conftest.$ac_ext
20709LIBS=$ac_func_search_save_LIBS
20710fi
20711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20712$as_echo "$ac_cv_search_clock_gettime" >&6; }
20713ac_res=$ac_cv_search_clock_gettime
20714if test "$ac_res" != no; then :
20715 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20716 test "$ac_cv_search_clock_gettime" = "none required" ||
20717 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
20718fi
20719
20720 for ac_func in clock_gettime clock_settime
20721do :
20722 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20723ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20724if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20725 cat >>confdefs.h <<_ACEOF
20726#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20727_ACEOF
20728
20729fi
20730done
20731
20732 LIBS=$gl_saved_libs
20733
20734
20735
20736$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
20737
20738
20739
20740
20741
20742 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
20743 REPLACE_CLOSE=1
20744 fi
20745
20746
20747
20748
20749
20750 if test $ac_cv_header_sys_socket_h != yes; then
20751 for ac_header in winsock2.h
20752do :
20753 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20754if test "x$ac_cv_header_winsock2_h" = xyes; then :
20755 cat >>confdefs.h <<_ACEOF
20756#define HAVE_WINSOCK2_H 1
20757_ACEOF
20758
20759fi
20760
20761done
20762
20763 fi
20764 if test "$ac_cv_header_winsock2_h" = yes; then
20765 HAVE_WINSOCK2_H=1
20766 UNISTD_H_HAVE_WINSOCK2_H=1
20767 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20768 else
20769 HAVE_WINSOCK2_H=0
20770 fi
20771
20772
20773 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
20774 REPLACE_CLOSE=1
20775 fi
20776
20777
20778
20779if test $REPLACE_CLOSE = 1; then
20780
20781
20782
20783
20784
20785
20786
20787
20788 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
20789
20790fi
20791
20792
20793
20794
20795
20796 GNULIB_CLOSE=1
20797
20798
20799
20800
20801
20802$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
20803
20804
20805
20806
20807 if test "x$datarootdir" = x; then
20808 datarootdir='${datadir}'
20809
20810 fi
20811 if test "x$docdir" = x; then
20812 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
20813
20814 fi
20815 if test "x$htmldir" = x; then
20816 htmldir='${docdir}'
20817
20818 fi
20819 if test "x$dvidir" = x; then
20820 dvidir='${docdir}'
20821
20822 fi
20823 if test "x$pdfdir" = x; then
20824 pdfdir='${docdir}'
20825
20826 fi
20827 if test "x$psdir" = x; then
20828 psdir='${docdir}'
20829
20830 fi
20831 if test "x$lispdir" = x; then
20832 lispdir='${datarootdir}/emacs/site-lisp'
20833
20834 fi
20835 if test "x$localedir" = x; then
20836 localedir='${datarootdir}/locale'
20837
20838 fi
20839
20840 pkglibexecdir='${libexecdir}/${PACKAGE}'
20841
20842
20843
20844if test "$ac_cv_header_winsock2_h" = yes; then
20845
20846
20847
20848
20849
20850
20851
20852
20853 gl_LIBOBJS="$gl_LIBOBJS connect.$ac_objext"
20854
20855fi
20856
20857
20858
20859
20860
20861 GNULIB_CONNECT=1
20862
20863
20864
20865
20866
20867$as_echo "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
20868
20869
20870
20871
20872
20873
20874 :
20875
20876
20877
20878
20879 :
20880
20881
20882
20883
20884
20885
20886
20887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
20888$as_echo_n "checking whether // is distinct from /... " >&6; }
20889if ${gl_cv_double_slash_root+:} false; then :
20890 $as_echo_n "(cached) " >&6
20891else
20892 if test x"$cross_compiling" = xyes ; then
20893 # When cross-compiling, there is no way to tell whether // is special
20894 # short of a list of hosts. However, the only known hosts to date
20895 # that have a distinct // are Apollo DomainOS (too old to port to),
20896 # Cygwin, and z/OS. If anyone knows of another system for which // has
20897 # special semantics and is distinct from /, please report it to
20898 # <bug-gnulib@gnu.org>.
20899 case $host in
20900 *-cygwin | i370-ibm-openedition)
20901 gl_cv_double_slash_root=yes ;;
20902 *)
20903 # Be optimistic and assume that / and // are the same when we
20904 # don't know.
20905 gl_cv_double_slash_root='unknown, assuming no' ;;
20906 esac
20907 else
20908 set x `ls -di / // 2>/dev/null`
20909 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
20910 gl_cv_double_slash_root=no
20911 else
20912 gl_cv_double_slash_root=yes
20913 fi
20914 fi
20915fi
20916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
20917$as_echo "$gl_cv_double_slash_root" >&6; }
20918 if test "$gl_cv_double_slash_root" = yes; then
20919
20920$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
20921
20922 fi
20923
20924
20925
20926
20927
20928
20929$as_echo "#define HAVE_DUP2 1" >>confdefs.h
20930
20931
20932 if test $HAVE_DUP2 = 1; then
20933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
20934$as_echo_n "checking whether dup2 works... " >&6; }
20935if ${gl_cv_func_dup2_works+:} false; then :
20936 $as_echo_n "(cached) " >&6
20937else
20938 if test "$cross_compiling" = yes; then :
20939 case "$host_os" in
20940 mingw*) # on this platform, dup2 always returns 0 for success
20941 gl_cv_func_dup2_works="guessing no" ;;
20942 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
20943 gl_cv_func_dup2_works="guessing no" ;;
20944 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
20945 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
20946 gl_cv_func_dup2_works="guessing no" ;;
20947 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
20948 gl_cv_func_dup2_works="guessing no" ;;
20949 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
20950 gl_cv_func_dup2_works="guessing no" ;;
20951 *) gl_cv_func_dup2_works="guessing yes" ;;
20952 esac
20953else
20954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20955/* end confdefs.h. */
20956
20957 #include <unistd.h>
20958#include <fcntl.h>
20959#include <errno.h>
20960int
20961main ()
20962{
20963int result = 0;
20964#ifdef FD_CLOEXEC
20965 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
20966 result |= 1;
20967#endif
20968 if (dup2 (1, 1) == 0)
20969 result |= 2;
20970#ifdef FD_CLOEXEC
20971 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
20972 result |= 4;
20973#endif
20974 close (0);
20975 if (dup2 (0, 0) != -1)
20976 result |= 8;
20977 /* Many gnulib modules require POSIX conformance of EBADF. */
20978 if (dup2 (2, 1000000) == -1 && errno != EBADF)
20979 result |= 16;
20980 return result;
20981
20982 ;
20983 return 0;
20984}
20985
20986_ACEOF
20987if ac_fn_c_try_run "$LINENO"; then :
20988 gl_cv_func_dup2_works=yes
20989else
20990 gl_cv_func_dup2_works=no
20991fi
20992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20993 conftest.$ac_objext conftest.beam conftest.$ac_ext
20994fi
20995
20996
20997fi
20998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
20999$as_echo "$gl_cv_func_dup2_works" >&6; }
21000 case "$gl_cv_func_dup2_works" in
21001 *yes) ;;
21002 *)
21003 REPLACE_DUP2=1
21004 ;;
21005 esac
21006 fi
21007
21008
21009if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
21010
21011
21012
21013
21014
21015
21016
21017
21018 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
21019
21020
21021fi
21022
21023
21024
21025
21026
21027 GNULIB_DUP2=1
21028
21029
21030
21031
21032
21033$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043 GNULIB_ENVIRON=1
21044
21045
21046
21047
21048
21049$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
21050
21051
21052
21053
21054
21055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
21056$as_echo_n "checking for error_at_line... " >&6; }
21057if ${ac_cv_lib_error_at_line+:} false; then :
21058 $as_echo_n "(cached) " >&6
21059else
21060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21061/* end confdefs.h. */
21062#include <error.h>
21063int
21064main ()
21065{
21066error_at_line (0, 0, "", 0, "an error occurred");
21067 ;
21068 return 0;
21069}
21070_ACEOF
21071if ac_fn_c_try_link "$LINENO"; then :
21072 ac_cv_lib_error_at_line=yes
21073else
21074 ac_cv_lib_error_at_line=no
21075fi
21076rm -f core conftest.err conftest.$ac_objext \
21077 conftest$ac_exeext conftest.$ac_ext
21078fi
21079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
21080$as_echo "$ac_cv_lib_error_at_line" >&6; }
21081
21082if test $ac_cv_lib_error_at_line = no; then
21083
21084
21085
21086
21087
21088
21089
21090
21091 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
21092
21093
21094
21095
21096 :
21097
21098fi
21099
21100
21101 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
21102
21103
21104
21105 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121 if test $ac_cv_func_fcntl = no; then
21122
21123
21124
21125 if test $ac_cv_func_fcntl = no; then
21126 HAVE_FCNTL=0
21127 else
21128 REPLACE_FCNTL=1
21129 fi
21130
21131 else
21132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
21133$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
21134if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
21135 $as_echo_n "(cached) " >&6
21136else
21137 if test "$cross_compiling" = yes; then :
21138 # Guess that it works on glibc systems
21139 case $host_os in #((
21140 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
21141 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
21142 esac
21143else
21144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21145/* end confdefs.h. */
21146
21147#include <fcntl.h>
21148#include <errno.h>
21149
21150int
21151main ()
21152{
21153int result = 0;
21154 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
21155 if (errno != EINVAL) result |= 2;
21156 return result;
21157
21158 ;
21159 return 0;
21160}
21161_ACEOF
21162if ac_fn_c_try_run "$LINENO"; then :
21163 gl_cv_func_fcntl_f_dupfd_works=yes
21164else
21165 gl_cv_func_fcntl_f_dupfd_works=no
21166fi
21167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21168 conftest.$ac_objext conftest.beam conftest.$ac_ext
21169fi
21170
21171fi
21172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
21173$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
21174 case $gl_cv_func_fcntl_f_dupfd_works in
21175 *yes) ;;
21176 *)
21177
21178
21179 if test $ac_cv_func_fcntl = no; then
21180 HAVE_FCNTL=0
21181 else
21182 REPLACE_FCNTL=1
21183 fi
21184
21185
21186$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
21187 ;;
21188 esac
21189
21190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
21191$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
21192if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
21193 $as_echo_n "(cached) " >&6
21194else
21195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21196/* end confdefs.h. */
21197
21198#include <fcntl.h>
21199#ifndef F_DUPFD_CLOEXEC
21200choke me
21201#endif
21202
21203int
21204main ()
21205{
21206
21207 ;
21208 return 0;
21209}
21210_ACEOF
21211if ac_fn_c_try_compile "$LINENO"; then :
21212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21213/* end confdefs.h. */
21214
21215#ifdef __linux__
21216/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
21217 it to support the semantics on older kernels that failed with EINVAL. */
21218choke me
21219#endif
21220
21221int
21222main ()
21223{
21224
21225 ;
21226 return 0;
21227}
21228_ACEOF
21229if ac_fn_c_try_compile "$LINENO"; then :
21230 gl_cv_func_fcntl_f_dupfd_cloexec=yes
21231else
21232 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
21233fi
21234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21235else
21236 gl_cv_func_fcntl_f_dupfd_cloexec=no
21237fi
21238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21239fi
21240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
21241$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
21242 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
21243
21244
21245
21246 if test $ac_cv_func_fcntl = no; then
21247 HAVE_FCNTL=0
21248 else
21249 REPLACE_FCNTL=1
21250 fi
21251
21252 fi
21253 fi
21254
21255
21256if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
21257
21258
21259
21260
21261
21262
21263
21264
21265 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
21266
21267fi
21268
21269
21270
21271
21272
21273 GNULIB_FCNTL=1
21274
21275
21276
21277
21278
21279$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294 if test $gl_cv_have_include_next = yes; then
21295 gl_cv_next_fcntl_h='<'fcntl.h'>'
21296 else
21297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
21298$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
21299if ${gl_cv_next_fcntl_h+:} false; then :
21300 $as_echo_n "(cached) " >&6
21301else
21302
21303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21304/* end confdefs.h. */
21305#include <fcntl.h>
21306
21307_ACEOF
21308 case "$host_os" in
21309 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21310 *) gl_absname_cpp="$ac_cpp" ;;
21311 esac
21312
21313 case "$host_os" in
21314 mingw*)
21315 gl_dirsep_regex='[/\\]'
21316 ;;
21317 *)
21318 gl_dirsep_regex='\/'
21319 ;;
21320 esac
21321 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21322
21323 gl_header_literal_regex=`echo 'fcntl.h' \
21324 | sed -e "$gl_make_literal_regex_sed"`
21325 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21326 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21327 s|^/[^/]|//&|
21328 p
21329 q
21330 }'
21331 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21332 sed -n "$gl_absolute_header_sed"`'"'
21333
21334
21335fi
21336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
21337$as_echo "$gl_cv_next_fcntl_h" >&6; }
21338 fi
21339 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
21340
21341 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21342 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21343 gl_next_as_first_directive='<'fcntl.h'>'
21344 else
21345 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21346 gl_next_as_first_directive=$gl_cv_next_fcntl_h
21347 fi
21348 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359 for gl_func in fcntl openat; do
21360 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21362$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21363if eval \${$as_gl_Symbol+:} false; then :
21364 $as_echo_n "(cached) " >&6
21365else
21366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21367/* end confdefs.h. */
21368#include <fcntl.h>
21369
21370int
21371main ()
21372{
21373#undef $gl_func
21374 (void) $gl_func;
21375 ;
21376 return 0;
21377}
21378_ACEOF
21379if ac_fn_c_try_compile "$LINENO"; then :
21380 eval "$as_gl_Symbol=yes"
21381else
21382 eval "$as_gl_Symbol=no"
21383fi
21384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21385fi
21386eval ac_res=\$$as_gl_Symbol
21387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21388$as_echo "$ac_res" >&6; }
21389 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
21390 cat >>confdefs.h <<_ACEOF
21391#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21392_ACEOF
21393
21394 eval ac_cv_have_decl_$gl_func=yes
21395fi
21396 done
21397
21398
21399
21400
21401cat >>confdefs.h <<_ACEOF
21402#define GNULIB_FD_SAFER_FLAG 1
21403_ACEOF
21404
21405
21406
21407
21408
21409 FLOAT_H=
21410 REPLACE_FLOAT_LDBL=0
21411 case "$host_os" in
21412 aix* | beos* | openbsd* | mirbsd* | irix*)
21413 FLOAT_H=float.h
21414 ;;
21415 freebsd*)
21416 case "$host_cpu" in
21417 i[34567]86 )
21418 FLOAT_H=float.h
21419 ;;
21420 x86_64 )
21421 # On x86_64 systems, the C compiler may still be generating
21422 # 32-bit code.
21423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21424/* end confdefs.h. */
21425#if defined __LP64__ || defined __x86_64__ || defined __amd64__
21426 yes
21427 #endif
21428_ACEOF
21429if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21430 $EGREP "yes" >/dev/null 2>&1; then :
21431
21432else
21433 FLOAT_H=float.h
21434fi
21435rm -f conftest*
21436
21437 ;;
21438 esac
21439 ;;
21440 linux*)
21441 case "$host_cpu" in
21442 powerpc*)
21443 FLOAT_H=float.h
21444 ;;
21445 esac
21446 ;;
21447 esac
21448 case "$host_os" in
21449 aix* | freebsd* | linux*)
21450 if test -n "$FLOAT_H"; then
21451 REPLACE_FLOAT_LDBL=1
21452 fi
21453 ;;
21454 esac
21455
21456 REPLACE_ITOLD=0
21457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
21458$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
21459if ${gl_cv_func_itold_works+:} false; then :
21460 $as_echo_n "(cached) " >&6
21461else
21462
21463 if test "$cross_compiling" = yes; then :
21464 case "$host" in
21465 sparc*-*-linux*)
21466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21467/* end confdefs.h. */
21468#if defined __LP64__ || defined __arch64__
21469 yes
21470 #endif
21471_ACEOF
21472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21473 $EGREP "yes" >/dev/null 2>&1; then :
21474 gl_cv_func_itold_works="guessing no"
21475else
21476 gl_cv_func_itold_works="guessing yes"
21477fi
21478rm -f conftest*
21479
21480 ;;
21481 *) gl_cv_func_itold_works="guessing yes" ;;
21482 esac
21483
21484else
21485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21486/* end confdefs.h. */
21487
21488int i = -1;
21489volatile long double ld;
21490int main ()
21491{
21492 ld += i * 1.0L;
21493 if (ld > 0)
21494 return 1;
21495 return 0;
21496}
21497_ACEOF
21498if ac_fn_c_try_run "$LINENO"; then :
21499 gl_cv_func_itold_works=yes
21500else
21501 gl_cv_func_itold_works=no
21502fi
21503rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21504 conftest.$ac_objext conftest.beam conftest.$ac_ext
21505fi
21506
21507
21508fi
21509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
21510$as_echo "$gl_cv_func_itold_works" >&6; }
21511 case "$gl_cv_func_itold_works" in
21512 *no)
21513 REPLACE_ITOLD=1
21514 FLOAT_H=float.h
21515 ;;
21516 esac
21517
21518 if test -n "$FLOAT_H"; then
21519
21520
21521
21522
21523
21524
21525
21526
21527 if test $gl_cv_have_include_next = yes; then
21528 gl_cv_next_float_h='<'float.h'>'
21529 else
21530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
21531$as_echo_n "checking absolute name of <float.h>... " >&6; }
21532if ${gl_cv_next_float_h+:} false; then :
21533 $as_echo_n "(cached) " >&6
21534else
21535
21536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21537/* end confdefs.h. */
21538#include <float.h>
21539
21540_ACEOF
21541 case "$host_os" in
21542 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21543 *) gl_absname_cpp="$ac_cpp" ;;
21544 esac
21545
21546 case "$host_os" in
21547 mingw*)
21548 gl_dirsep_regex='[/\\]'
21549 ;;
21550 *)
21551 gl_dirsep_regex='\/'
21552 ;;
21553 esac
21554 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21555
21556 gl_header_literal_regex=`echo 'float.h' \
21557 | sed -e "$gl_make_literal_regex_sed"`
21558 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21559 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21560 s|^/[^/]|//&|
21561 p
21562 q
21563 }'
21564 gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21565 sed -n "$gl_absolute_header_sed"`'"'
21566
21567
21568fi
21569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
21570$as_echo "$gl_cv_next_float_h" >&6; }
21571 fi
21572 NEXT_FLOAT_H=$gl_cv_next_float_h
21573
21574 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21575 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21576 gl_next_as_first_directive='<'float.h'>'
21577 else
21578 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21579 gl_next_as_first_directive=$gl_cv_next_float_h
21580 fi
21581 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
21582
21583
21584
21585
21586 fi
21587
21588 if test -n "$FLOAT_H"; then
21589 GL_GENERATE_FLOAT_H_TRUE=
21590 GL_GENERATE_FLOAT_H_FALSE='#'
21591else
21592 GL_GENERATE_FLOAT_H_TRUE='#'
21593 GL_GENERATE_FLOAT_H_FALSE=
21594fi
21595
21596
21597
21598if test $REPLACE_FLOAT_LDBL = 1; then
21599
21600
21601
21602
21603
21604
21605
21606
21607 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
21608
21609fi
21610if test $REPLACE_ITOLD = 1; then
21611
21612
21613
21614
21615
21616
21617
21618
21619 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
21620
21621fi
21622
21623
21624
21625 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
21626 REPLACE_FSEEK=1
21627 fi
21628
21629if test $REPLACE_FSEEK = 1; then
21630
21631
21632
21633
21634
21635
21636
21637
21638 gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
21639
21640fi
21641
21642
21643
21644
21645
21646 GNULIB_FSEEK=1
21647
21648
21649
21650
21651
21652$as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
21665$as_echo_n "checking for fseeko... " >&6; }
21666if ${gl_cv_func_fseeko+:} false; then :
21667 $as_echo_n "(cached) " >&6
21668else
21669
21670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21671/* end confdefs.h. */
21672#include <stdio.h>
21673
21674int
21675main ()
21676{
21677fseeko (stdin, 0, 0);
21678 ;
21679 return 0;
21680}
21681_ACEOF
21682if ac_fn_c_try_link "$LINENO"; then :
21683 gl_cv_func_fseeko=yes
21684else
21685 gl_cv_func_fseeko=no
21686fi
21687rm -f core conftest.err conftest.$ac_objext \
21688 conftest$ac_exeext conftest.$ac_ext
21689
21690fi
21691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
21692$as_echo "$gl_cv_func_fseeko" >&6; }
21693
21694
21695 if test $ac_cv_have_decl_fseeko = no; then
21696 HAVE_DECL_FSEEKO=0
21697 fi
21698
21699 if test $gl_cv_func_fseeko = no; then
21700 HAVE_FSEEKO=0
21701 else
21702 if test $WINDOWS_64_BIT_OFF_T = 1; then
21703 REPLACE_FSEEKO=1
21704 fi
21705 if test $gl_cv_var_stdin_large_offset = no; then
21706 REPLACE_FSEEKO=1
21707 fi
21708
21709 fi
21710
21711if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
21712
21713
21714
21715
21716
21717
21718
21719
21720 gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
21721
21722
21723 for ac_func in _fseeki64
21724do :
21725 ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
21726if test "x$ac_cv_func__fseeki64" = xyes; then :
21727 cat >>confdefs.h <<_ACEOF
21728#define HAVE__FSEEKI64 1
21729_ACEOF
21730
21731fi
21732done
21733
21734
21735fi
21736
21737
21738
21739
21740
21741 GNULIB_FSEEKO=1
21742
21743
21744
21745
21746
21747$as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
21748
21749
21750
21751
21752
21753
21754
21755 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21756 REPLACE_FSTAT=1
21757 fi
21758
21759
21760 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
21761 REPLACE_FSTAT=1
21762 fi
21763
21764
21765
21766if test $REPLACE_FSTAT = 1; then
21767
21768
21769
21770
21771
21772
21773
21774
21775 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
21776
21777
21778
21779
21780fi
21781
21782
21783
21784
21785
21786 GNULIB_FSTAT=1
21787
21788
21789
21790
21791
21792$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
21793
21794
21795
21796
21797
21798
21799 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
21800 REPLACE_FTELL=1
21801 fi
21802
21803if test $REPLACE_FTELL = 1; then
21804
21805
21806
21807
21808
21809
21810
21811
21812 gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
21813
21814fi
21815
21816
21817
21818
21819
21820 GNULIB_FTELL=1
21821
21822
21823
21824
21825
21826$as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839 if test $ac_cv_have_decl_ftello = no; then
21840 HAVE_DECL_FTELLO=0
21841 fi
21842
21843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
21844$as_echo_n "checking for ftello... " >&6; }
21845if ${gl_cv_func_ftello+:} false; then :
21846 $as_echo_n "(cached) " >&6
21847else
21848
21849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21850/* end confdefs.h. */
21851#include <stdio.h>
21852int
21853main ()
21854{
21855ftello (stdin);
21856 ;
21857 return 0;
21858}
21859_ACEOF
21860if ac_fn_c_try_link "$LINENO"; then :
21861 gl_cv_func_ftello=yes
21862else
21863 gl_cv_func_ftello=no
21864fi
21865rm -f core conftest.err conftest.$ac_objext \
21866 conftest$ac_exeext conftest.$ac_ext
21867
21868fi
21869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
21870$as_echo "$gl_cv_func_ftello" >&6; }
21871 if test $gl_cv_func_ftello = no; then
21872 HAVE_FTELLO=0
21873 else
21874 if test $WINDOWS_64_BIT_OFF_T = 1; then
21875 REPLACE_FTELLO=1
21876 fi
21877 if test $gl_cv_var_stdin_large_offset = no; then
21878 REPLACE_FTELLO=1
21879 fi
21880 if test $REPLACE_FTELLO = 0; then
21881
21882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
21883$as_echo_n "checking whether ftello works... " >&6; }
21884if ${gl_cv_func_ftello_works+:} false; then :
21885 $as_echo_n "(cached) " >&6
21886else
21887
21888 case "$host_os" in
21889 # Guess no on Solaris.
21890 solaris*) gl_cv_func_ftello_works="guessing no" ;;
21891 # Guess yes otherwise.
21892 *) gl_cv_func_ftello_works="guessing yes" ;;
21893 esac
21894 if test "$cross_compiling" = yes; then :
21895 :
21896else
21897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21898/* end confdefs.h. */
21899
21900#include <stdio.h>
21901#include <stdlib.h>
21902#include <string.h>
21903#define TESTFILE "conftest.tmp"
21904int
21905main (void)
21906{
21907 FILE *fp;
21908
21909 /* Create a file with some contents. */
21910 fp = fopen (TESTFILE, "w");
21911 if (fp == NULL)
21912 return 70;
21913 if (fwrite ("foogarsh", 1, 8, fp) < 8)
21914 return 71;
21915 if (fclose (fp))
21916 return 72;
21917
21918 /* The file's contents is now "foogarsh". */
21919
21920 /* Try writing after reading to EOF. */
21921 fp = fopen (TESTFILE, "r+");
21922 if (fp == NULL)
21923 return 73;
21924 if (fseek (fp, -1, SEEK_END))
21925 return 74;
21926 if (!(getc (fp) == 'h'))
21927 return 1;
21928 if (!(getc (fp) == EOF))
21929 return 2;
21930 if (!(ftell (fp) == 8))
21931 return 3;
21932 if (!(ftell (fp) == 8))
21933 return 4;
21934 if (!(putc ('!', fp) == '!'))
21935 return 5;
21936 if (!(ftell (fp) == 9))
21937 return 6;
21938 if (!(fclose (fp) == 0))
21939 return 7;
21940 fp = fopen (TESTFILE, "r");
21941 if (fp == NULL)
21942 return 75;
21943 {
21944 char buf[10];
21945 if (!(fread (buf, 1, 10, fp) == 9))
21946 return 10;
21947 if (!(memcmp (buf, "foogarsh!", 9) == 0))
21948 return 11;
21949 }
21950 if (!(fclose (fp) == 0))
21951 return 12;
21952
21953 /* The file's contents is now "foogarsh!". */
21954
21955 return 0;
21956}
21957_ACEOF
21958if ac_fn_c_try_run "$LINENO"; then :
21959 gl_cv_func_ftello_works=yes
21960else
21961 gl_cv_func_ftello_works=no
21962fi
21963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21964 conftest.$ac_objext conftest.beam conftest.$ac_ext
21965fi
21966
21967
21968fi
21969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
21970$as_echo "$gl_cv_func_ftello_works" >&6; }
21971 case "$gl_cv_func_ftello_works" in
21972 *yes) ;;
21973 *)
21974 REPLACE_FTELLO=1
21975
21976$as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
21977
21978 ;;
21979 esac
21980 fi
21981 fi
21982
21983if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
21984
21985
21986
21987
21988
21989
21990
21991
21992 gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
21993
21994
21995 for ac_func in _ftelli64
21996do :
21997 ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
21998if test "x$ac_cv_func__ftelli64" = xyes; then :
21999 cat >>confdefs.h <<_ACEOF
22000#define HAVE__FTELLI64 1
22001_ACEOF
22002
22003fi
22004done
22005
22006
22007fi
22008
22009
22010
22011
22012
22013 GNULIB_FTELLO=1
22014
22015
22016
22017
22018
22019$as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
22020
22021
22022
22023
22024
22025
22026
22027 if test $ac_cv_func_futimens = no; then
22028 HAVE_FUTIMENS=0
22029 else
22030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimens works" >&5
22031$as_echo_n "checking whether futimens works... " >&6; }
22032if ${gl_cv_func_futimens_works+:} false; then :
22033 $as_echo_n "(cached) " >&6
22034else
22035 if test "$cross_compiling" = yes; then :
22036 gl_cv_func_futimens_works="guessing no"
22037else
22038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22039/* end confdefs.h. */
22040
22041#include <fcntl.h>
22042#include <sys/stat.h>
22043#include <unistd.h>
22044#include <errno.h>
22045
22046int
22047main ()
22048{
22049struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
22050 int fd = creat ("conftest.file", 0600);
22051 struct stat st;
22052 if (fd < 0) return 1;
22053 errno = 0;
22054 if (futimens (AT_FDCWD, NULL) == 0) return 2;
22055 if (errno != EBADF) return 3;
22056 if (futimens (fd, ts)) return 4;
22057 sleep (1);
22058 ts[0].tv_nsec = UTIME_NOW;
22059 ts[1].tv_nsec = UTIME_OMIT;
22060 if (futimens (fd, ts)) return 5;
22061 if (fstat (fd, &st)) return 6;
22062 if (st.st_ctime < st.st_atime) return 7;
22063
22064 ;
22065 return 0;
22066}
22067_ACEOF
22068if ac_fn_c_try_run "$LINENO"; then :
22069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22070/* end confdefs.h. */
22071
22072#ifdef __linux__
22073/* The Linux kernel added futimens in 2.6.22, but has bugs with UTIME_OMIT
22074 in several file systems as recently as 2.6.32. Always replace futimens
22075 to support older kernels. */
22076choke me
22077#endif
22078
22079int
22080main ()
22081{
22082
22083 ;
22084 return 0;
22085}
22086_ACEOF
22087if ac_fn_c_try_compile "$LINENO"; then :
22088 gl_cv_func_futimens_works=yes
22089else
22090 gl_cv_func_futimens_works="needs runtime check"
22091fi
22092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22093else
22094 gl_cv_func_futimens_works=no
22095fi
22096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22097 conftest.$ac_objext conftest.beam conftest.$ac_ext
22098fi
22099
22100 rm -f conftest.file
22101fi
22102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimens_works" >&5
22103$as_echo "$gl_cv_func_futimens_works" >&6; }
22104 if test "$gl_cv_func_futimens_works" != yes; then
22105 REPLACE_FUTIMENS=1
22106 fi
22107 fi
22108
22109if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
22110
22111
22112
22113
22114
22115
22116
22117
22118 gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext"
22119
22120fi
22121
22122
22123
22124
22125
22126 GNULIB_FUTIMENS=1
22127
22128
22129
22130
22131
22132$as_echo "#define GNULIB_TEST_FUTIMENS 1" >>confdefs.h
22133
22134
22135
22136
22137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&5
22138$as_echo "$as_me: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&6;}
22139 GETADDRINFO_LIB=
22140 gai_saved_LIBS="$LIBS"
22141
22142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5
22143$as_echo_n "checking for library containing getaddrinfo... " >&6; }
22144if ${ac_cv_search_getaddrinfo+:} false; then :
22145 $as_echo_n "(cached) " >&6
22146else
22147 ac_func_search_save_LIBS=$LIBS
22148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22149/* end confdefs.h. */
22150
22151/* Override any GCC internal prototype to avoid an error.
22152 Use char because int might match the return type of a GCC
22153 builtin and then its argument prototype would still apply. */
22154#ifdef __cplusplus
22155extern "C"
22156#endif
22157char getaddrinfo ();
22158int
22159main ()
22160{
22161return getaddrinfo ();
22162 ;
22163 return 0;
22164}
22165_ACEOF
22166for ac_lib in '' socket network net; do
22167 if test -z "$ac_lib"; then
22168 ac_res="none required"
22169 else
22170 ac_res=-l$ac_lib
22171 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22172 fi
22173 if ac_fn_c_try_link "$LINENO"; then :
22174 ac_cv_search_getaddrinfo=$ac_res
22175fi
22176rm -f core conftest.err conftest.$ac_objext \
22177 conftest$ac_exeext
22178 if ${ac_cv_search_getaddrinfo+:} false; then :
22179 break
22180fi
22181done
22182if ${ac_cv_search_getaddrinfo+:} false; then :
22183
22184else
22185 ac_cv_search_getaddrinfo=no
22186fi
22187rm conftest.$ac_ext
22188LIBS=$ac_func_search_save_LIBS
22189fi
22190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5
22191$as_echo "$ac_cv_search_getaddrinfo" >&6; }
22192ac_res=$ac_cv_search_getaddrinfo
22193if test "$ac_res" != no; then :
22194 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22195 if test "$ac_cv_search_getaddrinfo" != "none required"; then
22196 GETADDRINFO_LIB="$ac_cv_search_getaddrinfo"
22197 fi
22198fi
22199
22200 LIBS="$gai_saved_LIBS $GETADDRINFO_LIB"
22201
22202 HAVE_GETADDRINFO=1
22203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
22204$as_echo_n "checking for getaddrinfo... " >&6; }
22205if ${gl_cv_func_getaddrinfo+:} false; then :
22206 $as_echo_n "(cached) " >&6
22207else
22208
22209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22210/* end confdefs.h. */
22211
22212#include <sys/types.h>
22213#ifdef HAVE_SYS_SOCKET_H
22214#include <sys/socket.h>
22215#endif
22216#ifdef HAVE_NETDB_H
22217#include <netdb.h>
22218#endif
22219#include <stddef.h>
22220
22221int
22222main ()
22223{
22224getaddrinfo("", "", NULL, NULL);
22225 ;
22226 return 0;
22227}
22228_ACEOF
22229if ac_fn_c_try_link "$LINENO"; then :
22230 gl_cv_func_getaddrinfo=yes
22231else
22232 gl_cv_func_getaddrinfo=no
22233fi
22234rm -f core conftest.err conftest.$ac_objext \
22235 conftest$ac_exeext conftest.$ac_ext
22236fi
22237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getaddrinfo" >&5
22238$as_echo "$gl_cv_func_getaddrinfo" >&6; }
22239 if test $gl_cv_func_getaddrinfo = no; then
22240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in ws2tcpip.h and -lws2_32" >&5
22241$as_echo_n "checking for getaddrinfo in ws2tcpip.h and -lws2_32... " >&6; }
22242if ${gl_cv_w32_getaddrinfo+:} false; then :
22243 $as_echo_n "(cached) " >&6
22244else
22245
22246 gl_cv_w32_getaddrinfo=no
22247 am_save_LIBS="$LIBS"
22248 LIBS="$LIBS -lws2_32"
22249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22250/* end confdefs.h. */
22251
22252#ifdef HAVE_WS2TCPIP_H
22253#include <ws2tcpip.h>
22254#endif
22255#include <stddef.h>
22256
22257int
22258main ()
22259{
22260getaddrinfo(NULL, NULL, NULL, NULL);
22261 ;
22262 return 0;
22263}
22264_ACEOF
22265if ac_fn_c_try_link "$LINENO"; then :
22266 gl_cv_w32_getaddrinfo=yes
22267fi
22268rm -f core conftest.err conftest.$ac_objext \
22269 conftest$ac_exeext conftest.$ac_ext
22270 LIBS="$am_save_LIBS"
22271
22272fi
22273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_getaddrinfo" >&5
22274$as_echo "$gl_cv_w32_getaddrinfo" >&6; }
22275 if test "$gl_cv_w32_getaddrinfo" = "yes"; then
22276 GETADDRINFO_LIB="-lws2_32"
22277 LIBS="$gai_saved_LIBS $GETADDRINFO_LIB"
22278 else
22279 HAVE_GETADDRINFO=0
22280 fi
22281 fi
22282
22283 # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an
22284 # inline function declared in ws2tcpip.h, so we need to get that
22285 # header included somehow.
22286 ac_fn_c_check_decl "$LINENO" "gai_strerror" "ac_cv_have_decl_gai_strerror" "
22287#include <sys/types.h>
22288#ifdef HAVE_SYS_SOCKET_H
22289#include <sys/socket.h>
22290#endif
22291#ifdef HAVE_NETDB_H
22292#include <netdb.h>
22293#endif
22294#ifdef HAVE_WS2TCPIP_H
22295#include <ws2tcpip.h>
22296#endif
22297#include <stddef.h>
22298
22299"
22300if test "x$ac_cv_have_decl_gai_strerror" = xyes; then :
22301 ac_have_decl=1
22302else
22303 ac_have_decl=0
22304fi
22305
22306cat >>confdefs.h <<_ACEOF
22307#define HAVE_DECL_GAI_STRERROR $ac_have_decl
22308_ACEOF
22309
22310 if test $ac_cv_have_decl_gai_strerror = yes; then
22311 ac_fn_c_check_decl "$LINENO" "gai_strerrorA" "ac_cv_have_decl_gai_strerrorA" "
22312#include <sys/types.h>
22313#ifdef HAVE_SYS_SOCKET_H
22314#include <sys/socket.h>
22315#endif
22316#ifdef HAVE_NETDB_H
22317#include <netdb.h>
22318#endif
22319#ifdef HAVE_WS2TCPIP_H
22320#include <ws2tcpip.h>
22321#endif
22322#include <stddef.h>
22323
22324"
22325if test "x$ac_cv_have_decl_gai_strerrorA" = xyes; then :
22326 ac_have_decl=1
22327else
22328 ac_have_decl=0
22329fi
22330
22331cat >>confdefs.h <<_ACEOF
22332#define HAVE_DECL_GAI_STRERRORA $ac_have_decl
22333_ACEOF
22334
22335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gai_strerror with POSIX signature" >&5
22336$as_echo_n "checking for gai_strerror with POSIX signature... " >&6; }
22337if ${gl_cv_func_gai_strerror_posix_signature+:} false; then :
22338 $as_echo_n "(cached) " >&6
22339else
22340
22341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22342/* end confdefs.h. */
22343
22344#include <sys/types.h>
22345#ifdef HAVE_SYS_SOCKET_H
22346#include <sys/socket.h>
22347#endif
22348#ifdef HAVE_NETDB_H
22349#include <netdb.h>
22350#endif
22351#ifdef HAVE_WS2TCPIP_H
22352#include <ws2tcpip.h>
22353#endif
22354#include <stddef.h>
22355extern
22356#ifdef __cplusplus
22357"C"
22358#endif
22359const char *gai_strerror(int);
22360_ACEOF
22361if ac_fn_c_try_compile "$LINENO"; then :
22362 gl_cv_func_gai_strerror_posix_signature=yes
22363else
22364 gl_cv_func_gai_strerror_posix_signature=no
22365fi
22366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22367fi
22368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gai_strerror_posix_signature" >&5
22369$as_echo "$gl_cv_func_gai_strerror_posix_signature" >&6; }
22370 if test $gl_cv_func_gai_strerror_posix_signature = no; then
22371 REPLACE_GAI_STRERROR=1
22372 fi
22373 fi
22374
22375 LIBS="$gai_saved_LIBS"
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "
22386#include <sys/types.h>
22387#include <sys/socket.h>
22388
22389"
22390if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
22391
22392cat >>confdefs.h <<_ACEOF
22393#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
22394_ACEOF
22395
22396
22397fi
22398
22399
22400
22401
22402 ac_fn_c_check_decl "$LINENO" "getaddrinfo" "ac_cv_have_decl_getaddrinfo" "
22403 /* sys/types.h is not needed according to POSIX, but the
22404 sys/socket.h in i386-unknown-freebsd4.10 and
22405 powerpc-apple-darwin5.5 required it. */
22406#include <sys/types.h>
22407#ifdef HAVE_SYS_SOCKET_H
22408#include <sys/socket.h>
22409#endif
22410#ifdef HAVE_NETDB_H
22411#include <netdb.h>
22412#endif
22413#ifdef HAVE_WS2TCPIP_H
22414#include <ws2tcpip.h>
22415#endif
22416
22417"
22418if test "x$ac_cv_have_decl_getaddrinfo" = xyes; then :
22419 ac_have_decl=1
22420else
22421 ac_have_decl=0
22422fi
22423
22424cat >>confdefs.h <<_ACEOF
22425#define HAVE_DECL_GETADDRINFO $ac_have_decl
22426_ACEOF
22427ac_fn_c_check_decl "$LINENO" "freeaddrinfo" "ac_cv_have_decl_freeaddrinfo" "
22428 /* sys/types.h is not needed according to POSIX, but the
22429 sys/socket.h in i386-unknown-freebsd4.10 and
22430 powerpc-apple-darwin5.5 required it. */
22431#include <sys/types.h>
22432#ifdef HAVE_SYS_SOCKET_H
22433#include <sys/socket.h>
22434#endif
22435#ifdef HAVE_NETDB_H
22436#include <netdb.h>
22437#endif
22438#ifdef HAVE_WS2TCPIP_H
22439#include <ws2tcpip.h>
22440#endif
22441
22442"
22443if test "x$ac_cv_have_decl_freeaddrinfo" = xyes; then :
22444 ac_have_decl=1
22445else
22446 ac_have_decl=0
22447fi
22448
22449cat >>confdefs.h <<_ACEOF
22450#define HAVE_DECL_FREEADDRINFO $ac_have_decl
22451_ACEOF
22452ac_fn_c_check_decl "$LINENO" "getnameinfo" "ac_cv_have_decl_getnameinfo" "
22453 /* sys/types.h is not needed according to POSIX, but the
22454 sys/socket.h in i386-unknown-freebsd4.10 and
22455 powerpc-apple-darwin5.5 required it. */
22456#include <sys/types.h>
22457#ifdef HAVE_SYS_SOCKET_H
22458#include <sys/socket.h>
22459#endif
22460#ifdef HAVE_NETDB_H
22461#include <netdb.h>
22462#endif
22463#ifdef HAVE_WS2TCPIP_H
22464#include <ws2tcpip.h>
22465#endif
22466
22467"
22468if test "x$ac_cv_have_decl_getnameinfo" = xyes; then :
22469 ac_have_decl=1
22470else
22471 ac_have_decl=0
22472fi
22473
22474cat >>confdefs.h <<_ACEOF
22475#define HAVE_DECL_GETNAMEINFO $ac_have_decl
22476_ACEOF
22477
22478 if test $ac_cv_have_decl_getaddrinfo = no; then
22479 HAVE_DECL_GETADDRINFO=0
22480 fi
22481 if test $ac_cv_have_decl_freeaddrinfo = no; then
22482 HAVE_DECL_FREEADDRINFO=0
22483 fi
22484 if test $ac_cv_have_decl_gai_strerror = no; then
22485 HAVE_DECL_GAI_STRERROR=0
22486 fi
22487 if test $ac_cv_have_decl_getnameinfo = no; then
22488 HAVE_DECL_GETNAMEINFO=0
22489 fi
22490
22491 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "
22492#include <sys/types.h>
22493#ifdef HAVE_SYS_SOCKET_H
22494#include <sys/socket.h>
22495#endif
22496#ifdef HAVE_NETDB_H
22497#include <netdb.h>
22498#endif
22499#ifdef HAVE_WS2TCPIP_H
22500#include <ws2tcpip.h>
22501#endif
22502
22503"
22504if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
22505
22506cat >>confdefs.h <<_ACEOF
22507#define HAVE_STRUCT_ADDRINFO 1
22508_ACEOF
22509
22510
22511fi
22512
22513 if test $ac_cv_type_struct_addrinfo = no; then
22514 HAVE_STRUCT_ADDRINFO=0
22515 fi
22516
22517 case " $GETADDRINFO_LIB " in
22518 *" $HOSTENT_LIB "*) ;;
22519 *) GETADDRINFO_LIB="$GETADDRINFO_LIB $HOSTENT_LIB" ;;
22520 esac
22521
22522 case " $GETADDRINFO_LIB " in
22523 *" $SERVENT_LIB "*) ;;
22524 *) GETADDRINFO_LIB="$GETADDRINFO_LIB $SERVENT_LIB" ;;
22525 esac
22526
22527 case " $GETADDRINFO_LIB " in
22528 *" $INET_NTOP_LIB "*) ;;
22529 *) GETADDRINFO_LIB="$GETADDRINFO_LIB $INET_NTOP_LIB" ;;
22530 esac
22531
22532
22533
22534
22535if test $HAVE_GETADDRINFO = 0; then
22536
22537
22538
22539
22540
22541
22542
22543
22544 gl_LIBOBJS="$gl_LIBOBJS getaddrinfo.$ac_objext"
22545
22546fi
22547if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then
22548
22549
22550
22551
22552
22553
22554
22555
22556 gl_LIBOBJS="$gl_LIBOBJS gai_strerror.$ac_objext"
22557
22558fi
22559
22560
22561
22562
22563
22564 GNULIB_GETADDRINFO=1
22565
22566
22567
22568
22569
22570$as_echo "#define GNULIB_TEST_GETADDRINFO 1" >>confdefs.h
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582 if test $ac_cv_func_getdelim = yes; then
22583 HAVE_GETDELIM=1
22584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
22585$as_echo_n "checking for working getdelim function... " >&6; }
22586if ${gl_cv_func_working_getdelim+:} false; then :
22587 $as_echo_n "(cached) " >&6
22588else
22589 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
22590 if test "$cross_compiling" = yes; then :
22591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22592/* end confdefs.h. */
22593
22594#include <features.h>
22595#ifdef __GNU_LIBRARY__
22596 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
22597 Lucky GNU user
22598 #endif
22599#endif
22600
22601_ACEOF
22602if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22603 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
22604 gl_cv_func_working_getdelim="guessing yes"
22605else
22606 gl_cv_func_working_getdelim="guessing no"
22607fi
22608rm -f conftest*
22609
22610
22611else
22612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22613/* end confdefs.h. */
22614
22615# include <stdio.h>
22616# include <stdlib.h>
22617# include <string.h>
22618 int main ()
22619 {
22620 FILE *in = fopen ("./conftest.data", "r");
22621 if (!in)
22622 return 1;
22623 {
22624 /* Test result for a NULL buffer and a zero size.
22625 Based on a test program from Karl Heuer. */
22626 char *line = NULL;
22627 size_t siz = 0;
22628 int len = getdelim (&line, &siz, '\n', in);
22629 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
22630 return 2;
22631 }
22632 {
22633 /* Test result for a NULL buffer and a non-zero size.
22634 This crashes on FreeBSD 8.0. */
22635 char *line = NULL;
22636 size_t siz = (size_t)(~0) / 4;
22637 if (getdelim (&line, &siz, '\n', in) == -1)
22638 return 3;
22639 }
22640 return 0;
22641 }
22642
22643_ACEOF
22644if ac_fn_c_try_run "$LINENO"; then :
22645 gl_cv_func_working_getdelim=yes
22646else
22647 gl_cv_func_working_getdelim=no
22648fi
22649rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22650 conftest.$ac_objext conftest.beam conftest.$ac_ext
22651fi
22652
22653fi
22654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
22655$as_echo "$gl_cv_func_working_getdelim" >&6; }
22656 case "$gl_cv_func_working_getdelim" in
22657 *no)
22658 REPLACE_GETDELIM=1
22659 ;;
22660 esac
22661 else
22662 HAVE_GETDELIM=0
22663 fi
22664
22665 if test $ac_cv_have_decl_getdelim = no; then
22666 HAVE_DECL_GETDELIM=0
22667 fi
22668
22669if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
22670
22671
22672
22673
22674
22675
22676
22677
22678 gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
22679
22680
22681 for ac_func in flockfile funlockfile
22682do :
22683 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22684ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
22685if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
22686 cat >>confdefs.h <<_ACEOF
22687#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
22688_ACEOF
22689
22690fi
22691done
22692
22693 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
22694if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
22695 ac_have_decl=1
22696else
22697 ac_have_decl=0
22698fi
22699
22700cat >>confdefs.h <<_ACEOF
22701#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
22702_ACEOF
22703
22704
22705fi
22706
22707
22708
22709
22710
22711 GNULIB_GETDELIM=1
22712
22713
22714
22715
22716
22717$as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
22718
22719
22720
22721
22722
22723
22724 if test $ac_cv_func_getdtablesize != yes; then
22725 HAVE_GETDTABLESIZE=0
22726 fi
22727
22728if test $HAVE_GETDTABLESIZE = 0; then
22729
22730
22731
22732
22733
22734
22735
22736
22737 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
22738
22739
22740
22741
22742fi
22743
22744
22745
22746
22747
22748 GNULIB_GETDTABLESIZE=1
22749
22750
22751
22752
22753
22754$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765 gl_getline_needs_run_time_check=no
22766 ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
22767if test "x$ac_cv_func_getline" = xyes; then :
22768 gl_getline_needs_run_time_check=yes
22769else
22770 am_cv_func_working_getline=no
22771fi
22772
22773 if test $gl_getline_needs_run_time_check = yes; then
22774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
22775$as_echo_n "checking for working getline function... " >&6; }
22776if ${am_cv_func_working_getline+:} false; then :
22777 $as_echo_n "(cached) " >&6
22778else
22779 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
22780 if test "$cross_compiling" = yes; then :
22781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22782/* end confdefs.h. */
22783
22784#include <features.h>
22785#ifdef __GNU_LIBRARY__
22786 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
22787 Lucky GNU user
22788 #endif
22789#endif
22790
22791_ACEOF
22792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22793 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
22794 am_cv_func_working_getline="guessing yes"
22795else
22796 am_cv_func_working_getline="guessing no"
22797fi
22798rm -f conftest*
22799
22800
22801else
22802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22803/* end confdefs.h. */
22804
22805# include <stdio.h>
22806# include <stdlib.h>
22807# include <string.h>
22808 int main ()
22809 {
22810 FILE *in = fopen ("./conftest.data", "r");
22811 if (!in)
22812 return 1;
22813 {
22814 /* Test result for a NULL buffer and a zero size.
22815 Based on a test program from Karl Heuer. */
22816 char *line = NULL;
22817 size_t siz = 0;
22818 int len = getline (&line, &siz, in);
22819 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
22820 return 2;
22821 }
22822 {
22823 /* Test result for a NULL buffer and a non-zero size.
22824 This crashes on FreeBSD 8.0. */
22825 char *line = NULL;
22826 size_t siz = (size_t)(~0) / 4;
22827 if (getline (&line, &siz, in) == -1)
22828 return 3;
22829 }
22830 return 0;
22831 }
22832
22833_ACEOF
22834if ac_fn_c_try_run "$LINENO"; then :
22835 am_cv_func_working_getline=yes
22836else
22837 am_cv_func_working_getline=no
22838fi
22839rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22840 conftest.$ac_objext conftest.beam conftest.$ac_ext
22841fi
22842
22843fi
22844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
22845$as_echo "$am_cv_func_working_getline" >&6; }
22846 fi
22847
22848 if test $ac_cv_have_decl_getline = no; then
22849 HAVE_DECL_GETLINE=0
22850 fi
22851
22852 case "$am_cv_func_working_getline" in
22853 *no)
22854 REPLACE_GETLINE=1
22855 ;;
22856 esac
22857
22858if test $REPLACE_GETLINE = 1; then
22859
22860
22861
22862
22863
22864
22865
22866
22867 gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
22868
22869
22870 :
22871
22872fi
22873
22874
22875
22876
22877
22878 GNULIB_GETLINE=1
22879
22880
22881
22882
22883
22884$as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
22885
22886
22887
22888
22889
22890
22891
22892
22893if test $REPLACE_GETOPT = 1; then
22894
22895
22896
22897
22898
22899
22900
22901
22902 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
22913
22914
22915
22916
22917 GNULIB_GL_UNISTD_H_GETOPT=1
22918fi
22919
22920
22921
22922$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
22923
22924
22925
22926
22927
22928
22929
22930 REPLACE_GETOPT=0
22931 if test -n "$gl_replace_getopt"; then
22932 REPLACE_GETOPT=1
22933 fi
22934
22935 if test $REPLACE_GETOPT = 1; then
22936
22937 GETOPT_H=getopt.h
22938
22939$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
22940
22941
22942
22943 fi
22944
22945if test $REPLACE_GETOPT = 1; then
22946
22947
22948
22949
22950
22951
22952
22953
22954 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
22965
22966
22967
22968
22969 GNULIB_GL_UNISTD_H_GETOPT=1
22970fi
22971
22972
22973
22974
22975
22976 REPLACE_GETPASS=1
22977
22978 if test $REPLACE_GETPASS = 1; then
22979
22980$as_echo "#define getpass gnu_getpass" >>confdefs.h
22981
22982 fi
22983
22984if test $REPLACE_GETPASS = 1; then
22985
22986
22987
22988
22989
22990
22991
22992
22993 gl_LIBOBJS="$gl_LIBOBJS getpass.$ac_objext"
22994
22995
22996
22997
22998 ac_fn_c_check_decl "$LINENO" "__fsetlocking" "ac_cv_have_decl___fsetlocking" "#include <stdio.h>
22999 #if HAVE_STDIO_EXT_H
23000 #include <stdio_ext.h>
23001 #endif
23002"
23003if test "x$ac_cv_have_decl___fsetlocking" = xyes; then :
23004 ac_have_decl=1
23005else
23006 ac_have_decl=0
23007fi
23008
23009cat >>confdefs.h <<_ACEOF
23010#define HAVE_DECL___FSETLOCKING $ac_have_decl
23011_ACEOF
23012
23013
23014
23015
23016
23017
23018 :
23019
23020fi
23021
23022if test "$ac_cv_header_winsock2_h" = yes; then
23023
23024
23025
23026
23027
23028
23029
23030
23031 gl_LIBOBJS="$gl_LIBOBJS getpeername.$ac_objext"
23032
23033fi
23034
23035
23036
23037
23038
23039 GNULIB_GETPEERNAME=1
23040
23041
23042
23043
23044
23045$as_echo "#define GNULIB_TEST_GETPEERNAME 1" >>confdefs.h
23046
23047
23048
23049
23050if test "$ac_cv_header_winsock2_h" = yes; then
23051
23052
23053
23054
23055
23056
23057
23058
23059 gl_LIBOBJS="$gl_LIBOBJS getsockname.$ac_objext"
23060
23061fi
23062
23063
23064
23065
23066
23067 GNULIB_GETSOCKNAME=1
23068
23069
23070
23071
23072
23073$as_echo "#define GNULIB_TEST_GETSOCKNAME 1" >>confdefs.h
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090 gl_gettimeofday_timezone=void
23091 if test $ac_cv_func_gettimeofday != yes; then
23092 HAVE_GETTIMEOFDAY=0
23093 else
23094
23095
23096
23097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
23098$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
23099if ${gl_cv_func_gettimeofday_clobber+:} false; then :
23100 $as_echo_n "(cached) " >&6
23101else
23102 if test "$cross_compiling" = yes; then :
23103 # When cross-compiling:
23104 case "$host_os" in
23105 # Guess all is fine on glibc systems.
23106 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
23107 # If we don't know, assume the worst.
23108 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
23109 esac
23110
23111else
23112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23113/* end confdefs.h. */
23114#include <string.h>
23115 #include <sys/time.h>
23116 #include <time.h>
23117 #include <stdlib.h>
23118
23119int
23120main ()
23121{
23122
23123 time_t t = 0;
23124 struct tm *lt;
23125 struct tm saved_lt;
23126 struct timeval tv;
23127 lt = localtime (&t);
23128 saved_lt = *lt;
23129 gettimeofday (&tv, NULL);
23130 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
23131
23132 ;
23133 return 0;
23134}
23135_ACEOF
23136if ac_fn_c_try_run "$LINENO"; then :
23137 gl_cv_func_gettimeofday_clobber=no
23138else
23139 gl_cv_func_gettimeofday_clobber=yes
23140fi
23141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23142 conftest.$ac_objext conftest.beam conftest.$ac_ext
23143fi
23144
23145fi
23146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
23147$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
23148
23149 case "$gl_cv_func_gettimeofday_clobber" in
23150 *yes)
23151 REPLACE_GETTIMEOFDAY=1
23152
23153
23154$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
23155
23156
23157$as_echo "#define localtime rpl_localtime" >>confdefs.h
23158
23159
23160
23161$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
23162
23163 ;;
23164 esac
23165
23166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
23167$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
23168if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
23169 $as_echo_n "(cached) " >&6
23170else
23171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23172/* end confdefs.h. */
23173#include <sys/time.h>
23174 struct timeval c;
23175 int gettimeofday (struct timeval *restrict, void *restrict);
23176
23177int
23178main ()
23179{
23180/* glibc uses struct timezone * rather than the POSIX void *
23181 if _GNU_SOURCE is defined. However, since the only portable
23182 use of gettimeofday uses NULL as the second parameter, and
23183 since the glibc definition is actually more typesafe, it is
23184 not worth wrapping this to get a compliant signature. */
23185 int (*f) (struct timeval *restrict, void *restrict)
23186 = gettimeofday;
23187 int x = f (&c, 0);
23188 return !(x | c.tv_sec | c.tv_usec);
23189
23190 ;
23191 return 0;
23192}
23193_ACEOF
23194if ac_fn_c_try_compile "$LINENO"; then :
23195 gl_cv_func_gettimeofday_posix_signature=yes
23196else
23197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23198/* end confdefs.h. */
23199#include <sys/time.h>
23200int gettimeofday (struct timeval *restrict, struct timezone *restrict);
23201
23202int
23203main ()
23204{
23205
23206 ;
23207 return 0;
23208}
23209_ACEOF
23210if ac_fn_c_try_compile "$LINENO"; then :
23211 gl_cv_func_gettimeofday_posix_signature=almost
23212else
23213 gl_cv_func_gettimeofday_posix_signature=no
23214fi
23215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23216fi
23217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23218fi
23219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
23220$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
23221 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
23222 gl_gettimeofday_timezone='struct timezone'
23223 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
23224 REPLACE_GETTIMEOFDAY=1
23225 fi
23226 if test $REPLACE_STRUCT_TIMEVAL = 1; then
23227 REPLACE_GETTIMEOFDAY=1
23228 fi
23229
23230 fi
23231
23232cat >>confdefs.h <<_ACEOF
23233#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
23234_ACEOF
23235
23236
23237if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
23238
23239
23240
23241
23242
23243
23244
23245
23246 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
23247
23248
23249 for ac_header in sys/timeb.h
23250do :
23251 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
23252if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
23253 cat >>confdefs.h <<_ACEOF
23254#define HAVE_SYS_TIMEB_H 1
23255_ACEOF
23256
23257fi
23258
23259done
23260
23261 for ac_func in _ftime
23262do :
23263 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
23264if test "x$ac_cv_func__ftime" = xyes; then :
23265 cat >>confdefs.h <<_ACEOF
23266#define HAVE__FTIME 1
23267_ACEOF
23268
23269fi
23270done
23271
23272
23273fi
23274
23275
23276
23277
23278
23279 GNULIB_GETTIMEOFDAY=1
23280
23281
23282
23283
23284
23285$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
23286
23287
23288
23289# Autoconf 2.61a.99 and earlier don't support linking a file only
23290# in VPATH builds. But since GNUmakefile is for maintainer use
23291# only, it does not matter if we skip the link with older autoconf.
23292# Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
23293# builds, so use a shell variable to bypass this.
23294GNUmakefile=GNUmakefile
23295ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
23296
23297
23298 HOSTENT_LIB=
23299 gl_saved_libs="$LIBS"
23300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
23301$as_echo_n "checking for library containing gethostbyname... " >&6; }
23302if ${ac_cv_search_gethostbyname+:} false; then :
23303 $as_echo_n "(cached) " >&6
23304else
23305 ac_func_search_save_LIBS=$LIBS
23306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23307/* end confdefs.h. */
23308
23309/* Override any GCC internal prototype to avoid an error.
23310 Use char because int might match the return type of a GCC
23311 builtin and then its argument prototype would still apply. */
23312#ifdef __cplusplus
23313extern "C"
23314#endif
23315char gethostbyname ();
23316int
23317main ()
23318{
23319return gethostbyname ();
23320 ;
23321 return 0;
23322}
23323_ACEOF
23324for ac_lib in '' nsl network net; do
23325 if test -z "$ac_lib"; then
23326 ac_res="none required"
23327 else
23328 ac_res=-l$ac_lib
23329 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
23330 fi
23331 if ac_fn_c_try_link "$LINENO"; then :
23332 ac_cv_search_gethostbyname=$ac_res
23333fi
23334rm -f core conftest.err conftest.$ac_objext \
23335 conftest$ac_exeext
23336 if ${ac_cv_search_gethostbyname+:} false; then :
23337 break
23338fi
23339done
23340if ${ac_cv_search_gethostbyname+:} false; then :
23341
23342else
23343 ac_cv_search_gethostbyname=no
23344fi
23345rm conftest.$ac_ext
23346LIBS=$ac_func_search_save_LIBS
23347fi
23348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
23349$as_echo "$ac_cv_search_gethostbyname" >&6; }
23350ac_res=$ac_cv_search_gethostbyname
23351if test "$ac_res" != no; then :
23352 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23353 if test "$ac_cv_search_gethostbyname" != "none required"; then
23354 HOSTENT_LIB="$ac_cv_search_gethostbyname"
23355 fi
23356fi
23357
23358 LIBS="$gl_saved_libs"
23359 if test -z "$HOSTENT_LIB"; then
23360 for ac_func in gethostbyname
23361do :
23362 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
23363if test "x$ac_cv_func_gethostbyname" = xyes; then :
23364 cat >>confdefs.h <<_ACEOF
23365#define HAVE_GETHOSTBYNAME 1
23366_ACEOF
23367
23368else
23369
23370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in winsock2.h and -lws2_32" >&5
23371$as_echo_n "checking for gethostbyname in winsock2.h and -lws2_32... " >&6; }
23372if ${gl_cv_w32_gethostbyname+:} false; then :
23373 $as_echo_n "(cached) " >&6
23374else
23375 gl_cv_w32_gethostbyname=no
23376 gl_save_LIBS="$LIBS"
23377 LIBS="$LIBS -lws2_32"
23378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23379/* end confdefs.h. */
23380
23381#ifdef HAVE_WINSOCK2_H
23382#include <winsock2.h>
23383#endif
23384#include <stddef.h>
23385
23386int
23387main ()
23388{
23389gethostbyname(NULL);
23390 ;
23391 return 0;
23392}
23393_ACEOF
23394if ac_fn_c_try_link "$LINENO"; then :
23395 gl_cv_w32_gethostbyname=yes
23396fi
23397rm -f core conftest.err conftest.$ac_objext \
23398 conftest$ac_exeext conftest.$ac_ext
23399 LIBS="$gl_save_LIBS"
23400
23401fi
23402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_gethostbyname" >&5
23403$as_echo "$gl_cv_w32_gethostbyname" >&6; }
23404 if test "$gl_cv_w32_gethostbyname" = "yes"; then
23405 HOSTENT_LIB="-lws2_32"
23406 fi
23407
23408fi
23409done
23410
23411 fi
23412
23413
23414
23415
23416
23417
23418
23419
23420 GNULIB_ICONV=1
23421
23422
23423
23424
23425
23426
23427
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437 if test $gl_cv_have_include_next = yes; then
23438 gl_cv_next_iconv_h='<'iconv.h'>'
23439 else
23440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
23441$as_echo_n "checking absolute name of <iconv.h>... " >&6; }
23442if ${gl_cv_next_iconv_h+:} false; then :
23443 $as_echo_n "(cached) " >&6
23444else
23445
23446 if test $ac_cv_header_iconv_h = yes; then
23447
23448
23449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23450/* end confdefs.h. */
23451#include <iconv.h>
23452
23453_ACEOF
23454 case "$host_os" in
23455 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23456 *) gl_absname_cpp="$ac_cpp" ;;
23457 esac
23458
23459 case "$host_os" in
23460 mingw*)
23461 gl_dirsep_regex='[/\\]'
23462 ;;
23463 *)
23464 gl_dirsep_regex='\/'
23465 ;;
23466 esac
23467 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23468
23469 gl_header_literal_regex=`echo 'iconv.h' \
23470 | sed -e "$gl_make_literal_regex_sed"`
23471 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23472 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23473 s|^/[^/]|//&|
23474 p
23475 q
23476 }'
23477 gl_cv_next_iconv_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23478 sed -n "$gl_absolute_header_sed"`'"'
23479 else
23480 gl_cv_next_iconv_h='<'iconv.h'>'
23481 fi
23482
23483
23484fi
23485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
23486$as_echo "$gl_cv_next_iconv_h" >&6; }
23487 fi
23488 NEXT_ICONV_H=$gl_cv_next_iconv_h
23489
23490 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23491 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23492 gl_next_as_first_directive='<'iconv.h'>'
23493 else
23494 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23495 gl_next_as_first_directive=$gl_cv_next_iconv_h
23496 fi
23497 NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
23498
23499
23500
23501
23502
23503
23504
23505
23506
23507
23508
23509
23510 HAVE_INET_NTOP=1
23511 INET_NTOP_LIB=
23512
23513
23514
23515
23516 if test $ac_cv_header_sys_socket_h != yes; then
23517 for ac_header in winsock2.h
23518do :
23519 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
23520if test "x$ac_cv_header_winsock2_h" = xyes; then :
23521 cat >>confdefs.h <<_ACEOF
23522#define HAVE_WINSOCK2_H 1
23523_ACEOF
23524
23525fi
23526
23527done
23528
23529 fi
23530 if test "$ac_cv_header_winsock2_h" = yes; then
23531 HAVE_WINSOCK2_H=1
23532 UNISTD_H_HAVE_WINSOCK2_H=1
23533 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
23534 else
23535 HAVE_WINSOCK2_H=0
23536 fi
23537
23538
23539 if test $HAVE_WINSOCK2_H = 1; then
23540 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
23541"
23542if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
23543 ac_have_decl=1
23544else
23545 ac_have_decl=0
23546fi
23547
23548cat >>confdefs.h <<_ACEOF
23549#define HAVE_DECL_INET_NTOP $ac_have_decl
23550_ACEOF
23551
23552 if test $ac_cv_have_decl_inet_ntop = yes; then
23553 REPLACE_INET_NTOP=1
23554 INET_NTOP_LIB="-lws2_32"
23555 else
23556 HAVE_DECL_INET_NTOP=0
23557 HAVE_INET_NTOP=0
23558 fi
23559 else
23560 gl_save_LIBS=$LIBS
23561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
23562$as_echo_n "checking for library containing inet_ntop... " >&6; }
23563if ${ac_cv_search_inet_ntop+:} false; then :
23564 $as_echo_n "(cached) " >&6
23565else
23566 ac_func_search_save_LIBS=$LIBS
23567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23568/* end confdefs.h. */
23569
23570/* Override any GCC internal prototype to avoid an error.
23571 Use char because int might match the return type of a GCC
23572 builtin and then its argument prototype would still apply. */
23573#ifdef __cplusplus
23574extern "C"
23575#endif
23576char inet_ntop ();
23577int
23578main ()
23579{
23580return inet_ntop ();
23581 ;
23582 return 0;
23583}
23584_ACEOF
23585for ac_lib in '' nsl resolv; do
23586 if test -z "$ac_lib"; then
23587 ac_res="none required"
23588 else
23589 ac_res=-l$ac_lib
23590 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
23591 fi
23592 if ac_fn_c_try_link "$LINENO"; then :
23593 ac_cv_search_inet_ntop=$ac_res
23594fi
23595rm -f core conftest.err conftest.$ac_objext \
23596 conftest$ac_exeext
23597 if ${ac_cv_search_inet_ntop+:} false; then :
23598 break
23599fi
23600done
23601if ${ac_cv_search_inet_ntop+:} false; then :
23602
23603else
23604 ac_cv_search_inet_ntop=no
23605fi
23606rm conftest.$ac_ext
23607LIBS=$ac_func_search_save_LIBS
23608fi
23609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
23610$as_echo "$ac_cv_search_inet_ntop" >&6; }
23611ac_res=$ac_cv_search_inet_ntop
23612if test "$ac_res" != no; then :
23613 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23614
23615else
23616 for ac_func in inet_ntop
23617do :
23618 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
23619if test "x$ac_cv_func_inet_ntop" = xyes; then :
23620 cat >>confdefs.h <<_ACEOF
23621#define HAVE_INET_NTOP 1
23622_ACEOF
23623
23624fi
23625done
23626
23627 if test $ac_cv_func_inet_ntop = no; then
23628 HAVE_INET_NTOP=0
23629 fi
23630
23631fi
23632
23633 LIBS=$gl_save_LIBS
23634
23635 if test "$ac_cv_search_inet_ntop" != "no" \
23636 && test "$ac_cv_search_inet_ntop" != "none required"; then
23637 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
23638 fi
23639
23640
23641 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
23642 #if HAVE_NETDB_H
23643 # include <netdb.h>
23644 #endif
23645
23646"
23647if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
23648 ac_have_decl=1
23649else
23650 ac_have_decl=0
23651fi
23652
23653cat >>confdefs.h <<_ACEOF
23654#define HAVE_DECL_INET_NTOP $ac_have_decl
23655_ACEOF
23656
23657 if test $ac_cv_have_decl_inet_ntop = no; then
23658 HAVE_DECL_INET_NTOP=0
23659 fi
23660 fi
23661
23662
23663if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
23664
23665
23666
23667
23668
23669
23670
23671
23672 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
23673
23674
23675
23676
23677fi
23678
23679
23680
23681
23682
23683 GNULIB_INET_NTOP=1
23684
23685
23686
23687
23688
23689
23690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
23691$as_echo_n "checking whether the compiler generally respects inline... " >&6; }
23692if ${gl_cv_c_inline_effective+:} false; then :
23693 $as_echo_n "(cached) " >&6
23694else
23695 if test $ac_cv_c_inline = no; then
23696 gl_cv_c_inline_effective=no
23697 else
23698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23699/* end confdefs.h. */
23700
23701int
23702main ()
23703{
23704#ifdef __NO_INLINE__
23705 #error "inline is not effective"
23706 #endif
23707 ;
23708 return 0;
23709}
23710_ACEOF
23711if ac_fn_c_try_compile "$LINENO"; then :
23712 gl_cv_c_inline_effective=yes
23713else
23714 gl_cv_c_inline_effective=no
23715fi
23716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23717 fi
23718
23719fi
23720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
23721$as_echo "$gl_cv_c_inline_effective" >&6; }
23722 if test $gl_cv_c_inline_effective = yes; then
23723
23724$as_echo "#define HAVE_INLINE 1" >>confdefs.h
23725
23726 fi
23727
23728
23729
23730
23731 HAVE_IOCTL=1
23732 if test "$ac_cv_header_winsock2_h" = yes; then
23733 HAVE_IOCTL=0
23734 else
23735 for ac_func in ioctl
23736do :
23737 ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
23738if test "x$ac_cv_func_ioctl" = xyes; then :
23739 cat >>confdefs.h <<_ACEOF
23740#define HAVE_IOCTL 1
23741_ACEOF
23742
23743fi
23744done
23745
23746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
23747$as_echo_n "checking for ioctl with POSIX signature... " >&6; }
23748if ${gl_cv_func_ioctl_posix_signature+:} false; then :
23749 $as_echo_n "(cached) " >&6
23750else
23751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23752/* end confdefs.h. */
23753#include <sys/ioctl.h>
23754int
23755main ()
23756{
23757extern
23758 #ifdef __cplusplus
23759 "C"
23760 #endif
23761 int ioctl (int, int, ...);
23762
23763 ;
23764 return 0;
23765}
23766
23767_ACEOF
23768if ac_fn_c_try_compile "$LINENO"; then :
23769 gl_cv_func_ioctl_posix_signature=yes
23770else
23771 gl_cv_func_ioctl_posix_signature=no
23772fi
23773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23774
23775fi
23776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
23777$as_echo "$gl_cv_func_ioctl_posix_signature" >&6; }
23778 if test $gl_cv_func_ioctl_posix_signature != yes; then
23779 REPLACE_IOCTL=1
23780 fi
23781 fi
23782
23783if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
23784
23785
23786
23787
23788
23789
23790
23791
23792 gl_LIBOBJS="$gl_LIBOBJS ioctl.$ac_objext"
23793
23794fi
23795
23796
23797
23798
23799
23800 GNULIB_IOCTL=1
23801
23802
23803
23804
23805
23806$as_echo "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
23807
23808
23809
23810
23811
23812
23813
23814
23815
23816
23817
23818
23819
23820
23821
23822
23823
23824 if test $gl_cv_have_include_next = yes; then
23825 gl_cv_next_langinfo_h='<'langinfo.h'>'
23826 else
23827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
23828$as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
23829if ${gl_cv_next_langinfo_h+:} false; then :
23830 $as_echo_n "(cached) " >&6
23831else
23832
23833 if test $ac_cv_header_langinfo_h = yes; then
23834
23835
23836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23837/* end confdefs.h. */
23838#include <langinfo.h>
23839
23840_ACEOF
23841 case "$host_os" in
23842 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23843 *) gl_absname_cpp="$ac_cpp" ;;
23844 esac
23845
23846 case "$host_os" in
23847 mingw*)
23848 gl_dirsep_regex='[/\\]'
23849 ;;
23850 *)
23851 gl_dirsep_regex='\/'
23852 ;;
23853 esac
23854 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23855
23856 gl_header_literal_regex=`echo 'langinfo.h' \
23857 | sed -e "$gl_make_literal_regex_sed"`
23858 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23859 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23860 s|^/[^/]|//&|
23861 p
23862 q
23863 }'
23864 gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23865 sed -n "$gl_absolute_header_sed"`'"'
23866 else
23867 gl_cv_next_langinfo_h='<'langinfo.h'>'
23868 fi
23869
23870
23871fi
23872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
23873$as_echo "$gl_cv_next_langinfo_h" >&6; }
23874 fi
23875 NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
23876
23877 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23878 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23879 gl_next_as_first_directive='<'langinfo.h'>'
23880 else
23881 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23882 gl_next_as_first_directive=$gl_cv_next_langinfo_h
23883 fi
23884 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
23885
23886
23887
23888
23889
23890 HAVE_LANGINFO_CODESET=0
23891 HAVE_LANGINFO_T_FMT_AMPM=0
23892 HAVE_LANGINFO_ERA=0
23893 HAVE_LANGINFO_YESEXPR=0
23894
23895 if test $ac_cv_header_langinfo_h = yes; then
23896 HAVE_LANGINFO_H=1
23897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
23898$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
23899if ${gl_cv_header_langinfo_codeset+:} false; then :
23900 $as_echo_n "(cached) " >&6
23901else
23902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23903/* end confdefs.h. */
23904#include <langinfo.h>
23905int a = CODESET;
23906
23907int
23908main ()
23909{
23910
23911 ;
23912 return 0;
23913}
23914_ACEOF
23915if ac_fn_c_try_compile "$LINENO"; then :
23916 gl_cv_header_langinfo_codeset=yes
23917else
23918 gl_cv_header_langinfo_codeset=no
23919fi
23920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23921
23922fi
23923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
23924$as_echo "$gl_cv_header_langinfo_codeset" >&6; }
23925 if test $gl_cv_header_langinfo_codeset = yes; then
23926 HAVE_LANGINFO_CODESET=1
23927 fi
23928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
23929$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
23930if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
23931 $as_echo_n "(cached) " >&6
23932else
23933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23934/* end confdefs.h. */
23935#include <langinfo.h>
23936int a = T_FMT_AMPM;
23937
23938int
23939main ()
23940{
23941
23942 ;
23943 return 0;
23944}
23945_ACEOF
23946if ac_fn_c_try_compile "$LINENO"; then :
23947 gl_cv_header_langinfo_t_fmt_ampm=yes
23948else
23949 gl_cv_header_langinfo_t_fmt_ampm=no
23950fi
23951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23952
23953fi
23954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
23955$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
23956 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
23957 HAVE_LANGINFO_T_FMT_AMPM=1
23958 fi
23959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
23960$as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
23961if ${gl_cv_header_langinfo_era+:} false; then :
23962 $as_echo_n "(cached) " >&6
23963else
23964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23965/* end confdefs.h. */
23966#include <langinfo.h>
23967int a = ERA;
23968
23969int
23970main ()
23971{
23972
23973 ;
23974 return 0;
23975}
23976_ACEOF
23977if ac_fn_c_try_compile "$LINENO"; then :
23978 gl_cv_header_langinfo_era=yes
23979else
23980 gl_cv_header_langinfo_era=no
23981fi
23982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23983
23984fi
23985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
23986$as_echo "$gl_cv_header_langinfo_era" >&6; }
23987 if test $gl_cv_header_langinfo_era = yes; then
23988 HAVE_LANGINFO_ERA=1
23989 fi
23990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
23991$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
23992if ${gl_cv_header_langinfo_yesexpr+:} false; then :
23993 $as_echo_n "(cached) " >&6
23994else
23995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23996/* end confdefs.h. */
23997#include <langinfo.h>
23998int a = YESEXPR;
23999
24000int
24001main ()
24002{
24003
24004 ;
24005 return 0;
24006}
24007_ACEOF
24008if ac_fn_c_try_compile "$LINENO"; then :
24009 gl_cv_header_langinfo_yesexpr=yes
24010else
24011 gl_cv_header_langinfo_yesexpr=no
24012fi
24013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24014
24015fi
24016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
24017$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
24018 if test $gl_cv_header_langinfo_yesexpr = yes; then
24019 HAVE_LANGINFO_YESEXPR=1
24020 fi
24021 else
24022 HAVE_LANGINFO_H=0
24023 fi
24024
24025
24026
24027
24028
24029
24030
24031 for gl_func in nl_langinfo; do
24032 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24034$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24035if eval \${$as_gl_Symbol+:} false; then :
24036 $as_echo_n "(cached) " >&6
24037else
24038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24039/* end confdefs.h. */
24040#include <langinfo.h>
24041
24042int
24043main ()
24044{
24045#undef $gl_func
24046 (void) $gl_func;
24047 ;
24048 return 0;
24049}
24050_ACEOF
24051if ac_fn_c_try_compile "$LINENO"; then :
24052 eval "$as_gl_Symbol=yes"
24053else
24054 eval "$as_gl_Symbol=no"
24055fi
24056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24057fi
24058eval ac_res=\$$as_gl_Symbol
24059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24060$as_echo "$ac_res" >&6; }
24061 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24062 cat >>confdefs.h <<_ACEOF
24063#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24064_ACEOF
24065
24066 eval ac_cv_have_decl_$gl_func=yes
24067fi
24068 done
24069
24070
24071
24072
24073if test "$ac_cv_header_winsock2_h" = yes; then
24074
24075
24076
24077
24078
24079
24080
24081
24082 gl_LIBOBJS="$gl_LIBOBJS listen.$ac_objext"
24083
24084fi
24085
24086
24087
24088
24089
24090 GNULIB_LISTEN=1
24091
24092
24093
24094
24095
24096$as_echo "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118 case "$host_os" in
24119 solaris*)
24120
24121$as_echo "#define _LCONV_C99 1" >>confdefs.h
24122
24123 ;;
24124 esac
24125
24126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
24127$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
24128if ${gl_cv_header_locale_h_posix2001+:} false; then :
24129 $as_echo_n "(cached) " >&6
24130else
24131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24132/* end confdefs.h. */
24133#include <locale.h>
24134 int x = LC_MESSAGES;
24135 int y = sizeof (((struct lconv *) 0)->decimal_point);
24136int
24137main ()
24138{
24139
24140 ;
24141 return 0;
24142}
24143_ACEOF
24144if ac_fn_c_try_compile "$LINENO"; then :
24145 gl_cv_header_locale_h_posix2001=yes
24146else
24147 gl_cv_header_locale_h_posix2001=no
24148fi
24149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24150fi
24151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
24152$as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
24153
24154
24155 if test $ac_cv_header_xlocale_h = yes; then
24156 HAVE_XLOCALE_H=1
24157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
24158$as_echo_n "checking whether locale.h defines locale_t... " >&6; }
24159if ${gl_cv_header_locale_has_locale_t+:} false; then :
24160 $as_echo_n "(cached) " >&6
24161else
24162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24163/* end confdefs.h. */
24164#include <locale.h>
24165 locale_t x;
24166int
24167main ()
24168{
24169
24170 ;
24171 return 0;
24172}
24173_ACEOF
24174if ac_fn_c_try_compile "$LINENO"; then :
24175 gl_cv_header_locale_has_locale_t=yes
24176else
24177 gl_cv_header_locale_has_locale_t=no
24178fi
24179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24180
24181fi
24182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
24183$as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
24184 if test $gl_cv_header_locale_has_locale_t = yes; then
24185 gl_cv_header_locale_h_needs_xlocale_h=no
24186 else
24187 gl_cv_header_locale_h_needs_xlocale_h=yes
24188 fi
24189 else
24190 HAVE_XLOCALE_H=0
24191 gl_cv_header_locale_h_needs_xlocale_h=no
24192 fi
24193
24194
24195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
24196$as_echo_n "checking whether struct lconv is properly defined... " >&6; }
24197if ${gl_cv_sys_struct_lconv_ok+:} false; then :
24198 $as_echo_n "(cached) " >&6
24199else
24200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24201/* end confdefs.h. */
24202#include <locale.h>
24203 struct lconv l;
24204 int x = sizeof (l.decimal_point);
24205 int y = sizeof (l.int_p_cs_precedes);
24206int
24207main ()
24208{
24209
24210 ;
24211 return 0;
24212}
24213_ACEOF
24214if ac_fn_c_try_compile "$LINENO"; then :
24215 gl_cv_sys_struct_lconv_ok=yes
24216else
24217 gl_cv_sys_struct_lconv_ok=no
24218fi
24219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24220
24221fi
24222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
24223$as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
24224 if test $gl_cv_sys_struct_lconv_ok = no; then
24225 REPLACE_STRUCT_LCONV=1
24226 fi
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236 if test $gl_cv_have_include_next = yes; then
24237 gl_cv_next_locale_h='<'locale.h'>'
24238 else
24239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
24240$as_echo_n "checking absolute name of <locale.h>... " >&6; }
24241if ${gl_cv_next_locale_h+:} false; then :
24242 $as_echo_n "(cached) " >&6
24243else
24244
24245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24246/* end confdefs.h. */
24247#include <locale.h>
24248
24249_ACEOF
24250 case "$host_os" in
24251 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24252 *) gl_absname_cpp="$ac_cpp" ;;
24253 esac
24254
24255 case "$host_os" in
24256 mingw*)
24257 gl_dirsep_regex='[/\\]'
24258 ;;
24259 *)
24260 gl_dirsep_regex='\/'
24261 ;;
24262 esac
24263 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24264
24265 gl_header_literal_regex=`echo 'locale.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 gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24274 sed -n "$gl_absolute_header_sed"`'"'
24275
24276
24277fi
24278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
24279$as_echo "$gl_cv_next_locale_h" >&6; }
24280 fi
24281 NEXT_LOCALE_H=$gl_cv_next_locale_h
24282
24283 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24284 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24285 gl_next_as_first_directive='<'locale.h'>'
24286 else
24287 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24288 gl_next_as_first_directive=$gl_cv_next_locale_h
24289 fi
24290 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
24291
24292
24293
24294
24295
24296
24297 for gl_func in setlocale duplocale; do
24298 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
24299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
24300$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
24301if eval \${$as_gl_Symbol+:} false; then :
24302 $as_echo_n "(cached) " >&6
24303else
24304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24305/* end confdefs.h. */
24306#include <locale.h>
24307/* Some systems provide declarations in a non-standard header. */
24308#if HAVE_XLOCALE_H
24309# include <xlocale.h>
24310#endif
24311
24312int
24313main ()
24314{
24315#undef $gl_func
24316 (void) $gl_func;
24317 ;
24318 return 0;
24319}
24320_ACEOF
24321if ac_fn_c_try_compile "$LINENO"; then :
24322 eval "$as_gl_Symbol=yes"
24323else
24324 eval "$as_gl_Symbol=no"
24325fi
24326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24327fi
24328eval ac_res=\$$as_gl_Symbol
24329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
24330$as_echo "$ac_res" >&6; }
24331 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
24332 cat >>confdefs.h <<_ACEOF
24333#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
24334_ACEOF
24335
24336 eval ac_cv_have_decl_$gl_func=yes
24337fi
24338 done
24339
24340
24341
24342
24343
24344
24345 if test $REPLACE_STRUCT_LCONV = 1; then
24346 REPLACE_LOCALECONV=1
24347 fi
24348
24349if test $REPLACE_LOCALECONV = 1; then
24350
24351
24352
24353
24354
24355
24356
24357
24358 gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
24359
24360
24361 ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
24362"
24363if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
24364
24365cat >>confdefs.h <<_ACEOF
24366#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
24367_ACEOF
24368
24369
24370fi
24371
24372
24373fi
24374
24375
24376
24377
24378
24379 GNULIB_LOCALECONV=1
24380
24381
24382
24383
24384
24385$as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
24386
24387
24388
24389
24390
24391 if test "$gl_threads_api" = posix; then
24392 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
24393 # pthread_rwlock_* functions.
24394 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
24395"
24396if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
24397
24398$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
24399
24400fi
24401
24402 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
24403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24404/* end confdefs.h. */
24405
24406 #include <pthread.h>
24407int
24408main ()
24409{
24410
24411#if __FreeBSD__ == 4
24412error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
24413#else
24414int x = (int)PTHREAD_MUTEX_RECURSIVE;
24415return !x;
24416#endif
24417
24418 ;
24419 return 0;
24420}
24421_ACEOF
24422if ac_fn_c_try_compile "$LINENO"; then :
24423
24424$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
24425
24426fi
24427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24428 fi
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
24440$as_echo_n "checking whether lseek detects pipes... " >&6; }
24441if ${gl_cv_func_lseek_pipe+:} false; then :
24442 $as_echo_n "(cached) " >&6
24443else
24444 case "$host_os" in
24445 mingw*)
24446 gl_cv_func_lseek_pipe=no
24447 ;;
24448 *)
24449 if test $cross_compiling = no; then
24450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24451/* end confdefs.h. */
24452
24453#include <sys/types.h> /* for off_t */
24454#include <stdio.h> /* for SEEK_CUR */
24455#if HAVE_UNISTD_H
24456# include <unistd.h>
24457#else /* on Windows with MSVC */
24458# include <io.h>
24459#endif
24460
24461int
24462main ()
24463{
24464
24465 /* Exit with success only if stdin is seekable. */
24466 return lseek (0, (off_t)0, SEEK_CUR) < 0;
24467
24468 ;
24469 return 0;
24470}
24471_ACEOF
24472if ac_fn_c_try_link "$LINENO"; then :
24473 if test -s conftest$ac_exeext \
24474 && ./conftest$ac_exeext < conftest.$ac_ext \
24475 && test 1 = "`echo hi \
24476 | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
24477 gl_cv_func_lseek_pipe=yes
24478 else
24479 gl_cv_func_lseek_pipe=no
24480 fi
24481
24482else
24483 gl_cv_func_lseek_pipe=no
24484fi
24485rm -f core conftest.err conftest.$ac_objext \
24486 conftest$ac_exeext conftest.$ac_ext
24487 else
24488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24489/* end confdefs.h. */
24490
24491#if defined __BEOS__
24492/* BeOS mistakenly return 0 when trying to seek on pipes. */
24493 Choke me.
24494#endif
24495_ACEOF
24496if ac_fn_c_try_compile "$LINENO"; then :
24497 gl_cv_func_lseek_pipe=yes
24498else
24499 gl_cv_func_lseek_pipe=no
24500fi
24501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24502 fi
24503 ;;
24504 esac
24505
24506fi
24507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
24508$as_echo "$gl_cv_func_lseek_pipe" >&6; }
24509 if test $gl_cv_func_lseek_pipe = no; then
24510 REPLACE_LSEEK=1
24511
24512$as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
24513
24514 fi
24515
24516
24517 if test $WINDOWS_64_BIT_OFF_T = 1; then
24518 REPLACE_LSEEK=1
24519 fi
24520
24521if test $REPLACE_LSEEK = 1; then
24522
24523
24524
24525
24526
24527
24528
24529
24530 gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
24531
24532fi
24533
24534
24535
24536
24537
24538 GNULIB_LSEEK=1
24539
24540
24541
24542
24543
24544$as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
24545
24546
24547
24548
24549
24550
24551 if test $ac_cv_func_lstat = yes; then
24552
24553 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
24554 *no)
24555 REPLACE_LSTAT=1
24556 ;;
24557 esac
24558 else
24559 HAVE_LSTAT=0
24560 fi
24561
24562if test $REPLACE_LSTAT = 1; then
24563
24564
24565
24566
24567
24568
24569
24570
24571 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
24572
24573
24574
24575 :
24576
24577fi
24578
24579
24580
24581
24582
24583 GNULIB_LSTAT=1
24584
24585
24586
24587
24588
24589$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
24590
24591
24592
24593
24594
24595
24596
24597 for ac_header in stdlib.h
24598do :
24599 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
24600if test "x$ac_cv_header_stdlib_h" = xyes; then :
24601 cat >>confdefs.h <<_ACEOF
24602#define HAVE_STDLIB_H 1
24603_ACEOF
24604
24605fi
24606
24607done
24608
24609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
24610$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
24611if ${ac_cv_func_malloc_0_nonnull+:} false; then :
24612 $as_echo_n "(cached) " >&6
24613else
24614 if test "$cross_compiling" = yes; then :
24615 case "$host_os" in
24616 # Guess yes on platforms where we know the result.
24617 *-gnu* | freebsd* | netbsd* | openbsd* \
24618 | hpux* | solaris* | cygwin* | mingw*)
24619 ac_cv_func_malloc_0_nonnull=yes ;;
24620 # If we don't know, assume the worst.
24621 *) ac_cv_func_malloc_0_nonnull=no ;;
24622 esac
24623
24624else
24625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24626/* end confdefs.h. */
24627#if defined STDC_HEADERS || defined HAVE_STDLIB_H
24628 # include <stdlib.h>
24629 #else
24630 char *malloc ();
24631 #endif
24632
24633int
24634main ()
24635{
24636return ! malloc (0);
24637 ;
24638 return 0;
24639}
24640
24641_ACEOF
24642if ac_fn_c_try_run "$LINENO"; then :
24643 ac_cv_func_malloc_0_nonnull=yes
24644else
24645 ac_cv_func_malloc_0_nonnull=no
24646fi
24647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24648 conftest.$ac_objext conftest.beam conftest.$ac_ext
24649fi
24650
24651
24652fi
24653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
24654$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
24655 if test $ac_cv_func_malloc_0_nonnull = yes; then :
24656
24657$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
24658
24659else
24660 $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
24661
24662 REPLACE_MALLOC=1
24663
24664fi
24665
24666
24667if test $REPLACE_MALLOC = 1; then
24668
24669
24670
24671
24672
24673
24674
24675
24676 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
24677
24678fi
24679
24680
24681cat >>confdefs.h <<_ACEOF
24682#define GNULIB_MALLOC_GNU 1
24683_ACEOF
24684
24685
24686
24687
24688
24689 if test $gl_cv_func_malloc_posix = yes; then
24690
24691$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
24692
24693 else
24694 REPLACE_MALLOC=1
24695 fi
24696
24697if test $REPLACE_MALLOC = 1; then
24698
24699
24700
24701
24702
24703
24704
24705
24706 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
24707
24708fi
24709
24710
24711
24712
24713
24714 GNULIB_MALLOC_POSIX=1
24715
24716
24717
24718
24719
24720$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
24735
24736
24737
24738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24739$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24740if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24741 $as_echo_n "(cached) " >&6
24742else
24743
24744 case "$host_os" in
24745 # Guess no on AIX and OSF/1.
24746 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24747 # Guess yes otherwise.
24748 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24749 esac
24750 if test $LOCALE_JA != none; then
24751 if test "$cross_compiling" = yes; then :
24752 :
24753else
24754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24755/* end confdefs.h. */
24756
24757#include <locale.h>
24758#include <string.h>
24759/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24760 <wchar.h>.
24761 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24762 included before <wchar.h>. */
24763#include <stddef.h>
24764#include <stdio.h>
24765#include <time.h>
24766#include <wchar.h>
24767int main ()
24768{
24769 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24770 {
24771 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24772 mbstate_t state;
24773 wchar_t wc;
24774
24775 memset (&state, '\0', sizeof (mbstate_t));
24776 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24777 if (mbsinit (&state))
24778 return 1;
24779 }
24780 return 0;
24781}
24782_ACEOF
24783if ac_fn_c_try_run "$LINENO"; then :
24784 gl_cv_func_mbrtowc_incomplete_state=yes
24785else
24786 gl_cv_func_mbrtowc_incomplete_state=no
24787fi
24788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24789 conftest.$ac_objext conftest.beam conftest.$ac_ext
24790fi
24791
24792 fi
24793
24794fi
24795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24796$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24797
24798
24799
24800
24801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24802$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
24803if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
24804 $as_echo_n "(cached) " >&6
24805else
24806
24807 case "$host_os" in
24808 # Guess no on Solaris 8.
24809 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24810 # Guess yes otherwise.
24811 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24812 esac
24813 if test $LOCALE_ZH_CN != none; then
24814 if test "$cross_compiling" = yes; then :
24815 :
24816else
24817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24818/* end confdefs.h. */
24819
24820#include <locale.h>
24821#include <stdlib.h>
24822#include <string.h>
24823/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24824 <wchar.h>.
24825 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24826 included before <wchar.h>. */
24827#include <stddef.h>
24828#include <stdio.h>
24829#include <time.h>
24830#include <wchar.h>
24831int main ()
24832{
24833 /* This fails on Solaris 8:
24834 mbrtowc returns 2, and sets wc to 0x00F0.
24835 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
24836 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24837 {
24838 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24839 mbstate_t state;
24840 wchar_t wc;
24841
24842 memset (&state, '\0', sizeof (mbstate_t));
24843 if (mbrtowc (&wc, input + 3, 6, &state) != 4
24844 && mbtowc (&wc, input + 3, 6) == 4)
24845 return 1;
24846 }
24847 return 0;
24848}
24849_ACEOF
24850if ac_fn_c_try_run "$LINENO"; then :
24851 gl_cv_func_mbrtowc_sanitycheck=yes
24852else
24853 gl_cv_func_mbrtowc_sanitycheck=no
24854fi
24855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24856 conftest.$ac_objext conftest.beam conftest.$ac_ext
24857fi
24858
24859 fi
24860
24861fi
24862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24863$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24864
24865 REPLACE_MBSTATE_T=0
24866 case "$gl_cv_func_mbrtowc_incomplete_state" in
24867 *yes) ;;
24868 *) REPLACE_MBSTATE_T=1 ;;
24869 esac
24870 case "$gl_cv_func_mbrtowc_sanitycheck" in
24871 *yes) ;;
24872 *) REPLACE_MBSTATE_T=1 ;;
24873 esac
24874 else
24875 REPLACE_MBSTATE_T=1
24876 fi
24877
24878
24879
24880 if test $ac_cv_func_mbrtowc = no; then
24881 HAVE_MBRTOWC=0
24882 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
24883/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24884 <wchar.h>.
24885 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24886 included before <wchar.h>. */
24887#include <stddef.h>
24888#include <stdio.h>
24889#include <time.h>
24890#include <wchar.h>
24891
24892"
24893if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
24894 ac_have_decl=1
24895else
24896 ac_have_decl=0
24897fi
24898
24899cat >>confdefs.h <<_ACEOF
24900#define HAVE_DECL_MBRTOWC $ac_have_decl
24901_ACEOF
24902
24903 if test $ac_cv_have_decl_mbrtowc = yes; then
24904 REPLACE_MBRTOWC=1
24905 fi
24906 else
24907 if test $REPLACE_MBSTATE_T = 1; then
24908 REPLACE_MBRTOWC=1
24909 else
24910
24911
24912
24913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
24914$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
24915if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
24916 $as_echo_n "(cached) " >&6
24917else
24918
24919 case "$host_os" in
24920 # Guess no on Solaris.
24921 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
24922 # Guess yes otherwise.
24923 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
24924 esac
24925 if test $LOCALE_FR_UTF8 != none; then
24926 if test "$cross_compiling" = yes; then :
24927 :
24928else
24929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24930/* end confdefs.h. */
24931
24932#include <locale.h>
24933#include <stdlib.h>
24934#include <string.h>
24935/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24936 <wchar.h>.
24937 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24938 included before <wchar.h>. */
24939#include <stddef.h>
24940#include <stdio.h>
24941#include <time.h>
24942#include <wchar.h>
24943int main ()
24944{
24945 int result = 0;
24946
24947 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24948 {
24949 char input[] = "\303\237er";
24950 mbstate_t state;
24951 wchar_t wc;
24952 size_t ret;
24953
24954 memset (&state, '\0', sizeof (mbstate_t));
24955 wc = (wchar_t) 0xBADFACE;
24956 ret = mbrtowc (&wc, input, 5, &state);
24957 if (ret != 2)
24958 result |= 1;
24959 if (!mbsinit (&state))
24960 result |= 2;
24961
24962 memset (&state, '\0', sizeof (mbstate_t));
24963 ret = mbrtowc (NULL, input, 5, &state);
24964 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
24965 result |= 4;
24966 if (!mbsinit (&state))
24967 result |= 8;
24968 }
24969 return result;
24970}
24971_ACEOF
24972if ac_fn_c_try_run "$LINENO"; then :
24973 gl_cv_func_mbrtowc_null_arg1=yes
24974else
24975 gl_cv_func_mbrtowc_null_arg1=no
24976fi
24977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24978 conftest.$ac_objext conftest.beam conftest.$ac_ext
24979fi
24980
24981 fi
24982
24983fi
24984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
24985$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
24986
24987
24988
24989
24990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
24991$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
24992if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
24993 $as_echo_n "(cached) " >&6
24994else
24995
24996 case "$host_os" in
24997 # Guess no on OSF/1.
24998 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
24999 # Guess yes otherwise.
25000 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
25001 esac
25002 if test $LOCALE_FR_UTF8 != none; then
25003 if test "$cross_compiling" = yes; then :
25004 :
25005else
25006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25007/* end confdefs.h. */
25008
25009#include <locale.h>
25010#include <string.h>
25011/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25012 <wchar.h>.
25013 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25014 included before <wchar.h>. */
25015#include <stddef.h>
25016#include <stdio.h>
25017#include <time.h>
25018#include <wchar.h>
25019int main ()
25020{
25021 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25022 {
25023 mbstate_t state;
25024 wchar_t wc;
25025 int ret;
25026
25027 memset (&state, '\0', sizeof (mbstate_t));
25028 wc = (wchar_t) 0xBADFACE;
25029 mbrtowc (&wc, NULL, 5, &state);
25030 /* Check that wc was not modified. */
25031 if (wc != (wchar_t) 0xBADFACE)
25032 return 1;
25033 }
25034 return 0;
25035}
25036_ACEOF
25037if ac_fn_c_try_run "$LINENO"; then :
25038 gl_cv_func_mbrtowc_null_arg2=yes
25039else
25040 gl_cv_func_mbrtowc_null_arg2=no
25041fi
25042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25043 conftest.$ac_objext conftest.beam conftest.$ac_ext
25044fi
25045
25046 fi
25047
25048fi
25049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
25050$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
25051
25052
25053
25054
25055
25056
25057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
25058$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
25059if ${gl_cv_func_mbrtowc_retval+:} false; then :
25060 $as_echo_n "(cached) " >&6
25061else
25062
25063 case "$host_os" in
25064 # Guess no on HP-UX, Solaris, native Windows.
25065 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
25066 # Guess yes otherwise.
25067 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
25068 esac
25069 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
25070 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
25071 if test "$cross_compiling" = yes; then :
25072 :
25073else
25074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25075/* end confdefs.h. */
25076
25077#include <locale.h>
25078#include <string.h>
25079/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25080 <wchar.h>.
25081 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25082 included before <wchar.h>. */
25083#include <stddef.h>
25084#include <stdio.h>
25085#include <time.h>
25086#include <wchar.h>
25087int main ()
25088{
25089 int result = 0;
25090 int found_some_locale = 0;
25091 /* This fails on Solaris. */
25092 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25093 {
25094 char input[] = "B\303\274\303\237er"; /* "Büßer" */
25095 mbstate_t state;
25096 wchar_t wc;
25097
25098 memset (&state, '\0', sizeof (mbstate_t));
25099 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25100 {
25101 input[1] = '\0';
25102 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
25103 result |= 1;
25104 }
25105 found_some_locale = 1;
25106 }
25107 /* This fails on HP-UX 11.11. */
25108 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25109 {
25110 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25111 mbstate_t state;
25112 wchar_t wc;
25113
25114 memset (&state, '\0', sizeof (mbstate_t));
25115 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25116 {
25117 input[1] = '\0';
25118 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
25119 result |= 2;
25120 }
25121 found_some_locale = 1;
25122 }
25123 /* This fails on native Windows. */
25124 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
25125 {
25126 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
25127 mbstate_t state;
25128 wchar_t wc;
25129
25130 memset (&state, '\0', sizeof (mbstate_t));
25131 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
25132 {
25133 input[3] = '\0';
25134 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
25135 result |= 4;
25136 }
25137 found_some_locale = 1;
25138 }
25139 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
25140 {
25141 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
25142 mbstate_t state;
25143 wchar_t wc;
25144
25145 memset (&state, '\0', sizeof (mbstate_t));
25146 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
25147 {
25148 input[3] = '\0';
25149 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
25150 result |= 8;
25151 }
25152 found_some_locale = 1;
25153 }
25154 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
25155 {
25156 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
25157 mbstate_t state;
25158 wchar_t wc;
25159
25160 memset (&state, '\0', sizeof (mbstate_t));
25161 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
25162 {
25163 input[3] = '\0';
25164 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
25165 result |= 16;
25166 }
25167 found_some_locale = 1;
25168 }
25169 return (found_some_locale ? result : 77);
25170}
25171_ACEOF
25172if ac_fn_c_try_run "$LINENO"; then :
25173 gl_cv_func_mbrtowc_retval=yes
25174else
25175 if test $? != 77; then
25176 gl_cv_func_mbrtowc_retval=no
25177 fi
25178
25179fi
25180rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25181 conftest.$ac_objext conftest.beam conftest.$ac_ext
25182fi
25183
25184 fi
25185
25186fi
25187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
25188$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
25189
25190
25191
25192
25193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
25194$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
25195if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
25196 $as_echo_n "(cached) " >&6
25197else
25198
25199 case "$host_os" in
25200 # Guess no on Solaris 8 and 9.
25201 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
25202 # Guess yes otherwise.
25203 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
25204 esac
25205 if test $LOCALE_ZH_CN != none; then
25206 if test "$cross_compiling" = yes; then :
25207 :
25208else
25209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25210/* end confdefs.h. */
25211
25212#include <locale.h>
25213#include <string.h>
25214/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25215 <wchar.h>.
25216 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25217 included before <wchar.h>. */
25218#include <stddef.h>
25219#include <stdio.h>
25220#include <time.h>
25221#include <wchar.h>
25222int main ()
25223{
25224 /* This fails on Solaris 8 and 9. */
25225 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25226 {
25227 mbstate_t state;
25228 wchar_t wc;
25229
25230 memset (&state, '\0', sizeof (mbstate_t));
25231 if (mbrtowc (&wc, "", 1, &state) != 0)
25232 return 1;
25233 }
25234 return 0;
25235}
25236_ACEOF
25237if ac_fn_c_try_run "$LINENO"; then :
25238 gl_cv_func_mbrtowc_nul_retval=yes
25239else
25240 gl_cv_func_mbrtowc_nul_retval=no
25241fi
25242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25243 conftest.$ac_objext conftest.beam conftest.$ac_ext
25244fi
25245
25246 fi
25247
25248fi
25249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
25250$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
25251
25252 case "$gl_cv_func_mbrtowc_null_arg1" in
25253 *yes) ;;
25254 *)
25255$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
25256
25257 REPLACE_MBRTOWC=1
25258 ;;
25259 esac
25260 case "$gl_cv_func_mbrtowc_null_arg2" in
25261 *yes) ;;
25262 *)
25263$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
25264
25265 REPLACE_MBRTOWC=1
25266 ;;
25267 esac
25268 case "$gl_cv_func_mbrtowc_retval" in
25269 *yes) ;;
25270 *)
25271$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
25272
25273 REPLACE_MBRTOWC=1
25274 ;;
25275 esac
25276 case "$gl_cv_func_mbrtowc_nul_retval" in
25277 *yes) ;;
25278 *)
25279$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
25280
25281 REPLACE_MBRTOWC=1
25282 ;;
25283 esac
25284 fi
25285 fi
25286
25287if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
25288
25289
25290
25291
25292
25293
25294
25295
25296 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
25297
25298
25299 :
25300
25301fi
25302
25303
25304
25305
25306
25307 GNULIB_MBRTOWC=1
25308
25309
25310
25311
25312
25313$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
25314
25315
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
25329
25330
25331
25332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
25333$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
25334if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
25335 $as_echo_n "(cached) " >&6
25336else
25337
25338 case "$host_os" in
25339 # Guess no on AIX and OSF/1.
25340 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
25341 # Guess yes otherwise.
25342 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
25343 esac
25344 if test $LOCALE_JA != none; then
25345 if test "$cross_compiling" = yes; then :
25346 :
25347else
25348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25349/* end confdefs.h. */
25350
25351#include <locale.h>
25352#include <string.h>
25353/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25354 <wchar.h>.
25355 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25356 included before <wchar.h>. */
25357#include <stddef.h>
25358#include <stdio.h>
25359#include <time.h>
25360#include <wchar.h>
25361int main ()
25362{
25363 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25364 {
25365 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25366 mbstate_t state;
25367 wchar_t wc;
25368
25369 memset (&state, '\0', sizeof (mbstate_t));
25370 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25371 if (mbsinit (&state))
25372 return 1;
25373 }
25374 return 0;
25375}
25376_ACEOF
25377if ac_fn_c_try_run "$LINENO"; then :
25378 gl_cv_func_mbrtowc_incomplete_state=yes
25379else
25380 gl_cv_func_mbrtowc_incomplete_state=no
25381fi
25382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25383 conftest.$ac_objext conftest.beam conftest.$ac_ext
25384fi
25385
25386 fi
25387
25388fi
25389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25390$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25391
25392
25393
25394
25395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25396$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25397if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25398 $as_echo_n "(cached) " >&6
25399else
25400
25401 case "$host_os" in
25402 # Guess no on Solaris 8.
25403 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
25404 # Guess yes otherwise.
25405 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
25406 esac
25407 if test $LOCALE_ZH_CN != none; then
25408 if test "$cross_compiling" = yes; then :
25409 :
25410else
25411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25412/* end confdefs.h. */
25413
25414#include <locale.h>
25415#include <stdlib.h>
25416#include <string.h>
25417/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25418 <wchar.h>.
25419 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25420 included before <wchar.h>. */
25421#include <stddef.h>
25422#include <stdio.h>
25423#include <time.h>
25424#include <wchar.h>
25425int main ()
25426{
25427 /* This fails on Solaris 8:
25428 mbrtowc returns 2, and sets wc to 0x00F0.
25429 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
25430 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25431 {
25432 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25433 mbstate_t state;
25434 wchar_t wc;
25435
25436 memset (&state, '\0', sizeof (mbstate_t));
25437 if (mbrtowc (&wc, input + 3, 6, &state) != 4
25438 && mbtowc (&wc, input + 3, 6) == 4)
25439 return 1;
25440 }
25441 return 0;
25442}
25443_ACEOF
25444if ac_fn_c_try_run "$LINENO"; then :
25445 gl_cv_func_mbrtowc_sanitycheck=yes
25446else
25447 gl_cv_func_mbrtowc_sanitycheck=no
25448fi
25449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25450 conftest.$ac_objext conftest.beam conftest.$ac_ext
25451fi
25452
25453 fi
25454
25455fi
25456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25457$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25458
25459 REPLACE_MBSTATE_T=0
25460 case "$gl_cv_func_mbrtowc_incomplete_state" in
25461 *yes) ;;
25462 *) REPLACE_MBSTATE_T=1 ;;
25463 esac
25464 case "$gl_cv_func_mbrtowc_sanitycheck" in
25465 *yes) ;;
25466 *) REPLACE_MBSTATE_T=1 ;;
25467 esac
25468 else
25469 REPLACE_MBSTATE_T=1
25470 fi
25471
25472
25473
25474 if test $ac_cv_func_mbsinit = no; then
25475 HAVE_MBSINIT=0
25476 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
25477/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
25478 <wchar.h>.
25479 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
25480 included before <wchar.h>. */
25481#include <stddef.h>
25482#include <stdio.h>
25483#include <time.h>
25484#include <wchar.h>
25485
25486"
25487if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
25488 ac_have_decl=1
25489else
25490 ac_have_decl=0
25491fi
25492
25493cat >>confdefs.h <<_ACEOF
25494#define HAVE_DECL_MBSINIT $ac_have_decl
25495_ACEOF
25496
25497 if test $ac_cv_have_decl_mbsinit = yes; then
25498 REPLACE_MBSINIT=1
25499 fi
25500 else
25501 if test $REPLACE_MBSTATE_T = 1; then
25502 REPLACE_MBSINIT=1
25503 else
25504 case "$host_os" in
25505 mingw*) REPLACE_MBSINIT=1 ;;
25506 esac
25507 fi
25508 fi
25509
25510if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
25511
25512
25513
25514
25515
25516
25517
25518
25519 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
25520
25521
25522 :
25523
25524fi
25525
25526
25527
25528
25529
25530 GNULIB_MBSINIT=1
25531
25532
25533
25534
25535
25536$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
25537
25538
25539
25540
25541
25542
25543 if false; then
25544 REPLACE_MBTOWC=1
25545 fi
25546
25547if test $REPLACE_MBTOWC = 1; then
25548
25549
25550
25551
25552
25553
25554
25555
25556 gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
25557
25558
25559 :
25560
25561fi
25562
25563
25564
25565
25566
25567 GNULIB_MBTOWC=1
25568
25569
25570
25571
25572
25573$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
25574
25575
25576
25577
25578if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
25579
25580
25581
25582
25583
25584
25585
25586
25587 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
25588
25589
25590 for ac_header in bp-sym.h
25591do :
25592 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
25593if test "x$ac_cv_header_bp_sym_h" = xyes; then :
25594 cat >>confdefs.h <<_ACEOF
25595#define HAVE_BP_SYM_H 1
25596_ACEOF
25597
25598fi
25599
25600done
25601
25602
25603fi
25604
25605
25606
25607
25608
25609 GNULIB_MEMCHR=1
25610
25611
25612
25613
25614
25615$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
25616
25617
25618
25619
25620
25621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
25622$as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
25623if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
25624 $as_echo_n "(cached) " >&6
25625else
25626 rm -rf conftest.dir
25627 if test "$cross_compiling" = yes; then :
25628 case "$host_os" in
25629 # Guess yes on glibc systems.
25630 *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
25631 # If we don't know, assume the worst.
25632 *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
25633 esac
25634
25635else
25636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25637/* end confdefs.h. */
25638
25639# include <sys/types.h>
25640# include <sys/stat.h>
25641
25642int
25643main ()
25644{
25645return mkdir ("conftest.dir/", 0700);
25646 ;
25647 return 0;
25648}
25649_ACEOF
25650if ac_fn_c_try_run "$LINENO"; then :
25651 gl_cv_func_mkdir_trailing_slash_works=yes
25652else
25653 gl_cv_func_mkdir_trailing_slash_works=no
25654fi
25655rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25656 conftest.$ac_objext conftest.beam conftest.$ac_ext
25657fi
25658
25659 rm -rf conftest.dir
25660
25661
25662fi
25663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
25664$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
25665 case "$gl_cv_func_mkdir_trailing_slash_works" in
25666 *yes) ;;
25667 *)
25668 REPLACE_MKDIR=1
25669 ;;
25670 esac
25671
25672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
25673$as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
25674if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
25675 $as_echo_n "(cached) " >&6
25676else
25677 rm -rf conftest.dir
25678 if test "$cross_compiling" = yes; then :
25679 case "$host_os" in
25680 # Guess yes on glibc systems.
25681 *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
25682 # If we don't know, assume the worst.
25683 *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
25684 esac
25685
25686else
25687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25688/* end confdefs.h. */
25689
25690# include <sys/types.h>
25691# include <sys/stat.h>
25692
25693int
25694main ()
25695{
25696return !mkdir ("conftest.dir/./", 0700);
25697 ;
25698 return 0;
25699}
25700_ACEOF
25701if ac_fn_c_try_run "$LINENO"; then :
25702 gl_cv_func_mkdir_trailing_dot_works=yes
25703else
25704 gl_cv_func_mkdir_trailing_dot_works=no
25705fi
25706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25707 conftest.$ac_objext conftest.beam conftest.$ac_ext
25708fi
25709
25710 rm -rf conftest.dir
25711
25712
25713fi
25714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
25715$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
25716 case "$gl_cv_func_mkdir_trailing_dot_works" in
25717 *yes) ;;
25718 *)
25719 REPLACE_MKDIR=1
25720
25721$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
25722
25723 ;;
25724 esac
25725
25726if test $REPLACE_MKDIR = 1; then
25727
25728
25729
25730
25731
25732
25733
25734
25735 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
25736
25737fi
25738
25739
25740
25741
25742 if test $ac_cv_func_mkstemp = yes; then
25743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
25744$as_echo_n "checking for working mkstemp... " >&6; }
25745if ${gl_cv_func_working_mkstemp+:} false; then :
25746 $as_echo_n "(cached) " >&6
25747else
25748
25749 mkdir conftest.mkstemp
25750 if test "$cross_compiling" = yes; then :
25751 case "$host_os" in
25752 # Guess yes on glibc systems.
25753 *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
25754 # If we don't know, assume the worst.
25755 *) gl_cv_func_working_mkstemp="guessing no" ;;
25756 esac
25757
25758else
25759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25760/* end confdefs.h. */
25761$ac_includes_default
25762int
25763main ()
25764{
25765int result = 0;
25766 int i;
25767 off_t large = (off_t) 4294967295u;
25768 if (large < 0)
25769 large = 2147483647;
25770 umask (0);
25771 for (i = 0; i < 70; i++)
25772 {
25773 char templ[] = "conftest.mkstemp/coXXXXXX";
25774 int (*mkstemp_function) (char *) = mkstemp;
25775 int fd = mkstemp_function (templ);
25776 if (fd < 0)
25777 result |= 1;
25778 else
25779 {
25780 struct stat st;
25781 if (lseek (fd, large, SEEK_SET) != large)
25782 result |= 2;
25783 if (fstat (fd, &st) < 0)
25784 result |= 4;
25785 else if (st.st_mode & 0077)
25786 result |= 8;
25787 if (close (fd))
25788 result |= 16;
25789 }
25790 }
25791 return result;
25792 ;
25793 return 0;
25794}
25795_ACEOF
25796if ac_fn_c_try_run "$LINENO"; then :
25797 gl_cv_func_working_mkstemp=yes
25798else
25799 gl_cv_func_working_mkstemp=no
25800fi
25801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25802 conftest.$ac_objext conftest.beam conftest.$ac_ext
25803fi
25804
25805 rm -rf conftest.mkstemp
25806
25807fi
25808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
25809$as_echo "$gl_cv_func_working_mkstemp" >&6; }
25810 case "$gl_cv_func_working_mkstemp" in
25811 *yes) ;;
25812 *)
25813 REPLACE_MKSTEMP=1
25814 ;;
25815 esac
25816 else
25817 HAVE_MKSTEMP=0
25818 fi
25819
25820if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
25821
25822
25823
25824
25825
25826
25827
25828
25829 gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
25830
25831
25832
25833fi
25834
25835
25836
25837
25838
25839 GNULIB_MKSTEMP=1
25840
25841
25842
25843
25844
25845$as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
25846
25847
25848
25849
25850
25851 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
25852 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
25853
25854$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
25855
25856 else
25857 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
25858 fi
25859
25860
25861if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25862
25863
25864
25865
25866
25867
25868
25869
25870 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
25871
25872fi
25873
25874
25875
25876if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25877
25878
25879
25880
25881
25882
25883
25884
25885 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
25886
25887fi
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900 if test $gl_cv_have_include_next = yes; then
25901 gl_cv_next_netdb_h='<'netdb.h'>'
25902 else
25903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
25904$as_echo_n "checking absolute name of <netdb.h>... " >&6; }
25905if ${gl_cv_next_netdb_h+:} false; then :
25906 $as_echo_n "(cached) " >&6
25907else
25908
25909 if test $ac_cv_header_netdb_h = yes; then
25910
25911
25912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25913/* end confdefs.h. */
25914#include <netdb.h>
25915
25916_ACEOF
25917 case "$host_os" in
25918 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25919 *) gl_absname_cpp="$ac_cpp" ;;
25920 esac
25921
25922 case "$host_os" in
25923 mingw*)
25924 gl_dirsep_regex='[/\\]'
25925 ;;
25926 *)
25927 gl_dirsep_regex='\/'
25928 ;;
25929 esac
25930 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25931
25932 gl_header_literal_regex=`echo 'netdb.h' \
25933 | sed -e "$gl_make_literal_regex_sed"`
25934 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25935 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25936 s|^/[^/]|//&|
25937 p
25938 q
25939 }'
25940 gl_cv_next_netdb_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25941 sed -n "$gl_absolute_header_sed"`'"'
25942 else
25943 gl_cv_next_netdb_h='<'netdb.h'>'
25944 fi
25945
25946
25947fi
25948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
25949$as_echo "$gl_cv_next_netdb_h" >&6; }
25950 fi
25951 NEXT_NETDB_H=$gl_cv_next_netdb_h
25952
25953 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25954 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25955 gl_next_as_first_directive='<'netdb.h'>'
25956 else
25957 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25958 gl_next_as_first_directive=$gl_cv_next_netdb_h
25959 fi
25960 NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
25961
25962
25963
25964
25965 if test $ac_cv_header_netdb_h = yes; then
25966 HAVE_NETDB_H=1
25967 else
25968 HAVE_NETDB_H=0
25969 fi
25970
25971
25972
25973 for gl_func in getaddrinfo freeaddrinfo gai_strerror getnameinfo; do
25974 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
25975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
25976$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
25977if eval \${$as_gl_Symbol+:} false; then :
25978 $as_echo_n "(cached) " >&6
25979else
25980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25981/* end confdefs.h. */
25982#include <netdb.h>
25983int
25984main ()
25985{
25986#undef $gl_func
25987 (void) $gl_func;
25988 ;
25989 return 0;
25990}
25991_ACEOF
25992if ac_fn_c_try_compile "$LINENO"; then :
25993 eval "$as_gl_Symbol=yes"
25994else
25995 eval "$as_gl_Symbol=no"
25996fi
25997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25998fi
25999eval ac_res=\$$as_gl_Symbol
26000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
26001$as_echo "$ac_res" >&6; }
26002 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
26003 cat >>confdefs.h <<_ACEOF
26004#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
26005_ACEOF
26006
26007 eval ac_cv_have_decl_$gl_func=yes
26008fi
26009 done
26010
26011
26012
26013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
26014$as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
26015if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
26016 $as_echo_n "(cached) " >&6
26017else
26018
26019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26020/* end confdefs.h. */
26021#include <netinet/in.h>
26022int
26023main ()
26024{
26025
26026 ;
26027 return 0;
26028}
26029_ACEOF
26030if ac_fn_c_try_compile "$LINENO"; then :
26031 gl_cv_header_netinet_in_h_selfcontained=yes
26032else
26033 gl_cv_header_netinet_in_h_selfcontained=no
26034fi
26035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26036
26037fi
26038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
26039$as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
26040 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
26041 NETINET_IN_H=''
26042 else
26043 NETINET_IN_H='netinet/in.h'
26044 for ac_header in netinet/in.h
26045do :
26046 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
26047if test "x$ac_cv_header_netinet_in_h" = xyes; then :
26048 cat >>confdefs.h <<_ACEOF
26049#define HAVE_NETINET_IN_H 1
26050_ACEOF
26051
26052fi
26053
26054done
26055
26056
26057
26058
26059
26060
26061
26062
26063
26064
26065 if test $gl_cv_have_include_next = yes; then
26066 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
26067 else
26068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
26069$as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
26070if ${gl_cv_next_netinet_in_h+:} false; then :
26071 $as_echo_n "(cached) " >&6
26072else
26073
26074 if test $ac_cv_header_netinet_in_h = yes; then
26075
26076
26077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26078/* end confdefs.h. */
26079#include <netinet/in.h>
26080
26081_ACEOF
26082 case "$host_os" in
26083 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26084 *) gl_absname_cpp="$ac_cpp" ;;
26085 esac
26086
26087 case "$host_os" in
26088 mingw*)
26089 gl_dirsep_regex='[/\\]'
26090 ;;
26091 *)
26092 gl_dirsep_regex='\/'
26093 ;;
26094 esac
26095 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26096
26097 gl_header_literal_regex=`echo 'netinet/in.h' \
26098 | sed -e "$gl_make_literal_regex_sed"`
26099 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26100 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26101 s|^/[^/]|//&|
26102 p
26103 q
26104 }'
26105 gl_cv_next_netinet_in_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26106 sed -n "$gl_absolute_header_sed"`'"'
26107 else
26108 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
26109 fi
26110
26111
26112fi
26113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
26114$as_echo "$gl_cv_next_netinet_in_h" >&6; }
26115 fi
26116 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
26117
26118 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26119 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26120 gl_next_as_first_directive='<'netinet/in.h'>'
26121 else
26122 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26123 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
26124 fi
26125 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
26126
26127
26128
26129
26130 if test $ac_cv_header_netinet_in_h = yes; then
26131 HAVE_NETINET_IN_H=1
26132 else
26133 HAVE_NETINET_IN_H=0
26134 fi
26135
26136 fi
26137
26138 if test -n "$NETINET_IN_H"; then
26139 GL_GENERATE_NETINET_IN_H_TRUE=
26140 GL_GENERATE_NETINET_IN_H_FALSE='#'
26141else
26142 GL_GENERATE_NETINET_IN_H_TRUE='#'
26143 GL_GENERATE_NETINET_IN_H_FALSE=
26144fi
26145
26146
26147
26148
26149
26150
26151
26152 if test $ac_cv_func_nl_langinfo = yes; then
26153 # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
26154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
26155$as_echo_n "checking whether YESEXPR works... " >&6; }
26156if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
26157 $as_echo_n "(cached) " >&6
26158else
26159 if test "$cross_compiling" = yes; then :
26160
26161 case "$host_os" in
26162 # Guess no on irix systems.
26163 irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
26164 # Guess yes elsewhere.
26165 *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
26166 esac
26167
26168else
26169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26170/* end confdefs.h. */
26171#include <langinfo.h>
26172
26173int
26174main ()
26175{
26176return !*nl_langinfo(YESEXPR);
26177
26178 ;
26179 return 0;
26180}
26181_ACEOF
26182if ac_fn_c_try_run "$LINENO"; then :
26183 gl_cv_func_nl_langinfo_yesexpr_works=yes
26184else
26185 gl_cv_func_nl_langinfo_yesexpr_works=no
26186fi
26187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26188 conftest.$ac_objext conftest.beam conftest.$ac_ext
26189fi
26190
26191
26192fi
26193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
26194$as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
26195 case $gl_cv_func_nl_langinfo_yesexpr_works in
26196 *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
26197 *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
26198 esac
26199
26200cat >>confdefs.h <<_ACEOF
26201#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
26202_ACEOF
26203
26204 if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
26205 && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
26206 :
26207 else
26208 REPLACE_NL_LANGINFO=1
26209
26210$as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
26211
26212 fi
26213 else
26214 HAVE_NL_LANGINFO=0
26215 fi
26216
26217if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
26218
26219
26220
26221
26222
26223
26224
26225
26226 gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
26227
26228fi
26229
26230
26231
26232
26233
26234 GNULIB_NL_LANGINFO=1
26235
26236
26237
26238
26239
26240$as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
26241
26242
26243
26244
26245
26246 case "$host_os" in
26247 mingw* | pw*)
26248 REPLACE_OPEN=1
26249 ;;
26250 *)
26251
26252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
26253$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
26254if ${gl_cv_func_open_slash+:} false; then :
26255 $as_echo_n "(cached) " >&6
26256else
26257 # Assume that if we have lstat, we can also check symlinks.
26258 if test $ac_cv_func_lstat = yes; then
26259 touch conftest.tmp
26260 ln -s conftest.tmp conftest.lnk
26261 fi
26262 if test "$cross_compiling" = yes; then :
26263
26264 case "$host_os" in
26265 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
26266 gl_cv_func_open_slash="guessing no" ;;
26267 *)
26268 gl_cv_func_open_slash="guessing yes" ;;
26269 esac
26270
26271else
26272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26273/* end confdefs.h. */
26274
26275#include <fcntl.h>
26276#if HAVE_UNISTD_H
26277# include <unistd.h>
26278#endif
26279int main ()
26280{
26281 int result = 0;
26282#if HAVE_LSTAT
26283 if (open ("conftest.lnk/", O_RDONLY) != -1)
26284 result |= 1;
26285#endif
26286 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
26287 result |= 2;
26288 return result;
26289}
26290_ACEOF
26291if ac_fn_c_try_run "$LINENO"; then :
26292 gl_cv_func_open_slash=yes
26293else
26294 gl_cv_func_open_slash=no
26295fi
26296rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26297 conftest.$ac_objext conftest.beam conftest.$ac_ext
26298fi
26299
26300 rm -f conftest.sl conftest.tmp conftest.lnk
26301
26302fi
26303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
26304$as_echo "$gl_cv_func_open_slash" >&6; }
26305 case "$gl_cv_func_open_slash" in
26306 *no)
26307
26308$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
26309
26310 REPLACE_OPEN=1
26311 ;;
26312 esac
26313 ;;
26314 esac
26315
26316
26317
26318if test $REPLACE_OPEN = 1; then
26319
26320
26321
26322
26323
26324
26325
26326
26327 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
26328
26329
26330
26331
26332 :
26333
26334fi
26335
26336
26337
26338
26339
26340 GNULIB_OPEN=1
26341
26342
26343
26344
26345
26346$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357
26358
26359 if test $ac_cv_func_pipe2 != yes; then
26360 HAVE_PIPE2=0
26361 fi
26362
26363
26364
26365
26366
26367
26368 GNULIB_PIPE2=1
26369
26370
26371
26372
26373
26374$as_echo "#define GNULIB_TEST_PIPE2 1" >>confdefs.h
26375
26376
26377
26378
26379
26380cat >>confdefs.h <<_ACEOF
26381#define GNULIB_PIPE2_SAFER 1
26382_ACEOF
26383
26384
26385
26386
26387
26388
26389
26390
26391 if test $REPLACE_POSIX_SPAWN = 1; then
26392 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
26393 else
26394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addclose works" >&5
26395$as_echo_n "checking whether posix_spawn_file_actions_addclose works... " >&6; }
26396if ${gl_cv_func_posix_spawn_file_actions_addclose_works+:} false; then :
26397 $as_echo_n "(cached) " >&6
26398else
26399 if test "$cross_compiling" = yes; then :
26400 # Guess no on Solaris, yes otherwise.
26401 case "$host_os" in
26402 solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no";;
26403 *) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes";;
26404 esac
26405
26406else
26407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26408/* end confdefs.h. */
26409
26410#include <spawn.h>
26411int main ()
26412{
26413 posix_spawn_file_actions_t actions;
26414 if (posix_spawn_file_actions_init (&actions) != 0)
26415 return 1;
26416 if (posix_spawn_file_actions_addclose (&actions, 10000000) == 0)
26417 return 2;
26418 return 0;
26419}
26420_ACEOF
26421if ac_fn_c_try_run "$LINENO"; then :
26422 gl_cv_func_posix_spawn_file_actions_addclose_works=yes
26423else
26424 gl_cv_func_posix_spawn_file_actions_addclose_works=no
26425fi
26426rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26427 conftest.$ac_objext conftest.beam conftest.$ac_ext
26428fi
26429
26430
26431fi
26432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addclose_works" >&5
26433$as_echo "$gl_cv_func_posix_spawn_file_actions_addclose_works" >&6; }
26434 case "$gl_cv_func_posix_spawn_file_actions_addclose_works" in
26435 *yes) ;;
26436 *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;;
26437 esac
26438 fi
26439
26440if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then
26441
26442
26443
26444
26445
26446
26447
26448
26449 gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addclose.$ac_objext"
26450
26451fi
26452
26453
26454
26455
26456
26457 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
26458
26459
26460
26461
26462
26463$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473 if test $REPLACE_POSIX_SPAWN = 1; then
26474 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
26475 else
26476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_adddup2 works" >&5
26477$as_echo_n "checking whether posix_spawn_file_actions_adddup2 works... " >&6; }
26478if ${gl_cv_func_posix_spawn_file_actions_adddup2_works+:} false; then :
26479 $as_echo_n "(cached) " >&6
26480else
26481 if test "$cross_compiling" = yes; then :
26482 # Guess no on Solaris, yes otherwise.
26483 case "$host_os" in
26484 solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";;
26485 *) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";;
26486 esac
26487
26488else
26489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26490/* end confdefs.h. */
26491
26492#include <spawn.h>
26493int main ()
26494{
26495 posix_spawn_file_actions_t actions;
26496 if (posix_spawn_file_actions_init (&actions) != 0)
26497 return 1;
26498 if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0)
26499 return 2;
26500 return 0;
26501}
26502_ACEOF
26503if ac_fn_c_try_run "$LINENO"; then :
26504 gl_cv_func_posix_spawn_file_actions_adddup2_works=yes
26505else
26506 gl_cv_func_posix_spawn_file_actions_adddup2_works=no
26507fi
26508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26509 conftest.$ac_objext conftest.beam conftest.$ac_ext
26510fi
26511
26512
26513fi
26514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_adddup2_works" >&5
26515$as_echo "$gl_cv_func_posix_spawn_file_actions_adddup2_works" >&6; }
26516 case "$gl_cv_func_posix_spawn_file_actions_adddup2_works" in
26517 *yes) ;;
26518 *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;;
26519 esac
26520 fi
26521
26522if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then
26523
26524
26525
26526
26527
26528
26529
26530
26531 gl_LIBOBJS="$gl_LIBOBJS spawn_faction_adddup2.$ac_objext"
26532
26533fi
26534
26535
26536
26537
26538
26539 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
26540
26541
26542
26543
26544
26545$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555 if test $REPLACE_POSIX_SPAWN = 1; then
26556 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
26557 else
26558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addopen works" >&5
26559$as_echo_n "checking whether posix_spawn_file_actions_addopen works... " >&6; }
26560if ${gl_cv_func_posix_spawn_file_actions_addopen_works+:} false; then :
26561 $as_echo_n "(cached) " >&6
26562else
26563 if test "$cross_compiling" = yes; then :
26564 # Guess no on Solaris, yes otherwise.
26565 case "$host_os" in
26566 solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";;
26567 *) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";;
26568 esac
26569
26570else
26571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26572/* end confdefs.h. */
26573
26574#include <spawn.h>
26575#include <fcntl.h>
26576int main ()
26577{
26578 posix_spawn_file_actions_t actions;
26579 if (posix_spawn_file_actions_init (&actions) != 0)
26580 return 1;
26581 if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY)
26582 == 0)
26583 return 2;
26584 return 0;
26585}
26586_ACEOF
26587if ac_fn_c_try_run "$LINENO"; then :
26588 gl_cv_func_posix_spawn_file_actions_addopen_works=yes
26589else
26590 gl_cv_func_posix_spawn_file_actions_addopen_works=no
26591fi
26592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26593 conftest.$ac_objext conftest.beam conftest.$ac_ext
26594fi
26595
26596
26597fi
26598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addopen_works" >&5
26599$as_echo "$gl_cv_func_posix_spawn_file_actions_addopen_works" >&6; }
26600 case "$gl_cv_func_posix_spawn_file_actions_addopen_works" in
26601 *yes) ;;
26602 *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;;
26603 esac
26604 fi
26605
26606if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then
26607
26608
26609
26610
26611
26612
26613
26614
26615 gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addopen.$ac_objext"
26616
26617fi
26618
26619
26620
26621
26622
26623 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
26624
26625
26626
26627
26628
26629$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h
26630
26631
26632
26633
26634
26635
26636if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
26637
26638
26639
26640
26641
26642
26643
26644
26645 gl_LIBOBJS="$gl_LIBOBJS spawn_faction_destroy.$ac_objext"
26646
26647fi
26648
26649
26650
26651
26652
26653 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
26654
26655
26656
26657
26658
26659$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h
26660
26661
26662
26663
26664
26665
26666if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
26667
26668
26669
26670
26671
26672
26673
26674
26675 gl_LIBOBJS="$gl_LIBOBJS spawn_faction_init.$ac_objext"
26676
26677fi
26678
26679
26680
26681
26682
26683 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
26684
26685
26686
26687
26688
26689$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h
26690
26691
26692
26693
26694
26695
26696if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
26697
26698
26699
26700
26701
26702
26703
26704
26705 gl_LIBOBJS="$gl_LIBOBJS spawnattr_destroy.$ac_objext"
26706
26707fi
26708
26709
26710
26711
26712
26713 GNULIB_POSIX_SPAWNATTR_DESTROY=1
26714
26715
26716
26717
26718
26719$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h
26720
26721
26722
26723
26724
26725
26726if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
26727
26728
26729
26730
26731
26732
26733
26734
26735 gl_LIBOBJS="$gl_LIBOBJS spawnattr_init.$ac_objext"
26736
26737fi
26738
26739
26740
26741
26742
26743 GNULIB_POSIX_SPAWNATTR_INIT=1
26744
26745
26746
26747
26748
26749$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h
26750
26751
26752
26753
26754
26755
26756if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
26757
26758
26759
26760
26761
26762
26763
26764
26765 gl_LIBOBJS="$gl_LIBOBJS spawnattr_setflags.$ac_objext"
26766
26767fi
26768
26769
26770
26771
26772
26773 GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
26774
26775
26776
26777
26778
26779$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h
26780
26781
26782
26783
26784
26785
26786if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
26787
26788
26789
26790
26791
26792
26793
26794
26795 gl_LIBOBJS="$gl_LIBOBJS spawnattr_setsigmask.$ac_objext"
26796
26797fi
26798
26799
26800
26801
26802
26803 GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
26804
26805
26806
26807
26808
26809$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h
26810
26811
26812
26813
26814
26815
26816if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
26817
26818
26819
26820
26821
26822
26823
26824
26825 gl_LIBOBJS="$gl_LIBOBJS spawnp.$ac_objext"
26826
26827
26828
26829
26830
26831
26832
26833
26834
26835 gl_LIBOBJS="$gl_LIBOBJS spawni.$ac_objext"
26836
26837
26838 for ac_header in paths.h
26839do :
26840 ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
26841if test "x$ac_cv_header_paths_h" = xyes; then :
26842 cat >>confdefs.h <<_ACEOF
26843#define HAVE_PATHS_H 1
26844_ACEOF
26845
26846fi
26847
26848done
26849
26850 for ac_func in confstr sched_setparam sched_setscheduler setegid seteuid vfork
26851do :
26852 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
26853ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
26854if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
26855 cat >>confdefs.h <<_ACEOF
26856#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
26857_ACEOF
26858
26859fi
26860done
26861
26862
26863fi
26864
26865
26866
26867
26868
26869 GNULIB_POSIX_SPAWNP=1
26870
26871
26872
26873
26874
26875$as_echo "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h
26876
26877
26878
26879
26880 :
26881
26882
26883 :
26884
26885
26886
26887
26888
26889 for ac_func in raise
26890do :
26891 ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
26892if test "x$ac_cv_func_raise" = xyes; then :
26893 cat >>confdefs.h <<_ACEOF
26894#define HAVE_RAISE 1
26895_ACEOF
26896
26897fi
26898done
26899
26900 if test $ac_cv_func_raise = no; then
26901 HAVE_RAISE=0
26902 else
26903 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26904 REPLACE_RAISE=1
26905 fi
26906
26907
26908
26909
26910 if test $gl_cv_type_sigset_t = yes; then
26911 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
26912if test "x$ac_cv_func_sigprocmask" = xyes; then :
26913 gl_cv_func_sigprocmask=1
26914fi
26915
26916 fi
26917 if test -z "$gl_cv_func_sigprocmask"; then
26918 HAVE_POSIX_SIGNALBLOCKING=0
26919 fi
26920
26921 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
26922
26923
26924
26925
26926 if test $gl_cv_header_signal_h_SIGPIPE != yes; then
26927 REPLACE_RAISE=1
26928 fi
26929
26930 fi
26931
26932 fi
26933
26934if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
26935
26936
26937
26938
26939
26940
26941
26942
26943 gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
26944
26945
26946
26947
26948fi
26949
26950
26951
26952
26953
26954 GNULIB_RAISE=1
26955
26956
26957
26958
26959
26960$as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
26961
26962
26963
26964
26965
26966
26967
26968 for ac_func in rawmemchr
26969do :
26970 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
26971if test "x$ac_cv_func_rawmemchr" = xyes; then :
26972 cat >>confdefs.h <<_ACEOF
26973#define HAVE_RAWMEMCHR 1
26974_ACEOF
26975
26976fi
26977done
26978
26979 if test $ac_cv_func_rawmemchr = no; then
26980 HAVE_RAWMEMCHR=0
26981 fi
26982
26983if test $HAVE_RAWMEMCHR = 0; then
26984
26985
26986
26987
26988
26989
26990
26991
26992 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
26993
26994 :
26995fi
26996
26997
26998
26999
27000
27001 GNULIB_RAWMEMCHR=1
27002
27003
27004
27005
27006
27007$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
27008
27009
27010
27011
27012
27013
27014 if test $gl_cv_func_malloc_posix = yes; then
27015
27016$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
27017
27018 else
27019 REPLACE_REALLOC=1
27020 fi
27021
27022if test $REPLACE_REALLOC = 1; then
27023
27024
27025
27026
27027
27028
27029
27030
27031 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
27032
27033fi
27034
27035
27036
27037
27038
27039 GNULIB_REALLOC_POSIX=1
27040
27041
27042
27043
27044
27045$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
27046
27047
27048
27049
27050if test "$ac_cv_header_winsock2_h" = yes; then
27051
27052
27053
27054
27055
27056
27057
27058
27059 gl_LIBOBJS="$gl_LIBOBJS recv.$ac_objext"
27060
27061fi
27062
27063
27064
27065
27066
27067 GNULIB_RECV=1
27068
27069
27070
27071
27072
27073$as_echo "#define GNULIB_TEST_RECV 1" >>confdefs.h
27074
27075
27076
27077
27078
27079# Check whether --with-included-regex was given.
27080if test "${with_included_regex+set}" = set; then :
27081 withval=$with_included_regex;
27082fi
27083
27084
27085 case $with_included_regex in #(
27086 yes|no) ac_use_included_regex=$with_included_regex
27087 ;;
27088 '')
27089 # If the system regex support is good enough that it passes the
27090 # following run test, then default to *not* using the included regex.c.
27091 # If cross compiling, assume the test would fail and use the included
27092 # regex.c.
27093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
27094$as_echo_n "checking for working re_compile_pattern... " >&6; }
27095if ${gl_cv_func_re_compile_pattern_working+:} false; then :
27096 $as_echo_n "(cached) " >&6
27097else
27098 if test "$cross_compiling" = yes; then :
27099 gl_cv_func_re_compile_pattern_working=no
27100else
27101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27102/* end confdefs.h. */
27103$ac_includes_default
27104 #include <locale.h>
27105 #include <limits.h>
27106 #include <regex.h>
27107
27108int
27109main ()
27110{
27111int result = 0;
27112 static struct re_pattern_buffer regex;
27113 unsigned char folded_chars[UCHAR_MAX + 1];
27114 int i;
27115 const char *s;
27116 struct re_registers regs;
27117
27118 /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
27119 This test needs valgrind to catch the bug on Debian
27120 GNU/Linux 3.1 x86, but it might catch the bug better
27121 on other platforms and it shouldn't hurt to try the
27122 test here. */
27123 if (setlocale (LC_ALL, "en_US.UTF-8"))
27124 {
27125 static char const pat[] = "insert into";
27126 static char const data[] =
27127 "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
27128 re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
27129 | RE_ICASE);
27130 memset (&regex, 0, sizeof regex);
27131 s = re_compile_pattern (pat, sizeof pat - 1, &regex);
27132 if (s)
27133 result |= 1;
27134 else if (re_search (&regex, data, sizeof data - 1,
27135 0, sizeof data - 1, &regs)
27136 != -1)
27137 result |= 1;
27138 if (! setlocale (LC_ALL, "C"))
27139 return 1;
27140 }
27141
27142 /* This test is from glibc bug 3957, reported by Andrew Mackey. */
27143 re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
27144 memset (&regex, 0, sizeof regex);
27145 s = re_compile_pattern ("a[^x]b", 6, &regex);
27146 if (s)
27147 result |= 2;
27148 /* This should fail, but succeeds for glibc-2.5. */
27149 else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
27150 result |= 2;
27151
27152 /* This regular expression is from Spencer ere test number 75
27153 in grep-2.3. */
27154 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
27155 memset (&regex, 0, sizeof regex);
27156 for (i = 0; i <= UCHAR_MAX; i++)
27157 folded_chars[i] = i;
27158 regex.translate = folded_chars;
27159 s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
27160 /* This should fail with _Invalid character class name_ error. */
27161 if (!s)
27162 result |= 4;
27163
27164 /* Ensure that [b-a] is diagnosed as invalid, when
27165 using RE_NO_EMPTY_RANGES. */
27166 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
27167 memset (&regex, 0, sizeof regex);
27168 s = re_compile_pattern ("a[b-a]", 6, &regex);
27169 if (s == 0)
27170 result |= 8;
27171
27172 /* This should succeed, but does not for glibc-2.1.3. */
27173 memset (&regex, 0, sizeof regex);
27174 s = re_compile_pattern ("{1", 2, &regex);
27175 if (s)
27176 result |= 8;
27177
27178 /* The following example is derived from a problem report
27179 against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
27180 memset (&regex, 0, sizeof regex);
27181 s = re_compile_pattern ("[an\371]*n", 7, &regex);
27182 if (s)
27183 result |= 8;
27184 /* This should match, but does not for glibc-2.2.1. */
27185 else if (re_match (&regex, "an", 2, 0, &regs) != 2)
27186 result |= 8;
27187
27188 memset (&regex, 0, sizeof regex);
27189 s = re_compile_pattern ("x", 1, &regex);
27190 if (s)
27191 result |= 8;
27192 /* glibc-2.2.93 does not work with a negative RANGE argument. */
27193 else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
27194 result |= 8;
27195
27196 /* The version of regex.c in older versions of gnulib
27197 ignored RE_ICASE. Detect that problem too. */
27198 re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
27199 memset (&regex, 0, sizeof regex);
27200 s = re_compile_pattern ("x", 1, &regex);
27201 if (s)
27202 result |= 16;
27203 else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
27204 result |= 16;
27205
27206 /* Catch a bug reported by Vin Shelton in
27207 http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
27208 */
27209 re_set_syntax (RE_SYNTAX_POSIX_BASIC
27210 & ~RE_CONTEXT_INVALID_DUP
27211 & ~RE_NO_EMPTY_RANGES);
27212 memset (&regex, 0, sizeof regex);
27213 s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
27214 if (s)
27215 result |= 32;
27216
27217 /* REG_STARTEND was added to glibc on 2004-01-15.
27218 Reject older versions. */
27219 if (! REG_STARTEND)
27220 result |= 64;
27221
27222#if 0
27223 /* It would be nice to reject hosts whose regoff_t values are too
27224 narrow (including glibc on hosts with 64-bit ptrdiff_t and
27225 32-bit int), but we should wait until glibc implements this
27226 feature. Otherwise, support for equivalence classes and
27227 multibyte collation symbols would always be broken except
27228 when compiling --without-included-regex. */
27229 if (sizeof (regoff_t) < sizeof (ptrdiff_t)
27230 || sizeof (regoff_t) < sizeof (ssize_t))
27231 result |= 64;
27232#endif
27233
27234 return result;
27235
27236 ;
27237 return 0;
27238}
27239_ACEOF
27240if ac_fn_c_try_run "$LINENO"; then :
27241 gl_cv_func_re_compile_pattern_working=yes
27242else
27243 gl_cv_func_re_compile_pattern_working=no
27244fi
27245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27246 conftest.$ac_objext conftest.beam conftest.$ac_ext
27247fi
27248
27249fi
27250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
27251$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
27252 case $gl_cv_func_re_compile_pattern_working in #(
27253 yes) ac_use_included_regex=no;; #(
27254 no) ac_use_included_regex=yes;;
27255 esac
27256 ;;
27257 *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
27258 ;;
27259 esac
27260
27261 if test $ac_use_included_regex = yes; then
27262
27263$as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
27264
27265
27266$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
27267
27268
27269$as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
27270
27271
27272$as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
27273
27274
27275$as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
27276
27277
27278$as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
27279
27280
27281$as_echo "#define re_search rpl_re_search" >>confdefs.h
27282
27283
27284$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
27285
27286
27287$as_echo "#define re_match rpl_re_match" >>confdefs.h
27288
27289
27290$as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
27291
27292
27293$as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
27294
27295
27296$as_echo "#define re_comp rpl_re_comp" >>confdefs.h
27297
27298
27299$as_echo "#define re_exec rpl_re_exec" >>confdefs.h
27300
27301
27302$as_echo "#define regcomp rpl_regcomp" >>confdefs.h
27303
27304
27305$as_echo "#define regexec rpl_regexec" >>confdefs.h
27306
27307
27308$as_echo "#define regerror rpl_regerror" >>confdefs.h
27309
27310
27311$as_echo "#define regfree rpl_regfree" >>confdefs.h
27312
27313 fi
27314
27315if test $ac_use_included_regex = yes; then
27316
27317
27318
27319
27320
27321
27322
27323
27324 gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
27325
27326
27327
27328
27329
27330
27331 for ac_header in libintl.h
27332do :
27333 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
27334if test "x$ac_cv_header_libintl_h" = xyes; then :
27335 cat >>confdefs.h <<_ACEOF
27336#define HAVE_LIBINTL_H 1
27337_ACEOF
27338
27339fi
27340
27341done
27342
27343
27344 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
27345"
27346if test "x$ac_cv_have_decl_isblank" = xyes; then :
27347 ac_have_decl=1
27348else
27349 ac_have_decl=0
27350fi
27351
27352cat >>confdefs.h <<_ACEOF
27353#define HAVE_DECL_ISBLANK $ac_have_decl
27354_ACEOF
27355
27356
27357fi
27358
27359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27360/* end confdefs.h. */
27361
27362 #include <sched.h>
27363 struct sched_param a;
27364 int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
27365 pid_t t1;
27366
27367int
27368main ()
27369{
27370
27371 ;
27372 return 0;
27373}
27374_ACEOF
27375if ac_fn_c_try_compile "$LINENO"; then :
27376 SCHED_H=''
27377else
27378 SCHED_H='sched.h'
27379
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389 if test $gl_cv_have_include_next = yes; then
27390 gl_cv_next_sched_h='<'sched.h'>'
27391 else
27392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
27393$as_echo_n "checking absolute name of <sched.h>... " >&6; }
27394if ${gl_cv_next_sched_h+:} false; then :
27395 $as_echo_n "(cached) " >&6
27396else
27397
27398 if test $ac_cv_header_sched_h = yes; then
27399
27400
27401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27402/* end confdefs.h. */
27403#include <sched.h>
27404
27405_ACEOF
27406 case "$host_os" in
27407 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27408 *) gl_absname_cpp="$ac_cpp" ;;
27409 esac
27410
27411 case "$host_os" in
27412 mingw*)
27413 gl_dirsep_regex='[/\\]'
27414 ;;
27415 *)
27416 gl_dirsep_regex='\/'
27417 ;;
27418 esac
27419 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27420
27421 gl_header_literal_regex=`echo 'sched.h' \
27422 | sed -e "$gl_make_literal_regex_sed"`
27423 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27424 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27425 s|^/[^/]|//&|
27426 p
27427 q
27428 }'
27429 gl_cv_next_sched_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27430 sed -n "$gl_absolute_header_sed"`'"'
27431 else
27432 gl_cv_next_sched_h='<'sched.h'>'
27433 fi
27434
27435
27436fi
27437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
27438$as_echo "$gl_cv_next_sched_h" >&6; }
27439 fi
27440 NEXT_SCHED_H=$gl_cv_next_sched_h
27441
27442 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27443 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27444 gl_next_as_first_directive='<'sched.h'>'
27445 else
27446 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27447 gl_next_as_first_directive=$gl_cv_next_sched_h
27448 fi
27449 NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
27450
27451
27452
27453
27454
27455 if test $ac_cv_header_sched_h = yes; then
27456 HAVE_SCHED_H=1
27457 else
27458 HAVE_SCHED_H=0
27459 fi
27460
27461
27462 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <sched.h>
27463"
27464if test "x$ac_cv_type_struct_sched_param" = xyes; then :
27465 HAVE_STRUCT_SCHED_PARAM=1
27466else
27467 HAVE_STRUCT_SCHED_PARAM=0
27468fi
27469
27470
27471
27472
27473
27474fi
27475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27476
27477 if test -n "$SCHED_H"; then
27478 GL_GENERATE_SCHED_H_TRUE=
27479 GL_GENERATE_SCHED_H_FALSE='#'
27480else
27481 GL_GENERATE_SCHED_H_TRUE='#'
27482 GL_GENERATE_SCHED_H_FALSE=
27483fi
27484
27485
27486
27487
27488
27489 if test "$ac_cv_header_winsock2_h" = yes; then
27490 REPLACE_SELECT=1
27491 else
27492
27493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
27494$as_echo_n "checking whether select supports a 0 argument... " >&6; }
27495if ${gl_cv_func_select_supports0+:} false; then :
27496 $as_echo_n "(cached) " >&6
27497else
27498
27499 if test "$cross_compiling" = yes; then :
27500
27501 case "$host_os" in
27502 # Guess no on Interix.
27503 interix*) gl_cv_func_select_supports0="guessing no";;
27504 # Guess yes otherwise.
27505 *) gl_cv_func_select_supports0="guessing yes";;
27506 esac
27507
27508else
27509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27510/* end confdefs.h. */
27511
27512#include <sys/types.h>
27513#include <sys/time.h>
27514#if HAVE_SYS_SELECT_H
27515#include <sys/select.h>
27516#endif
27517int main ()
27518{
27519 struct timeval timeout;
27520 timeout.tv_sec = 0;
27521 timeout.tv_usec = 5;
27522 return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
27523}
27524_ACEOF
27525if ac_fn_c_try_run "$LINENO"; then :
27526 gl_cv_func_select_supports0=yes
27527else
27528 gl_cv_func_select_supports0=no
27529fi
27530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27531 conftest.$ac_objext conftest.beam conftest.$ac_ext
27532fi
27533
27534
27535fi
27536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
27537$as_echo "$gl_cv_func_select_supports0" >&6; }
27538 case "$gl_cv_func_select_supports0" in
27539 *yes) ;;
27540 *) REPLACE_SELECT=1 ;;
27541 esac
27542 fi
27543
27544 LIB_SELECT="$LIBSOCKET"
27545 if test $REPLACE_SELECT = 1; then
27546 case "$host_os" in
27547 mingw*)
27548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27549/* end confdefs.h. */
27550
27551#define WIN32_LEAN_AND_MEAN
27552#include <windows.h>
27553int
27554main ()
27555{
27556 MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
27557 return 0;
27558}
27559_ACEOF
27560if ac_fn_c_try_link "$LINENO"; then :
27561
27562else
27563 LIB_SELECT="$LIB_SELECT -luser32"
27564fi
27565rm -f core conftest.err conftest.$ac_objext \
27566 conftest$ac_exeext conftest.$ac_ext
27567 ;;
27568 esac
27569 fi
27570
27571
27572if test $REPLACE_SELECT = 1; then
27573
27574
27575
27576
27577
27578
27579
27580
27581 gl_LIBOBJS="$gl_LIBOBJS select.$ac_objext"
27582
27583fi
27584
27585
27586
27587
27588
27589 GNULIB_SELECT=1
27590
27591
27592
27593
27594
27595$as_echo "#define GNULIB_TEST_SELECT 1" >>confdefs.h
27596
27597
27598
27599
27600if test "$ac_cv_header_winsock2_h" = yes; then
27601
27602
27603
27604
27605
27606
27607
27608
27609 gl_LIBOBJS="$gl_LIBOBJS send.$ac_objext"
27610
27611fi
27612
27613
27614
27615
27616
27617 GNULIB_SEND=1
27618
27619
27620
27621
27622
27623$as_echo "#define GNULIB_TEST_SEND 1" >>confdefs.h
27624
27625
27626
27627
27628 SERVENT_LIB=
27629 gl_saved_libs="$LIBS"
27630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getservbyname" >&5
27631$as_echo_n "checking for library containing getservbyname... " >&6; }
27632if ${ac_cv_search_getservbyname+:} false; then :
27633 $as_echo_n "(cached) " >&6
27634else
27635 ac_func_search_save_LIBS=$LIBS
27636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27637/* end confdefs.h. */
27638
27639/* Override any GCC internal prototype to avoid an error.
27640 Use char because int might match the return type of a GCC
27641 builtin and then its argument prototype would still apply. */
27642#ifdef __cplusplus
27643extern "C"
27644#endif
27645char getservbyname ();
27646int
27647main ()
27648{
27649return getservbyname ();
27650 ;
27651 return 0;
27652}
27653_ACEOF
27654for ac_lib in '' socket network net; do
27655 if test -z "$ac_lib"; then
27656 ac_res="none required"
27657 else
27658 ac_res=-l$ac_lib
27659 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27660 fi
27661 if ac_fn_c_try_link "$LINENO"; then :
27662 ac_cv_search_getservbyname=$ac_res
27663fi
27664rm -f core conftest.err conftest.$ac_objext \
27665 conftest$ac_exeext
27666 if ${ac_cv_search_getservbyname+:} false; then :
27667 break
27668fi
27669done
27670if ${ac_cv_search_getservbyname+:} false; then :
27671
27672else
27673 ac_cv_search_getservbyname=no
27674fi
27675rm conftest.$ac_ext
27676LIBS=$ac_func_search_save_LIBS
27677fi
27678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getservbyname" >&5
27679$as_echo "$ac_cv_search_getservbyname" >&6; }
27680ac_res=$ac_cv_search_getservbyname
27681if test "$ac_res" != no; then :
27682 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27683 if test "$ac_cv_search_getservbyname" != "none required"; then
27684 SERVENT_LIB="$ac_cv_search_getservbyname"
27685 fi
27686fi
27687
27688 LIBS="$gl_saved_libs"
27689 if test -z "$SERVENT_LIB"; then
27690 for ac_func in getservbyname
27691do :
27692 ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname"
27693if test "x$ac_cv_func_getservbyname" = xyes; then :
27694 cat >>confdefs.h <<_ACEOF
27695#define HAVE_GETSERVBYNAME 1
27696_ACEOF
27697
27698else
27699
27700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getservbyname in winsock2.h and -lws2_32" >&5
27701$as_echo_n "checking for getservbyname in winsock2.h and -lws2_32... " >&6; }
27702if ${gl_cv_w32_getservbyname+:} false; then :
27703 $as_echo_n "(cached) " >&6
27704else
27705 gl_cv_w32_getservbyname=no
27706 gl_save_LIBS="$LIBS"
27707 LIBS="$LIBS -lws2_32"
27708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27709/* end confdefs.h. */
27710
27711#ifdef HAVE_WINSOCK2_H
27712#include <winsock2.h>
27713#endif
27714#include <stddef.h>
27715
27716int
27717main ()
27718{
27719getservbyname(NULL,NULL);
27720 ;
27721 return 0;
27722}
27723_ACEOF
27724if ac_fn_c_try_link "$LINENO"; then :
27725 gl_cv_w32_getservbyname=yes
27726fi
27727rm -f core conftest.err conftest.$ac_objext \
27728 conftest$ac_exeext conftest.$ac_ext
27729 LIBS="$gl_save_LIBS"
27730
27731fi
27732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_getservbyname" >&5
27733$as_echo "$gl_cv_w32_getservbyname" >&6; }
27734 if test "$gl_cv_w32_getservbyname" = "yes"; then
27735 SERVENT_LIB="-lws2_32"
27736 fi
27737
27738fi
27739done
27740
27741 fi
27742
27743
27744
27745if test "$ac_cv_header_winsock2_h" = yes; then
27746
27747
27748
27749
27750
27751
27752
27753
27754 gl_LIBOBJS="$gl_LIBOBJS setsockopt.$ac_objext"
27755
27756fi
27757
27758
27759
27760
27761
27762 GNULIB_SETSOCKOPT=1
27763
27764
27765
27766
27767
27768$as_echo "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
27769
27770
27771
27772
27773
27774
27775 if test $ac_cv_func_sigaction = yes; then
27776 ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
27777"
27778if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes; then :
27779
27780cat >>confdefs.h <<_ACEOF
27781#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
27782_ACEOF
27783
27784
27785fi
27786
27787 if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
27788 HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
27789 fi
27790 else
27791 HAVE_SIGACTION=0
27792 fi
27793
27794if test $HAVE_SIGACTION = 0; then
27795
27796
27797
27798
27799
27800
27801
27802
27803 gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext"
27804
27805
27806
27807
27808
27809
27810
27811 ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
27812#include <signal.h>
27813
27814"
27815if test "x$ac_cv_type_siginfo_t" = xyes; then :
27816
27817cat >>confdefs.h <<_ACEOF
27818#define HAVE_SIGINFO_T 1
27819_ACEOF
27820
27821
27822fi
27823
27824 if test $ac_cv_type_siginfo_t = no; then
27825 HAVE_SIGINFO_T=0
27826 fi
27827
27828fi
27829
27830
27831
27832
27833
27834 GNULIB_SIGACTION=1
27835
27836
27837
27838
27839
27840$as_echo "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
27841
27842
27843
27844
27845
27846
27847
27848
27849
27850
27851
27852
27853
27854
27855 if test $gl_cv_have_include_next = yes; then
27856 gl_cv_next_signal_h='<'signal.h'>'
27857 else
27858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
27859$as_echo_n "checking absolute name of <signal.h>... " >&6; }
27860if ${gl_cv_next_signal_h+:} false; then :
27861 $as_echo_n "(cached) " >&6
27862else
27863
27864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27865/* end confdefs.h. */
27866#include <signal.h>
27867
27868_ACEOF
27869 case "$host_os" in
27870 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27871 *) gl_absname_cpp="$ac_cpp" ;;
27872 esac
27873
27874 case "$host_os" in
27875 mingw*)
27876 gl_dirsep_regex='[/\\]'
27877 ;;
27878 *)
27879 gl_dirsep_regex='\/'
27880 ;;
27881 esac
27882 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27883
27884 gl_header_literal_regex=`echo 'signal.h' \
27885 | sed -e "$gl_make_literal_regex_sed"`
27886 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27887 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27888 s|^/[^/]|//&|
27889 p
27890 q
27891 }'
27892 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27893 sed -n "$gl_absolute_header_sed"`'"'
27894
27895
27896fi
27897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
27898$as_echo "$gl_cv_next_signal_h" >&6; }
27899 fi
27900 NEXT_SIGNAL_H=$gl_cv_next_signal_h
27901
27902 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27903 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27904 gl_next_as_first_directive='<'signal.h'>'
27905 else
27906 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27907 gl_next_as_first_directive=$gl_cv_next_signal_h
27908 fi
27909 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
27910
27911
27912
27913
27914
27915# AIX declares sig_atomic_t to already include volatile, and C89 compilers
27916# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
27917 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
27918#include <signal.h>
27919
27920"
27921if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
27922
27923else
27924 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
27925fi
27926
27927
27928
27929
27930
27931
27932
27933 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
27934#include <signal.h>
27935
27936"
27937if test "x$ac_cv_type_sighandler_t" = xyes; then :
27938
27939else
27940 HAVE_SIGHANDLER_T=0
27941fi
27942
27943
27944
27945 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
27946 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27948$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27949if eval \${$as_gl_Symbol+:} false; then :
27950 $as_echo_n "(cached) " >&6
27951else
27952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27953/* end confdefs.h. */
27954#include <signal.h>
27955
27956int
27957main ()
27958{
27959#undef $gl_func
27960 (void) $gl_func;
27961 ;
27962 return 0;
27963}
27964_ACEOF
27965if ac_fn_c_try_compile "$LINENO"; then :
27966 eval "$as_gl_Symbol=yes"
27967else
27968 eval "$as_gl_Symbol=no"
27969fi
27970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27971fi
27972eval ac_res=\$$as_gl_Symbol
27973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27974$as_echo "$ac_res" >&6; }
27975 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27976 cat >>confdefs.h <<_ACEOF
27977#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27978_ACEOF
27979
27980 eval ac_cv_have_decl_$gl_func=yes
27981fi
27982 done
27983
27984
27985
27986
27987
27988
27989
27990cat >>confdefs.h <<_ACEOF
27991#define GNULIB_SIGPIPE 1
27992_ACEOF
27993
27994
27995
27996GNULIB_SIGNAL_H_SIGPIPE=1
27997
27998
27999GNULIB_STDIO_H_SIGPIPE=1
28000
28001GNULIB_UNISTD_H_SIGPIPE=1
28002
28003
28004
28005 if test $gl_cv_type_sigset_t = yes; then
28006 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
28007if test "x$ac_cv_func_sigprocmask" = xyes; then :
28008 gl_cv_func_sigprocmask=1
28009fi
28010
28011 fi
28012 if test -z "$gl_cv_func_sigprocmask"; then
28013 HAVE_POSIX_SIGNALBLOCKING=0
28014 fi
28015
28016if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
28017
28018
28019
28020
28021
28022
28023
28024
28025 gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
28026
28027
28028
28029
28030fi
28031
28032
28033
28034
28035
28036 GNULIB_SIGPROCMASK=1
28037
28038
28039
28040
28041
28042$as_echo "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
28043
28044
28045
28046
28047 for ac_header in stdint.h
28048do :
28049 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
28050if test "x$ac_cv_header_stdint_h" = xyes; then :
28051 cat >>confdefs.h <<_ACEOF
28052#define HAVE_STDINT_H 1
28053_ACEOF
28054
28055fi
28056
28057done
28058
28059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
28060$as_echo_n "checking for SIZE_MAX... " >&6; }
28061if ${gl_cv_size_max+:} false; then :
28062 $as_echo_n "(cached) " >&6
28063else
28064
28065 gl_cv_size_max=
28066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28067/* end confdefs.h. */
28068
28069#include <limits.h>
28070#if HAVE_STDINT_H
28071#include <stdint.h>
28072#endif
28073#ifdef SIZE_MAX
28074Found it
28075#endif
28076
28077_ACEOF
28078if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28079 $EGREP "Found it" >/dev/null 2>&1; then :
28080 gl_cv_size_max=yes
28081fi
28082rm -f conftest*
28083
28084 if test -z "$gl_cv_size_max"; then
28085 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
28086#include <limits.h>"; then :
28087
28088else
28089 size_t_bits_minus_1=
28090fi
28091
28092 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
28093
28094else
28095 fits_in_uint=
28096fi
28097
28098 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
28099 if test $fits_in_uint = 1; then
28100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28101/* end confdefs.h. */
28102#include <stddef.h>
28103 extern size_t foo;
28104 extern unsigned long foo;
28105
28106int
28107main ()
28108{
28109
28110 ;
28111 return 0;
28112}
28113_ACEOF
28114if ac_fn_c_try_compile "$LINENO"; then :
28115 fits_in_uint=0
28116fi
28117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28118 fi
28119 if test $fits_in_uint = 1; then
28120 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
28121 else
28122 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
28123 fi
28124 else
28125 gl_cv_size_max='((size_t)~(size_t)0)'
28126 fi
28127 fi
28128
28129fi
28130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
28131$as_echo "$gl_cv_size_max" >&6; }
28132 if test "$gl_cv_size_max" != yes; then
28133
28134cat >>confdefs.h <<_ACEOF
28135#define SIZE_MAX $gl_cv_size_max
28136_ACEOF
28137
28138 fi
28139
28140
28141
28142
28143 gl_cv_func_snprintf_usable=no
28144 for ac_func in snprintf
28145do :
28146 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
28147if test "x$ac_cv_func_snprintf" = xyes; then :
28148 cat >>confdefs.h <<_ACEOF
28149#define HAVE_SNPRINTF 1
28150_ACEOF
28151
28152fi
28153done
28154
28155 if test $ac_cv_func_snprintf = yes; then
28156
28157
28158
28159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
28160$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
28161if ${gl_cv_func_snprintf_size1+:} false; then :
28162 $as_echo_n "(cached) " >&6
28163else
28164
28165 if test "$cross_compiling" = yes; then :
28166 gl_cv_func_snprintf_size1="guessing yes"
28167else
28168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28169/* end confdefs.h. */
28170
28171#include <stdio.h>
28172#if HAVE_SNPRINTF
28173# define my_snprintf snprintf
28174#else
28175# include <stdarg.h>
28176static int my_snprintf (char *buf, int size, const char *format, ...)
28177{
28178 va_list args;
28179 int ret;
28180 va_start (args, format);
28181 ret = vsnprintf (buf, size, format, args);
28182 va_end (args);
28183 return ret;
28184}
28185#endif
28186int main()
28187{
28188 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
28189 my_snprintf (buf, 1, "%d", 12345);
28190 return buf[1] != 'E';
28191}
28192_ACEOF
28193if ac_fn_c_try_run "$LINENO"; then :
28194 gl_cv_func_snprintf_size1=yes
28195else
28196 gl_cv_func_snprintf_size1=no
28197fi
28198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28199 conftest.$ac_objext conftest.beam conftest.$ac_ext
28200fi
28201
28202
28203fi
28204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
28205$as_echo "$gl_cv_func_snprintf_size1" >&6; }
28206
28207 case "$gl_cv_func_snprintf_size1" in
28208 *yes)
28209
28210 case "$gl_cv_func_snprintf_retval_c99" in
28211 *yes)
28212
28213
28214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
28215$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
28216if ${gl_cv_func_printf_positions+:} false; then :
28217 $as_echo_n "(cached) " >&6
28218else
28219
28220 if test "$cross_compiling" = yes; then :
28221
28222 case "$host_os" in
28223 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
28224 gl_cv_func_printf_positions="guessing no";;
28225 beos*) gl_cv_func_printf_positions="guessing no";;
28226 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
28227 *) gl_cv_func_printf_positions="guessing yes";;
28228 esac
28229
28230else
28231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28232/* end confdefs.h. */
28233
28234#include <stdio.h>
28235#include <string.h>
28236/* The string "%2$d %1$d", with dollar characters protected from the shell's
28237 dollar expansion (possibly an autoconf bug). */
28238static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
28239static char buf[100];
28240int main ()
28241{
28242 sprintf (buf, format, 33, 55);
28243 return (strcmp (buf, "55 33") != 0);
28244}
28245_ACEOF
28246if ac_fn_c_try_run "$LINENO"; then :
28247 gl_cv_func_printf_positions=yes
28248else
28249 gl_cv_func_printf_positions=no
28250fi
28251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28252 conftest.$ac_objext conftest.beam conftest.$ac_ext
28253fi
28254
28255
28256fi
28257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
28258$as_echo "$gl_cv_func_printf_positions" >&6; }
28259
28260 case "$gl_cv_func_printf_positions" in
28261 *yes)
28262 gl_cv_func_snprintf_usable=yes
28263 ;;
28264 esac
28265 ;;
28266 esac
28267 ;;
28268 esac
28269 fi
28270 if test $gl_cv_func_snprintf_usable = no; then
28271
28272
28273
28274
28275
28276
28277
28278
28279
28280
28281 gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
28282
28283 if test $ac_cv_func_snprintf = yes; then
28284 REPLACE_SNPRINTF=1
28285 fi
28286 :
28287
28288 fi
28289
28290 if test $ac_cv_have_decl_snprintf = no; then
28291 HAVE_DECL_SNPRINTF=0
28292 fi
28293
28294
28295
28296
28297
28298
28299 GNULIB_SNPRINTF=1
28300
28301
28302
28303
28304
28305$as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
28306
28307
28308
28309
28310
28311cat >>confdefs.h <<_ACEOF
28312#define GNULIB_SNPRINTF 1
28313_ACEOF
28314
28315
28316
28317if test "$ac_cv_header_winsock2_h" = yes; then
28318
28319
28320
28321
28322
28323
28324
28325
28326 gl_LIBOBJS="$gl_LIBOBJS socket.$ac_objext"
28327
28328fi
28329# When this module is used, sockets may actually occur as file descriptors,
28330# hence it is worth warning if the modules 'close' and 'ioctl' are not used.
28331
28332
28333
28334if test "$ac_cv_header_winsock2_h" = yes; then
28335 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
28336 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
28337fi
28338
28339
28340
28341
28342
28343 GNULIB_SOCKET=1
28344
28345
28346
28347
28348
28349$as_echo "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
28350
28351
28352
28353
28354
28355
28356
28357
28358 if test $ac_cv_header_sys_socket_h != yes; then
28359 for ac_header in winsock2.h
28360do :
28361 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
28362if test "x$ac_cv_header_winsock2_h" = xyes; then :
28363 cat >>confdefs.h <<_ACEOF
28364#define HAVE_WINSOCK2_H 1
28365_ACEOF
28366
28367fi
28368
28369done
28370
28371 fi
28372 if test "$ac_cv_header_winsock2_h" = yes; then
28373 HAVE_WINSOCK2_H=1
28374 UNISTD_H_HAVE_WINSOCK2_H=1
28375 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
28376 else
28377 HAVE_WINSOCK2_H=0
28378 fi
28379
28380 LIBSOCKET=
28381 if test $HAVE_WINSOCK2_H = 1; then
28382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5
28383$as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; }
28384if ${gl_cv_func_wsastartup+:} false; then :
28385 $as_echo_n "(cached) " >&6
28386else
28387
28388 gl_save_LIBS="$LIBS"
28389 LIBS="$LIBS -lws2_32"
28390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28391/* end confdefs.h. */
28392
28393#ifdef HAVE_WINSOCK2_H
28394# include <winsock2.h>
28395#endif
28396int
28397main ()
28398{
28399
28400 WORD wVersionRequested = MAKEWORD(1, 1);
28401 WSADATA wsaData;
28402 int err = WSAStartup(wVersionRequested, &wsaData);
28403 WSACleanup ();
28404 ;
28405 return 0;
28406}
28407_ACEOF
28408if ac_fn_c_try_link "$LINENO"; then :
28409 gl_cv_func_wsastartup=yes
28410else
28411 gl_cv_func_wsastartup=no
28412fi
28413rm -f core conftest.err conftest.$ac_objext \
28414 conftest$ac_exeext conftest.$ac_ext
28415 LIBS="$gl_save_LIBS"
28416
28417fi
28418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
28419$as_echo "$gl_cv_func_wsastartup" >&6; }
28420 if test "$gl_cv_func_wsastartup" = "yes"; then
28421
28422$as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
28423
28424 LIBSOCKET='-lws2_32'
28425 fi
28426 else
28427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
28428$as_echo_n "checking for library containing setsockopt... " >&6; }
28429if ${gl_cv_lib_socket+:} false; then :
28430 $as_echo_n "(cached) " >&6
28431else
28432
28433 gl_cv_lib_socket=
28434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28435/* end confdefs.h. */
28436extern
28437#ifdef __cplusplus
28438"C"
28439#endif
28440char setsockopt();
28441int
28442main ()
28443{
28444setsockopt();
28445 ;
28446 return 0;
28447}
28448_ACEOF
28449if ac_fn_c_try_link "$LINENO"; then :
28450
28451else
28452 gl_save_LIBS="$LIBS"
28453 LIBS="$gl_save_LIBS -lsocket"
28454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28455/* end confdefs.h. */
28456extern
28457#ifdef __cplusplus
28458"C"
28459#endif
28460char setsockopt();
28461int
28462main ()
28463{
28464setsockopt();
28465 ;
28466 return 0;
28467}
28468_ACEOF
28469if ac_fn_c_try_link "$LINENO"; then :
28470 gl_cv_lib_socket="-lsocket"
28471fi
28472rm -f core conftest.err conftest.$ac_objext \
28473 conftest$ac_exeext conftest.$ac_ext
28474 if test -z "$gl_cv_lib_socket"; then
28475 LIBS="$gl_save_LIBS -lnetwork"
28476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28477/* end confdefs.h. */
28478extern
28479#ifdef __cplusplus
28480"C"
28481#endif
28482char setsockopt();
28483int
28484main ()
28485{
28486setsockopt();
28487 ;
28488 return 0;
28489}
28490_ACEOF
28491if ac_fn_c_try_link "$LINENO"; then :
28492 gl_cv_lib_socket="-lnetwork"
28493fi
28494rm -f core conftest.err conftest.$ac_objext \
28495 conftest$ac_exeext conftest.$ac_ext
28496 if test -z "$gl_cv_lib_socket"; then
28497 LIBS="$gl_save_LIBS -lnet"
28498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28499/* end confdefs.h. */
28500extern
28501#ifdef __cplusplus
28502"C"
28503#endif
28504char setsockopt();
28505int
28506main ()
28507{
28508setsockopt();
28509 ;
28510 return 0;
28511}
28512_ACEOF
28513if ac_fn_c_try_link "$LINENO"; then :
28514 gl_cv_lib_socket="-lnet"
28515fi
28516rm -f core conftest.err conftest.$ac_objext \
28517 conftest$ac_exeext conftest.$ac_ext
28518 fi
28519 fi
28520 LIBS="$gl_save_LIBS"
28521
28522fi
28523rm -f core conftest.err conftest.$ac_objext \
28524 conftest$ac_exeext conftest.$ac_ext
28525 if test -z "$gl_cv_lib_socket"; then
28526 gl_cv_lib_socket="none needed"
28527 fi
28528
28529fi
28530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
28531$as_echo "$gl_cv_lib_socket" >&6; }
28532 if test "$gl_cv_lib_socket" != "none needed"; then
28533 LIBSOCKET="$gl_cv_lib_socket"
28534 fi
28535 fi
28536
28537
28538
28539
28540
28541
28542 :
28543
28544
28545 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
28546/* <sys/types.h> is not needed according to POSIX, but the
28547 <sys/socket.h> in i386-unknown-freebsd4.10 and
28548 powerpc-apple-darwin5.5 required it. */
28549#include <sys/types.h>
28550#if HAVE_SYS_SOCKET_H
28551# include <sys/socket.h>
28552#elif HAVE_WS2TCPIP_H
28553# include <ws2tcpip.h>
28554#endif
28555
28556"
28557if test "x$ac_cv_type_socklen_t" = xyes; then :
28558
28559else
28560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
28561$as_echo_n "checking for socklen_t equivalent... " >&6; }
28562 if ${gl_cv_socklen_t_equiv+:} false; then :
28563 $as_echo_n "(cached) " >&6
28564else
28565 # Systems have either "struct sockaddr *" or
28566 # "void *" as the second argument to getpeername
28567 gl_cv_socklen_t_equiv=
28568 for arg2 in "struct sockaddr" void; do
28569 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
28570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28571/* end confdefs.h. */
28572#include <sys/types.h>
28573 #include <sys/socket.h>
28574
28575 int getpeername (int, $arg2 *, $t *);
28576int
28577main ()
28578{
28579$t len;
28580 getpeername (0, 0, &len);
28581 ;
28582 return 0;
28583}
28584_ACEOF
28585if ac_fn_c_try_compile "$LINENO"; then :
28586 gl_cv_socklen_t_equiv="$t"
28587fi
28588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28589 test "$gl_cv_socklen_t_equiv" != "" && break
28590 done
28591 test "$gl_cv_socklen_t_equiv" != "" && break
28592 done
28593
28594fi
28595
28596 if test "$gl_cv_socklen_t_equiv" = ""; then
28597 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
28598 fi
28599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
28600$as_echo "$gl_cv_socklen_t_equiv" >&6; }
28601
28602cat >>confdefs.h <<_ACEOF
28603#define socklen_t $gl_cv_socklen_t_equiv
28604_ACEOF
28605
28606fi
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617
28618
28619
28620 if test $gl_cv_have_include_next = yes; then
28621 gl_cv_next_spawn_h='<'spawn.h'>'
28622 else
28623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
28624$as_echo_n "checking absolute name of <spawn.h>... " >&6; }
28625if ${gl_cv_next_spawn_h+:} false; then :
28626 $as_echo_n "(cached) " >&6
28627else
28628
28629 if test $ac_cv_header_spawn_h = yes; then
28630
28631
28632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28633/* end confdefs.h. */
28634#include <spawn.h>
28635
28636_ACEOF
28637 case "$host_os" in
28638 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28639 *) gl_absname_cpp="$ac_cpp" ;;
28640 esac
28641
28642 case "$host_os" in
28643 mingw*)
28644 gl_dirsep_regex='[/\\]'
28645 ;;
28646 *)
28647 gl_dirsep_regex='\/'
28648 ;;
28649 esac
28650 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28651
28652 gl_header_literal_regex=`echo 'spawn.h' \
28653 | sed -e "$gl_make_literal_regex_sed"`
28654 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28655 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28656 s|^/[^/]|//&|
28657 p
28658 q
28659 }'
28660 gl_cv_next_spawn_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28661 sed -n "$gl_absolute_header_sed"`'"'
28662 else
28663 gl_cv_next_spawn_h='<'spawn.h'>'
28664 fi
28665
28666
28667fi
28668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
28669$as_echo "$gl_cv_next_spawn_h" >&6; }
28670 fi
28671 NEXT_SPAWN_H=$gl_cv_next_spawn_h
28672
28673 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28674 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28675 gl_next_as_first_directive='<'spawn.h'>'
28676 else
28677 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28678 gl_next_as_first_directive=$gl_cv_next_spawn_h
28679 fi
28680 NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
28681
28682
28683
28684
28685
28686 if test $ac_cv_header_spawn_h = yes; then
28687 HAVE_SPAWN_H=1
28688 ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
28689#include <spawn.h>
28690
28691"
28692if test "x$ac_cv_type_posix_spawnattr_t" = xyes; then :
28693
28694cat >>confdefs.h <<_ACEOF
28695#define HAVE_POSIX_SPAWNATTR_T 1
28696_ACEOF
28697
28698
28699else
28700 HAVE_POSIX_SPAWNATTR_T=0
28701fi
28702
28703 ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
28704#include <spawn.h>
28705
28706"
28707if test "x$ac_cv_type_posix_spawn_file_actions_t" = xyes; then :
28708
28709cat >>confdefs.h <<_ACEOF
28710#define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1
28711_ACEOF
28712
28713
28714else
28715 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
28716fi
28717
28718 else
28719 HAVE_SPAWN_H=0
28720 HAVE_POSIX_SPAWNATTR_T=0
28721 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
28722 fi
28723
28724
28725
28726
28727
28728
28729
28730
28731
28732
28733
28734 for gl_func in posix_spawn posix_spawnp posix_spawnattr_init posix_spawnattr_destroy posix_spawnattr_getsigdefault posix_spawnattr_setsigdefault posix_spawnattr_getsigmask posix_spawnattr_setsigmask posix_spawnattr_getflags posix_spawnattr_setflags posix_spawnattr_getpgroup posix_spawnattr_setpgroup posix_spawnattr_getschedpolicy posix_spawnattr_setschedpolicy posix_spawnattr_getschedparam posix_spawnattr_setschedparam posix_spawn_file_actions_init posix_spawn_file_actions_destroy posix_spawn_file_actions_addopen posix_spawn_file_actions_addclose posix_spawn_file_actions_adddup2; do
28735 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28737$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28738if eval \${$as_gl_Symbol+:} false; then :
28739 $as_echo_n "(cached) " >&6
28740else
28741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28742/* end confdefs.h. */
28743#include <spawn.h>
28744
28745int
28746main ()
28747{
28748#undef $gl_func
28749 (void) $gl_func;
28750 ;
28751 return 0;
28752}
28753_ACEOF
28754if ac_fn_c_try_compile "$LINENO"; then :
28755 eval "$as_gl_Symbol=yes"
28756else
28757 eval "$as_gl_Symbol=no"
28758fi
28759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28760fi
28761eval ac_res=\$$as_gl_Symbol
28762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28763$as_echo "$ac_res" >&6; }
28764 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28765 cat >>confdefs.h <<_ACEOF
28766#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28767_ACEOF
28768
28769 eval ac_cv_have_decl_$gl_func=yes
28770fi
28771 done
28772
28773
28774
28775
28776
28777
28778
28779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
28780$as_echo_n "checking for ssize_t... " >&6; }
28781if ${gt_cv_ssize_t+:} false; then :
28782 $as_echo_n "(cached) " >&6
28783else
28784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28785/* end confdefs.h. */
28786#include <sys/types.h>
28787int
28788main ()
28789{
28790int x = sizeof (ssize_t *) + sizeof (ssize_t);
28791 return !x;
28792 ;
28793 return 0;
28794}
28795_ACEOF
28796if ac_fn_c_try_compile "$LINENO"; then :
28797 gt_cv_ssize_t=yes
28798else
28799 gt_cv_ssize_t=no
28800fi
28801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28802fi
28803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
28804$as_echo "$gt_cv_ssize_t" >&6; }
28805 if test $gt_cv_ssize_t = no; then
28806
28807$as_echo "#define ssize_t int" >>confdefs.h
28808
28809 fi
28810
28811
28812
28813
28814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
28815$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
28816if ${gl_cv_func_stat_dir_slash+:} false; then :
28817 $as_echo_n "(cached) " >&6
28818else
28819 if test "$cross_compiling" = yes; then :
28820 case $host_os in
28821 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
28822 *) gl_cv_func_stat_dir_slash="guessing yes";;
28823 esac
28824else
28825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28826/* end confdefs.h. */
28827#include <sys/stat.h>
28828
28829int
28830main ()
28831{
28832struct stat st; return stat (".", &st) != stat ("./", &st);
28833 ;
28834 return 0;
28835}
28836_ACEOF
28837if ac_fn_c_try_run "$LINENO"; then :
28838 gl_cv_func_stat_dir_slash=yes
28839else
28840 gl_cv_func_stat_dir_slash=no
28841fi
28842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28843 conftest.$ac_objext conftest.beam conftest.$ac_ext
28844fi
28845
28846fi
28847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
28848$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
28849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28850$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28851if ${gl_cv_func_stat_file_slash+:} false; then :
28852 $as_echo_n "(cached) " >&6
28853else
28854 touch conftest.tmp
28855 # Assume that if we have lstat, we can also check symlinks.
28856 if test $ac_cv_func_lstat = yes; then
28857 ln -s conftest.tmp conftest.lnk
28858 fi
28859 if test "$cross_compiling" = yes; then :
28860 case "$host_os" in
28861 # Guess yes on glibc systems.
28862 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28863 # If we don't know, assume the worst.
28864 *) gl_cv_func_stat_file_slash="guessing no" ;;
28865 esac
28866
28867else
28868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28869/* end confdefs.h. */
28870#include <sys/stat.h>
28871
28872int
28873main ()
28874{
28875int result = 0;
28876 struct stat st;
28877 if (!stat ("conftest.tmp/", &st))
28878 result |= 1;
28879#if HAVE_LSTAT
28880 if (!stat ("conftest.lnk/", &st))
28881 result |= 2;
28882#endif
28883 return result;
28884
28885 ;
28886 return 0;
28887}
28888_ACEOF
28889if ac_fn_c_try_run "$LINENO"; then :
28890 gl_cv_func_stat_file_slash=yes
28891else
28892 gl_cv_func_stat_file_slash=no
28893fi
28894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28895 conftest.$ac_objext conftest.beam conftest.$ac_ext
28896fi
28897
28898 rm -f conftest.tmp conftest.lnk
28899fi
28900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28901$as_echo "$gl_cv_func_stat_file_slash" >&6; }
28902 case $gl_cv_func_stat_dir_slash in
28903 *no) REPLACE_STAT=1
28904
28905$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28906;;
28907 esac
28908 case $gl_cv_func_stat_file_slash in
28909 *no) REPLACE_STAT=1
28910
28911$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28912;;
28913 esac
28914
28915if test $REPLACE_STAT = 1; then
28916
28917
28918
28919
28920
28921
28922
28923
28924 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
28925
28926
28927
28928 :
28929
28930fi
28931
28932
28933
28934
28935
28936 GNULIB_STAT=1
28937
28938
28939
28940
28941
28942$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
28943
28944
28945
28946
28947
28948
28949
28950
28951 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
28952 #include <sys/stat.h>
28953"
28954if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
28955
28956cat >>confdefs.h <<_ACEOF
28957#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
28958_ACEOF
28959
28960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
28961$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
28962if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
28963 $as_echo_n "(cached) " >&6
28964else
28965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28966/* end confdefs.h. */
28967
28968 #include <sys/types.h>
28969 #include <sys/stat.h>
28970 #if HAVE_SYS_TIME_H
28971 # include <sys/time.h>
28972 #endif
28973 #include <time.h>
28974 struct timespec ts;
28975 struct stat st;
28976
28977int
28978main ()
28979{
28980
28981 st.st_atim = ts;
28982
28983 ;
28984 return 0;
28985}
28986_ACEOF
28987if ac_fn_c_try_compile "$LINENO"; then :
28988 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
28989else
28990 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
28991fi
28992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28993fi
28994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
28995$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
28996 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
28997
28998$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
28999
29000 fi
29001else
29002 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
29003 #include <sys/stat.h>
29004"
29005if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
29006
29007cat >>confdefs.h <<_ACEOF
29008#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
29009_ACEOF
29010
29011
29012else
29013 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
29014 #include <sys/stat.h>
29015"
29016if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
29017
29018cat >>confdefs.h <<_ACEOF
29019#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
29020_ACEOF
29021
29022
29023else
29024 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
29025 #include <sys/stat.h>
29026"
29027if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
29028
29029cat >>confdefs.h <<_ACEOF
29030#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
29031_ACEOF
29032
29033
29034fi
29035
29036fi
29037
29038fi
29039
29040fi
29041
29042
29043
29044
29045
29046
29047 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
29048 #include <sys/stat.h>
29049"
29050if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
29051
29052cat >>confdefs.h <<_ACEOF
29053#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
29054_ACEOF
29055
29056
29057else
29058 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
29059 #include <sys/stat.h>
29060"
29061if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
29062
29063cat >>confdefs.h <<_ACEOF
29064#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
29065_ACEOF
29066
29067
29068else
29069 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
29070 #include <sys/stat.h>
29071"
29072if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
29073
29074cat >>confdefs.h <<_ACEOF
29075#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
29076_ACEOF
29077
29078
29079fi
29080
29081fi
29082
29083fi
29084
29085
29086
29087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
29088$as_echo_n "checking for working stdalign.h... " >&6; }
29089if ${gl_cv_header_working_stdalign_h+:} false; then :
29090 $as_echo_n "(cached) " >&6
29091else
29092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29093/* end confdefs.h. */
29094#include <stdalign.h>
29095 #include <stddef.h>
29096
29097 /* Test that alignof yields a result consistent with offsetof.
29098 This catches GCC bug 52023
29099 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
29100 #ifdef __cplusplus
29101 template <class t> struct alignof_helper { char a; t b; };
29102 # define ao(type) offsetof (alignof_helper<type>, b)
29103 #else
29104 # define ao(type) offsetof (struct { char a; type b; }, b)
29105 #endif
29106 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
29107 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
29108 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
29109
29110 /* Test _Alignas only on platforms where gnulib can help. */
29111 #if \
29112 (__GNUC__ || __IBMC__ || __IBMCPP__ \
29113 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
29114 int alignas (8) alignas_int = 1;
29115 char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
29116 #endif
29117
29118int
29119main ()
29120{
29121
29122 ;
29123 return 0;
29124}
29125_ACEOF
29126if ac_fn_c_try_compile "$LINENO"; then :
29127 gl_cv_header_working_stdalign_h=yes
29128else
29129 gl_cv_header_working_stdalign_h=no
29130fi
29131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29132fi
29133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
29134$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
29135
29136 if test $gl_cv_header_working_stdalign_h = yes; then
29137 STDALIGN_H=''
29138 else
29139 STDALIGN_H='stdalign.h'
29140 fi
29141
29142
29143 if test -n "$STDALIGN_H"; then
29144 GL_GENERATE_STDALIGN_H_TRUE=
29145 GL_GENERATE_STDALIGN_H_FALSE='#'
29146else
29147 GL_GENERATE_STDALIGN_H_TRUE='#'
29148 GL_GENERATE_STDALIGN_H_FALSE=
29149fi
29150
29151
29152
29153
29154
29155 # Define two additional variables used in the Makefile substitution.
29156
29157 if test "$ac_cv_header_stdbool_h" = yes; then
29158 STDBOOL_H=''
29159 else
29160 STDBOOL_H='stdbool.h'
29161 fi
29162
29163 if test -n "$STDBOOL_H"; then
29164 GL_GENERATE_STDBOOL_H_TRUE=
29165 GL_GENERATE_STDBOOL_H_FALSE='#'
29166else
29167 GL_GENERATE_STDBOOL_H_TRUE='#'
29168 GL_GENERATE_STDBOOL_H_FALSE=
29169fi
29170
29171
29172 if test "$ac_cv_type__Bool" = yes; then
29173 HAVE__BOOL=1
29174 else
29175 HAVE__BOOL=0
29176 fi
29177
29178
29179
29180
29181
29182 STDDEF_H=
29183 if test $gt_cv_c_wchar_t = no; then
29184 HAVE_WCHAR_T=0
29185 STDDEF_H=stddef.h
29186 fi
29187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
29188$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
29189if ${gl_cv_decl_null_works+:} false; then :
29190 $as_echo_n "(cached) " >&6
29191else
29192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29193/* end confdefs.h. */
29194#include <stddef.h>
29195 int test[2 * (sizeof NULL == sizeof (void *)) -1];
29196
29197int
29198main ()
29199{
29200
29201 ;
29202 return 0;
29203}
29204_ACEOF
29205if ac_fn_c_try_compile "$LINENO"; then :
29206 gl_cv_decl_null_works=yes
29207else
29208 gl_cv_decl_null_works=no
29209fi
29210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29211fi
29212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
29213$as_echo "$gl_cv_decl_null_works" >&6; }
29214 if test $gl_cv_decl_null_works = no; then
29215 REPLACE_NULL=1
29216 STDDEF_H=stddef.h
29217 fi
29218
29219 if test -n "$STDDEF_H"; then
29220 GL_GENERATE_STDDEF_H_TRUE=
29221 GL_GENERATE_STDDEF_H_FALSE='#'
29222else
29223 GL_GENERATE_STDDEF_H_TRUE='#'
29224 GL_GENERATE_STDDEF_H_FALSE=
29225fi
29226
29227 if test -n "$STDDEF_H"; then
29228
29229
29230
29231
29232
29233
29234
29235
29236 if test $gl_cv_have_include_next = yes; then
29237 gl_cv_next_stddef_h='<'stddef.h'>'
29238 else
29239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
29240$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
29241if ${gl_cv_next_stddef_h+:} false; then :
29242 $as_echo_n "(cached) " >&6
29243else
29244
29245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29246/* end confdefs.h. */
29247#include <stddef.h>
29248
29249_ACEOF
29250 case "$host_os" in
29251 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29252 *) gl_absname_cpp="$ac_cpp" ;;
29253 esac
29254
29255 case "$host_os" in
29256 mingw*)
29257 gl_dirsep_regex='[/\\]'
29258 ;;
29259 *)
29260 gl_dirsep_regex='\/'
29261 ;;
29262 esac
29263 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29264
29265 gl_header_literal_regex=`echo 'stddef.h' \
29266 | sed -e "$gl_make_literal_regex_sed"`
29267 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29268 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29269 s|^/[^/]|//&|
29270 p
29271 q
29272 }'
29273 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29274 sed -n "$gl_absolute_header_sed"`'"'
29275
29276
29277fi
29278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
29279$as_echo "$gl_cv_next_stddef_h" >&6; }
29280 fi
29281 NEXT_STDDEF_H=$gl_cv_next_stddef_h
29282
29283 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29284 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29285 gl_next_as_first_directive='<'stddef.h'>'
29286 else
29287 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29288 gl_next_as_first_directive=$gl_cv_next_stddef_h
29289 fi
29290 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
29291
29292
29293
29294
29295 fi
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309 if test $gl_cv_have_include_next = yes; then
29310 gl_cv_next_stdio_h='<'stdio.h'>'
29311 else
29312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
29313$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
29314if ${gl_cv_next_stdio_h+:} false; then :
29315 $as_echo_n "(cached) " >&6
29316else
29317
29318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29319/* end confdefs.h. */
29320#include <stdio.h>
29321
29322_ACEOF
29323 case "$host_os" in
29324 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29325 *) gl_absname_cpp="$ac_cpp" ;;
29326 esac
29327
29328 case "$host_os" in
29329 mingw*)
29330 gl_dirsep_regex='[/\\]'
29331 ;;
29332 *)
29333 gl_dirsep_regex='\/'
29334 ;;
29335 esac
29336 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29337
29338 gl_header_literal_regex=`echo 'stdio.h' \
29339 | sed -e "$gl_make_literal_regex_sed"`
29340 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29341 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29342 s|^/[^/]|//&|
29343 p
29344 q
29345 }'
29346 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29347 sed -n "$gl_absolute_header_sed"`'"'
29348
29349
29350fi
29351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
29352$as_echo "$gl_cv_next_stdio_h" >&6; }
29353 fi
29354 NEXT_STDIO_H=$gl_cv_next_stdio_h
29355
29356 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29357 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29358 gl_next_as_first_directive='<'stdio.h'>'
29359 else
29360 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29361 gl_next_as_first_directive=$gl_cv_next_stdio_h
29362 fi
29363 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
29364
29365
29366
29367
29368
29369 GNULIB_FSCANF=1
29370
29371
29372cat >>confdefs.h <<_ACEOF
29373#define GNULIB_FSCANF 1
29374_ACEOF
29375
29376
29377 GNULIB_SCANF=1
29378
29379
29380cat >>confdefs.h <<_ACEOF
29381#define GNULIB_SCANF 1
29382_ACEOF
29383
29384
29385 GNULIB_FGETC=1
29386 GNULIB_GETC=1
29387 GNULIB_GETCHAR=1
29388 GNULIB_FGETS=1
29389 GNULIB_FREAD=1
29390
29391
29392 GNULIB_FPRINTF=1
29393 GNULIB_PRINTF=1
29394 GNULIB_VFPRINTF=1
29395 GNULIB_VPRINTF=1
29396 GNULIB_FPUTC=1
29397 GNULIB_PUTC=1
29398 GNULIB_PUTCHAR=1
29399 GNULIB_FPUTS=1
29400 GNULIB_PUTS=1
29401 GNULIB_FWRITE=1
29402
29403
29404
29405
29406 if test $gl_cv_header_signal_h_SIGPIPE != yes; then
29407 REPLACE_STDIO_WRITE_FUNCS=1
29408
29409
29410
29411
29412
29413
29414
29415
29416 gl_LIBOBJS="$gl_LIBOBJS stdio-write.$ac_objext"
29417
29418 fi
29419
29420
29421
29422
29423 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
29424 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29426$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29427if eval \${$as_gl_Symbol+:} false; then :
29428 $as_echo_n "(cached) " >&6
29429else
29430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29431/* end confdefs.h. */
29432#include <stdio.h>
29433
29434int
29435main ()
29436{
29437#undef $gl_func
29438 (void) $gl_func;
29439 ;
29440 return 0;
29441}
29442_ACEOF
29443if ac_fn_c_try_compile "$LINENO"; then :
29444 eval "$as_gl_Symbol=yes"
29445else
29446 eval "$as_gl_Symbol=no"
29447fi
29448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29449fi
29450eval ac_res=\$$as_gl_Symbol
29451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29452$as_echo "$ac_res" >&6; }
29453 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29454 cat >>confdefs.h <<_ACEOF
29455#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29456_ACEOF
29457
29458 eval ac_cv_have_decl_$gl_func=yes
29459fi
29460 done
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473 if test $gl_cv_have_include_next = yes; then
29474 gl_cv_next_stdlib_h='<'stdlib.h'>'
29475 else
29476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
29477$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
29478if ${gl_cv_next_stdlib_h+:} false; then :
29479 $as_echo_n "(cached) " >&6
29480else
29481
29482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29483/* end confdefs.h. */
29484#include <stdlib.h>
29485
29486_ACEOF
29487 case "$host_os" in
29488 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29489 *) gl_absname_cpp="$ac_cpp" ;;
29490 esac
29491
29492 case "$host_os" in
29493 mingw*)
29494 gl_dirsep_regex='[/\\]'
29495 ;;
29496 *)
29497 gl_dirsep_regex='\/'
29498 ;;
29499 esac
29500 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29501
29502 gl_header_literal_regex=`echo 'stdlib.h' \
29503 | sed -e "$gl_make_literal_regex_sed"`
29504 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29505 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29506 s|^/[^/]|//&|
29507 p
29508 q
29509 }'
29510 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29511 sed -n "$gl_absolute_header_sed"`'"'
29512
29513
29514fi
29515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
29516$as_echo "$gl_cv_next_stdlib_h" >&6; }
29517 fi
29518 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
29519
29520 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29521 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29522 gl_next_as_first_directive='<'stdlib.h'>'
29523 else
29524 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29525 gl_next_as_first_directive=$gl_cv_next_stdlib_h
29526 fi
29527 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
29528
29529
29530
29531
29532
29533
29534 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 random random_r realpath rpmatch setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
29535 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29537$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29538if eval \${$as_gl_Symbol+:} false; then :
29539 $as_echo_n "(cached) " >&6
29540else
29541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29542/* end confdefs.h. */
29543#include <stdlib.h>
29544#if HAVE_SYS_LOADAVG_H
29545# include <sys/loadavg.h>
29546#endif
29547#if HAVE_RANDOM_H
29548# include <random.h>
29549#endif
29550
29551int
29552main ()
29553{
29554#undef $gl_func
29555 (void) $gl_func;
29556 ;
29557 return 0;
29558}
29559_ACEOF
29560if ac_fn_c_try_compile "$LINENO"; then :
29561 eval "$as_gl_Symbol=yes"
29562else
29563 eval "$as_gl_Symbol=no"
29564fi
29565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29566fi
29567eval ac_res=\$$as_gl_Symbol
29568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29569$as_echo "$ac_res" >&6; }
29570 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29571 cat >>confdefs.h <<_ACEOF
29572#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29573_ACEOF
29574
29575 eval ac_cv_have_decl_$gl_func=yes
29576fi
29577 done
29578
29579
29580
29581
29582
29583 for ac_func in strcasecmp
29584do :
29585 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
29586if test "x$ac_cv_func_strcasecmp" = xyes; then :
29587 cat >>confdefs.h <<_ACEOF
29588#define HAVE_STRCASECMP 1
29589_ACEOF
29590
29591fi
29592done
29593
29594 if test $ac_cv_func_strcasecmp = no; then
29595 HAVE_STRCASECMP=0
29596 fi
29597
29598
29599
29600 for ac_func in strncasecmp
29601do :
29602 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
29603if test "x$ac_cv_func_strncasecmp" = xyes; then :
29604 cat >>confdefs.h <<_ACEOF
29605#define HAVE_STRNCASECMP 1
29606_ACEOF
29607
29608fi
29609done
29610
29611 if test $ac_cv_func_strncasecmp = yes; then
29612 HAVE_STRNCASECMP=1
29613 else
29614 HAVE_STRNCASECMP=0
29615 fi
29616 ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
29617if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
29618 ac_have_decl=1
29619else
29620 ac_have_decl=0
29621fi
29622
29623cat >>confdefs.h <<_ACEOF
29624#define HAVE_DECL_STRNCASECMP $ac_have_decl
29625_ACEOF
29626
29627 if test $ac_cv_have_decl_strncasecmp = no; then
29628 HAVE_DECL_STRNCASECMP=0
29629 fi
29630
29631
29632if test $HAVE_STRCASECMP = 0; then
29633
29634
29635
29636
29637
29638
29639
29640
29641 gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
29642
29643
29644 :
29645
29646fi
29647if test $HAVE_STRNCASECMP = 0; then
29648
29649
29650
29651
29652
29653
29654
29655
29656 gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
29657
29658
29659 :
29660
29661fi
29662
29663
29664 if test $HAVE_STRCASESTR = 1 && test $REPLACE_STRCASESTR = 0; then
29665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works in linear time" >&5
29666$as_echo_n "checking whether strcasestr works in linear time... " >&6; }
29667if ${gl_cv_func_strcasestr_linear+:} false; then :
29668 $as_echo_n "(cached) " >&6
29669else
29670 if test "$cross_compiling" = yes; then :
29671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29672/* end confdefs.h. */
29673
29674#include <features.h>
29675#ifdef __GNU_LIBRARY__
29676 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
29677 && !defined __UCLIBC__
29678 Lucky user
29679 #endif
29680#endif
29681#ifdef __CYGWIN__
29682 #include <cygwin/version.h>
29683 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
29684 Lucky user
29685 #endif
29686#endif
29687
29688_ACEOF
29689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29690 $EGREP "Lucky user" >/dev/null 2>&1; then :
29691 gl_cv_func_strcasestr_linear="guessing yes"
29692else
29693 gl_cv_func_strcasestr_linear="guessing no"
29694fi
29695rm -f conftest*
29696
29697
29698else
29699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29700/* end confdefs.h. */
29701
29702#include <signal.h> /* for signal */
29703#include <string.h> /* for strcasestr */
29704#include <stdlib.h> /* for malloc */
29705#include <unistd.h> /* for alarm */
29706static void quit (int sig) { exit (sig + 128); }
29707
29708int
29709main ()
29710{
29711
29712 int result = 0;
29713 size_t m = 1000000;
29714 char *haystack = (char *) malloc (2 * m + 2);
29715 char *needle = (char *) malloc (m + 2);
29716 /* Failure to compile this test due to missing alarm is okay,
29717 since all such platforms (mingw) also lack strcasestr. */
29718 signal (SIGALRM, quit);
29719 alarm (5);
29720 /* Check for quadratic performance. */
29721 if (haystack && needle)
29722 {
29723 memset (haystack, 'A', 2 * m);
29724 haystack[2 * m] = 'B';
29725 haystack[2 * m + 1] = 0;
29726 memset (needle, 'A', m);
29727 needle[m] = 'B';
29728 needle[m + 1] = 0;
29729 if (!strcasestr (haystack, needle))
29730 result |= 1;
29731 }
29732 return result;
29733
29734 ;
29735 return 0;
29736}
29737_ACEOF
29738if ac_fn_c_try_run "$LINENO"; then :
29739 gl_cv_func_strcasestr_linear=yes
29740else
29741 gl_cv_func_strcasestr_linear=no
29742fi
29743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29744 conftest.$ac_objext conftest.beam conftest.$ac_ext
29745fi
29746
29747
29748fi
29749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_linear" >&5
29750$as_echo "$gl_cv_func_strcasestr_linear" >&6; }
29751 case "$gl_cv_func_strcasestr_linear" in
29752 *yes) ;;
29753 *)
29754 REPLACE_STRCASESTR=1
29755 ;;
29756 esac
29757 fi
29758
29759if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then
29760
29761
29762
29763
29764
29765
29766
29767
29768 gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext"
29769
29770
29771 :
29772
29773fi
29774
29775
29776
29777
29778
29779
29780 for ac_func in strcasestr
29781do :
29782 ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
29783if test "x$ac_cv_func_strcasestr" = xyes; then :
29784 cat >>confdefs.h <<_ACEOF
29785#define HAVE_STRCASESTR 1
29786_ACEOF
29787
29788fi
29789done
29790
29791 if test $ac_cv_func_strcasestr = no; then
29792 HAVE_STRCASESTR=0
29793 else
29794 if test "$gl_cv_func_memchr_works" != yes; then
29795 REPLACE_STRCASESTR=1
29796 else
29797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works" >&5
29798$as_echo_n "checking whether strcasestr works... " >&6; }
29799if ${gl_cv_func_strcasestr_works_always+:} false; then :
29800 $as_echo_n "(cached) " >&6
29801else
29802 if test "$cross_compiling" = yes; then :
29803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29804/* end confdefs.h. */
29805
29806#ifdef __GNU_LIBRARY__
29807 #include <features.h>
29808 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
29809 || defined __UCLIBC__
29810 Lucky user
29811 #endif
29812#elif defined __CYGWIN__
29813 #include <cygwin/version.h>
29814 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
29815 Lucky user
29816 #endif
29817#else
29818 Lucky user
29819#endif
29820
29821_ACEOF
29822if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29823 $EGREP "Lucky user" >/dev/null 2>&1; then :
29824 gl_cv_func_strcasestr_works_always="guessing yes"
29825else
29826 gl_cv_func_strcasestr_works_always="guessing no"
29827fi
29828rm -f conftest*
29829
29830
29831else
29832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29833/* end confdefs.h. */
29834
29835#include <string.h> /* for strcasestr */
29836#define P "_EF_BF_BD"
29837#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
29838#define NEEDLE P P P P P
29839
29840int
29841main ()
29842{
29843return !!strcasestr (HAYSTACK, NEEDLE);
29844
29845 ;
29846 return 0;
29847}
29848_ACEOF
29849if ac_fn_c_try_run "$LINENO"; then :
29850 gl_cv_func_strcasestr_works_always=yes
29851else
29852 gl_cv_func_strcasestr_works_always=no
29853fi
29854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29855 conftest.$ac_objext conftest.beam conftest.$ac_ext
29856fi
29857
29858
29859fi
29860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_works_always" >&5
29861$as_echo "$gl_cv_func_strcasestr_works_always" >&6; }
29862 case "$gl_cv_func_strcasestr_works_always" in
29863 *yes) ;;
29864 *)
29865 REPLACE_STRCASESTR=1
29866 ;;
29867 esac
29868 fi
29869 fi
29870
29871if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then
29872
29873
29874
29875
29876
29877
29878
29879
29880 gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext"
29881
29882
29883 :
29884
29885fi
29886
29887
29888
29889
29890
29891 GNULIB_STRCASESTR=1
29892
29893
29894
29895
29896
29897$as_echo "#define GNULIB_TEST_STRCASESTR 1" >>confdefs.h
29898
29899
29900
29901
29902
29903
29904
29905 for ac_func in strchrnul
29906do :
29907 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
29908if test "x$ac_cv_func_strchrnul" = xyes; then :
29909 cat >>confdefs.h <<_ACEOF
29910#define HAVE_STRCHRNUL 1
29911_ACEOF
29912
29913fi
29914done
29915
29916 if test $ac_cv_func_strchrnul = no; then
29917 HAVE_STRCHRNUL=0
29918 else
29919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
29920$as_echo_n "checking whether strchrnul works... " >&6; }
29921if ${gl_cv_func_strchrnul_works+:} false; then :
29922 $as_echo_n "(cached) " >&6
29923else
29924 if test "$cross_compiling" = yes; then :
29925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29926/* end confdefs.h. */
29927
29928#if defined __CYGWIN__
29929 #include <cygwin/version.h>
29930 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
29931 Lucky user
29932 #endif
29933#else
29934 Lucky user
29935#endif
29936
29937_ACEOF
29938if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29939 $EGREP "Lucky user" >/dev/null 2>&1; then :
29940 gl_cv_func_strchrnul_works="guessing yes"
29941else
29942 gl_cv_func_strchrnul_works="guessing no"
29943fi
29944rm -f conftest*
29945
29946
29947else
29948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29949/* end confdefs.h. */
29950
29951#include <string.h> /* for strchrnul */
29952
29953int
29954main ()
29955{
29956const char *buf = "a";
29957 return strchrnul (buf, 'b') != buf + 1;
29958
29959 ;
29960 return 0;
29961}
29962_ACEOF
29963if ac_fn_c_try_run "$LINENO"; then :
29964 gl_cv_func_strchrnul_works=yes
29965else
29966 gl_cv_func_strchrnul_works=no
29967fi
29968rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29969 conftest.$ac_objext conftest.beam conftest.$ac_ext
29970fi
29971
29972
29973fi
29974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
29975$as_echo "$gl_cv_func_strchrnul_works" >&6; }
29976 case "$gl_cv_func_strchrnul_works" in
29977 *yes) ;;
29978 *) REPLACE_STRCHRNUL=1 ;;
29979 esac
29980 fi
29981
29982if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
29983
29984
29985
29986
29987
29988
29989
29990
29991 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
29992
29993 :
29994fi
29995
29996
29997
29998
29999
30000 GNULIB_STRCHRNUL=1
30001
30002
30003
30004
30005
30006$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
30007
30008
30009
30010
30011
30012
30013
30014
30015
30016
30017 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
30018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
30019$as_echo_n "checking for working strerror function... " >&6; }
30020if ${gl_cv_func_working_strerror+:} false; then :
30021 $as_echo_n "(cached) " >&6
30022else
30023 if test "$cross_compiling" = yes; then :
30024 case "$host_os" in
30025 # Guess yes on glibc systems.
30026 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
30027 # If we don't know, assume the worst.
30028 *) gl_cv_func_working_strerror="guessing no" ;;
30029 esac
30030
30031else
30032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30033/* end confdefs.h. */
30034#include <string.h>
30035
30036int
30037main ()
30038{
30039if (!*strerror (-2)) return 1;
30040 ;
30041 return 0;
30042}
30043_ACEOF
30044if ac_fn_c_try_run "$LINENO"; then :
30045 gl_cv_func_working_strerror=yes
30046else
30047 gl_cv_func_working_strerror=no
30048fi
30049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30050 conftest.$ac_objext conftest.beam conftest.$ac_ext
30051fi
30052
30053
30054fi
30055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
30056$as_echo "$gl_cv_func_working_strerror" >&6; }
30057 case "$gl_cv_func_working_strerror" in
30058 *yes) ;;
30059 *)
30060 REPLACE_STRERROR=1
30061 ;;
30062 esac
30063
30064 case "$gl_cv_func_strerror_r_works" in
30065 *no) REPLACE_STRERROR=1 ;;
30066 esac
30067
30068 else
30069 REPLACE_STRERROR=1
30070 fi
30071
30072if test $REPLACE_STRERROR = 1; then
30073
30074
30075
30076
30077
30078
30079
30080
30081 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
30082
30083fi
30084
30085
30086cat >>confdefs.h <<_ACEOF
30087#define GNULIB_STRERROR 1
30088_ACEOF
30089
30090
30091
30092
30093
30094
30095
30096 GNULIB_STRERROR=1
30097
30098
30099
30100
30101
30102$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
30103
30104
30105
30106
30107
30108if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
30109
30110
30111
30112
30113
30114
30115
30116
30117 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
30118
30119
30120
30121
30122
30123 if test $ac_cv_header_sys_socket_h != yes; then
30124 for ac_header in winsock2.h
30125do :
30126 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
30127if test "x$ac_cv_header_winsock2_h" = xyes; then :
30128 cat >>confdefs.h <<_ACEOF
30129#define HAVE_WINSOCK2_H 1
30130_ACEOF
30131
30132fi
30133
30134done
30135
30136 fi
30137 if test "$ac_cv_header_winsock2_h" = yes; then
30138 HAVE_WINSOCK2_H=1
30139 UNISTD_H_HAVE_WINSOCK2_H=1
30140 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
30141 else
30142 HAVE_WINSOCK2_H=0
30143 fi
30144
30145
30146fi
30147
30148
30149
30150
30151
30152
30153
30154 if test $ac_cv_have_decl_strerror_r = no; then
30155 HAVE_DECL_STRERROR_R=0
30156 fi
30157
30158 if test $ac_cv_func_strerror_r = yes; then
30159 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
30160 if test $gl_cv_func_strerror_r_posix_signature = yes; then
30161 case "$gl_cv_func_strerror_r_works" in
30162 *no) REPLACE_STRERROR_R=1 ;;
30163 esac
30164 else
30165 REPLACE_STRERROR_R=1
30166 fi
30167 else
30168 REPLACE_STRERROR_R=1
30169 fi
30170 fi
30171
30172if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
30173
30174
30175
30176
30177
30178
30179
30180
30181 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
30182
30183
30184
30185
30186
30187
30188fi
30189
30190
30191
30192
30193
30194 GNULIB_STRERROR_R=1
30195
30196
30197
30198
30199
30200$as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214 for ac_func in strtok_r
30215do :
30216 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
30217if test "x$ac_cv_func_strtok_r" = xyes; then :
30218 cat >>confdefs.h <<_ACEOF
30219#define HAVE_STRTOK_R 1
30220_ACEOF
30221
30222fi
30223done
30224
30225 if test $ac_cv_func_strtok_r = yes; then
30226 HAVE_STRTOK_R=1
30227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
30228$as_echo_n "checking whether strtok_r works... " >&6; }
30229if ${gl_cv_func_strtok_r_works+:} false; then :
30230 $as_echo_n "(cached) " >&6
30231else
30232 if test "$cross_compiling" = yes; then :
30233
30234 case "$host_os" in
30235 # Guess no on glibc systems.
30236 *-gnu*) gl_cv_func_strtok_r_works="guessing no";;
30237 *) gl_cv_func_strtok_r_works="guessing yes";;
30238 esac
30239
30240else
30241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30242/* end confdefs.h. */
30243
30244 #ifndef __OPTIMIZE__
30245 # define __OPTIMIZE__ 1
30246 #endif
30247 #undef __OPTIMIZE_SIZE__
30248 #undef __NO_INLINE__
30249 #include <stdlib.h>
30250 #include <string.h>
30251
30252int
30253main ()
30254{
30255static const char dummy[] = "\177\01a";
30256 char delimiters[] = "xxxxxxxx";
30257 char *save_ptr = (char *) dummy;
30258 strtok_r (delimiters, "x", &save_ptr);
30259 strtok_r (NULL, "x", &save_ptr);
30260 return 0;
30261
30262 ;
30263 return 0;
30264}
30265
30266_ACEOF
30267if ac_fn_c_try_run "$LINENO"; then :
30268 gl_cv_func_strtok_r_works=yes
30269else
30270 gl_cv_func_strtok_r_works=no
30271fi
30272rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30273 conftest.$ac_objext conftest.beam conftest.$ac_ext
30274fi
30275
30276
30277fi
30278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
30279$as_echo "$gl_cv_func_strtok_r_works" >&6; }
30280 case "$gl_cv_func_strtok_r_works" in
30281 *no)
30282 UNDEFINE_STRTOK_R=1
30283 ;;
30284 esac
30285 else
30286 HAVE_STRTOK_R=0
30287 fi
30288
30289 if test $ac_cv_have_decl_strtok_r = no; then
30290 HAVE_DECL_STRTOK_R=0
30291 fi
30292
30293if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
30294
30295
30296
30297
30298
30299
30300
30301
30302 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
30303
30304
30305 :
30306
30307fi
30308
30309
30310
30311
30312
30313 GNULIB_STRTOK_R=1
30314
30315
30316
30317
30318
30319$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
30320
30321
30322
30323
30324
30325
30326
30327 if test $ac_cv_header_sys_ioctl_h = yes; then
30328 HAVE_SYS_IOCTL_H=1
30329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
30330$as_echo_n "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
30331if ${gl_cv_decl_ioctl_in_sys_ioctl_h+:} false; then :
30332 $as_echo_n "(cached) " >&6
30333else
30334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30335/* end confdefs.h. */
30336#include <sys/ioctl.h>
30337
30338int
30339main ()
30340{
30341(void) ioctl;
30342 ;
30343 return 0;
30344}
30345_ACEOF
30346if ac_fn_c_try_compile "$LINENO"; then :
30347 gl_cv_decl_ioctl_in_sys_ioctl_h=yes
30348else
30349 gl_cv_decl_ioctl_in_sys_ioctl_h=no
30350fi
30351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30352
30353fi
30354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
30355$as_echo "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
30356 else
30357 HAVE_SYS_IOCTL_H=0
30358 fi
30359
30360
30361
30362
30363
30364
30365
30366
30367
30368
30369 if test $gl_cv_have_include_next = yes; then
30370 gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
30371 else
30372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
30373$as_echo_n "checking absolute name of <sys/ioctl.h>... " >&6; }
30374if ${gl_cv_next_sys_ioctl_h+:} false; then :
30375 $as_echo_n "(cached) " >&6
30376else
30377
30378 if test $ac_cv_header_sys_ioctl_h = yes; then
30379
30380
30381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30382/* end confdefs.h. */
30383#include <sys/ioctl.h>
30384
30385_ACEOF
30386 case "$host_os" in
30387 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30388 *) gl_absname_cpp="$ac_cpp" ;;
30389 esac
30390
30391 case "$host_os" in
30392 mingw*)
30393 gl_dirsep_regex='[/\\]'
30394 ;;
30395 *)
30396 gl_dirsep_regex='\/'
30397 ;;
30398 esac
30399 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30400
30401 gl_header_literal_regex=`echo 'sys/ioctl.h' \
30402 | sed -e "$gl_make_literal_regex_sed"`
30403 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30404 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30405 s|^/[^/]|//&|
30406 p
30407 q
30408 }'
30409 gl_cv_next_sys_ioctl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30410 sed -n "$gl_absolute_header_sed"`'"'
30411 else
30412 gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
30413 fi
30414
30415
30416fi
30417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
30418$as_echo "$gl_cv_next_sys_ioctl_h" >&6; }
30419 fi
30420 NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
30421
30422 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30423 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30424 gl_next_as_first_directive='<'sys/ioctl.h'>'
30425 else
30426 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30427 gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
30428 fi
30429 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
30430
30431
30432
30433
30434
30435
30436 for gl_func in ioctl; do
30437 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
30438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
30439$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
30440if eval \${$as_gl_Symbol+:} false; then :
30441 $as_echo_n "(cached) " >&6
30442else
30443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30444/* end confdefs.h. */
30445#include <sys/ioctl.h>
30446/* Some platforms declare ioctl in the wrong header. */
30447#if !(defined __GLIBC__ && !defined __UCLIBC__)
30448# include <unistd.h>
30449#endif
30450
30451int
30452main ()
30453{
30454#undef $gl_func
30455 (void) $gl_func;
30456 ;
30457 return 0;
30458}
30459_ACEOF
30460if ac_fn_c_try_compile "$LINENO"; then :
30461 eval "$as_gl_Symbol=yes"
30462else
30463 eval "$as_gl_Symbol=no"
30464fi
30465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30466fi
30467eval ac_res=\$$as_gl_Symbol
30468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30469$as_echo "$ac_res" >&6; }
30470 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
30471 cat >>confdefs.h <<_ACEOF
30472#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
30473_ACEOF
30474
30475 eval ac_cv_have_decl_$gl_func=yes
30476fi
30477 done
30478
30479
30480
30481
30482
30483
30484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
30485$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
30486if ${gl_cv_header_sys_select_h_selfcontained+:} false; then :
30487 $as_echo_n "(cached) " >&6
30488else
30489
30490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30491/* end confdefs.h. */
30492#include <sys/select.h>
30493int
30494main ()
30495{
30496struct timeval b;
30497 ;
30498 return 0;
30499}
30500_ACEOF
30501if ac_fn_c_try_compile "$LINENO"; then :
30502 gl_cv_header_sys_select_h_selfcontained=yes
30503else
30504 gl_cv_header_sys_select_h_selfcontained=no
30505fi
30506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30507 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
30508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30509/* end confdefs.h. */
30510#include <sys/select.h>
30511int
30512main ()
30513{
30514int memset; int bzero;
30515 ;
30516 return 0;
30517}
30518
30519_ACEOF
30520if ac_fn_c_try_compile "$LINENO"; then :
30521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30522/* end confdefs.h. */
30523#include <sys/select.h>
30524int
30525main ()
30526{
30527
30528 #undef memset
30529 #define memset nonexistent_memset
30530 extern
30531 #ifdef __cplusplus
30532 "C"
30533 #endif
30534 void *memset (void *, int, unsigned long);
30535 #undef bzero
30536 #define bzero nonexistent_bzero
30537 extern
30538 #ifdef __cplusplus
30539 "C"
30540 #endif
30541 void bzero (void *, unsigned long);
30542 fd_set fds;
30543 FD_ZERO (&fds);
30544
30545 ;
30546 return 0;
30547}
30548
30549_ACEOF
30550if ac_fn_c_try_link "$LINENO"; then :
30551
30552else
30553 gl_cv_header_sys_select_h_selfcontained=no
30554fi
30555rm -f core conftest.err conftest.$ac_objext \
30556 conftest$ac_exeext conftest.$ac_ext
30557
30558fi
30559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30560 fi
30561
30562fi
30563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
30564$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
30565
30566
30567
30568
30569
30570
30571
30572
30573
30574 if test $gl_cv_have_include_next = yes; then
30575 gl_cv_next_sys_select_h='<'sys/select.h'>'
30576 else
30577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
30578$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
30579if ${gl_cv_next_sys_select_h+:} false; then :
30580 $as_echo_n "(cached) " >&6
30581else
30582
30583 if test $ac_cv_header_sys_select_h = yes; then
30584
30585
30586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30587/* end confdefs.h. */
30588#include <sys/select.h>
30589
30590_ACEOF
30591 case "$host_os" in
30592 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30593 *) gl_absname_cpp="$ac_cpp" ;;
30594 esac
30595
30596 case "$host_os" in
30597 mingw*)
30598 gl_dirsep_regex='[/\\]'
30599 ;;
30600 *)
30601 gl_dirsep_regex='\/'
30602 ;;
30603 esac
30604 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30605
30606 gl_header_literal_regex=`echo 'sys/select.h' \
30607 | sed -e "$gl_make_literal_regex_sed"`
30608 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30609 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30610 s|^/[^/]|//&|
30611 p
30612 q
30613 }'
30614 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30615 sed -n "$gl_absolute_header_sed"`'"'
30616 else
30617 gl_cv_next_sys_select_h='<'sys/select.h'>'
30618 fi
30619
30620
30621fi
30622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
30623$as_echo "$gl_cv_next_sys_select_h" >&6; }
30624 fi
30625 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
30626
30627 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30628 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30629 gl_next_as_first_directive='<'sys/select.h'>'
30630 else
30631 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30632 gl_next_as_first_directive=$gl_cv_next_sys_select_h
30633 fi
30634 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
30635
30636
30637
30638
30639 if test $ac_cv_header_sys_select_h = yes; then
30640 HAVE_SYS_SELECT_H=1
30641 else
30642 HAVE_SYS_SELECT_H=0
30643 fi
30644
30645
30646
30647
30648
30649 if test $ac_cv_header_sys_socket_h != yes; then
30650 for ac_header in winsock2.h
30651do :
30652 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
30653if test "x$ac_cv_header_winsock2_h" = xyes; then :
30654 cat >>confdefs.h <<_ACEOF
30655#define HAVE_WINSOCK2_H 1
30656_ACEOF
30657
30658fi
30659
30660done
30661
30662 fi
30663 if test "$ac_cv_header_winsock2_h" = yes; then
30664 HAVE_WINSOCK2_H=1
30665 UNISTD_H_HAVE_WINSOCK2_H=1
30666 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
30667 else
30668 HAVE_WINSOCK2_H=0
30669 fi
30670
30671
30672
30673
30674 for gl_func in pselect select; do
30675 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
30676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
30677$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
30678if eval \${$as_gl_Symbol+:} false; then :
30679 $as_echo_n "(cached) " >&6
30680else
30681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30682/* end confdefs.h. */
30683
30684/* Some systems require prerequisite headers. */
30685#include <sys/types.h>
30686#if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H
30687# include <sys/time.h>
30688#endif
30689#include <sys/select.h>
30690
30691int
30692main ()
30693{
30694#undef $gl_func
30695 (void) $gl_func;
30696 ;
30697 return 0;
30698}
30699_ACEOF
30700if ac_fn_c_try_compile "$LINENO"; then :
30701 eval "$as_gl_Symbol=yes"
30702else
30703 eval "$as_gl_Symbol=no"
30704fi
30705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30706fi
30707eval ac_res=\$$as_gl_Symbol
30708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30709$as_echo "$ac_res" >&6; }
30710 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
30711 cat >>confdefs.h <<_ACEOF
30712#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
30713_ACEOF
30714
30715 eval ac_cv_have_decl_$gl_func=yes
30716fi
30717 done
30718
30719
30720
30721
30722
30723
30724
30725
30726 case "$host_os" in
30727 osf*)
30728
30729$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
30730
30731 ;;
30732 esac
30733
30734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
30735$as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
30736if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
30737 $as_echo_n "(cached) " >&6
30738else
30739
30740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30741/* end confdefs.h. */
30742#include <sys/socket.h>
30743int
30744main ()
30745{
30746
30747 ;
30748 return 0;
30749}
30750_ACEOF
30751if ac_fn_c_try_compile "$LINENO"; then :
30752 gl_cv_header_sys_socket_h_selfcontained=yes
30753else
30754 gl_cv_header_sys_socket_h_selfcontained=no
30755fi
30756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30757
30758fi
30759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
30760$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
30761 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
30762 for ac_func in shutdown
30763do :
30764 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
30765if test "x$ac_cv_func_shutdown" = xyes; then :
30766 cat >>confdefs.h <<_ACEOF
30767#define HAVE_SHUTDOWN 1
30768_ACEOF
30769
30770fi
30771done
30772
30773 if test $ac_cv_func_shutdown = yes; then
30774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
30775$as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
30776if ${gl_cv_header_sys_socket_h_shut+:} false; then :
30777 $as_echo_n "(cached) " >&6
30778else
30779
30780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30781/* end confdefs.h. */
30782#include <sys/socket.h>
30783int
30784main ()
30785{
30786int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
30787 ;
30788 return 0;
30789}
30790_ACEOF
30791if ac_fn_c_try_compile "$LINENO"; then :
30792 gl_cv_header_sys_socket_h_shut=yes
30793else
30794 gl_cv_header_sys_socket_h_shut=no
30795fi
30796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30797
30798fi
30799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
30800$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
30801 if test $gl_cv_header_sys_socket_h_shut = no; then
30802 SYS_SOCKET_H='sys/socket.h'
30803 fi
30804 fi
30805 fi
30806 # We need to check for ws2tcpip.h now.
30807
30808
30809
30810
30811
30812
30813
30814
30815
30816
30817
30818 if test $gl_cv_have_include_next = yes; then
30819 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
30820 else
30821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
30822$as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
30823if ${gl_cv_next_sys_socket_h+:} false; then :
30824 $as_echo_n "(cached) " >&6
30825else
30826
30827 if test $ac_cv_header_sys_socket_h = yes; then
30828
30829
30830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30831/* end confdefs.h. */
30832#include <sys/socket.h>
30833
30834_ACEOF
30835 case "$host_os" in
30836 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30837 *) gl_absname_cpp="$ac_cpp" ;;
30838 esac
30839
30840 case "$host_os" in
30841 mingw*)
30842 gl_dirsep_regex='[/\\]'
30843 ;;
30844 *)
30845 gl_dirsep_regex='\/'
30846 ;;
30847 esac
30848 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30849
30850 gl_header_literal_regex=`echo 'sys/socket.h' \
30851 | sed -e "$gl_make_literal_regex_sed"`
30852 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30853 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30854 s|^/[^/]|//&|
30855 p
30856 q
30857 }'
30858 gl_cv_next_sys_socket_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30859 sed -n "$gl_absolute_header_sed"`'"'
30860 else
30861 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
30862 fi
30863
30864
30865fi
30866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
30867$as_echo "$gl_cv_next_sys_socket_h" >&6; }
30868 fi
30869 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
30870
30871 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30872 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30873 gl_next_as_first_directive='<'sys/socket.h'>'
30874 else
30875 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30876 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
30877 fi
30878 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
30879
30880
30881
30882
30883 if test $ac_cv_header_sys_socket_h = yes; then
30884 HAVE_SYS_SOCKET_H=1
30885 HAVE_WS2TCPIP_H=0
30886 else
30887 HAVE_SYS_SOCKET_H=0
30888 if test $ac_cv_header_ws2tcpip_h = yes; then
30889 HAVE_WS2TCPIP_H=1
30890 else
30891 HAVE_WS2TCPIP_H=0
30892 fi
30893 fi
30894
30895
30896
30897 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
30898 /* sys/types.h is not needed according to POSIX, but the
30899 sys/socket.h in i386-unknown-freebsd4.10 and
30900 powerpc-apple-darwin5.5 required it. */
30901#include <sys/types.h>
30902#ifdef HAVE_SYS_SOCKET_H
30903#include <sys/socket.h>
30904#endif
30905#ifdef HAVE_WS2TCPIP_H
30906#include <ws2tcpip.h>
30907#endif
30908
30909"
30910if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
30911
30912cat >>confdefs.h <<_ACEOF
30913#define HAVE_STRUCT_SOCKADDR_STORAGE 1
30914_ACEOF
30915
30916
30917fi
30918ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
30919 /* sys/types.h is not needed according to POSIX, but the
30920 sys/socket.h in i386-unknown-freebsd4.10 and
30921 powerpc-apple-darwin5.5 required it. */
30922#include <sys/types.h>
30923#ifdef HAVE_SYS_SOCKET_H
30924#include <sys/socket.h>
30925#endif
30926#ifdef HAVE_WS2TCPIP_H
30927#include <ws2tcpip.h>
30928#endif
30929
30930"
30931if test "x$ac_cv_type_sa_family_t" = xyes; then :
30932
30933cat >>confdefs.h <<_ACEOF
30934#define HAVE_SA_FAMILY_T 1
30935_ACEOF
30936
30937
30938fi
30939
30940 if test $ac_cv_type_struct_sockaddr_storage = no; then
30941 HAVE_STRUCT_SOCKADDR_STORAGE=0
30942 fi
30943 if test $ac_cv_type_sa_family_t = no; then
30944 HAVE_SA_FAMILY_T=0
30945 fi
30946 if test $ac_cv_type_struct_sockaddr_storage != no; then
30947 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
30948 #ifdef HAVE_SYS_SOCKET_H
30949 #include <sys/socket.h>
30950 #endif
30951 #ifdef HAVE_WS2TCPIP_H
30952 #include <ws2tcpip.h>
30953 #endif
30954
30955"
30956if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
30957
30958cat >>confdefs.h <<_ACEOF
30959#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
30960_ACEOF
30961
30962
30963else
30964 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
30965fi
30966
30967 fi
30968 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
30969 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
30970 SYS_SOCKET_H='sys/socket.h'
30971 fi
30972
30973
30974
30975
30976 if test $ac_cv_header_sys_socket_h != yes; then
30977 for ac_header in winsock2.h
30978do :
30979 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
30980if test "x$ac_cv_header_winsock2_h" = xyes; then :
30981 cat >>confdefs.h <<_ACEOF
30982#define HAVE_WINSOCK2_H 1
30983_ACEOF
30984
30985fi
30986
30987done
30988
30989 fi
30990 if test "$ac_cv_header_winsock2_h" = yes; then
30991 HAVE_WINSOCK2_H=1
30992 UNISTD_H_HAVE_WINSOCK2_H=1
30993 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
30994 else
30995 HAVE_WINSOCK2_H=0
30996 fi
30997
30998
30999
31000
31001 for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do
31002 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
31003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
31004$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
31005if eval \${$as_gl_Symbol+:} false; then :
31006 $as_echo_n "(cached) " >&6
31007else
31008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31009/* end confdefs.h. */
31010
31011/* Some systems require prerequisite headers. */
31012#include <sys/types.h>
31013#include <sys/socket.h>
31014
31015int
31016main ()
31017{
31018#undef $gl_func
31019 (void) $gl_func;
31020 ;
31021 return 0;
31022}
31023_ACEOF
31024if ac_fn_c_try_compile "$LINENO"; then :
31025 eval "$as_gl_Symbol=yes"
31026else
31027 eval "$as_gl_Symbol=no"
31028fi
31029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31030fi
31031eval ac_res=\$$as_gl_Symbol
31032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31033$as_echo "$ac_res" >&6; }
31034 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31035 cat >>confdefs.h <<_ACEOF
31036#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31037_ACEOF
31038
31039 eval ac_cv_have_decl_$gl_func=yes
31040fi
31041 done
31042
31043
31044
31045
31046
31047
31048
31049
31050
31051
31052
31053
31054
31055
31056
31057
31058
31059
31060
31061 if test $gl_cv_have_include_next = yes; then
31062 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
31063 else
31064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
31065$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
31066if ${gl_cv_next_sys_stat_h+:} false; then :
31067 $as_echo_n "(cached) " >&6
31068else
31069
31070 if test $ac_cv_header_sys_stat_h = yes; then
31071
31072
31073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31074/* end confdefs.h. */
31075#include <sys/stat.h>
31076
31077_ACEOF
31078 case "$host_os" in
31079 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31080 *) gl_absname_cpp="$ac_cpp" ;;
31081 esac
31082
31083 case "$host_os" in
31084 mingw*)
31085 gl_dirsep_regex='[/\\]'
31086 ;;
31087 *)
31088 gl_dirsep_regex='\/'
31089 ;;
31090 esac
31091 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31092
31093 gl_header_literal_regex=`echo 'sys/stat.h' \
31094 | sed -e "$gl_make_literal_regex_sed"`
31095 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31096 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31097 s|^/[^/]|//&|
31098 p
31099 q
31100 }'
31101 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31102 sed -n "$gl_absolute_header_sed"`'"'
31103 else
31104 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
31105 fi
31106
31107
31108fi
31109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
31110$as_echo "$gl_cv_next_sys_stat_h" >&6; }
31111 fi
31112 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
31113
31114 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31115 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31116 gl_next_as_first_directive='<'sys/stat.h'>'
31117 else
31118 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31119 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
31120 fi
31121 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
31122
31123
31124
31125
31126
31127
31128
31129
31130
31131
31132
31133 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
31134
31135$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
31136
31137 fi
31138
31139 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
31140 #include <sys/stat.h>
31141"
31142if test "x$ac_cv_type_nlink_t" = xyes; then :
31143
31144else
31145
31146$as_echo "#define nlink_t int" >>confdefs.h
31147
31148fi
31149
31150
31151
31152 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
31153 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
31154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
31155$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
31156if eval \${$as_gl_Symbol+:} false; then :
31157 $as_echo_n "(cached) " >&6
31158else
31159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31160/* end confdefs.h. */
31161#include <sys/stat.h>
31162
31163int
31164main ()
31165{
31166#undef $gl_func
31167 (void) $gl_func;
31168 ;
31169 return 0;
31170}
31171_ACEOF
31172if ac_fn_c_try_compile "$LINENO"; then :
31173 eval "$as_gl_Symbol=yes"
31174else
31175 eval "$as_gl_Symbol=no"
31176fi
31177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31178fi
31179eval ac_res=\$$as_gl_Symbol
31180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31181$as_echo "$ac_res" >&6; }
31182 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31183 cat >>confdefs.h <<_ACEOF
31184#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31185_ACEOF
31186
31187 eval ac_cv_have_decl_$gl_func=yes
31188fi
31189 done
31190
31191
31192
31193
31194
31195
31196
31197
31198
31199
31200
31201
31202
31203
31204
31205
31206
31207 if test $gl_cv_have_include_next = yes; then
31208 gl_cv_next_sys_types_h='<'sys/types.h'>'
31209 else
31210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
31211$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
31212if ${gl_cv_next_sys_types_h+:} false; then :
31213 $as_echo_n "(cached) " >&6
31214else
31215
31216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31217/* end confdefs.h. */
31218#include <sys/types.h>
31219
31220_ACEOF
31221 case "$host_os" in
31222 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31223 *) gl_absname_cpp="$ac_cpp" ;;
31224 esac
31225
31226 case "$host_os" in
31227 mingw*)
31228 gl_dirsep_regex='[/\\]'
31229 ;;
31230 *)
31231 gl_dirsep_regex='\/'
31232 ;;
31233 esac
31234 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31235
31236 gl_header_literal_regex=`echo 'sys/types.h' \
31237 | sed -e "$gl_make_literal_regex_sed"`
31238 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31239 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31240 s|^/[^/]|//&|
31241 p
31242 q
31243 }'
31244 gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31245 sed -n "$gl_absolute_header_sed"`'"'
31246
31247
31248fi
31249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
31250$as_echo "$gl_cv_next_sys_types_h" >&6; }
31251 fi
31252 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
31253
31254 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31255 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31256 gl_next_as_first_directive='<'sys/types.h'>'
31257 else
31258 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31259 gl_next_as_first_directive=$gl_cv_next_sys_types_h
31260 fi
31261 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
31262
31263
31264
31265
31266
31267
31268
31269
31270
31271
31272
31273
31274
31275
31276
31277
31278
31279
31280
31281
31282
31283
31284
31285 if test $gl_cv_have_include_next = yes; then
31286 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
31287 else
31288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
31289$as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
31290if ${gl_cv_next_sys_uio_h+:} false; then :
31291 $as_echo_n "(cached) " >&6
31292else
31293
31294 if test $ac_cv_header_sys_uio_h = yes; then
31295
31296
31297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31298/* end confdefs.h. */
31299#include <sys/uio.h>
31300
31301_ACEOF
31302 case "$host_os" in
31303 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31304 *) gl_absname_cpp="$ac_cpp" ;;
31305 esac
31306
31307 case "$host_os" in
31308 mingw*)
31309 gl_dirsep_regex='[/\\]'
31310 ;;
31311 *)
31312 gl_dirsep_regex='\/'
31313 ;;
31314 esac
31315 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31316
31317 gl_header_literal_regex=`echo 'sys/uio.h' \
31318 | sed -e "$gl_make_literal_regex_sed"`
31319 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31320 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31321 s|^/[^/]|//&|
31322 p
31323 q
31324 }'
31325 gl_cv_next_sys_uio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31326 sed -n "$gl_absolute_header_sed"`'"'
31327 else
31328 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
31329 fi
31330
31331
31332fi
31333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
31334$as_echo "$gl_cv_next_sys_uio_h" >&6; }
31335 fi
31336 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
31337
31338 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31339 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31340 gl_next_as_first_directive='<'sys/uio.h'>'
31341 else
31342 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31343 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
31344 fi
31345 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
31346
31347
31348
31349
31350 if test $ac_cv_header_sys_uio_h = yes; then
31351 HAVE_SYS_UIO_H=1
31352 else
31353 HAVE_SYS_UIO_H=0
31354 fi
31355
31356
31357
31358
31359
31360
31361
31362
31363
31364
31365
31366
31367
31368
31369
31370 if test $gl_cv_have_include_next = yes; then
31371 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
31372 else
31373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
31374$as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
31375if ${gl_cv_next_sys_wait_h+:} false; then :
31376 $as_echo_n "(cached) " >&6
31377else
31378
31379 if test $ac_cv_header_sys_wait_h = yes; then
31380
31381
31382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31383/* end confdefs.h. */
31384#include <sys/wait.h>
31385
31386_ACEOF
31387 case "$host_os" in
31388 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31389 *) gl_absname_cpp="$ac_cpp" ;;
31390 esac
31391
31392 case "$host_os" in
31393 mingw*)
31394 gl_dirsep_regex='[/\\]'
31395 ;;
31396 *)
31397 gl_dirsep_regex='\/'
31398 ;;
31399 esac
31400 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31401
31402 gl_header_literal_regex=`echo 'sys/wait.h' \
31403 | sed -e "$gl_make_literal_regex_sed"`
31404 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31405 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31406 s|^/[^/]|//&|
31407 p
31408 q
31409 }'
31410 gl_cv_next_sys_wait_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31411 sed -n "$gl_absolute_header_sed"`'"'
31412 else
31413 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
31414 fi
31415
31416
31417fi
31418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
31419$as_echo "$gl_cv_next_sys_wait_h" >&6; }
31420 fi
31421 NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
31422
31423 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31424 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31425 gl_next_as_first_directive='<'sys/wait.h'>'
31426 else
31427 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31428 gl_next_as_first_directive=$gl_cv_next_sys_wait_h
31429 fi
31430 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
31431
31432
31433
31434
31435
31436
31437
31438
31439 for gl_func in waitpid; do
31440 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
31441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
31442$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
31443if eval \${$as_gl_Symbol+:} false; then :
31444 $as_echo_n "(cached) " >&6
31445else
31446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31447/* end confdefs.h. */
31448#include <sys/wait.h>
31449int
31450main ()
31451{
31452#undef $gl_func
31453 (void) $gl_func;
31454 ;
31455 return 0;
31456}
31457_ACEOF
31458if ac_fn_c_try_compile "$LINENO"; then :
31459 eval "$as_gl_Symbol=yes"
31460else
31461 eval "$as_gl_Symbol=no"
31462fi
31463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31464fi
31465eval ac_res=\$$as_gl_Symbol
31466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31467$as_echo "$ac_res" >&6; }
31468 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31469 cat >>confdefs.h <<_ACEOF
31470#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31471_ACEOF
31472
31473 eval ac_cv_have_decl_$gl_func=yes
31474fi
31475 done
31476
31477
31478
31479
31480
31481 :
31482
31483
31484
31485
31486
31487
31488
31489
31490
31491
31492
31493
31494
31495 for ac_func in __secure_getenv
31496do :
31497 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
31498if test "x$ac_cv_func___secure_getenv" = xyes; then :
31499 cat >>confdefs.h <<_ACEOF
31500#define HAVE___SECURE_GETENV 1
31501_ACEOF
31502
31503fi
31504done
31505
31506
31507
31508
31509
31510
31511
31512
31513
31514
31515
31516
31517
31518
31519
31520 if test $gl_cv_have_include_next = yes; then
31521 gl_cv_next_unistd_h='<'unistd.h'>'
31522 else
31523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
31524$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
31525if ${gl_cv_next_unistd_h+:} false; then :
31526 $as_echo_n "(cached) " >&6
31527else
31528
31529 if test $ac_cv_header_unistd_h = yes; then
31530
31531
31532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31533/* end confdefs.h. */
31534#include <unistd.h>
31535
31536_ACEOF
31537 case "$host_os" in
31538 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31539 *) gl_absname_cpp="$ac_cpp" ;;
31540 esac
31541
31542 case "$host_os" in
31543 mingw*)
31544 gl_dirsep_regex='[/\\]'
31545 ;;
31546 *)
31547 gl_dirsep_regex='\/'
31548 ;;
31549 esac
31550 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31551
31552 gl_header_literal_regex=`echo 'unistd.h' \
31553 | sed -e "$gl_make_literal_regex_sed"`
31554 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31555 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31556 s|^/[^/]|//&|
31557 p
31558 q
31559 }'
31560 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31561 sed -n "$gl_absolute_header_sed"`'"'
31562 else
31563 gl_cv_next_unistd_h='<'unistd.h'>'
31564 fi
31565
31566
31567fi
31568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
31569$as_echo "$gl_cv_next_unistd_h" >&6; }
31570 fi
31571 NEXT_UNISTD_H=$gl_cv_next_unistd_h
31572
31573 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31574 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31575 gl_next_as_first_directive='<'unistd.h'>'
31576 else
31577 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31578 gl_next_as_first_directive=$gl_cv_next_unistd_h
31579 fi
31580 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
31581
31582
31583
31584
31585 if test $ac_cv_header_unistd_h = yes; then
31586 HAVE_UNISTD_H=1
31587 else
31588 HAVE_UNISTD_H=0
31589 fi
31590
31591
31592
31593
31594
31595
31596
31597 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
31598 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
31599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
31600$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
31601if eval \${$as_gl_Symbol+:} false; then :
31602 $as_echo_n "(cached) " >&6
31603else
31604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31605/* end confdefs.h. */
31606
31607#if HAVE_UNISTD_H
31608# include <unistd.h>
31609#endif
31610/* Some systems declare various items in the wrong headers. */
31611#if !(defined __GLIBC__ && !defined __UCLIBC__)
31612# include <fcntl.h>
31613# include <stdio.h>
31614# include <stdlib.h>
31615# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
31616# include <io.h>
31617# endif
31618#endif
31619
31620int
31621main ()
31622{
31623#undef $gl_func
31624 (void) $gl_func;
31625 ;
31626 return 0;
31627}
31628_ACEOF
31629if ac_fn_c_try_compile "$LINENO"; then :
31630 eval "$as_gl_Symbol=yes"
31631else
31632 eval "$as_gl_Symbol=no"
31633fi
31634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31635fi
31636eval ac_res=\$$as_gl_Symbol
31637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31638$as_echo "$ac_res" >&6; }
31639 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31640 cat >>confdefs.h <<_ACEOF
31641#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31642_ACEOF
31643
31644 eval ac_cv_have_decl_$gl_func=yes
31645fi
31646 done
31647
31648
31649
31650
31651
31652
31653
31654$as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
31655
31656
31657
31658
31659
31660
31661
31662
31663
31664
31665
31666
31667
31668
31669
31670
31671
31672
31673
31674
31675
31676
31677
31678
31679 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
31680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
31681$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
31682if ${gl_cv_func_futimesat_works+:} false; then :
31683 $as_echo_n "(cached) " >&6
31684else
31685 touch conftest.file
31686 if test "$cross_compiling" = yes; then :
31687 case "$host_os" in
31688 # Guess yes on glibc systems.
31689 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
31690 # If we don't know, assume the worst.
31691 *) gl_cv_func_futimesat_works="guessing no" ;;
31692 esac
31693
31694else
31695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31696/* end confdefs.h. */
31697
31698#include <stddef.h>
31699#include <sys/times.h>
31700#include <fcntl.h>
31701
31702int
31703main ()
31704{
31705 int fd = open ("conftest.file", O_RDWR);
31706 if (fd < 0) return 1;
31707 if (futimesat (fd, NULL, NULL)) return 2;
31708
31709 ;
31710 return 0;
31711}
31712_ACEOF
31713if ac_fn_c_try_run "$LINENO"; then :
31714 gl_cv_func_futimesat_works=yes
31715else
31716 gl_cv_func_futimesat_works=no
31717fi
31718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31719 conftest.$ac_objext conftest.beam conftest.$ac_ext
31720fi
31721
31722 rm -f conftest.file
31723fi
31724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
31725$as_echo "$gl_cv_func_futimesat_works" >&6; }
31726 case "$gl_cv_func_futimesat_works" in
31727 *yes) ;;
31728 *)
31729
31730$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
31731
31732 ;;
31733 esac
31734 fi
31735
31736
31737
31738 if test $ac_cv_func_vasnprintf = no; then
31739
31740
31741
31742
31743
31744
31745
31746
31747
31748
31749 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
31750
31751
31752
31753
31754
31755
31756
31757
31758
31759 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
31760
31761
31762
31763
31764
31765
31766
31767
31768
31769 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
31770
31771
31772
31773
31774
31775
31776
31777
31778
31779 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
31780
31781 if test $ac_cv_func_vasnprintf = yes; then
31782
31783$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
31784
31785 fi
31786
31787
31788
31789
31790
31791
31792
31793
31794
31795
31796
31797 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
31798if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
31799
31800else
31801
31802$as_echo "#define ptrdiff_t long" >>confdefs.h
31803
31804
31805fi
31806
31807
31808
31809
31810
31811
31812
31813 fi
31814
31815
31816 for ac_func in vasprintf
31817do :
31818 ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
31819if test "x$ac_cv_func_vasprintf" = xyes; then :
31820 cat >>confdefs.h <<_ACEOF
31821#define HAVE_VASPRINTF 1
31822_ACEOF
31823
31824fi
31825done
31826
31827 if test $ac_cv_func_vasprintf = no; then
31828
31829
31830
31831
31832
31833
31834
31835
31836
31837 gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
31838
31839
31840
31841
31842
31843
31844
31845
31846
31847 gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
31848
31849
31850 if test $ac_cv_func_vasprintf = yes; then
31851 REPLACE_VASPRINTF=1
31852 else
31853 HAVE_VASPRINTF=0
31854 fi
31855
31856
31857
31858
31859
31860
31861
31862
31863 fi
31864
31865
31866
31867
31868
31869
31870 GNULIB_VASPRINTF=1
31871
31872
31873
31874
31875
31876$as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
31877
31878
31879
31880
31881
31882 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
31883
31884
31885
31886 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
31887
31888
31889
31890 gl_cv_func_vsnprintf_usable=no
31891 for ac_func in vsnprintf
31892do :
31893 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
31894if test "x$ac_cv_func_vsnprintf" = xyes; then :
31895 cat >>confdefs.h <<_ACEOF
31896#define HAVE_VSNPRINTF 1
31897_ACEOF
31898
31899fi
31900done
31901
31902 if test $ac_cv_func_vsnprintf = yes; then
31903
31904
31905
31906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
31907$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
31908if ${gl_cv_func_snprintf_size1+:} false; then :
31909 $as_echo_n "(cached) " >&6
31910else
31911
31912 if test "$cross_compiling" = yes; then :
31913 gl_cv_func_snprintf_size1="guessing yes"
31914else
31915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31916/* end confdefs.h. */
31917
31918#include <stdio.h>
31919#if HAVE_SNPRINTF
31920# define my_snprintf snprintf
31921#else
31922# include <stdarg.h>
31923static int my_snprintf (char *buf, int size, const char *format, ...)
31924{
31925 va_list args;
31926 int ret;
31927 va_start (args, format);
31928 ret = vsnprintf (buf, size, format, args);
31929 va_end (args);
31930 return ret;
31931}
31932#endif
31933int main()
31934{
31935 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
31936 my_snprintf (buf, 1, "%d", 12345);
31937 return buf[1] != 'E';
31938}
31939_ACEOF
31940if ac_fn_c_try_run "$LINENO"; then :
31941 gl_cv_func_snprintf_size1=yes
31942else
31943 gl_cv_func_snprintf_size1=no
31944fi
31945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31946 conftest.$ac_objext conftest.beam conftest.$ac_ext
31947fi
31948
31949
31950fi
31951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
31952$as_echo "$gl_cv_func_snprintf_size1" >&6; }
31953
31954 case "$gl_cv_func_snprintf_size1" in
31955 *yes)
31956
31957 case "$gl_cv_func_snprintf_retval_c99" in
31958 *yes)
31959
31960
31961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
31962$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
31963if ${gl_cv_func_printf_positions+:} false; then :
31964 $as_echo_n "(cached) " >&6
31965else
31966
31967 if test "$cross_compiling" = yes; then :
31968
31969 case "$host_os" in
31970 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
31971 gl_cv_func_printf_positions="guessing no";;
31972 beos*) gl_cv_func_printf_positions="guessing no";;
31973 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
31974 *) gl_cv_func_printf_positions="guessing yes";;
31975 esac
31976
31977else
31978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31979/* end confdefs.h. */
31980
31981#include <stdio.h>
31982#include <string.h>
31983/* The string "%2$d %1$d", with dollar characters protected from the shell's
31984 dollar expansion (possibly an autoconf bug). */
31985static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
31986static char buf[100];
31987int main ()
31988{
31989 sprintf (buf, format, 33, 55);
31990 return (strcmp (buf, "55 33") != 0);
31991}
31992_ACEOF
31993if ac_fn_c_try_run "$LINENO"; then :
31994 gl_cv_func_printf_positions=yes
31995else
31996 gl_cv_func_printf_positions=no
31997fi
31998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31999 conftest.$ac_objext conftest.beam conftest.$ac_ext
32000fi
32001
32002
32003fi
32004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
32005$as_echo "$gl_cv_func_printf_positions" >&6; }
32006
32007 case "$gl_cv_func_printf_positions" in
32008 *yes)
32009 gl_cv_func_vsnprintf_usable=yes
32010 ;;
32011 esac
32012 ;;
32013 esac
32014 ;;
32015 esac
32016 fi
32017 if test $gl_cv_func_vsnprintf_usable = no; then
32018
32019
32020
32021
32022
32023
32024
32025
32026
32027
32028 gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
32029
32030 if test $ac_cv_func_vsnprintf = yes; then
32031 REPLACE_VSNPRINTF=1
32032 fi
32033 :
32034
32035 fi
32036
32037 if test $ac_cv_have_decl_vsnprintf = no; then
32038 HAVE_DECL_VSNPRINTF=0
32039 fi
32040
32041
32042
32043
32044
32045
32046 GNULIB_VSNPRINTF=1
32047
32048
32049
32050
32051
32052$as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h
32053
32054
32055
32056
32057
32058
32059 for ac_func in waitid
32060do :
32061 ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
32062if test "x$ac_cv_func_waitid" = xyes; then :
32063 cat >>confdefs.h <<_ACEOF
32064#define HAVE_WAITID 1
32065_ACEOF
32066
32067fi
32068done
32069
32070
32071
32072
32073 HAVE_WAITPID=1
32074 case $host_os in
32075 mingw*) HAVE_WAITPID=0 ;;
32076 esac
32077
32078if test $HAVE_WAITPID = 0; then
32079
32080
32081
32082
32083
32084
32085
32086
32087 gl_LIBOBJS="$gl_LIBOBJS waitpid.$ac_objext"
32088
32089fi
32090
32091
32092
32093
32094
32095 GNULIB_WAITPID=1
32096
32097
32098
32099
32100
32101$as_echo "#define GNULIB_TEST_WAITPID 1" >>confdefs.h
32102
32103
32104
32105
32106
32107
32108
32109
32110
32111
32112
32113
32114
32115
32116
32117 if test $gl_cv_have_include_next = yes; then
32118 gl_cv_next_wchar_h='<'wchar.h'>'
32119 else
32120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
32121$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
32122if ${gl_cv_next_wchar_h+:} false; then :
32123 $as_echo_n "(cached) " >&6
32124else
32125
32126 if test $ac_cv_header_wchar_h = yes; then
32127
32128
32129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32130/* end confdefs.h. */
32131#include <wchar.h>
32132
32133_ACEOF
32134 case "$host_os" in
32135 aix*) gl_absname_cpp="$ac_cpp -C" ;;
32136 *) gl_absname_cpp="$ac_cpp" ;;
32137 esac
32138
32139 case "$host_os" in
32140 mingw*)
32141 gl_dirsep_regex='[/\\]'
32142 ;;
32143 *)
32144 gl_dirsep_regex='\/'
32145 ;;
32146 esac
32147 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32148
32149 gl_header_literal_regex=`echo 'wchar.h' \
32150 | sed -e "$gl_make_literal_regex_sed"`
32151 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32152 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32153 s|^/[^/]|//&|
32154 p
32155 q
32156 }'
32157 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32158 sed -n "$gl_absolute_header_sed"`'"'
32159 else
32160 gl_cv_next_wchar_h='<'wchar.h'>'
32161 fi
32162
32163
32164fi
32165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
32166$as_echo "$gl_cv_next_wchar_h" >&6; }
32167 fi
32168 NEXT_WCHAR_H=$gl_cv_next_wchar_h
32169
32170 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32171 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32172 gl_next_as_first_directive='<'wchar.h'>'
32173 else
32174 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32175 gl_next_as_first_directive=$gl_cv_next_wchar_h
32176 fi
32177 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
32178
32179
32180
32181
32182 if test $ac_cv_header_wchar_h = yes; then
32183 HAVE_WCHAR_H=1
32184 else
32185 HAVE_WCHAR_H=0
32186 fi
32187
32188
32189
32190
32191
32192 if test $gt_cv_c_wint_t = yes; then
32193 HAVE_WINT_T=1
32194 else
32195 HAVE_WINT_T=0
32196 fi
32197
32198
32199
32200 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
32201 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
32202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
32203$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
32204if eval \${$as_gl_Symbol+:} false; then :
32205 $as_echo_n "(cached) " >&6
32206else
32207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32208/* end confdefs.h. */
32209
32210/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32211 <wchar.h>.
32212 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32213 included before <wchar.h>. */
32214#if !(defined __GLIBC__ && !defined __UCLIBC__)
32215# include <stddef.h>
32216# include <stdio.h>
32217# include <time.h>
32218#endif
32219#include <wchar.h>
32220
32221int
32222main ()
32223{
32224#undef $gl_func
32225 (void) $gl_func;
32226 ;
32227 return 0;
32228}
32229_ACEOF
32230if ac_fn_c_try_compile "$LINENO"; then :
32231 eval "$as_gl_Symbol=yes"
32232else
32233 eval "$as_gl_Symbol=no"
32234fi
32235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32236fi
32237eval ac_res=\$$as_gl_Symbol
32238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
32239$as_echo "$ac_res" >&6; }
32240 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
32241 cat >>confdefs.h <<_ACEOF
32242#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
32243_ACEOF
32244
32245 eval ac_cv_have_decl_$gl_func=yes
32246fi
32247 done
32248
32249
32250
32251
32252
32253
32254
32255
32256
32257
32258
32259
32260 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
32261
32262
32263
32264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
32265$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
32266if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
32267 $as_echo_n "(cached) " >&6
32268else
32269
32270 case "$host_os" in
32271 # Guess no on AIX and OSF/1.
32272 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
32273 # Guess yes otherwise.
32274 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
32275 esac
32276 if test $LOCALE_JA != none; then
32277 if test "$cross_compiling" = yes; then :
32278 :
32279else
32280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32281/* end confdefs.h. */
32282
32283#include <locale.h>
32284#include <string.h>
32285/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32286 <wchar.h>.
32287 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32288 included before <wchar.h>. */
32289#include <stddef.h>
32290#include <stdio.h>
32291#include <time.h>
32292#include <wchar.h>
32293int main ()
32294{
32295 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
32296 {
32297 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
32298 mbstate_t state;
32299 wchar_t wc;
32300
32301 memset (&state, '\0', sizeof (mbstate_t));
32302 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
32303 if (mbsinit (&state))
32304 return 1;
32305 }
32306 return 0;
32307}
32308_ACEOF
32309if ac_fn_c_try_run "$LINENO"; then :
32310 gl_cv_func_mbrtowc_incomplete_state=yes
32311else
32312 gl_cv_func_mbrtowc_incomplete_state=no
32313fi
32314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32315 conftest.$ac_objext conftest.beam conftest.$ac_ext
32316fi
32317
32318 fi
32319
32320fi
32321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
32322$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
32323
32324
32325
32326
32327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
32328$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
32329if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
32330 $as_echo_n "(cached) " >&6
32331else
32332
32333 case "$host_os" in
32334 # Guess no on Solaris 8.
32335 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
32336 # Guess yes otherwise.
32337 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
32338 esac
32339 if test $LOCALE_ZH_CN != none; then
32340 if test "$cross_compiling" = yes; then :
32341 :
32342else
32343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32344/* end confdefs.h. */
32345
32346#include <locale.h>
32347#include <stdlib.h>
32348#include <string.h>
32349/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32350 <wchar.h>.
32351 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32352 included before <wchar.h>. */
32353#include <stddef.h>
32354#include <stdio.h>
32355#include <time.h>
32356#include <wchar.h>
32357int main ()
32358{
32359 /* This fails on Solaris 8:
32360 mbrtowc returns 2, and sets wc to 0x00F0.
32361 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
32362 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
32363 {
32364 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
32365 mbstate_t state;
32366 wchar_t wc;
32367
32368 memset (&state, '\0', sizeof (mbstate_t));
32369 if (mbrtowc (&wc, input + 3, 6, &state) != 4
32370 && mbtowc (&wc, input + 3, 6) == 4)
32371 return 1;
32372 }
32373 return 0;
32374}
32375_ACEOF
32376if ac_fn_c_try_run "$LINENO"; then :
32377 gl_cv_func_mbrtowc_sanitycheck=yes
32378else
32379 gl_cv_func_mbrtowc_sanitycheck=no
32380fi
32381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32382 conftest.$ac_objext conftest.beam conftest.$ac_ext
32383fi
32384
32385 fi
32386
32387fi
32388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
32389$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
32390
32391 REPLACE_MBSTATE_T=0
32392 case "$gl_cv_func_mbrtowc_incomplete_state" in
32393 *yes) ;;
32394 *) REPLACE_MBSTATE_T=1 ;;
32395 esac
32396 case "$gl_cv_func_mbrtowc_sanitycheck" in
32397 *yes) ;;
32398 *) REPLACE_MBSTATE_T=1 ;;
32399 esac
32400 else
32401 REPLACE_MBSTATE_T=1
32402 fi
32403
32404
32405
32406 if test $ac_cv_func_wcrtomb = no; then
32407 HAVE_WCRTOMB=0
32408 ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
32409/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32410 <wchar.h>.
32411 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32412 included before <wchar.h>. */
32413#include <stddef.h>
32414#include <stdio.h>
32415#include <time.h>
32416#include <wchar.h>
32417
32418"
32419if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
32420 ac_have_decl=1
32421else
32422 ac_have_decl=0
32423fi
32424
32425cat >>confdefs.h <<_ACEOF
32426#define HAVE_DECL_WCRTOMB $ac_have_decl
32427_ACEOF
32428
32429 if test $ac_cv_have_decl_wcrtomb = yes; then
32430 REPLACE_WCRTOMB=1
32431 fi
32432 else
32433 if test $REPLACE_MBSTATE_T = 1; then
32434 REPLACE_WCRTOMB=1
32435 else
32436
32437
32438
32439
32440
32441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
32442$as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
32443if ${gl_cv_func_wcrtomb_retval+:} false; then :
32444 $as_echo_n "(cached) " >&6
32445else
32446
32447 case "$host_os" in
32448 # Guess no on AIX 4, OSF/1 and Solaris.
32449 aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
32450 # Guess yes otherwise.
32451 *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
32452 esac
32453 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
32454 if test "$cross_compiling" = yes; then :
32455 :
32456else
32457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32458/* end confdefs.h. */
32459
32460#include <locale.h>
32461#include <string.h>
32462/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32463 <wchar.h>.
32464 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32465 included before <wchar.h>. */
32466#include <stddef.h>
32467#include <stdio.h>
32468#include <time.h>
32469#include <wchar.h>
32470int main ()
32471{
32472 int result = 0;
32473 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
32474 {
32475 if (wcrtomb (NULL, 0, NULL) != 1)
32476 result |= 1;
32477 }
32478 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
32479 {
32480 if (wcrtomb (NULL, 0, NULL) != 1)
32481 result |= 2;
32482 }
32483 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
32484 {
32485 if (wcrtomb (NULL, 0, NULL) != 1)
32486 result |= 4;
32487 }
32488 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
32489 {
32490 if (wcrtomb (NULL, 0, NULL) != 1)
32491 result |= 8;
32492 }
32493 return result;
32494}
32495_ACEOF
32496if ac_fn_c_try_run "$LINENO"; then :
32497 gl_cv_func_wcrtomb_retval=yes
32498else
32499 gl_cv_func_wcrtomb_retval=no
32500fi
32501rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32502 conftest.$ac_objext conftest.beam conftest.$ac_ext
32503fi
32504
32505 fi
32506
32507fi
32508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
32509$as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
32510 case "$gl_cv_func_wcrtomb_retval" in
32511 *yes) ;;
32512 *) REPLACE_WCRTOMB=1 ;;
32513 esac
32514 fi
32515 fi
32516
32517if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
32518
32519
32520
32521
32522
32523
32524
32525
32526 gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
32527
32528
32529 :
32530
32531fi
32532
32533
32534
32535
32536
32537 GNULIB_WCRTOMB=1
32538
32539
32540
32541
32542
32543$as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
32544
32545
32546
32547
32548
32549
32550
32551
32552 if test $ac_cv_func_iswcntrl = yes; then
32553 HAVE_ISWCNTRL=1
32554 else
32555 HAVE_ISWCNTRL=0
32556 fi
32557
32558
32559
32560
32561
32562 if test $gt_cv_c_wint_t = yes; then
32563 HAVE_WINT_T=1
32564 else
32565 HAVE_WINT_T=0
32566 fi
32567
32568
32569
32570
32571
32572
32573
32574
32575
32576
32577
32578 if test $gl_cv_have_include_next = yes; then
32579 gl_cv_next_wctype_h='<'wctype.h'>'
32580 else
32581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
32582$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
32583if ${gl_cv_next_wctype_h+:} false; then :
32584 $as_echo_n "(cached) " >&6
32585else
32586
32587 if test $ac_cv_header_wctype_h = yes; then
32588
32589
32590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32591/* end confdefs.h. */
32592#include <wctype.h>
32593
32594_ACEOF
32595 case "$host_os" in
32596 aix*) gl_absname_cpp="$ac_cpp -C" ;;
32597 *) gl_absname_cpp="$ac_cpp" ;;
32598 esac
32599
32600 case "$host_os" in
32601 mingw*)
32602 gl_dirsep_regex='[/\\]'
32603 ;;
32604 *)
32605 gl_dirsep_regex='\/'
32606 ;;
32607 esac
32608 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32609
32610 gl_header_literal_regex=`echo 'wctype.h' \
32611 | sed -e "$gl_make_literal_regex_sed"`
32612 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32613 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32614 s|^/[^/]|//&|
32615 p
32616 q
32617 }'
32618 gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32619 sed -n "$gl_absolute_header_sed"`'"'
32620 else
32621 gl_cv_next_wctype_h='<'wctype.h'>'
32622 fi
32623
32624
32625fi
32626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
32627$as_echo "$gl_cv_next_wctype_h" >&6; }
32628 fi
32629 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
32630
32631 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32632 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32633 gl_next_as_first_directive='<'wctype.h'>'
32634 else
32635 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32636 gl_next_as_first_directive=$gl_cv_next_wctype_h
32637 fi
32638 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
32639
32640
32641
32642
32643 if test $ac_cv_header_wctype_h = yes; then
32644 if test $ac_cv_func_iswcntrl = yes; then
32645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
32646$as_echo_n "checking whether iswcntrl works... " >&6; }
32647if ${gl_cv_func_iswcntrl_works+:} false; then :
32648 $as_echo_n "(cached) " >&6
32649else
32650
32651 if test "$cross_compiling" = yes; then :
32652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32653/* end confdefs.h. */
32654#include <stdlib.h>
32655 #if __GNU_LIBRARY__ == 1
32656 Linux libc5 i18n is broken.
32657 #endif
32658int
32659main ()
32660{
32661
32662 ;
32663 return 0;
32664}
32665_ACEOF
32666if ac_fn_c_try_compile "$LINENO"; then :
32667 gl_cv_func_iswcntrl_works="guessing yes"
32668else
32669 gl_cv_func_iswcntrl_works="guessing no"
32670fi
32671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32672
32673else
32674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32675/* end confdefs.h. */
32676
32677 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
32678 included before <wchar.h>.
32679 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
32680 must be included before <wchar.h>. */
32681 #include <stddef.h>
32682 #include <stdio.h>
32683 #include <time.h>
32684 #include <wchar.h>
32685 #include <wctype.h>
32686 int main () { return iswprint ('x') == 0; }
32687
32688_ACEOF
32689if ac_fn_c_try_run "$LINENO"; then :
32690 gl_cv_func_iswcntrl_works=yes
32691else
32692 gl_cv_func_iswcntrl_works=no
32693fi
32694rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32695 conftest.$ac_objext conftest.beam conftest.$ac_ext
32696fi
32697
32698
32699fi
32700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
32701$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
32702 fi
32703 HAVE_WCTYPE_H=1
32704 else
32705 HAVE_WCTYPE_H=0
32706 fi
32707
32708
32709 case "$gl_cv_func_iswcntrl_works" in
32710 *yes) REPLACE_ISWCNTRL=0 ;;
32711 *) REPLACE_ISWCNTRL=1 ;;
32712 esac
32713
32714
32715 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
32716 :
32717 fi
32718
32719 if test $REPLACE_ISWCNTRL = 1; then
32720 REPLACE_TOWLOWER=1
32721 else
32722 for ac_func in towlower
32723do :
32724 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
32725if test "x$ac_cv_func_towlower" = xyes; then :
32726 cat >>confdefs.h <<_ACEOF
32727#define HAVE_TOWLOWER 1
32728_ACEOF
32729
32730fi
32731done
32732
32733 if test $ac_cv_func_towlower = yes; then
32734 REPLACE_TOWLOWER=0
32735 else
32736 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
32737 included before <wchar.h>.
32738 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
32739 must be included before <wchar.h>. */
32740 #include <stddef.h>
32741 #include <stdio.h>
32742 #include <time.h>
32743 #include <wchar.h>
32744 #if HAVE_WCTYPE_H
32745 # include <wctype.h>
32746 #endif
32747
32748"
32749if test "x$ac_cv_have_decl_towlower" = xyes; then :
32750 ac_have_decl=1
32751else
32752 ac_have_decl=0
32753fi
32754
32755cat >>confdefs.h <<_ACEOF
32756#define HAVE_DECL_TOWLOWER $ac_have_decl
32757_ACEOF
32758
32759 if test $ac_cv_have_decl_towlower = yes; then
32760 REPLACE_TOWLOWER=1
32761 else
32762 REPLACE_TOWLOWER=0
32763 fi
32764 fi
32765 fi
32766
32767
32768 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
32769 :
32770 fi
32771
32772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
32773$as_echo_n "checking for wctype_t... " >&6; }
32774if ${gl_cv_type_wctype_t+:} false; then :
32775 $as_echo_n "(cached) " >&6
32776else
32777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32778/* end confdefs.h. */
32779/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
32780 included before <wchar.h>.
32781 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
32782 must be included before <wchar.h>. */
32783 #include <stddef.h>
32784 #include <stdio.h>
32785 #include <time.h>
32786 #include <wchar.h>
32787 #if HAVE_WCTYPE_H
32788 # include <wctype.h>
32789 #endif
32790 wctype_t a;
32791
32792int
32793main ()
32794{
32795
32796 ;
32797 return 0;
32798}
32799_ACEOF
32800if ac_fn_c_try_compile "$LINENO"; then :
32801 gl_cv_type_wctype_t=yes
32802else
32803 gl_cv_type_wctype_t=no
32804fi
32805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32806
32807fi
32808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
32809$as_echo "$gl_cv_type_wctype_t" >&6; }
32810 if test $gl_cv_type_wctype_t = no; then
32811 HAVE_WCTYPE_T=0
32812 fi
32813
32814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
32815$as_echo_n "checking for wctrans_t... " >&6; }
32816if ${gl_cv_type_wctrans_t+:} false; then :
32817 $as_echo_n "(cached) " >&6
32818else
32819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32820/* end confdefs.h. */
32821/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
32822 included before <wchar.h>.
32823 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
32824 must be included before <wchar.h>. */
32825 #include <stddef.h>
32826 #include <stdio.h>
32827 #include <time.h>
32828 #include <wchar.h>
32829 #include <wctype.h>
32830 wctrans_t a;
32831
32832int
32833main ()
32834{
32835
32836 ;
32837 return 0;
32838}
32839_ACEOF
32840if ac_fn_c_try_compile "$LINENO"; then :
32841 gl_cv_type_wctrans_t=yes
32842else
32843 gl_cv_type_wctrans_t=no
32844fi
32845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32846
32847fi
32848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
32849$as_echo "$gl_cv_type_wctrans_t" >&6; }
32850 if test $gl_cv_type_wctrans_t = no; then
32851 HAVE_WCTRANS_T=0
32852 fi
32853
32854
32855 for gl_func in wctype iswctype wctrans towctrans ; do
32856 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
32857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
32858$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
32859if eval \${$as_gl_Symbol+:} false; then :
32860 $as_echo_n "(cached) " >&6
32861else
32862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32863/* end confdefs.h. */
32864
32865/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32866 <wchar.h>.
32867 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32868 included before <wchar.h>. */
32869#if !(defined __GLIBC__ && !defined __UCLIBC__)
32870# include <stddef.h>
32871# include <stdio.h>
32872# include <time.h>
32873# include <wchar.h>
32874#endif
32875#include <wctype.h>
32876
32877int
32878main ()
32879{
32880#undef $gl_func
32881 (void) $gl_func;
32882 ;
32883 return 0;
32884}
32885_ACEOF
32886if ac_fn_c_try_compile "$LINENO"; then :
32887 eval "$as_gl_Symbol=yes"
32888else
32889 eval "$as_gl_Symbol=no"
32890fi
32891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32892fi
32893eval ac_res=\$$as_gl_Symbol
32894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
32895$as_echo "$ac_res" >&6; }
32896 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
32897 cat >>confdefs.h <<_ACEOF
32898#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
32899_ACEOF
32900
32901 eval ac_cv_have_decl_$gl_func=yes
32902fi
32903 done
32904
32905
32906
32907
32908
32909 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
32910 REPLACE_WRITE=1
32911 fi
32912
32913
32914
32915
32916 if test $gl_cv_header_signal_h_SIGPIPE != yes; then
32917 REPLACE_WRITE=1
32918 fi
32919
32920
32921
32922if test $REPLACE_WRITE = 1; then
32923
32924
32925
32926
32927
32928
32929
32930
32931 gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
32932
32933
32934
32935
32936fi
32937
32938
32939
32940
32941
32942 GNULIB_WRITE=1
32943
32944
32945
32946
32947
32948$as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
32949
32950
32951
32952
32953
32954
32955 :
32956
32957
32958 :
32959
32960
32961
32962
32963
32964 for ac_header in stdint.h
32965do :
32966 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
32967if test "x$ac_cv_header_stdint_h" = xyes; then :
32968 cat >>confdefs.h <<_ACEOF
32969#define HAVE_STDINT_H 1
32970_ACEOF
32971
32972fi
32973
32974done
32975
32976
32977 # End of code from modules
32978
32979
32980
32981
32982
32983
32984
32985
32986
32987 gltests_libdeps=
32988 gltests_ltlibdeps=
32989
32990
32991
32992
32993
32994
32995
32996
32997
32998 gl_source_base='tests'
32999 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
33000
33001 gl_module_indicator_condition=$gltests_WITNESS
33002
33003
33004
33005
33006
33007
33008
33009
33010
33011 LIBGNU_LIBDEPS="$gl_libdeps"
33012
33013 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
33014
33015
33016
33017
33018
33019
33020for ac_func in getpagesize
33021do :
33022 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
33023if test "x$ac_cv_func_getpagesize" = xyes; then :
33024 cat >>confdefs.h <<_ACEOF
33025#define HAVE_GETPAGESIZE 1
33026_ACEOF
33027
33028fi
33029done
33030
33031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
33032$as_echo_n "checking for working mmap... " >&6; }
33033if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
33034 $as_echo_n "(cached) " >&6
33035else
33036 if test "$cross_compiling" = yes; then :
33037 ac_cv_func_mmap_fixed_mapped=no
33038else
33039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33040/* end confdefs.h. */
33041$ac_includes_default
33042/* malloc might have been renamed as rpl_malloc. */
33043#undef malloc
33044
33045/* Thanks to Mike Haertel and Jim Avera for this test.
33046 Here is a matrix of mmap possibilities:
33047 mmap private not fixed
33048 mmap private fixed at somewhere currently unmapped
33049 mmap private fixed at somewhere already mapped
33050 mmap shared not fixed
33051 mmap shared fixed at somewhere currently unmapped
33052 mmap shared fixed at somewhere already mapped
33053 For private mappings, we should verify that changes cannot be read()
33054 back from the file, nor mmap's back from the file at a different
33055 address. (There have been systems where private was not correctly
33056 implemented like the infamous i386 svr4.0, and systems where the
33057 VM page cache was not coherent with the file system buffer cache
33058 like early versions of FreeBSD and possibly contemporary NetBSD.)
33059 For shared mappings, we should conversely verify that changes get
33060 propagated back to all the places they're supposed to be.
33061
33062 Grep wants private fixed already mapped.
33063 The main things grep needs to know about mmap are:
33064 * does it exist and is it safe to write into the mmap'd area
33065 * how to use it (BSD variants) */
33066
33067#include <fcntl.h>
33068#include <sys/mman.h>
33069
33070#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
33071char *malloc ();
33072#endif
33073
33074/* This mess was copied from the GNU getpagesize.h. */
33075#ifndef HAVE_GETPAGESIZE
33076# ifdef _SC_PAGESIZE
33077# define getpagesize() sysconf(_SC_PAGESIZE)
33078# else /* no _SC_PAGESIZE */
33079# ifdef HAVE_SYS_PARAM_H
33080# include <sys/param.h>
33081# ifdef EXEC_PAGESIZE
33082# define getpagesize() EXEC_PAGESIZE
33083# else /* no EXEC_PAGESIZE */
33084# ifdef NBPG
33085# define getpagesize() NBPG * CLSIZE
33086# ifndef CLSIZE
33087# define CLSIZE 1
33088# endif /* no CLSIZE */
33089# else /* no NBPG */
33090# ifdef NBPC
33091# define getpagesize() NBPC
33092# else /* no NBPC */
33093# ifdef PAGESIZE
33094# define getpagesize() PAGESIZE
33095# endif /* PAGESIZE */
33096# endif /* no NBPC */
33097# endif /* no NBPG */
33098# endif /* no EXEC_PAGESIZE */
33099# else /* no HAVE_SYS_PARAM_H */
33100# define getpagesize() 8192 /* punt totally */
33101# endif /* no HAVE_SYS_PARAM_H */
33102# endif /* no _SC_PAGESIZE */
33103
33104#endif /* no HAVE_GETPAGESIZE */
33105
33106int
33107main ()
33108{
33109 char *data, *data2, *data3;
33110 const char *cdata2;
33111 int i, pagesize;
33112 int fd, fd2;
33113
33114 pagesize = getpagesize ();
33115
33116 /* First, make a file with some known garbage in it. */
33117 data = (char *) malloc (pagesize);
33118 if (!data)
33119 return 1;
33120 for (i = 0; i < pagesize; ++i)
33121 *(data + i) = rand ();
33122 umask (0);
33123 fd = creat ("conftest.mmap", 0600);
33124 if (fd < 0)
33125 return 2;
33126 if (write (fd, data, pagesize) != pagesize)
33127 return 3;
33128 close (fd);
33129
33130 /* Next, check that the tail of a page is zero-filled. File must have
33131 non-zero length, otherwise we risk SIGBUS for entire page. */
33132 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
33133 if (fd2 < 0)
33134 return 4;
33135 cdata2 = "";
33136 if (write (fd2, cdata2, 1) != 1)
33137 return 5;
33138 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
33139 if (data2 == MAP_FAILED)
33140 return 6;
33141 for (i = 0; i < pagesize; ++i)
33142 if (*(data2 + i))
33143 return 7;
33144 close (fd2);
33145 if (munmap (data2, pagesize))
33146 return 8;
33147
33148 /* Next, try to mmap the file at a fixed address which already has
33149 something else allocated at it. If we can, also make sure that
33150 we see the same garbage. */
33151 fd = open ("conftest.mmap", O_RDWR);
33152 if (fd < 0)
33153 return 9;
33154 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
33155 MAP_PRIVATE | MAP_FIXED, fd, 0L))
33156 return 10;
33157 for (i = 0; i < pagesize; ++i)
33158 if (*(data + i) != *(data2 + i))
33159 return 11;
33160
33161 /* Finally, make sure that changes to the mapped area do not
33162 percolate back to the file as seen by read(). (This is a bug on
33163 some variants of i386 svr4.0.) */
33164 for (i = 0; i < pagesize; ++i)
33165 *(data2 + i) = *(data2 + i) + 1;
33166 data3 = (char *) malloc (pagesize);
33167 if (!data3)
33168 return 12;
33169 if (read (fd, data3, pagesize) != pagesize)
33170 return 13;
33171 for (i = 0; i < pagesize; ++i)
33172 if (*(data + i) != *(data3 + i))
33173 return 14;
33174 close (fd);
33175 return 0;
33176}
33177_ACEOF
33178if ac_fn_c_try_run "$LINENO"; then :
33179 ac_cv_func_mmap_fixed_mapped=yes
33180else
33181 ac_cv_func_mmap_fixed_mapped=no
33182fi
33183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33184 conftest.$ac_objext conftest.beam conftest.$ac_ext
33185fi
33186
33187fi
33188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
33189$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
33190if test $ac_cv_func_mmap_fixed_mapped = yes; then
33191
33192$as_echo "#define HAVE_MMAP 1" >>confdefs.h
33193
33194fi
33195rm -f conftest.mmap conftest.txt
33196
33197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
33198$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
33199if ${ac_cv_sys_largefile_source+:} false; then :
33200 $as_echo_n "(cached) " >&6
33201else
33202 while :; do
33203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33204/* end confdefs.h. */
33205#include <sys/types.h> /* for off_t */
33206 #include <stdio.h>
33207int
33208main ()
33209{
33210int (*fp) (FILE *, off_t, int) = fseeko;
33211 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
33212 ;
33213 return 0;
33214}
33215_ACEOF
33216if ac_fn_c_try_link "$LINENO"; then :
33217 ac_cv_sys_largefile_source=no; break
33218fi
33219rm -f core conftest.err conftest.$ac_objext \
33220 conftest$ac_exeext conftest.$ac_ext
33221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33222/* end confdefs.h. */
33223#define _LARGEFILE_SOURCE 1
33224#include <sys/types.h> /* for off_t */
33225 #include <stdio.h>
33226int
33227main ()
33228{
33229int (*fp) (FILE *, off_t, int) = fseeko;
33230 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
33231 ;
33232 return 0;
33233}
33234_ACEOF
33235if ac_fn_c_try_link "$LINENO"; then :
33236 ac_cv_sys_largefile_source=1; break
33237fi
33238rm -f core conftest.err conftest.$ac_objext \
33239 conftest$ac_exeext conftest.$ac_ext
33240 ac_cv_sys_largefile_source=unknown
33241 break
33242done
33243fi
33244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
33245$as_echo "$ac_cv_sys_largefile_source" >&6; }
33246case $ac_cv_sys_largefile_source in #(
33247 no | unknown) ;;
33248 *)
33249cat >>confdefs.h <<_ACEOF
33250#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
33251_ACEOF
33252;;
33253esac
33254rm -rf conftest*
33255
33256# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
33257# in glibc 2.1.3, but that breaks too many other things.
33258# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
33259if test $ac_cv_sys_largefile_source != unknown; then
33260
33261$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
33262
33263fi
33264
33265for ac_func in strptime timegm vsnprintf vasprintf drand48
33266do :
33267 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
33268ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
33269if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
33270 cat >>confdefs.h <<_ACEOF
33271#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
33272_ACEOF
33273
33274fi
33275done
33276
33277for ac_func in strtoll usleep ftello sigblock sigsetjmp memrchr wcwidth mbtowc
33278do :
33279 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
33280ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
33281if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
33282 cat >>confdefs.h <<_ACEOF
33283#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
33284_ACEOF
33285
33286fi
33287done
33288
33289for ac_func in sleep symlink utime
33290do :
33291 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
33292ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
33293if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
33294 cat >>confdefs.h <<_ACEOF
33295#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
33296_ACEOF
33297
33298fi
33299done
33300
33301
33302if test x"$ENABLE_OPIE" = xyes; then
33303 case " $LIBOBJS " in
33304 *" ftp-opie.$ac_objext "* ) ;;
33305 *) LIBOBJS="$LIBOBJS ftp-opie.$ac_objext"
33306 ;;
33307esac
33308
33309fi
33310
33311
33312$as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h
33313
33314
33315$as_echo "#define HAVE_STRNCASECMP 1" >>confdefs.h
33316
33317
33318$as_echo "#define HAVE_STRDUP 1" >>confdefs.h
33319
33320
33321$as_echo "#define HAVE_ISATTY 1" >>confdefs.h
33322
33323
33324
33325 ac_fn_c_check_type "$LINENO" "struct utimbuf" "ac_cv_type_struct_utimbuf" "
33326#include <stdio.h>
33327#if HAVE_SYS_TYPES_H
33328# include <sys/types.h>
33329#endif
33330#if HAVE_UTIME_H
33331# include <utime.h>
33332#endif
33333
33334"
33335if test "x$ac_cv_type_struct_utimbuf" = xyes; then :
33336
33337cat >>confdefs.h <<_ACEOF
33338#define HAVE_STRUCT_UTIMBUF 1
33339_ACEOF
33340
33341
33342fi
33343
33344
33345
33346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fnmatch.h" >&5
33347$as_echo_n "checking for working fnmatch.h... " >&6; }
33348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33349/* end confdefs.h. */
33350#include <fnmatch.h>
33351
33352_ACEOF
33353if ac_fn_c_try_compile "$LINENO"; then :
33354
33355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33356$as_echo "yes" >&6; }
33357
33358$as_echo "#define HAVE_WORKING_FNMATCH_H 1" >>confdefs.h
33359
33360
33361else
33362
33363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33364$as_echo "no" >&6; }
33365
33366fi
33367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33368
33369
33370 for ac_func in nanosleep
33371do :
33372 ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
33373if test "x$ac_cv_func_nanosleep" = xyes; then :
33374 cat >>confdefs.h <<_ACEOF
33375#define HAVE_NANOSLEEP 1
33376_ACEOF
33377
33378else
33379
33380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5
33381$as_echo_n "checking for nanosleep in -lrt... " >&6; }
33382if ${ac_cv_lib_rt_nanosleep+:} false; then :
33383 $as_echo_n "(cached) " >&6
33384else
33385 ac_check_lib_save_LIBS=$LIBS
33386LIBS="-lrt $LIBS"
33387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33388/* end confdefs.h. */
33389
33390/* Override any GCC internal prototype to avoid an error.
33391 Use char because int might match the return type of a GCC
33392 builtin and then its argument prototype would still apply. */
33393#ifdef __cplusplus
33394extern "C"
33395#endif
33396char nanosleep ();
33397int
33398main ()
33399{
33400return nanosleep ();
33401 ;
33402 return 0;
33403}
33404_ACEOF
33405if ac_fn_c_try_link "$LINENO"; then :
33406 ac_cv_lib_rt_nanosleep=yes
33407else
33408 ac_cv_lib_rt_nanosleep=no
33409fi
33410rm -f core conftest.err conftest.$ac_objext \
33411 conftest$ac_exeext conftest.$ac_ext
33412LIBS=$ac_check_lib_save_LIBS
33413fi
33414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5
33415$as_echo "$ac_cv_lib_rt_nanosleep" >&6; }
33416if test "x$ac_cv_lib_rt_nanosleep" = xyes; then :
33417
33418
33419$as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h
33420
33421 LIBS="-lrt $LIBS"
33422
33423else
33424
33425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lposix4" >&5
33426$as_echo_n "checking for nanosleep in -lposix4... " >&6; }
33427if ${ac_cv_lib_posix4_nanosleep+:} false; then :
33428 $as_echo_n "(cached) " >&6
33429else
33430 ac_check_lib_save_LIBS=$LIBS
33431LIBS="-lposix4 $LIBS"
33432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33433/* end confdefs.h. */
33434
33435/* Override any GCC internal prototype to avoid an error.
33436 Use char because int might match the return type of a GCC
33437 builtin and then its argument prototype would still apply. */
33438#ifdef __cplusplus
33439extern "C"
33440#endif
33441char nanosleep ();
33442int
33443main ()
33444{
33445return nanosleep ();
33446 ;
33447 return 0;
33448}
33449_ACEOF
33450if ac_fn_c_try_link "$LINENO"; then :
33451 ac_cv_lib_posix4_nanosleep=yes
33452else
33453 ac_cv_lib_posix4_nanosleep=no
33454fi
33455rm -f core conftest.err conftest.$ac_objext \
33456 conftest$ac_exeext conftest.$ac_ext
33457LIBS=$ac_check_lib_save_LIBS
33458fi
33459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_nanosleep" >&5
33460$as_echo "$ac_cv_lib_posix4_nanosleep" >&6; }
33461if test "x$ac_cv_lib_posix4_nanosleep" = xyes; then :
33462
33463
33464$as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h
33465
33466 LIBS="-lposix4 $LIBS"
33467
33468fi
33469
33470
33471fi
33472
33473
33474fi
33475done
33476
33477
33478
33479 for ac_func in clock_gettime
33480do :
33481 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
33482if test "x$ac_cv_func_clock_gettime" = xyes; then :
33483 cat >>confdefs.h <<_ACEOF
33484#define HAVE_CLOCK_GETTIME 1
33485_ACEOF
33486
33487else
33488
33489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
33490$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
33491if ${ac_cv_lib_rt_clock_gettime+:} false; then :
33492 $as_echo_n "(cached) " >&6
33493else
33494 ac_check_lib_save_LIBS=$LIBS
33495LIBS="-lrt $LIBS"
33496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33497/* end confdefs.h. */
33498
33499/* Override any GCC internal prototype to avoid an error.
33500 Use char because int might match the return type of a GCC
33501 builtin and then its argument prototype would still apply. */
33502#ifdef __cplusplus
33503extern "C"
33504#endif
33505char clock_gettime ();
33506int
33507main ()
33508{
33509return clock_gettime ();
33510 ;
33511 return 0;
33512}
33513_ACEOF
33514if ac_fn_c_try_link "$LINENO"; then :
33515 ac_cv_lib_rt_clock_gettime=yes
33516else
33517 ac_cv_lib_rt_clock_gettime=no
33518fi
33519rm -f core conftest.err conftest.$ac_objext \
33520 conftest$ac_exeext conftest.$ac_ext
33521LIBS=$ac_check_lib_save_LIBS
33522fi
33523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
33524$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
33525if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
33526 cat >>confdefs.h <<_ACEOF
33527#define HAVE_LIBRT 1
33528_ACEOF
33529
33530 LIBS="-lrt $LIBS"
33531
33532fi
33533
33534
33535fi
33536done
33537
33538
33539
33540 wget_check_in_nsl=NONE
33541 for ac_func in gethostbyname
33542do :
33543 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
33544if test "x$ac_cv_func_gethostbyname" = xyes; then :
33545 cat >>confdefs.h <<_ACEOF
33546#define HAVE_GETHOSTBYNAME 1
33547_ACEOF
33548
33549else
33550
33551 wget_check_in_nsl=gethostbyname
33552
33553fi
33554done
33555
33556 for ac_func in inet_ntoa
33557do :
33558 ac_fn_c_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa"
33559if test "x$ac_cv_func_inet_ntoa" = xyes; then :
33560 cat >>confdefs.h <<_ACEOF
33561#define HAVE_INET_NTOA 1
33562_ACEOF
33563
33564else
33565
33566 wget_check_in_nsl=inet_ntoa
33567
33568fi
33569done
33570
33571 if test $wget_check_in_nsl != NONE; then
33572 as_ac_Lib=`$as_echo "ac_cv_lib_nsl_$wget_check_in_nsl" | $as_tr_sh`
33573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $wget_check_in_nsl in -lnsl" >&5
33574$as_echo_n "checking for $wget_check_in_nsl in -lnsl... " >&6; }
33575if eval \${$as_ac_Lib+:} false; then :
33576 $as_echo_n "(cached) " >&6
33577else
33578 ac_check_lib_save_LIBS=$LIBS
33579LIBS="-lnsl $LIBS"
33580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33581/* end confdefs.h. */
33582
33583/* Override any GCC internal prototype to avoid an error.
33584 Use char because int might match the return type of a GCC
33585 builtin and then its argument prototype would still apply. */
33586#ifdef __cplusplus
33587extern "C"
33588#endif
33589char $wget_check_in_nsl ();
33590int
33591main ()
33592{
33593return $wget_check_in_nsl ();
33594 ;
33595 return 0;
33596}
33597_ACEOF
33598if ac_fn_c_try_link "$LINENO"; then :
33599 eval "$as_ac_Lib=yes"
33600else
33601 eval "$as_ac_Lib=no"
33602fi
33603rm -f core conftest.err conftest.$ac_objext \
33604 conftest$ac_exeext conftest.$ac_ext
33605LIBS=$ac_check_lib_save_LIBS
33606fi
33607eval ac_res=\$$as_ac_Lib
33608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33609$as_echo "$ac_res" >&6; }
33610if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
33611 cat >>confdefs.h <<_ACEOF
33612#define HAVE_LIBNSL 1
33613_ACEOF
33614
33615 LIBS="-lnsl $LIBS"
33616
33617fi
33618
33619 fi
33620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
33621$as_echo_n "checking for socket in -lsocket... " >&6; }
33622if ${ac_cv_lib_socket_socket+:} false; then :
33623 $as_echo_n "(cached) " >&6
33624else
33625 ac_check_lib_save_LIBS=$LIBS
33626LIBS="-lsocket $LIBS"
33627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33628/* end confdefs.h. */
33629
33630/* Override any GCC internal prototype to avoid an error.
33631 Use char because int might match the return type of a GCC
33632 builtin and then its argument prototype would still apply. */
33633#ifdef __cplusplus
33634extern "C"
33635#endif
33636char socket ();
33637int
33638main ()
33639{
33640return socket ();
33641 ;
33642 return 0;
33643}
33644_ACEOF
33645if ac_fn_c_try_link "$LINENO"; then :
33646 ac_cv_lib_socket_socket=yes
33647else
33648 ac_cv_lib_socket_socket=no
33649fi
33650rm -f core conftest.err conftest.$ac_objext \
33651 conftest$ac_exeext conftest.$ac_ext
33652LIBS=$ac_check_lib_save_LIBS
33653fi
33654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
33655$as_echo "$ac_cv_lib_socket_socket" >&6; }
33656if test "x$ac_cv_lib_socket_socket" = xyes; then :
33657 cat >>confdefs.h <<_ACEOF
33658#define HAVE_LIBSOCKET 1
33659_ACEOF
33660
33661 LIBS="-lsocket $LIBS"
33662
33663fi
33664
33665
33666
33667case $host_os in
33668 *mingw32* )
33669 LIBS+=' -lws2_32'
33670 case " $LIBOBJS " in
33671 *" mswindows.$ac_objext "* ) ;;
33672 *) LIBOBJS="$LIBOBJS mswindows.$ac_objext"
33673 ;;
33674esac
33675
33676 ;;
33677esac
33678
33679
33680
33681if test x"$with_zlib" != xno; then :
33682
33683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
33684$as_echo_n "checking for compress in -lz... " >&6; }
33685if ${ac_cv_lib_z_compress+:} false; then :
33686 $as_echo_n "(cached) " >&6
33687else
33688 ac_check_lib_save_LIBS=$LIBS
33689LIBS="-lz $LIBS"
33690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33691/* end confdefs.h. */
33692
33693/* Override any GCC internal prototype to avoid an error.
33694 Use char because int might match the return type of a GCC
33695 builtin and then its argument prototype would still apply. */
33696#ifdef __cplusplus
33697extern "C"
33698#endif
33699char compress ();
33700int
33701main ()
33702{
33703return compress ();
33704 ;
33705 return 0;
33706}
33707_ACEOF
33708if ac_fn_c_try_link "$LINENO"; then :
33709 ac_cv_lib_z_compress=yes
33710else
33711 ac_cv_lib_z_compress=no
33712fi
33713rm -f core conftest.err conftest.$ac_objext \
33714 conftest$ac_exeext conftest.$ac_ext
33715LIBS=$ac_check_lib_save_LIBS
33716fi
33717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
33718$as_echo "$ac_cv_lib_z_compress" >&6; }
33719if test "x$ac_cv_lib_z_compress" = xyes; then :
33720 cat >>confdefs.h <<_ACEOF
33721#define HAVE_LIBZ 1
33722_ACEOF
33723
33724 LIBS="-lz $LIBS"
33725
33726fi
33727
33728
33729fi
33730
33731if test x"$with_ssl" = xopenssl; then :
33732
33733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
33734$as_echo_n "checking for compress in -lz... " >&6; }
33735if ${ac_cv_lib_z_compress+:} false; then :
33736 $as_echo_n "(cached) " >&6
33737else
33738 ac_check_lib_save_LIBS=$LIBS
33739LIBS="-lz $LIBS"
33740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33741/* end confdefs.h. */
33742
33743/* Override any GCC internal prototype to avoid an error.
33744 Use char because int might match the return type of a GCC
33745 builtin and then its argument prototype would still apply. */
33746#ifdef __cplusplus
33747extern "C"
33748#endif
33749char compress ();
33750int
33751main ()
33752{
33753return compress ();
33754 ;
33755 return 0;
33756}
33757_ACEOF
33758if ac_fn_c_try_link "$LINENO"; then :
33759 ac_cv_lib_z_compress=yes
33760else
33761 ac_cv_lib_z_compress=no
33762fi
33763rm -f core conftest.err conftest.$ac_objext \
33764 conftest$ac_exeext conftest.$ac_ext
33765LIBS=$ac_check_lib_save_LIBS
33766fi
33767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
33768$as_echo "$ac_cv_lib_z_compress" >&6; }
33769if test "x$ac_cv_lib_z_compress" = xyes; then :
33770 cat >>confdefs.h <<_ACEOF
33771#define HAVE_LIBZ 1
33772_ACEOF
33773
33774 LIBS="-lz $LIBS"
33775
33776fi
33777
33778
33779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
33780$as_echo_n "checking for dlopen in -ldl... " >&6; }
33781if ${ac_cv_lib_dl_dlopen+:} false; then :
33782 $as_echo_n "(cached) " >&6
33783else
33784 ac_check_lib_save_LIBS=$LIBS
33785LIBS="-ldl $LIBS"
33786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33787/* end confdefs.h. */
33788
33789/* Override any GCC internal prototype to avoid an error.
33790 Use char because int might match the return type of a GCC
33791 builtin and then its argument prototype would still apply. */
33792#ifdef __cplusplus
33793extern "C"
33794#endif
33795char dlopen ();
33796int
33797main ()
33798{
33799return dlopen ();
33800 ;
33801 return 0;
33802}
33803_ACEOF
33804if ac_fn_c_try_link "$LINENO"; then :
33805 ac_cv_lib_dl_dlopen=yes
33806else
33807 ac_cv_lib_dl_dlopen=no
33808fi
33809rm -f core conftest.err conftest.$ac_objext \
33810 conftest$ac_exeext conftest.$ac_ext
33811LIBS=$ac_check_lib_save_LIBS
33812fi
33813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
33814$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
33815if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
33816 cat >>confdefs.h <<_ACEOF
33817#define HAVE_LIBDL 1
33818_ACEOF
33819
33820 LIBS="-ldl $LIBS"
33821
33822else
33823
33824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldl" >&5
33825$as_echo_n "checking for shl_load in -ldl... " >&6; }
33826if ${ac_cv_lib_dl_shl_load+:} false; then :
33827 $as_echo_n "(cached) " >&6
33828else
33829 ac_check_lib_save_LIBS=$LIBS
33830LIBS="-ldl $LIBS"
33831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33832/* end confdefs.h. */
33833
33834/* Override any GCC internal prototype to avoid an error.
33835 Use char because int might match the return type of a GCC
33836 builtin and then its argument prototype would still apply. */
33837#ifdef __cplusplus
33838extern "C"
33839#endif
33840char shl_load ();
33841int
33842main ()
33843{
33844return shl_load ();
33845 ;
33846 return 0;
33847}
33848_ACEOF
33849if ac_fn_c_try_link "$LINENO"; then :
33850 ac_cv_lib_dl_shl_load=yes
33851else
33852 ac_cv_lib_dl_shl_load=no
33853fi
33854rm -f core conftest.err conftest.$ac_objext \
33855 conftest$ac_exeext conftest.$ac_ext
33856LIBS=$ac_check_lib_save_LIBS
33857fi
33858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_shl_load" >&5
33859$as_echo "$ac_cv_lib_dl_shl_load" >&6; }
33860if test "x$ac_cv_lib_dl_shl_load" = xyes; then :
33861 cat >>confdefs.h <<_ACEOF
33862#define HAVE_LIBDL 1
33863_ACEOF
33864
33865 LIBS="-ldl $LIBS"
33866
33867fi
33868
33869
33870fi
33871
33872
33873 ssl_found=no
33874 case $host_os in
33875 *mingw32* )
33876
33877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_init in -leay32" >&5
33878$as_echo_n "checking for EVP_MD_CTX_init in -leay32... " >&6; }
33879if ${ac_cv_lib_eay32_EVP_MD_CTX_init+:} false; then :
33880 $as_echo_n "(cached) " >&6
33881else
33882 ac_check_lib_save_LIBS=$LIBS
33883LIBS="-leay32 $LIBS"
33884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33885/* end confdefs.h. */
33886
33887/* Override any GCC internal prototype to avoid an error.
33888 Use char because int might match the return type of a GCC
33889 builtin and then its argument prototype would still apply. */
33890#ifdef __cplusplus
33891extern "C"
33892#endif
33893char EVP_MD_CTX_init ();
33894int
33895main ()
33896{
33897return EVP_MD_CTX_init ();
33898 ;
33899 return 0;
33900}
33901_ACEOF
33902if ac_fn_c_try_link "$LINENO"; then :
33903 ac_cv_lib_eay32_EVP_MD_CTX_init=yes
33904else
33905 ac_cv_lib_eay32_EVP_MD_CTX_init=no
33906fi
33907rm -f core conftest.err conftest.$ac_objext \
33908 conftest$ac_exeext conftest.$ac_ext
33909LIBS=$ac_check_lib_save_LIBS
33910fi
33911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_eay32_EVP_MD_CTX_init" >&5
33912$as_echo "$ac_cv_lib_eay32_EVP_MD_CTX_init" >&6; }
33913if test "x$ac_cv_lib_eay32_EVP_MD_CTX_init" = xyes; then :
33914 cat >>confdefs.h <<_ACEOF
33915#define HAVE_LIBEAY32 1
33916_ACEOF
33917
33918 LIBS="-leay32 $LIBS"
33919
33920fi
33921
33922 if test x"$ac_cv_lib_eay32_EVP_MD_CTX_init" != xno
33923 then
33924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_connect in -lssl32" >&5
33925$as_echo_n "checking for SSL_connect in -lssl32... " >&6; }
33926if ${ac_cv_lib_ssl32_SSL_connect+:} false; then :
33927 $as_echo_n "(cached) " >&6
33928else
33929 ac_check_lib_save_LIBS=$LIBS
33930LIBS="-lssl32 $LIBS"
33931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33932/* end confdefs.h. */
33933
33934/* Override any GCC internal prototype to avoid an error.
33935 Use char because int might match the return type of a GCC
33936 builtin and then its argument prototype would still apply. */
33937#ifdef __cplusplus
33938extern "C"
33939#endif
33940char SSL_connect ();
33941int
33942main ()
33943{
33944return SSL_connect ();
33945 ;
33946 return 0;
33947}
33948_ACEOF
33949if ac_fn_c_try_link "$LINENO"; then :
33950 ac_cv_lib_ssl32_SSL_connect=yes
33951else
33952 ac_cv_lib_ssl32_SSL_connect=no
33953fi
33954rm -f core conftest.err conftest.$ac_objext \
33955 conftest$ac_exeext conftest.$ac_ext
33956LIBS=$ac_check_lib_save_LIBS
33957fi
33958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl32_SSL_connect" >&5
33959$as_echo "$ac_cv_lib_ssl32_SSL_connect" >&6; }
33960if test "x$ac_cv_lib_ssl32_SSL_connect" = xyes; then :
33961
33962 ssl_found=yes
33963 { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling support for SSL via OpenSSL (shared)" >&5
33964$as_echo "$as_me: Enabling support for SSL via OpenSSL (shared)" >&6;}
33965 case " $LIBOBJS " in
33966 *" openssl.$ac_objext "* ) ;;
33967 *) LIBOBJS="$LIBOBJS openssl.$ac_objext"
33968 ;;
33969esac
33970
33971 LIBS="${LIBS} -lssl32"
33972
33973$as_echo "#define HAVE_LIBSSL32 1" >>confdefs.h
33974
33975
33976else
33977 as_fn_error $? "openssl not found: shared lib eay32 found but ssl32 not found" "$LINENO" 5
33978fi
33979
33980
33981 else
33982 LIBS+=' -lgdi32'
33983 fi
33984 ;;
33985 esac
33986
33987if test x$ssl_found != xyes; then :
33988
33989
33990
33991
33992
33993
33994
33995
33996
33997
33998
33999
34000
34001
34002 use_additional=yes
34003
34004 acl_save_prefix="$prefix"
34005 prefix="$acl_final_prefix"
34006 acl_save_exec_prefix="$exec_prefix"
34007 exec_prefix="$acl_final_exec_prefix"
34008
34009 eval additional_includedir=\"$includedir\"
34010 eval additional_libdir=\"$libdir\"
34011
34012 exec_prefix="$acl_save_exec_prefix"
34013 prefix="$acl_save_prefix"
34014
34015
34016# Check whether --with-libssl-prefix was given.
34017if test "${with_libssl_prefix+set}" = set; then :
34018 withval=$with_libssl_prefix;
34019 if test "X$withval" = "Xno"; then
34020 use_additional=no
34021 else
34022 if test "X$withval" = "X"; then
34023
34024 acl_save_prefix="$prefix"
34025 prefix="$acl_final_prefix"
34026 acl_save_exec_prefix="$exec_prefix"
34027 exec_prefix="$acl_final_exec_prefix"
34028
34029 eval additional_includedir=\"$includedir\"
34030 eval additional_libdir=\"$libdir\"
34031
34032 exec_prefix="$acl_save_exec_prefix"
34033 prefix="$acl_save_prefix"
34034
34035 else
34036 additional_includedir="$withval/include"
34037 additional_libdir="$withval/$acl_libdirstem"
34038 if test "$acl_libdirstem2" != "$acl_libdirstem" \
34039 && ! test -d "$withval/$acl_libdirstem"; then
34040 additional_libdir="$withval/$acl_libdirstem2"
34041 fi
34042 fi
34043 fi
34044
34045fi
34046
34047 LIBSSL=
34048 LTLIBSSL=
34049 INCSSL=
34050 LIBSSL_PREFIX=
34051 HAVE_LIBSSL=
34052 rpathdirs=
34053 ltrpathdirs=
34054 names_already_handled=
34055 names_next_round='ssl crypto z'
34056 while test -n "$names_next_round"; do
34057 names_this_round="$names_next_round"
34058 names_next_round=
34059 for name in $names_this_round; do
34060 already_handled=
34061 for n in $names_already_handled; do
34062 if test "$n" = "$name"; then
34063 already_handled=yes
34064 break
34065 fi
34066 done
34067 if test -z "$already_handled"; then
34068 names_already_handled="$names_already_handled $name"
34069 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
34070 eval value=\"\$HAVE_LIB$uppername\"
34071 if test -n "$value"; then
34072 if test "$value" = yes; then
34073 eval value=\"\$LIB$uppername\"
34074 test -z "$value" || LIBSSL="${LIBSSL}${LIBSSL:+ }$value"
34075 eval value=\"\$LTLIB$uppername\"
34076 test -z "$value" || LTLIBSSL="${LTLIBSSL}${LTLIBSSL:+ }$value"
34077 else
34078 :
34079 fi
34080 else
34081 found_dir=
34082 found_la=
34083 found_so=
34084 found_a=
34085 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
34086 if test -n "$acl_shlibext"; then
34087 shrext=".$acl_shlibext" # typically: shrext=.so
34088 else
34089 shrext=
34090 fi
34091 if test $use_additional = yes; then
34092 dir="$additional_libdir"
34093 if test -n "$acl_shlibext"; then
34094 if test -f "$dir/$libname$shrext"; then
34095 found_dir="$dir"
34096 found_so="$dir/$libname$shrext"
34097 else
34098 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
34099 ver=`(cd "$dir" && \
34100 for f in "$libname$shrext".*; do echo "$f"; done \
34101 | sed -e "s,^$libname$shrext\\\\.,," \
34102 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
34103 | sed 1q ) 2>/dev/null`
34104 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
34105 found_dir="$dir"
34106 found_so="$dir/$libname$shrext.$ver"
34107 fi
34108 else
34109 eval library_names=\"$acl_library_names_spec\"
34110 for f in $library_names; do
34111 if test -f "$dir/$f"; then
34112 found_dir="$dir"
34113 found_so="$dir/$f"
34114 break
34115 fi
34116 done
34117 fi
34118 fi
34119 fi
34120 if test "X$found_dir" = "X"; then
34121 if test -f "$dir/$libname.$acl_libext"; then
34122 found_dir="$dir"
34123 found_a="$dir/$libname.$acl_libext"
34124 fi
34125 fi
34126 if test "X$found_dir" != "X"; then
34127 if test -f "$dir/$libname.la"; then
34128 found_la="$dir/$libname.la"
34129 fi
34130 fi
34131 fi
34132 if test "X$found_dir" = "X"; then
34133 for x in $LDFLAGS $LTLIBSSL; do
34134
34135 acl_save_prefix="$prefix"
34136 prefix="$acl_final_prefix"
34137 acl_save_exec_prefix="$exec_prefix"
34138 exec_prefix="$acl_final_exec_prefix"
34139 eval x=\"$x\"
34140 exec_prefix="$acl_save_exec_prefix"
34141 prefix="$acl_save_prefix"
34142
34143 case "$x" in
34144 -L*)
34145 dir=`echo "X$x" | sed -e 's/^X-L//'`
34146 if test -n "$acl_shlibext"; then
34147 if test -f "$dir/$libname$shrext"; then
34148 found_dir="$dir"
34149 found_so="$dir/$libname$shrext"
34150 else
34151 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
34152 ver=`(cd "$dir" && \
34153 for f in "$libname$shrext".*; do echo "$f"; done \
34154 | sed -e "s,^$libname$shrext\\\\.,," \
34155 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
34156 | sed 1q ) 2>/dev/null`
34157 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
34158 found_dir="$dir"
34159 found_so="$dir/$libname$shrext.$ver"
34160 fi
34161 else
34162 eval library_names=\"$acl_library_names_spec\"
34163 for f in $library_names; do
34164 if test -f "$dir/$f"; then
34165 found_dir="$dir"
34166 found_so="$dir/$f"
34167 break
34168 fi
34169 done
34170 fi
34171 fi
34172 fi
34173 if test "X$found_dir" = "X"; then
34174 if test -f "$dir/$libname.$acl_libext"; then
34175 found_dir="$dir"
34176 found_a="$dir/$libname.$acl_libext"
34177 fi
34178 fi
34179 if test "X$found_dir" != "X"; then
34180 if test -f "$dir/$libname.la"; then
34181 found_la="$dir/$libname.la"
34182 fi
34183 fi
34184 ;;
34185 esac
34186 if test "X$found_dir" != "X"; then
34187 break
34188 fi
34189 done
34190 fi
34191 if test "X$found_dir" != "X"; then
34192 LTLIBSSL="${LTLIBSSL}${LTLIBSSL:+ }-L$found_dir -l$name"
34193 if test "X$found_so" != "X"; then
34194 if test "$enable_rpath" = no \
34195 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
34196 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
34197 LIBSSL="${LIBSSL}${LIBSSL:+ }$found_so"
34198 else
34199 haveit=
34200 for x in $ltrpathdirs; do
34201 if test "X$x" = "X$found_dir"; then
34202 haveit=yes
34203 break
34204 fi
34205 done
34206 if test -z "$haveit"; then
34207 ltrpathdirs="$ltrpathdirs $found_dir"
34208 fi
34209 if test "$acl_hardcode_direct" = yes; then
34210 LIBSSL="${LIBSSL}${LIBSSL:+ }$found_so"
34211 else
34212 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
34213 LIBSSL="${LIBSSL}${LIBSSL:+ }$found_so"
34214 haveit=
34215 for x in $rpathdirs; do
34216 if test "X$x" = "X$found_dir"; then
34217 haveit=yes
34218 break
34219 fi
34220 done
34221 if test -z "$haveit"; then
34222 rpathdirs="$rpathdirs $found_dir"
34223 fi
34224 else
34225 haveit=
34226 for x in $LDFLAGS $LIBSSL; do
34227
34228 acl_save_prefix="$prefix"
34229 prefix="$acl_final_prefix"
34230 acl_save_exec_prefix="$exec_prefix"
34231 exec_prefix="$acl_final_exec_prefix"
34232 eval x=\"$x\"
34233 exec_prefix="$acl_save_exec_prefix"
34234 prefix="$acl_save_prefix"
34235
34236 if test "X$x" = "X-L$found_dir"; then
34237 haveit=yes
34238 break
34239 fi
34240 done
34241 if test -z "$haveit"; then
34242 LIBSSL="${LIBSSL}${LIBSSL:+ }-L$found_dir"
34243 fi
34244 if test "$acl_hardcode_minus_L" != no; then
34245 LIBSSL="${LIBSSL}${LIBSSL:+ }$found_so"
34246 else
34247 LIBSSL="${LIBSSL}${LIBSSL:+ }-l$name"
34248 fi
34249 fi
34250 fi
34251 fi
34252 else
34253 if test "X$found_a" != "X"; then
34254 LIBSSL="${LIBSSL}${LIBSSL:+ }$found_a"
34255 else
34256 LIBSSL="${LIBSSL}${LIBSSL:+ }-L$found_dir -l$name"
34257 fi
34258 fi
34259 additional_includedir=
34260 case "$found_dir" in
34261 */$acl_libdirstem | */$acl_libdirstem/)
34262 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
34263 if test "$name" = 'ssl'; then
34264 LIBSSL_PREFIX="$basedir"
34265 fi
34266 additional_includedir="$basedir/include"
34267 ;;
34268 */$acl_libdirstem2 | */$acl_libdirstem2/)
34269 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
34270 if test "$name" = 'ssl'; then
34271 LIBSSL_PREFIX="$basedir"
34272 fi
34273 additional_includedir="$basedir/include"
34274 ;;
34275 esac
34276 if test "X$additional_includedir" != "X"; then
34277 if test "X$additional_includedir" != "X/usr/include"; then
34278 haveit=
34279 if test "X$additional_includedir" = "X/usr/local/include"; then
34280 if test -n "$GCC"; then
34281 case $host_os in
34282 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
34283 esac
34284 fi
34285 fi
34286 if test -z "$haveit"; then
34287 for x in $CPPFLAGS $INCSSL; do
34288
34289 acl_save_prefix="$prefix"
34290 prefix="$acl_final_prefix"
34291 acl_save_exec_prefix="$exec_prefix"
34292 exec_prefix="$acl_final_exec_prefix"
34293 eval x=\"$x\"
34294 exec_prefix="$acl_save_exec_prefix"
34295 prefix="$acl_save_prefix"
34296
34297 if test "X$x" = "X-I$additional_includedir"; then
34298 haveit=yes
34299 break
34300 fi
34301 done
34302 if test -z "$haveit"; then
34303 if test -d "$additional_includedir"; then
34304 INCSSL="${INCSSL}${INCSSL:+ }-I$additional_includedir"
34305 fi
34306 fi
34307 fi
34308 fi
34309 fi
34310 if test -n "$found_la"; then
34311 save_libdir="$libdir"
34312 case "$found_la" in
34313 */* | *\\*) . "$found_la" ;;
34314 *) . "./$found_la" ;;
34315 esac
34316 libdir="$save_libdir"
34317 for dep in $dependency_libs; do
34318 case "$dep" in
34319 -L*)
34320 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
34321 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
34322 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
34323 haveit=
34324 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
34325 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
34326 if test -n "$GCC"; then
34327 case $host_os in
34328 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
34329 esac
34330 fi
34331 fi
34332 if test -z "$haveit"; then
34333 haveit=
34334 for x in $LDFLAGS $LIBSSL; do
34335
34336 acl_save_prefix="$prefix"
34337 prefix="$acl_final_prefix"
34338 acl_save_exec_prefix="$exec_prefix"
34339 exec_prefix="$acl_final_exec_prefix"
34340 eval x=\"$x\"
34341 exec_prefix="$acl_save_exec_prefix"
34342 prefix="$acl_save_prefix"
34343
34344 if test "X$x" = "X-L$additional_libdir"; then
34345 haveit=yes
34346 break
34347 fi
34348 done
34349 if test -z "$haveit"; then
34350 if test -d "$additional_libdir"; then
34351 LIBSSL="${LIBSSL}${LIBSSL:+ }-L$additional_libdir"
34352 fi
34353 fi
34354 haveit=
34355 for x in $LDFLAGS $LTLIBSSL; do
34356
34357 acl_save_prefix="$prefix"
34358 prefix="$acl_final_prefix"
34359 acl_save_exec_prefix="$exec_prefix"
34360 exec_prefix="$acl_final_exec_prefix"
34361 eval x=\"$x\"
34362 exec_prefix="$acl_save_exec_prefix"
34363 prefix="$acl_save_prefix"
34364
34365 if test "X$x" = "X-L$additional_libdir"; then
34366 haveit=yes
34367 break
34368 fi
34369 done
34370 if test -z "$haveit"; then
34371 if test -d "$additional_libdir"; then
34372 LTLIBSSL="${LTLIBSSL}${LTLIBSSL:+ }-L$additional_libdir"
34373 fi
34374 fi
34375 fi
34376 fi
34377 ;;
34378 -R*)
34379 dir=`echo "X$dep" | sed -e 's/^X-R//'`
34380 if test "$enable_rpath" != no; then
34381 haveit=
34382 for x in $rpathdirs; do
34383 if test "X$x" = "X$dir"; then
34384 haveit=yes
34385 break
34386 fi
34387 done
34388 if test -z "$haveit"; then
34389 rpathdirs="$rpathdirs $dir"
34390 fi
34391 haveit=
34392 for x in $ltrpathdirs; do
34393 if test "X$x" = "X$dir"; then
34394 haveit=yes
34395 break
34396 fi
34397 done
34398 if test -z "$haveit"; then
34399 ltrpathdirs="$ltrpathdirs $dir"
34400 fi
34401 fi
34402 ;;
34403 -l*)
34404 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
34405 ;;
34406 *.la)
34407 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
34408 ;;
34409 *)
34410 LIBSSL="${LIBSSL}${LIBSSL:+ }$dep"
34411 LTLIBSSL="${LTLIBSSL}${LTLIBSSL:+ }$dep"
34412 ;;
34413 esac
34414 done
34415 fi
34416 else
34417 LIBSSL="${LIBSSL}${LIBSSL:+ }-l$name"
34418 LTLIBSSL="${LTLIBSSL}${LTLIBSSL:+ }-l$name"
34419 fi
34420 fi
34421 fi
34422 done
34423 done
34424 if test "X$rpathdirs" != "X"; then
34425 if test -n "$acl_hardcode_libdir_separator"; then
34426 alldirs=
34427 for found_dir in $rpathdirs; do
34428 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
34429 done
34430 acl_save_libdir="$libdir"
34431 libdir="$alldirs"
34432 eval flag=\"$acl_hardcode_libdir_flag_spec\"
34433 libdir="$acl_save_libdir"
34434 LIBSSL="${LIBSSL}${LIBSSL:+ }$flag"
34435 else
34436 for found_dir in $rpathdirs; do
34437 acl_save_libdir="$libdir"
34438 libdir="$found_dir"
34439 eval flag=\"$acl_hardcode_libdir_flag_spec\"
34440 libdir="$acl_save_libdir"
34441 LIBSSL="${LIBSSL}${LIBSSL:+ }$flag"
34442 done
34443 fi
34444 fi
34445 if test "X$ltrpathdirs" != "X"; then
34446 for found_dir in $ltrpathdirs; do
34447 LTLIBSSL="${LTLIBSSL}${LTLIBSSL:+ }-R$found_dir"
34448 done
34449 fi
34450
34451
34452
34453
34454
34455
34456
34457 ac_save_CPPFLAGS="$CPPFLAGS"
34458
34459 for element in $INCSSL; do
34460 haveit=
34461 for x in $CPPFLAGS; do
34462
34463 acl_save_prefix="$prefix"
34464 prefix="$acl_final_prefix"
34465 acl_save_exec_prefix="$exec_prefix"
34466 exec_prefix="$acl_final_exec_prefix"
34467 eval x=\"$x\"
34468 exec_prefix="$acl_save_exec_prefix"
34469 prefix="$acl_save_prefix"
34470
34471 if test "X$x" = "X$element"; then
34472 haveit=yes
34473 break
34474 fi
34475 done
34476 if test -z "$haveit"; then
34477 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
34478 fi
34479 done
34480
34481
34482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssl" >&5
34483$as_echo_n "checking for libssl... " >&6; }
34484if ${ac_cv_libssl+:} false; then :
34485 $as_echo_n "(cached) " >&6
34486else
34487
34488 ac_save_LIBS="$LIBS"
34489 case " $LIBSSL" in
34490 *" -l"*) LIBS="$LIBS $LIBSSL" ;;
34491 *) LIBS="$LIBSSL $LIBS" ;;
34492 esac
34493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34494/* end confdefs.h. */
34495
34496 #include <openssl/ssl.h>
34497 #include <openssl/x509.h>
34498 #include <openssl/err.h>
34499 #include <openssl/rand.h>
34500 #include <openssl/des.h>
34501 #include <openssl/md4.h>
34502 #include <openssl/md5.h>
34503
34504int
34505main ()
34506{
34507SSL_library_init ()
34508 ;
34509 return 0;
34510}
34511_ACEOF
34512if ac_fn_c_try_link "$LINENO"; then :
34513 ac_cv_libssl=yes
34514else
Andrew Sutherland39c0b102013-06-14 01:20:12 -050034515 ac_cv_libssl=yes
Andrew Sutherlandedc69332013-06-13 19:21:25 -050034516fi
34517rm -f core conftest.err conftest.$ac_objext \
34518 conftest$ac_exeext conftest.$ac_ext
34519 LIBS="$ac_save_LIBS"
34520
34521fi
34522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libssl" >&5
34523$as_echo "$ac_cv_libssl" >&6; }
34524 if test "$ac_cv_libssl" = yes; then
34525 HAVE_LIBSSL=yes
34526
34527$as_echo "#define HAVE_LIBSSL 1" >>confdefs.h
34528
34529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libssl" >&5
34530$as_echo_n "checking how to link with libssl... " >&6; }
34531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBSSL" >&5
34532$as_echo "$LIBSSL" >&6; }
34533 else
34534 HAVE_LIBSSL=no
34535 CPPFLAGS="$ac_save_CPPFLAGS"
34536 LIBSSL=
34537 LTLIBSSL=
34538 LIBSSL_PREFIX=
34539 fi
34540
34541
34542
34543
34544
34545
34546
34547 if test x"$LIBSSL" != x
34548 then
34549 ssl_found=yes
34550 { $as_echo "$as_me:${as_lineno-$LINENO}: compiling in support for SSL via OpenSSL" >&5
34551$as_echo "$as_me: compiling in support for SSL via OpenSSL" >&6;}
34552 case " $LIBOBJS " in
34553 *" openssl.$ac_objext "* ) ;;
34554 *) LIBOBJS="$LIBOBJS openssl.$ac_objext"
34555 ;;
34556esac
34557
34558 LIBS="$LIBSSL $LIBS"
34559 elif test x"$with_ssl" != x
34560 then
34561 as_fn_error $? "--with-ssl=openssl was given, but SSL is not available." "$LINENO" 5
34562 fi
34563
34564fi
34565
34566
34567else
34568
34569 # --with-ssl is not gnutls: check if it's no
34570 if test x"$with_ssl" != xno; then :
34571
34572
34573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
34574$as_echo_n "checking for compress in -lz... " >&6; }
34575if ${ac_cv_lib_z_compress+:} false; then :
34576 $as_echo_n "(cached) " >&6
34577else
34578 ac_check_lib_save_LIBS=$LIBS
34579LIBS="-lz $LIBS"
34580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34581/* end confdefs.h. */
34582
34583/* Override any GCC internal prototype to avoid an error.
34584 Use char because int might match the return type of a GCC
34585 builtin and then its argument prototype would still apply. */
34586#ifdef __cplusplus
34587extern "C"
34588#endif
34589char compress ();
34590int
34591main ()
34592{
34593return compress ();
34594 ;
34595 return 0;
34596}
34597_ACEOF
34598if ac_fn_c_try_link "$LINENO"; then :
34599 ac_cv_lib_z_compress=yes
34600else
34601 ac_cv_lib_z_compress=no
34602fi
34603rm -f core conftest.err conftest.$ac_objext \
34604 conftest$ac_exeext conftest.$ac_ext
34605LIBS=$ac_check_lib_save_LIBS
34606fi
34607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
34608$as_echo "$ac_cv_lib_z_compress" >&6; }
34609if test "x$ac_cv_lib_z_compress" = xyes; then :
34610 cat >>confdefs.h <<_ACEOF
34611#define HAVE_LIBZ 1
34612_ACEOF
34613
34614 LIBS="-lz $LIBS"
34615
34616fi
34617
34618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpg_err_init in -lgpg-error" >&5
34619$as_echo_n "checking for gpg_err_init in -lgpg-error... " >&6; }
34620if ${ac_cv_lib_gpg_error_gpg_err_init+:} false; then :
34621 $as_echo_n "(cached) " >&6
34622else
34623 ac_check_lib_save_LIBS=$LIBS
34624LIBS="-lgpg-error $LIBS"
34625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34626/* end confdefs.h. */
34627
34628/* Override any GCC internal prototype to avoid an error.
34629 Use char because int might match the return type of a GCC
34630 builtin and then its argument prototype would still apply. */
34631#ifdef __cplusplus
34632extern "C"
34633#endif
34634char gpg_err_init ();
34635int
34636main ()
34637{
34638return gpg_err_init ();
34639 ;
34640 return 0;
34641}
34642_ACEOF
34643if ac_fn_c_try_link "$LINENO"; then :
34644 ac_cv_lib_gpg_error_gpg_err_init=yes
34645else
34646 ac_cv_lib_gpg_error_gpg_err_init=no
34647fi
34648rm -f core conftest.err conftest.$ac_objext \
34649 conftest$ac_exeext conftest.$ac_ext
34650LIBS=$ac_check_lib_save_LIBS
34651fi
34652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpg_error_gpg_err_init" >&5
34653$as_echo "$ac_cv_lib_gpg_error_gpg_err_init" >&6; }
34654if test "x$ac_cv_lib_gpg_error_gpg_err_init" = xyes; then :
34655 cat >>confdefs.h <<_ACEOF
34656#define HAVE_LIBGPG_ERROR 1
34657_ACEOF
34658
34659 LIBS="-lgpg-error $LIBS"
34660
34661fi
34662
34663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcry_control in -lgcrypt" >&5
34664$as_echo_n "checking for gcry_control in -lgcrypt... " >&6; }
34665if ${ac_cv_lib_gcrypt_gcry_control+:} false; then :
34666 $as_echo_n "(cached) " >&6
34667else
34668 ac_check_lib_save_LIBS=$LIBS
34669LIBS="-lgcrypt $LIBS"
34670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34671/* end confdefs.h. */
34672
34673/* Override any GCC internal prototype to avoid an error.
34674 Use char because int might match the return type of a GCC
34675 builtin and then its argument prototype would still apply. */
34676#ifdef __cplusplus
34677extern "C"
34678#endif
34679char gcry_control ();
34680int
34681main ()
34682{
34683return gcry_control ();
34684 ;
34685 return 0;
34686}
34687_ACEOF
34688if ac_fn_c_try_link "$LINENO"; then :
34689 ac_cv_lib_gcrypt_gcry_control=yes
34690else
34691 ac_cv_lib_gcrypt_gcry_control=no
34692fi
34693rm -f core conftest.err conftest.$ac_objext \
34694 conftest$ac_exeext conftest.$ac_ext
34695LIBS=$ac_check_lib_save_LIBS
34696fi
34697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcrypt_gcry_control" >&5
34698$as_echo "$ac_cv_lib_gcrypt_gcry_control" >&6; }
34699if test "x$ac_cv_lib_gcrypt_gcry_control" = xyes; then :
34700 cat >>confdefs.h <<_ACEOF
34701#define HAVE_LIBGCRYPT 1
34702_ACEOF
34703
34704 LIBS="-lgcrypt $LIBS"
34705
34706fi
34707
34708
34709
34710
34711
34712
34713
34714
34715
34716
34717
34718
34719
34720
34721
34722 use_additional=yes
34723
34724 acl_save_prefix="$prefix"
34725 prefix="$acl_final_prefix"
34726 acl_save_exec_prefix="$exec_prefix"
34727 exec_prefix="$acl_final_exec_prefix"
34728
34729 eval additional_includedir=\"$includedir\"
34730 eval additional_libdir=\"$libdir\"
34731
34732 exec_prefix="$acl_save_exec_prefix"
34733 prefix="$acl_save_prefix"
34734
34735
34736# Check whether --with-libgnutls-prefix was given.
34737if test "${with_libgnutls_prefix+set}" = set; then :
34738 withval=$with_libgnutls_prefix;
34739 if test "X$withval" = "Xno"; then
34740 use_additional=no
34741 else
34742 if test "X$withval" = "X"; then
34743
34744 acl_save_prefix="$prefix"
34745 prefix="$acl_final_prefix"
34746 acl_save_exec_prefix="$exec_prefix"
34747 exec_prefix="$acl_final_exec_prefix"
34748
34749 eval additional_includedir=\"$includedir\"
34750 eval additional_libdir=\"$libdir\"
34751
34752 exec_prefix="$acl_save_exec_prefix"
34753 prefix="$acl_save_prefix"
34754
34755 else
34756 additional_includedir="$withval/include"
34757 additional_libdir="$withval/$acl_libdirstem"
34758 if test "$acl_libdirstem2" != "$acl_libdirstem" \
34759 && ! test -d "$withval/$acl_libdirstem"; then
34760 additional_libdir="$withval/$acl_libdirstem2"
34761 fi
34762 fi
34763 fi
34764
34765fi
34766
34767 LIBGNUTLS=
34768 LTLIBGNUTLS=
34769 INCGNUTLS=
34770 LIBGNUTLS_PREFIX=
34771 HAVE_LIBGNUTLS=
34772 rpathdirs=
34773 ltrpathdirs=
34774 names_already_handled=
34775 names_next_round='gnutls '
34776 while test -n "$names_next_round"; do
34777 names_this_round="$names_next_round"
34778 names_next_round=
34779 for name in $names_this_round; do
34780 already_handled=
34781 for n in $names_already_handled; do
34782 if test "$n" = "$name"; then
34783 already_handled=yes
34784 break
34785 fi
34786 done
34787 if test -z "$already_handled"; then
34788 names_already_handled="$names_already_handled $name"
34789 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
34790 eval value=\"\$HAVE_LIB$uppername\"
34791 if test -n "$value"; then
34792 if test "$value" = yes; then
34793 eval value=\"\$LIB$uppername\"
34794 test -z "$value" || LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$value"
34795 eval value=\"\$LTLIB$uppername\"
34796 test -z "$value" || LTLIBGNUTLS="${LTLIBGNUTLS}${LTLIBGNUTLS:+ }$value"
34797 else
34798 :
34799 fi
34800 else
34801 found_dir=
34802 found_la=
34803 found_so=
34804 found_a=
34805 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
34806 if test -n "$acl_shlibext"; then
34807 shrext=".$acl_shlibext" # typically: shrext=.so
34808 else
34809 shrext=
34810 fi
34811 if test $use_additional = yes; then
34812 dir="$additional_libdir"
34813 if test -n "$acl_shlibext"; then
34814 if test -f "$dir/$libname$shrext"; then
34815 found_dir="$dir"
34816 found_so="$dir/$libname$shrext"
34817 else
34818 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
34819 ver=`(cd "$dir" && \
34820 for f in "$libname$shrext".*; do echo "$f"; done \
34821 | sed -e "s,^$libname$shrext\\\\.,," \
34822 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
34823 | sed 1q ) 2>/dev/null`
34824 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
34825 found_dir="$dir"
34826 found_so="$dir/$libname$shrext.$ver"
34827 fi
34828 else
34829 eval library_names=\"$acl_library_names_spec\"
34830 for f in $library_names; do
34831 if test -f "$dir/$f"; then
34832 found_dir="$dir"
34833 found_so="$dir/$f"
34834 break
34835 fi
34836 done
34837 fi
34838 fi
34839 fi
34840 if test "X$found_dir" = "X"; then
34841 if test -f "$dir/$libname.$acl_libext"; then
34842 found_dir="$dir"
34843 found_a="$dir/$libname.$acl_libext"
34844 fi
34845 fi
34846 if test "X$found_dir" != "X"; then
34847 if test -f "$dir/$libname.la"; then
34848 found_la="$dir/$libname.la"
34849 fi
34850 fi
34851 fi
34852 if test "X$found_dir" = "X"; then
34853 for x in $LDFLAGS $LTLIBGNUTLS; do
34854
34855 acl_save_prefix="$prefix"
34856 prefix="$acl_final_prefix"
34857 acl_save_exec_prefix="$exec_prefix"
34858 exec_prefix="$acl_final_exec_prefix"
34859 eval x=\"$x\"
34860 exec_prefix="$acl_save_exec_prefix"
34861 prefix="$acl_save_prefix"
34862
34863 case "$x" in
34864 -L*)
34865 dir=`echo "X$x" | sed -e 's/^X-L//'`
34866 if test -n "$acl_shlibext"; then
34867 if test -f "$dir/$libname$shrext"; then
34868 found_dir="$dir"
34869 found_so="$dir/$libname$shrext"
34870 else
34871 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
34872 ver=`(cd "$dir" && \
34873 for f in "$libname$shrext".*; do echo "$f"; done \
34874 | sed -e "s,^$libname$shrext\\\\.,," \
34875 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
34876 | sed 1q ) 2>/dev/null`
34877 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
34878 found_dir="$dir"
34879 found_so="$dir/$libname$shrext.$ver"
34880 fi
34881 else
34882 eval library_names=\"$acl_library_names_spec\"
34883 for f in $library_names; do
34884 if test -f "$dir/$f"; then
34885 found_dir="$dir"
34886 found_so="$dir/$f"
34887 break
34888 fi
34889 done
34890 fi
34891 fi
34892 fi
34893 if test "X$found_dir" = "X"; then
34894 if test -f "$dir/$libname.$acl_libext"; then
34895 found_dir="$dir"
34896 found_a="$dir/$libname.$acl_libext"
34897 fi
34898 fi
34899 if test "X$found_dir" != "X"; then
34900 if test -f "$dir/$libname.la"; then
34901 found_la="$dir/$libname.la"
34902 fi
34903 fi
34904 ;;
34905 esac
34906 if test "X$found_dir" != "X"; then
34907 break
34908 fi
34909 done
34910 fi
34911 if test "X$found_dir" != "X"; then
34912 LTLIBGNUTLS="${LTLIBGNUTLS}${LTLIBGNUTLS:+ }-L$found_dir -l$name"
34913 if test "X$found_so" != "X"; then
34914 if test "$enable_rpath" = no \
34915 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
34916 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
34917 LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$found_so"
34918 else
34919 haveit=
34920 for x in $ltrpathdirs; do
34921 if test "X$x" = "X$found_dir"; then
34922 haveit=yes
34923 break
34924 fi
34925 done
34926 if test -z "$haveit"; then
34927 ltrpathdirs="$ltrpathdirs $found_dir"
34928 fi
34929 if test "$acl_hardcode_direct" = yes; then
34930 LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$found_so"
34931 else
34932 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
34933 LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$found_so"
34934 haveit=
34935 for x in $rpathdirs; do
34936 if test "X$x" = "X$found_dir"; then
34937 haveit=yes
34938 break
34939 fi
34940 done
34941 if test -z "$haveit"; then
34942 rpathdirs="$rpathdirs $found_dir"
34943 fi
34944 else
34945 haveit=
34946 for x in $LDFLAGS $LIBGNUTLS; do
34947
34948 acl_save_prefix="$prefix"
34949 prefix="$acl_final_prefix"
34950 acl_save_exec_prefix="$exec_prefix"
34951 exec_prefix="$acl_final_exec_prefix"
34952 eval x=\"$x\"
34953 exec_prefix="$acl_save_exec_prefix"
34954 prefix="$acl_save_prefix"
34955
34956 if test "X$x" = "X-L$found_dir"; then
34957 haveit=yes
34958 break
34959 fi
34960 done
34961 if test -z "$haveit"; then
34962 LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }-L$found_dir"
34963 fi
34964 if test "$acl_hardcode_minus_L" != no; then
34965 LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$found_so"
34966 else
34967 LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }-l$name"
34968 fi
34969 fi
34970 fi
34971 fi
34972 else
34973 if test "X$found_a" != "X"; then
34974 LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$found_a"
34975 else
34976 LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }-L$found_dir -l$name"
34977 fi
34978 fi
34979 additional_includedir=
34980 case "$found_dir" in
34981 */$acl_libdirstem | */$acl_libdirstem/)
34982 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
34983 if test "$name" = 'gnutls'; then
34984 LIBGNUTLS_PREFIX="$basedir"
34985 fi
34986 additional_includedir="$basedir/include"
34987 ;;
34988 */$acl_libdirstem2 | */$acl_libdirstem2/)
34989 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
34990 if test "$name" = 'gnutls'; then
34991 LIBGNUTLS_PREFIX="$basedir"
34992 fi
34993 additional_includedir="$basedir/include"
34994 ;;
34995 esac
34996 if test "X$additional_includedir" != "X"; then
34997 if test "X$additional_includedir" != "X/usr/include"; then
34998 haveit=
34999 if test "X$additional_includedir" = "X/usr/local/include"; then
35000 if test -n "$GCC"; then
35001 case $host_os in
35002 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
35003 esac
35004 fi
35005 fi
35006 if test -z "$haveit"; then
35007 for x in $CPPFLAGS $INCGNUTLS; do
35008
35009 acl_save_prefix="$prefix"
35010 prefix="$acl_final_prefix"
35011 acl_save_exec_prefix="$exec_prefix"
35012 exec_prefix="$acl_final_exec_prefix"
35013 eval x=\"$x\"
35014 exec_prefix="$acl_save_exec_prefix"
35015 prefix="$acl_save_prefix"
35016
35017 if test "X$x" = "X-I$additional_includedir"; then
35018 haveit=yes
35019 break
35020 fi
35021 done
35022 if test -z "$haveit"; then
35023 if test -d "$additional_includedir"; then
35024 INCGNUTLS="${INCGNUTLS}${INCGNUTLS:+ }-I$additional_includedir"
35025 fi
35026 fi
35027 fi
35028 fi
35029 fi
35030 if test -n "$found_la"; then
35031 save_libdir="$libdir"
35032 case "$found_la" in
35033 */* | *\\*) . "$found_la" ;;
35034 *) . "./$found_la" ;;
35035 esac
35036 libdir="$save_libdir"
35037 for dep in $dependency_libs; do
35038 case "$dep" in
35039 -L*)
35040 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
35041 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
35042 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
35043 haveit=
35044 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
35045 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
35046 if test -n "$GCC"; then
35047 case $host_os in
35048 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
35049 esac
35050 fi
35051 fi
35052 if test -z "$haveit"; then
35053 haveit=
35054 for x in $LDFLAGS $LIBGNUTLS; do
35055
35056 acl_save_prefix="$prefix"
35057 prefix="$acl_final_prefix"
35058 acl_save_exec_prefix="$exec_prefix"
35059 exec_prefix="$acl_final_exec_prefix"
35060 eval x=\"$x\"
35061 exec_prefix="$acl_save_exec_prefix"
35062 prefix="$acl_save_prefix"
35063
35064 if test "X$x" = "X-L$additional_libdir"; then
35065 haveit=yes
35066 break
35067 fi
35068 done
35069 if test -z "$haveit"; then
35070 if test -d "$additional_libdir"; then
35071 LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }-L$additional_libdir"
35072 fi
35073 fi
35074 haveit=
35075 for x in $LDFLAGS $LTLIBGNUTLS; do
35076
35077 acl_save_prefix="$prefix"
35078 prefix="$acl_final_prefix"
35079 acl_save_exec_prefix="$exec_prefix"
35080 exec_prefix="$acl_final_exec_prefix"
35081 eval x=\"$x\"
35082 exec_prefix="$acl_save_exec_prefix"
35083 prefix="$acl_save_prefix"
35084
35085 if test "X$x" = "X-L$additional_libdir"; then
35086 haveit=yes
35087 break
35088 fi
35089 done
35090 if test -z "$haveit"; then
35091 if test -d "$additional_libdir"; then
35092 LTLIBGNUTLS="${LTLIBGNUTLS}${LTLIBGNUTLS:+ }-L$additional_libdir"
35093 fi
35094 fi
35095 fi
35096 fi
35097 ;;
35098 -R*)
35099 dir=`echo "X$dep" | sed -e 's/^X-R//'`
35100 if test "$enable_rpath" != no; then
35101 haveit=
35102 for x in $rpathdirs; do
35103 if test "X$x" = "X$dir"; then
35104 haveit=yes
35105 break
35106 fi
35107 done
35108 if test -z "$haveit"; then
35109 rpathdirs="$rpathdirs $dir"
35110 fi
35111 haveit=
35112 for x in $ltrpathdirs; do
35113 if test "X$x" = "X$dir"; then
35114 haveit=yes
35115 break
35116 fi
35117 done
35118 if test -z "$haveit"; then
35119 ltrpathdirs="$ltrpathdirs $dir"
35120 fi
35121 fi
35122 ;;
35123 -l*)
35124 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
35125 ;;
35126 *.la)
35127 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
35128 ;;
35129 *)
35130 LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$dep"
35131 LTLIBGNUTLS="${LTLIBGNUTLS}${LTLIBGNUTLS:+ }$dep"
35132 ;;
35133 esac
35134 done
35135 fi
35136 else
35137 LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }-l$name"
35138 LTLIBGNUTLS="${LTLIBGNUTLS}${LTLIBGNUTLS:+ }-l$name"
35139 fi
35140 fi
35141 fi
35142 done
35143 done
35144 if test "X$rpathdirs" != "X"; then
35145 if test -n "$acl_hardcode_libdir_separator"; then
35146 alldirs=
35147 for found_dir in $rpathdirs; do
35148 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
35149 done
35150 acl_save_libdir="$libdir"
35151 libdir="$alldirs"
35152 eval flag=\"$acl_hardcode_libdir_flag_spec\"
35153 libdir="$acl_save_libdir"
35154 LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$flag"
35155 else
35156 for found_dir in $rpathdirs; do
35157 acl_save_libdir="$libdir"
35158 libdir="$found_dir"
35159 eval flag=\"$acl_hardcode_libdir_flag_spec\"
35160 libdir="$acl_save_libdir"
35161 LIBGNUTLS="${LIBGNUTLS}${LIBGNUTLS:+ }$flag"
35162 done
35163 fi
35164 fi
35165 if test "X$ltrpathdirs" != "X"; then
35166 for found_dir in $ltrpathdirs; do
35167 LTLIBGNUTLS="${LTLIBGNUTLS}${LTLIBGNUTLS:+ }-R$found_dir"
35168 done
35169 fi
35170
35171
35172
35173
35174
35175
35176
35177 ac_save_CPPFLAGS="$CPPFLAGS"
35178
35179 for element in $INCGNUTLS; do
35180 haveit=
35181 for x in $CPPFLAGS; do
35182
35183 acl_save_prefix="$prefix"
35184 prefix="$acl_final_prefix"
35185 acl_save_exec_prefix="$exec_prefix"
35186 exec_prefix="$acl_final_exec_prefix"
35187 eval x=\"$x\"
35188 exec_prefix="$acl_save_exec_prefix"
35189 prefix="$acl_save_prefix"
35190
35191 if test "X$x" = "X$element"; then
35192 haveit=yes
35193 break
35194 fi
35195 done
35196 if test -z "$haveit"; then
35197 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
35198 fi
35199 done
35200
35201
35202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgnutls" >&5
35203$as_echo_n "checking for libgnutls... " >&6; }
35204if ${ac_cv_libgnutls+:} false; then :
35205 $as_echo_n "(cached) " >&6
35206else
35207
35208 ac_save_LIBS="$LIBS"
35209 case " $LIBGNUTLS" in
35210 *" -l"*) LIBS="$LIBS $LIBGNUTLS" ;;
35211 *) LIBS="$LIBGNUTLS $LIBS" ;;
35212 esac
35213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35214/* end confdefs.h. */
35215
35216#include <gnutls/gnutls.h>
35217
35218int
35219main ()
35220{
35221gnutls_global_init()
35222 ;
35223 return 0;
35224}
35225_ACEOF
35226if ac_fn_c_try_link "$LINENO"; then :
35227 ac_cv_libgnutls=yes
35228else
35229 ac_cv_libgnutls='no'
35230fi
35231rm -f core conftest.err conftest.$ac_objext \
35232 conftest$ac_exeext conftest.$ac_ext
35233 LIBS="$ac_save_LIBS"
35234
35235fi
35236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libgnutls" >&5
35237$as_echo "$ac_cv_libgnutls" >&6; }
35238 if test "$ac_cv_libgnutls" = yes; then
35239 HAVE_LIBGNUTLS=yes
35240
35241$as_echo "#define HAVE_LIBGNUTLS 1" >>confdefs.h
35242
35243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libgnutls" >&5
35244$as_echo_n "checking how to link with libgnutls... " >&6; }
35245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS" >&5
35246$as_echo "$LIBGNUTLS" >&6; }
35247 else
35248 HAVE_LIBGNUTLS=no
35249 CPPFLAGS="$ac_save_CPPFLAGS"
35250 LIBGNUTLS=
35251 LTLIBGNUTLS=
35252 LIBGNUTLS_PREFIX=
35253 fi
35254
35255
35256
35257
35258
35259
35260
35261 if test x"$LIBGNUTLS" != x
35262 then
35263 ssl_found=yes
35264 { $as_echo "$as_me:${as_lineno-$LINENO}: compiling in support for SSL via GnuTLS" >&5
35265$as_echo "$as_me: compiling in support for SSL via GnuTLS" >&6;}
35266 case " $LIBOBJS " in
35267 *" gnutls.$ac_objext "* ) ;;
35268 *) LIBOBJS="$LIBOBJS gnutls.$ac_objext"
35269 ;;
35270esac
35271
35272 LIBS="$LIBGNUTLS $LIBS"
35273 else
35274 as_fn_error $? "--with-ssl was given, but GNUTLS is not available." "$LINENO" 5
35275 fi
35276
35277 for ac_func in gnutls_priority_set_direct
35278do :
35279 ac_fn_c_check_func "$LINENO" "gnutls_priority_set_direct" "ac_cv_func_gnutls_priority_set_direct"
35280if test "x$ac_cv_func_gnutls_priority_set_direct" = xyes; then :
35281 cat >>confdefs.h <<_ACEOF
35282#define HAVE_GNUTLS_PRIORITY_SET_DIRECT 1
35283_ACEOF
35284
35285fi
35286done
35287
35288
35289fi # endif: --with-ssl == no?
35290
35291fi # endif: --with-ssl == openssl?
35292
35293if test x"$LIBSSL" != x || test "$ac_cv_lib_ssl32_SSL_connect" = yes
35294then
35295 if test x"$ENABLE_NTLM" != xno
35296 then
35297
35298$as_echo "#define ENABLE_NTLM 1" >>confdefs.h
35299
35300 case " $LIBOBJS " in
35301 *" http-ntlm.$ac_objext "* ) ;;
35302 *) LIBOBJS="$LIBOBJS http-ntlm.$ac_objext"
35303 ;;
35304esac
35305
35306 fi
35307else
35308 if test x"$ENABLE_NTLM" = xyes
35309 then
35310 as_fn_error $? "NTLM authorization requested and OpenSSL not found; aborting" "$LINENO" 5
35311 fi
35312fi
35313
35314
35315
35316# Check whether --enable-ipv6 was given.
35317if test "${enable_ipv6+set}" = set; then :
35318 enableval=$enable_ipv6; case "${enable_ipv6}" in
35319 no)
35320 { $as_echo "$as_me:${as_lineno-$LINENO}: disabling IPv6 at user request" >&5
35321$as_echo "$as_me: disabling IPv6 at user request" >&6;}
35322 ipv6=no
35323 ;;
35324 yes)
35325 ipv6=yes
35326 force_ipv6=yes
35327 ;;
35328 auto)
35329 ipv6=yes
35330 ;;
35331 *)
35332 as_fn_error $? "Invalid --enable-ipv6 argument \`$enable_ipv6'" "$LINENO" 5
35333 ;;
35334 esac
35335
35336else
35337
35338 ipv6=yes
35339
35340
35341fi
35342
35343
35344if test "X$ipv6" = "Xyes"; then
35345
35346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for INET6 protocol support" >&5
35347$as_echo_n "checking for INET6 protocol support... " >&6; }
35348if ${wget_cv_proto_inet6+:} false; then :
35349 $as_echo_n "(cached) " >&6
35350else
35351
35352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35353/* end confdefs.h. */
35354
35355#include <sys/types.h>
35356#ifdef HAVE_SYS_SOCKET_H
35357#include <sys/socket.h>
35358#endif
35359#ifdef HAVE_NETINET_IN_H
35360#include <netinet/in.h>
35361#endif
35362#ifdef HAVE_WINSOCK2_H
35363#include <winsock2.h>
35364#endif
35365#ifdef HAVE_WS2TCPIP_H
35366#include <ws2tcpip.h>
35367#endif
35368#ifndef PF_INET6
35369#error Missing PF_INET6
35370#endif
35371#ifndef AF_INET6
35372#error Missing AF_INET6
35373#endif
35374
35375_ACEOF
35376if ac_fn_c_try_cpp "$LINENO"; then :
35377
35378 wget_cv_proto_inet6=yes
35379
35380else
35381
35382 wget_cv_proto_inet6=no
35383
35384fi
35385rm -f conftest.err conftest.i conftest.$ac_ext
35386
35387fi
35388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wget_cv_proto_inet6" >&5
35389$as_echo "$wget_cv_proto_inet6" >&6; }
35390
35391 if test "X$wget_cv_proto_inet6" = "Xyes"; then :
35392
35393 else :
35394
35395 { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling IPv6 support: your system does not support the PF_INET6 protocol family" >&5
35396$as_echo "$as_me: Disabling IPv6 support: your system does not support the PF_INET6 protocol family" >&6;}
35397 ipv6=no
35398
35399 fi
35400
35401fi
35402
35403if test "X$ipv6" = "Xyes"; then
35404
35405 wget_have_sockaddr_in6=
35406 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "
35407#include <sys/types.h>
35408#ifdef HAVE_SYS_SOCKET_H
35409#include <sys/socket.h>
35410#endif
35411#ifdef HAVE_NETINET_IN_H
35412#include <netinet/in.h>
35413#endif
35414#ifdef HAVE_WINSOCK2_H
35415#include <winsock2.h>
35416#endif
35417#ifdef HAVE_WS2TCPIP_H
35418#include <ws2tcpip.h>
35419#endif
35420
35421"
35422if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
35423
35424cat >>confdefs.h <<_ACEOF
35425#define HAVE_STRUCT_SOCKADDR_IN6 1
35426_ACEOF
35427
35428
35429 wget_have_sockaddr_in6=yes
35430
35431else
35432
35433 wget_have_sockaddr_in6=no
35434
35435fi
35436
35437
35438 if test "X$wget_have_sockaddr_in6" = "Xyes"; then :
35439
35440 else :
35441
35442 { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling IPv6 support: your system does not support \`struct sockaddr_in6'" >&5
35443$as_echo "$as_me: Disabling IPv6 support: your system does not support \`struct sockaddr_in6'" >&6;}
35444 ipv6=no
35445
35446 fi
35447
35448 if test "X$ipv6" = "Xyes"; then
35449
35450 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
35451#include <sys/types.h>
35452#ifdef HAVE_SYS_SOCKET_H
35453#include <sys/socket.h>
35454#endif
35455#ifdef HAVE_WINSOCK2_H
35456#include <winsock2.h>
35457#endif
35458
35459"
35460if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
35461
35462cat >>confdefs.h <<_ACEOF
35463#define HAVE_STRUCT_SOCKADDR_STORAGE 1
35464_ACEOF
35465
35466
35467fi
35468
35469
35470
35471
35472
35473 wget_member_sin6_scope_id=
35474 if test "X$wget_have_sockaddr_in6" = "Xyes"; then
35475 ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "
35476#include <sys/types.h>
35477#ifdef HAVE_SYS_SOCKET_H
35478#include <sys/socket.h>
35479#endif
35480#ifdef HAVE_NETINET_IN_H
35481#include <netinet/in.h>
35482#endif
35483#ifdef HAVE_WINSOCK2_H
35484#include <winsock2.h>
35485#endif
35486#ifdef HAVE_WS2TCPIP_H
35487#include <ws2tcpip.h>
35488#endif
35489
35490"
35491if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then :
35492
35493 wget_member_sin6_scope_id=yes
35494
35495else
35496
35497 wget_member_sin6_scope_id=no
35498
35499fi
35500
35501 fi
35502
35503 if test "X$wget_member_sin6_scope_id" = "Xyes"; then
35504
35505$as_echo "#define HAVE_SOCKADDR_IN6_SCOPE_ID 1" >>confdefs.h
35506
35507
35508 else :
35509
35510 fi
35511
35512 fi
35513fi
35514
35515if test "X$ipv6" = "Xyes"; then
35516
35517$as_echo "#define ENABLE_IPV6 1" >>confdefs.h
35518
35519 { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling support for IPv6." >&5
35520$as_echo "$as_me: Enabling support for IPv6." >&6;}
35521elif test "x$force_ipv6" = "xyes"; then
35522 as_fn_error $? "IPv6 support requested but not found; aborting" "$LINENO" 5
35523fi
35524
35525
35526for ac_prog in makeinfo
35527do
35528 # Extract the first word of "$ac_prog", so it can be a program name with args.
35529set dummy $ac_prog; ac_word=$2
35530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35531$as_echo_n "checking for $ac_word... " >&6; }
35532if ${ac_cv_prog_MAKEINFO+:} false; then :
35533 $as_echo_n "(cached) " >&6
35534else
35535 if test -n "$MAKEINFO"; then
35536 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
35537else
35538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35539for as_dir in $PATH
35540do
35541 IFS=$as_save_IFS
35542 test -z "$as_dir" && as_dir=.
35543 for ac_exec_ext in '' $ac_executable_extensions; do
35544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35545 ac_cv_prog_MAKEINFO="$ac_prog"
35546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35547 break 2
35548 fi
35549done
35550 done
35551IFS=$as_save_IFS
35552
35553fi
35554fi
35555MAKEINFO=$ac_cv_prog_MAKEINFO
35556if test -n "$MAKEINFO"; then
35557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
35558$as_echo "$MAKEINFO" >&6; }
35559else
35560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35561$as_echo "no" >&6; }
35562fi
35563
35564
35565 test -n "$MAKEINFO" && break
35566done
35567test -n "$MAKEINFO" || MAKEINFO="true"
35568
35569
35570
35571for ac_prog in perl5 perl
35572do
35573 # Extract the first word of "$ac_prog", so it can be a program name with args.
35574set dummy $ac_prog; ac_word=$2
35575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35576$as_echo_n "checking for $ac_word... " >&6; }
35577if ${ac_cv_path_PERL+:} false; then :
35578 $as_echo_n "(cached) " >&6
35579else
35580 case $PERL in
35581 [\\/]* | ?:[\\/]*)
35582 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
35583 ;;
35584 *)
35585 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35586for as_dir in $PATH
35587do
35588 IFS=$as_save_IFS
35589 test -z "$as_dir" && as_dir=.
35590 for ac_exec_ext in '' $ac_executable_extensions; do
35591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35592 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
35593 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35594 break 2
35595 fi
35596done
35597 done
35598IFS=$as_save_IFS
35599
35600 ;;
35601esac
35602fi
35603PERL=$ac_cv_path_PERL
35604if test -n "$PERL"; then
35605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
35606$as_echo "$PERL" >&6; }
35607else
35608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35609$as_echo "no" >&6; }
35610fi
35611
35612
35613 test -n "$PERL" && break
35614done
35615test -n "$PERL" || PERL="no"
35616
35617# Extract the first word of "pod2man", so it can be a program name with args.
35618set dummy pod2man; ac_word=$2
35619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35620$as_echo_n "checking for $ac_word... " >&6; }
35621if ${ac_cv_path_POD2MAN+:} false; then :
35622 $as_echo_n "(cached) " >&6
35623else
35624 case $POD2MAN in
35625 [\\/]* | ?:[\\/]*)
35626 ac_cv_path_POD2MAN="$POD2MAN" # Let the user override the test with a path.
35627 ;;
35628 *)
35629 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35630for as_dir in $PATH
35631do
35632 IFS=$as_save_IFS
35633 test -z "$as_dir" && as_dir=.
35634 for ac_exec_ext in '' $ac_executable_extensions; do
35635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35636 ac_cv_path_POD2MAN="$as_dir/$ac_word$ac_exec_ext"
35637 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35638 break 2
35639 fi
35640done
35641 done
35642IFS=$as_save_IFS
35643
35644 test -z "$ac_cv_path_POD2MAN" && ac_cv_path_POD2MAN="no"
35645 ;;
35646esac
35647fi
35648POD2MAN=$ac_cv_path_POD2MAN
35649if test -n "$POD2MAN"; then
35650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POD2MAN" >&5
35651$as_echo "$POD2MAN" >&6; }
35652else
35653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35654$as_echo "no" >&6; }
35655fi
35656
35657
35658
35659if test "x${POD2MAN}" = xno; then
35660 COMMENT_IF_NO_POD2MAN="# "
35661else
35662 COMMENT_IF_NO_POD2MAN=
35663fi
35664
35665
35666
35667
35668# Check whether --enable-iri was given.
35669if test "${enable_iri+set}" = set; then :
35670 enableval=$enable_iri; case "${enable_iri}" in
35671 no)
35672 { $as_echo "$as_me:${as_lineno-$LINENO}: disabling IRIs at user request" >&5
35673$as_echo "$as_me: disabling IRIs at user request" >&6;}
35674 iri=no
35675 ;;
35676 yes)
35677 iri=yes
35678 force_iri=yes
35679 ;;
35680 auto)
35681 iri=yes
35682 ;;
35683 *)
35684 as_fn_error $? "Invalid --enable-iri argument \`$enable_iri'" "$LINENO" 5
35685 ;;
35686 esac
35687
35688else
35689
35690 iri=yes
35691
35692
35693fi
35694
35695
35696
35697# Check whether --with-libidn was given.
35698if test "${with_libidn+set}" = set; then :
35699 withval=$with_libidn; libidn=$withval
35700else
35701 libidn=""
35702fi
35703
35704if test "X$iri" != "Xno"; then :
35705
35706
35707
35708 if test "X$am_cv_func_iconv" != "Xyes"; then
35709 iri=no
35710 if test "X$force_iri" = "Xyes"; then
35711 as_fn_error $? "Libiconv is required for IRIs support" "$LINENO" 5
35712 else
35713 { $as_echo "$as_me:${as_lineno-$LINENO}: disabling IRIs because libiconv wasn't found" >&5
35714$as_echo "$as_me: disabling IRIs because libiconv wasn't found" >&6;}
35715 fi
35716 fi
35717
35718else
35719 # else
35720 # For some reason, this seems to be set even when we don't check.
35721 # Explicitly unset.
35722 LIBICONV=
35723
35724fi
35725
35726if test "X$iri" != "Xno"; then
35727 if test "$libidn" != ""; then
35728 LDFLAGS="${LDFLAGS} -L$libidn/lib"
35729 CPPFLAGS="${CPPFLAGS} -I$libidn/include"
35730 fi
35731
35732 # If idna.h can't be found, check to see if it was installed under
35733 # /usr/include/idn (OpenSolaris, at least, places it there).
35734 # Check for idn-int.h in that case, because idna.h won't find
35735 # idn-int.h until we've decided to add -I/usr/include/idn.
35736 ac_fn_c_check_header_mongrel "$LINENO" "idna.h" "ac_cv_header_idna_h" "$ac_includes_default"
35737if test "x$ac_cv_header_idna_h" = xyes; then :
35738
35739else
35740 ac_fn_c_check_header_mongrel "$LINENO" "idn/idn-int.h" "ac_cv_header_idn_idn_int_h" "$ac_includes_default"
35741if test "x$ac_cv_header_idn_idn_int_h" = xyes; then :
35742 CPPFLAGS="${CPPFLAGS} -I/usr/include/idn"
35743else
35744 iri=no
35745fi
35746
35747
35748
35749fi
35750
35751
35752
35753 if test "X$iri" != "Xno"; then
35754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stringprep_check_version in -lidn" >&5
35755$as_echo_n "checking for stringprep_check_version in -lidn... " >&6; }
35756if ${ac_cv_lib_idn_stringprep_check_version+:} false; then :
35757 $as_echo_n "(cached) " >&6
35758else
35759 ac_check_lib_save_LIBS=$LIBS
35760LIBS="-lidn $LIBS"
35761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35762/* end confdefs.h. */
35763
35764/* Override any GCC internal prototype to avoid an error.
35765 Use char because int might match the return type of a GCC
35766 builtin and then its argument prototype would still apply. */
35767#ifdef __cplusplus
35768extern "C"
35769#endif
35770char stringprep_check_version ();
35771int
35772main ()
35773{
35774return stringprep_check_version ();
35775 ;
35776 return 0;
35777}
35778_ACEOF
35779if ac_fn_c_try_link "$LINENO"; then :
35780 ac_cv_lib_idn_stringprep_check_version=yes
35781else
35782 ac_cv_lib_idn_stringprep_check_version=no
35783fi
35784rm -f core conftest.err conftest.$ac_objext \
35785 conftest$ac_exeext conftest.$ac_ext
35786LIBS=$ac_check_lib_save_LIBS
35787fi
35788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_idn_stringprep_check_version" >&5
35789$as_echo "$ac_cv_lib_idn_stringprep_check_version" >&6; }
35790if test "x$ac_cv_lib_idn_stringprep_check_version" = xyes; then :
35791 iri=yes LIBS="${LIBS} -lidn"
35792else
35793 iri=no
35794fi
35795
35796 fi
35797
35798 if test "X$iri" != "Xno" ; then
35799
35800$as_echo "#define ENABLE_IRI 1" >>confdefs.h
35801
35802 { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling support for IRI." >&5
35803$as_echo "$as_me: Enabling support for IRI." >&6;}
35804 else
35805 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libidn not found" >&5
35806$as_echo "$as_me: WARNING: Libidn not found" >&2;}
35807 fi
35808fi
35809
35810
35811ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
35812if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
35813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
35814$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
35815if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
35816 $as_echo_n "(cached) " >&6
35817else
35818 ac_check_lib_save_LIBS=$LIBS
35819LIBS="-luuid $LIBS"
35820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35821/* end confdefs.h. */
35822
35823/* Override any GCC internal prototype to avoid an error.
35824 Use char because int might match the return type of a GCC
35825 builtin and then its argument prototype would still apply. */
35826#ifdef __cplusplus
35827extern "C"
35828#endif
35829char uuid_generate ();
35830int
35831main ()
35832{
35833return uuid_generate ();
35834 ;
35835 return 0;
35836}
35837_ACEOF
35838if ac_fn_c_try_link "$LINENO"; then :
35839 ac_cv_lib_uuid_uuid_generate=yes
35840else
35841 ac_cv_lib_uuid_uuid_generate=no
35842fi
35843rm -f core conftest.err conftest.$ac_objext \
35844 conftest$ac_exeext conftest.$ac_ext
35845LIBS=$ac_check_lib_save_LIBS
35846fi
35847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
35848$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
35849if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
35850 LIBS="${LIBS} -luuid"
35851
35852$as_echo "#define HAVE_LIBUUID 1" >>confdefs.h
35853
35854
35855fi
35856
35857
35858fi
35859
35860
35861
35862
35863ac_fn_c_check_header_mongrel "$LINENO" "pcre.h" "ac_cv_header_pcre_h" "$ac_includes_default"
35864if test "x$ac_cv_header_pcre_h" = xyes; then :
35865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5
35866$as_echo_n "checking for pcre_compile in -lpcre... " >&6; }
35867if ${ac_cv_lib_pcre_pcre_compile+:} false; then :
35868 $as_echo_n "(cached) " >&6
35869else
35870 ac_check_lib_save_LIBS=$LIBS
35871LIBS="-lpcre $LIBS"
35872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35873/* end confdefs.h. */
35874
35875/* Override any GCC internal prototype to avoid an error.
35876 Use char because int might match the return type of a GCC
35877 builtin and then its argument prototype would still apply. */
35878#ifdef __cplusplus
35879extern "C"
35880#endif
35881char pcre_compile ();
35882int
35883main ()
35884{
35885return pcre_compile ();
35886 ;
35887 return 0;
35888}
35889_ACEOF
35890if ac_fn_c_try_link "$LINENO"; then :
35891 ac_cv_lib_pcre_pcre_compile=yes
35892else
35893 ac_cv_lib_pcre_pcre_compile=no
35894fi
35895rm -f core conftest.err conftest.$ac_objext \
35896 conftest$ac_exeext conftest.$ac_ext
35897LIBS=$ac_check_lib_save_LIBS
35898fi
35899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_compile" >&5
35900$as_echo "$ac_cv_lib_pcre_pcre_compile" >&6; }
35901if test "x$ac_cv_lib_pcre_pcre_compile" = xyes; then :
35902 LIBS="${LIBS} -lpcre"
35903
35904$as_echo "#define HAVE_LIBPCRE 1" >>confdefs.h
35905
35906
35907fi
35908
35909
35910fi
35911
35912
35913
35914
35915 if test "X$iri" != "Xno"; then
35916 IRI_IS_ENABLED_TRUE=
35917 IRI_IS_ENABLED_FALSE='#'
35918else
35919 IRI_IS_ENABLED_TRUE='#'
35920 IRI_IS_ENABLED_FALSE=
35921fi
35922
35923
35924
35925ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile util/Makefile po/Makefile.in tests/Makefile tests/WgetTest.pm lib/Makefile"
35926
35927ac_config_headers="$ac_config_headers src/config.h"
35928
35929cat >confcache <<\_ACEOF
35930# This file is a shell script that caches the results of configure
35931# tests run on this system so they can be shared between configure
35932# scripts and configure runs, see configure's option --config-cache.
35933# It is not useful on other systems. If it contains results you don't
35934# want to keep, you may remove or edit it.
35935#
35936# config.status only pays attention to the cache file if you give it
35937# the --recheck option to rerun configure.
35938#
35939# `ac_cv_env_foo' variables (set or unset) will be overridden when
35940# loading this file, other *unset* `ac_cv_foo' will be assigned the
35941# following values.
35942
35943_ACEOF
35944
35945# The following way of writing the cache mishandles newlines in values,
35946# but we know of no workaround that is simple, portable, and efficient.
35947# So, we kill variables containing newlines.
35948# Ultrix sh set writes to stderr and can't be redirected directly,
35949# and sets the high bit in the cache file unless we assign to the vars.
35950(
35951 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
35952 eval ac_val=\$$ac_var
35953 case $ac_val in #(
35954 *${as_nl}*)
35955 case $ac_var in #(
35956 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
35957$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
35958 esac
35959 case $ac_var in #(
35960 _ | IFS | as_nl) ;; #(
35961 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
35962 *) { eval $ac_var=; unset $ac_var;} ;;
35963 esac ;;
35964 esac
35965 done
35966
35967 (set) 2>&1 |
35968 case $as_nl`(ac_space=' '; set) 2>&1` in #(
35969 *${as_nl}ac_space=\ *)
35970 # `set' does not quote correctly, so add quotes: double-quote
35971 # substitution turns \\\\ into \\, and sed turns \\ into \.
35972 sed -n \
35973 "s/'/'\\\\''/g;
35974 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
35975 ;; #(
35976 *)
35977 # `set' quotes correctly as required by POSIX, so do not add quotes.
35978 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
35979 ;;
35980 esac |
35981 sort
35982) |
35983 sed '
35984 /^ac_cv_env_/b end
35985 t clear
35986 :clear
35987 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
35988 t end
35989 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
35990 :end' >>confcache
35991if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
35992 if test -w "$cache_file"; then
35993 if test "x$cache_file" != "x/dev/null"; then
35994 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
35995$as_echo "$as_me: updating cache $cache_file" >&6;}
35996 if test ! -f "$cache_file" || test -h "$cache_file"; then
35997 cat confcache >"$cache_file"
35998 else
35999 case $cache_file in #(
36000 */* | ?:*)
36001 mv -f confcache "$cache_file"$$ &&
36002 mv -f "$cache_file"$$ "$cache_file" ;; #(
36003 *)
36004 mv -f confcache "$cache_file" ;;
36005 esac
36006 fi
36007 fi
36008 else
36009 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36010$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36011 fi
36012fi
36013rm -f confcache
36014
36015test "x$prefix" = xNONE && prefix=$ac_default_prefix
36016# Let make expand exec_prefix.
36017test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36018
36019DEFS=-DHAVE_CONFIG_H
36020
36021ac_libobjs=
36022ac_ltlibobjs=
36023U=
36024for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36025 # 1. Remove the extension, and $U if already installed.
36026 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36027 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36028 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
36029 # will be set to the directory where LIBOBJS objects are built.
36030 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36031 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36032done
36033LIBOBJS=$ac_libobjs
36034
36035LTLIBOBJS=$ac_ltlibobjs
36036
36037
36038 if test -n "$EXEEXT"; then
36039 am__EXEEXT_TRUE=
36040 am__EXEEXT_FALSE='#'
36041else
36042 am__EXEEXT_TRUE='#'
36043 am__EXEEXT_FALSE=
36044fi
36045
36046if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
36047 as_fn_error $? "conditional \"AMDEP\" was never defined.
36048Usually this means the macro was only invoked conditionally." "$LINENO" 5
36049fi
36050if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
36051 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
36052Usually this means the macro was only invoked conditionally." "$LINENO" 5
36053fi
36054if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
36055 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
36056Usually this means the macro was only invoked conditionally." "$LINENO" 5
36057fi
36058if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
36059 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
36060Usually this means the macro was only invoked conditionally." "$LINENO" 5
36061fi
36062
36063if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
36064 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
36065Usually this means the macro was only invoked conditionally." "$LINENO" 5
36066fi
36067if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
36068 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
36069Usually this means the macro was only invoked conditionally." "$LINENO" 5
36070fi
36071if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
36072 as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
36073Usually this means the macro was only invoked conditionally." "$LINENO" 5
36074fi
36075if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
36076 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
36077Usually this means the macro was only invoked conditionally." "$LINENO" 5
36078fi
36079CONFIG_INCLUDE=src/config.h
36080
36081if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
36082 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
36083Usually this means the macro was only invoked conditionally." "$LINENO" 5
36084fi
36085if test -z "${GL_GENERATE_SCHED_H_TRUE}" && test -z "${GL_GENERATE_SCHED_H_FALSE}"; then
36086 as_fn_error $? "conditional \"GL_GENERATE_SCHED_H\" was never defined.
36087Usually this means the macro was only invoked conditionally." "$LINENO" 5
36088fi
36089if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
36090 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
36091Usually this means the macro was only invoked conditionally." "$LINENO" 5
36092fi
36093if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
36094 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
36095Usually this means the macro was only invoked conditionally." "$LINENO" 5
36096fi
36097if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
36098 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
36099Usually this means the macro was only invoked conditionally." "$LINENO" 5
36100fi
36101if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
36102 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
36103Usually this means the macro was only invoked conditionally." "$LINENO" 5
36104fi
36105
36106
36107 gl_libobjs=
36108 gl_ltlibobjs=
36109 if test -n "$gl_LIBOBJS"; then
36110 # Remove the extension.
36111 sed_drop_objext='s/\.o$//;s/\.obj$//'
36112 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
36113 gl_libobjs="$gl_libobjs $i.$ac_objext"
36114 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
36115 done
36116 fi
36117 gl_LIBOBJS=$gl_libobjs
36118
36119 gl_LTLIBOBJS=$gl_ltlibobjs
36120
36121
36122
36123 gltests_libobjs=
36124 gltests_ltlibobjs=
36125 if test -n "$gltests_LIBOBJS"; then
36126 # Remove the extension.
36127 sed_drop_objext='s/\.o$//;s/\.obj$//'
36128 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
36129 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
36130 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
36131 done
36132 fi
36133 gltests_LIBOBJS=$gltests_libobjs
36134
36135 gltests_LTLIBOBJS=$gltests_ltlibobjs
36136
36137
36138if test -z "${IRI_IS_ENABLED_TRUE}" && test -z "${IRI_IS_ENABLED_FALSE}"; then
36139 as_fn_error $? "conditional \"IRI_IS_ENABLED\" was never defined.
36140Usually this means the macro was only invoked conditionally." "$LINENO" 5
36141fi
36142
36143: "${CONFIG_STATUS=./config.status}"
36144ac_write_fail=0
36145ac_clean_files_save=$ac_clean_files
36146ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36147{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36148$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36149as_write_fail=0
36150cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36151#! $SHELL
36152# Generated by $as_me.
36153# Run this file to recreate the current configuration.
36154# Compiler output produced by configure, useful for debugging
36155# configure, is in config.log if it exists.
36156
36157debug=false
36158ac_cs_recheck=false
36159ac_cs_silent=false
36160
36161SHELL=\${CONFIG_SHELL-$SHELL}
36162export SHELL
36163_ASEOF
36164cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36165## -------------------- ##
36166## M4sh Initialization. ##
36167## -------------------- ##
36168
36169# Be more Bourne compatible
36170DUALCASE=1; export DUALCASE # for MKS sh
36171if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36172 emulate sh
36173 NULLCMD=:
36174 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36175 # is contrary to our usage. Disable this feature.
36176 alias -g '${1+"$@"}'='"$@"'
36177 setopt NO_GLOB_SUBST
36178else
36179 case `(set -o) 2>/dev/null` in #(
36180 *posix*) :
36181 set -o posix ;; #(
36182 *) :
36183 ;;
36184esac
36185fi
36186
36187
36188as_nl='
36189'
36190export as_nl
36191# Printing a long string crashes Solaris 7 /usr/bin/printf.
36192as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36193as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36194as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36195# Prefer a ksh shell builtin over an external printf program on Solaris,
36196# but without wasting forks for bash or zsh.
36197if test -z "$BASH_VERSION$ZSH_VERSION" \
36198 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36199 as_echo='print -r --'
36200 as_echo_n='print -rn --'
36201elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36202 as_echo='printf %s\n'
36203 as_echo_n='printf %s'
36204else
36205 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36206 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36207 as_echo_n='/usr/ucb/echo -n'
36208 else
36209 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36210 as_echo_n_body='eval
36211 arg=$1;
36212 case $arg in #(
36213 *"$as_nl"*)
36214 expr "X$arg" : "X\\(.*\\)$as_nl";
36215 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36216 esac;
36217 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36218 '
36219 export as_echo_n_body
36220 as_echo_n='sh -c $as_echo_n_body as_echo'
36221 fi
36222 export as_echo_body
36223 as_echo='sh -c $as_echo_body as_echo'
36224fi
36225
36226# The user is always right.
36227if test "${PATH_SEPARATOR+set}" != set; then
36228 PATH_SEPARATOR=:
36229 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36230 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36231 PATH_SEPARATOR=';'
36232 }
36233fi
36234
36235
36236# IFS
36237# We need space, tab and new line, in precisely that order. Quoting is
36238# there to prevent editors from complaining about space-tab.
36239# (If _AS_PATH_WALK were called with IFS unset, it would disable word
36240# splitting by setting IFS to empty value.)
36241IFS=" "" $as_nl"
36242
36243# Find who we are. Look in the path if we contain no directory separator.
36244as_myself=
36245case $0 in #((
36246 *[\\/]* ) as_myself=$0 ;;
36247 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36248for as_dir in $PATH
36249do
36250 IFS=$as_save_IFS
36251 test -z "$as_dir" && as_dir=.
36252 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36253 done
36254IFS=$as_save_IFS
36255
36256 ;;
36257esac
36258# We did not find ourselves, most probably we were run as `sh COMMAND'
36259# in which case we are not to be found in the path.
36260if test "x$as_myself" = x; then
36261 as_myself=$0
36262fi
36263if test ! -f "$as_myself"; then
36264 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36265 exit 1
36266fi
36267
36268# Unset variables that we do not need and which cause bugs (e.g. in
36269# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
36270# suppresses any "Segmentation fault" message there. '((' could
36271# trigger a bug in pdksh 5.2.14.
36272for as_var in BASH_ENV ENV MAIL MAILPATH
36273do eval test x\${$as_var+set} = xset \
36274 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36275done
36276PS1='$ '
36277PS2='> '
36278PS4='+ '
36279
36280# NLS nuisances.
36281LC_ALL=C
36282export LC_ALL
36283LANGUAGE=C
36284export LANGUAGE
36285
36286# CDPATH.
36287(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36288
36289
36290# as_fn_error STATUS ERROR [LINENO LOG_FD]
36291# ----------------------------------------
36292# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36293# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36294# script with STATUS, using 1 if that was 0.
36295as_fn_error ()
36296{
36297 as_status=$1; test $as_status -eq 0 && as_status=1
36298 if test "$4"; then
36299 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36300 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36301 fi
36302 $as_echo "$as_me: error: $2" >&2
36303 as_fn_exit $as_status
36304} # as_fn_error
36305
36306
36307# as_fn_set_status STATUS
36308# -----------------------
36309# Set $? to STATUS, without forking.
36310as_fn_set_status ()
36311{
36312 return $1
36313} # as_fn_set_status
36314
36315# as_fn_exit STATUS
36316# -----------------
36317# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36318as_fn_exit ()
36319{
36320 set +e
36321 as_fn_set_status $1
36322 exit $1
36323} # as_fn_exit
36324
36325# as_fn_unset VAR
36326# ---------------
36327# Portably unset VAR.
36328as_fn_unset ()
36329{
36330 { eval $1=; unset $1;}
36331}
36332as_unset=as_fn_unset
36333# as_fn_append VAR VALUE
36334# ----------------------
36335# Append the text in VALUE to the end of the definition contained in VAR. Take
36336# advantage of any shell optimizations that allow amortized linear growth over
36337# repeated appends, instead of the typical quadratic growth present in naive
36338# implementations.
36339if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36340 eval 'as_fn_append ()
36341 {
36342 eval $1+=\$2
36343 }'
36344else
36345 as_fn_append ()
36346 {
36347 eval $1=\$$1\$2
36348 }
36349fi # as_fn_append
36350
36351# as_fn_arith ARG...
36352# ------------------
36353# Perform arithmetic evaluation on the ARGs, and store the result in the
36354# global $as_val. Take advantage of shells that can avoid forks. The arguments
36355# must be portable across $(()) and expr.
36356if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36357 eval 'as_fn_arith ()
36358 {
36359 as_val=$(( $* ))
36360 }'
36361else
36362 as_fn_arith ()
36363 {
36364 as_val=`expr "$@" || test $? -eq 1`
36365 }
36366fi # as_fn_arith
36367
36368
36369if expr a : '\(a\)' >/dev/null 2>&1 &&
36370 test "X`expr 00001 : '.*\(...\)'`" = X001; then
36371 as_expr=expr
36372else
36373 as_expr=false
36374fi
36375
36376if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36377 as_basename=basename
36378else
36379 as_basename=false
36380fi
36381
36382if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36383 as_dirname=dirname
36384else
36385 as_dirname=false
36386fi
36387
36388as_me=`$as_basename -- "$0" ||
36389$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36390 X"$0" : 'X\(//\)$' \| \
36391 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36392$as_echo X/"$0" |
36393 sed '/^.*\/\([^/][^/]*\)\/*$/{
36394 s//\1/
36395 q
36396 }
36397 /^X\/\(\/\/\)$/{
36398 s//\1/
36399 q
36400 }
36401 /^X\/\(\/\).*/{
36402 s//\1/
36403 q
36404 }
36405 s/.*/./; q'`
36406
36407# Avoid depending upon Character Ranges.
36408as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36409as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36410as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36411as_cr_digits='0123456789'
36412as_cr_alnum=$as_cr_Letters$as_cr_digits
36413
36414ECHO_C= ECHO_N= ECHO_T=
36415case `echo -n x` in #(((((
36416-n*)
36417 case `echo 'xy\c'` in
36418 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
36419 xy) ECHO_C='\c';;
36420 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
36421 ECHO_T=' ';;
36422 esac;;
36423*)
36424 ECHO_N='-n';;
36425esac
36426
36427rm -f conf$$ conf$$.exe conf$$.file
36428if test -d conf$$.dir; then
36429 rm -f conf$$.dir/conf$$.file
36430else
36431 rm -f conf$$.dir
36432 mkdir conf$$.dir 2>/dev/null
36433fi
36434if (echo >conf$$.file) 2>/dev/null; then
36435 if ln -s conf$$.file conf$$ 2>/dev/null; then
36436 as_ln_s='ln -s'
36437 # ... but there are two gotchas:
36438 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36439 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36440 # In both cases, we have to default to `cp -pR'.
36441 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36442 as_ln_s='cp -pR'
36443 elif ln conf$$.file conf$$ 2>/dev/null; then
36444 as_ln_s=ln
36445 else
36446 as_ln_s='cp -pR'
36447 fi
36448else
36449 as_ln_s='cp -pR'
36450fi
36451rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36452rmdir conf$$.dir 2>/dev/null
36453
36454
36455# as_fn_mkdir_p
36456# -------------
36457# Create "$as_dir" as a directory, including parents if necessary.
36458as_fn_mkdir_p ()
36459{
36460
36461 case $as_dir in #(
36462 -*) as_dir=./$as_dir;;
36463 esac
36464 test -d "$as_dir" || eval $as_mkdir_p || {
36465 as_dirs=
36466 while :; do
36467 case $as_dir in #(
36468 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36469 *) as_qdir=$as_dir;;
36470 esac
36471 as_dirs="'$as_qdir' $as_dirs"
36472 as_dir=`$as_dirname -- "$as_dir" ||
36473$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36474 X"$as_dir" : 'X\(//\)[^/]' \| \
36475 X"$as_dir" : 'X\(//\)$' \| \
36476 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36477$as_echo X"$as_dir" |
36478 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36479 s//\1/
36480 q
36481 }
36482 /^X\(\/\/\)[^/].*/{
36483 s//\1/
36484 q
36485 }
36486 /^X\(\/\/\)$/{
36487 s//\1/
36488 q
36489 }
36490 /^X\(\/\).*/{
36491 s//\1/
36492 q
36493 }
36494 s/.*/./; q'`
36495 test -d "$as_dir" && break
36496 done
36497 test -z "$as_dirs" || eval "mkdir $as_dirs"
36498 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36499
36500
36501} # as_fn_mkdir_p
36502if mkdir -p . 2>/dev/null; then
36503 as_mkdir_p='mkdir -p "$as_dir"'
36504else
36505 test -d ./-p && rmdir ./-p
36506 as_mkdir_p=false
36507fi
36508
36509
36510# as_fn_executable_p FILE
36511# -----------------------
36512# Test if FILE is an executable regular file.
36513as_fn_executable_p ()
36514{
36515 test -f "$1" && test -x "$1"
36516} # as_fn_executable_p
36517as_test_x='test -x'
36518as_executable_p=as_fn_executable_p
36519
36520# Sed expression to map a string onto a valid CPP name.
36521as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36522
36523# Sed expression to map a string onto a valid variable name.
36524as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36525
36526
36527exec 6>&1
36528## ----------------------------------- ##
36529## Main body of $CONFIG_STATUS script. ##
36530## ----------------------------------- ##
36531_ASEOF
36532test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36533
36534cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36535# Save the log message, to keep $0 and so on meaningful, and to
36536# report actual input values of CONFIG_FILES etc. instead of their
36537# values after options handling.
36538ac_log="
36539This file was extended by wget $as_me 1.14, which was
36540generated by GNU Autoconf 2.69. Invocation command line was
36541
36542 CONFIG_FILES = $CONFIG_FILES
36543 CONFIG_HEADERS = $CONFIG_HEADERS
36544 CONFIG_LINKS = $CONFIG_LINKS
36545 CONFIG_COMMANDS = $CONFIG_COMMANDS
36546 $ $0 $@
36547
36548on `(hostname || uname -n) 2>/dev/null | sed 1q`
36549"
36550
36551_ACEOF
36552
36553case $ac_config_files in *"
36554"*) set x $ac_config_files; shift; ac_config_files=$*;;
36555esac
36556
36557case $ac_config_headers in *"
36558"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36559esac
36560
36561
36562cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36563# Files that config.status was made for.
36564config_files="$ac_config_files"
36565config_headers="$ac_config_headers"
36566config_links="$ac_config_links"
36567config_commands="$ac_config_commands"
36568
36569_ACEOF
36570
36571cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36572ac_cs_usage="\
36573\`$as_me' instantiates files and other configuration actions
36574from templates according to the current configuration. Unless the files
36575and actions are specified as TAGs, all are instantiated by default.
36576
36577Usage: $0 [OPTION]... [TAG]...
36578
36579 -h, --help print this help, then exit
36580 -V, --version print version number and configuration settings, then exit
36581 --config print configuration, then exit
36582 -q, --quiet, --silent
36583 do not print progress messages
36584 -d, --debug don't remove temporary files
36585 --recheck update $as_me by reconfiguring in the same conditions
36586 --file=FILE[:TEMPLATE]
36587 instantiate the configuration file FILE
36588 --header=FILE[:TEMPLATE]
36589 instantiate the configuration header FILE
36590
36591Configuration files:
36592$config_files
36593
36594Configuration headers:
36595$config_headers
36596
36597Configuration links:
36598$config_links
36599
36600Configuration commands:
36601$config_commands
36602
36603Report bugs to <bug-wget@gnu.org>."
36604
36605_ACEOF
36606cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36607ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36608ac_cs_version="\\
36609wget config.status 1.14
36610configured by $0, generated by GNU Autoconf 2.69,
36611 with options \\"\$ac_cs_config\\"
36612
36613Copyright (C) 2012 Free Software Foundation, Inc.
36614This config.status script is free software; the Free Software Foundation
36615gives unlimited permission to copy, distribute and modify it."
36616
36617ac_pwd='$ac_pwd'
36618srcdir='$srcdir'
36619INSTALL='$INSTALL'
36620MKDIR_P='$MKDIR_P'
36621AWK='$AWK'
36622test -n "\$AWK" || AWK=awk
36623_ACEOF
36624
36625cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36626# The default lists apply if the user does not specify any file.
36627ac_need_defaults=:
36628while test $# != 0
36629do
36630 case $1 in
36631 --*=?*)
36632 ac_option=`expr "X$1" : 'X\([^=]*\)='`
36633 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36634 ac_shift=:
36635 ;;
36636 --*=)
36637 ac_option=`expr "X$1" : 'X\([^=]*\)='`
36638 ac_optarg=
36639 ac_shift=:
36640 ;;
36641 *)
36642 ac_option=$1
36643 ac_optarg=$2
36644 ac_shift=shift
36645 ;;
36646 esac
36647
36648 case $ac_option in
36649 # Handling of the options.
36650 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36651 ac_cs_recheck=: ;;
36652 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36653 $as_echo "$ac_cs_version"; exit ;;
36654 --config | --confi | --conf | --con | --co | --c )
36655 $as_echo "$ac_cs_config"; exit ;;
36656 --debug | --debu | --deb | --de | --d | -d )
36657 debug=: ;;
36658 --file | --fil | --fi | --f )
36659 $ac_shift
36660 case $ac_optarg in
36661 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36662 '') as_fn_error $? "missing file argument" ;;
36663 esac
36664 as_fn_append CONFIG_FILES " '$ac_optarg'"
36665 ac_need_defaults=false;;
36666 --header | --heade | --head | --hea )
36667 $ac_shift
36668 case $ac_optarg in
36669 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36670 esac
36671 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
36672 ac_need_defaults=false;;
36673 --he | --h)
36674 # Conflict between --help and --header
36675 as_fn_error $? "ambiguous option: \`$1'
36676Try \`$0 --help' for more information.";;
36677 --help | --hel | -h )
36678 $as_echo "$ac_cs_usage"; exit ;;
36679 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
36680 | -silent | --silent | --silen | --sile | --sil | --si | --s)
36681 ac_cs_silent=: ;;
36682
36683 # This is an error.
36684 -*) as_fn_error $? "unrecognized option: \`$1'
36685Try \`$0 --help' for more information." ;;
36686
36687 *) as_fn_append ac_config_targets " $1"
36688 ac_need_defaults=false ;;
36689
36690 esac
36691 shift
36692done
36693
36694ac_configure_extra_args=
36695
36696if $ac_cs_silent; then
36697 exec 6>/dev/null
36698 ac_configure_extra_args="$ac_configure_extra_args --silent"
36699fi
36700
36701_ACEOF
36702cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36703if \$ac_cs_recheck; then
36704 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
36705 shift
36706 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
36707 CONFIG_SHELL='$SHELL'
36708 export CONFIG_SHELL
36709 exec "\$@"
36710fi
36711
36712_ACEOF
36713cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36714exec 5>>config.log
36715{
36716 echo
36717 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
36718## Running $as_me. ##
36719_ASBOX
36720 $as_echo "$ac_log"
36721} >&5
36722
36723_ACEOF
36724cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36725#
36726# INIT-COMMANDS
36727#
36728AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
36729# Capture the value of obsolete ALL_LINGUAS because we need it to compute
36730 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
36731 # from automake < 1.5.
36732 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
36733 # Capture the value of LINGUAS because we need it to compute CATALOGS.
36734 LINGUAS="${LINGUAS-%UNSET%}"
36735
36736GNUmakefile=$GNUmakefile
36737
36738_ACEOF
36739
36740cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36741
36742# Handling of arguments.
36743for ac_config_target in $ac_config_targets
36744do
36745 case $ac_config_target in
36746 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
36747 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
36748 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
36749 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
36750 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
36751 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
36752 "util/Makefile") CONFIG_FILES="$CONFIG_FILES util/Makefile" ;;
36753 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
36754 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
36755 "tests/WgetTest.pm") CONFIG_FILES="$CONFIG_FILES tests/WgetTest.pm" ;;
36756 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
36757 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
36758
36759 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
36760 esac
36761done
36762
36763
36764# If the user did not use the arguments to specify the items to instantiate,
36765# then the envvar interface is used. Set only those that are not.
36766# We use the long form for the default assignment because of an extremely
36767# bizarre bug on SunOS 4.1.3.
36768if $ac_need_defaults; then
36769 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
36770 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
36771 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
36772 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
36773fi
36774
36775# Have a temporary directory for convenience. Make it in the build tree
36776# simply because there is no reason against having it here, and in addition,
36777# creating and moving files from /tmp can sometimes cause problems.
36778# Hook for its removal unless debugging.
36779# Note that there is a small window in which the directory will not be cleaned:
36780# after its creation but before its name has been assigned to `$tmp'.
36781$debug ||
36782{
36783 tmp= ac_tmp=
36784 trap 'exit_status=$?
36785 : "${ac_tmp:=$tmp}"
36786 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
36787' 0
36788 trap 'as_fn_exit 1' 1 2 13 15
36789}
36790# Create a (secure) tmp directory for tmp files.
36791
36792{
36793 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
36794 test -d "$tmp"
36795} ||
36796{
36797 tmp=./conf$$-$RANDOM
36798 (umask 077 && mkdir "$tmp")
36799} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
36800ac_tmp=$tmp
36801
36802# Set up the scripts for CONFIG_FILES section.
36803# No need to generate them if there are no CONFIG_FILES.
36804# This happens for instance with `./config.status config.h'.
36805if test -n "$CONFIG_FILES"; then
36806
36807
36808ac_cr=`echo X | tr X '\015'`
36809# On cygwin, bash can eat \r inside `` if the user requested igncr.
36810# But we know of no other shell where ac_cr would be empty at this
36811# point, so we can use a bashism as a fallback.
36812if test "x$ac_cr" = x; then
36813 eval ac_cr=\$\'\\r\'
36814fi
36815ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
36816if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
36817 ac_cs_awk_cr='\\r'
36818else
36819 ac_cs_awk_cr=$ac_cr
36820fi
36821
36822echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
36823_ACEOF
36824
36825
36826{
36827 echo "cat >conf$$subs.awk <<_ACEOF" &&
36828 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
36829 echo "_ACEOF"
36830} >conf$$subs.sh ||
36831 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36832ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
36833ac_delim='%!_!# '
36834for ac_last_try in false false false false false :; do
36835 . ./conf$$subs.sh ||
36836 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36837
36838 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
36839 if test $ac_delim_n = $ac_delim_num; then
36840 break
36841 elif $ac_last_try; then
36842 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36843 else
36844 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36845 fi
36846done
36847rm -f conf$$subs.sh
36848
36849cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36850cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
36851_ACEOF
36852sed -n '
36853h
36854s/^/S["/; s/!.*/"]=/
36855p
36856g
36857s/^[^!]*!//
36858:repl
36859t repl
36860s/'"$ac_delim"'$//
36861t delim
36862:nl
36863h
36864s/\(.\{148\}\)..*/\1/
36865t more1
36866s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
36867p
36868n
36869b repl
36870:more1
36871s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36872p
36873g
36874s/.\{148\}//
36875t nl
36876:delim
36877h
36878s/\(.\{148\}\)..*/\1/
36879t more2
36880s/["\\]/\\&/g; s/^/"/; s/$/"/
36881p
36882b
36883:more2
36884s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36885p
36886g
36887s/.\{148\}//
36888t delim
36889' <conf$$subs.awk | sed '
36890/^[^""]/{
36891 N
36892 s/\n//
36893}
36894' >>$CONFIG_STATUS || ac_write_fail=1
36895rm -f conf$$subs.awk
36896cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36897_ACAWK
36898cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
36899 for (key in S) S_is_set[key] = 1
36900 FS = ""
36901
36902}
36903{
36904 line = $ 0
36905 nfields = split(line, field, "@")
36906 substed = 0
36907 len = length(field[1])
36908 for (i = 2; i < nfields; i++) {
36909 key = field[i]
36910 keylen = length(key)
36911 if (S_is_set[key]) {
36912 value = S[key]
36913 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
36914 len += length(value) + length(field[++i])
36915 substed = 1
36916 } else
36917 len += 1 + keylen
36918 }
36919
36920 print line
36921}
36922
36923_ACAWK
36924_ACEOF
36925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36926if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
36927 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
36928else
36929 cat
36930fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
36931 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
36932_ACEOF
36933
36934# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
36935# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
36936# trailing colons and then remove the whole line if VPATH becomes empty
36937# (actually we leave an empty line to preserve line numbers).
36938if test "x$srcdir" = x.; then
36939 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
36940h
36941s///
36942s/^/:/
36943s/[ ]*$/:/
36944s/:\$(srcdir):/:/g
36945s/:\${srcdir}:/:/g
36946s/:@srcdir@:/:/g
36947s/^:*//
36948s/:*$//
36949x
36950s/\(=[ ]*\).*/\1/
36951G
36952s/\n//
36953s/^[^=]*=[ ]*$//
36954}'
36955fi
36956
36957cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36958fi # test -n "$CONFIG_FILES"
36959
36960# Set up the scripts for CONFIG_HEADERS section.
36961# No need to generate them if there are no CONFIG_HEADERS.
36962# This happens for instance with `./config.status Makefile'.
36963if test -n "$CONFIG_HEADERS"; then
36964cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
36965BEGIN {
36966_ACEOF
36967
36968# Transform confdefs.h into an awk script `defines.awk', embedded as
36969# here-document in config.status, that substitutes the proper values into
36970# config.h.in to produce config.h.
36971
36972# Create a delimiter string that does not exist in confdefs.h, to ease
36973# handling of long lines.
36974ac_delim='%!_!# '
36975for ac_last_try in false false :; do
36976 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
36977 if test -z "$ac_tt"; then
36978 break
36979 elif $ac_last_try; then
36980 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
36981 else
36982 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36983 fi
36984done
36985
36986# For the awk script, D is an array of macro values keyed by name,
36987# likewise P contains macro parameters if any. Preserve backslash
36988# newline sequences.
36989
36990ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
36991sed -n '
36992s/.\{148\}/&'"$ac_delim"'/g
36993t rset
36994:rset
36995s/^[ ]*#[ ]*define[ ][ ]*/ /
36996t def
36997d
36998:def
36999s/\\$//
37000t bsnl
37001s/["\\]/\\&/g
37002s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
37003D["\1"]=" \3"/p
37004s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
37005d
37006:bsnl
37007s/["\\]/\\&/g
37008s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
37009D["\1"]=" \3\\\\\\n"\\/p
37010t cont
37011s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37012t cont
37013d
37014:cont
37015n
37016s/.\{148\}/&'"$ac_delim"'/g
37017t clear
37018:clear
37019s/\\$//
37020t bsnlc
37021s/["\\]/\\&/g; s/^/"/; s/$/"/p
37022d
37023:bsnlc
37024s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37025b cont
37026' <confdefs.h | sed '
37027s/'"$ac_delim"'/"\\\
37028"/g' >>$CONFIG_STATUS || ac_write_fail=1
37029
37030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37031 for (key in D) D_is_set[key] = 1
37032 FS = ""
37033}
37034/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37035 line = \$ 0
37036 split(line, arg, " ")
37037 if (arg[1] == "#") {
37038 defundef = arg[2]
37039 mac1 = arg[3]
37040 } else {
37041 defundef = substr(arg[1], 2)
37042 mac1 = arg[2]
37043 }
37044 split(mac1, mac2, "(") #)
37045 macro = mac2[1]
37046 prefix = substr(line, 1, index(line, defundef) - 1)
37047 if (D_is_set[macro]) {
37048 # Preserve the white space surrounding the "#".
37049 print prefix "define", macro P[macro] D[macro]
37050 next
37051 } else {
37052 # Replace #undef with comments. This is necessary, for example,
37053 # in the case of _POSIX_SOURCE, which is predefined and required
37054 # on some systems where configure will not decide to define it.
37055 if (defundef == "undef") {
37056 print "/*", prefix defundef, macro, "*/"
37057 next
37058 }
37059 }
37060}
37061{ print }
37062_ACAWK
37063_ACEOF
37064cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37065 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37066fi # test -n "$CONFIG_HEADERS"
37067
37068
37069eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
37070shift
37071for ac_tag
37072do
37073 case $ac_tag in
37074 :[FHLC]) ac_mode=$ac_tag; continue;;
37075 esac
37076 case $ac_mode$ac_tag in
37077 :[FHL]*:*);;
37078 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37079 :[FH]-) ac_tag=-:-;;
37080 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37081 esac
37082 ac_save_IFS=$IFS
37083 IFS=:
37084 set x $ac_tag
37085 IFS=$ac_save_IFS
37086 shift
37087 ac_file=$1
37088 shift
37089
37090 case $ac_mode in
37091 :L) ac_source=$1;;
37092 :[FH])
37093 ac_file_inputs=
37094 for ac_f
37095 do
37096 case $ac_f in
37097 -) ac_f="$ac_tmp/stdin";;
37098 *) # Look for the file first in the build tree, then in the source tree
37099 # (if the path is not absolute). The absolute path cannot be DOS-style,
37100 # because $ac_f cannot contain `:'.
37101 test -f "$ac_f" ||
37102 case $ac_f in
37103 [\\/$]*) false;;
37104 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37105 esac ||
37106 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37107 esac
37108 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37109 as_fn_append ac_file_inputs " '$ac_f'"
37110 done
37111
37112 # Let's still pretend it is `configure' which instantiates (i.e., don't
37113 # use $as_me), people would be surprised to read:
37114 # /* config.h. Generated by config.status. */
37115 configure_input='Generated from '`
37116 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37117 `' by configure.'
37118 if test x"$ac_file" != x-; then
37119 configure_input="$ac_file. $configure_input"
37120 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37121$as_echo "$as_me: creating $ac_file" >&6;}
37122 fi
37123 # Neutralize special characters interpreted by sed in replacement strings.
37124 case $configure_input in #(
37125 *\&* | *\|* | *\\* )
37126 ac_sed_conf_input=`$as_echo "$configure_input" |
37127 sed 's/[\\\\&|]/\\\\&/g'`;; #(
37128 *) ac_sed_conf_input=$configure_input;;
37129 esac
37130
37131 case $ac_tag in
37132 *:-:* | *:-) cat >"$ac_tmp/stdin" \
37133 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37134 esac
37135 ;;
37136 esac
37137
37138 ac_dir=`$as_dirname -- "$ac_file" ||
37139$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37140 X"$ac_file" : 'X\(//\)[^/]' \| \
37141 X"$ac_file" : 'X\(//\)$' \| \
37142 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37143$as_echo X"$ac_file" |
37144 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37145 s//\1/
37146 q
37147 }
37148 /^X\(\/\/\)[^/].*/{
37149 s//\1/
37150 q
37151 }
37152 /^X\(\/\/\)$/{
37153 s//\1/
37154 q
37155 }
37156 /^X\(\/\).*/{
37157 s//\1/
37158 q
37159 }
37160 s/.*/./; q'`
37161 as_dir="$ac_dir"; as_fn_mkdir_p
37162 ac_builddir=.
37163
37164case "$ac_dir" in
37165.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37166*)
37167 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37168 # A ".." for each directory in $ac_dir_suffix.
37169 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37170 case $ac_top_builddir_sub in
37171 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37172 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37173 esac ;;
37174esac
37175ac_abs_top_builddir=$ac_pwd
37176ac_abs_builddir=$ac_pwd$ac_dir_suffix
37177# for backward compatibility:
37178ac_top_builddir=$ac_top_build_prefix
37179
37180case $srcdir in
37181 .) # We are building in place.
37182 ac_srcdir=.
37183 ac_top_srcdir=$ac_top_builddir_sub
37184 ac_abs_top_srcdir=$ac_pwd ;;
37185 [\\/]* | ?:[\\/]* ) # Absolute name.
37186 ac_srcdir=$srcdir$ac_dir_suffix;
37187 ac_top_srcdir=$srcdir
37188 ac_abs_top_srcdir=$srcdir ;;
37189 *) # Relative name.
37190 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37191 ac_top_srcdir=$ac_top_build_prefix$srcdir
37192 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37193esac
37194ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37195
37196
37197 case $ac_mode in
37198 :F)
37199 #
37200 # CONFIG_FILE
37201 #
37202
37203 case $INSTALL in
37204 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
37205 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
37206 esac
37207 ac_MKDIR_P=$MKDIR_P
37208 case $MKDIR_P in
37209 [\\/$]* | ?:[\\/]* ) ;;
37210 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
37211 esac
37212_ACEOF
37213
37214cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37215# If the template does not know about datarootdir, expand it.
37216# FIXME: This hack should be removed a few years after 2.60.
37217ac_datarootdir_hack=; ac_datarootdir_seen=
37218ac_sed_dataroot='
37219/datarootdir/ {
37220 p
37221 q
37222}
37223/@datadir@/p
37224/@docdir@/p
37225/@infodir@/p
37226/@localedir@/p
37227/@mandir@/p'
37228case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37229*datarootdir*) ac_datarootdir_seen=yes;;
37230*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37231 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37232$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37233_ACEOF
37234cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37235 ac_datarootdir_hack='
37236 s&@datadir@&$datadir&g
37237 s&@docdir@&$docdir&g
37238 s&@infodir@&$infodir&g
37239 s&@localedir@&$localedir&g
37240 s&@mandir@&$mandir&g
37241 s&\\\${datarootdir}&$datarootdir&g' ;;
37242esac
37243_ACEOF
37244
37245# Neutralize VPATH when `$srcdir' = `.'.
37246# Shell code in configure.ac might set extrasub.
37247# FIXME: do we really want to maintain this feature?
37248cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37249ac_sed_extra="$ac_vpsub
37250$extrasub
37251_ACEOF
37252cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37253:t
37254/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37255s|@configure_input@|$ac_sed_conf_input|;t t
37256s&@top_builddir@&$ac_top_builddir_sub&;t t
37257s&@top_build_prefix@&$ac_top_build_prefix&;t t
37258s&@srcdir@&$ac_srcdir&;t t
37259s&@abs_srcdir@&$ac_abs_srcdir&;t t
37260s&@top_srcdir@&$ac_top_srcdir&;t t
37261s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37262s&@builddir@&$ac_builddir&;t t
37263s&@abs_builddir@&$ac_abs_builddir&;t t
37264s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37265s&@INSTALL@&$ac_INSTALL&;t t
37266s&@MKDIR_P@&$ac_MKDIR_P&;t t
37267$ac_datarootdir_hack
37268"
37269eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37270 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37271
37272test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37273 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37274 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
37275 "$ac_tmp/out"`; test -z "$ac_out"; } &&
37276 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37277which seems to be undefined. Please make sure it is defined" >&5
37278$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37279which seems to be undefined. Please make sure it is defined" >&2;}
37280
37281 rm -f "$ac_tmp/stdin"
37282 case $ac_file in
37283 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37284 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37285 esac \
37286 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37287 ;;
37288 :H)
37289 #
37290 # CONFIG_HEADER
37291 #
37292 if test x"$ac_file" != x-; then
37293 {
37294 $as_echo "/* $configure_input */" \
37295 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37296 } >"$ac_tmp/config.h" \
37297 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37298 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37299 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37300$as_echo "$as_me: $ac_file is unchanged" >&6;}
37301 else
37302 rm -f "$ac_file"
37303 mv "$ac_tmp/config.h" "$ac_file" \
37304 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37305 fi
37306 else
37307 $as_echo "/* $configure_input */" \
37308 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37309 || as_fn_error $? "could not create -" "$LINENO" 5
37310 fi
37311# Compute "$ac_file"'s index in $config_headers.
37312_am_arg="$ac_file"
37313_am_stamp_count=1
37314for _am_header in $config_headers :; do
37315 case $_am_header in
37316 $_am_arg | $_am_arg:* )
37317 break ;;
37318 * )
37319 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
37320 esac
37321done
37322echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
37323$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37324 X"$_am_arg" : 'X\(//\)[^/]' \| \
37325 X"$_am_arg" : 'X\(//\)$' \| \
37326 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
37327$as_echo X"$_am_arg" |
37328 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37329 s//\1/
37330 q
37331 }
37332 /^X\(\/\/\)[^/].*/{
37333 s//\1/
37334 q
37335 }
37336 /^X\(\/\/\)$/{
37337 s//\1/
37338 q
37339 }
37340 /^X\(\/\).*/{
37341 s//\1/
37342 q
37343 }
37344 s/.*/./; q'`/stamp-h$_am_stamp_count
37345 ;;
37346 :L)
37347 #
37348 # CONFIG_LINK
37349 #
37350
37351 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
37352 :
37353 else
37354 # Prefer the file from the source tree if names are identical.
37355 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
37356 ac_source=$srcdir/$ac_source
37357 fi
37358
37359 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
37360$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
37361
37362 if test ! -r "$ac_source"; then
37363 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
37364 fi
37365 rm -f "$ac_file"
37366
37367 # Try a relative symlink, then a hard link, then a copy.
37368 case $ac_source in
37369 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
37370 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
37371 esac
37372 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
37373 ln "$ac_source" "$ac_file" 2>/dev/null ||
37374 cp -p "$ac_source" "$ac_file" ||
37375 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
37376 fi
37377 ;;
37378 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
37379$as_echo "$as_me: executing $ac_file commands" >&6;}
37380 ;;
37381 esac
37382
37383
37384 case $ac_file$ac_mode in
37385 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
37386 # Autoconf 2.62 quotes --file arguments for eval, but not when files
37387 # are listed without --file. Let's play safe and only enable the eval
37388 # if we detect the quoting.
37389 case $CONFIG_FILES in
37390 *\'*) eval set x "$CONFIG_FILES" ;;
37391 *) set x $CONFIG_FILES ;;
37392 esac
37393 shift
37394 for mf
37395 do
37396 # Strip MF so we end up with the name of the file.
37397 mf=`echo "$mf" | sed -e 's/:.*$//'`
37398 # Check whether this is an Automake generated Makefile or not.
37399 # We used to match only the files named `Makefile.in', but
37400 # some people rename them; so instead we look at the file content.
37401 # Grep'ing the first line is not enough: some people post-process
37402 # each Makefile.in and add a new line on top of each file to say so.
37403 # Grep'ing the whole file is not good either: AIX grep has a line
37404 # limit of 2048, but all sed's we know have understand at least 4000.
37405 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
37406 dirpart=`$as_dirname -- "$mf" ||
37407$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37408 X"$mf" : 'X\(//\)[^/]' \| \
37409 X"$mf" : 'X\(//\)$' \| \
37410 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
37411$as_echo X"$mf" |
37412 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37413 s//\1/
37414 q
37415 }
37416 /^X\(\/\/\)[^/].*/{
37417 s//\1/
37418 q
37419 }
37420 /^X\(\/\/\)$/{
37421 s//\1/
37422 q
37423 }
37424 /^X\(\/\).*/{
37425 s//\1/
37426 q
37427 }
37428 s/.*/./; q'`
37429 else
37430 continue
37431 fi
37432 # Extract the definition of DEPDIR, am__include, and am__quote
37433 # from the Makefile without running `make'.
37434 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
37435 test -z "$DEPDIR" && continue
37436 am__include=`sed -n 's/^am__include = //p' < "$mf"`
37437 test -z "am__include" && continue
37438 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
37439 # When using ansi2knr, U may be empty or an underscore; expand it
37440 U=`sed -n 's/^U = //p' < "$mf"`
37441 # Find all dependency output files, they are included files with
37442 # $(DEPDIR) in their names. We invoke sed twice because it is the
37443 # simplest approach to changing $(DEPDIR) to its actual value in the
37444 # expansion.
37445 for file in `sed -n "
37446 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
37447 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
37448 # Make sure the directory exists.
37449 test -f "$dirpart/$file" && continue
37450 fdir=`$as_dirname -- "$file" ||
37451$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37452 X"$file" : 'X\(//\)[^/]' \| \
37453 X"$file" : 'X\(//\)$' \| \
37454 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
37455$as_echo X"$file" |
37456 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37457 s//\1/
37458 q
37459 }
37460 /^X\(\/\/\)[^/].*/{
37461 s//\1/
37462 q
37463 }
37464 /^X\(\/\/\)$/{
37465 s//\1/
37466 q
37467 }
37468 /^X\(\/\).*/{
37469 s//\1/
37470 q
37471 }
37472 s/.*/./; q'`
37473 as_dir=$dirpart/$fdir; as_fn_mkdir_p
37474 # echo "creating $dirpart/$file"
37475 echo '# dummy' > "$dirpart/$file"
37476 done
37477 done
37478}
37479 ;;
37480 "po-directories":C)
37481 for ac_file in $CONFIG_FILES; do
37482 # Support "outfile[:infile[:infile...]]"
37483 case "$ac_file" in
37484 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
37485 esac
37486 # PO directories have a Makefile.in generated from Makefile.in.in.
37487 case "$ac_file" in */Makefile.in)
37488 # Adjust a relative srcdir.
37489 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
37490 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
37491 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
37492 # In autoconf-2.13 it is called $ac_given_srcdir.
37493 # In autoconf-2.50 it is called $srcdir.
37494 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
37495 case "$ac_given_srcdir" in
37496 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
37497 /*) top_srcdir="$ac_given_srcdir" ;;
37498 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
37499 esac
37500 # Treat a directory as a PO directory if and only if it has a
37501 # POTFILES.in file. This allows packages to have multiple PO
37502 # directories under different names or in different locations.
37503 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
37504 rm -f "$ac_dir/POTFILES"
37505 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
37506 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
37507 POMAKEFILEDEPS="POTFILES.in"
37508 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
37509 # on $ac_dir but don't depend on user-specified configuration
37510 # parameters.
37511 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
37512 # The LINGUAS file contains the set of available languages.
37513 if test -n "$OBSOLETE_ALL_LINGUAS"; then
37514 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
37515 fi
37516 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
37517 # Hide the ALL_LINGUAS assigment from automake < 1.5.
37518 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
37519 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
37520 else
37521 # The set of available languages was given in configure.in.
37522 # Hide the ALL_LINGUAS assigment from automake < 1.5.
37523 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
37524 fi
37525 # Compute POFILES
37526 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
37527 # Compute UPDATEPOFILES
37528 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
37529 # Compute DUMMYPOFILES
37530 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
37531 # Compute GMOFILES
37532 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
37533 case "$ac_given_srcdir" in
37534 .) srcdirpre= ;;
37535 *) srcdirpre='$(srcdir)/' ;;
37536 esac
37537 POFILES=
37538 UPDATEPOFILES=
37539 DUMMYPOFILES=
37540 GMOFILES=
37541 for lang in $ALL_LINGUAS; do
37542 POFILES="$POFILES $srcdirpre$lang.po"
37543 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
37544 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
37545 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
37546 done
37547 # CATALOGS depends on both $ac_dir and the user's LINGUAS
37548 # environment variable.
37549 INST_LINGUAS=
37550 if test -n "$ALL_LINGUAS"; then
37551 for presentlang in $ALL_LINGUAS; do
37552 useit=no
37553 if test "%UNSET%" != "$LINGUAS"; then
37554 desiredlanguages="$LINGUAS"
37555 else
37556 desiredlanguages="$ALL_LINGUAS"
37557 fi
37558 for desiredlang in $desiredlanguages; do
37559 # Use the presentlang catalog if desiredlang is
37560 # a. equal to presentlang, or
37561 # b. a variant of presentlang (because in this case,
37562 # presentlang can be used as a fallback for messages
37563 # which are not translated in the desiredlang catalog).
37564 case "$desiredlang" in
37565 "$presentlang"*) useit=yes;;
37566 esac
37567 done
37568 if test $useit = yes; then
37569 INST_LINGUAS="$INST_LINGUAS $presentlang"
37570 fi
37571 done
37572 fi
37573 CATALOGS=
37574 if test -n "$INST_LINGUAS"; then
37575 for lang in $INST_LINGUAS; do
37576 CATALOGS="$CATALOGS $lang.gmo"
37577 done
37578 fi
37579 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
37580 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
37581 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
37582 if test -f "$f"; then
37583 case "$f" in
37584 *.orig | *.bak | *~) ;;
37585 *) cat "$f" >> "$ac_dir/Makefile" ;;
37586 esac
37587 fi
37588 done
37589 fi
37590 ;;
37591 esac
37592 done ;;
37593
37594 esac
37595done # for ac_tag
37596
37597
37598as_fn_exit 0
37599_ACEOF
37600ac_clean_files=$ac_clean_files_save
37601
37602test $ac_write_fail = 0 ||
37603 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37604
37605
37606# configure is writing to config.log, and then calls config.status.
37607# config.status does its own redirection, appending to config.log.
37608# Unfortunately, on DOS this fails, as config.log is still kept open
37609# by configure, so config.status won't be able to write to it; its
37610# output is simply discarded. So we exec the FD to /dev/null,
37611# effectively closing config.log, so it can be properly (re)opened and
37612# appended to by config.status. When coming back to configure, we
37613# need to make the FD available again.
37614if test "$no_create" != yes; then
37615 ac_cs_success=:
37616 ac_config_status_args=
37617 test "$silent" = yes &&
37618 ac_config_status_args="$ac_config_status_args --quiet"
37619 exec 5>/dev/null
37620 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37621 exec 5>>config.log
37622 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37623 # would make configure fail if this is the last instruction.
37624 $ac_cs_success || as_fn_exit 1
37625fi
37626if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37627 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37628$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37629fi
37630