sim: bfin: add support for SDL2
[binutils-gdb.git] / gnulib / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for libgnu UNUSED-VERSION.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50 else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" "" $as_nl"
88
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME='libgnu'
579 PACKAGE_TARNAME='libgnu'
580 PACKAGE_VERSION='UNUSED-VERSION'
581 PACKAGE_STRING='libgnu UNUSED-VERSION'
582 PACKAGE_BUGREPORT=''
583 PACKAGE_URL=''
584
585 ac_unique_file="import/memmem.c"
586 ac_header_list=
587 # Factoring default headers for most tests.
588 ac_includes_default="\
589 #include <stdio.h>
590 #ifdef HAVE_SYS_TYPES_H
591 # include <sys/types.h>
592 #endif
593 #ifdef HAVE_SYS_STAT_H
594 # include <sys/stat.h>
595 #endif
596 #ifdef STDC_HEADERS
597 # include <stdlib.h>
598 # include <stddef.h>
599 #else
600 # ifdef HAVE_STDLIB_H
601 # include <stdlib.h>
602 # endif
603 #endif
604 #ifdef HAVE_STRING_H
605 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
606 # include <memory.h>
607 # endif
608 # include <string.h>
609 #endif
610 #ifdef HAVE_STRINGS_H
611 # include <strings.h>
612 #endif
613 #ifdef HAVE_INTTYPES_H
614 # include <inttypes.h>
615 #endif
616 #ifdef HAVE_STDINT_H
617 # include <stdint.h>
618 #endif
619 #ifdef HAVE_UNISTD_H
620 # include <unistd.h>
621 #endif"
622
623 gl_use_threads_default=
624 gl_use_winpthreads_default=
625 ac_func_list=
626 gl_fnmatch_required=POSIX
627 ac_subst_vars='am__EXEEXT_FALSE
628 am__EXEEXT_TRUE
629 gltests_LTLIBOBJS
630 gltests_LIBOBJS
631 gl_LTLIBOBJS
632 gl_LIBOBJS
633 LTLIBOBJS
634 LIBOBJS
635 LN_S
636 AM_BACKSLASH
637 AM_DEFAULT_VERBOSITY
638 AM_DEFAULT_V
639 AM_V
640 am__fastdepCC_FALSE
641 am__fastdepCC_TRUE
642 CCDEPMODE
643 am__nodep
644 AMDEPBACKSLASH
645 AMDEP_FALSE
646 AMDEP_TRUE
647 am__quote
648 am__include
649 DEPDIR
650 am__untar
651 am__tar
652 AMTAR
653 am__leading_dot
654 SET_MAKE
655 AWK
656 mkdir_p
657 INSTALL_STRIP_PROGRAM
658 STRIP
659 install_sh
660 MAKEINFO
661 AUTOHEADER
662 AUTOMAKE
663 AUTOCONF
664 ACLOCAL
665 VERSION
666 PACKAGE
667 CYGPATH_W
668 am__isrc
669 INSTALL_DATA
670 INSTALL_SCRIPT
671 INSTALL_PROGRAM
672 LIBGNU_LTLIBDEPS
673 LIBGNU_LIBDEPS
674 gltests_WITNESS
675 REPLACE_TOWLOWER
676 REPLACE_ISWCNTRL
677 HAVE_WCTYPE_H
678 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
679 NEXT_WCTYPE_H
680 HAVE_ISWCNTRL
681 REPLACE_ISWXDIGIT
682 REPLACE_ISWDIGIT
683 REPLACE_ISWBLANK
684 HAVE_WCTRANS_T
685 HAVE_WCTYPE_T
686 HAVE_ISWBLANK
687 GNULIB_TOWCTRANS
688 GNULIB_WCTRANS
689 GNULIB_ISWCTYPE
690 GNULIB_WCTYPE
691 GNULIB_ISWXDIGIT
692 GNULIB_ISWDIGIT
693 GNULIB_ISWBLANK
694 HAVE_CRTDEFS_H
695 HAVE_WINT_T
696 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
697 NEXT_WCHAR_H
698 HAVE_UNISTD_H
699 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
700 NEXT_UNISTD_H
701 TIME_H_DEFINES_TIME_UTC
702 UNISTD_H_DEFINES_STRUCT_TIMESPEC
703 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
704 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
705 TIME_H_DEFINES_STRUCT_TIMESPEC
706 NEXT_AS_FIRST_DIRECTIVE_TIME_H
707 NEXT_TIME_H
708 REPLACE_LOCALTIME
709 REPLACE_GMTIME
710 REPLACE_TZSET
711 REPLACE_TIMEGM
712 REPLACE_STRFTIME
713 REPLACE_NANOSLEEP
714 REPLACE_MKTIME
715 REPLACE_LOCALTIME_R
716 REPLACE_CTIME
717 HAVE_TIMEZONE_T
718 HAVE_TIMESPEC_GET
719 HAVE_TIMEGM
720 HAVE_STRPTIME
721 HAVE_NANOSLEEP
722 HAVE_DECL_LOCALTIME_R
723 GNULIB_MDA_TZSET
724 GNULIB_TZSET
725 GNULIB_TIME_RZ
726 GNULIB_TIME_R
727 GNULIB_TIMESPEC_GET
728 GNULIB_TIMEGM
729 GNULIB_STRPTIME
730 GNULIB_STRFTIME
731 GNULIB_NANOSLEEP
732 GNULIB_LOCALTIME
733 GNULIB_MKTIME
734 GNULIB_CTIME
735 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
736 NEXT_SYS_WAIT_H
737 GNULIB_WAITPID
738 HAVE_SYS_UIO_H
739 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
740 NEXT_SYS_UIO_H
741 WINDOWS_STAT_INODES
742 WINDOWS_64_BIT_OFF_T
743 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
744 NEXT_SYS_TYPES_H
745 HAVE_SYS_RANDOM_H
746 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
747 NEXT_SYS_RANDOM_H
748 HAVE_STRINGS_H
749 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
750 NEXT_STRINGS_H
751 NEXT_AS_FIRST_DIRECTIVE_STRING_H
752 NEXT_STRING_H
753 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
754 NEXT_STDLIB_H
755 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
756 NEXT_STDIO_H
757 HAVE__BOOL
758 GL_GENERATE_STDBOOL_H_FALSE
759 GL_GENERATE_STDBOOL_H_TRUE
760 STDBOOL_H
761 GL_GENERATE_STDALIGN_H_FALSE
762 GL_GENERATE_STDALIGN_H_TRUE
763 STDALIGN_H
764 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
765 NEXT_SIGNAL_H
766 REPLACE_RAISE
767 REPLACE_PTHREAD_SIGMASK
768 HAVE_SIGHANDLER_T
769 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
770 HAVE_STRUCT_SIGACTION_SA_SIGACTION
771 HAVE_SIGACTION
772 HAVE_SIGINFO_T
773 HAVE_SIGSET_T
774 HAVE_RAISE
775 HAVE_PTHREAD_SIGMASK
776 HAVE_POSIX_SIGNALBLOCKING
777 GNULIB_SIGACTION
778 GNULIB_SIGPROCMASK
779 GNULIB_SIGNAL_H_SIGPIPE
780 GNULIB_RAISE
781 GNULIB_PTHREAD_SIGMASK
782 LIB_SELECT
783 LIBSOCKET
784 HAVE_SYS_SELECT_H
785 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
786 NEXT_SYS_SELECT_H
787 REPLACE_SELECT
788 REPLACE_PSELECT
789 HAVE_PSELECT
790 GNULIB_SELECT
791 GNULIB_PSELECT
792 GL_GENERATE_NETINET_IN_H_FALSE
793 GL_GENERATE_NETINET_IN_H_TRUE
794 NETINET_IN_H
795 HAVE_NETINET_IN_H
796 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
797 NEXT_NETINET_IN_H
798 HAVE_NETDB_H
799 NEXT_AS_FIRST_DIRECTIVE_NETDB_H
800 NEXT_NETDB_H
801 REPLACE_GETADDRINFO
802 REPLACE_GAI_STRERROR
803 HAVE_DECL_GETNAMEINFO
804 HAVE_DECL_GETADDRINFO
805 HAVE_DECL_GAI_STRERROR
806 HAVE_DECL_FREEADDRINFO
807 HAVE_STRUCT_ADDRINFO
808 GNULIB_GETADDRINFO
809 UNDEFINE_STRTOK_R
810 REPLACE_STRSIGNAL
811 REPLACE_STRERRORNAME_NP
812 REPLACE_STRERROR_R
813 REPLACE_STRERROR
814 REPLACE_STRTOK_R
815 REPLACE_STRCASESTR
816 REPLACE_STRSTR
817 REPLACE_STRNLEN
818 REPLACE_STRNDUP
819 REPLACE_STRNCAT
820 REPLACE_STRDUP
821 REPLACE_STRCHRNUL
822 REPLACE_STPNCPY
823 REPLACE_MEMMEM
824 REPLACE_MEMCHR
825 REPLACE_FFSLL
826 HAVE_STRVERSCMP
827 HAVE_DECL_STRSIGNAL
828 HAVE_SIGDESCR_NP
829 HAVE_SIGABBREV_NP
830 HAVE_STRERRORNAME_NP
831 HAVE_DECL_STRERROR_R
832 HAVE_DECL_STRTOK_R
833 HAVE_STRCASESTR
834 HAVE_STRSEP
835 HAVE_STRPBRK
836 HAVE_DECL_STRNLEN
837 HAVE_DECL_STRNDUP
838 HAVE_DECL_STRDUP
839 HAVE_STRCHRNUL
840 HAVE_STPNCPY
841 HAVE_STPCPY
842 HAVE_RAWMEMCHR
843 HAVE_DECL_MEMRCHR
844 HAVE_MEMPCPY
845 HAVE_DECL_MEMMEM
846 HAVE_FFSLL
847 HAVE_FFSL
848 HAVE_EXPLICIT_BZERO
849 GNULIB_MDA_STRDUP
850 GNULIB_MDA_MEMCCPY
851 HAVE_MBSLEN
852 GNULIB_STRVERSCMP
853 GNULIB_STRSIGNAL
854 GNULIB_SIGDESCR_NP
855 GNULIB_SIGABBREV_NP
856 GNULIB_STRERRORNAME_NP
857 GNULIB_STRERROR_R
858 GNULIB_STRERROR
859 GNULIB_MBSTOK_R
860 GNULIB_MBSSEP
861 GNULIB_MBSSPN
862 GNULIB_MBSPBRK
863 GNULIB_MBSCSPN
864 GNULIB_MBSCASESTR
865 GNULIB_MBSPCASECMP
866 GNULIB_MBSNCASECMP
867 GNULIB_MBSCASECMP
868 GNULIB_MBSSTR
869 GNULIB_MBSRCHR
870 GNULIB_MBSCHR
871 GNULIB_MBSNLEN
872 GNULIB_MBSLEN
873 GNULIB_STRTOK_R
874 GNULIB_STRCASESTR
875 GNULIB_STRSTR
876 GNULIB_STRSEP
877 GNULIB_STRPBRK
878 GNULIB_STRNLEN
879 GNULIB_STRNDUP
880 GNULIB_STRNCAT
881 GNULIB_STRDUP
882 GNULIB_STRCHRNUL
883 GNULIB_STPNCPY
884 GNULIB_STPCPY
885 GNULIB_RAWMEMCHR
886 GNULIB_MEMRCHR
887 GNULIB_MEMPCPY
888 GNULIB_MEMMEM
889 GNULIB_MEMCHR
890 GNULIB_FFSLL
891 GNULIB_FFSL
892 GNULIB_EXPLICIT_BZERO
893 HAVE_VISIBILITY
894 CFLAG_VISIBILITY
895 LIB_MBRTOWC
896 LOCALE_ZH_CN
897 LOCALE_FR_UTF8
898 LOCALE_JA
899 NEXT_AS_FIRST_DIRECTIVE_MATH_H
900 NEXT_MATH_H
901 LTLIBMULTITHREAD
902 LIBMULTITHREAD
903 LTLIBTHREAD
904 LIBTHREAD
905 LIBSTDTHREAD
906 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
907 NEXT_LOCALE_H
908 HAVE_XLOCALE_H
909 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
910 NEXT_STDDEF_H
911 GL_GENERATE_STDDEF_H_FALSE
912 GL_GENERATE_STDDEF_H_TRUE
913 STDDEF_H
914 HAVE_WCHAR_T
915 HAVE_MAX_ALIGN_T
916 REPLACE_NULL
917 REPLACE_STRUCT_LCONV
918 REPLACE_FREELOCALE
919 REPLACE_DUPLOCALE
920 REPLACE_NEWLOCALE
921 REPLACE_SETLOCALE
922 REPLACE_LOCALECONV
923 HAVE_FREELOCALE
924 HAVE_DUPLOCALE
925 HAVE_NEWLOCALE
926 GNULIB_LOCALENAME
927 GNULIB_DUPLOCALE
928 GNULIB_SETLOCALE_NULL
929 GNULIB_SETLOCALE
930 GNULIB_LOCALECONV
931 LOCALCHARSET_TESTS_ENVIRONMENT
932 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
933 NEXT_INTTYPES_H
934 UINT64_MAX_EQ_ULONG_MAX
935 UINT32_MAX_LT_UINTMAX_MAX
936 PRIPTR_PREFIX
937 INT64_MAX_EQ_LONG_MAX
938 INT32_MAX_LT_INTMAX_MAX
939 REPLACE_STRTOUMAX
940 REPLACE_STRTOIMAX
941 HAVE_IMAXDIV_T
942 HAVE_DECL_STRTOUMAX
943 HAVE_DECL_STRTOIMAX
944 HAVE_DECL_IMAXDIV
945 HAVE_DECL_IMAXABS
946 GNULIB_STRTOUMAX
947 GNULIB_STRTOIMAX
948 GNULIB_IMAXDIV
949 GNULIB_IMAXABS
950 GL_GENERATE_STDINT_H_FALSE
951 GL_GENERATE_STDINT_H_TRUE
952 STDINT_H
953 HAVE_SYS_INTTYPES_H
954 HAVE_SYS_BITYPES_H
955 HAVE_C99_STDINT_H
956 WINT_T_SUFFIX
957 WCHAR_T_SUFFIX
958 SIG_ATOMIC_T_SUFFIX
959 SIZE_T_SUFFIX
960 PTRDIFF_T_SUFFIX
961 HAVE_SIGNED_WINT_T
962 HAVE_SIGNED_WCHAR_T
963 HAVE_SIGNED_SIG_ATOMIC_T
964 BITSIZEOF_WINT_T
965 BITSIZEOF_WCHAR_T
966 BITSIZEOF_SIG_ATOMIC_T
967 BITSIZEOF_SIZE_T
968 BITSIZEOF_PTRDIFF_T
969 APPLE_UNIVERSAL_BUILD
970 HAVE_STDINT_H
971 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
972 NEXT_STDINT_H
973 HAVE_SYS_TYPES_H
974 HAVE_INTTYPES_H
975 HAVE_WCHAR_H
976 GNULIB_OVERRIDES_WINT_T
977 GL_GENERATE_LIMITS_H_FALSE
978 GL_GENERATE_LIMITS_H_TRUE
979 LIMITS_H
980 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
981 NEXT_LIMITS_H
982 INET_NTOP_LIB
983 LIB_HARD_LOCALE
984 LIB_SETLOCALE_NULL
985 LIB_SCHED_YIELD
986 LIBPMULTITHREAD
987 LIBPTHREAD
988 GL_GENERATE_GLOB_H_FALSE
989 GL_GENERATE_GLOB_H_TRUE
990 GLOB_H
991 HAVE_GLOB_H
992 NEXT_AS_FIRST_DIRECTIVE_GLOB_H
993 NEXT_GLOB_H
994 REPLACE_GLOB_PATTERN_P
995 REPLACE_GLOB
996 HAVE_GLOB_PATTERN_P
997 HAVE_GLOB
998 GNULIB_GLOB
999 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1000 NEXT_SYS_TIME_H
1001 REPLACE_STRUCT_TIMEVAL
1002 REPLACE_GETTIMEOFDAY
1003 HAVE_SYS_TIME_H
1004 HAVE_STRUCT_TIMEVAL
1005 HAVE_GETTIMEOFDAY
1006 GNULIB_GETTIMEOFDAY
1007 LTLIBINTL
1008 LIBINTL
1009 LIB_GETRANDOM
1010 REPLACE_GETRANDOM
1011 HAVE_GETRANDOM
1012 GNULIB_GETRANDOM
1013 LIB_GETLOGIN
1014 REPLACE_VSPRINTF
1015 REPLACE_VSNPRINTF
1016 REPLACE_VPRINTF
1017 REPLACE_VFPRINTF
1018 REPLACE_VDPRINTF
1019 REPLACE_VASPRINTF
1020 REPLACE_TMPFILE
1021 REPLACE_STDIO_WRITE_FUNCS
1022 REPLACE_STDIO_READ_FUNCS
1023 REPLACE_SPRINTF
1024 REPLACE_SNPRINTF
1025 REPLACE_RENAMEAT
1026 REPLACE_RENAME
1027 REPLACE_REMOVE
1028 REPLACE_PRINTF
1029 REPLACE_POPEN
1030 REPLACE_PERROR
1031 REPLACE_OBSTACK_PRINTF
1032 REPLACE_GETLINE
1033 REPLACE_GETDELIM
1034 REPLACE_FTELLO
1035 REPLACE_FTELL
1036 REPLACE_FSEEKO
1037 REPLACE_FSEEK
1038 REPLACE_FREOPEN
1039 REPLACE_FPURGE
1040 REPLACE_FPRINTF
1041 REPLACE_FOPEN
1042 REPLACE_FFLUSH
1043 REPLACE_FDOPEN
1044 REPLACE_FCLOSE
1045 REPLACE_DPRINTF
1046 HAVE_VDPRINTF
1047 HAVE_VASPRINTF
1048 HAVE_RENAMEAT
1049 HAVE_POPEN
1050 HAVE_PCLOSE
1051 HAVE_FTELLO
1052 HAVE_FSEEKO
1053 HAVE_DPRINTF
1054 HAVE_DECL_VSNPRINTF
1055 HAVE_DECL_SNPRINTF
1056 HAVE_DECL_OBSTACK_PRINTF
1057 HAVE_DECL_GETLINE
1058 HAVE_DECL_GETDELIM
1059 HAVE_DECL_FTELLO
1060 HAVE_DECL_FSEEKO
1061 HAVE_DECL_FPURGE
1062 HAVE_DECL_FCLOSEALL
1063 GNULIB_MDA_TEMPNAM
1064 GNULIB_MDA_PUTW
1065 GNULIB_MDA_GETW
1066 GNULIB_MDA_FILENO
1067 GNULIB_MDA_FDOPEN
1068 GNULIB_MDA_FCLOSEALL
1069 GNULIB_VSPRINTF_POSIX
1070 GNULIB_VSNPRINTF
1071 GNULIB_VPRINTF_POSIX
1072 GNULIB_VPRINTF
1073 GNULIB_VFPRINTF_POSIX
1074 GNULIB_VFPRINTF
1075 GNULIB_VDPRINTF
1076 GNULIB_VSCANF
1077 GNULIB_VFSCANF
1078 GNULIB_VASPRINTF
1079 GNULIB_TMPFILE
1080 GNULIB_STDIO_H_SIGPIPE
1081 GNULIB_STDIO_H_NONBLOCKING
1082 GNULIB_SPRINTF_POSIX
1083 GNULIB_SNPRINTF
1084 GNULIB_SCANF
1085 GNULIB_RENAMEAT
1086 GNULIB_RENAME
1087 GNULIB_REMOVE
1088 GNULIB_PUTS
1089 GNULIB_PUTCHAR
1090 GNULIB_PUTC
1091 GNULIB_PRINTF_POSIX
1092 GNULIB_PRINTF
1093 GNULIB_POPEN
1094 GNULIB_PERROR
1095 GNULIB_PCLOSE
1096 GNULIB_OBSTACK_PRINTF_POSIX
1097 GNULIB_OBSTACK_PRINTF
1098 GNULIB_GETLINE
1099 GNULIB_GETDELIM
1100 GNULIB_GETCHAR
1101 GNULIB_GETC
1102 GNULIB_FWRITE
1103 GNULIB_FTELLO
1104 GNULIB_FTELL
1105 GNULIB_FSEEKO
1106 GNULIB_FSEEK
1107 GNULIB_FSCANF
1108 GNULIB_FREOPEN
1109 GNULIB_FREAD
1110 GNULIB_FPUTS
1111 GNULIB_FPUTC
1112 GNULIB_FPURGE
1113 GNULIB_FPRINTF_POSIX
1114 GNULIB_FPRINTF
1115 GNULIB_FOPEN
1116 GNULIB_FGETS
1117 GNULIB_FGETC
1118 GNULIB_FFLUSH
1119 GNULIB_FDOPEN
1120 GNULIB_FCLOSE
1121 GNULIB_DPRINTF
1122 WINDOWS_64_BIT_ST_SIZE
1123 WINDOWS_STAT_TIMESPEC
1124 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1125 NEXT_SYS_STAT_H
1126 REPLACE_UTIMENSAT
1127 REPLACE_STAT
1128 REPLACE_MKNODAT
1129 REPLACE_MKNOD
1130 REPLACE_MKFIFOAT
1131 REPLACE_MKFIFO
1132 REPLACE_MKDIR
1133 REPLACE_LSTAT
1134 REPLACE_FUTIMENS
1135 REPLACE_FSTATAT
1136 REPLACE_FSTAT
1137 REPLACE_FCHMODAT
1138 HAVE_UTIMENSAT
1139 HAVE_MKNODAT
1140 HAVE_MKNOD
1141 HAVE_MKFIFOAT
1142 HAVE_MKFIFO
1143 HAVE_MKDIRAT
1144 HAVE_LSTAT
1145 HAVE_LCHMOD
1146 HAVE_GETUMASK
1147 HAVE_FUTIMENS
1148 HAVE_FSTATAT
1149 HAVE_FCHMODAT
1150 GNULIB_MDA_UMASK
1151 GNULIB_MDA_MKDIR
1152 GNULIB_MDA_CHMOD
1153 GNULIB_OVERRIDES_STRUCT_STAT
1154 GNULIB_UTIMENSAT
1155 GNULIB_STAT
1156 GNULIB_MKNODAT
1157 GNULIB_MKNOD
1158 GNULIB_MKFIFOAT
1159 GNULIB_MKFIFO
1160 GNULIB_MKDIRAT
1161 GNULIB_MKDIR
1162 GNULIB_LSTAT
1163 GNULIB_LCHMOD
1164 GNULIB_GETUMASK
1165 GNULIB_FUTIMENS
1166 GNULIB_FSTATAT
1167 GNULIB_FSTAT
1168 GNULIB_FCHMODAT
1169 FREXPL_LIBM
1170 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1171 FREXP_LIBM
1172 REPLACE_TRUNCL
1173 REPLACE_TRUNCF
1174 REPLACE_TRUNC
1175 REPLACE_TANHF
1176 REPLACE_TANF
1177 REPLACE_SQRTL
1178 REPLACE_SQRTF
1179 REPLACE_SINHF
1180 REPLACE_SINF
1181 REPLACE_SIGNBIT_USING_BUILTINS
1182 REPLACE_SIGNBIT
1183 REPLACE_ROUNDL
1184 REPLACE_ROUNDF
1185 REPLACE_ROUND
1186 REPLACE_RINTL
1187 REPLACE_REMAINDERL
1188 REPLACE_REMAINDERF
1189 REPLACE_REMAINDER
1190 REPLACE_NAN
1191 REPLACE_MODFL
1192 REPLACE_MODFF
1193 REPLACE_MODF
1194 REPLACE_LOGBL
1195 REPLACE_LOGBF
1196 REPLACE_LOGB
1197 REPLACE_LOG2L
1198 REPLACE_LOG2F
1199 REPLACE_LOG2
1200 REPLACE_LOG1PL
1201 REPLACE_LOG1PF
1202 REPLACE_LOG1P
1203 REPLACE_LOG10L
1204 REPLACE_LOG10F
1205 REPLACE_LOG10
1206 REPLACE_LOGL
1207 REPLACE_LOGF
1208 REPLACE_LOG
1209 REPLACE_LDEXPL
1210 REPLACE_ISNAN
1211 REPLACE_ISINF
1212 REPLACE_ISFINITE
1213 REPLACE_ILOGBL
1214 REPLACE_ILOGBF
1215 REPLACE_ILOGB
1216 REPLACE_HYPOTL
1217 REPLACE_HYPOTF
1218 REPLACE_HYPOT
1219 REPLACE_HUGE_VAL
1220 REPLACE_FREXPL
1221 REPLACE_FREXP
1222 REPLACE_FREXPF
1223 REPLACE_FMODL
1224 REPLACE_FMODF
1225 REPLACE_FMOD
1226 REPLACE_FMAL
1227 REPLACE_FMAF
1228 REPLACE_FMA
1229 REPLACE_FLOORL
1230 REPLACE_FLOORF
1231 REPLACE_FLOOR
1232 REPLACE_FABSL
1233 REPLACE_EXP2L
1234 REPLACE_EXP2
1235 REPLACE_EXPM1L
1236 REPLACE_EXPM1F
1237 REPLACE_EXPM1
1238 REPLACE_EXPL
1239 REPLACE_EXPF
1240 REPLACE_COSHF
1241 REPLACE_COSF
1242 REPLACE_CEILL
1243 REPLACE_CEILF
1244 REPLACE_CEIL
1245 REPLACE_CBRTL
1246 REPLACE_CBRTF
1247 REPLACE_ATAN2F
1248 REPLACE_ATANF
1249 REPLACE_ASINF
1250 REPLACE_ACOSF
1251 HAVE_DECL_TRUNCL
1252 HAVE_DECL_TRUNCF
1253 HAVE_DECL_TRUNC
1254 HAVE_DECL_TANL
1255 HAVE_DECL_SQRTL
1256 HAVE_DECL_SINL
1257 HAVE_DECL_ROUNDL
1258 HAVE_DECL_ROUNDF
1259 HAVE_DECL_ROUND
1260 HAVE_DECL_RINTF
1261 HAVE_DECL_REMAINDERL
1262 HAVE_DECL_REMAINDER
1263 HAVE_DECL_LOGB
1264 HAVE_DECL_LOG2L
1265 HAVE_DECL_LOG2F
1266 HAVE_DECL_LOG2
1267 HAVE_DECL_LOG10L
1268 HAVE_DECL_LOGL
1269 HAVE_DECL_LDEXPL
1270 HAVE_DECL_FREXPL
1271 HAVE_DECL_FLOORL
1272 HAVE_DECL_FLOORF
1273 HAVE_DECL_EXPM1L
1274 HAVE_DECL_EXP2L
1275 HAVE_DECL_EXP2F
1276 HAVE_DECL_EXP2
1277 HAVE_DECL_EXPL
1278 HAVE_DECL_COSL
1279 HAVE_DECL_COPYSIGNF
1280 HAVE_DECL_CEILL
1281 HAVE_DECL_CEILF
1282 HAVE_DECL_CBRTL
1283 HAVE_DECL_CBRTF
1284 HAVE_DECL_ATANL
1285 HAVE_DECL_ASINL
1286 HAVE_DECL_ACOSL
1287 HAVE_TANHF
1288 HAVE_TANL
1289 HAVE_TANF
1290 HAVE_SQRTL
1291 HAVE_SQRTF
1292 HAVE_SINHF
1293 HAVE_SINL
1294 HAVE_SINF
1295 HAVE_RINTL
1296 HAVE_RINT
1297 HAVE_REMAINDERF
1298 HAVE_REMAINDER
1299 HAVE_POWF
1300 HAVE_MODFL
1301 HAVE_MODFF
1302 HAVE_LOGBL
1303 HAVE_LOGBF
1304 HAVE_LOG1PL
1305 HAVE_LOG1PF
1306 HAVE_LOG1P
1307 HAVE_LOG10L
1308 HAVE_LOG10F
1309 HAVE_LOGL
1310 HAVE_LOGF
1311 HAVE_LDEXPF
1312 HAVE_ISNANL
1313 HAVE_ISNAND
1314 HAVE_ISNANF
1315 HAVE_ILOGBL
1316 HAVE_ILOGBF
1317 HAVE_ILOGB
1318 HAVE_HYPOTL
1319 HAVE_HYPOTF
1320 HAVE_FREXPF
1321 HAVE_FMODL
1322 HAVE_FMODF
1323 HAVE_FMAL
1324 HAVE_FMAF
1325 HAVE_FMA
1326 HAVE_FABSL
1327 HAVE_FABSF
1328 HAVE_EXPM1F
1329 HAVE_EXPM1
1330 HAVE_EXPL
1331 HAVE_EXPF
1332 HAVE_COSHF
1333 HAVE_COSL
1334 HAVE_COSF
1335 HAVE_COPYSIGNL
1336 HAVE_COPYSIGN
1337 HAVE_CBRTL
1338 HAVE_CBRTF
1339 HAVE_CBRT
1340 HAVE_ATAN2F
1341 HAVE_ATANL
1342 HAVE_ATANF
1343 HAVE_ASINL
1344 HAVE_ASINF
1345 HAVE_ACOSL
1346 HAVE_ACOSF
1347 GNULIB_MDA_YN
1348 GNULIB_MDA_Y1
1349 GNULIB_MDA_Y0
1350 GNULIB_MDA_JN
1351 GNULIB_MDA_J1
1352 GNULIB_MDA_J0
1353 GNULIB_TRUNCL
1354 GNULIB_TRUNCF
1355 GNULIB_TRUNC
1356 GNULIB_TANHF
1357 GNULIB_TANL
1358 GNULIB_TANF
1359 GNULIB_SQRTL
1360 GNULIB_SQRTF
1361 GNULIB_SINHF
1362 GNULIB_SINL
1363 GNULIB_SINF
1364 GNULIB_SIGNBIT
1365 GNULIB_ROUNDL
1366 GNULIB_ROUNDF
1367 GNULIB_ROUND
1368 GNULIB_RINTL
1369 GNULIB_RINTF
1370 GNULIB_RINT
1371 GNULIB_REMAINDERL
1372 GNULIB_REMAINDERF
1373 GNULIB_REMAINDER
1374 GNULIB_POWF
1375 GNULIB_MODFL
1376 GNULIB_MODFF
1377 GNULIB_MODF
1378 GNULIB_LOGBL
1379 GNULIB_LOGBF
1380 GNULIB_LOGB
1381 GNULIB_LOG2L
1382 GNULIB_LOG2F
1383 GNULIB_LOG2
1384 GNULIB_LOG1PL
1385 GNULIB_LOG1PF
1386 GNULIB_LOG1P
1387 GNULIB_LOG10L
1388 GNULIB_LOG10F
1389 GNULIB_LOG10
1390 GNULIB_LOGL
1391 GNULIB_LOGF
1392 GNULIB_LOG
1393 GNULIB_LDEXPL
1394 GNULIB_LDEXPF
1395 GNULIB_ISNANL
1396 GNULIB_ISNAND
1397 GNULIB_ISNANF
1398 GNULIB_ISNAN
1399 GNULIB_ISINF
1400 GNULIB_ISFINITE
1401 GNULIB_ILOGBL
1402 GNULIB_ILOGBF
1403 GNULIB_ILOGB
1404 GNULIB_HYPOTL
1405 GNULIB_HYPOTF
1406 GNULIB_HYPOT
1407 GNULIB_FREXPL
1408 GNULIB_FREXP
1409 GNULIB_FREXPF
1410 GNULIB_FMODL
1411 GNULIB_FMODF
1412 GNULIB_FMOD
1413 GNULIB_FMAL
1414 GNULIB_FMAF
1415 GNULIB_FMA
1416 GNULIB_FLOORL
1417 GNULIB_FLOORF
1418 GNULIB_FLOOR
1419 GNULIB_FABSL
1420 GNULIB_FABSF
1421 GNULIB_EXPM1L
1422 GNULIB_EXPM1F
1423 GNULIB_EXPM1
1424 GNULIB_EXP2L
1425 GNULIB_EXP2F
1426 GNULIB_EXP2
1427 GNULIB_EXPL
1428 GNULIB_EXPF
1429 GNULIB_COSHF
1430 GNULIB_COSL
1431 GNULIB_COSF
1432 GNULIB_COPYSIGNL
1433 GNULIB_COPYSIGNF
1434 GNULIB_COPYSIGN
1435 GNULIB_CEILL
1436 GNULIB_CEILF
1437 GNULIB_CEIL
1438 GNULIB_CBRTL
1439 GNULIB_CBRTF
1440 GNULIB_CBRT
1441 GNULIB_ATAN2F
1442 GNULIB_ATANL
1443 GNULIB_ATANF
1444 GNULIB_ASINL
1445 GNULIB_ASINF
1446 GNULIB_ACOSL
1447 GNULIB_ACOSF
1448 GL_GENERATE_FNMATCH_H_FALSE
1449 GL_GENERATE_FNMATCH_H_TRUE
1450 FNMATCH_H
1451 HAVE_FNMATCH_H
1452 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1453 NEXT_FNMATCH_H
1454 REPLACE_FNMATCH
1455 HAVE_FNMATCH
1456 GNULIB_FNMATCH
1457 REPLACE_ITOLD
1458 GL_GENERATE_FLOAT_H_FALSE
1459 GL_GENERATE_FLOAT_H_TRUE
1460 FLOAT_H
1461 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1462 NEXT_FLOAT_H
1463 HAVE_DECL_STRNCASECMP
1464 HAVE_STRCASECMP
1465 HAVE_FFS
1466 GNULIB_FFS
1467 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1468 NEXT_FCNTL_H
1469 REPLACE_OPENAT
1470 REPLACE_OPEN
1471 REPLACE_FCNTL
1472 REPLACE_CREAT
1473 HAVE_OPENAT
1474 HAVE_FCNTL
1475 GNULIB_MDA_OPEN
1476 GNULIB_MDA_CREAT
1477 GNULIB_OPENAT
1478 GNULIB_OPEN
1479 GNULIB_NONBLOCKING
1480 GNULIB_FCNTL
1481 GNULIB_CREAT
1482 EOVERFLOW_VALUE
1483 EOVERFLOW_HIDDEN
1484 ENOLINK_VALUE
1485 ENOLINK_HIDDEN
1486 EMULTIHOP_VALUE
1487 EMULTIHOP_HIDDEN
1488 GL_GENERATE_ERRNO_H_FALSE
1489 GL_GENERATE_ERRNO_H_TRUE
1490 ERRNO_H
1491 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1492 NEXT_ERRNO_H
1493 HAVE_DIRENT_H
1494 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1495 NEXT_DIRENT_H
1496 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1497 NEXT_CTYPE_H
1498 HAVE_ISBLANK
1499 GNULIB_ISBLANK
1500 REPLACE_FDOPENDIR
1501 REPLACE_DIRFD
1502 REPLACE_CLOSEDIR
1503 REPLACE_OPENDIR
1504 HAVE_ALPHASORT
1505 HAVE_SCANDIR
1506 HAVE_FDOPENDIR
1507 HAVE_DECL_FDOPENDIR
1508 HAVE_DECL_DIRFD
1509 HAVE_CLOSEDIR
1510 HAVE_REWINDDIR
1511 HAVE_READDIR
1512 HAVE_OPENDIR
1513 GNULIB_ALPHASORT
1514 GNULIB_SCANDIR
1515 GNULIB_FDOPENDIR
1516 GNULIB_DIRFD
1517 GNULIB_CLOSEDIR
1518 GNULIB_REWINDDIR
1519 GNULIB_READDIR
1520 GNULIB_OPENDIR
1521 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1522 LIB_CLOCK_GETTIME
1523 REPLACE_WCTOMB
1524 REPLACE_UNSETENV
1525 REPLACE_STRTOLD
1526 REPLACE_STRTOD
1527 REPLACE_SETSTATE
1528 REPLACE_SETENV
1529 REPLACE_REALPATH
1530 REPLACE_REALLOC
1531 REPLACE_RANDOM_R
1532 REPLACE_RANDOM
1533 REPLACE_QSORT_R
1534 REPLACE_PUTENV
1535 REPLACE_PTSNAME_R
1536 REPLACE_PTSNAME
1537 REPLACE_POSIX_MEMALIGN
1538 REPLACE_MKSTEMP
1539 REPLACE_MBTOWC
1540 REPLACE_MALLOC
1541 REPLACE_INITSTATE
1542 REPLACE_FREE
1543 REPLACE_CANONICALIZE_FILE_NAME
1544 REPLACE_CALLOC
1545 REPLACE_ALIGNED_ALLOC
1546 HAVE_DECL_UNSETENV
1547 HAVE_UNLOCKPT
1548 HAVE_SYS_LOADAVG_H
1549 HAVE_STRUCT_RANDOM_DATA
1550 HAVE_STRTOULL
1551 HAVE_STRTOLL
1552 HAVE_STRTOLD
1553 HAVE_STRTOD
1554 HAVE_DECL_SETSTATE
1555 HAVE_SETSTATE
1556 HAVE_DECL_SETENV
1557 HAVE_SETENV
1558 HAVE_SECURE_GETENV
1559 HAVE_RPMATCH
1560 HAVE_REALPATH
1561 HAVE_REALLOCARRAY
1562 HAVE_RANDOM_R
1563 HAVE_RANDOM_H
1564 HAVE_RANDOM
1565 HAVE_QSORT_R
1566 HAVE_PTSNAME_R
1567 HAVE_PTSNAME
1568 HAVE_POSIX_OPENPT
1569 HAVE_POSIX_MEMALIGN
1570 HAVE_MKSTEMPS
1571 HAVE_MKSTEMP
1572 HAVE_MKOSTEMPS
1573 HAVE_MKOSTEMP
1574 HAVE_MKDTEMP
1575 HAVE_MBTOWC
1576 HAVE_DECL_INITSTATE
1577 HAVE_INITSTATE
1578 HAVE_GRANTPT
1579 HAVE_GETSUBOPT
1580 HAVE_DECL_GETLOADAVG
1581 HAVE_DECL_GCVT
1582 HAVE_DECL_FCVT
1583 HAVE_DECL_ECVT
1584 HAVE_CANONICALIZE_FILE_NAME
1585 HAVE_ATOLL
1586 HAVE_ALIGNED_ALLOC
1587 HAVE__EXIT
1588 GNULIB_MDA_PUTENV
1589 GNULIB_MDA_MKTEMP
1590 GNULIB_MDA_GCVT
1591 GNULIB_MDA_FCVT
1592 GNULIB_MDA_ECVT
1593 GNULIB_WCTOMB
1594 GNULIB_UNSETENV
1595 GNULIB_UNLOCKPT
1596 GNULIB_SYSTEM_POSIX
1597 GNULIB_STRTOULL
1598 GNULIB_STRTOLL
1599 GNULIB_STRTOLD
1600 GNULIB_STRTOD
1601 GNULIB_SETENV
1602 GNULIB_SECURE_GETENV
1603 GNULIB_RPMATCH
1604 GNULIB_REALPATH
1605 GNULIB_REALLOC_POSIX
1606 GNULIB_REALLOCARRAY
1607 GNULIB_RANDOM_R
1608 GNULIB_RANDOM
1609 GNULIB_QSORT_R
1610 GNULIB_PUTENV
1611 GNULIB_PTSNAME_R
1612 GNULIB_PTSNAME
1613 GNULIB_POSIX_OPENPT
1614 GNULIB_POSIX_MEMALIGN
1615 GNULIB_MKSTEMPS
1616 GNULIB_MKSTEMP
1617 GNULIB_MKOSTEMPS
1618 GNULIB_MKOSTEMP
1619 GNULIB_MKDTEMP
1620 GNULIB_MBTOWC
1621 GNULIB_MALLOC_POSIX
1622 GNULIB_GRANTPT
1623 GNULIB_GETSUBOPT
1624 GNULIB_GETLOADAVG
1625 GNULIB_FREE_POSIX
1626 GNULIB_CANONICALIZE_FILE_NAME
1627 GNULIB_CALLOC_POSIX
1628 GNULIB_ATOLL
1629 GNULIB_ALIGNED_ALLOC
1630 GNULIB__EXIT
1631 LOCALE_FR
1632 REPLACE_WCSTOK
1633 REPLACE_WCSFTIME
1634 REPLACE_WCSWIDTH
1635 REPLACE_WCWIDTH
1636 REPLACE_WCSNRTOMBS
1637 REPLACE_WCSRTOMBS
1638 REPLACE_WCRTOMB
1639 REPLACE_MBSNRTOWCS
1640 REPLACE_MBSRTOWCS
1641 REPLACE_MBRLEN
1642 REPLACE_MBRTOWC
1643 REPLACE_MBSINIT
1644 REPLACE_WCTOB
1645 REPLACE_BTOWC
1646 REPLACE_MBSTATE_T
1647 HAVE_DECL_WCWIDTH
1648 HAVE_DECL_WCSDUP
1649 HAVE_DECL_WCTOB
1650 HAVE_WCSFTIME
1651 HAVE_WCSWIDTH
1652 HAVE_WCSTOK
1653 HAVE_WCSSTR
1654 HAVE_WCSPBRK
1655 HAVE_WCSSPN
1656 HAVE_WCSCSPN
1657 HAVE_WCSRCHR
1658 HAVE_WCSCHR
1659 HAVE_WCSDUP
1660 HAVE_WCSXFRM
1661 HAVE_WCSCOLL
1662 HAVE_WCSNCASECMP
1663 HAVE_WCSCASECMP
1664 HAVE_WCSNCMP
1665 HAVE_WCSCMP
1666 HAVE_WCSNCAT
1667 HAVE_WCSCAT
1668 HAVE_WCPNCPY
1669 HAVE_WCSNCPY
1670 HAVE_WCPCPY
1671 HAVE_WCSCPY
1672 HAVE_WCSNLEN
1673 HAVE_WCSLEN
1674 HAVE_WMEMSET
1675 HAVE_WMEMPCPY
1676 HAVE_WMEMMOVE
1677 HAVE_WMEMCPY
1678 HAVE_WMEMCMP
1679 HAVE_WMEMCHR
1680 HAVE_WCSNRTOMBS
1681 HAVE_WCSRTOMBS
1682 HAVE_WCRTOMB
1683 HAVE_MBSNRTOWCS
1684 HAVE_MBSRTOWCS
1685 HAVE_MBRLEN
1686 HAVE_MBRTOWC
1687 HAVE_MBSINIT
1688 HAVE_BTOWC
1689 GNULIB_MDA_WCSDUP
1690 GNULIB_WCSFTIME
1691 GNULIB_WCSWIDTH
1692 GNULIB_WCSTOK
1693 GNULIB_WCSSTR
1694 GNULIB_WCSPBRK
1695 GNULIB_WCSSPN
1696 GNULIB_WCSCSPN
1697 GNULIB_WCSRCHR
1698 GNULIB_WCSCHR
1699 GNULIB_WCSDUP
1700 GNULIB_WCSXFRM
1701 GNULIB_WCSCOLL
1702 GNULIB_WCSNCASECMP
1703 GNULIB_WCSCASECMP
1704 GNULIB_WCSNCMP
1705 GNULIB_WCSCMP
1706 GNULIB_WCSNCAT
1707 GNULIB_WCSCAT
1708 GNULIB_WCPNCPY
1709 GNULIB_WCSNCPY
1710 GNULIB_WCPCPY
1711 GNULIB_WCSCPY
1712 GNULIB_WCSNLEN
1713 GNULIB_WCSLEN
1714 GNULIB_WMEMSET
1715 GNULIB_WMEMPCPY
1716 GNULIB_WMEMMOVE
1717 GNULIB_WMEMCPY
1718 GNULIB_WMEMCMP
1719 GNULIB_WMEMCHR
1720 GNULIB_WCWIDTH
1721 GNULIB_WCSNRTOMBS
1722 GNULIB_WCSRTOMBS
1723 GNULIB_WCRTOMB
1724 GNULIB_MBSNRTOWCS
1725 GNULIB_MBSRTOWCS
1726 GNULIB_MBRLEN
1727 GNULIB_MBRTOWC
1728 GNULIB_MBSINIT
1729 GNULIB_WCTOB
1730 GNULIB_BTOWC
1731 MKDIR_P
1732 HAVE_FEATURES_H
1733 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
1734 NEXT_ARPA_INET_H
1735 HAVE_ARPA_INET_H
1736 REPLACE_INET_PTON
1737 REPLACE_INET_NTOP
1738 HAVE_DECL_INET_PTON
1739 HAVE_DECL_INET_NTOP
1740 GNULIB_INET_PTON
1741 GNULIB_INET_NTOP
1742 HAVE_ALLOCA_H
1743 GL_GENERATE_ALLOCA_H_FALSE
1744 GL_GENERATE_ALLOCA_H_TRUE
1745 ALLOCA_H
1746 ALLOCA
1747 HAVE_WINSOCK2_H
1748 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1749 UNISTD_H_HAVE_WINSOCK2_H
1750 UNISTD_H_HAVE_SYS_RANDOM_H
1751 REPLACE_WRITE
1752 REPLACE_USLEEP
1753 REPLACE_UNLINKAT
1754 REPLACE_UNLINK
1755 REPLACE_TTYNAME_R
1756 REPLACE_TRUNCATE
1757 REPLACE_SYMLINKAT
1758 REPLACE_SYMLINK
1759 REPLACE_SLEEP
1760 REPLACE_RMDIR
1761 REPLACE_READLINKAT
1762 REPLACE_READLINK
1763 REPLACE_READ
1764 REPLACE_PWRITE
1765 REPLACE_PREAD
1766 REPLACE_LSEEK
1767 REPLACE_LINKAT
1768 REPLACE_LINK
1769 REPLACE_LCHOWN
1770 REPLACE_ISATTY
1771 REPLACE_GETPASS
1772 REPLACE_GETPAGESIZE
1773 REPLACE_GETGROUPS
1774 REPLACE_GETLOGIN_R
1775 REPLACE_GETDTABLESIZE
1776 REPLACE_GETDOMAINNAME
1777 REPLACE_GETCWD
1778 REPLACE_FTRUNCATE
1779 REPLACE_FCHOWNAT
1780 REPLACE_FACCESSAT
1781 REPLACE_EXECVPE
1782 REPLACE_EXECVP
1783 REPLACE_EXECVE
1784 REPLACE_EXECV
1785 REPLACE_EXECLP
1786 REPLACE_EXECLE
1787 REPLACE_EXECL
1788 REPLACE_DUP2
1789 REPLACE_DUP
1790 REPLACE_CLOSE
1791 REPLACE_CHOWN
1792 REPLACE_ACCESS
1793 HAVE_SYS_PARAM_H
1794 HAVE_OS_H
1795 HAVE_DECL_TTYNAME_R
1796 HAVE_DECL_TRUNCATE
1797 HAVE_DECL_SETHOSTNAME
1798 HAVE_DECL_GETUSERSHELL
1799 HAVE_DECL_GETPAGESIZE
1800 HAVE_DECL_GETLOGIN_R
1801 HAVE_DECL_GETLOGIN
1802 HAVE_DECL_GETDOMAINNAME
1803 HAVE_DECL_FDATASYNC
1804 HAVE_DECL_FCHDIR
1805 HAVE_DECL_EXECVPE
1806 HAVE_DECL_ENVIRON
1807 HAVE_USLEEP
1808 HAVE_UNLINKAT
1809 HAVE_SYMLINKAT
1810 HAVE_SYMLINK
1811 HAVE_SLEEP
1812 HAVE_SETHOSTNAME
1813 HAVE_READLINKAT
1814 HAVE_READLINK
1815 HAVE_PWRITE
1816 HAVE_PREAD
1817 HAVE_PIPE2
1818 HAVE_PIPE
1819 HAVE_LINKAT
1820 HAVE_LINK
1821 HAVE_LCHOWN
1822 HAVE_GROUP_MEMBER
1823 HAVE_GETPASS
1824 HAVE_GETPAGESIZE
1825 HAVE_GETLOGIN
1826 HAVE_GETHOSTNAME
1827 HAVE_GETGROUPS
1828 HAVE_GETENTROPY
1829 HAVE_GETDTABLESIZE
1830 HAVE_FTRUNCATE
1831 HAVE_FSYNC
1832 HAVE_FDATASYNC
1833 HAVE_FCHOWNAT
1834 HAVE_FCHDIR
1835 HAVE_FACCESSAT
1836 HAVE_EXECVPE
1837 HAVE_EUIDACCESS
1838 HAVE_DUP3
1839 HAVE_COPY_FILE_RANGE
1840 HAVE_CHOWN
1841 GNULIB_MDA_WRITE
1842 GNULIB_MDA_UNLINK
1843 GNULIB_MDA_SWAB
1844 GNULIB_MDA_RMDIR
1845 GNULIB_MDA_READ
1846 GNULIB_MDA_LSEEK
1847 GNULIB_MDA_ISATTY
1848 GNULIB_MDA_GETPID
1849 GNULIB_MDA_GETCWD
1850 GNULIB_MDA_EXECVPE
1851 GNULIB_MDA_EXECVP
1852 GNULIB_MDA_EXECVE
1853 GNULIB_MDA_EXECV
1854 GNULIB_MDA_EXECLP
1855 GNULIB_MDA_EXECLE
1856 GNULIB_MDA_EXECL
1857 GNULIB_MDA_DUP2
1858 GNULIB_MDA_DUP
1859 GNULIB_MDA_CLOSE
1860 GNULIB_MDA_CHDIR
1861 GNULIB_MDA_ACCESS
1862 GNULIB_WRITE
1863 GNULIB_USLEEP
1864 GNULIB_UNLINKAT
1865 GNULIB_UNLINK
1866 GNULIB_UNISTD_H_SIGPIPE
1867 GNULIB_UNISTD_H_NONBLOCKING
1868 GNULIB_TTYNAME_R
1869 GNULIB_TRUNCATE
1870 GNULIB_SYMLINKAT
1871 GNULIB_SYMLINK
1872 GNULIB_SLEEP
1873 GNULIB_SETHOSTNAME
1874 GNULIB_RMDIR
1875 GNULIB_READLINKAT
1876 GNULIB_READLINK
1877 GNULIB_READ
1878 GNULIB_PWRITE
1879 GNULIB_PREAD
1880 GNULIB_PIPE2
1881 GNULIB_PIPE
1882 GNULIB_LSEEK
1883 GNULIB_LINKAT
1884 GNULIB_LINK
1885 GNULIB_LCHOWN
1886 GNULIB_ISATTY
1887 GNULIB_GROUP_MEMBER
1888 GNULIB_GETUSERSHELL
1889 GNULIB_GETPASS
1890 GNULIB_GETPAGESIZE
1891 GNULIB_GETOPT_POSIX
1892 GNULIB_GETLOGIN_R
1893 GNULIB_GETLOGIN
1894 GNULIB_GETHOSTNAME
1895 GNULIB_GETGROUPS
1896 GNULIB_GETENTROPY
1897 GNULIB_GETDTABLESIZE
1898 GNULIB_GETDOMAINNAME
1899 GNULIB_GETCWD
1900 GNULIB_FTRUNCATE
1901 GNULIB_FSYNC
1902 GNULIB_FDATASYNC
1903 GNULIB_FCHOWNAT
1904 GNULIB_FCHDIR
1905 GNULIB_FACCESSAT
1906 GNULIB_EXECVPE
1907 GNULIB_EXECVP
1908 GNULIB_EXECVE
1909 GNULIB_EXECV
1910 GNULIB_EXECLP
1911 GNULIB_EXECLE
1912 GNULIB_EXECL
1913 GNULIB_EUIDACCESS
1914 GNULIB_ENVIRON
1915 GNULIB_DUP3
1916 GNULIB_DUP2
1917 GNULIB_DUP
1918 GNULIB_COPY_FILE_RANGE
1919 GNULIB_CLOSE
1920 GNULIB_CHOWN
1921 GNULIB_CHDIR
1922 GNULIB_ACCESS
1923 HAVE_WS2TCPIP_H
1924 HAVE_SYS_SOCKET_H
1925 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
1926 NEXT_SYS_SOCKET_H
1927 PRAGMA_COLUMNS
1928 PRAGMA_SYSTEM_HEADER
1929 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1930 INCLUDE_NEXT
1931 HAVE_ACCEPT4
1932 HAVE_SA_FAMILY_T
1933 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
1934 HAVE_STRUCT_SOCKADDR_STORAGE
1935 GNULIB_ACCEPT4
1936 GNULIB_SHUTDOWN
1937 GNULIB_SETSOCKOPT
1938 GNULIB_SENDTO
1939 GNULIB_RECVFROM
1940 GNULIB_SEND
1941 GNULIB_RECV
1942 GNULIB_LISTEN
1943 GNULIB_GETSOCKOPT
1944 GNULIB_GETSOCKNAME
1945 GNULIB_GETPEERNAME
1946 GNULIB_BIND
1947 GNULIB_ACCEPT
1948 GNULIB_CONNECT
1949 GNULIB_SOCKET
1950 GL_COND_LIBTOOL_FALSE
1951 GL_COND_LIBTOOL_TRUE
1952 RANLIB
1953 ARFLAGS
1954 AR
1955 LARGEFILE_CPPFLAGS
1956 target_os
1957 target_vendor
1958 target_cpu
1959 target
1960 host_os
1961 host_vendor
1962 host_cpu
1963 host
1964 build_os
1965 build_vendor
1966 build_cpu
1967 build
1968 EGREP
1969 GREP
1970 CPP
1971 OBJEXT
1972 EXEEXT
1973 ac_ct_CC
1974 CPPFLAGS
1975 LDFLAGS
1976 CFLAGS
1977 CC
1978 MAINT
1979 MAINTAINER_MODE_FALSE
1980 MAINTAINER_MODE_TRUE
1981 target_alias
1982 host_alias
1983 build_alias
1984 LIBS
1985 ECHO_T
1986 ECHO_N
1987 ECHO_C
1988 DEFS
1989 mandir
1990 localedir
1991 libdir
1992 psdir
1993 pdfdir
1994 dvidir
1995 htmldir
1996 infodir
1997 docdir
1998 oldincludedir
1999 includedir
2000 localstatedir
2001 sharedstatedir
2002 sysconfdir
2003 datadir
2004 datarootdir
2005 libexecdir
2006 sbindir
2007 bindir
2008 program_transform_name
2009 prefix
2010 exec_prefix
2011 PACKAGE_URL
2012 PACKAGE_BUGREPORT
2013 PACKAGE_STRING
2014 PACKAGE_VERSION
2015 PACKAGE_TARNAME
2016 PACKAGE_NAME
2017 PATH_SEPARATOR
2018 SHELL'
2019 ac_subst_files=''
2020 ac_user_opts='
2021 enable_option_checking
2022 enable_maintainer_mode
2023 enable_plugins
2024 enable_largefile
2025 enable_threads
2026 enable_cross_guesses
2027 enable_dependency_tracking
2028 enable_silent_rules
2029 '
2030 ac_precious_vars='build_alias
2031 host_alias
2032 target_alias
2033 CC
2034 CFLAGS
2035 LDFLAGS
2036 LIBS
2037 CPPFLAGS
2038 CPP'
2039
2040
2041 # Initialize some variables set by options.
2042 ac_init_help=
2043 ac_init_version=false
2044 ac_unrecognized_opts=
2045 ac_unrecognized_sep=
2046 # The variables have the same names as the options, with
2047 # dashes changed to underlines.
2048 cache_file=/dev/null
2049 exec_prefix=NONE
2050 no_create=
2051 no_recursion=
2052 prefix=NONE
2053 program_prefix=NONE
2054 program_suffix=NONE
2055 program_transform_name=s,x,x,
2056 silent=
2057 site=
2058 srcdir=
2059 verbose=
2060 x_includes=NONE
2061 x_libraries=NONE
2062
2063 # Installation directory options.
2064 # These are left unexpanded so users can "make install exec_prefix=/foo"
2065 # and all the variables that are supposed to be based on exec_prefix
2066 # by default will actually change.
2067 # Use braces instead of parens because sh, perl, etc. also accept them.
2068 # (The list follows the same order as the GNU Coding Standards.)
2069 bindir='${exec_prefix}/bin'
2070 sbindir='${exec_prefix}/sbin'
2071 libexecdir='${exec_prefix}/libexec'
2072 datarootdir='${prefix}/share'
2073 datadir='${datarootdir}'
2074 sysconfdir='${prefix}/etc'
2075 sharedstatedir='${prefix}/com'
2076 localstatedir='${prefix}/var'
2077 includedir='${prefix}/include'
2078 oldincludedir='/usr/include'
2079 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2080 infodir='${datarootdir}/info'
2081 htmldir='${docdir}'
2082 dvidir='${docdir}'
2083 pdfdir='${docdir}'
2084 psdir='${docdir}'
2085 libdir='${exec_prefix}/lib'
2086 localedir='${datarootdir}/locale'
2087 mandir='${datarootdir}/man'
2088
2089 ac_prev=
2090 ac_dashdash=
2091 for ac_option
2092 do
2093 # If the previous option needs an argument, assign it.
2094 if test -n "$ac_prev"; then
2095 eval $ac_prev=\$ac_option
2096 ac_prev=
2097 continue
2098 fi
2099
2100 case $ac_option in
2101 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2102 *=) ac_optarg= ;;
2103 *) ac_optarg=yes ;;
2104 esac
2105
2106 # Accept the important Cygnus configure options, so we can diagnose typos.
2107
2108 case $ac_dashdash$ac_option in
2109 --)
2110 ac_dashdash=yes ;;
2111
2112 -bindir | --bindir | --bindi | --bind | --bin | --bi)
2113 ac_prev=bindir ;;
2114 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2115 bindir=$ac_optarg ;;
2116
2117 -build | --build | --buil | --bui | --bu)
2118 ac_prev=build_alias ;;
2119 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2120 build_alias=$ac_optarg ;;
2121
2122 -cache-file | --cache-file | --cache-fil | --cache-fi \
2123 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2124 ac_prev=cache_file ;;
2125 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2126 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2127 cache_file=$ac_optarg ;;
2128
2129 --config-cache | -C)
2130 cache_file=config.cache ;;
2131
2132 -datadir | --datadir | --datadi | --datad)
2133 ac_prev=datadir ;;
2134 -datadir=* | --datadir=* | --datadi=* | --datad=*)
2135 datadir=$ac_optarg ;;
2136
2137 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2138 | --dataroo | --dataro | --datar)
2139 ac_prev=datarootdir ;;
2140 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2141 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2142 datarootdir=$ac_optarg ;;
2143
2144 -disable-* | --disable-*)
2145 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2146 # Reject names that are not valid shell variable names.
2147 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2148 as_fn_error $? "invalid feature name: $ac_useropt"
2149 ac_useropt_orig=$ac_useropt
2150 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2151 case $ac_user_opts in
2152 *"
2153 "enable_$ac_useropt"
2154 "*) ;;
2155 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2156 ac_unrecognized_sep=', ';;
2157 esac
2158 eval enable_$ac_useropt=no ;;
2159
2160 -docdir | --docdir | --docdi | --doc | --do)
2161 ac_prev=docdir ;;
2162 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2163 docdir=$ac_optarg ;;
2164
2165 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2166 ac_prev=dvidir ;;
2167 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2168 dvidir=$ac_optarg ;;
2169
2170 -enable-* | --enable-*)
2171 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2172 # Reject names that are not valid shell variable names.
2173 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2174 as_fn_error $? "invalid feature name: $ac_useropt"
2175 ac_useropt_orig=$ac_useropt
2176 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2177 case $ac_user_opts in
2178 *"
2179 "enable_$ac_useropt"
2180 "*) ;;
2181 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2182 ac_unrecognized_sep=', ';;
2183 esac
2184 eval enable_$ac_useropt=\$ac_optarg ;;
2185
2186 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2187 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2188 | --exec | --exe | --ex)
2189 ac_prev=exec_prefix ;;
2190 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2191 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2192 | --exec=* | --exe=* | --ex=*)
2193 exec_prefix=$ac_optarg ;;
2194
2195 -gas | --gas | --ga | --g)
2196 # Obsolete; use --with-gas.
2197 with_gas=yes ;;
2198
2199 -help | --help | --hel | --he | -h)
2200 ac_init_help=long ;;
2201 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2202 ac_init_help=recursive ;;
2203 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2204 ac_init_help=short ;;
2205
2206 -host | --host | --hos | --ho)
2207 ac_prev=host_alias ;;
2208 -host=* | --host=* | --hos=* | --ho=*)
2209 host_alias=$ac_optarg ;;
2210
2211 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2212 ac_prev=htmldir ;;
2213 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2214 | --ht=*)
2215 htmldir=$ac_optarg ;;
2216
2217 -includedir | --includedir | --includedi | --included | --include \
2218 | --includ | --inclu | --incl | --inc)
2219 ac_prev=includedir ;;
2220 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2221 | --includ=* | --inclu=* | --incl=* | --inc=*)
2222 includedir=$ac_optarg ;;
2223
2224 -infodir | --infodir | --infodi | --infod | --info | --inf)
2225 ac_prev=infodir ;;
2226 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2227 infodir=$ac_optarg ;;
2228
2229 -libdir | --libdir | --libdi | --libd)
2230 ac_prev=libdir ;;
2231 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2232 libdir=$ac_optarg ;;
2233
2234 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2235 | --libexe | --libex | --libe)
2236 ac_prev=libexecdir ;;
2237 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2238 | --libexe=* | --libex=* | --libe=*)
2239 libexecdir=$ac_optarg ;;
2240
2241 -localedir | --localedir | --localedi | --localed | --locale)
2242 ac_prev=localedir ;;
2243 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2244 localedir=$ac_optarg ;;
2245
2246 -localstatedir | --localstatedir | --localstatedi | --localstated \
2247 | --localstate | --localstat | --localsta | --localst | --locals)
2248 ac_prev=localstatedir ;;
2249 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2250 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2251 localstatedir=$ac_optarg ;;
2252
2253 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2254 ac_prev=mandir ;;
2255 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2256 mandir=$ac_optarg ;;
2257
2258 -nfp | --nfp | --nf)
2259 # Obsolete; use --without-fp.
2260 with_fp=no ;;
2261
2262 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2263 | --no-cr | --no-c | -n)
2264 no_create=yes ;;
2265
2266 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2267 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2268 no_recursion=yes ;;
2269
2270 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2271 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2272 | --oldin | --oldi | --old | --ol | --o)
2273 ac_prev=oldincludedir ;;
2274 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2275 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2276 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2277 oldincludedir=$ac_optarg ;;
2278
2279 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2280 ac_prev=prefix ;;
2281 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2282 prefix=$ac_optarg ;;
2283
2284 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2285 | --program-pre | --program-pr | --program-p)
2286 ac_prev=program_prefix ;;
2287 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2288 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2289 program_prefix=$ac_optarg ;;
2290
2291 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2292 | --program-suf | --program-su | --program-s)
2293 ac_prev=program_suffix ;;
2294 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2295 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2296 program_suffix=$ac_optarg ;;
2297
2298 -program-transform-name | --program-transform-name \
2299 | --program-transform-nam | --program-transform-na \
2300 | --program-transform-n | --program-transform- \
2301 | --program-transform | --program-transfor \
2302 | --program-transfo | --program-transf \
2303 | --program-trans | --program-tran \
2304 | --progr-tra | --program-tr | --program-t)
2305 ac_prev=program_transform_name ;;
2306 -program-transform-name=* | --program-transform-name=* \
2307 | --program-transform-nam=* | --program-transform-na=* \
2308 | --program-transform-n=* | --program-transform-=* \
2309 | --program-transform=* | --program-transfor=* \
2310 | --program-transfo=* | --program-transf=* \
2311 | --program-trans=* | --program-tran=* \
2312 | --progr-tra=* | --program-tr=* | --program-t=*)
2313 program_transform_name=$ac_optarg ;;
2314
2315 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2316 ac_prev=pdfdir ;;
2317 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2318 pdfdir=$ac_optarg ;;
2319
2320 -psdir | --psdir | --psdi | --psd | --ps)
2321 ac_prev=psdir ;;
2322 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2323 psdir=$ac_optarg ;;
2324
2325 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2326 | -silent | --silent | --silen | --sile | --sil)
2327 silent=yes ;;
2328
2329 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2330 ac_prev=sbindir ;;
2331 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2332 | --sbi=* | --sb=*)
2333 sbindir=$ac_optarg ;;
2334
2335 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2336 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2337 | --sharedst | --shareds | --shared | --share | --shar \
2338 | --sha | --sh)
2339 ac_prev=sharedstatedir ;;
2340 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2341 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2342 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2343 | --sha=* | --sh=*)
2344 sharedstatedir=$ac_optarg ;;
2345
2346 -site | --site | --sit)
2347 ac_prev=site ;;
2348 -site=* | --site=* | --sit=*)
2349 site=$ac_optarg ;;
2350
2351 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2352 ac_prev=srcdir ;;
2353 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2354 srcdir=$ac_optarg ;;
2355
2356 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2357 | --syscon | --sysco | --sysc | --sys | --sy)
2358 ac_prev=sysconfdir ;;
2359 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2360 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2361 sysconfdir=$ac_optarg ;;
2362
2363 -target | --target | --targe | --targ | --tar | --ta | --t)
2364 ac_prev=target_alias ;;
2365 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2366 target_alias=$ac_optarg ;;
2367
2368 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2369 verbose=yes ;;
2370
2371 -version | --version | --versio | --versi | --vers | -V)
2372 ac_init_version=: ;;
2373
2374 -with-* | --with-*)
2375 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2376 # Reject names that are not valid shell variable names.
2377 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2378 as_fn_error $? "invalid package name: $ac_useropt"
2379 ac_useropt_orig=$ac_useropt
2380 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2381 case $ac_user_opts in
2382 *"
2383 "with_$ac_useropt"
2384 "*) ;;
2385 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2386 ac_unrecognized_sep=', ';;
2387 esac
2388 eval with_$ac_useropt=\$ac_optarg ;;
2389
2390 -without-* | --without-*)
2391 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2392 # Reject names that are not valid shell variable names.
2393 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2394 as_fn_error $? "invalid package name: $ac_useropt"
2395 ac_useropt_orig=$ac_useropt
2396 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2397 case $ac_user_opts in
2398 *"
2399 "with_$ac_useropt"
2400 "*) ;;
2401 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2402 ac_unrecognized_sep=', ';;
2403 esac
2404 eval with_$ac_useropt=no ;;
2405
2406 --x)
2407 # Obsolete; use --with-x.
2408 with_x=yes ;;
2409
2410 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2411 | --x-incl | --x-inc | --x-in | --x-i)
2412 ac_prev=x_includes ;;
2413 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2414 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2415 x_includes=$ac_optarg ;;
2416
2417 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2418 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2419 ac_prev=x_libraries ;;
2420 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2421 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2422 x_libraries=$ac_optarg ;;
2423
2424 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2425 Try \`$0 --help' for more information"
2426 ;;
2427
2428 *=*)
2429 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2430 # Reject names that are not valid shell variable names.
2431 case $ac_envvar in #(
2432 '' | [0-9]* | *[!_$as_cr_alnum]* )
2433 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2434 esac
2435 eval $ac_envvar=\$ac_optarg
2436 export $ac_envvar ;;
2437
2438 *)
2439 # FIXME: should be removed in autoconf 3.0.
2440 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2441 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2442 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2443 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2444 ;;
2445
2446 esac
2447 done
2448
2449 if test -n "$ac_prev"; then
2450 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2451 as_fn_error $? "missing argument to $ac_option"
2452 fi
2453
2454 if test -n "$ac_unrecognized_opts"; then
2455 case $enable_option_checking in
2456 no) ;;
2457 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2458 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2459 esac
2460 fi
2461
2462 # Check all directory arguments for consistency.
2463 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2464 datadir sysconfdir sharedstatedir localstatedir includedir \
2465 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2466 libdir localedir mandir
2467 do
2468 eval ac_val=\$$ac_var
2469 # Remove trailing slashes.
2470 case $ac_val in
2471 */ )
2472 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2473 eval $ac_var=\$ac_val;;
2474 esac
2475 # Be sure to have absolute directory names.
2476 case $ac_val in
2477 [\\/$]* | ?:[\\/]* ) continue;;
2478 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2479 esac
2480 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2481 done
2482
2483 # There might be people who depend on the old broken behavior: `$host'
2484 # used to hold the argument of --host etc.
2485 # FIXME: To remove some day.
2486 build=$build_alias
2487 host=$host_alias
2488 target=$target_alias
2489
2490 # FIXME: To remove some day.
2491 if test "x$host_alias" != x; then
2492 if test "x$build_alias" = x; then
2493 cross_compiling=maybe
2494 elif test "x$build_alias" != "x$host_alias"; then
2495 cross_compiling=yes
2496 fi
2497 fi
2498
2499 ac_tool_prefix=
2500 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2501
2502 test "$silent" = yes && exec 6>/dev/null
2503
2504
2505 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2506 ac_ls_di=`ls -di .` &&
2507 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2508 as_fn_error $? "working directory cannot be determined"
2509 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2510 as_fn_error $? "pwd does not report name of working directory"
2511
2512
2513 # Find the source files, if location was not specified.
2514 if test -z "$srcdir"; then
2515 ac_srcdir_defaulted=yes
2516 # Try the directory containing this script, then the parent directory.
2517 ac_confdir=`$as_dirname -- "$as_myself" ||
2518 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2519 X"$as_myself" : 'X\(//\)[^/]' \| \
2520 X"$as_myself" : 'X\(//\)$' \| \
2521 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2522 $as_echo X"$as_myself" |
2523 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2524 s//\1/
2525 q
2526 }
2527 /^X\(\/\/\)[^/].*/{
2528 s//\1/
2529 q
2530 }
2531 /^X\(\/\/\)$/{
2532 s//\1/
2533 q
2534 }
2535 /^X\(\/\).*/{
2536 s//\1/
2537 q
2538 }
2539 s/.*/./; q'`
2540 srcdir=$ac_confdir
2541 if test ! -r "$srcdir/$ac_unique_file"; then
2542 srcdir=..
2543 fi
2544 else
2545 ac_srcdir_defaulted=no
2546 fi
2547 if test ! -r "$srcdir/$ac_unique_file"; then
2548 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2549 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2550 fi
2551 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2552 ac_abs_confdir=`(
2553 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2554 pwd)`
2555 # When building in place, set srcdir=.
2556 if test "$ac_abs_confdir" = "$ac_pwd"; then
2557 srcdir=.
2558 fi
2559 # Remove unnecessary trailing slashes from srcdir.
2560 # Double slashes in file names in object file debugging info
2561 # mess up M-x gdb in Emacs.
2562 case $srcdir in
2563 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2564 esac
2565 for ac_var in $ac_precious_vars; do
2566 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2567 eval ac_env_${ac_var}_value=\$${ac_var}
2568 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2569 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2570 done
2571
2572 #
2573 # Report the --help message.
2574 #
2575 if test "$ac_init_help" = "long"; then
2576 # Omit some internal or obsolete options to make the list less imposing.
2577 # This message is too long to be a string in the A/UX 3.1 sh.
2578 cat <<_ACEOF
2579 \`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
2580
2581 Usage: $0 [OPTION]... [VAR=VALUE]...
2582
2583 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2584 VAR=VALUE. See below for descriptions of some of the useful variables.
2585
2586 Defaults for the options are specified in brackets.
2587
2588 Configuration:
2589 -h, --help display this help and exit
2590 --help=short display options specific to this package
2591 --help=recursive display the short help of all the included packages
2592 -V, --version display version information and exit
2593 -q, --quiet, --silent do not print \`checking ...' messages
2594 --cache-file=FILE cache test results in FILE [disabled]
2595 -C, --config-cache alias for \`--cache-file=config.cache'
2596 -n, --no-create do not create output files
2597 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2598
2599 Installation directories:
2600 --prefix=PREFIX install architecture-independent files in PREFIX
2601 [$ac_default_prefix]
2602 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2603 [PREFIX]
2604
2605 By default, \`make install' will install all the files in
2606 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2607 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2608 for instance \`--prefix=\$HOME'.
2609
2610 For better control, use the options below.
2611
2612 Fine tuning of the installation directories:
2613 --bindir=DIR user executables [EPREFIX/bin]
2614 --sbindir=DIR system admin executables [EPREFIX/sbin]
2615 --libexecdir=DIR program executables [EPREFIX/libexec]
2616 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2617 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2618 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2619 --libdir=DIR object code libraries [EPREFIX/lib]
2620 --includedir=DIR C header files [PREFIX/include]
2621 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2622 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2623 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2624 --infodir=DIR info documentation [DATAROOTDIR/info]
2625 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2626 --mandir=DIR man documentation [DATAROOTDIR/man]
2627 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
2628 --htmldir=DIR html documentation [DOCDIR]
2629 --dvidir=DIR dvi documentation [DOCDIR]
2630 --pdfdir=DIR pdf documentation [DOCDIR]
2631 --psdir=DIR ps documentation [DOCDIR]
2632 _ACEOF
2633
2634 cat <<\_ACEOF
2635
2636 Program names:
2637 --program-prefix=PREFIX prepend PREFIX to installed program names
2638 --program-suffix=SUFFIX append SUFFIX to installed program names
2639 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2640
2641 System types:
2642 --build=BUILD configure for building on BUILD [guessed]
2643 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2644 --target=TARGET configure for building compilers for TARGET [HOST]
2645 _ACEOF
2646 fi
2647
2648 if test -n "$ac_init_help"; then
2649 case $ac_init_help in
2650 short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
2651 esac
2652 cat <<\_ACEOF
2653
2654 Optional Features:
2655 --disable-option-checking ignore unrecognized --enable/--with options
2656 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2657 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2658 --enable-maintainer-mode
2659 enable make rules and dependencies not useful (and
2660 sometimes confusing) to the casual installer
2661 --enable-plugins Enable support for plugins
2662 --disable-largefile omit support for large files
2663 --enable-threads={isoc|posix|isoc+posix|windows}
2664 specify multithreading API
2665 --disable-threads build without multithread safety
2666 --enable-cross-guesses={conservative|risky}
2667 specify policy for cross-compilation guesses
2668 --enable-dependency-tracking
2669 do not reject slow dependency extractors
2670 --disable-dependency-tracking
2671 speeds up one-time build
2672 --enable-silent-rules less verbose build output (undo: "make V=1")
2673 --disable-silent-rules verbose build output (undo: "make V=0")
2674
2675 Some influential environment variables:
2676 CC C compiler command
2677 CFLAGS C compiler flags
2678 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2679 nonstandard directory <lib dir>
2680 LIBS libraries to pass to the linker, e.g. -l<library>
2681 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2682 you have headers in a nonstandard directory <include dir>
2683 CPP C preprocessor
2684
2685 Use these variables to override the choices made by `configure' or to help
2686 it to find libraries and programs with nonstandard names/locations.
2687
2688 Report bugs to the package provider.
2689 _ACEOF
2690 ac_status=$?
2691 fi
2692
2693 if test "$ac_init_help" = "recursive"; then
2694 # If there are subdirs, report their specific --help.
2695 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2696 test -d "$ac_dir" ||
2697 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2698 continue
2699 ac_builddir=.
2700
2701 case "$ac_dir" in
2702 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2703 *)
2704 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2705 # A ".." for each directory in $ac_dir_suffix.
2706 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2707 case $ac_top_builddir_sub in
2708 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2709 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2710 esac ;;
2711 esac
2712 ac_abs_top_builddir=$ac_pwd
2713 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2714 # for backward compatibility:
2715 ac_top_builddir=$ac_top_build_prefix
2716
2717 case $srcdir in
2718 .) # We are building in place.
2719 ac_srcdir=.
2720 ac_top_srcdir=$ac_top_builddir_sub
2721 ac_abs_top_srcdir=$ac_pwd ;;
2722 [\\/]* | ?:[\\/]* ) # Absolute name.
2723 ac_srcdir=$srcdir$ac_dir_suffix;
2724 ac_top_srcdir=$srcdir
2725 ac_abs_top_srcdir=$srcdir ;;
2726 *) # Relative name.
2727 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2728 ac_top_srcdir=$ac_top_build_prefix$srcdir
2729 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2730 esac
2731 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2732
2733 cd "$ac_dir" || { ac_status=$?; continue; }
2734 # Check for guested configure.
2735 if test -f "$ac_srcdir/configure.gnu"; then
2736 echo &&
2737 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2738 elif test -f "$ac_srcdir/configure"; then
2739 echo &&
2740 $SHELL "$ac_srcdir/configure" --help=recursive
2741 else
2742 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2743 fi || ac_status=$?
2744 cd "$ac_pwd" || { ac_status=$?; break; }
2745 done
2746 fi
2747
2748 test -n "$ac_init_help" && exit $ac_status
2749 if $ac_init_version; then
2750 cat <<\_ACEOF
2751 libgnu configure UNUSED-VERSION
2752 generated by GNU Autoconf 2.69
2753
2754 Copyright (C) 2012 Free Software Foundation, Inc.
2755 This configure script is free software; the Free Software Foundation
2756 gives unlimited permission to copy, distribute and modify it.
2757 _ACEOF
2758 exit
2759 fi
2760
2761 ## ------------------------ ##
2762 ## Autoconf initialization. ##
2763 ## ------------------------ ##
2764
2765 # ac_fn_c_try_compile LINENO
2766 # --------------------------
2767 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2768 ac_fn_c_try_compile ()
2769 {
2770 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2771 rm -f conftest.$ac_objext
2772 if { { ac_try="$ac_compile"
2773 case "(($ac_try" in
2774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2775 *) ac_try_echo=$ac_try;;
2776 esac
2777 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2778 $as_echo "$ac_try_echo"; } >&5
2779 (eval "$ac_compile") 2>conftest.err
2780 ac_status=$?
2781 if test -s conftest.err; then
2782 grep -v '^ *+' conftest.err >conftest.er1
2783 cat conftest.er1 >&5
2784 mv -f conftest.er1 conftest.err
2785 fi
2786 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2787 test $ac_status = 0; } && {
2788 test -z "$ac_c_werror_flag" ||
2789 test ! -s conftest.err
2790 } && test -s conftest.$ac_objext; then :
2791 ac_retval=0
2792 else
2793 $as_echo "$as_me: failed program was:" >&5
2794 sed 's/^/| /' conftest.$ac_ext >&5
2795
2796 ac_retval=1
2797 fi
2798 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2799 as_fn_set_status $ac_retval
2800
2801 } # ac_fn_c_try_compile
2802
2803 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2804 # -------------------------------------------------------
2805 # Tests whether HEADER exists and can be compiled using the include files in
2806 # INCLUDES, setting the cache variable VAR accordingly.
2807 ac_fn_c_check_header_compile ()
2808 {
2809 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2811 $as_echo_n "checking for $2... " >&6; }
2812 if eval \${$3+:} false; then :
2813 $as_echo_n "(cached) " >&6
2814 else
2815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2816 /* end confdefs.h. */
2817 $4
2818 #include <$2>
2819 _ACEOF
2820 if ac_fn_c_try_compile "$LINENO"; then :
2821 eval "$3=yes"
2822 else
2823 eval "$3=no"
2824 fi
2825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2826 fi
2827 eval ac_res=\$$3
2828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2829 $as_echo "$ac_res" >&6; }
2830 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2831
2832 } # ac_fn_c_check_header_compile
2833
2834 # ac_fn_c_try_cpp LINENO
2835 # ----------------------
2836 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2837 ac_fn_c_try_cpp ()
2838 {
2839 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2840 if { { ac_try="$ac_cpp conftest.$ac_ext"
2841 case "(($ac_try" in
2842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2843 *) ac_try_echo=$ac_try;;
2844 esac
2845 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2846 $as_echo "$ac_try_echo"; } >&5
2847 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2848 ac_status=$?
2849 if test -s conftest.err; then
2850 grep -v '^ *+' conftest.err >conftest.er1
2851 cat conftest.er1 >&5
2852 mv -f conftest.er1 conftest.err
2853 fi
2854 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2855 test $ac_status = 0; } > conftest.i && {
2856 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2857 test ! -s conftest.err
2858 }; then :
2859 ac_retval=0
2860 else
2861 $as_echo "$as_me: failed program was:" >&5
2862 sed 's/^/| /' conftest.$ac_ext >&5
2863
2864 ac_retval=1
2865 fi
2866 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2867 as_fn_set_status $ac_retval
2868
2869 } # ac_fn_c_try_cpp
2870
2871 # ac_fn_c_try_run LINENO
2872 # ----------------------
2873 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2874 # that executables *can* be run.
2875 ac_fn_c_try_run ()
2876 {
2877 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2878 if { { ac_try="$ac_link"
2879 case "(($ac_try" in
2880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2881 *) ac_try_echo=$ac_try;;
2882 esac
2883 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2884 $as_echo "$ac_try_echo"; } >&5
2885 (eval "$ac_link") 2>&5
2886 ac_status=$?
2887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2888 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2889 { { case "(($ac_try" in
2890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2891 *) ac_try_echo=$ac_try;;
2892 esac
2893 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2894 $as_echo "$ac_try_echo"; } >&5
2895 (eval "$ac_try") 2>&5
2896 ac_status=$?
2897 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2898 test $ac_status = 0; }; }; then :
2899 ac_retval=0
2900 else
2901 $as_echo "$as_me: program exited with status $ac_status" >&5
2902 $as_echo "$as_me: failed program was:" >&5
2903 sed 's/^/| /' conftest.$ac_ext >&5
2904
2905 ac_retval=$ac_status
2906 fi
2907 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2908 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2909 as_fn_set_status $ac_retval
2910
2911 } # ac_fn_c_try_run
2912
2913 # ac_fn_c_try_link LINENO
2914 # -----------------------
2915 # Try to link conftest.$ac_ext, and return whether this succeeded.
2916 ac_fn_c_try_link ()
2917 {
2918 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2919 rm -f conftest.$ac_objext conftest$ac_exeext
2920 if { { ac_try="$ac_link"
2921 case "(($ac_try" in
2922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2923 *) ac_try_echo=$ac_try;;
2924 esac
2925 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2926 $as_echo "$ac_try_echo"; } >&5
2927 (eval "$ac_link") 2>conftest.err
2928 ac_status=$?
2929 if test -s conftest.err; then
2930 grep -v '^ *+' conftest.err >conftest.er1
2931 cat conftest.er1 >&5
2932 mv -f conftest.er1 conftest.err
2933 fi
2934 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2935 test $ac_status = 0; } && {
2936 test -z "$ac_c_werror_flag" ||
2937 test ! -s conftest.err
2938 } && test -s conftest$ac_exeext && {
2939 test "$cross_compiling" = yes ||
2940 test -x conftest$ac_exeext
2941 }; then :
2942 ac_retval=0
2943 else
2944 $as_echo "$as_me: failed program was:" >&5
2945 sed 's/^/| /' conftest.$ac_ext >&5
2946
2947 ac_retval=1
2948 fi
2949 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2950 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2951 # interfere with the next link command; also delete a directory that is
2952 # left behind by Apple's compiler. We do this before executing the actions.
2953 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2954 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2955 as_fn_set_status $ac_retval
2956
2957 } # ac_fn_c_try_link
2958
2959 # ac_fn_c_check_func LINENO FUNC VAR
2960 # ----------------------------------
2961 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2962 ac_fn_c_check_func ()
2963 {
2964 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2966 $as_echo_n "checking for $2... " >&6; }
2967 if eval \${$3+:} false; then :
2968 $as_echo_n "(cached) " >&6
2969 else
2970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2971 /* end confdefs.h. */
2972 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2973 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2974 #define $2 innocuous_$2
2975
2976 /* System header to define __stub macros and hopefully few prototypes,
2977 which can conflict with char $2 (); below.
2978 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2979 <limits.h> exists even on freestanding compilers. */
2980
2981 #ifdef __STDC__
2982 # include <limits.h>
2983 #else
2984 # include <assert.h>
2985 #endif
2986
2987 #undef $2
2988
2989 /* Override any GCC internal prototype to avoid an error.
2990 Use char because int might match the return type of a GCC
2991 builtin and then its argument prototype would still apply. */
2992 #ifdef __cplusplus
2993 extern "C"
2994 #endif
2995 char $2 ();
2996 /* The GNU C library defines this for functions which it implements
2997 to always fail with ENOSYS. Some functions are actually named
2998 something starting with __ and the normal name is an alias. */
2999 #if defined __stub_$2 || defined __stub___$2
3000 choke me
3001 #endif
3002
3003 int
3004 main ()
3005 {
3006 return $2 ();
3007 ;
3008 return 0;
3009 }
3010 _ACEOF
3011 if ac_fn_c_try_link "$LINENO"; then :
3012 eval "$3=yes"
3013 else
3014 eval "$3=no"
3015 fi
3016 rm -f core conftest.err conftest.$ac_objext \
3017 conftest$ac_exeext conftest.$ac_ext
3018 fi
3019 eval ac_res=\$$3
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3021 $as_echo "$ac_res" >&6; }
3022 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3023
3024 } # ac_fn_c_check_func
3025
3026 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
3027 # -------------------------------------------------------
3028 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
3029 # the include files in INCLUDES and setting the cache variable VAR
3030 # accordingly.
3031 ac_fn_c_check_header_mongrel ()
3032 {
3033 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3034 if eval \${$3+:} false; then :
3035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3036 $as_echo_n "checking for $2... " >&6; }
3037 if eval \${$3+:} false; then :
3038 $as_echo_n "(cached) " >&6
3039 fi
3040 eval ac_res=\$$3
3041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3042 $as_echo "$ac_res" >&6; }
3043 else
3044 # Is the header compilable?
3045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
3046 $as_echo_n "checking $2 usability... " >&6; }
3047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3048 /* end confdefs.h. */
3049 $4
3050 #include <$2>
3051 _ACEOF
3052 if ac_fn_c_try_compile "$LINENO"; then :
3053 ac_header_compiler=yes
3054 else
3055 ac_header_compiler=no
3056 fi
3057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
3059 $as_echo "$ac_header_compiler" >&6; }
3060
3061 # Is the header present?
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
3063 $as_echo_n "checking $2 presence... " >&6; }
3064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3065 /* end confdefs.h. */
3066 #include <$2>
3067 _ACEOF
3068 if ac_fn_c_try_cpp "$LINENO"; then :
3069 ac_header_preproc=yes
3070 else
3071 ac_header_preproc=no
3072 fi
3073 rm -f conftest.err conftest.i conftest.$ac_ext
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
3075 $as_echo "$ac_header_preproc" >&6; }
3076
3077 # So? What about this header?
3078 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
3079 yes:no: )
3080 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
3081 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
3082 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3083 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3084 ;;
3085 no:yes:* )
3086 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
3087 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
3089 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
3091 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
3092 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
3093 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
3094 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3095 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3096 ;;
3097 esac
3098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3099 $as_echo_n "checking for $2... " >&6; }
3100 if eval \${$3+:} false; then :
3101 $as_echo_n "(cached) " >&6
3102 else
3103 eval "$3=\$ac_header_compiler"
3104 fi
3105 eval ac_res=\$$3
3106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3107 $as_echo "$ac_res" >&6; }
3108 fi
3109 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3110
3111 } # ac_fn_c_check_header_mongrel
3112
3113 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
3114 # -------------------------------------------
3115 # Tests whether TYPE exists after having included INCLUDES, setting cache
3116 # variable VAR accordingly.
3117 ac_fn_c_check_type ()
3118 {
3119 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3121 $as_echo_n "checking for $2... " >&6; }
3122 if eval \${$3+:} false; then :
3123 $as_echo_n "(cached) " >&6
3124 else
3125 eval "$3=no"
3126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3127 /* end confdefs.h. */
3128 $4
3129 int
3130 main ()
3131 {
3132 if (sizeof ($2))
3133 return 0;
3134 ;
3135 return 0;
3136 }
3137 _ACEOF
3138 if ac_fn_c_try_compile "$LINENO"; then :
3139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3140 /* end confdefs.h. */
3141 $4
3142 int
3143 main ()
3144 {
3145 if (sizeof (($2)))
3146 return 0;
3147 ;
3148 return 0;
3149 }
3150 _ACEOF
3151 if ac_fn_c_try_compile "$LINENO"; then :
3152
3153 else
3154 eval "$3=yes"
3155 fi
3156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3157 fi
3158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3159 fi
3160 eval ac_res=\$$3
3161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3162 $as_echo "$ac_res" >&6; }
3163 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3164
3165 } # ac_fn_c_check_type
3166
3167 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3168 # ----------------------------------------------------
3169 # Tries to find if the field MEMBER exists in type AGGR, after including
3170 # INCLUDES, setting cache variable VAR accordingly.
3171 ac_fn_c_check_member ()
3172 {
3173 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3175 $as_echo_n "checking for $2.$3... " >&6; }
3176 if eval \${$4+:} false; then :
3177 $as_echo_n "(cached) " >&6
3178 else
3179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3180 /* end confdefs.h. */
3181 $5
3182 int
3183 main ()
3184 {
3185 static $2 ac_aggr;
3186 if (ac_aggr.$3)
3187 return 0;
3188 ;
3189 return 0;
3190 }
3191 _ACEOF
3192 if ac_fn_c_try_compile "$LINENO"; then :
3193 eval "$4=yes"
3194 else
3195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3196 /* end confdefs.h. */
3197 $5
3198 int
3199 main ()
3200 {
3201 static $2 ac_aggr;
3202 if (sizeof ac_aggr.$3)
3203 return 0;
3204 ;
3205 return 0;
3206 }
3207 _ACEOF
3208 if ac_fn_c_try_compile "$LINENO"; then :
3209 eval "$4=yes"
3210 else
3211 eval "$4=no"
3212 fi
3213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3214 fi
3215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3216 fi
3217 eval ac_res=\$$4
3218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3219 $as_echo "$ac_res" >&6; }
3220 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3221
3222 } # ac_fn_c_check_member
3223
3224 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3225 # ---------------------------------------------
3226 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3227 # accordingly.
3228 ac_fn_c_check_decl ()
3229 {
3230 ac_save_ac_compile="$ac_compile"
3231 if test -n "$ac_compile_for_check_decl"; then
3232 ac_compile="$ac_compile_for_check_decl"
3233 fi
3234 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3235 as_decl_name=`echo $2|sed 's/ *(.*//'`
3236 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3238 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3239 if eval \${$3+:} false; then :
3240 $as_echo_n "(cached) " >&6
3241 else
3242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3243 /* end confdefs.h. */
3244 $4
3245 int
3246 main ()
3247 {
3248 #ifndef $as_decl_name
3249 #ifdef __cplusplus
3250 (void) $as_decl_use;
3251 #else
3252 (void) $as_decl_name;
3253 #endif
3254 #endif
3255
3256 ;
3257 return 0;
3258 }
3259 _ACEOF
3260 if ac_fn_c_try_compile "$LINENO"; then :
3261 eval "$3=yes"
3262 else
3263 eval "$3=no"
3264 fi
3265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3266 fi
3267 eval ac_res=\$$3
3268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3269 $as_echo "$ac_res" >&6; }
3270 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3271 ac_compile="$ac_save_ac_compile"
3272
3273 } # ac_fn_c_check_decl
3274
3275 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3276 # --------------------------------------------
3277 # Tries to find the compile-time value of EXPR in a program that includes
3278 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3279 # computed
3280 ac_fn_c_compute_int ()
3281 {
3282 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3283 if test "$cross_compiling" = yes; then
3284 # Depending upon the size, compute the lo and hi bounds.
3285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3286 /* end confdefs.h. */
3287 $4
3288 int
3289 main ()
3290 {
3291 static int test_array [1 - 2 * !(($2) >= 0)];
3292 test_array [0] = 0;
3293 return test_array [0];
3294
3295 ;
3296 return 0;
3297 }
3298 _ACEOF
3299 if ac_fn_c_try_compile "$LINENO"; then :
3300 ac_lo=0 ac_mid=0
3301 while :; do
3302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3303 /* end confdefs.h. */
3304 $4
3305 int
3306 main ()
3307 {
3308 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3309 test_array [0] = 0;
3310 return test_array [0];
3311
3312 ;
3313 return 0;
3314 }
3315 _ACEOF
3316 if ac_fn_c_try_compile "$LINENO"; then :
3317 ac_hi=$ac_mid; break
3318 else
3319 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3320 if test $ac_lo -le $ac_mid; then
3321 ac_lo= ac_hi=
3322 break
3323 fi
3324 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3325 fi
3326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3327 done
3328 else
3329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3330 /* end confdefs.h. */
3331 $4
3332 int
3333 main ()
3334 {
3335 static int test_array [1 - 2 * !(($2) < 0)];
3336 test_array [0] = 0;
3337 return test_array [0];
3338
3339 ;
3340 return 0;
3341 }
3342 _ACEOF
3343 if ac_fn_c_try_compile "$LINENO"; then :
3344 ac_hi=-1 ac_mid=-1
3345 while :; do
3346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3347 /* end confdefs.h. */
3348 $4
3349 int
3350 main ()
3351 {
3352 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3353 test_array [0] = 0;
3354 return test_array [0];
3355
3356 ;
3357 return 0;
3358 }
3359 _ACEOF
3360 if ac_fn_c_try_compile "$LINENO"; then :
3361 ac_lo=$ac_mid; break
3362 else
3363 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3364 if test $ac_mid -le $ac_hi; then
3365 ac_lo= ac_hi=
3366 break
3367 fi
3368 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3369 fi
3370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3371 done
3372 else
3373 ac_lo= ac_hi=
3374 fi
3375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3376 fi
3377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3378 # Binary search between lo and hi bounds.
3379 while test "x$ac_lo" != "x$ac_hi"; do
3380 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3382 /* end confdefs.h. */
3383 $4
3384 int
3385 main ()
3386 {
3387 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3388 test_array [0] = 0;
3389 return test_array [0];
3390
3391 ;
3392 return 0;
3393 }
3394 _ACEOF
3395 if ac_fn_c_try_compile "$LINENO"; then :
3396 ac_hi=$ac_mid
3397 else
3398 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3399 fi
3400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3401 done
3402 case $ac_lo in #((
3403 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3404 '') ac_retval=1 ;;
3405 esac
3406 else
3407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3408 /* end confdefs.h. */
3409 $4
3410 static long int longval () { return $2; }
3411 static unsigned long int ulongval () { return $2; }
3412 #include <stdio.h>
3413 #include <stdlib.h>
3414 int
3415 main ()
3416 {
3417
3418 FILE *f = fopen ("conftest.val", "w");
3419 if (! f)
3420 return 1;
3421 if (($2) < 0)
3422 {
3423 long int i = longval ();
3424 if (i != ($2))
3425 return 1;
3426 fprintf (f, "%ld", i);
3427 }
3428 else
3429 {
3430 unsigned long int i = ulongval ();
3431 if (i != ($2))
3432 return 1;
3433 fprintf (f, "%lu", i);
3434 }
3435 /* Do not output a trailing newline, as this causes \r\n confusion
3436 on some platforms. */
3437 return ferror (f) || fclose (f) != 0;
3438
3439 ;
3440 return 0;
3441 }
3442 _ACEOF
3443 if ac_fn_c_try_run "$LINENO"; then :
3444 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3445 else
3446 ac_retval=1
3447 fi
3448 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3449 conftest.$ac_objext conftest.beam conftest.$ac_ext
3450 rm -f conftest.val
3451
3452 fi
3453 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3454 as_fn_set_status $ac_retval
3455
3456 } # ac_fn_c_compute_int
3457 cat >config.log <<_ACEOF
3458 This file contains any messages produced by compilers while
3459 running configure, to aid debugging if configure makes a mistake.
3460
3461 It was created by libgnu $as_me UNUSED-VERSION, which was
3462 generated by GNU Autoconf 2.69. Invocation command line was
3463
3464 $ $0 $@
3465
3466 _ACEOF
3467 exec 5>>config.log
3468 {
3469 cat <<_ASUNAME
3470 ## --------- ##
3471 ## Platform. ##
3472 ## --------- ##
3473
3474 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3475 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3476 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3477 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3478 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3479
3480 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3481 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3482
3483 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3484 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3485 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3486 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3487 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3488 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3489 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3490
3491 _ASUNAME
3492
3493 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3494 for as_dir in $PATH
3495 do
3496 IFS=$as_save_IFS
3497 test -z "$as_dir" && as_dir=.
3498 $as_echo "PATH: $as_dir"
3499 done
3500 IFS=$as_save_IFS
3501
3502 } >&5
3503
3504 cat >&5 <<_ACEOF
3505
3506
3507 ## ----------- ##
3508 ## Core tests. ##
3509 ## ----------- ##
3510
3511 _ACEOF
3512
3513
3514 # Keep a trace of the command line.
3515 # Strip out --no-create and --no-recursion so they do not pile up.
3516 # Strip out --silent because we don't want to record it for future runs.
3517 # Also quote any args containing shell meta-characters.
3518 # Make two passes to allow for proper duplicate-argument suppression.
3519 ac_configure_args=
3520 ac_configure_args0=
3521 ac_configure_args1=
3522 ac_must_keep_next=false
3523 for ac_pass in 1 2
3524 do
3525 for ac_arg
3526 do
3527 case $ac_arg in
3528 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3529 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3530 | -silent | --silent | --silen | --sile | --sil)
3531 continue ;;
3532 *\'*)
3533 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3534 esac
3535 case $ac_pass in
3536 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3537 2)
3538 as_fn_append ac_configure_args1 " '$ac_arg'"
3539 if test $ac_must_keep_next = true; then
3540 ac_must_keep_next=false # Got value, back to normal.
3541 else
3542 case $ac_arg in
3543 *=* | --config-cache | -C | -disable-* | --disable-* \
3544 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3545 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3546 | -with-* | --with-* | -without-* | --without-* | --x)
3547 case "$ac_configure_args0 " in
3548 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3549 esac
3550 ;;
3551 -* ) ac_must_keep_next=true ;;
3552 esac
3553 fi
3554 as_fn_append ac_configure_args " '$ac_arg'"
3555 ;;
3556 esac
3557 done
3558 done
3559 { ac_configure_args0=; unset ac_configure_args0;}
3560 { ac_configure_args1=; unset ac_configure_args1;}
3561
3562 # When interrupted or exit'd, cleanup temporary files, and complete
3563 # config.log. We remove comments because anyway the quotes in there
3564 # would cause problems or look ugly.
3565 # WARNING: Use '\'' to represent an apostrophe within the trap.
3566 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3567 trap 'exit_status=$?
3568 # Save into config.log some information that might help in debugging.
3569 {
3570 echo
3571
3572 $as_echo "## ---------------- ##
3573 ## Cache variables. ##
3574 ## ---------------- ##"
3575 echo
3576 # The following way of writing the cache mishandles newlines in values,
3577 (
3578 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3579 eval ac_val=\$$ac_var
3580 case $ac_val in #(
3581 *${as_nl}*)
3582 case $ac_var in #(
3583 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3584 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3585 esac
3586 case $ac_var in #(
3587 _ | IFS | as_nl) ;; #(
3588 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3589 *) { eval $ac_var=; unset $ac_var;} ;;
3590 esac ;;
3591 esac
3592 done
3593 (set) 2>&1 |
3594 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3595 *${as_nl}ac_space=\ *)
3596 sed -n \
3597 "s/'\''/'\''\\\\'\'''\''/g;
3598 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3599 ;; #(
3600 *)
3601 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3602 ;;
3603 esac |
3604 sort
3605 )
3606 echo
3607
3608 $as_echo "## ----------------- ##
3609 ## Output variables. ##
3610 ## ----------------- ##"
3611 echo
3612 for ac_var in $ac_subst_vars
3613 do
3614 eval ac_val=\$$ac_var
3615 case $ac_val in
3616 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3617 esac
3618 $as_echo "$ac_var='\''$ac_val'\''"
3619 done | sort
3620 echo
3621
3622 if test -n "$ac_subst_files"; then
3623 $as_echo "## ------------------- ##
3624 ## File substitutions. ##
3625 ## ------------------- ##"
3626 echo
3627 for ac_var in $ac_subst_files
3628 do
3629 eval ac_val=\$$ac_var
3630 case $ac_val in
3631 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3632 esac
3633 $as_echo "$ac_var='\''$ac_val'\''"
3634 done | sort
3635 echo
3636 fi
3637
3638 if test -s confdefs.h; then
3639 $as_echo "## ----------- ##
3640 ## confdefs.h. ##
3641 ## ----------- ##"
3642 echo
3643 cat confdefs.h
3644 echo
3645 fi
3646 test "$ac_signal" != 0 &&
3647 $as_echo "$as_me: caught signal $ac_signal"
3648 $as_echo "$as_me: exit $exit_status"
3649 } >&5
3650 rm -f core *.core core.conftest.* &&
3651 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3652 exit $exit_status
3653 ' 0
3654 for ac_signal in 1 2 13 15; do
3655 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3656 done
3657 ac_signal=0
3658
3659 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3660 rm -f -r conftest* confdefs.h
3661
3662 $as_echo "/* confdefs.h */" > confdefs.h
3663
3664 # Predefined preprocessor variables.
3665
3666 cat >>confdefs.h <<_ACEOF
3667 #define PACKAGE_NAME "$PACKAGE_NAME"
3668 _ACEOF
3669
3670 cat >>confdefs.h <<_ACEOF
3671 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3672 _ACEOF
3673
3674 cat >>confdefs.h <<_ACEOF
3675 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3676 _ACEOF
3677
3678 cat >>confdefs.h <<_ACEOF
3679 #define PACKAGE_STRING "$PACKAGE_STRING"
3680 _ACEOF
3681
3682 cat >>confdefs.h <<_ACEOF
3683 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3684 _ACEOF
3685
3686 cat >>confdefs.h <<_ACEOF
3687 #define PACKAGE_URL "$PACKAGE_URL"
3688 _ACEOF
3689
3690
3691 # Let the site file select an alternate cache file if it wants to.
3692 # Prefer an explicitly selected file to automatically selected ones.
3693 ac_site_file1=NONE
3694 ac_site_file2=NONE
3695 if test -n "$CONFIG_SITE"; then
3696 # We do not want a PATH search for config.site.
3697 case $CONFIG_SITE in #((
3698 -*) ac_site_file1=./$CONFIG_SITE;;
3699 */*) ac_site_file1=$CONFIG_SITE;;
3700 *) ac_site_file1=./$CONFIG_SITE;;
3701 esac
3702 elif test "x$prefix" != xNONE; then
3703 ac_site_file1=$prefix/share/config.site
3704 ac_site_file2=$prefix/etc/config.site
3705 else
3706 ac_site_file1=$ac_default_prefix/share/config.site
3707 ac_site_file2=$ac_default_prefix/etc/config.site
3708 fi
3709 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3710 do
3711 test "x$ac_site_file" = xNONE && continue
3712 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3713 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3714 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3715 sed 's/^/| /' "$ac_site_file" >&5
3716 . "$ac_site_file" \
3717 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3718 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3719 as_fn_error $? "failed to load site script $ac_site_file
3720 See \`config.log' for more details" "$LINENO" 5; }
3721 fi
3722 done
3723
3724 if test -r "$cache_file"; then
3725 # Some versions of bash will fail to source /dev/null (special files
3726 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3727 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3728 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3729 $as_echo "$as_me: loading cache $cache_file" >&6;}
3730 case $cache_file in
3731 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3732 *) . "./$cache_file";;
3733 esac
3734 fi
3735 else
3736 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3737 $as_echo "$as_me: creating cache $cache_file" >&6;}
3738 >$cache_file
3739 fi
3740
3741 as_fn_append ac_header_list " wchar.h"
3742 as_fn_append ac_header_list " minix/config.h"
3743 as_fn_append ac_header_list " sys/socket.h"
3744 as_fn_append ac_header_list " arpa/inet.h"
3745 as_fn_append ac_header_list " features.h"
3746 as_fn_append ac_func_list " btowc"
3747 as_fn_append ac_func_list " canonicalize_file_name"
3748 as_fn_append ac_func_list " faccessat"
3749 as_fn_append ac_func_list " realpath"
3750 as_fn_append ac_header_list " sys/param.h"
3751 as_fn_append ac_header_list " unistd.h"
3752 as_fn_append ac_func_list " chown"
3753 as_fn_append ac_func_list " fchown"
3754 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3755 as_fn_append ac_func_list " fchdir"
3756 as_fn_append ac_header_list " dirent.h"
3757 as_fn_append ac_func_list " fcntl"
3758 as_fn_append ac_func_list " symlink"
3759 as_fn_append ac_func_list " fdopendir"
3760 as_fn_append ac_func_list " mempcpy"
3761 as_fn_append ac_header_list " fnmatch.h"
3762 as_fn_append ac_func_list " fnmatch"
3763 as_fn_append ac_func_list " mbsrtowcs"
3764 gl_fnmatch_required=GNU
3765 as_fn_append ac_header_list " sys/stat.h"
3766 as_fn_append ac_func_list " fstatat"
3767 as_fn_append ac_func_list " getdelim"
3768 as_fn_append ac_func_list " getdtablesize"
3769 as_fn_append ac_func_list " getlogin_r"
3770 as_fn_append ac_func_list " getprogname"
3771 as_fn_append ac_func_list " getexecname"
3772 as_fn_append ac_func_list " getrandom"
3773 as_fn_append ac_header_list " sys/time.h"
3774 as_fn_append ac_func_list " gettimeofday"
3775 as_fn_append ac_header_list " glob.h"
3776 as_fn_append ac_func_list " glob"
3777 as_fn_append ac_func_list " glob_pattern_p"
3778 as_fn_append ac_func_list " getpwnam_r"
3779 as_fn_append ac_header_list " threads.h"
3780 as_fn_append ac_header_list " netdb.h"
3781 as_fn_append ac_header_list " netinet/in.h"
3782 as_fn_append ac_header_list " limits.h"
3783 as_fn_append ac_header_list " inttypes.h"
3784 as_fn_append ac_header_list " sys/types.h"
3785 as_fn_append ac_header_list " stdint.h"
3786 as_fn_append ac_func_list " isblank"
3787 as_fn_append ac_header_list " xlocale.h"
3788 as_fn_append ac_func_list " lstat"
3789 as_fn_append ac_header_list " math.h"
3790 as_fn_append ac_func_list " mbsinit"
3791 as_fn_append ac_func_list " mbrtowc"
3792 as_fn_append ac_header_list " sys/mman.h"
3793 as_fn_append ac_func_list " mprotect"
3794 as_fn_append ac_func_list " mkostemp"
3795 as_fn_append ac_func_list " openat"
3796 as_fn_append ac_func_list " pipe"
3797 as_fn_append ac_func_list " readlink"
3798 as_fn_append ac_func_list " link"
3799 as_fn_append ac_header_list " sys/select.h"
3800 as_fn_append ac_func_list " setenv"
3801 as_fn_append ac_func_list " strerror_r"
3802 as_fn_append ac_func_list " __xpg_strerror_r"
3803 as_fn_append ac_func_list " catgets"
3804 as_fn_append ac_func_list " snprintf"
3805 as_fn_append ac_header_list " strings.h"
3806 as_fn_append ac_header_list " sys/random.h"
3807 as_fn_append ac_header_list " sys/uio.h"
3808 as_fn_append ac_header_list " sys/wait.h"
3809 as_fn_append ac_func_list " localtime_r"
3810 as_fn_append ac_header_list " crtdefs.h"
3811 as_fn_append ac_func_list " iswcntrl"
3812 as_fn_append ac_header_list " wctype.h"
3813 as_fn_append ac_func_list " wmempcpy"
3814 # Check that the precious variables saved in the cache have kept the same
3815 # value.
3816 ac_cache_corrupted=false
3817 for ac_var in $ac_precious_vars; do
3818 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3819 eval ac_new_set=\$ac_env_${ac_var}_set
3820 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3821 eval ac_new_val=\$ac_env_${ac_var}_value
3822 case $ac_old_set,$ac_new_set in
3823 set,)
3824 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3825 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3826 ac_cache_corrupted=: ;;
3827 ,set)
3828 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3829 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3830 ac_cache_corrupted=: ;;
3831 ,);;
3832 *)
3833 if test "x$ac_old_val" != "x$ac_new_val"; then
3834 # differences in whitespace do not lead to failure.
3835 ac_old_val_w=`echo x $ac_old_val`
3836 ac_new_val_w=`echo x $ac_new_val`
3837 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3838 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3839 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3840 ac_cache_corrupted=:
3841 else
3842 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3843 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3844 eval $ac_var=\$ac_old_val
3845 fi
3846 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3847 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3848 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3849 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3850 fi;;
3851 esac
3852 # Pass precious variables to config.status.
3853 if test "$ac_new_set" = set; then
3854 case $ac_new_val in
3855 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3856 *) ac_arg=$ac_var=$ac_new_val ;;
3857 esac
3858 case " $ac_configure_args " in
3859 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3860 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3861 esac
3862 fi
3863 done
3864 if $ac_cache_corrupted; then
3865 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3866 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3867 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3868 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3869 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3870 fi
3871 ## -------------------- ##
3872 ## Main body of script. ##
3873 ## -------------------- ##
3874
3875 ac_ext=c
3876 ac_cpp='$CPP $CPPFLAGS'
3877 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3878 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3879 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3880
3881
3882
3883
3884
3885
3886 ac_config_headers="$ac_config_headers config.h:config.in"
3887
3888
3889
3890
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3892 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3893 # Check whether --enable-maintainer-mode was given.
3894 if test "${enable_maintainer_mode+set}" = set; then :
3895 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3896 else
3897 USE_MAINTAINER_MODE=no
3898 fi
3899
3900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3901 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3902 if test $USE_MAINTAINER_MODE = yes; then
3903 MAINTAINER_MODE_TRUE=
3904 MAINTAINER_MODE_FALSE='#'
3905 else
3906 MAINTAINER_MODE_TRUE='#'
3907 MAINTAINER_MODE_FALSE=
3908 fi
3909
3910 MAINT=$MAINTAINER_MODE_TRUE
3911
3912
3913
3914 ac_ext=c
3915 ac_cpp='$CPP $CPPFLAGS'
3916 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3917 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3918 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3919 if test -n "$ac_tool_prefix"; then
3920 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3921 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3923 $as_echo_n "checking for $ac_word... " >&6; }
3924 if ${ac_cv_prog_CC+:} false; then :
3925 $as_echo_n "(cached) " >&6
3926 else
3927 if test -n "$CC"; then
3928 ac_cv_prog_CC="$CC" # Let the user override the test.
3929 else
3930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3931 for as_dir in $PATH
3932 do
3933 IFS=$as_save_IFS
3934 test -z "$as_dir" && as_dir=.
3935 for ac_exec_ext in '' $ac_executable_extensions; do
3936 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3937 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3939 break 2
3940 fi
3941 done
3942 done
3943 IFS=$as_save_IFS
3944
3945 fi
3946 fi
3947 CC=$ac_cv_prog_CC
3948 if test -n "$CC"; then
3949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3950 $as_echo "$CC" >&6; }
3951 else
3952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3953 $as_echo "no" >&6; }
3954 fi
3955
3956
3957 fi
3958 if test -z "$ac_cv_prog_CC"; then
3959 ac_ct_CC=$CC
3960 # Extract the first word of "gcc", so it can be a program name with args.
3961 set dummy gcc; ac_word=$2
3962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3963 $as_echo_n "checking for $ac_word... " >&6; }
3964 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3965 $as_echo_n "(cached) " >&6
3966 else
3967 if test -n "$ac_ct_CC"; then
3968 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3969 else
3970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3971 for as_dir in $PATH
3972 do
3973 IFS=$as_save_IFS
3974 test -z "$as_dir" && as_dir=.
3975 for ac_exec_ext in '' $ac_executable_extensions; do
3976 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3977 ac_cv_prog_ac_ct_CC="gcc"
3978 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3979 break 2
3980 fi
3981 done
3982 done
3983 IFS=$as_save_IFS
3984
3985 fi
3986 fi
3987 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3988 if test -n "$ac_ct_CC"; then
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3990 $as_echo "$ac_ct_CC" >&6; }
3991 else
3992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3993 $as_echo "no" >&6; }
3994 fi
3995
3996 if test "x$ac_ct_CC" = x; then
3997 CC=""
3998 else
3999 case $cross_compiling:$ac_tool_warned in
4000 yes:)
4001 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4002 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4003 ac_tool_warned=yes ;;
4004 esac
4005 CC=$ac_ct_CC
4006 fi
4007 else
4008 CC="$ac_cv_prog_CC"
4009 fi
4010
4011 if test -z "$CC"; then
4012 if test -n "$ac_tool_prefix"; then
4013 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4014 set dummy ${ac_tool_prefix}cc; ac_word=$2
4015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4016 $as_echo_n "checking for $ac_word... " >&6; }
4017 if ${ac_cv_prog_CC+:} false; then :
4018 $as_echo_n "(cached) " >&6
4019 else
4020 if test -n "$CC"; then
4021 ac_cv_prog_CC="$CC" # Let the user override the test.
4022 else
4023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4024 for as_dir in $PATH
4025 do
4026 IFS=$as_save_IFS
4027 test -z "$as_dir" && as_dir=.
4028 for ac_exec_ext in '' $ac_executable_extensions; do
4029 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4030 ac_cv_prog_CC="${ac_tool_prefix}cc"
4031 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4032 break 2
4033 fi
4034 done
4035 done
4036 IFS=$as_save_IFS
4037
4038 fi
4039 fi
4040 CC=$ac_cv_prog_CC
4041 if test -n "$CC"; then
4042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4043 $as_echo "$CC" >&6; }
4044 else
4045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4046 $as_echo "no" >&6; }
4047 fi
4048
4049
4050 fi
4051 fi
4052 if test -z "$CC"; then
4053 # Extract the first word of "cc", so it can be a program name with args.
4054 set dummy cc; ac_word=$2
4055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4056 $as_echo_n "checking for $ac_word... " >&6; }
4057 if ${ac_cv_prog_CC+:} false; then :
4058 $as_echo_n "(cached) " >&6
4059 else
4060 if test -n "$CC"; then
4061 ac_cv_prog_CC="$CC" # Let the user override the test.
4062 else
4063 ac_prog_rejected=no
4064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4065 for as_dir in $PATH
4066 do
4067 IFS=$as_save_IFS
4068 test -z "$as_dir" && as_dir=.
4069 for ac_exec_ext in '' $ac_executable_extensions; do
4070 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4071 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4072 ac_prog_rejected=yes
4073 continue
4074 fi
4075 ac_cv_prog_CC="cc"
4076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4077 break 2
4078 fi
4079 done
4080 done
4081 IFS=$as_save_IFS
4082
4083 if test $ac_prog_rejected = yes; then
4084 # We found a bogon in the path, so make sure we never use it.
4085 set dummy $ac_cv_prog_CC
4086 shift
4087 if test $# != 0; then
4088 # We chose a different compiler from the bogus one.
4089 # However, it has the same basename, so the bogon will be chosen
4090 # first if we set CC to just the basename; use the full file name.
4091 shift
4092 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4093 fi
4094 fi
4095 fi
4096 fi
4097 CC=$ac_cv_prog_CC
4098 if test -n "$CC"; then
4099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4100 $as_echo "$CC" >&6; }
4101 else
4102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4103 $as_echo "no" >&6; }
4104 fi
4105
4106
4107 fi
4108 if test -z "$CC"; then
4109 if test -n "$ac_tool_prefix"; then
4110 for ac_prog in cl.exe
4111 do
4112 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4113 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4115 $as_echo_n "checking for $ac_word... " >&6; }
4116 if ${ac_cv_prog_CC+:} false; then :
4117 $as_echo_n "(cached) " >&6
4118 else
4119 if test -n "$CC"; then
4120 ac_cv_prog_CC="$CC" # Let the user override the test.
4121 else
4122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4123 for as_dir in $PATH
4124 do
4125 IFS=$as_save_IFS
4126 test -z "$as_dir" && as_dir=.
4127 for ac_exec_ext in '' $ac_executable_extensions; do
4128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4129 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4131 break 2
4132 fi
4133 done
4134 done
4135 IFS=$as_save_IFS
4136
4137 fi
4138 fi
4139 CC=$ac_cv_prog_CC
4140 if test -n "$CC"; then
4141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4142 $as_echo "$CC" >&6; }
4143 else
4144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4145 $as_echo "no" >&6; }
4146 fi
4147
4148
4149 test -n "$CC" && break
4150 done
4151 fi
4152 if test -z "$CC"; then
4153 ac_ct_CC=$CC
4154 for ac_prog in cl.exe
4155 do
4156 # Extract the first word of "$ac_prog", so it can be a program name with args.
4157 set dummy $ac_prog; ac_word=$2
4158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4159 $as_echo_n "checking for $ac_word... " >&6; }
4160 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4161 $as_echo_n "(cached) " >&6
4162 else
4163 if test -n "$ac_ct_CC"; then
4164 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4165 else
4166 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4167 for as_dir in $PATH
4168 do
4169 IFS=$as_save_IFS
4170 test -z "$as_dir" && as_dir=.
4171 for ac_exec_ext in '' $ac_executable_extensions; do
4172 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4173 ac_cv_prog_ac_ct_CC="$ac_prog"
4174 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4175 break 2
4176 fi
4177 done
4178 done
4179 IFS=$as_save_IFS
4180
4181 fi
4182 fi
4183 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4184 if test -n "$ac_ct_CC"; then
4185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4186 $as_echo "$ac_ct_CC" >&6; }
4187 else
4188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4189 $as_echo "no" >&6; }
4190 fi
4191
4192
4193 test -n "$ac_ct_CC" && break
4194 done
4195
4196 if test "x$ac_ct_CC" = x; then
4197 CC=""
4198 else
4199 case $cross_compiling:$ac_tool_warned in
4200 yes:)
4201 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4202 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4203 ac_tool_warned=yes ;;
4204 esac
4205 CC=$ac_ct_CC
4206 fi
4207 fi
4208
4209 fi
4210 if test -z "$CC"; then
4211 if test -n "$ac_tool_prefix"; then
4212 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4213 set dummy ${ac_tool_prefix}clang; ac_word=$2
4214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4215 $as_echo_n "checking for $ac_word... " >&6; }
4216 if ${ac_cv_prog_CC+:} false; then :
4217 $as_echo_n "(cached) " >&6
4218 else
4219 if test -n "$CC"; then
4220 ac_cv_prog_CC="$CC" # Let the user override the test.
4221 else
4222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4223 for as_dir in $PATH
4224 do
4225 IFS=$as_save_IFS
4226 test -z "$as_dir" && as_dir=.
4227 for ac_exec_ext in '' $ac_executable_extensions; do
4228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4229 ac_cv_prog_CC="${ac_tool_prefix}clang"
4230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4231 break 2
4232 fi
4233 done
4234 done
4235 IFS=$as_save_IFS
4236
4237 fi
4238 fi
4239 CC=$ac_cv_prog_CC
4240 if test -n "$CC"; then
4241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4242 $as_echo "$CC" >&6; }
4243 else
4244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4245 $as_echo "no" >&6; }
4246 fi
4247
4248
4249 fi
4250 if test -z "$ac_cv_prog_CC"; then
4251 ac_ct_CC=$CC
4252 # Extract the first word of "clang", so it can be a program name with args.
4253 set dummy clang; ac_word=$2
4254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4255 $as_echo_n "checking for $ac_word... " >&6; }
4256 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4257 $as_echo_n "(cached) " >&6
4258 else
4259 if test -n "$ac_ct_CC"; then
4260 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4261 else
4262 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4263 for as_dir in $PATH
4264 do
4265 IFS=$as_save_IFS
4266 test -z "$as_dir" && as_dir=.
4267 for ac_exec_ext in '' $ac_executable_extensions; do
4268 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4269 ac_cv_prog_ac_ct_CC="clang"
4270 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4271 break 2
4272 fi
4273 done
4274 done
4275 IFS=$as_save_IFS
4276
4277 fi
4278 fi
4279 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4280 if test -n "$ac_ct_CC"; then
4281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4282 $as_echo "$ac_ct_CC" >&6; }
4283 else
4284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4285 $as_echo "no" >&6; }
4286 fi
4287
4288 if test "x$ac_ct_CC" = x; then
4289 CC=""
4290 else
4291 case $cross_compiling:$ac_tool_warned in
4292 yes:)
4293 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4294 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4295 ac_tool_warned=yes ;;
4296 esac
4297 CC=$ac_ct_CC
4298 fi
4299 else
4300 CC="$ac_cv_prog_CC"
4301 fi
4302
4303 fi
4304
4305
4306 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4307 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4308 as_fn_error $? "no acceptable C compiler found in \$PATH
4309 See \`config.log' for more details" "$LINENO" 5; }
4310
4311 # Provide some information about the compiler.
4312 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4313 set X $ac_compile
4314 ac_compiler=$2
4315 for ac_option in --version -v -V -qversion -version; do
4316 { { ac_try="$ac_compiler $ac_option >&5"
4317 case "(($ac_try" in
4318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4319 *) ac_try_echo=$ac_try;;
4320 esac
4321 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4322 $as_echo "$ac_try_echo"; } >&5
4323 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4324 ac_status=$?
4325 if test -s conftest.err; then
4326 sed '10a\
4327 ... rest of stderr output deleted ...
4328 10q' conftest.err >conftest.er1
4329 cat conftest.er1 >&5
4330 fi
4331 rm -f conftest.er1 conftest.err
4332 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4333 test $ac_status = 0; }
4334 done
4335
4336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4337 /* end confdefs.h. */
4338
4339 int
4340 main ()
4341 {
4342
4343 ;
4344 return 0;
4345 }
4346 _ACEOF
4347 ac_clean_files_save=$ac_clean_files
4348 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4349 # Try to create an executable without -o first, disregard a.out.
4350 # It will help us diagnose broken compilers, and finding out an intuition
4351 # of exeext.
4352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4353 $as_echo_n "checking whether the C compiler works... " >&6; }
4354 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4355
4356 # The possible output files:
4357 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4358
4359 ac_rmfiles=
4360 for ac_file in $ac_files
4361 do
4362 case $ac_file in
4363 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4364 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4365 esac
4366 done
4367 rm -f $ac_rmfiles
4368
4369 if { { ac_try="$ac_link_default"
4370 case "(($ac_try" in
4371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4372 *) ac_try_echo=$ac_try;;
4373 esac
4374 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4375 $as_echo "$ac_try_echo"; } >&5
4376 (eval "$ac_link_default") 2>&5
4377 ac_status=$?
4378 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4379 test $ac_status = 0; }; then :
4380 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4381 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4382 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4383 # so that the user can short-circuit this test for compilers unknown to
4384 # Autoconf.
4385 for ac_file in $ac_files ''
4386 do
4387 test -f "$ac_file" || continue
4388 case $ac_file in
4389 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4390 ;;
4391 [ab].out )
4392 # We found the default executable, but exeext='' is most
4393 # certainly right.
4394 break;;
4395 *.* )
4396 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4397 then :; else
4398 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4399 fi
4400 # We set ac_cv_exeext here because the later test for it is not
4401 # safe: cross compilers may not add the suffix if given an `-o'
4402 # argument, so we may need to know it at that point already.
4403 # Even if this section looks crufty: it has the advantage of
4404 # actually working.
4405 break;;
4406 * )
4407 break;;
4408 esac
4409 done
4410 test "$ac_cv_exeext" = no && ac_cv_exeext=
4411
4412 else
4413 ac_file=''
4414 fi
4415 if test -z "$ac_file"; then :
4416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4417 $as_echo "no" >&6; }
4418 $as_echo "$as_me: failed program was:" >&5
4419 sed 's/^/| /' conftest.$ac_ext >&5
4420
4421 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4422 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4423 as_fn_error 77 "C compiler cannot create executables
4424 See \`config.log' for more details" "$LINENO" 5; }
4425 else
4426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4427 $as_echo "yes" >&6; }
4428 fi
4429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4430 $as_echo_n "checking for C compiler default output file name... " >&6; }
4431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4432 $as_echo "$ac_file" >&6; }
4433 ac_exeext=$ac_cv_exeext
4434
4435 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4436 ac_clean_files=$ac_clean_files_save
4437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4438 $as_echo_n "checking for suffix of executables... " >&6; }
4439 if { { ac_try="$ac_link"
4440 case "(($ac_try" in
4441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4442 *) ac_try_echo=$ac_try;;
4443 esac
4444 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4445 $as_echo "$ac_try_echo"; } >&5
4446 (eval "$ac_link") 2>&5
4447 ac_status=$?
4448 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4449 test $ac_status = 0; }; then :
4450 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4451 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4452 # work properly (i.e., refer to `conftest.exe'), while it won't with
4453 # `rm'.
4454 for ac_file in conftest.exe conftest conftest.*; do
4455 test -f "$ac_file" || continue
4456 case $ac_file in
4457 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4458 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4459 break;;
4460 * ) break;;
4461 esac
4462 done
4463 else
4464 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4465 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4466 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4467 See \`config.log' for more details" "$LINENO" 5; }
4468 fi
4469 rm -f conftest conftest$ac_cv_exeext
4470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4471 $as_echo "$ac_cv_exeext" >&6; }
4472
4473 rm -f conftest.$ac_ext
4474 EXEEXT=$ac_cv_exeext
4475 ac_exeext=$EXEEXT
4476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4477 /* end confdefs.h. */
4478 #include <stdio.h>
4479 int
4480 main ()
4481 {
4482 FILE *f = fopen ("conftest.out", "w");
4483 return ferror (f) || fclose (f) != 0;
4484
4485 ;
4486 return 0;
4487 }
4488 _ACEOF
4489 ac_clean_files="$ac_clean_files conftest.out"
4490 # Check that the compiler produces executables we can run. If not, either
4491 # the compiler is broken, or we cross compile.
4492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4493 $as_echo_n "checking whether we are cross compiling... " >&6; }
4494 if test "$cross_compiling" != yes; then
4495 { { ac_try="$ac_link"
4496 case "(($ac_try" in
4497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4498 *) ac_try_echo=$ac_try;;
4499 esac
4500 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4501 $as_echo "$ac_try_echo"; } >&5
4502 (eval "$ac_link") 2>&5
4503 ac_status=$?
4504 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4505 test $ac_status = 0; }
4506 if { ac_try='./conftest$ac_cv_exeext'
4507 { { case "(($ac_try" in
4508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4509 *) ac_try_echo=$ac_try;;
4510 esac
4511 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4512 $as_echo "$ac_try_echo"; } >&5
4513 (eval "$ac_try") 2>&5
4514 ac_status=$?
4515 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4516 test $ac_status = 0; }; }; then
4517 cross_compiling=no
4518 else
4519 if test "$cross_compiling" = maybe; then
4520 cross_compiling=yes
4521 else
4522 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4523 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4524 as_fn_error $? "cannot run C compiled programs.
4525 If you meant to cross compile, use \`--host'.
4526 See \`config.log' for more details" "$LINENO" 5; }
4527 fi
4528 fi
4529 fi
4530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4531 $as_echo "$cross_compiling" >&6; }
4532
4533 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4534 ac_clean_files=$ac_clean_files_save
4535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4536 $as_echo_n "checking for suffix of object files... " >&6; }
4537 if ${ac_cv_objext+:} false; then :
4538 $as_echo_n "(cached) " >&6
4539 else
4540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4541 /* end confdefs.h. */
4542
4543 int
4544 main ()
4545 {
4546
4547 ;
4548 return 0;
4549 }
4550 _ACEOF
4551 rm -f conftest.o conftest.obj
4552 if { { ac_try="$ac_compile"
4553 case "(($ac_try" in
4554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4555 *) ac_try_echo=$ac_try;;
4556 esac
4557 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4558 $as_echo "$ac_try_echo"; } >&5
4559 (eval "$ac_compile") 2>&5
4560 ac_status=$?
4561 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4562 test $ac_status = 0; }; then :
4563 for ac_file in conftest.o conftest.obj conftest.*; do
4564 test -f "$ac_file" || continue;
4565 case $ac_file in
4566 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4567 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4568 break;;
4569 esac
4570 done
4571 else
4572 $as_echo "$as_me: failed program was:" >&5
4573 sed 's/^/| /' conftest.$ac_ext >&5
4574
4575 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4576 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4577 as_fn_error $? "cannot compute suffix of object files: cannot compile
4578 See \`config.log' for more details" "$LINENO" 5; }
4579 fi
4580 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4581 fi
4582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4583 $as_echo "$ac_cv_objext" >&6; }
4584 OBJEXT=$ac_cv_objext
4585 ac_objext=$OBJEXT
4586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4587 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4588 if ${ac_cv_c_compiler_gnu+:} false; then :
4589 $as_echo_n "(cached) " >&6
4590 else
4591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4592 /* end confdefs.h. */
4593
4594 int
4595 main ()
4596 {
4597 #ifndef __GNUC__
4598 choke me
4599 #endif
4600
4601 ;
4602 return 0;
4603 }
4604 _ACEOF
4605 if ac_fn_c_try_compile "$LINENO"; then :
4606 ac_compiler_gnu=yes
4607 else
4608 ac_compiler_gnu=no
4609 fi
4610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4611 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4612
4613 fi
4614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4615 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4616 if test $ac_compiler_gnu = yes; then
4617 GCC=yes
4618 else
4619 GCC=
4620 fi
4621 ac_test_CFLAGS=${CFLAGS+set}
4622 ac_save_CFLAGS=$CFLAGS
4623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4624 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4625 if ${ac_cv_prog_cc_g+:} false; then :
4626 $as_echo_n "(cached) " >&6
4627 else
4628 ac_save_c_werror_flag=$ac_c_werror_flag
4629 ac_c_werror_flag=yes
4630 ac_cv_prog_cc_g=no
4631 CFLAGS="-g"
4632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4633 /* end confdefs.h. */
4634
4635 int
4636 main ()
4637 {
4638
4639 ;
4640 return 0;
4641 }
4642 _ACEOF
4643 if ac_fn_c_try_compile "$LINENO"; then :
4644 ac_cv_prog_cc_g=yes
4645 else
4646 CFLAGS=""
4647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4648 /* end confdefs.h. */
4649
4650 int
4651 main ()
4652 {
4653
4654 ;
4655 return 0;
4656 }
4657 _ACEOF
4658 if ac_fn_c_try_compile "$LINENO"; then :
4659
4660 else
4661 ac_c_werror_flag=$ac_save_c_werror_flag
4662 CFLAGS="-g"
4663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4664 /* end confdefs.h. */
4665
4666 int
4667 main ()
4668 {
4669
4670 ;
4671 return 0;
4672 }
4673 _ACEOF
4674 if ac_fn_c_try_compile "$LINENO"; then :
4675 ac_cv_prog_cc_g=yes
4676 fi
4677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4678 fi
4679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4680 fi
4681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4682 ac_c_werror_flag=$ac_save_c_werror_flag
4683 fi
4684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4685 $as_echo "$ac_cv_prog_cc_g" >&6; }
4686 if test "$ac_test_CFLAGS" = set; then
4687 CFLAGS=$ac_save_CFLAGS
4688 elif test $ac_cv_prog_cc_g = yes; then
4689 if test "$GCC" = yes; then
4690 CFLAGS="-g -O2"
4691 else
4692 CFLAGS="-g"
4693 fi
4694 else
4695 if test "$GCC" = yes; then
4696 CFLAGS="-O2"
4697 else
4698 CFLAGS=
4699 fi
4700 fi
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4702 $as_echo_n "checking for $CC option to enable C11 features... " >&6; }
4703 if ${ac_cv_prog_cc_c11+:} false; then :
4704 $as_echo_n "(cached) " >&6
4705 else
4706 ac_cv_prog_cc_c11=no
4707 ac_save_CC=$CC
4708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4709 /* end confdefs.h. */
4710 #include <stdarg.h>
4711 #include <stdbool.h>
4712 #include <stddef.h>
4713 #include <stdlib.h>
4714 #include <wchar.h>
4715 #include <stdio.h>
4716
4717 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4718 #define debug(...) fprintf (stderr, __VA_ARGS__)
4719 #define showlist(...) puts (#__VA_ARGS__)
4720 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4721 static void
4722 test_varargs_macros (void)
4723 {
4724 int x = 1234;
4725 int y = 5678;
4726 debug ("Flag");
4727 debug ("X = %d\n", x);
4728 showlist (The first, second, and third items.);
4729 report (x>y, "x is %d but y is %d", x, y);
4730 }
4731
4732 // Check long long types.
4733 #define BIG64 18446744073709551615ull
4734 #define BIG32 4294967295ul
4735 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4736 #if !BIG_OK
4737 your preprocessor is broken;
4738 #endif
4739 #if BIG_OK
4740 #else
4741 your preprocessor is broken;
4742 #endif
4743 static long long int bignum = -9223372036854775807LL;
4744 static unsigned long long int ubignum = BIG64;
4745
4746 struct incomplete_array
4747 {
4748 int datasize;
4749 double data[];
4750 };
4751
4752 struct named_init {
4753 int number;
4754 const wchar_t *name;
4755 double average;
4756 };
4757
4758 typedef const char *ccp;
4759
4760 static inline int
4761 test_restrict (ccp restrict text)
4762 {
4763 // See if C++-style comments work.
4764 // Iterate through items via the restricted pointer.
4765 // Also check for declarations in for loops.
4766 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4767 continue;
4768 return 0;
4769 }
4770
4771 // Check varargs and va_copy.
4772 static bool
4773 test_varargs (const char *format, ...)
4774 {
4775 va_list args;
4776 va_start (args, format);
4777 va_list args_copy;
4778 va_copy (args_copy, args);
4779
4780 const char *str = "";
4781 int number = 0;
4782 float fnumber = 0;
4783
4784 while (*format)
4785 {
4786 switch (*format++)
4787 {
4788 case 's': // string
4789 str = va_arg (args_copy, const char *);
4790 break;
4791 case 'd': // int
4792 number = va_arg (args_copy, int);
4793 break;
4794 case 'f': // float
4795 fnumber = va_arg (args_copy, double);
4796 break;
4797 default:
4798 break;
4799 }
4800 }
4801 va_end (args_copy);
4802 va_end (args);
4803
4804 return *str && number && fnumber;
4805 }
4806 // Check _Alignas.
4807 char _Alignas (double) aligned_as_double;
4808 char _Alignas (0) no_special_alignment;
4809 extern char aligned_as_int;
4810 char _Alignas (0) _Alignas (int) aligned_as_int;
4811
4812 // Check _Alignof.
4813 enum
4814 {
4815 int_alignment = _Alignof (int),
4816 int_array_alignment = _Alignof (int[100]),
4817 char_alignment = _Alignof (char)
4818 };
4819 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4820
4821 // Check _Noreturn.
4822 int _Noreturn does_not_return (void) { for (;;) continue; }
4823
4824 // Check _Static_assert.
4825 struct test_static_assert
4826 {
4827 int x;
4828 _Static_assert (sizeof (int) <= sizeof (long int),
4829 "_Static_assert does not work in struct");
4830 long int y;
4831 };
4832
4833 // Check UTF-8 literals.
4834 #define u8 syntax error!
4835 char const utf8_literal[] = u8"happens to be ASCII" "another string";
4836
4837 // Check duplicate typedefs.
4838 typedef long *long_ptr;
4839 typedef long int *long_ptr;
4840 typedef long_ptr long_ptr;
4841
4842 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4843 struct anonymous
4844 {
4845 union {
4846 struct { int i; int j; };
4847 struct { int k; long int l; } w;
4848 };
4849 int m;
4850 } v1;
4851
4852 int
4853 main ()
4854 {
4855
4856 // Check bool.
4857 _Bool success = false;
4858
4859 // Check restrict.
4860 if (test_restrict ("String literal") == 0)
4861 success = true;
4862 char *restrict newvar = "Another string";
4863
4864 // Check varargs.
4865 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
4866 test_varargs_macros ();
4867
4868 // Check flexible array members.
4869 struct incomplete_array *ia =
4870 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4871 ia->datasize = 10;
4872 for (int i = 0; i < ia->datasize; ++i)
4873 ia->data[i] = i * 1.234;
4874
4875 // Check named initializers.
4876 struct named_init ni = {
4877 .number = 34,
4878 .name = L"Test wide string",
4879 .average = 543.34343,
4880 };
4881
4882 ni.number = 58;
4883
4884 int dynamic_array[ni.number];
4885 dynamic_array[ni.number - 1] = 543;
4886
4887 // work around unused variable warnings
4888 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4889 || dynamic_array[ni.number - 1] != 543);
4890
4891 v1.i = 2;
4892 v1.w.k = 5;
4893 _Static_assert ((offsetof (struct anonymous, i)
4894 == offsetof (struct anonymous, w.k)),
4895 "Anonymous union alignment botch");
4896
4897 ;
4898 return 0;
4899 }
4900 _ACEOF
4901 for ac_arg in '' -std=gnu11
4902 do
4903 CC="$ac_save_CC $ac_arg"
4904 if ac_fn_c_try_compile "$LINENO"; then :
4905 ac_cv_prog_cc_c11=$ac_arg
4906 fi
4907 rm -f core conftest.err conftest.$ac_objext
4908 test "x$ac_cv_prog_cc_c11" != "xno" && break
4909 done
4910 rm -f conftest.$ac_ext
4911 CC=$ac_save_CC
4912
4913 fi
4914 # AC_CACHE_VAL
4915 ac_prog_cc_stdc_options=
4916 case "x$ac_cv_prog_cc_c11" in
4917 x)
4918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4919 $as_echo "none needed" >&6; } ;;
4920 xno)
4921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4922 $as_echo "unsupported" >&6; } ;;
4923 *)
4924 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
4925 CC=$CC$ac_prog_cc_stdc_options
4926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4927 $as_echo "$ac_cv_prog_cc_c11" >&6; } ;;
4928 esac
4929 if test "x$ac_cv_prog_cc_c11" != xno; then :
4930 ac_prog_cc_stdc=c11
4931 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4932 else
4933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4934 $as_echo_n "checking for $CC option to enable C99 features... " >&6; }
4935 if ${ac_cv_prog_cc_c99+:} false; then :
4936 $as_echo_n "(cached) " >&6
4937 else
4938 ac_cv_prog_cc_c99=no
4939 ac_save_CC=$CC
4940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4941 /* end confdefs.h. */
4942 #include <stdarg.h>
4943 #include <stdbool.h>
4944 #include <stddef.h>
4945 #include <stdlib.h>
4946 #include <wchar.h>
4947 #include <stdio.h>
4948
4949 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4950 #define debug(...) fprintf (stderr, __VA_ARGS__)
4951 #define showlist(...) puts (#__VA_ARGS__)
4952 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4953 static void
4954 test_varargs_macros (void)
4955 {
4956 int x = 1234;
4957 int y = 5678;
4958 debug ("Flag");
4959 debug ("X = %d\n", x);
4960 showlist (The first, second, and third items.);
4961 report (x>y, "x is %d but y is %d", x, y);
4962 }
4963
4964 // Check long long types.
4965 #define BIG64 18446744073709551615ull
4966 #define BIG32 4294967295ul
4967 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4968 #if !BIG_OK
4969 your preprocessor is broken;
4970 #endif
4971 #if BIG_OK
4972 #else
4973 your preprocessor is broken;
4974 #endif
4975 static long long int bignum = -9223372036854775807LL;
4976 static unsigned long long int ubignum = BIG64;
4977
4978 struct incomplete_array
4979 {
4980 int datasize;
4981 double data[];
4982 };
4983
4984 struct named_init {
4985 int number;
4986 const wchar_t *name;
4987 double average;
4988 };
4989
4990 typedef const char *ccp;
4991
4992 static inline int
4993 test_restrict (ccp restrict text)
4994 {
4995 // See if C++-style comments work.
4996 // Iterate through items via the restricted pointer.
4997 // Also check for declarations in for loops.
4998 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4999 continue;
5000 return 0;
5001 }
5002
5003 // Check varargs and va_copy.
5004 static bool
5005 test_varargs (const char *format, ...)
5006 {
5007 va_list args;
5008 va_start (args, format);
5009 va_list args_copy;
5010 va_copy (args_copy, args);
5011
5012 const char *str = "";
5013 int number = 0;
5014 float fnumber = 0;
5015
5016 while (*format)
5017 {
5018 switch (*format++)
5019 {
5020 case 's': // string
5021 str = va_arg (args_copy, const char *);
5022 break;
5023 case 'd': // int
5024 number = va_arg (args_copy, int);
5025 break;
5026 case 'f': // float
5027 fnumber = va_arg (args_copy, double);
5028 break;
5029 default:
5030 break;
5031 }
5032 }
5033 va_end (args_copy);
5034 va_end (args);
5035
5036 return *str && number && fnumber;
5037 }
5038 int
5039 main ()
5040 {
5041
5042 // Check bool.
5043 _Bool success = false;
5044
5045 // Check restrict.
5046 if (test_restrict ("String literal") == 0)
5047 success = true;
5048 char *restrict newvar = "Another string";
5049
5050 // Check varargs.
5051 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5052 test_varargs_macros ();
5053
5054 // Check flexible array members.
5055 struct incomplete_array *ia =
5056 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5057 ia->datasize = 10;
5058 for (int i = 0; i < ia->datasize; ++i)
5059 ia->data[i] = i * 1.234;
5060
5061 // Check named initializers.
5062 struct named_init ni = {
5063 .number = 34,
5064 .name = L"Test wide string",
5065 .average = 543.34343,
5066 };
5067
5068 ni.number = 58;
5069
5070 int dynamic_array[ni.number];
5071 dynamic_array[ni.number - 1] = 543;
5072
5073 // work around unused variable warnings
5074 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5075 || dynamic_array[ni.number - 1] != 543);
5076
5077 ;
5078 return 0;
5079 }
5080 _ACEOF
5081 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5082 do
5083 CC="$ac_save_CC $ac_arg"
5084 if ac_fn_c_try_compile "$LINENO"; then :
5085 ac_cv_prog_cc_c99=$ac_arg
5086 fi
5087 rm -f core conftest.err conftest.$ac_objext
5088 test "x$ac_cv_prog_cc_c99" != "xno" && break
5089 done
5090 rm -f conftest.$ac_ext
5091 CC=$ac_save_CC
5092
5093 fi
5094 # AC_CACHE_VAL
5095 ac_prog_cc_stdc_options=
5096 case "x$ac_cv_prog_cc_c99" in
5097 x)
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5099 $as_echo "none needed" >&6; } ;;
5100 xno)
5101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5102 $as_echo "unsupported" >&6; } ;;
5103 *)
5104 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5105 CC=$CC$ac_prog_cc_stdc_options
5106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5107 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5108 esac
5109 if test "x$ac_cv_prog_cc_c99" != xno; then :
5110 ac_prog_cc_stdc=c99
5111 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5112 else
5113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5114 $as_echo_n "checking for $CC option to enable C89 features... " >&6; }
5115 if ${ac_cv_prog_cc_c89+:} false; then :
5116 $as_echo_n "(cached) " >&6
5117 else
5118 ac_cv_prog_cc_c89=no
5119 ac_save_CC=$CC
5120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5121 /* end confdefs.h. */
5122 #include <stdarg.h>
5123 #include <stdio.h>
5124 struct stat;
5125 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5126 struct buf { int x; };
5127 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5128 static char *e (p, i)
5129 char **p;
5130 int i;
5131 {
5132 return p[i];
5133 }
5134 static char *f (char * (*g) (char **, int), char **p, ...)
5135 {
5136 char *s;
5137 va_list v;
5138 va_start (v,p);
5139 s = g (p, va_arg (v,int));
5140 va_end (v);
5141 return s;
5142 }
5143
5144 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5145 function prototypes and stuff, but not '\xHH' hex character constants.
5146 These don't provoke an error unfortunately, instead are silently treated
5147 as 'x'. The following induces an error, until -std is added to get
5148 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5149 array size at least. It's necessary to write '\x00'==0 to get something
5150 that's true only with -std. */
5151 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5152
5153 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5154 inside strings and character constants. */
5155 #define FOO(x) 'x'
5156 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5157
5158 int test (int i, double x);
5159 struct s1 {int (*f) (int a);};
5160 struct s2 {int (*f) (double a);};
5161 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5162 int argc;
5163 char **argv;
5164 int
5165 main ()
5166 {
5167 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5168 ;
5169 return 0;
5170 }
5171 _ACEOF
5172 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5173 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5174 do
5175 CC="$ac_save_CC $ac_arg"
5176 if ac_fn_c_try_compile "$LINENO"; then :
5177 ac_cv_prog_cc_c89=$ac_arg
5178 fi
5179 rm -f core conftest.err conftest.$ac_objext
5180 test "x$ac_cv_prog_cc_c89" != "xno" && break
5181 done
5182 rm -f conftest.$ac_ext
5183 CC=$ac_save_CC
5184
5185 fi
5186 # AC_CACHE_VAL
5187 ac_prog_cc_stdc_options=
5188 case "x$ac_cv_prog_cc_c89" in
5189 x)
5190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5191 $as_echo "none needed" >&6; } ;;
5192 xno)
5193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5194 $as_echo "unsupported" >&6; } ;;
5195 *)
5196 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5197 CC=$CC$ac_prog_cc_stdc_options
5198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5199 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5200 esac
5201 if test "x$ac_cv_prog_cc_c89" != xno; then :
5202 ac_prog_cc_stdc=c89
5203 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5204 else
5205 ac_prog_cc_stdc=no
5206 ac_cv_prog_cc_stdc=no
5207 fi
5208
5209 fi
5210
5211 fi
5212
5213 ac_ext=c
5214 ac_cpp='$CPP $CPPFLAGS'
5215 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5216 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5217 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5218
5219
5220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
5221 $as_echo_n "checking whether the compiler is clang... " >&6; }
5222 if ${gl_cv_compiler_clang+:} false; then :
5223 $as_echo_n "(cached) " >&6
5224 else
5225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5226 /* end confdefs.h. */
5227
5228 #ifdef __clang__
5229 barfbarf
5230 #endif
5231
5232 int
5233 main ()
5234 {
5235
5236 ;
5237 return 0;
5238 }
5239
5240 _ACEOF
5241 if ac_fn_c_try_compile "$LINENO"; then :
5242 gl_cv_compiler_clang=no
5243 else
5244 gl_cv_compiler_clang=yes
5245 fi
5246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5247
5248 fi
5249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
5250 $as_echo "$gl_cv_compiler_clang" >&6; }
5251
5252
5253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
5254 $as_echo_n "checking for compiler option needed when checking for declarations... " >&6; }
5255 if ${gl_cv_compiler_check_decl_option+:} false; then :
5256 $as_echo_n "(cached) " >&6
5257 else
5258 if test $gl_cv_compiler_clang = yes; then
5259 save_ac_compile="$ac_compile"
5260 ac_compile="$ac_compile -Werror=implicit-function-declaration"
5261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5262 /* end confdefs.h. */
5263
5264 int
5265 main ()
5266 {
5267
5268 ;
5269 return 0;
5270 }
5271 _ACEOF
5272 if ac_fn_c_try_compile "$LINENO"; then :
5273 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
5274 else
5275 gl_cv_compiler_check_decl_option=none
5276 fi
5277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5278 ac_compile="$save_ac_compile"
5279 else
5280 gl_cv_compiler_check_decl_option=none
5281 fi
5282
5283 fi
5284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
5285 $as_echo "$gl_cv_compiler_check_decl_option" >&6; }
5286 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
5287 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
5288 else
5289 ac_compile_for_check_decl="$ac_compile"
5290 fi
5291
5292
5293
5294
5295 ac_ext=c
5296 ac_cpp='$CPP $CPPFLAGS'
5297 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5298 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5299 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5301 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5302 # On Suns, sometimes $CPP names a directory.
5303 if test -n "$CPP" && test -d "$CPP"; then
5304 CPP=
5305 fi
5306 if test -z "$CPP"; then
5307 if ${ac_cv_prog_CPP+:} false; then :
5308 $as_echo_n "(cached) " >&6
5309 else
5310 # Double quotes because CPP needs to be expanded
5311 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5312 do
5313 ac_preproc_ok=false
5314 for ac_c_preproc_warn_flag in '' yes
5315 do
5316 # Use a header file that comes with gcc, so configuring glibc
5317 # with a fresh cross-compiler works.
5318 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5319 # <limits.h> exists even on freestanding compilers.
5320 # On the NeXT, cc -E runs the code through the compiler's parser,
5321 # not just through cpp. "Syntax error" is here to catch this case.
5322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5323 /* end confdefs.h. */
5324 #ifdef __STDC__
5325 # include <limits.h>
5326 #else
5327 # include <assert.h>
5328 #endif
5329 Syntax error
5330 _ACEOF
5331 if ac_fn_c_try_cpp "$LINENO"; then :
5332
5333 else
5334 # Broken: fails on valid input.
5335 continue
5336 fi
5337 rm -f conftest.err conftest.i conftest.$ac_ext
5338
5339 # OK, works on sane cases. Now check whether nonexistent headers
5340 # can be detected and how.
5341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5342 /* end confdefs.h. */
5343 #include <ac_nonexistent.h>
5344 _ACEOF
5345 if ac_fn_c_try_cpp "$LINENO"; then :
5346 # Broken: success on invalid input.
5347 continue
5348 else
5349 # Passes both tests.
5350 ac_preproc_ok=:
5351 break
5352 fi
5353 rm -f conftest.err conftest.i conftest.$ac_ext
5354
5355 done
5356 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5357 rm -f conftest.i conftest.err conftest.$ac_ext
5358 if $ac_preproc_ok; then :
5359 break
5360 fi
5361
5362 done
5363 ac_cv_prog_CPP=$CPP
5364
5365 fi
5366 CPP=$ac_cv_prog_CPP
5367 else
5368 ac_cv_prog_CPP=$CPP
5369 fi
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5371 $as_echo "$CPP" >&6; }
5372 ac_preproc_ok=false
5373 for ac_c_preproc_warn_flag in '' yes
5374 do
5375 # Use a header file that comes with gcc, so configuring glibc
5376 # with a fresh cross-compiler works.
5377 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5378 # <limits.h> exists even on freestanding compilers.
5379 # On the NeXT, cc -E runs the code through the compiler's parser,
5380 # not just through cpp. "Syntax error" is here to catch this case.
5381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5382 /* end confdefs.h. */
5383 #ifdef __STDC__
5384 # include <limits.h>
5385 #else
5386 # include <assert.h>
5387 #endif
5388 Syntax error
5389 _ACEOF
5390 if ac_fn_c_try_cpp "$LINENO"; then :
5391
5392 else
5393 # Broken: fails on valid input.
5394 continue
5395 fi
5396 rm -f conftest.err conftest.i conftest.$ac_ext
5397
5398 # OK, works on sane cases. Now check whether nonexistent headers
5399 # can be detected and how.
5400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5401 /* end confdefs.h. */
5402 #include <ac_nonexistent.h>
5403 _ACEOF
5404 if ac_fn_c_try_cpp "$LINENO"; then :
5405 # Broken: success on invalid input.
5406 continue
5407 else
5408 # Passes both tests.
5409 ac_preproc_ok=:
5410 break
5411 fi
5412 rm -f conftest.err conftest.i conftest.$ac_ext
5413
5414 done
5415 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5416 rm -f conftest.i conftest.err conftest.$ac_ext
5417 if $ac_preproc_ok; then :
5418
5419 else
5420 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5421 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5422 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5423 See \`config.log' for more details" "$LINENO" 5; }
5424 fi
5425
5426 ac_ext=c
5427 ac_cpp='$CPP $CPPFLAGS'
5428 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5429 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5430 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5431
5432
5433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5434 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5435 if ${ac_cv_path_GREP+:} false; then :
5436 $as_echo_n "(cached) " >&6
5437 else
5438 if test -z "$GREP"; then
5439 ac_path_GREP_found=false
5440 # Loop through the user's path and test for each of PROGNAME-LIST
5441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5442 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5443 do
5444 IFS=$as_save_IFS
5445 test -z "$as_dir" && as_dir=.
5446 for ac_prog in grep ggrep; do
5447 for ac_exec_ext in '' $ac_executable_extensions; do
5448 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5449 as_fn_executable_p "$ac_path_GREP" || continue
5450 # Check for GNU ac_path_GREP and select it if it is found.
5451 # Check for GNU $ac_path_GREP
5452 case `"$ac_path_GREP" --version 2>&1` in
5453 *GNU*)
5454 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5455 *)
5456 ac_count=0
5457 $as_echo_n 0123456789 >"conftest.in"
5458 while :
5459 do
5460 cat "conftest.in" "conftest.in" >"conftest.tmp"
5461 mv "conftest.tmp" "conftest.in"
5462 cp "conftest.in" "conftest.nl"
5463 $as_echo 'GREP' >> "conftest.nl"
5464 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5465 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5466 as_fn_arith $ac_count + 1 && ac_count=$as_val
5467 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5468 # Best one so far, save it but keep looking for a better one
5469 ac_cv_path_GREP="$ac_path_GREP"
5470 ac_path_GREP_max=$ac_count
5471 fi
5472 # 10*(2^10) chars as input seems more than enough
5473 test $ac_count -gt 10 && break
5474 done
5475 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5476 esac
5477
5478 $ac_path_GREP_found && break 3
5479 done
5480 done
5481 done
5482 IFS=$as_save_IFS
5483 if test -z "$ac_cv_path_GREP"; then
5484 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5485 fi
5486 else
5487 ac_cv_path_GREP=$GREP
5488 fi
5489
5490 fi
5491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5492 $as_echo "$ac_cv_path_GREP" >&6; }
5493 GREP="$ac_cv_path_GREP"
5494
5495
5496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5497 $as_echo_n "checking for egrep... " >&6; }
5498 if ${ac_cv_path_EGREP+:} false; then :
5499 $as_echo_n "(cached) " >&6
5500 else
5501 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5502 then ac_cv_path_EGREP="$GREP -E"
5503 else
5504 if test -z "$EGREP"; then
5505 ac_path_EGREP_found=false
5506 # Loop through the user's path and test for each of PROGNAME-LIST
5507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5508 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5509 do
5510 IFS=$as_save_IFS
5511 test -z "$as_dir" && as_dir=.
5512 for ac_prog in egrep; do
5513 for ac_exec_ext in '' $ac_executable_extensions; do
5514 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5515 as_fn_executable_p "$ac_path_EGREP" || continue
5516 # Check for GNU ac_path_EGREP and select it if it is found.
5517 # Check for GNU $ac_path_EGREP
5518 case `"$ac_path_EGREP" --version 2>&1` in
5519 *GNU*)
5520 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5521 *)
5522 ac_count=0
5523 $as_echo_n 0123456789 >"conftest.in"
5524 while :
5525 do
5526 cat "conftest.in" "conftest.in" >"conftest.tmp"
5527 mv "conftest.tmp" "conftest.in"
5528 cp "conftest.in" "conftest.nl"
5529 $as_echo 'EGREP' >> "conftest.nl"
5530 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5531 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5532 as_fn_arith $ac_count + 1 && ac_count=$as_val
5533 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5534 # Best one so far, save it but keep looking for a better one
5535 ac_cv_path_EGREP="$ac_path_EGREP"
5536 ac_path_EGREP_max=$ac_count
5537 fi
5538 # 10*(2^10) chars as input seems more than enough
5539 test $ac_count -gt 10 && break
5540 done
5541 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5542 esac
5543
5544 $ac_path_EGREP_found && break 3
5545 done
5546 done
5547 done
5548 IFS=$as_save_IFS
5549 if test -z "$ac_cv_path_EGREP"; then
5550 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5551 fi
5552 else
5553 ac_cv_path_EGREP=$EGREP
5554 fi
5555
5556 fi
5557 fi
5558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5559 $as_echo "$ac_cv_path_EGREP" >&6; }
5560 EGREP="$ac_cv_path_EGREP"
5561
5562
5563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5564 $as_echo_n "checking for ANSI C header files... " >&6; }
5565 if ${ac_cv_header_stdc+:} false; then :
5566 $as_echo_n "(cached) " >&6
5567 else
5568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5569 /* end confdefs.h. */
5570 #include <stdlib.h>
5571 #include <stdarg.h>
5572 #include <string.h>
5573 #include <float.h>
5574
5575 int
5576 main ()
5577 {
5578
5579 ;
5580 return 0;
5581 }
5582 _ACEOF
5583 if ac_fn_c_try_compile "$LINENO"; then :
5584 ac_cv_header_stdc=yes
5585 else
5586 ac_cv_header_stdc=no
5587 fi
5588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5589
5590 if test $ac_cv_header_stdc = yes; then
5591 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5593 /* end confdefs.h. */
5594 #include <string.h>
5595
5596 _ACEOF
5597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5598 $EGREP "memchr" >/dev/null 2>&1; then :
5599
5600 else
5601 ac_cv_header_stdc=no
5602 fi
5603 rm -f conftest*
5604
5605 fi
5606
5607 if test $ac_cv_header_stdc = yes; then
5608 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5610 /* end confdefs.h. */
5611 #include <stdlib.h>
5612
5613 _ACEOF
5614 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5615 $EGREP "free" >/dev/null 2>&1; then :
5616
5617 else
5618 ac_cv_header_stdc=no
5619 fi
5620 rm -f conftest*
5621
5622 fi
5623
5624 if test $ac_cv_header_stdc = yes; then
5625 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5626 if test "$cross_compiling" = yes; then :
5627 :
5628 else
5629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5630 /* end confdefs.h. */
5631 #include <ctype.h>
5632 #include <stdlib.h>
5633 #if ((' ' & 0x0FF) == 0x020)
5634 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5635 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5636 #else
5637 # define ISLOWER(c) \
5638 (('a' <= (c) && (c) <= 'i') \
5639 || ('j' <= (c) && (c) <= 'r') \
5640 || ('s' <= (c) && (c) <= 'z'))
5641 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5642 #endif
5643
5644 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5645 int
5646 main ()
5647 {
5648 int i;
5649 for (i = 0; i < 256; i++)
5650 if (XOR (islower (i), ISLOWER (i))
5651 || toupper (i) != TOUPPER (i))
5652 return 2;
5653 return 0;
5654 }
5655 _ACEOF
5656 if ac_fn_c_try_run "$LINENO"; then :
5657
5658 else
5659 ac_cv_header_stdc=no
5660 fi
5661 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5662 conftest.$ac_objext conftest.beam conftest.$ac_ext
5663 fi
5664
5665 fi
5666 fi
5667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5668 $as_echo "$ac_cv_header_stdc" >&6; }
5669 if test $ac_cv_header_stdc = yes; then
5670
5671 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5672
5673 fi
5674
5675 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5676 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5677 inttypes.h stdint.h unistd.h
5678 do :
5679 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5680 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5681 "
5682 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5683 cat >>confdefs.h <<_ACEOF
5684 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5685 _ACEOF
5686
5687 fi
5688
5689 done
5690
5691
5692
5693
5694
5695 for ac_header in $ac_header_list
5696 do :
5697 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5698 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5699 "
5700 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5701 cat >>confdefs.h <<_ACEOF
5702 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5703 _ACEOF
5704
5705 fi
5706
5707 done
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5718 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5719 if ${ac_cv_safe_to_define___extensions__+:} false; then :
5720 $as_echo_n "(cached) " >&6
5721 else
5722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5723 /* end confdefs.h. */
5724
5725 # define __EXTENSIONS__ 1
5726 $ac_includes_default
5727 int
5728 main ()
5729 {
5730
5731 ;
5732 return 0;
5733 }
5734 _ACEOF
5735 if ac_fn_c_try_compile "$LINENO"; then :
5736 ac_cv_safe_to_define___extensions__=yes
5737 else
5738 ac_cv_safe_to_define___extensions__=no
5739 fi
5740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5741 fi
5742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5743 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5744
5745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5746 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5747 if ${ac_cv_should_define__xopen_source+:} false; then :
5748 $as_echo_n "(cached) " >&6
5749 else
5750 ac_cv_should_define__xopen_source=no
5751 if test $ac_cv_header_wchar_h = yes; then :
5752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5753 /* end confdefs.h. */
5754
5755 #include <wchar.h>
5756 mbstate_t x;
5757 int
5758 main ()
5759 {
5760
5761 ;
5762 return 0;
5763 }
5764 _ACEOF
5765 if ac_fn_c_try_compile "$LINENO"; then :
5766
5767 else
5768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5769 /* end confdefs.h. */
5770
5771 #define _XOPEN_SOURCE 500
5772 #include <wchar.h>
5773 mbstate_t x;
5774 int
5775 main ()
5776 {
5777
5778 ;
5779 return 0;
5780 }
5781 _ACEOF
5782 if ac_fn_c_try_compile "$LINENO"; then :
5783 ac_cv_should_define__xopen_source=yes
5784 fi
5785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5786 fi
5787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5788 fi
5789 fi
5790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5791 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
5792
5793 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5794
5795 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5796
5797 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5798
5799 $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
5800
5801 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
5802
5803 $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
5804
5805 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5806
5807 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5808
5809 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5810
5811 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5812
5813 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5814
5815 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5816
5817 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5818
5819 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5820
5821 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5822
5823 if test $ac_cv_header_minix_config_h = yes; then :
5824 MINIX=yes
5825 $as_echo "#define _MINIX 1" >>confdefs.h
5826
5827 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5828
5829 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5830
5831 else
5832 MINIX=
5833 fi
5834 if test $ac_cv_safe_to_define___extensions__ = yes; then :
5835 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5836
5837 fi
5838 if test $ac_cv_should_define__xopen_source = yes; then :
5839 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5840
5841 fi
5842
5843 # Needs to run before gl_EARLY so it can override AC_SYS_LARGEFILE included
5844 # there.
5845 ac_aux_dir=
5846 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
5847 if test -f "$ac_dir/install-sh"; then
5848 ac_aux_dir=$ac_dir
5849 ac_install_sh="$ac_aux_dir/install-sh -c"
5850 break
5851 elif test -f "$ac_dir/install.sh"; then
5852 ac_aux_dir=$ac_dir
5853 ac_install_sh="$ac_aux_dir/install.sh -c"
5854 break
5855 elif test -f "$ac_dir/shtool"; then
5856 ac_aux_dir=$ac_dir
5857 ac_install_sh="$ac_aux_dir/shtool install -c"
5858 break
5859 fi
5860 done
5861 if test -z "$ac_aux_dir"; then
5862 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5863 fi
5864
5865 # These three variables are undocumented and unsupported,
5866 # and are intended to be withdrawn in a future Autoconf release.
5867 # They can cause serious problems if a builder's source tree is in a directory
5868 # whose full name contains unusual characters.
5869 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5870 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5871 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5872
5873
5874 # Make sure we can run config.sub.
5875 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5876 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5877
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5879 $as_echo_n "checking build system type... " >&6; }
5880 if ${ac_cv_build+:} false; then :
5881 $as_echo_n "(cached) " >&6
5882 else
5883 ac_build_alias=$build_alias
5884 test "x$ac_build_alias" = x &&
5885 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5886 test "x$ac_build_alias" = x &&
5887 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5888 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5889 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5890
5891 fi
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5893 $as_echo "$ac_cv_build" >&6; }
5894 case $ac_cv_build in
5895 *-*-*) ;;
5896 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5897 esac
5898 build=$ac_cv_build
5899 ac_save_IFS=$IFS; IFS='-'
5900 set x $ac_cv_build
5901 shift
5902 build_cpu=$1
5903 build_vendor=$2
5904 shift; shift
5905 # Remember, the first character of IFS is used to create $*,
5906 # except with old shells:
5907 build_os=$*
5908 IFS=$ac_save_IFS
5909 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5910
5911
5912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5913 $as_echo_n "checking host system type... " >&6; }
5914 if ${ac_cv_host+:} false; then :
5915 $as_echo_n "(cached) " >&6
5916 else
5917 if test "x$host_alias" = x; then
5918 ac_cv_host=$ac_cv_build
5919 else
5920 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5921 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5922 fi
5923
5924 fi
5925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5926 $as_echo "$ac_cv_host" >&6; }
5927 case $ac_cv_host in
5928 *-*-*) ;;
5929 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5930 esac
5931 host=$ac_cv_host
5932 ac_save_IFS=$IFS; IFS='-'
5933 set x $ac_cv_host
5934 shift
5935 host_cpu=$1
5936 host_vendor=$2
5937 shift; shift
5938 # Remember, the first character of IFS is used to create $*,
5939 # except with old shells:
5940 host_os=$*
5941 IFS=$ac_save_IFS
5942 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5943
5944
5945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
5946 $as_echo_n "checking target system type... " >&6; }
5947 if ${ac_cv_target+:} false; then :
5948 $as_echo_n "(cached) " >&6
5949 else
5950 if test "x$target_alias" = x; then
5951 ac_cv_target=$ac_cv_host
5952 else
5953 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
5954 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
5955 fi
5956
5957 fi
5958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
5959 $as_echo "$ac_cv_target" >&6; }
5960 case $ac_cv_target in
5961 *-*-*) ;;
5962 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
5963 esac
5964 target=$ac_cv_target
5965 ac_save_IFS=$IFS; IFS='-'
5966 set x $ac_cv_target
5967 shift
5968 target_cpu=$1
5969 target_vendor=$2
5970 shift; shift
5971 # Remember, the first character of IFS is used to create $*,
5972 # except with old shells:
5973 target_os=$*
5974 IFS=$ac_save_IFS
5975 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
5976
5977
5978 # The aliases save the names the user supplied, while $host etc.
5979 # will get canonicalized.
5980 test -n "$target_alias" &&
5981 test "$program_prefix$program_suffix$program_transform_name" = \
5982 NONENONEs,x,x, &&
5983 program_prefix=${target_alias}-
5984
5985 # The tests for host and target for $enable_largefile require
5986 # canonical names.
5987
5988
5989
5990 # As the $enable_largefile decision depends on --enable-plugins we must set it
5991 # even in directories otherwise not depending on the $plugins option.
5992
5993
5994 maybe_plugins=no
5995 for ac_header in dlfcn.h
5996 do :
5997 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
5998 "
5999 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
6000 cat >>confdefs.h <<_ACEOF
6001 #define HAVE_DLFCN_H 1
6002 _ACEOF
6003 maybe_plugins=yes
6004 fi
6005
6006 done
6007
6008 for ac_header in windows.h
6009 do :
6010 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
6011 "
6012 if test "x$ac_cv_header_windows_h" = xyes; then :
6013 cat >>confdefs.h <<_ACEOF
6014 #define HAVE_WINDOWS_H 1
6015 _ACEOF
6016 maybe_plugins=yes
6017 fi
6018
6019 done
6020
6021
6022 # Check whether --enable-plugins was given.
6023 if test "${enable_plugins+set}" = set; then :
6024 enableval=$enable_plugins; case "${enableval}" in
6025 no) plugins=no ;;
6026 *) plugins=yes
6027 if test "$maybe_plugins" != "yes" ; then
6028 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
6029 fi ;;
6030 esac
6031 else
6032 plugins=$maybe_plugins
6033
6034 fi
6035
6036 if test "$plugins" = "yes"; then
6037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
6038 $as_echo_n "checking for library containing dlsym... " >&6; }
6039 if ${ac_cv_search_dlsym+:} false; then :
6040 $as_echo_n "(cached) " >&6
6041 else
6042 ac_func_search_save_LIBS=$LIBS
6043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6044 /* end confdefs.h. */
6045
6046 /* Override any GCC internal prototype to avoid an error.
6047 Use char because int might match the return type of a GCC
6048 builtin and then its argument prototype would still apply. */
6049 #ifdef __cplusplus
6050 extern "C"
6051 #endif
6052 char dlsym ();
6053 int
6054 main ()
6055 {
6056 return dlsym ();
6057 ;
6058 return 0;
6059 }
6060 _ACEOF
6061 for ac_lib in '' dl; do
6062 if test -z "$ac_lib"; then
6063 ac_res="none required"
6064 else
6065 ac_res=-l$ac_lib
6066 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6067 fi
6068 if ac_fn_c_try_link "$LINENO"; then :
6069 ac_cv_search_dlsym=$ac_res
6070 fi
6071 rm -f core conftest.err conftest.$ac_objext \
6072 conftest$ac_exeext
6073 if ${ac_cv_search_dlsym+:} false; then :
6074 break
6075 fi
6076 done
6077 if ${ac_cv_search_dlsym+:} false; then :
6078
6079 else
6080 ac_cv_search_dlsym=no
6081 fi
6082 rm conftest.$ac_ext
6083 LIBS=$ac_func_search_save_LIBS
6084 fi
6085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
6086 $as_echo "$ac_cv_search_dlsym" >&6; }
6087 ac_res=$ac_cv_search_dlsym
6088 if test "$ac_res" != no; then :
6089 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6090
6091 fi
6092
6093 fi
6094
6095
6096 case "${host}" in
6097 sparc-*-solaris*|i?86-*-solaris*)
6098 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
6099 # were mutually exclusive until Solaris 11.3. Without procfs support,
6100 # the bfd/ elf module cannot provide certain routines such as
6101 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
6102 # explicitly requested large-file support through the
6103 # --enable-largefile switch, disable large-file support in favor of
6104 # procfs support.
6105 #
6106 # Check if <sys/procfs.h> is incompatible with large-file support.
6107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6108 /* end confdefs.h. */
6109 #define _FILE_OFFSET_BITS 64
6110 #define _STRUCTURED_PROC 1
6111 #include <sys/procfs.h>
6112 int
6113 main ()
6114 {
6115
6116 ;
6117 return 0;
6118 }
6119 _ACEOF
6120 if ac_fn_c_try_compile "$LINENO"; then :
6121 acx_cv_procfs_lfs=yes
6122 else
6123 acx_cv_procfs_lfs=no
6124 fi
6125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6126 #
6127 # Forcefully disable large-file support only if necessary, gdb is in
6128 # tree and enabled.
6129 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
6130 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
6131 : ${enable_largefile="no"}
6132 if test "$plugins" = yes; then
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
6134 plugin support disabled; require large-file support which is incompatible with GDB." >&5
6135 $as_echo "$as_me: WARNING:
6136 plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
6137 plugins=no
6138 fi
6139 fi
6140 #
6141 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
6142 # benefit of g++ 9+ which predefines it on Solaris.
6143 if test "$enable_largefile" = no; then
6144 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
6145
6146 fi
6147 ;;
6148 esac
6149
6150 # Check whether --enable-largefile was given.
6151 if test "${enable_largefile+set}" = set; then :
6152 enableval=$enable_largefile;
6153 fi
6154
6155 if test "$enable_largefile" != no; then
6156
6157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6158 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6159 if ${ac_cv_sys_largefile_CC+:} false; then :
6160 $as_echo_n "(cached) " >&6
6161 else
6162 ac_cv_sys_largefile_CC=no
6163 if test "$GCC" != yes; then
6164 ac_save_CC=$CC
6165 while :; do
6166 # IRIX 6.2 and later do not support large files by default,
6167 # so use the C compiler's -n32 option if that helps.
6168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6169 /* end confdefs.h. */
6170 #include <sys/types.h>
6171 /* Check that off_t can represent 2**63 - 1 correctly.
6172 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6173 since some C++ compilers masquerading as C compilers
6174 incorrectly reject 9223372036854775807. */
6175 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6176 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6177 && LARGE_OFF_T % 2147483647 == 1)
6178 ? 1 : -1];
6179 int
6180 main ()
6181 {
6182
6183 ;
6184 return 0;
6185 }
6186 _ACEOF
6187 if ac_fn_c_try_compile "$LINENO"; then :
6188 break
6189 fi
6190 rm -f core conftest.err conftest.$ac_objext
6191 CC="$CC -n32"
6192 if ac_fn_c_try_compile "$LINENO"; then :
6193 ac_cv_sys_largefile_CC=' -n32'; break
6194 fi
6195 rm -f core conftest.err conftest.$ac_objext
6196 break
6197 done
6198 CC=$ac_save_CC
6199 rm -f conftest.$ac_ext
6200 fi
6201 fi
6202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6203 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6204 if test "$ac_cv_sys_largefile_CC" != no; then
6205 CC=$CC$ac_cv_sys_largefile_CC
6206 fi
6207
6208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6209 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6210 if ${ac_cv_sys_file_offset_bits+:} false; then :
6211 $as_echo_n "(cached) " >&6
6212 else
6213 while :; do
6214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6215 /* end confdefs.h. */
6216 #include <sys/types.h>
6217 /* Check that off_t can represent 2**63 - 1 correctly.
6218 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6219 since some C++ compilers masquerading as C compilers
6220 incorrectly reject 9223372036854775807. */
6221 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6222 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6223 && LARGE_OFF_T % 2147483647 == 1)
6224 ? 1 : -1];
6225 int
6226 main ()
6227 {
6228
6229 ;
6230 return 0;
6231 }
6232 _ACEOF
6233 if ac_fn_c_try_compile "$LINENO"; then :
6234 ac_cv_sys_file_offset_bits=no; break
6235 fi
6236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6238 /* end confdefs.h. */
6239 #define _FILE_OFFSET_BITS 64
6240 #include <sys/types.h>
6241 /* Check that off_t can represent 2**63 - 1 correctly.
6242 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6243 since some C++ compilers masquerading as C compilers
6244 incorrectly reject 9223372036854775807. */
6245 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6246 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6247 && LARGE_OFF_T % 2147483647 == 1)
6248 ? 1 : -1];
6249 int
6250 main ()
6251 {
6252
6253 ;
6254 return 0;
6255 }
6256 _ACEOF
6257 if ac_fn_c_try_compile "$LINENO"; then :
6258 ac_cv_sys_file_offset_bits=64; break
6259 fi
6260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6261 ac_cv_sys_file_offset_bits=unknown
6262 break
6263 done
6264 fi
6265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6266 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6267 case $ac_cv_sys_file_offset_bits in #(
6268 no | unknown) ;;
6269 *)
6270 cat >>confdefs.h <<_ACEOF
6271 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6272 _ACEOF
6273 ;;
6274 esac
6275 rm -rf conftest*
6276 if test $ac_cv_sys_file_offset_bits = unknown; then
6277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6278 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6279 if ${ac_cv_sys_large_files+:} false; then :
6280 $as_echo_n "(cached) " >&6
6281 else
6282 while :; do
6283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6284 /* end confdefs.h. */
6285 #include <sys/types.h>
6286 /* Check that off_t can represent 2**63 - 1 correctly.
6287 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6288 since some C++ compilers masquerading as C compilers
6289 incorrectly reject 9223372036854775807. */
6290 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6291 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6292 && LARGE_OFF_T % 2147483647 == 1)
6293 ? 1 : -1];
6294 int
6295 main ()
6296 {
6297
6298 ;
6299 return 0;
6300 }
6301 _ACEOF
6302 if ac_fn_c_try_compile "$LINENO"; then :
6303 ac_cv_sys_large_files=no; break
6304 fi
6305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6307 /* end confdefs.h. */
6308 #define _LARGE_FILES 1
6309 #include <sys/types.h>
6310 /* Check that off_t can represent 2**63 - 1 correctly.
6311 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6312 since some C++ compilers masquerading as C compilers
6313 incorrectly reject 9223372036854775807. */
6314 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6315 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6316 && LARGE_OFF_T % 2147483647 == 1)
6317 ? 1 : -1];
6318 int
6319 main ()
6320 {
6321
6322 ;
6323 return 0;
6324 }
6325 _ACEOF
6326 if ac_fn_c_try_compile "$LINENO"; then :
6327 ac_cv_sys_large_files=1; break
6328 fi
6329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6330 ac_cv_sys_large_files=unknown
6331 break
6332 done
6333 fi
6334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6335 $as_echo "$ac_cv_sys_large_files" >&6; }
6336 case $ac_cv_sys_large_files in #(
6337 no | unknown) ;;
6338 *)
6339 cat >>confdefs.h <<_ACEOF
6340 #define _LARGE_FILES $ac_cv_sys_large_files
6341 _ACEOF
6342 ;;
6343 esac
6344 rm -rf conftest*
6345 fi
6346 fi
6347
6348
6349
6350
6351
6352
6353 case "$host_os" in
6354 openbsd*)
6355
6356 $as_echo "#define _ISOC11_SOURCE 1" >>confdefs.h
6357
6358 ;;
6359 esac
6360
6361
6362
6363
6364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6365 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6366 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6367 $as_echo_n "(cached) " >&6
6368 else
6369
6370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6371 /* end confdefs.h. */
6372
6373 #ifdef __ACK__
6374 Amsterdam
6375 #endif
6376
6377 _ACEOF
6378 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6379 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6380 gl_cv_c_amsterdam_compiler=yes
6381 else
6382 gl_cv_c_amsterdam_compiler=no
6383 fi
6384 rm -f conftest*
6385
6386
6387 fi
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6389 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6390
6391 if test $gl_cv_c_amsterdam_compiler = yes; then
6392 if test -z "$AR"; then
6393 AR='cc -c.a'
6394 fi
6395 if test -z "$ARFLAGS"; then
6396 ARFLAGS='-o'
6397 fi
6398 else
6399 :
6400 fi
6401
6402 if test -n "$ac_tool_prefix"; then
6403 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6404 set dummy ${ac_tool_prefix}ar; ac_word=$2
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6406 $as_echo_n "checking for $ac_word... " >&6; }
6407 if ${ac_cv_prog_AR+:} false; then :
6408 $as_echo_n "(cached) " >&6
6409 else
6410 if test -n "$AR"; then
6411 ac_cv_prog_AR="$AR" # Let the user override the test.
6412 else
6413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6414 for as_dir in $PATH
6415 do
6416 IFS=$as_save_IFS
6417 test -z "$as_dir" && as_dir=.
6418 for ac_exec_ext in '' $ac_executable_extensions; do
6419 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6420 ac_cv_prog_AR="${ac_tool_prefix}ar"
6421 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6422 break 2
6423 fi
6424 done
6425 done
6426 IFS=$as_save_IFS
6427
6428 fi
6429 fi
6430 AR=$ac_cv_prog_AR
6431 if test -n "$AR"; then
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6433 $as_echo "$AR" >&6; }
6434 else
6435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6436 $as_echo "no" >&6; }
6437 fi
6438
6439
6440 fi
6441 if test -z "$ac_cv_prog_AR"; then
6442 ac_ct_AR=$AR
6443 # Extract the first word of "ar", so it can be a program name with args.
6444 set dummy ar; ac_word=$2
6445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6446 $as_echo_n "checking for $ac_word... " >&6; }
6447 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6448 $as_echo_n "(cached) " >&6
6449 else
6450 if test -n "$ac_ct_AR"; then
6451 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6452 else
6453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6454 for as_dir in $PATH
6455 do
6456 IFS=$as_save_IFS
6457 test -z "$as_dir" && as_dir=.
6458 for ac_exec_ext in '' $ac_executable_extensions; do
6459 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6460 ac_cv_prog_ac_ct_AR="ar"
6461 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6462 break 2
6463 fi
6464 done
6465 done
6466 IFS=$as_save_IFS
6467
6468 fi
6469 fi
6470 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6471 if test -n "$ac_ct_AR"; then
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6473 $as_echo "$ac_ct_AR" >&6; }
6474 else
6475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6476 $as_echo "no" >&6; }
6477 fi
6478
6479 if test "x$ac_ct_AR" = x; then
6480 AR="ar"
6481 else
6482 case $cross_compiling:$ac_tool_warned in
6483 yes:)
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6485 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6486 ac_tool_warned=yes ;;
6487 esac
6488 AR=$ac_ct_AR
6489 fi
6490 else
6491 AR="$ac_cv_prog_AR"
6492 fi
6493
6494 if test -z "$ARFLAGS"; then
6495 ARFLAGS='cr'
6496 fi
6497
6498
6499
6500 if test -z "$RANLIB"; then
6501 if test $gl_cv_c_amsterdam_compiler = yes; then
6502 RANLIB=':'
6503 else
6504 if test -n "$ac_tool_prefix"; then
6505 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6506 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6508 $as_echo_n "checking for $ac_word... " >&6; }
6509 if ${ac_cv_prog_RANLIB+:} false; then :
6510 $as_echo_n "(cached) " >&6
6511 else
6512 if test -n "$RANLIB"; then
6513 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6514 else
6515 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6516 for as_dir in $PATH
6517 do
6518 IFS=$as_save_IFS
6519 test -z "$as_dir" && as_dir=.
6520 for ac_exec_ext in '' $ac_executable_extensions; do
6521 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6522 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6523 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6524 break 2
6525 fi
6526 done
6527 done
6528 IFS=$as_save_IFS
6529
6530 fi
6531 fi
6532 RANLIB=$ac_cv_prog_RANLIB
6533 if test -n "$RANLIB"; then
6534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6535 $as_echo "$RANLIB" >&6; }
6536 else
6537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6538 $as_echo "no" >&6; }
6539 fi
6540
6541
6542 fi
6543 if test -z "$ac_cv_prog_RANLIB"; then
6544 ac_ct_RANLIB=$RANLIB
6545 # Extract the first word of "ranlib", so it can be a program name with args.
6546 set dummy ranlib; ac_word=$2
6547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6548 $as_echo_n "checking for $ac_word... " >&6; }
6549 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6550 $as_echo_n "(cached) " >&6
6551 else
6552 if test -n "$ac_ct_RANLIB"; then
6553 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6554 else
6555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6556 for as_dir in $PATH
6557 do
6558 IFS=$as_save_IFS
6559 test -z "$as_dir" && as_dir=.
6560 for ac_exec_ext in '' $ac_executable_extensions; do
6561 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6562 ac_cv_prog_ac_ct_RANLIB="ranlib"
6563 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6564 break 2
6565 fi
6566 done
6567 done
6568 IFS=$as_save_IFS
6569
6570 fi
6571 fi
6572 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6573 if test -n "$ac_ct_RANLIB"; then
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6575 $as_echo "$ac_ct_RANLIB" >&6; }
6576 else
6577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6578 $as_echo "no" >&6; }
6579 fi
6580
6581 if test "x$ac_ct_RANLIB" = x; then
6582 RANLIB=":"
6583 else
6584 case $cross_compiling:$ac_tool_warned in
6585 yes:)
6586 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6587 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6588 ac_tool_warned=yes ;;
6589 esac
6590 RANLIB=$ac_ct_RANLIB
6591 fi
6592 else
6593 RANLIB="$ac_cv_prog_RANLIB"
6594 fi
6595
6596 fi
6597 fi
6598
6599
6600
6601
6602
6603
6604 # IEEE behaviour is the default on all CPUs except Alpha and SH
6605 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6606 # and the GCC 4.1.2 manual).
6607 case "$host_cpu" in
6608 alpha*)
6609 # On Alpha systems, a compiler option provides the behaviour.
6610 # See the ieee(3) manual page, also available at
6611 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
6612 if test -n "$GCC"; then
6613 # GCC has the option -mieee.
6614 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6615 CPPFLAGS="$CPPFLAGS -mieee"
6616 else
6617 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6618 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6619 CPPFLAGS="$CPPFLAGS -ieee"
6620 fi
6621 ;;
6622 sh*)
6623 if test -n "$GCC"; then
6624 # GCC has the option -mieee.
6625 CPPFLAGS="$CPPFLAGS -mieee"
6626 fi
6627 ;;
6628 esac
6629
6630
6631
6632
6633
6634
6635
6636 # Check whether --enable-threads was given.
6637 if test "${enable_threads+set}" = set; then :
6638 enableval=$enable_threads; gl_use_threads=$enableval
6639 else
6640 if test -n "$gl_use_threads_default"; then
6641 gl_use_threads="$gl_use_threads_default"
6642 else
6643 case "$host_os" in
6644 osf*) gl_use_threads=no ;;
6645 cygwin*)
6646 case `uname -r` in
6647 1.[0-5].*) gl_use_threads=no ;;
6648 *) gl_use_threads=yes ;;
6649 esac
6650 ;;
6651 mingw*)
6652 case "$gl_use_winpthreads_default" in
6653 yes) gl_use_threads=posix ;;
6654 no) gl_use_threads=windows ;;
6655 *) gl_use_threads=yes ;;
6656 esac
6657 ;;
6658 *) gl_use_threads=yes ;;
6659 esac
6660 fi
6661
6662 fi
6663
6664 if test "$gl_use_threads" = yes \
6665 || test "$gl_use_threads" = isoc \
6666 || test "$gl_use_threads" = posix \
6667 || test "$gl_use_threads" = isoc+posix; then
6668 # For using <threads.h> or <pthread.h>:
6669
6670
6671 if test -z "$gl_anythreadlib_early_done"; then
6672 case "$host_os" in
6673 osf*)
6674 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6675 # groks <pthread.h>. cc also understands the flag -pthread, but
6676 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6677 # 2. putting a flag into CPPFLAGS that has an effect on the linker
6678 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
6679 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6680 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
6681 ;;
6682 esac
6683 # Some systems optimize for single-threaded programs by default, and
6684 # need special flags to disable these optimizations. For example, the
6685 # definition of 'errno' in <errno.h>.
6686 case "$host_os" in
6687 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
6688 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
6689 esac
6690 gl_anythreadlib_early_done=done
6691 fi
6692
6693 fi
6694
6695
6696
6697 # Pre-early section.
6698
6699
6700
6701
6702 # Code from module absolute-header:
6703 # Code from module accept:
6704 # Code from module alloca:
6705 # Code from module alloca-opt:
6706 # Code from module arpa_inet:
6707 # Code from module assure:
6708 # Code from module at-internal:
6709 # Code from module attribute:
6710 # Code from module basename-lgpl:
6711 # Code from module bind:
6712 # Code from module btowc:
6713 # Code from module builtin-expect:
6714 # Code from module c99:
6715 # Code from module canonicalize-lgpl:
6716 # Code from module chdir:
6717 # Code from module chdir-long:
6718 # Code from module chown:
6719 # Code from module clock-time:
6720 # Code from module cloexec:
6721 # Code from module close:
6722 # Code from module closedir:
6723 # Code from module connect:
6724 # Code from module count-one-bits:
6725 # Code from module ctype:
6726 # Code from module d-ino:
6727 # Code from module d-type:
6728 # Code from module dirent:
6729 # Code from module dirfd:
6730 # Code from module dirname-lgpl:
6731 # Code from module double-slash-root:
6732 # Code from module dup:
6733 # Code from module dup2:
6734 # Code from module eloop-threshold:
6735 # Code from module environ:
6736 # Code from module errno:
6737 # Code from module error:
6738 # Code from module exitfail:
6739 # Code from module extensions:
6740 # Code from module extern-inline:
6741 # Code from module fchdir:
6742 # Code from module fcntl:
6743 # Code from module fcntl-h:
6744 # Code from module fd-hook:
6745 # Code from module fd-safer-flag:
6746 # Code from module fdopendir:
6747 # Code from module ffs:
6748 # Code from module filename:
6749 # Code from module filenamecat-lgpl:
6750 # Code from module flexmember:
6751 # Code from module float:
6752 # Code from module fnmatch:
6753 # Code from module fnmatch-gnu:
6754 # Code from module fnmatch-h:
6755 # Code from module fpieee:
6756
6757 # Code from module fpucw:
6758 # Code from module free-posix:
6759 # Code from module frexp:
6760 # Code from module frexpl:
6761 # Code from module fstat:
6762 # Code from module fstatat:
6763 # Code from module gendocs:
6764 # Code from module getcwd:
6765 # Code from module getcwd-lgpl:
6766 # Code from module getdelim:
6767 # Code from module getdtablesize:
6768 # Code from module getline:
6769 # Code from module getlogin_r:
6770 # Code from module getprogname:
6771 # Code from module getrandom:
6772 # Code from module gettext-h:
6773 # Code from module gettimeofday:
6774 # Code from module gitlog-to-changelog:
6775 # Code from module glob:
6776 # Code from module glob-h:
6777 # Code from module hard-locale:
6778 # Code from module idx:
6779 # Code from module include_next:
6780 # Code from module inet_ntop:
6781 # Code from module intprops:
6782 # Code from module inttypes:
6783 # Code from module inttypes-incomplete:
6784 # Code from module isblank:
6785 # Code from module isnand-nolibm:
6786 # Code from module isnanl-nolibm:
6787 # Code from module largefile:
6788
6789 # Code from module libc-config:
6790 # Code from module limits-h:
6791 # Code from module listen:
6792 # Code from module localcharset:
6793 # Code from module locale:
6794 # Code from module lock:
6795 # Code from module lstat:
6796 # Code from module malloc-posix:
6797 # Code from module malloca:
6798 # Code from module math:
6799 # Code from module mbrtowc:
6800 # Code from module mbsinit:
6801 # Code from module mbsrtowcs:
6802 # Code from module mbtowc:
6803 # Code from module memchr:
6804 # Code from module memmem:
6805 # Code from module memmem-simple:
6806 # Code from module mempcpy:
6807 # Code from module memrchr:
6808 # Code from module minmax:
6809 # Code from module mkdir:
6810 # Code from module mkdtemp:
6811 # Code from module mkostemp:
6812 # Code from module msvc-inval:
6813 # Code from module msvc-nothrow:
6814 # Code from module multiarch:
6815 # Code from module netdb:
6816 # Code from module netinet_in:
6817 # Code from module nocrash:
6818 # Code from module open:
6819 # Code from module openat:
6820 # Code from module openat-die:
6821 # Code from module openat-h:
6822 # Code from module opendir:
6823 # Code from module pathmax:
6824 # Code from module pipe-posix:
6825 # Code from module rawmemchr:
6826 # Code from module readdir:
6827 # Code from module readlink:
6828 # Code from module realloc-posix:
6829 # Code from module rename:
6830 # Code from module rewinddir:
6831 # Code from module rmdir:
6832 # Code from module same-inode:
6833 # Code from module save-cwd:
6834 # Code from module scratch_buffer:
6835 # Code from module select:
6836 # Code from module setenv:
6837 # Code from module setlocale-null:
6838 # Code from module setsockopt:
6839 # Code from module signal-h:
6840 # Code from module snippet/_Noreturn:
6841 # Code from module snippet/arg-nonnull:
6842 # Code from module snippet/c++defs:
6843 # Code from module snippet/warn-on-use:
6844 # Code from module socket:
6845 # Code from module socketlib:
6846 # Code from module sockets:
6847 # Code from module socklen:
6848 # Code from module ssize_t:
6849 # Code from module stat:
6850 # Code from module stat-time:
6851 # Code from module std-gnu11:
6852 # Code from module stdalign:
6853 # Code from module stdbool:
6854 # Code from module stddef:
6855 # Code from module stdint:
6856 # Code from module stdio:
6857 # Code from module stdlib:
6858 # Code from module strchrnul:
6859 # Code from module strdup-posix:
6860 # Code from module streq:
6861 # Code from module strerror:
6862 # Code from module strerror-override:
6863 # Code from module strerror_r-posix:
6864 # Code from module string:
6865 # Code from module strings:
6866 # Code from module strnlen:
6867 # Code from module strnlen1:
6868 # Code from module strstr:
6869 # Code from module strstr-simple:
6870 # Code from module strtok_r:
6871 # Code from module sys_random:
6872 # Code from module sys_select:
6873 # Code from module sys_socket:
6874 # Code from module sys_stat:
6875 # Code from module sys_time:
6876 # Code from module sys_types:
6877 # Code from module sys_uio:
6878 # Code from module sys_wait:
6879 # Code from module tempname:
6880 # Code from module threadlib:
6881
6882
6883
6884 # Code from module time:
6885 # Code from module time_r:
6886 # Code from module unistd:
6887 # Code from module unistd-safer:
6888 # Code from module unsetenv:
6889 # Code from module update-copyright:
6890 # Code from module verify:
6891 # Code from module wchar:
6892 # Code from module wctype-h:
6893 # Code from module windows-mutex:
6894 # Code from module windows-once:
6895 # Code from module windows-recmutex:
6896 # Code from module windows-rwlock:
6897 # Code from module wmemchr:
6898 # Code from module wmempcpy:
6899 # Code from module xalloc-oversized:
6900
6901
6902 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6903
6904
6905 ac_aux_dir=
6906 for ac_dir in .. "$srcdir"/..; do
6907 if test -f "$ac_dir/install-sh"; then
6908 ac_aux_dir=$ac_dir
6909 ac_install_sh="$ac_aux_dir/install-sh -c"
6910 break
6911 elif test -f "$ac_dir/install.sh"; then
6912 ac_aux_dir=$ac_dir
6913 ac_install_sh="$ac_aux_dir/install.sh -c"
6914 break
6915 elif test -f "$ac_dir/shtool"; then
6916 ac_aux_dir=$ac_dir
6917 ac_install_sh="$ac_aux_dir/shtool install -c"
6918 break
6919 fi
6920 done
6921 if test -z "$ac_aux_dir"; then
6922 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
6923 fi
6924
6925 # These three variables are undocumented and unsupported,
6926 # and are intended to be withdrawn in a future Autoconf release.
6927 # They can cause serious problems if a builder's source tree is in a directory
6928 # whose full name contains unusual characters.
6929 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6930 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6931 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944 # Check whether --enable-cross-guesses was given.
6945 if test "${enable_cross_guesses+set}" = set; then :
6946 enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
6947 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
6948 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
6949 enableval=conservative
6950 fi
6951 gl_cross_guesses="$enableval"
6952 else
6953 gl_cross_guesses=conservative
6954 fi
6955
6956 if test $gl_cross_guesses = risky; then
6957 gl_cross_guess_normal="guessing yes"
6958 gl_cross_guess_inverted="guessing no"
6959 else
6960 gl_cross_guess_normal="guessing no"
6961 gl_cross_guess_inverted="guessing yes"
6962 fi
6963 LIBC_FATAL_STDERR_=1
6964 export LIBC_FATAL_STDERR_
6965
6966
6967
6968 GNULIB_SOCKET=0;
6969 GNULIB_CONNECT=0;
6970 GNULIB_ACCEPT=0;
6971 GNULIB_BIND=0;
6972 GNULIB_GETPEERNAME=0;
6973 GNULIB_GETSOCKNAME=0;
6974 GNULIB_GETSOCKOPT=0;
6975 GNULIB_LISTEN=0;
6976 GNULIB_RECV=0;
6977 GNULIB_SEND=0;
6978 GNULIB_RECVFROM=0;
6979 GNULIB_SENDTO=0;
6980 GNULIB_SETSOCKOPT=0;
6981 GNULIB_SHUTDOWN=0;
6982 GNULIB_ACCEPT4=0;
6983 HAVE_STRUCT_SOCKADDR_STORAGE=1;
6984 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
6985
6986 HAVE_SA_FAMILY_T=1;
6987 HAVE_ACCEPT4=1;
6988
6989
6990
6991
6992 if test $ac_cv_header_sys_socket_h = no; then
6993 for ac_header in ws2tcpip.h
6994 do :
6995 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
6996 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
6997 cat >>confdefs.h <<_ACEOF
6998 #define HAVE_WS2TCPIP_H 1
6999 _ACEOF
7000
7001 fi
7002
7003 done
7004
7005 fi
7006
7007
7008
7009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7010 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7011 if ${gl_cv_have_include_next+:} false; then :
7012 $as_echo_n "(cached) " >&6
7013 else
7014 rm -rf conftestd1a conftestd1b conftestd2
7015 mkdir conftestd1a conftestd1b conftestd2
7016 cat <<EOF > conftestd1a/conftest.h
7017 #define DEFINED_IN_CONFTESTD1
7018 #include_next <conftest.h>
7019 #ifdef DEFINED_IN_CONFTESTD2
7020 int foo;
7021 #else
7022 #error "include_next doesn't work"
7023 #endif
7024 EOF
7025 cat <<EOF > conftestd1b/conftest.h
7026 #define DEFINED_IN_CONFTESTD1
7027 #include <stdio.h>
7028 #include_next <conftest.h>
7029 #ifdef DEFINED_IN_CONFTESTD2
7030 int foo;
7031 #else
7032 #error "include_next doesn't work"
7033 #endif
7034 EOF
7035 cat <<EOF > conftestd2/conftest.h
7036 #ifndef DEFINED_IN_CONFTESTD1
7037 #error "include_next test doesn't work"
7038 #endif
7039 #define DEFINED_IN_CONFTESTD2
7040 EOF
7041 gl_save_CPPFLAGS="$CPPFLAGS"
7042 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7044 /* end confdefs.h. */
7045 #include <conftest.h>
7046 _ACEOF
7047 if ac_fn_c_try_compile "$LINENO"; then :
7048 gl_cv_have_include_next=yes
7049 else
7050 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7052 /* end confdefs.h. */
7053 #include <conftest.h>
7054 _ACEOF
7055 if ac_fn_c_try_compile "$LINENO"; then :
7056 gl_cv_have_include_next=buggy
7057 else
7058 gl_cv_have_include_next=no
7059 fi
7060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7061
7062 fi
7063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7064 CPPFLAGS="$gl_save_CPPFLAGS"
7065 rm -rf conftestd1a conftestd1b conftestd2
7066
7067 fi
7068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7069 $as_echo "$gl_cv_have_include_next" >&6; }
7070 PRAGMA_SYSTEM_HEADER=
7071 if test $gl_cv_have_include_next = yes; then
7072 INCLUDE_NEXT=include_next
7073 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7074 if test -n "$GCC"; then
7075 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7076 fi
7077 else
7078 if test $gl_cv_have_include_next = buggy; then
7079 INCLUDE_NEXT=include
7080 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7081 else
7082 INCLUDE_NEXT=include
7083 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7084 fi
7085 fi
7086
7087
7088
7089
7090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
7091 $as_echo_n "checking whether source code line length is unlimited... " >&6; }
7092 if ${gl_cv_source_line_length_unlimited+:} false; then :
7093 $as_echo_n "(cached) " >&6
7094 else
7095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7096 /* end confdefs.h. */
7097
7098 #ifdef __TANDEM
7099 choke me
7100 #endif
7101
7102 _ACEOF
7103 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7104 $EGREP "choke me" >/dev/null 2>&1; then :
7105 gl_cv_source_line_length_unlimited=no
7106 else
7107 gl_cv_source_line_length_unlimited=yes
7108 fi
7109 rm -f conftest*
7110
7111
7112 fi
7113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
7114 $as_echo "$gl_cv_source_line_length_unlimited" >&6; }
7115 if test $gl_cv_source_line_length_unlimited = no; then
7116 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7117 else
7118 PRAGMA_COLUMNS=
7119 fi
7120
7121
7122
7123 GNULIB_ACCESS=0;
7124 GNULIB_CHDIR=0;
7125 GNULIB_CHOWN=0;
7126 GNULIB_CLOSE=0;
7127 GNULIB_COPY_FILE_RANGE=0;
7128 GNULIB_DUP=0;
7129 GNULIB_DUP2=0;
7130 GNULIB_DUP3=0;
7131 GNULIB_ENVIRON=0;
7132 GNULIB_EUIDACCESS=0;
7133 GNULIB_EXECL=0;
7134 GNULIB_EXECLE=0;
7135 GNULIB_EXECLP=0;
7136 GNULIB_EXECV=0;
7137 GNULIB_EXECVE=0;
7138 GNULIB_EXECVP=0;
7139 GNULIB_EXECVPE=0;
7140 GNULIB_FACCESSAT=0;
7141 GNULIB_FCHDIR=0;
7142 GNULIB_FCHOWNAT=0;
7143 GNULIB_FDATASYNC=0;
7144 GNULIB_FSYNC=0;
7145 GNULIB_FTRUNCATE=0;
7146 GNULIB_GETCWD=0;
7147 GNULIB_GETDOMAINNAME=0;
7148 GNULIB_GETDTABLESIZE=0;
7149 GNULIB_GETENTROPY=0;
7150 GNULIB_GETGROUPS=0;
7151 GNULIB_GETHOSTNAME=0;
7152 GNULIB_GETLOGIN=0;
7153 GNULIB_GETLOGIN_R=0;
7154 GNULIB_GETOPT_POSIX=0;
7155 GNULIB_GETPAGESIZE=0;
7156 GNULIB_GETPASS=0;
7157 GNULIB_GETUSERSHELL=0;
7158 GNULIB_GROUP_MEMBER=0;
7159 GNULIB_ISATTY=0;
7160 GNULIB_LCHOWN=0;
7161 GNULIB_LINK=0;
7162 GNULIB_LINKAT=0;
7163 GNULIB_LSEEK=0;
7164 GNULIB_PIPE=0;
7165 GNULIB_PIPE2=0;
7166 GNULIB_PREAD=0;
7167 GNULIB_PWRITE=0;
7168 GNULIB_READ=0;
7169 GNULIB_READLINK=0;
7170 GNULIB_READLINKAT=0;
7171 GNULIB_RMDIR=0;
7172 GNULIB_SETHOSTNAME=0;
7173 GNULIB_SLEEP=0;
7174 GNULIB_SYMLINK=0;
7175 GNULIB_SYMLINKAT=0;
7176 GNULIB_TRUNCATE=0;
7177 GNULIB_TTYNAME_R=0;
7178 GNULIB_UNISTD_H_NONBLOCKING=0;
7179 GNULIB_UNISTD_H_SIGPIPE=0;
7180 GNULIB_UNLINK=0;
7181 GNULIB_UNLINKAT=0;
7182 GNULIB_USLEEP=0;
7183 GNULIB_WRITE=0;
7184 GNULIB_MDA_ACCESS=1;
7185 GNULIB_MDA_CHDIR=1;
7186 GNULIB_MDA_CLOSE=1;
7187 GNULIB_MDA_DUP=1;
7188 GNULIB_MDA_DUP2=1;
7189 GNULIB_MDA_EXECL=1;
7190 GNULIB_MDA_EXECLE=1;
7191 GNULIB_MDA_EXECLP=1;
7192 GNULIB_MDA_EXECV=1;
7193 GNULIB_MDA_EXECVE=1;
7194 GNULIB_MDA_EXECVP=1;
7195 GNULIB_MDA_EXECVPE=1;
7196 GNULIB_MDA_GETCWD=1;
7197 GNULIB_MDA_GETPID=1;
7198 GNULIB_MDA_ISATTY=1;
7199 GNULIB_MDA_LSEEK=1;
7200 GNULIB_MDA_READ=1;
7201 GNULIB_MDA_RMDIR=1;
7202 GNULIB_MDA_SWAB=1;
7203 GNULIB_MDA_UNLINK=1;
7204 GNULIB_MDA_WRITE=1;
7205 HAVE_CHOWN=1;
7206 HAVE_COPY_FILE_RANGE=1;
7207 HAVE_DUP3=1;
7208 HAVE_EUIDACCESS=1;
7209 HAVE_EXECVPE=1;
7210 HAVE_FACCESSAT=1;
7211 HAVE_FCHDIR=1;
7212 HAVE_FCHOWNAT=1;
7213 HAVE_FDATASYNC=1;
7214 HAVE_FSYNC=1;
7215 HAVE_FTRUNCATE=1;
7216 HAVE_GETDTABLESIZE=1;
7217 HAVE_GETENTROPY=1;
7218 HAVE_GETGROUPS=1;
7219 HAVE_GETHOSTNAME=1;
7220 HAVE_GETLOGIN=1;
7221 HAVE_GETPAGESIZE=1;
7222 HAVE_GETPASS=1;
7223 HAVE_GROUP_MEMBER=1;
7224 HAVE_LCHOWN=1;
7225 HAVE_LINK=1;
7226 HAVE_LINKAT=1;
7227 HAVE_PIPE=1;
7228 HAVE_PIPE2=1;
7229 HAVE_PREAD=1;
7230 HAVE_PWRITE=1;
7231 HAVE_READLINK=1;
7232 HAVE_READLINKAT=1;
7233 HAVE_SETHOSTNAME=1;
7234 HAVE_SLEEP=1;
7235 HAVE_SYMLINK=1;
7236 HAVE_SYMLINKAT=1;
7237 HAVE_UNLINKAT=1;
7238 HAVE_USLEEP=1;
7239 HAVE_DECL_ENVIRON=1;
7240 HAVE_DECL_EXECVPE=1;
7241 HAVE_DECL_FCHDIR=1;
7242 HAVE_DECL_FDATASYNC=1;
7243 HAVE_DECL_GETDOMAINNAME=1;
7244 HAVE_DECL_GETLOGIN=1;
7245 HAVE_DECL_GETLOGIN_R=1;
7246 HAVE_DECL_GETPAGESIZE=1;
7247 HAVE_DECL_GETUSERSHELL=1;
7248 HAVE_DECL_SETHOSTNAME=1;
7249 HAVE_DECL_TRUNCATE=1;
7250 HAVE_DECL_TTYNAME_R=1;
7251 HAVE_OS_H=0;
7252 HAVE_SYS_PARAM_H=0;
7253 REPLACE_ACCESS=0;
7254 REPLACE_CHOWN=0;
7255 REPLACE_CLOSE=0;
7256 REPLACE_DUP=0;
7257 REPLACE_DUP2=0;
7258 REPLACE_EXECL=0;
7259 REPLACE_EXECLE=0;
7260 REPLACE_EXECLP=0;
7261 REPLACE_EXECV=0;
7262 REPLACE_EXECVE=0;
7263 REPLACE_EXECVP=0;
7264 REPLACE_EXECVPE=0;
7265 REPLACE_FACCESSAT=0;
7266 REPLACE_FCHOWNAT=0;
7267 REPLACE_FTRUNCATE=0;
7268 REPLACE_GETCWD=0;
7269 REPLACE_GETDOMAINNAME=0;
7270 REPLACE_GETDTABLESIZE=0;
7271 REPLACE_GETLOGIN_R=0;
7272 REPLACE_GETGROUPS=0;
7273 REPLACE_GETPAGESIZE=0;
7274 REPLACE_GETPASS=0;
7275 REPLACE_ISATTY=0;
7276 REPLACE_LCHOWN=0;
7277 REPLACE_LINK=0;
7278 REPLACE_LINKAT=0;
7279 REPLACE_LSEEK=0;
7280 REPLACE_PREAD=0;
7281 REPLACE_PWRITE=0;
7282 REPLACE_READ=0;
7283 REPLACE_READLINK=0;
7284 REPLACE_READLINKAT=0;
7285 REPLACE_RMDIR=0;
7286 REPLACE_SLEEP=0;
7287 REPLACE_SYMLINK=0;
7288 REPLACE_SYMLINKAT=0;
7289 REPLACE_TRUNCATE=0;
7290 REPLACE_TTYNAME_R=0;
7291 REPLACE_UNLINK=0;
7292 REPLACE_UNLINKAT=0;
7293 REPLACE_USLEEP=0;
7294 REPLACE_WRITE=0;
7295 UNISTD_H_HAVE_SYS_RANDOM_H=0;
7296 UNISTD_H_HAVE_WINSOCK2_H=0;
7297 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7298
7299
7300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
7301 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
7302 if ${ac_cv_c_restrict+:} false; then :
7303 $as_echo_n "(cached) " >&6
7304 else
7305 ac_cv_c_restrict=no
7306 # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
7307 # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
7308 # Put 'restrict' last, because C++ lacks it.
7309 for ac_kw in __restrict__ __restrict _Restrict restrict; do
7310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7311 /* end confdefs.h. */
7312 typedef int *int_ptr;
7313 int foo (int_ptr $ac_kw ip) { return ip[0]; }
7314 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
7315 int bar (int ip[$ac_kw]) { return ip[0]; }
7316
7317 int
7318 main ()
7319 {
7320 int s[1];
7321 int *$ac_kw t = s;
7322 t[0] = 0;
7323 return foo (t) + bar (t);
7324
7325 ;
7326 return 0;
7327 }
7328 _ACEOF
7329 if ac_fn_c_try_compile "$LINENO"; then :
7330 ac_cv_c_restrict=$ac_kw
7331 fi
7332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7333 test "$ac_cv_c_restrict" != no && break
7334 done
7335
7336 fi
7337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
7338 $as_echo "$ac_cv_c_restrict" >&6; }
7339
7340 case $ac_cv_c_restrict in
7341 restrict) ;;
7342 no) $as_echo "#define restrict /**/" >>confdefs.h
7343 ;;
7344 *) cat >>confdefs.h <<_ACEOF
7345 #define restrict $ac_cv_c_restrict
7346 _ACEOF
7347 ;;
7348 esac
7349
7350
7351
7352
7353
7354 case "$host_os" in
7355 osf*)
7356
7357 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
7358
7359 ;;
7360 esac
7361
7362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
7363 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
7364 if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
7365 $as_echo_n "(cached) " >&6
7366 else
7367
7368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7369 /* end confdefs.h. */
7370 #include <sys/socket.h>
7371 int
7372 main ()
7373 {
7374
7375 ;
7376 return 0;
7377 }
7378 _ACEOF
7379 if ac_fn_c_try_compile "$LINENO"; then :
7380 gl_cv_header_sys_socket_h_selfcontained=yes
7381 else
7382 gl_cv_header_sys_socket_h_selfcontained=no
7383 fi
7384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7385
7386 fi
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
7388 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
7389 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
7390 for ac_func in shutdown
7391 do :
7392 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
7393 if test "x$ac_cv_func_shutdown" = xyes; then :
7394 cat >>confdefs.h <<_ACEOF
7395 #define HAVE_SHUTDOWN 1
7396 _ACEOF
7397
7398 fi
7399 done
7400
7401 if test $ac_cv_func_shutdown = yes; then
7402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
7403 $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
7404 if ${gl_cv_header_sys_socket_h_shut+:} false; then :
7405 $as_echo_n "(cached) " >&6
7406 else
7407
7408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7409 /* end confdefs.h. */
7410 #include <sys/socket.h>
7411 int
7412 main ()
7413 {
7414 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
7415 ;
7416 return 0;
7417 }
7418 _ACEOF
7419 if ac_fn_c_try_compile "$LINENO"; then :
7420 gl_cv_header_sys_socket_h_shut=yes
7421 else
7422 gl_cv_header_sys_socket_h_shut=no
7423 fi
7424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7425
7426 fi
7427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
7428 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
7429 if test $gl_cv_header_sys_socket_h_shut = no; then
7430 SYS_SOCKET_H='sys/socket.h'
7431 fi
7432 fi
7433 fi
7434 # We need to check for ws2tcpip.h now.
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446 if test $gl_cv_have_include_next = yes; then
7447 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
7448 else
7449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
7450 $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
7451 if ${gl_cv_next_sys_socket_h+:} false; then :
7452 $as_echo_n "(cached) " >&6
7453 else
7454
7455 if test $ac_cv_header_sys_socket_h = yes; then
7456
7457
7458
7459
7460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7461 /* end confdefs.h. */
7462 #include <sys/socket.h>
7463 _ACEOF
7464 case "$host_os" in
7465 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7466 *) gl_absname_cpp="$ac_cpp" ;;
7467 esac
7468
7469 case "$host_os" in
7470 mingw*)
7471 gl_dirsep_regex='[/\\]'
7472 ;;
7473 *)
7474 gl_dirsep_regex='\/'
7475 ;;
7476 esac
7477 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7478 gl_header_literal_regex=`echo 'sys/socket.h' \
7479 | sed -e "$gl_make_literal_regex_sed"`
7480 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7481 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7482 s|^/[^/]|//&|
7483 p
7484 q
7485 }'
7486
7487 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7488 sed -n "$gl_absolute_header_sed"`
7489
7490 gl_header=$gl_cv_absolute_sys_socket_h
7491 gl_cv_next_sys_socket_h='"'$gl_header'"'
7492 else
7493 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
7494 fi
7495
7496
7497 fi
7498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
7499 $as_echo "$gl_cv_next_sys_socket_h" >&6; }
7500 fi
7501 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
7502
7503 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7504 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7505 gl_next_as_first_directive='<'sys/socket.h'>'
7506 else
7507 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7508 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
7509 fi
7510 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
7511
7512
7513
7514
7515 if test $ac_cv_header_sys_socket_h = yes; then
7516 HAVE_SYS_SOCKET_H=1
7517 else
7518 HAVE_SYS_SOCKET_H=0
7519 fi
7520
7521
7522
7523 if test $ac_cv_header_sys_socket_h = yes; then
7524 HAVE_WS2TCPIP_H=0
7525 else
7526 if test $ac_cv_header_ws2tcpip_h = yes; then
7527 HAVE_WS2TCPIP_H=1
7528 else
7529 HAVE_WS2TCPIP_H=0
7530 fi
7531 fi
7532
7533
7534
7535 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
7536 /* sys/types.h is not needed according to POSIX, but the
7537 sys/socket.h in i386-unknown-freebsd4.10 and
7538 powerpc-apple-darwin5.5 required it. */
7539 #include <sys/types.h>
7540 #ifdef HAVE_SYS_SOCKET_H
7541 #include <sys/socket.h>
7542 #endif
7543 #ifdef HAVE_WS2TCPIP_H
7544 #include <ws2tcpip.h>
7545 #endif
7546
7547 "
7548 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
7549
7550 cat >>confdefs.h <<_ACEOF
7551 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
7552 _ACEOF
7553
7554
7555 fi
7556 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
7557 /* sys/types.h is not needed according to POSIX, but the
7558 sys/socket.h in i386-unknown-freebsd4.10 and
7559 powerpc-apple-darwin5.5 required it. */
7560 #include <sys/types.h>
7561 #ifdef HAVE_SYS_SOCKET_H
7562 #include <sys/socket.h>
7563 #endif
7564 #ifdef HAVE_WS2TCPIP_H
7565 #include <ws2tcpip.h>
7566 #endif
7567
7568 "
7569 if test "x$ac_cv_type_sa_family_t" = xyes; then :
7570
7571 cat >>confdefs.h <<_ACEOF
7572 #define HAVE_SA_FAMILY_T 1
7573 _ACEOF
7574
7575
7576 fi
7577
7578 if test $ac_cv_type_struct_sockaddr_storage = no; then
7579 HAVE_STRUCT_SOCKADDR_STORAGE=0
7580 fi
7581 if test $ac_cv_type_sa_family_t = no; then
7582 HAVE_SA_FAMILY_T=0
7583 fi
7584 if test $ac_cv_type_struct_sockaddr_storage != no; then
7585 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
7586 #ifdef HAVE_SYS_SOCKET_H
7587 #include <sys/socket.h>
7588 #endif
7589 #ifdef HAVE_WS2TCPIP_H
7590 #include <ws2tcpip.h>
7591 #endif
7592
7593 "
7594 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
7595
7596 cat >>confdefs.h <<_ACEOF
7597 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
7598 _ACEOF
7599
7600
7601 else
7602 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
7603 fi
7604
7605 fi
7606 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
7607 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
7608 SYS_SOCKET_H='sys/socket.h'
7609 fi
7610
7611
7612
7613
7614 if test $ac_cv_header_sys_socket_h != yes; then
7615 for ac_header in winsock2.h
7616 do :
7617 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
7618 if test "x$ac_cv_header_winsock2_h" = xyes; then :
7619 cat >>confdefs.h <<_ACEOF
7620 #define HAVE_WINSOCK2_H 1
7621 _ACEOF
7622
7623 fi
7624
7625 done
7626
7627 fi
7628 if test "$ac_cv_header_winsock2_h" = yes; then
7629 HAVE_WINSOCK2_H=1
7630 UNISTD_H_HAVE_WINSOCK2_H=1
7631 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
7632 else
7633 HAVE_WINSOCK2_H=0
7634 fi
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7645 if test "x$ac_cv_type_size_t" = xyes; then :
7646
7647 else
7648
7649 cat >>confdefs.h <<_ACEOF
7650 #define size_t unsigned int
7651 _ACEOF
7652
7653 fi
7654
7655 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7656 # for constant arguments. Useless!
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7658 $as_echo_n "checking for working alloca.h... " >&6; }
7659 if ${ac_cv_working_alloca_h+:} false; then :
7660 $as_echo_n "(cached) " >&6
7661 else
7662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7663 /* end confdefs.h. */
7664 #include <alloca.h>
7665 int
7666 main ()
7667 {
7668 char *p = (char *) alloca (2 * sizeof (int));
7669 if (p) return 0;
7670 ;
7671 return 0;
7672 }
7673 _ACEOF
7674 if ac_fn_c_try_link "$LINENO"; then :
7675 ac_cv_working_alloca_h=yes
7676 else
7677 ac_cv_working_alloca_h=no
7678 fi
7679 rm -f core conftest.err conftest.$ac_objext \
7680 conftest$ac_exeext conftest.$ac_ext
7681 fi
7682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7683 $as_echo "$ac_cv_working_alloca_h" >&6; }
7684 if test $ac_cv_working_alloca_h = yes; then
7685
7686 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7687
7688 fi
7689
7690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7691 $as_echo_n "checking for alloca... " >&6; }
7692 if ${ac_cv_func_alloca_works+:} false; then :
7693 $as_echo_n "(cached) " >&6
7694 else
7695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7696 /* end confdefs.h. */
7697 #ifdef __GNUC__
7698 # define alloca __builtin_alloca
7699 #else
7700 # ifdef _MSC_VER
7701 # include <malloc.h>
7702 # define alloca _alloca
7703 # else
7704 # ifdef HAVE_ALLOCA_H
7705 # include <alloca.h>
7706 # else
7707 # ifdef _AIX
7708 #pragma alloca
7709 # else
7710 # ifndef alloca /* predefined by HP cc +Olibcalls */
7711 void *alloca (size_t);
7712 # endif
7713 # endif
7714 # endif
7715 # endif
7716 #endif
7717
7718 int
7719 main ()
7720 {
7721 char *p = (char *) alloca (1);
7722 if (p) return 0;
7723 ;
7724 return 0;
7725 }
7726 _ACEOF
7727 if ac_fn_c_try_link "$LINENO"; then :
7728 ac_cv_func_alloca_works=yes
7729 else
7730 ac_cv_func_alloca_works=no
7731 fi
7732 rm -f core conftest.err conftest.$ac_objext \
7733 conftest$ac_exeext conftest.$ac_ext
7734 fi
7735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7736 $as_echo "$ac_cv_func_alloca_works" >&6; }
7737
7738 if test $ac_cv_func_alloca_works = yes; then
7739
7740 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7741
7742 else
7743 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7744 # that cause trouble. Some versions do not even contain alloca or
7745 # contain a buggy version. If you still want to use their alloca,
7746 # use ar to extract alloca.o from them instead of compiling alloca.c.
7747
7748
7749
7750
7751
7752 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7753
7754 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7755
7756
7757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7758 $as_echo_n "checking stack direction for C alloca... " >&6; }
7759 if ${ac_cv_c_stack_direction+:} false; then :
7760 $as_echo_n "(cached) " >&6
7761 else
7762 if test "$cross_compiling" = yes; then :
7763 ac_cv_c_stack_direction=0
7764 else
7765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7766 /* end confdefs.h. */
7767 $ac_includes_default
7768 int
7769 find_stack_direction (int *addr, int depth)
7770 {
7771 int dir, dummy = 0;
7772 if (! addr)
7773 addr = &dummy;
7774 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7775 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7776 return dir + dummy;
7777 }
7778
7779 int
7780 main (int argc, char **argv)
7781 {
7782 return find_stack_direction (0, argc + !argv + 20) < 0;
7783 }
7784 _ACEOF
7785 if ac_fn_c_try_run "$LINENO"; then :
7786 ac_cv_c_stack_direction=1
7787 else
7788 ac_cv_c_stack_direction=-1
7789 fi
7790 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7791 conftest.$ac_objext conftest.beam conftest.$ac_ext
7792 fi
7793
7794 fi
7795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7796 $as_echo "$ac_cv_c_stack_direction" >&6; }
7797 cat >>confdefs.h <<_ACEOF
7798 #define STACK_DIRECTION $ac_cv_c_stack_direction
7799 _ACEOF
7800
7801
7802 fi
7803
7804
7805 GNULIB_INET_NTOP=0;
7806 GNULIB_INET_PTON=0;
7807 HAVE_DECL_INET_NTOP=1;
7808 HAVE_DECL_INET_PTON=1;
7809 REPLACE_INET_NTOP=0;
7810 REPLACE_INET_PTON=0;
7811
7812
7813
7814
7815
7816
7817
7818 if test $ac_cv_header_features_h = yes; then
7819 HAVE_FEATURES_H=1
7820 else
7821 HAVE_FEATURES_H=0
7822 fi
7823
7824
7825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7826 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7827 if test -z "$MKDIR_P"; then
7828 if ${ac_cv_path_mkdir+:} false; then :
7829 $as_echo_n "(cached) " >&6
7830 else
7831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7832 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7833 do
7834 IFS=$as_save_IFS
7835 test -z "$as_dir" && as_dir=.
7836 for ac_prog in mkdir gmkdir; do
7837 for ac_exec_ext in '' $ac_executable_extensions; do
7838 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7839 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7840 'mkdir (GNU coreutils) '* | \
7841 'mkdir (coreutils) '* | \
7842 'mkdir (fileutils) '4.1*)
7843 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7844 break 3;;
7845 esac
7846 done
7847 done
7848 done
7849 IFS=$as_save_IFS
7850
7851 fi
7852
7853 test -d ./--version && rmdir ./--version
7854 if test "${ac_cv_path_mkdir+set}" = set; then
7855 MKDIR_P="$ac_cv_path_mkdir -p"
7856 else
7857 # As a last resort, use the slow shell script. Don't cache a
7858 # value for MKDIR_P within a source directory, because that will
7859 # break other packages using the cache if that directory is
7860 # removed, or if the value is a relative name.
7861 MKDIR_P="$ac_install_sh -d"
7862 fi
7863 fi
7864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7865 $as_echo "$MKDIR_P" >&6; }
7866
7867
7868 GNULIB_BTOWC=0;
7869 GNULIB_WCTOB=0;
7870 GNULIB_MBSINIT=0;
7871 GNULIB_MBRTOWC=0;
7872 GNULIB_MBRLEN=0;
7873 GNULIB_MBSRTOWCS=0;
7874 GNULIB_MBSNRTOWCS=0;
7875 GNULIB_WCRTOMB=0;
7876 GNULIB_WCSRTOMBS=0;
7877 GNULIB_WCSNRTOMBS=0;
7878 GNULIB_WCWIDTH=0;
7879 GNULIB_WMEMCHR=0;
7880 GNULIB_WMEMCMP=0;
7881 GNULIB_WMEMCPY=0;
7882 GNULIB_WMEMMOVE=0;
7883 GNULIB_WMEMPCPY=0;
7884 GNULIB_WMEMSET=0;
7885 GNULIB_WCSLEN=0;
7886 GNULIB_WCSNLEN=0;
7887 GNULIB_WCSCPY=0;
7888 GNULIB_WCPCPY=0;
7889 GNULIB_WCSNCPY=0;
7890 GNULIB_WCPNCPY=0;
7891 GNULIB_WCSCAT=0;
7892 GNULIB_WCSNCAT=0;
7893 GNULIB_WCSCMP=0;
7894 GNULIB_WCSNCMP=0;
7895 GNULIB_WCSCASECMP=0;
7896 GNULIB_WCSNCASECMP=0;
7897 GNULIB_WCSCOLL=0;
7898 GNULIB_WCSXFRM=0;
7899 GNULIB_WCSDUP=0;
7900 GNULIB_WCSCHR=0;
7901 GNULIB_WCSRCHR=0;
7902 GNULIB_WCSCSPN=0;
7903 GNULIB_WCSSPN=0;
7904 GNULIB_WCSPBRK=0;
7905 GNULIB_WCSSTR=0;
7906 GNULIB_WCSTOK=0;
7907 GNULIB_WCSWIDTH=0;
7908 GNULIB_WCSFTIME=0;
7909 GNULIB_MDA_WCSDUP=1;
7910 HAVE_BTOWC=1;
7911 HAVE_MBSINIT=1;
7912 HAVE_MBRTOWC=1;
7913 HAVE_MBRLEN=1;
7914 HAVE_MBSRTOWCS=1;
7915 HAVE_MBSNRTOWCS=1;
7916 HAVE_WCRTOMB=1;
7917 HAVE_WCSRTOMBS=1;
7918 HAVE_WCSNRTOMBS=1;
7919 HAVE_WMEMCHR=1;
7920 HAVE_WMEMCMP=1;
7921 HAVE_WMEMCPY=1;
7922 HAVE_WMEMMOVE=1;
7923 HAVE_WMEMPCPY=1;
7924 HAVE_WMEMSET=1;
7925 HAVE_WCSLEN=1;
7926 HAVE_WCSNLEN=1;
7927 HAVE_WCSCPY=1;
7928 HAVE_WCPCPY=1;
7929 HAVE_WCSNCPY=1;
7930 HAVE_WCPNCPY=1;
7931 HAVE_WCSCAT=1;
7932 HAVE_WCSNCAT=1;
7933 HAVE_WCSCMP=1;
7934 HAVE_WCSNCMP=1;
7935 HAVE_WCSCASECMP=1;
7936 HAVE_WCSNCASECMP=1;
7937 HAVE_WCSCOLL=1;
7938 HAVE_WCSXFRM=1;
7939 HAVE_WCSDUP=1;
7940 HAVE_WCSCHR=1;
7941 HAVE_WCSRCHR=1;
7942 HAVE_WCSCSPN=1;
7943 HAVE_WCSSPN=1;
7944 HAVE_WCSPBRK=1;
7945 HAVE_WCSSTR=1;
7946 HAVE_WCSTOK=1;
7947 HAVE_WCSWIDTH=1;
7948 HAVE_WCSFTIME=1;
7949 HAVE_DECL_WCTOB=1;
7950 HAVE_DECL_WCSDUP=1;
7951 HAVE_DECL_WCWIDTH=1;
7952 REPLACE_MBSTATE_T=0;
7953 REPLACE_BTOWC=0;
7954 REPLACE_WCTOB=0;
7955 REPLACE_MBSINIT=0;
7956 REPLACE_MBRTOWC=0;
7957 REPLACE_MBRLEN=0;
7958 REPLACE_MBSRTOWCS=0;
7959 REPLACE_MBSNRTOWCS=0;
7960 REPLACE_WCRTOMB=0;
7961 REPLACE_WCSRTOMBS=0;
7962 REPLACE_WCSNRTOMBS=0;
7963 REPLACE_WCWIDTH=0;
7964 REPLACE_WCSWIDTH=0;
7965 REPLACE_WCSFTIME=0;
7966 REPLACE_WCSTOK=0;
7967
7968
7969
7970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
7971 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
7972 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
7973 $as_echo_n "(cached) " >&6
7974 else
7975 gl_cv_header_wchar_h_correct_inline=yes
7976 case "$host_os" in
7977 *-gnu* | gnu*)
7978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7979 /* end confdefs.h. */
7980
7981
7982 #define wcstod renamed_wcstod
7983 #include <wchar.h>
7984 extern int zero (void);
7985 int main () { return zero(); }
7986
7987 _ACEOF
7988 save_ac_compile="$ac_compile"
7989 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
7990 if echo '#include "conftest.c"' >conftest1.c \
7991 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7992 (eval $ac_compile) 2>&5
7993 ac_status=$?
7994 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7995 test $ac_status = 0; }; then
7996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7997 /* end confdefs.h. */
7998
7999
8000 #define wcstod renamed_wcstod
8001 #include <wchar.h>
8002 int zero (void) { return 0; }
8003
8004 _ACEOF
8005 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
8006 if echo '#include "conftest.c"' >conftest2.c \
8007 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8008 (eval $ac_compile) 2>&5
8009 ac_status=$?
8010 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8011 test $ac_status = 0; }; then
8012 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8013 :
8014 else
8015 gl_cv_header_wchar_h_correct_inline=no
8016 fi
8017 fi
8018 fi
8019 ac_compile="$save_ac_compile"
8020 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
8021 ;;
8022 esac
8023
8024 fi
8025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8026 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
8027 if test $gl_cv_header_wchar_h_correct_inline = no; then
8028 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8029 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8030 C99 mode. You have four options:
8031 - Add the flag -fgnu89-inline to CC and reconfigure, or
8032 - Fix your include files, using parts of
8033 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8034 - Use a gcc version older than 4.3, or
8035 - Don't use the flags -std=c99 or -std=gnu99.
8036 Configuration aborted." "$LINENO" 5
8037 fi
8038
8039
8040
8041
8042 for ac_func in $ac_func_list
8043 do :
8044 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8045 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8046 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8047 cat >>confdefs.h <<_ACEOF
8048 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8049 _ACEOF
8050
8051 fi
8052 done
8053
8054
8055
8056
8057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8058 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8059 if ${am_cv_langinfo_codeset+:} false; then :
8060 $as_echo_n "(cached) " >&6
8061 else
8062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8063 /* end confdefs.h. */
8064 #include <langinfo.h>
8065 int
8066 main ()
8067 {
8068 char* cs = nl_langinfo(CODESET); return !cs;
8069 ;
8070 return 0;
8071 }
8072 _ACEOF
8073 if ac_fn_c_try_link "$LINENO"; then :
8074 am_cv_langinfo_codeset=yes
8075 else
8076 am_cv_langinfo_codeset=no
8077 fi
8078 rm -f core conftest.err conftest.$ac_objext \
8079 conftest$ac_exeext conftest.$ac_ext
8080
8081 fi
8082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8083 $as_echo "$am_cv_langinfo_codeset" >&6; }
8084 if test $am_cv_langinfo_codeset = yes; then
8085
8086 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8087
8088 fi
8089
8090
8091
8092
8093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8094 $as_echo_n "checking for a traditional french locale... " >&6; }
8095 if ${gt_cv_locale_fr+:} false; then :
8096 $as_echo_n "(cached) " >&6
8097 else
8098
8099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8100 /* end confdefs.h. */
8101
8102 #include <locale.h>
8103 #include <time.h>
8104 #if HAVE_LANGINFO_CODESET
8105 # include <langinfo.h>
8106 #endif
8107 #include <stdlib.h>
8108 #include <string.h>
8109 struct tm t;
8110 char buf[16];
8111 int main () {
8112 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
8113 imitates locale dependent behaviour by looking at the environment
8114 variables, and all locales use the UTF-8 encoding. */
8115 #if defined __BEOS__ || defined __HAIKU__
8116 return 1;
8117 #else
8118 /* Check whether the given locale name is recognized by the system. */
8119 # if defined _WIN32 && !defined __CYGWIN__
8120 /* On native Windows, setlocale(category, "") looks at the system settings,
8121 not at the environment variables. Also, when an encoding suffix such
8122 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8123 category of the locale to "C". */
8124 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8125 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8126 return 1;
8127 # else
8128 if (setlocale (LC_ALL, "") == NULL) return 1;
8129 # endif
8130 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8131 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8132 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8133 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8134 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8135 some unit tests fail.
8136 On MirBSD 10, when an unsupported locale is specified, setlocale()
8137 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
8138 # if HAVE_LANGINFO_CODESET
8139 {
8140 const char *cs = nl_langinfo (CODESET);
8141 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8142 || strcmp (cs, "UTF-8") == 0)
8143 return 1;
8144 }
8145 # endif
8146 # ifdef __CYGWIN__
8147 /* On Cygwin, avoid locale names without encoding suffix, because the
8148 locale_charset() function relies on the encoding suffix. Note that
8149 LC_ALL is set on the command line. */
8150 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8151 # endif
8152 /* Check whether in the abbreviation of the second month, the second
8153 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8154 one byte long. This excludes the UTF-8 encoding. */
8155 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8156 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8157 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8158 /* Check whether the decimal separator is a comma.
8159 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8160 are nl_langinfo(RADIXCHAR) are both ".". */
8161 if (localeconv () ->decimal_point[0] != ',') return 1;
8162 # endif
8163 return 0;
8164 #endif
8165 }
8166
8167 _ACEOF
8168 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8169 (eval $ac_link) 2>&5
8170 ac_status=$?
8171 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8172 test $ac_status = 0; } && test -s conftest$ac_exeext; then
8173 case "$host_os" in
8174 # Handle native Windows specially, because there setlocale() interprets
8175 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8176 # "fr" or "fra" as "French" or "French_France.1252",
8177 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8178 # "ja" as "Japanese" or "Japanese_Japan.932",
8179 # and similar.
8180 mingw*)
8181 # Test for the native Windows locale name.
8182 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8183 gt_cv_locale_fr=French_France.1252
8184 else
8185 # None found.
8186 gt_cv_locale_fr=none
8187 fi
8188 ;;
8189 *)
8190 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8191 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8192 # configure script would override the LC_ALL setting. Likewise for
8193 # LC_CTYPE, which is also set at the beginning of the configure script.
8194 # Test for the usual locale name.
8195 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8196 gt_cv_locale_fr=fr_FR
8197 else
8198 # Test for the locale name with explicit encoding suffix.
8199 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8200 gt_cv_locale_fr=fr_FR.ISO-8859-1
8201 else
8202 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
8203 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8204 gt_cv_locale_fr=fr_FR.ISO8859-1
8205 else
8206 # Test for the HP-UX locale name.
8207 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8208 gt_cv_locale_fr=fr_FR.iso88591
8209 else
8210 # Test for the Solaris 7 locale name.
8211 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8212 gt_cv_locale_fr=fr
8213 else
8214 # None found.
8215 gt_cv_locale_fr=none
8216 fi
8217 fi
8218 fi
8219 fi
8220 fi
8221 ;;
8222 esac
8223 fi
8224 rm -fr conftest*
8225
8226 fi
8227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
8228 $as_echo "$gt_cv_locale_fr" >&6; }
8229 LOCALE_FR=$gt_cv_locale_fr
8230
8231
8232
8233 GNULIB__EXIT=0;
8234 GNULIB_ALIGNED_ALLOC=0;
8235 GNULIB_ATOLL=0;
8236 GNULIB_CALLOC_POSIX=0;
8237 GNULIB_CANONICALIZE_FILE_NAME=0;
8238 GNULIB_FREE_POSIX=0;
8239 GNULIB_GETLOADAVG=0;
8240 GNULIB_GETSUBOPT=0;
8241 GNULIB_GRANTPT=0;
8242 GNULIB_MALLOC_POSIX=0;
8243 GNULIB_MBTOWC=0;
8244 GNULIB_MKDTEMP=0;
8245 GNULIB_MKOSTEMP=0;
8246 GNULIB_MKOSTEMPS=0;
8247 GNULIB_MKSTEMP=0;
8248 GNULIB_MKSTEMPS=0;
8249 GNULIB_POSIX_MEMALIGN=0;
8250 GNULIB_POSIX_OPENPT=0;
8251 GNULIB_PTSNAME=0;
8252 GNULIB_PTSNAME_R=0;
8253 GNULIB_PUTENV=0;
8254 GNULIB_QSORT_R=0;
8255 GNULIB_RANDOM=0;
8256 GNULIB_RANDOM_R=0;
8257 GNULIB_REALLOCARRAY=0;
8258 GNULIB_REALLOC_POSIX=0;
8259 GNULIB_REALPATH=0;
8260 GNULIB_RPMATCH=0;
8261 GNULIB_SECURE_GETENV=0;
8262 GNULIB_SETENV=0;
8263 GNULIB_STRTOD=0;
8264 GNULIB_STRTOLD=0;
8265 GNULIB_STRTOLL=0;
8266 GNULIB_STRTOULL=0;
8267 GNULIB_SYSTEM_POSIX=0;
8268 GNULIB_UNLOCKPT=0;
8269 GNULIB_UNSETENV=0;
8270 GNULIB_WCTOMB=0;
8271 GNULIB_MDA_ECVT=1;
8272 GNULIB_MDA_FCVT=1;
8273 GNULIB_MDA_GCVT=1;
8274 GNULIB_MDA_MKTEMP=1;
8275 GNULIB_MDA_PUTENV=1;
8276 HAVE__EXIT=1;
8277 HAVE_ALIGNED_ALLOC=1;
8278 HAVE_ATOLL=1;
8279 HAVE_CANONICALIZE_FILE_NAME=1;
8280 HAVE_DECL_ECVT=1;
8281 HAVE_DECL_FCVT=1;
8282 HAVE_DECL_GCVT=1;
8283 HAVE_DECL_GETLOADAVG=1;
8284 HAVE_GETSUBOPT=1;
8285 HAVE_GRANTPT=1;
8286 HAVE_INITSTATE=1;
8287 HAVE_DECL_INITSTATE=1;
8288 HAVE_MBTOWC=1;
8289 HAVE_MKDTEMP=1;
8290 HAVE_MKOSTEMP=1;
8291 HAVE_MKOSTEMPS=1;
8292 HAVE_MKSTEMP=1;
8293 HAVE_MKSTEMPS=1;
8294 HAVE_POSIX_MEMALIGN=1;
8295 HAVE_POSIX_OPENPT=1;
8296 HAVE_PTSNAME=1;
8297 HAVE_PTSNAME_R=1;
8298 HAVE_QSORT_R=1;
8299 HAVE_RANDOM=1;
8300 HAVE_RANDOM_H=1;
8301 HAVE_RANDOM_R=1;
8302 HAVE_REALLOCARRAY=1;
8303 HAVE_REALPATH=1;
8304 HAVE_RPMATCH=1;
8305 HAVE_SECURE_GETENV=1;
8306 HAVE_SETENV=1;
8307 HAVE_DECL_SETENV=1;
8308 HAVE_SETSTATE=1;
8309 HAVE_DECL_SETSTATE=1;
8310 HAVE_STRTOD=1;
8311 HAVE_STRTOLD=1;
8312 HAVE_STRTOLL=1;
8313 HAVE_STRTOULL=1;
8314 HAVE_STRUCT_RANDOM_DATA=1;
8315 HAVE_SYS_LOADAVG_H=0;
8316 HAVE_UNLOCKPT=1;
8317 HAVE_DECL_UNSETENV=1;
8318 REPLACE_ALIGNED_ALLOC=0;
8319 REPLACE_CALLOC=0;
8320 REPLACE_CANONICALIZE_FILE_NAME=0;
8321 REPLACE_FREE=0;
8322 REPLACE_INITSTATE=0;
8323 REPLACE_MALLOC=0;
8324 REPLACE_MBTOWC=0;
8325 REPLACE_MKSTEMP=0;
8326 REPLACE_POSIX_MEMALIGN=0;
8327 REPLACE_PTSNAME=0;
8328 REPLACE_PTSNAME_R=0;
8329 REPLACE_PUTENV=0;
8330 REPLACE_QSORT_R=0;
8331 REPLACE_RANDOM=0;
8332 REPLACE_RANDOM_R=0;
8333 REPLACE_REALLOC=0;
8334 REPLACE_REALPATH=0;
8335 REPLACE_SETENV=0;
8336 REPLACE_SETSTATE=0;
8337 REPLACE_STRTOD=0;
8338 REPLACE_STRTOLD=0;
8339 REPLACE_UNSETENV=0;
8340 REPLACE_WCTOMB=0;
8341
8342
8343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
8344 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
8345 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
8346 $as_echo_n "(cached) " >&6
8347 else
8348 rm -f conftest.sym conftest.file
8349 echo >conftest.file
8350 if test "$cross_compiling" = yes; then :
8351 case "$host_os" in
8352 linux-* | linux)
8353 # Guess yes on Linux systems.
8354 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
8355 *-gnu* | gnu*)
8356 # Guess yes on glibc systems.
8357 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
8358 mingw*)
8359 # Guess no on native Windows.
8360 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
8361 *)
8362 # If we don't know, obey --enable-cross-guesses.
8363 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
8364 esac
8365
8366 else
8367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8368 /* end confdefs.h. */
8369 $ac_includes_default
8370 int
8371 main ()
8372 {
8373 struct stat sbuf;
8374 if (symlink ("conftest.file", "conftest.sym") != 0)
8375 return 1;
8376 /* Linux will dereference the symlink and fail, as required by
8377 POSIX. That is better in the sense that it means we will not
8378 have to compile and use the lstat wrapper. */
8379 return lstat ("conftest.sym/", &sbuf) == 0;
8380
8381 ;
8382 return 0;
8383 }
8384 _ACEOF
8385 if ac_fn_c_try_run "$LINENO"; then :
8386 gl_cv_func_lstat_dereferences_slashed_symlink=yes
8387 else
8388 gl_cv_func_lstat_dereferences_slashed_symlink=no
8389 fi
8390 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8391 conftest.$ac_objext conftest.beam conftest.$ac_ext
8392 fi
8393
8394 rm -f conftest.sym conftest.file
8395
8396 fi
8397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
8398 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
8399 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
8400 *yes)
8401
8402 cat >>confdefs.h <<_ACEOF
8403 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
8404 _ACEOF
8405
8406 ;;
8407 esac
8408
8409
8410
8411
8412
8413
8414
8415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
8416 $as_echo_n "checking whether // is distinct from /... " >&6; }
8417 if ${gl_cv_double_slash_root+:} false; then :
8418 $as_echo_n "(cached) " >&6
8419 else
8420 if test x"$cross_compiling" = xyes ; then
8421 # When cross-compiling, there is no way to tell whether // is special
8422 # short of a list of hosts. However, the only known hosts to date
8423 # that have a distinct // are Apollo DomainOS (too old to port to),
8424 # Cygwin, and z/OS. If anyone knows of another system for which // has
8425 # special semantics and is distinct from /, please report it to
8426 # <bug-gnulib@gnu.org>.
8427 case $host in
8428 *-cygwin | i370-ibm-openedition)
8429 gl_cv_double_slash_root=yes ;;
8430 *)
8431 # Be optimistic and assume that / and // are the same when we
8432 # don't know.
8433 gl_cv_double_slash_root='unknown, assuming no' ;;
8434 esac
8435 else
8436 set x `ls -di / // 2>/dev/null`
8437 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
8438 gl_cv_double_slash_root=no
8439 else
8440 gl_cv_double_slash_root=yes
8441 fi
8442 fi
8443 fi
8444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
8445 $as_echo "$gl_cv_double_slash_root" >&6; }
8446 if test "$gl_cv_double_slash_root" = yes; then
8447
8448 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8449
8450 fi
8451
8452
8453
8454
8455
8456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
8457 $as_echo_n "checking whether realpath works... " >&6; }
8458 if ${gl_cv_func_realpath_works+:} false; then :
8459 $as_echo_n "(cached) " >&6
8460 else
8461
8462 rm -rf conftest.a conftest.d
8463 touch conftest.a
8464 mkdir conftest.d
8465 if test "$cross_compiling" = yes; then :
8466 case "$host_os" in
8467 # Guess yes on glibc systems.
8468 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
8469 # Guess yes on musl systems.
8470 *-musl*) gl_cv_func_realpath_works="guessing yes" ;;
8471 # Guess no on native Windows.
8472 mingw*) gl_cv_func_realpath_works="guessing no" ;;
8473 # If we don't know, obey --enable-cross-guesses.
8474 *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
8475 esac
8476
8477 else
8478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8479 /* end confdefs.h. */
8480
8481
8482
8483 #include <stdlib.h>
8484 #if defined __MACH__ && defined __APPLE__
8485 /* Avoid a crash on Mac OS X. */
8486 #include <mach/mach.h>
8487 #include <mach/mach_error.h>
8488 #include <mach/thread_status.h>
8489 #include <mach/exception.h>
8490 #include <mach/task.h>
8491 #include <pthread.h>
8492 /* The exception port on which our thread listens. */
8493 static mach_port_t our_exception_port;
8494 /* The main function of the thread listening for exceptions of type
8495 EXC_BAD_ACCESS. */
8496 static void *
8497 mach_exception_thread (void *arg)
8498 {
8499 /* Buffer for a message to be received. */
8500 struct {
8501 mach_msg_header_t head;
8502 mach_msg_body_t msgh_body;
8503 char data[1024];
8504 } msg;
8505 mach_msg_return_t retval;
8506 /* Wait for a message on the exception port. */
8507 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
8508 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
8509 if (retval != MACH_MSG_SUCCESS)
8510 abort ();
8511 exit (1);
8512 }
8513 static void
8514 nocrash_init (void)
8515 {
8516 mach_port_t self = mach_task_self ();
8517 /* Allocate a port on which the thread shall listen for exceptions. */
8518 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
8519 == KERN_SUCCESS) {
8520 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
8521 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
8522 MACH_MSG_TYPE_MAKE_SEND)
8523 == KERN_SUCCESS) {
8524 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
8525 for us. */
8526 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
8527 /* Create the thread listening on the exception port. */
8528 pthread_attr_t attr;
8529 pthread_t thread;
8530 if (pthread_attr_init (&attr) == 0
8531 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
8532 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
8533 pthread_attr_destroy (&attr);
8534 /* Replace the exception port info for these exceptions with our own.
8535 Note that we replace the exception port for the entire task, not only
8536 for a particular thread. This has the effect that when our exception
8537 port gets the message, the thread specific exception port has already
8538 been asked, and we don't need to bother about it.
8539 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
8540 task_set_exception_ports (self, mask, our_exception_port,
8541 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
8542 }
8543 }
8544 }
8545 }
8546 #elif defined _WIN32 && ! defined __CYGWIN__
8547 /* Avoid a crash on native Windows. */
8548 #define WIN32_LEAN_AND_MEAN
8549 #include <windows.h>
8550 #include <winerror.h>
8551 static LONG WINAPI
8552 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
8553 {
8554 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
8555 {
8556 case EXCEPTION_ACCESS_VIOLATION:
8557 case EXCEPTION_IN_PAGE_ERROR:
8558 case EXCEPTION_STACK_OVERFLOW:
8559 case EXCEPTION_GUARD_PAGE:
8560 case EXCEPTION_PRIV_INSTRUCTION:
8561 case EXCEPTION_ILLEGAL_INSTRUCTION:
8562 case EXCEPTION_DATATYPE_MISALIGNMENT:
8563 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
8564 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
8565 exit (1);
8566 }
8567 return EXCEPTION_CONTINUE_SEARCH;
8568 }
8569 static void
8570 nocrash_init (void)
8571 {
8572 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
8573 }
8574 #else
8575 /* Avoid a crash on POSIX systems. */
8576 #include <signal.h>
8577 #include <unistd.h>
8578 /* A POSIX signal handler. */
8579 static void
8580 exception_handler (int sig)
8581 {
8582 _exit (1);
8583 }
8584 static void
8585 nocrash_init (void)
8586 {
8587 #ifdef SIGSEGV
8588 signal (SIGSEGV, exception_handler);
8589 #endif
8590 #ifdef SIGBUS
8591 signal (SIGBUS, exception_handler);
8592 #endif
8593 }
8594 #endif
8595
8596 #include <stdlib.h>
8597 #include <string.h>
8598
8599 int
8600 main ()
8601 {
8602
8603 int result = 0;
8604 {
8605 char *name = realpath ("conftest.a", NULL);
8606 if (!(name && *name == '/'))
8607 result |= 1;
8608 free (name);
8609 }
8610 {
8611 char *name = realpath ("conftest.b/../conftest.a", NULL);
8612 if (name != NULL)
8613 result |= 2;
8614 free (name);
8615 }
8616 {
8617 char *name = realpath ("conftest.a/", NULL);
8618 if (name != NULL)
8619 result |= 4;
8620 free (name);
8621 }
8622 {
8623 char *name1 = realpath (".", NULL);
8624 char *name2 = realpath ("conftest.d//./..", NULL);
8625 if (! name1 || ! name2 || strcmp (name1, name2))
8626 result |= 8;
8627 free (name1);
8628 free (name2);
8629 }
8630 return result;
8631
8632 ;
8633 return 0;
8634 }
8635
8636 _ACEOF
8637 if ac_fn_c_try_run "$LINENO"; then :
8638 gl_cv_func_realpath_works=yes
8639 else
8640 gl_cv_func_realpath_works=no
8641 fi
8642 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8643 conftest.$ac_objext conftest.beam conftest.$ac_ext
8644 fi
8645
8646 rm -rf conftest.a conftest.d
8647
8648 fi
8649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
8650 $as_echo "$gl_cv_func_realpath_works" >&6; }
8651 case "$gl_cv_func_realpath_works" in
8652 *yes)
8653
8654 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
8655
8656 ;;
8657 esac
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667 case "$host_os" in
8668 mingw*) ;;
8669 *) for ac_func in getcwd
8670 do :
8671 ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
8672 if test "x$ac_cv_func_getcwd" = xyes; then :
8673 cat >>confdefs.h <<_ACEOF
8674 #define HAVE_GETCWD 1
8675 _ACEOF
8676
8677 fi
8678 done
8679 ;;
8680 esac
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8692 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
8693 if ${ac_cv_type_uid_t+:} false; then :
8694 $as_echo_n "(cached) " >&6
8695 else
8696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8697 /* end confdefs.h. */
8698 #include <sys/types.h>
8699
8700 _ACEOF
8701 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8702 $EGREP "uid_t" >/dev/null 2>&1; then :
8703 ac_cv_type_uid_t=yes
8704 else
8705 ac_cv_type_uid_t=no
8706 fi
8707 rm -f conftest*
8708
8709 fi
8710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8711 $as_echo "$ac_cv_type_uid_t" >&6; }
8712 if test $ac_cv_type_uid_t = no; then
8713
8714 $as_echo "#define uid_t int" >>confdefs.h
8715
8716
8717 $as_echo "#define gid_t int" >>confdefs.h
8718
8719 fi
8720
8721 gl_mda_defines='
8722 #if defined _WIN32 && !defined __CYGWIN__
8723 #define access _access
8724 #define chdir _chdir
8725 #define chmod _chmod
8726 #define close _close
8727 #define creat _creat
8728 #define dup _dup
8729 #define dup2 _dup2
8730 #define ecvt _ecvt
8731 #define execl _execl
8732 #define execle _execle
8733 #define execlp _execlp
8734 #define execv _execv
8735 #define execve _execve
8736 #define execvp _execvp
8737 #define execvpe _execvpe
8738 #define fcloseall _fcloseall
8739 #define fcvt _fcvt
8740 #define fdopen _fdopen
8741 #define fileno _fileno
8742 #define gcvt _gcvt
8743 #define getcwd _getcwd
8744 #define getpid _getpid
8745 #define getw _getw
8746 #define isatty _isatty
8747 #define j0 _j0
8748 #define j1 _j1
8749 #define jn _jn
8750 #define lfind _lfind
8751 #define lsearch _lsearch
8752 #define lseek _lseek
8753 #define memccpy _memccpy
8754 #define mkdir _mkdir
8755 #define mktemp _mktemp
8756 #define open _open
8757 #define putenv _putenv
8758 #define putw _putw
8759 #define read _read
8760 #define rmdir _rmdir
8761 #define strdup _strdup
8762 #define swab _swab
8763 #define tempnam _tempnam
8764 #define tzset _tzset
8765 #define umask _umask
8766 #define unlink _unlink
8767 #define utime _utime
8768 #define wcsdup _wcsdup
8769 #define write _write
8770 #define y0 _y0
8771 #define y1 _y1
8772 #define yn _yn
8773 #endif
8774 '
8775
8776
8777 for ac_header in unistd.h
8778 do :
8779 ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
8780 if test "x$ac_cv_header_unistd_h" = xyes; then :
8781 cat >>confdefs.h <<_ACEOF
8782 #define HAVE_UNISTD_H 1
8783 _ACEOF
8784
8785 fi
8786
8787 done
8788
8789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
8790 $as_echo_n "checking for working chown... " >&6; }
8791 if ${ac_cv_func_chown_works+:} false; then :
8792 $as_echo_n "(cached) " >&6
8793 else
8794 if test "$cross_compiling" = yes; then :
8795 case "$host_os" in # ((
8796 # Guess yes on Linux systems.
8797 linux-* | linux) ac_cv_func_chown_works="guessing yes" ;;
8798 # Guess yes on glibc systems.
8799 *-gnu* | gnu*) ac_cv_func_chown_works="guessing yes" ;;
8800 # Guess no on native Windows.
8801 mingw*) ac_cv_func_chown_works="guessing no" ;;
8802 # If we don't know, obey --enable-cross-guesses.
8803 *) ac_cv_func_chown_works="$gl_cross_guess_normal" ;;
8804 esac
8805
8806 else
8807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8808 /* end confdefs.h. */
8809 $ac_includes_default
8810 #include <fcntl.h>
8811
8812
8813 $gl_mda_defines
8814
8815 int
8816 main ()
8817 {
8818
8819 char *f = "conftest.chown";
8820 struct stat before, after;
8821
8822 if (creat (f, 0600) < 0)
8823 return 1;
8824 if (stat (f, &before) < 0)
8825 return 1;
8826 if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
8827 return 1;
8828 if (stat (f, &after) < 0)
8829 return 1;
8830 return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
8831
8832 ;
8833 return 0;
8834 }
8835
8836 _ACEOF
8837 if ac_fn_c_try_run "$LINENO"; then :
8838 ac_cv_func_chown_works=yes
8839 else
8840 ac_cv_func_chown_works=no
8841 fi
8842 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8843 conftest.$ac_objext conftest.beam conftest.$ac_ext
8844 fi
8845
8846 rm -f conftest.chown
8847
8848 fi
8849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
8850 $as_echo "$ac_cv_func_chown_works" >&6; }
8851 case "$ac_cv_func_chown_works" in
8852 *yes)
8853
8854 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
8855
8856 ;;
8857 esac
8858
8859
8860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
8861 $as_echo_n "checking whether chown dereferences symlinks... " >&6; }
8862 if ${gl_cv_func_chown_follows_symlink+:} false; then :
8863 $as_echo_n "(cached) " >&6
8864 else
8865
8866 if test "$cross_compiling" = yes; then :
8867 gl_cv_func_chown_follows_symlink="guessing yes"
8868
8869 else
8870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8871 /* end confdefs.h. */
8872
8873 #include <unistd.h>
8874 #include <stdlib.h>
8875 #include <errno.h>
8876
8877
8878 $gl_mda_defines
8879
8880 int
8881 main ()
8882 {
8883 int result = 0;
8884 char const *dangling_symlink = "conftest.dangle";
8885
8886 unlink (dangling_symlink);
8887 if (symlink ("conftest.no-such", dangling_symlink))
8888 abort ();
8889
8890 /* Exit successfully on a conforming system,
8891 i.e., where chown must fail with ENOENT. */
8892 if (chown (dangling_symlink, getuid (), getgid ()) == 0)
8893 result |= 1;
8894 if (errno != ENOENT)
8895 result |= 2;
8896 return result;
8897 }
8898
8899 _ACEOF
8900 if ac_fn_c_try_run "$LINENO"; then :
8901 gl_cv_func_chown_follows_symlink=yes
8902 else
8903 gl_cv_func_chown_follows_symlink=no
8904 fi
8905 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8906 conftest.$ac_objext conftest.beam conftest.$ac_ext
8907 fi
8908
8909
8910
8911 fi
8912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
8913 $as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
8914
8915 case "$gl_cv_func_chown_follows_symlink" in
8916 *yes) ;;
8917 *)
8918
8919 $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
8920
8921 ;;
8922 esac
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935 if test $ac_cv_func_chown = no; then
8936 HAVE_CHOWN=0
8937 else
8938 case "$gl_cv_func_chown_follows_symlink" in
8939 *yes) ;;
8940 *) REPLACE_CHOWN=1 ;;
8941 esac
8942
8943 case "$ac_cv_func_chown_works" in
8944 *no)
8945
8946 $as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
8947
8948 REPLACE_CHOWN=1
8949 ;;
8950 esac
8951
8952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
8953 $as_echo_n "checking whether chown honors trailing slash... " >&6; }
8954 if ${gl_cv_func_chown_slash_works+:} false; then :
8955 $as_echo_n "(cached) " >&6
8956 else
8957 touch conftest.file && rm -f conftest.link
8958 if test "$cross_compiling" = yes; then :
8959 case "$host_os" in
8960 # Guess yes on glibc systems.
8961 *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;;
8962 # Guess yes on musl systems.
8963 *-musl*) gl_cv_func_chown_slash_works="guessing yes" ;;
8964 # If we don't know, obey --enable-cross-guesses.
8965 *) gl_cv_func_chown_slash_works="$gl_cross_guess_normal" ;;
8966 esac
8967
8968 else
8969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8970 /* end confdefs.h. */
8971
8972 #include <unistd.h>
8973 #include <stdlib.h>
8974 #include <errno.h>
8975
8976
8977 $gl_mda_defines
8978
8979 int
8980 main ()
8981 {
8982 if (symlink ("conftest.file", "conftest.link")) return 1;
8983 if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
8984
8985 ;
8986 return 0;
8987 }
8988 _ACEOF
8989 if ac_fn_c_try_run "$LINENO"; then :
8990 gl_cv_func_chown_slash_works=yes
8991 else
8992 gl_cv_func_chown_slash_works=no
8993 fi
8994 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8995 conftest.$ac_objext conftest.beam conftest.$ac_ext
8996 fi
8997
8998 rm -f conftest.link conftest.file
8999 fi
9000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
9001 $as_echo "$gl_cv_func_chown_slash_works" >&6; }
9002 case "$gl_cv_func_chown_slash_works" in
9003 *yes) ;;
9004 *)
9005
9006 $as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
9007
9008 REPLACE_CHOWN=1
9009 ;;
9010 esac
9011
9012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
9013 $as_echo_n "checking whether chown always updates ctime... " >&6; }
9014 if ${gl_cv_func_chown_ctime_works+:} false; then :
9015 $as_echo_n "(cached) " >&6
9016 else
9017 if test "$cross_compiling" = yes; then :
9018 case "$host_os" in
9019 # Guess yes on glibc systems.
9020 *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;;
9021 # Guess yes on musl systems.
9022 *-musl*) gl_cv_func_chown_ctime_works="guessing yes" ;;
9023 # If we don't know, obey --enable-cross-guesses.
9024 *) gl_cv_func_chown_ctime_works="$gl_cross_guess_normal" ;;
9025 esac
9026
9027 else
9028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9029 /* end confdefs.h. */
9030
9031 #include <unistd.h>
9032 #include <stdlib.h>
9033 #include <errno.h>
9034 #include <fcntl.h>
9035 #include <sys/stat.h>
9036
9037
9038 $gl_mda_defines
9039
9040 int
9041 main ()
9042 {
9043 struct stat st1, st2;
9044 if (close (creat ("conftest.file", 0600))) return 1;
9045 if (stat ("conftest.file", &st1)) return 2;
9046 sleep (1);
9047 if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
9048 if (stat ("conftest.file", &st2)) return 4;
9049 if (st2.st_ctime <= st1.st_ctime) return 5;
9050
9051 ;
9052 return 0;
9053 }
9054 _ACEOF
9055 if ac_fn_c_try_run "$LINENO"; then :
9056 gl_cv_func_chown_ctime_works=yes
9057 else
9058 gl_cv_func_chown_ctime_works=no
9059 fi
9060 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9061 conftest.$ac_objext conftest.beam conftest.$ac_ext
9062 fi
9063
9064 rm -f conftest.file
9065 fi
9066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
9067 $as_echo "$gl_cv_func_chown_ctime_works" >&6; }
9068 case "$gl_cv_func_chown_ctime_works" in
9069 *yes) ;;
9070 *)
9071
9072 $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
9073
9074 REPLACE_CHOWN=1
9075 ;;
9076 esac
9077 fi
9078
9079
9080
9081
9082
9083 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
9084 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
9085
9086 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
9087
9088 else
9089 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
9090 fi
9091
9092
9093
9094
9095
9096 GNULIB_OPENDIR=0;
9097 GNULIB_READDIR=0;
9098 GNULIB_REWINDDIR=0;
9099 GNULIB_CLOSEDIR=0;
9100 GNULIB_DIRFD=0;
9101 GNULIB_FDOPENDIR=0;
9102 GNULIB_SCANDIR=0;
9103 GNULIB_ALPHASORT=0;
9104 HAVE_OPENDIR=1;
9105 HAVE_READDIR=1;
9106 HAVE_REWINDDIR=1;
9107 HAVE_CLOSEDIR=1;
9108 HAVE_DECL_DIRFD=1;
9109 HAVE_DECL_FDOPENDIR=1;
9110 HAVE_FDOPENDIR=1;
9111 HAVE_SCANDIR=1;
9112 HAVE_ALPHASORT=1;
9113 REPLACE_OPENDIR=0;
9114 REPLACE_CLOSEDIR=0;
9115 REPLACE_DIRFD=0;
9116 REPLACE_FDOPENDIR=0;
9117
9118
9119 GNULIB_ISBLANK=0;
9120 HAVE_ISBLANK=1;
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9132 $as_echo_n "checking if environ is properly declared... " >&6; }
9133 if ${gt_cv_var_environ_declaration+:} false; then :
9134 $as_echo_n "(cached) " >&6
9135 else
9136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9137 /* end confdefs.h. */
9138 #if HAVE_UNISTD_H
9139 #include <unistd.h>
9140 #endif
9141 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
9142 #include <stdlib.h>
9143
9144 extern struct { int foo; } environ;
9145 int
9146 main ()
9147 {
9148 environ.foo = 1;
9149 ;
9150 return 0;
9151 }
9152 _ACEOF
9153 if ac_fn_c_try_compile "$LINENO"; then :
9154 gt_cv_var_environ_declaration=no
9155 else
9156 gt_cv_var_environ_declaration=yes
9157 fi
9158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9159 fi
9160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9161 $as_echo "$gt_cv_var_environ_declaration" >&6; }
9162 if test $gt_cv_var_environ_declaration = yes; then
9163
9164 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9165
9166 fi
9167
9168
9169 if test $gt_cv_var_environ_declaration != yes; then
9170 HAVE_DECL_ENVIRON=0
9171 fi
9172
9173
9174
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9176 $as_echo_n "checking for complete errno.h... " >&6; }
9177 if ${gl_cv_header_errno_h_complete+:} false; then :
9178 $as_echo_n "(cached) " >&6
9179 else
9180
9181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9182 /* end confdefs.h. */
9183
9184 #include <errno.h>
9185 #if !defined ETXTBSY
9186 booboo
9187 #endif
9188 #if !defined ENOMSG
9189 booboo
9190 #endif
9191 #if !defined EIDRM
9192 booboo
9193 #endif
9194 #if !defined ENOLINK
9195 booboo
9196 #endif
9197 #if !defined EPROTO
9198 booboo
9199 #endif
9200 #if !defined EMULTIHOP
9201 booboo
9202 #endif
9203 #if !defined EBADMSG
9204 booboo
9205 #endif
9206 #if !defined EOVERFLOW
9207 booboo
9208 #endif
9209 #if !defined ENOTSUP
9210 booboo
9211 #endif
9212 #if !defined ENETRESET
9213 booboo
9214 #endif
9215 #if !defined ECONNABORTED
9216 booboo
9217 #endif
9218 #if !defined ESTALE
9219 booboo
9220 #endif
9221 #if !defined EDQUOT
9222 booboo
9223 #endif
9224 #if !defined ECANCELED
9225 booboo
9226 #endif
9227 #if !defined EOWNERDEAD
9228 booboo
9229 #endif
9230 #if !defined ENOTRECOVERABLE
9231 booboo
9232 #endif
9233 #if !defined EILSEQ
9234 booboo
9235 #endif
9236
9237 _ACEOF
9238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9239 $EGREP "booboo" >/dev/null 2>&1; then :
9240 gl_cv_header_errno_h_complete=no
9241 else
9242 gl_cv_header_errno_h_complete=yes
9243 fi
9244 rm -f conftest*
9245
9246
9247 fi
9248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
9249 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
9250 if test $gl_cv_header_errno_h_complete = yes; then
9251 ERRNO_H=''
9252 else
9253
9254
9255
9256
9257
9258
9259
9260
9261 if test $gl_cv_have_include_next = yes; then
9262 gl_cv_next_errno_h='<'errno.h'>'
9263 else
9264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
9265 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
9266 if ${gl_cv_next_errno_h+:} false; then :
9267 $as_echo_n "(cached) " >&6
9268 else
9269
9270
9271
9272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9273 /* end confdefs.h. */
9274 #include <errno.h>
9275 _ACEOF
9276 case "$host_os" in
9277 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9278 *) gl_absname_cpp="$ac_cpp" ;;
9279 esac
9280
9281 case "$host_os" in
9282 mingw*)
9283 gl_dirsep_regex='[/\\]'
9284 ;;
9285 *)
9286 gl_dirsep_regex='\/'
9287 ;;
9288 esac
9289 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9290 gl_header_literal_regex=`echo 'errno.h' \
9291 | sed -e "$gl_make_literal_regex_sed"`
9292 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9293 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9294 s|^/[^/]|//&|
9295 p
9296 q
9297 }'
9298
9299 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9300 sed -n "$gl_absolute_header_sed"`
9301
9302 gl_header=$gl_cv_absolute_errno_h
9303 gl_cv_next_errno_h='"'$gl_header'"'
9304
9305
9306 fi
9307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
9308 $as_echo "$gl_cv_next_errno_h" >&6; }
9309 fi
9310 NEXT_ERRNO_H=$gl_cv_next_errno_h
9311
9312 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9313 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9314 gl_next_as_first_directive='<'errno.h'>'
9315 else
9316 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9317 gl_next_as_first_directive=$gl_cv_next_errno_h
9318 fi
9319 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
9320
9321
9322
9323
9324 ERRNO_H='errno.h'
9325 fi
9326
9327 if test -n "$ERRNO_H"; then
9328 GL_GENERATE_ERRNO_H_TRUE=
9329 GL_GENERATE_ERRNO_H_FALSE='#'
9330 else
9331 GL_GENERATE_ERRNO_H_TRUE='#'
9332 GL_GENERATE_ERRNO_H_FALSE=
9333 fi
9334
9335
9336 if test -n "$ERRNO_H"; then
9337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
9338 $as_echo_n "checking for EMULTIHOP value... " >&6; }
9339 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
9340 $as_echo_n "(cached) " >&6
9341 else
9342
9343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9344 /* end confdefs.h. */
9345
9346 #include <errno.h>
9347 #ifdef EMULTIHOP
9348 yes
9349 #endif
9350
9351 _ACEOF
9352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9353 $EGREP "yes" >/dev/null 2>&1; then :
9354 gl_cv_header_errno_h_EMULTIHOP=yes
9355 else
9356 gl_cv_header_errno_h_EMULTIHOP=no
9357 fi
9358 rm -f conftest*
9359
9360 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
9361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9362 /* end confdefs.h. */
9363
9364 #define _XOPEN_SOURCE_EXTENDED 1
9365 #include <errno.h>
9366 #ifdef EMULTIHOP
9367 yes
9368 #endif
9369
9370 _ACEOF
9371 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9372 $EGREP "yes" >/dev/null 2>&1; then :
9373 gl_cv_header_errno_h_EMULTIHOP=hidden
9374 fi
9375 rm -f conftest*
9376
9377 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
9378 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
9379 #define _XOPEN_SOURCE_EXTENDED 1
9380 #include <errno.h>
9381 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9382 #include <stdio.h>
9383 #include <stdlib.h>
9384 "; then :
9385
9386 fi
9387
9388 fi
9389 fi
9390
9391 fi
9392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
9393 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
9394 case $gl_cv_header_errno_h_EMULTIHOP in
9395 yes | no)
9396 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
9397 ;;
9398 *)
9399 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
9400 ;;
9401 esac
9402
9403
9404 fi
9405
9406
9407 if test -n "$ERRNO_H"; then
9408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
9409 $as_echo_n "checking for ENOLINK value... " >&6; }
9410 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
9411 $as_echo_n "(cached) " >&6
9412 else
9413
9414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9415 /* end confdefs.h. */
9416
9417 #include <errno.h>
9418 #ifdef ENOLINK
9419 yes
9420 #endif
9421
9422 _ACEOF
9423 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9424 $EGREP "yes" >/dev/null 2>&1; then :
9425 gl_cv_header_errno_h_ENOLINK=yes
9426 else
9427 gl_cv_header_errno_h_ENOLINK=no
9428 fi
9429 rm -f conftest*
9430
9431 if test $gl_cv_header_errno_h_ENOLINK = no; then
9432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9433 /* end confdefs.h. */
9434
9435 #define _XOPEN_SOURCE_EXTENDED 1
9436 #include <errno.h>
9437 #ifdef ENOLINK
9438 yes
9439 #endif
9440
9441 _ACEOF
9442 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9443 $EGREP "yes" >/dev/null 2>&1; then :
9444 gl_cv_header_errno_h_ENOLINK=hidden
9445 fi
9446 rm -f conftest*
9447
9448 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
9449 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
9450 #define _XOPEN_SOURCE_EXTENDED 1
9451 #include <errno.h>
9452 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9453 #include <stdio.h>
9454 #include <stdlib.h>
9455 "; then :
9456
9457 fi
9458
9459 fi
9460 fi
9461
9462 fi
9463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
9464 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
9465 case $gl_cv_header_errno_h_ENOLINK in
9466 yes | no)
9467 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
9468 ;;
9469 *)
9470 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
9471 ;;
9472 esac
9473
9474
9475 fi
9476
9477
9478 if test -n "$ERRNO_H"; then
9479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
9480 $as_echo_n "checking for EOVERFLOW value... " >&6; }
9481 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
9482 $as_echo_n "(cached) " >&6
9483 else
9484
9485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9486 /* end confdefs.h. */
9487
9488 #include <errno.h>
9489 #ifdef EOVERFLOW
9490 yes
9491 #endif
9492
9493 _ACEOF
9494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9495 $EGREP "yes" >/dev/null 2>&1; then :
9496 gl_cv_header_errno_h_EOVERFLOW=yes
9497 else
9498 gl_cv_header_errno_h_EOVERFLOW=no
9499 fi
9500 rm -f conftest*
9501
9502 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
9503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9504 /* end confdefs.h. */
9505
9506 #define _XOPEN_SOURCE_EXTENDED 1
9507 #include <errno.h>
9508 #ifdef EOVERFLOW
9509 yes
9510 #endif
9511
9512 _ACEOF
9513 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9514 $EGREP "yes" >/dev/null 2>&1; then :
9515 gl_cv_header_errno_h_EOVERFLOW=hidden
9516 fi
9517 rm -f conftest*
9518
9519 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
9520 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
9521 #define _XOPEN_SOURCE_EXTENDED 1
9522 #include <errno.h>
9523 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9524 #include <stdio.h>
9525 #include <stdlib.h>
9526 "; then :
9527
9528 fi
9529
9530 fi
9531 fi
9532
9533 fi
9534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
9535 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
9536 case $gl_cv_header_errno_h_EOVERFLOW in
9537 yes | no)
9538 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
9539 ;;
9540 *)
9541 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
9542 ;;
9543 esac
9544
9545
9546 fi
9547
9548
9549 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
9550 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
9551 ac_have_decl=1
9552 else
9553 ac_have_decl=0
9554 fi
9555
9556 cat >>confdefs.h <<_ACEOF
9557 #define HAVE_DECL_STRERROR_R $ac_have_decl
9558 _ACEOF
9559
9560 for ac_func in strerror_r
9561 do :
9562 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
9563 if test "x$ac_cv_func_strerror_r" = xyes; then :
9564 cat >>confdefs.h <<_ACEOF
9565 #define HAVE_STRERROR_R 1
9566 _ACEOF
9567
9568 fi
9569 done
9570
9571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
9572 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
9573 if ${ac_cv_func_strerror_r_char_p+:} false; then :
9574 $as_echo_n "(cached) " >&6
9575 else
9576
9577 ac_cv_func_strerror_r_char_p=no
9578 if test $ac_cv_have_decl_strerror_r = yes; then
9579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9580 /* end confdefs.h. */
9581 $ac_includes_default
9582 int
9583 main ()
9584 {
9585
9586 char buf[100];
9587 char x = *strerror_r (0, buf, sizeof buf);
9588 char *p = strerror_r (0, buf, sizeof buf);
9589 return !p || x;
9590
9591 ;
9592 return 0;
9593 }
9594 _ACEOF
9595 if ac_fn_c_try_compile "$LINENO"; then :
9596 ac_cv_func_strerror_r_char_p=yes
9597 fi
9598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9599 else
9600 # strerror_r is not declared. Choose between
9601 # systems that have relatively inaccessible declarations for the
9602 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
9603 # former has a strerror_r that returns char*, while the latter
9604 # has a strerror_r that returns `int'.
9605 # This test should segfault on the DEC system.
9606 if test "$cross_compiling" = yes; then :
9607 :
9608 else
9609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9610 /* end confdefs.h. */
9611 $ac_includes_default
9612 extern char *strerror_r ();
9613 int
9614 main ()
9615 {
9616 char buf[100];
9617 char x = *strerror_r (0, buf, sizeof buf);
9618 return ! isalpha (x);
9619 ;
9620 return 0;
9621 }
9622 _ACEOF
9623 if ac_fn_c_try_run "$LINENO"; then :
9624 ac_cv_func_strerror_r_char_p=yes
9625 fi
9626 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9627 conftest.$ac_objext conftest.beam conftest.$ac_ext
9628 fi
9629
9630 fi
9631
9632 fi
9633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
9634 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
9635 if test $ac_cv_func_strerror_r_char_p = yes; then
9636
9637 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
9638
9639 fi
9640
9641
9642
9643
9644 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
9645 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
9646 ac_have_decl=1
9647 else
9648 ac_have_decl=0
9649 fi
9650
9651 cat >>confdefs.h <<_ACEOF
9652 #define HAVE_DECL_FCHDIR $ac_have_decl
9653 _ACEOF
9654
9655
9656 GNULIB_CREAT=0;
9657 GNULIB_FCNTL=0;
9658 GNULIB_NONBLOCKING=0;
9659 GNULIB_OPEN=0;
9660 GNULIB_OPENAT=0;
9661 GNULIB_MDA_CREAT=1;
9662 GNULIB_MDA_OPEN=1;
9663 HAVE_FCNTL=1;
9664 HAVE_OPENAT=1;
9665 REPLACE_CREAT=0;
9666 REPLACE_FCNTL=0;
9667 REPLACE_OPEN=0;
9668 REPLACE_OPENAT=0;
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
9680 $as_echo_n "checking for working fcntl.h... " >&6; }
9681 if ${gl_cv_header_working_fcntl_h+:} false; then :
9682 $as_echo_n "(cached) " >&6
9683 else
9684 if test "$cross_compiling" = yes; then :
9685 case "$host_os" in
9686 # Guess 'no' on native Windows.
9687 mingw*) gl_cv_header_working_fcntl_h='no' ;;
9688 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
9689 esac
9690
9691 else
9692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9693 /* end confdefs.h. */
9694 #include <sys/types.h>
9695 #include <sys/stat.h>
9696 #if HAVE_UNISTD_H
9697 # include <unistd.h>
9698 #else /* on Windows with MSVC */
9699 # include <io.h>
9700 # include <stdlib.h>
9701 # defined sleep(n) _sleep ((n) * 1000)
9702 #endif
9703 #include <fcntl.h>
9704
9705
9706 $gl_mda_defines
9707
9708 #ifndef O_NOATIME
9709 #define O_NOATIME 0
9710 #endif
9711 #ifndef O_NOFOLLOW
9712 #define O_NOFOLLOW 0
9713 #endif
9714 static int const constants[] =
9715 {
9716 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
9717 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
9718 };
9719
9720 int
9721 main ()
9722 {
9723
9724 int result = !constants;
9725 #if HAVE_SYMLINK
9726 {
9727 static char const sym[] = "conftest.sym";
9728 if (symlink ("/dev/null", sym) != 0)
9729 result |= 2;
9730 else
9731 {
9732 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
9733 if (fd >= 0)
9734 {
9735 close (fd);
9736 result |= 4;
9737 }
9738 }
9739 if (unlink (sym) != 0 || symlink (".", sym) != 0)
9740 result |= 2;
9741 else
9742 {
9743 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
9744 if (fd >= 0)
9745 {
9746 close (fd);
9747 result |= 4;
9748 }
9749 }
9750 unlink (sym);
9751 }
9752 #endif
9753 {
9754 static char const file[] = "confdefs.h";
9755 int fd = open (file, O_RDONLY | O_NOATIME);
9756 if (fd < 0)
9757 result |= 8;
9758 else
9759 {
9760 struct stat st0;
9761 if (fstat (fd, &st0) != 0)
9762 result |= 16;
9763 else
9764 {
9765 char c;
9766 sleep (1);
9767 if (read (fd, &c, 1) != 1)
9768 result |= 24;
9769 else
9770 {
9771 if (close (fd) != 0)
9772 result |= 32;
9773 else
9774 {
9775 struct stat st1;
9776 if (stat (file, &st1) != 0)
9777 result |= 40;
9778 else
9779 if (st0.st_atime != st1.st_atime)
9780 result |= 64;
9781 }
9782 }
9783 }
9784 }
9785 }
9786 return result;
9787 ;
9788 return 0;
9789 }
9790 _ACEOF
9791 if ac_fn_c_try_run "$LINENO"; then :
9792 gl_cv_header_working_fcntl_h=yes
9793 else
9794 case $? in #(
9795 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
9796 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
9797 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
9798 *) gl_cv_header_working_fcntl_h='no';;
9799 esac
9800 fi
9801 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9802 conftest.$ac_objext conftest.beam conftest.$ac_ext
9803 fi
9804
9805
9806 fi
9807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
9808 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
9809
9810 case $gl_cv_header_working_fcntl_h in #(
9811 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
9812 *) ac_val=1;;
9813 esac
9814
9815 cat >>confdefs.h <<_ACEOF
9816 #define HAVE_WORKING_O_NOATIME $ac_val
9817 _ACEOF
9818
9819
9820 case $gl_cv_header_working_fcntl_h in #(
9821 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
9822 *) ac_val=1;;
9823 esac
9824
9825 cat >>confdefs.h <<_ACEOF
9826 #define HAVE_WORKING_O_NOFOLLOW $ac_val
9827 _ACEOF
9828
9829
9830
9831 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
9832 "
9833 if test "x$ac_cv_type_pid_t" = xyes; then :
9834
9835 else
9836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9837 /* end confdefs.h. */
9838
9839 #if defined _WIN64 && !defined __CYGWIN__
9840 LLP64
9841 #endif
9842
9843 int
9844 main ()
9845 {
9846
9847 ;
9848 return 0;
9849 }
9850
9851 _ACEOF
9852 if ac_fn_c_try_compile "$LINENO"; then :
9853 gl_pid_type='int'
9854 else
9855 gl_pid_type='__int64'
9856 fi
9857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9858
9859 cat >>confdefs.h <<_ACEOF
9860 #define pid_t $gl_pid_type
9861 _ACEOF
9862
9863
9864 fi
9865
9866
9867 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
9868 if test "x$ac_cv_type_mode_t" = xyes; then :
9869
9870 else
9871
9872 cat >>confdefs.h <<_ACEOF
9873 #define mode_t int
9874 _ACEOF
9875
9876 fi
9877
9878
9879
9880
9881 GNULIB_FFS=0;
9882 HAVE_FFS=1;
9883 HAVE_STRCASECMP=1;
9884 HAVE_DECL_STRNCASECMP=1;
9885
9886
9887
9888
9889 GNULIB_FNMATCH=0;
9890 HAVE_FNMATCH=1;
9891 REPLACE_FNMATCH=0;
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908 if test $gl_cv_have_include_next = yes; then
9909 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
9910 else
9911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
9912 $as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
9913 if ${gl_cv_next_fnmatch_h+:} false; then :
9914 $as_echo_n "(cached) " >&6
9915 else
9916
9917 if test $ac_cv_header_fnmatch_h = yes; then
9918
9919
9920
9921
9922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9923 /* end confdefs.h. */
9924 #include <fnmatch.h>
9925 _ACEOF
9926 case "$host_os" in
9927 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9928 *) gl_absname_cpp="$ac_cpp" ;;
9929 esac
9930
9931 case "$host_os" in
9932 mingw*)
9933 gl_dirsep_regex='[/\\]'
9934 ;;
9935 *)
9936 gl_dirsep_regex='\/'
9937 ;;
9938 esac
9939 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9940 gl_header_literal_regex=`echo 'fnmatch.h' \
9941 | sed -e "$gl_make_literal_regex_sed"`
9942 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9943 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9944 s|^/[^/]|//&|
9945 p
9946 q
9947 }'
9948
9949 gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9950 sed -n "$gl_absolute_header_sed"`
9951
9952 gl_header=$gl_cv_absolute_fnmatch_h
9953 gl_cv_next_fnmatch_h='"'$gl_header'"'
9954 else
9955 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
9956 fi
9957
9958
9959 fi
9960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
9961 $as_echo "$gl_cv_next_fnmatch_h" >&6; }
9962 fi
9963 NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
9964
9965 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9966 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9967 gl_next_as_first_directive='<'fnmatch.h'>'
9968 else
9969 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9970 gl_next_as_first_directive=$gl_cv_next_fnmatch_h
9971 fi
9972 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
9973
9974
9975
9976
9977
9978
9979
9980 if test $ac_cv_header_fnmatch_h = yes; then
9981 HAVE_FNMATCH_H=1
9982 else
9983 HAVE_FNMATCH_H=0
9984 fi
9985
9986
9987 FNMATCH_H=''
9988 if false; then
9989 FNMATCH_H=fnmatch.h
9990 else
9991 if test $ac_cv_header_fnmatch_h != yes; then
9992 FNMATCH_H=fnmatch.h
9993 fi
9994 fi
9995
9996
9997 if test -n "$FNMATCH_H"; then
9998 GL_GENERATE_FNMATCH_H_TRUE=
9999 GL_GENERATE_FNMATCH_H_FALSE='#'
10000 else
10001 GL_GENERATE_FNMATCH_H_TRUE='#'
10002 GL_GENERATE_FNMATCH_H_FALSE=
10003 fi
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
10015 $as_echo_n "checking for mbstate_t... " >&6; }
10016 if ${ac_cv_type_mbstate_t+:} false; then :
10017 $as_echo_n "(cached) " >&6
10018 else
10019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10020 /* end confdefs.h. */
10021 $ac_includes_default
10022 #include <wchar.h>
10023 int
10024 main ()
10025 {
10026 mbstate_t x; return sizeof x;
10027 ;
10028 return 0;
10029 }
10030 _ACEOF
10031 if ac_fn_c_try_compile "$LINENO"; then :
10032 ac_cv_type_mbstate_t=yes
10033 else
10034 ac_cv_type_mbstate_t=no
10035 fi
10036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10037 fi
10038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
10039 $as_echo "$ac_cv_type_mbstate_t" >&6; }
10040 if test $ac_cv_type_mbstate_t = yes; then
10041
10042 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
10043
10044 else
10045
10046 $as_echo "#define mbstate_t int" >>confdefs.h
10047
10048 fi
10049
10050
10051
10052
10053 GNULIB_ACOSF=0;
10054 GNULIB_ACOSL=0;
10055 GNULIB_ASINF=0;
10056 GNULIB_ASINL=0;
10057 GNULIB_ATANF=0;
10058 GNULIB_ATANL=0;
10059 GNULIB_ATAN2F=0;
10060 GNULIB_CBRT=0;
10061 GNULIB_CBRTF=0;
10062 GNULIB_CBRTL=0;
10063 GNULIB_CEIL=0;
10064 GNULIB_CEILF=0;
10065 GNULIB_CEILL=0;
10066 GNULIB_COPYSIGN=0;
10067 GNULIB_COPYSIGNF=0;
10068 GNULIB_COPYSIGNL=0;
10069 GNULIB_COSF=0;
10070 GNULIB_COSL=0;
10071 GNULIB_COSHF=0;
10072 GNULIB_EXPF=0;
10073 GNULIB_EXPL=0;
10074 GNULIB_EXP2=0;
10075 GNULIB_EXP2F=0;
10076 GNULIB_EXP2L=0;
10077 GNULIB_EXPM1=0;
10078 GNULIB_EXPM1F=0;
10079 GNULIB_EXPM1L=0;
10080 GNULIB_FABSF=0;
10081 GNULIB_FABSL=0;
10082 GNULIB_FLOOR=0;
10083 GNULIB_FLOORF=0;
10084 GNULIB_FLOORL=0;
10085 GNULIB_FMA=0;
10086 GNULIB_FMAF=0;
10087 GNULIB_FMAL=0;
10088 GNULIB_FMOD=0;
10089 GNULIB_FMODF=0;
10090 GNULIB_FMODL=0;
10091 GNULIB_FREXPF=0;
10092 GNULIB_FREXP=0;
10093 GNULIB_FREXPL=0;
10094 GNULIB_HYPOT=0;
10095 GNULIB_HYPOTF=0;
10096 GNULIB_HYPOTL=0;
10097 GNULIB_ILOGB=0;
10098 GNULIB_ILOGBF=0;
10099 GNULIB_ILOGBL=0;
10100 GNULIB_ISFINITE=0;
10101 GNULIB_ISINF=0;
10102 GNULIB_ISNAN=0;
10103 GNULIB_ISNANF=0;
10104 GNULIB_ISNAND=0;
10105 GNULIB_ISNANL=0;
10106 GNULIB_LDEXPF=0;
10107 GNULIB_LDEXPL=0;
10108 GNULIB_LOG=0;
10109 GNULIB_LOGF=0;
10110 GNULIB_LOGL=0;
10111 GNULIB_LOG10=0;
10112 GNULIB_LOG10F=0;
10113 GNULIB_LOG10L=0;
10114 GNULIB_LOG1P=0;
10115 GNULIB_LOG1PF=0;
10116 GNULIB_LOG1PL=0;
10117 GNULIB_LOG2=0;
10118 GNULIB_LOG2F=0;
10119 GNULIB_LOG2L=0;
10120 GNULIB_LOGB=0;
10121 GNULIB_LOGBF=0;
10122 GNULIB_LOGBL=0;
10123 GNULIB_MODF=0;
10124 GNULIB_MODFF=0;
10125 GNULIB_MODFL=0;
10126 GNULIB_POWF=0;
10127 GNULIB_REMAINDER=0;
10128 GNULIB_REMAINDERF=0;
10129 GNULIB_REMAINDERL=0;
10130 GNULIB_RINT=0;
10131 GNULIB_RINTF=0;
10132 GNULIB_RINTL=0;
10133 GNULIB_ROUND=0;
10134 GNULIB_ROUNDF=0;
10135 GNULIB_ROUNDL=0;
10136 GNULIB_SIGNBIT=0;
10137 GNULIB_SINF=0;
10138 GNULIB_SINL=0;
10139 GNULIB_SINHF=0;
10140 GNULIB_SQRTF=0;
10141 GNULIB_SQRTL=0;
10142 GNULIB_TANF=0;
10143 GNULIB_TANL=0;
10144 GNULIB_TANHF=0;
10145 GNULIB_TRUNC=0;
10146 GNULIB_TRUNCF=0;
10147 GNULIB_TRUNCL=0;
10148 GNULIB_MDA_J0=1;
10149 GNULIB_MDA_J1=1;
10150 GNULIB_MDA_JN=1;
10151 GNULIB_MDA_Y0=1;
10152 GNULIB_MDA_Y1=1;
10153 GNULIB_MDA_YN=1;
10154 HAVE_ACOSF=1;
10155 HAVE_ACOSL=1;
10156 HAVE_ASINF=1;
10157 HAVE_ASINL=1;
10158 HAVE_ATANF=1;
10159 HAVE_ATANL=1;
10160 HAVE_ATAN2F=1;
10161 HAVE_CBRT=1;
10162 HAVE_CBRTF=1;
10163 HAVE_CBRTL=1;
10164 HAVE_COPYSIGN=1;
10165 HAVE_COPYSIGNL=1;
10166 HAVE_COSF=1;
10167 HAVE_COSL=1;
10168 HAVE_COSHF=1;
10169 HAVE_EXPF=1;
10170 HAVE_EXPL=1;
10171 HAVE_EXPM1=1;
10172 HAVE_EXPM1F=1;
10173 HAVE_FABSF=1;
10174 HAVE_FABSL=1;
10175 HAVE_FMA=1;
10176 HAVE_FMAF=1;
10177 HAVE_FMAL=1;
10178 HAVE_FMODF=1;
10179 HAVE_FMODL=1;
10180 HAVE_FREXPF=1;
10181 HAVE_HYPOTF=1;
10182 HAVE_HYPOTL=1;
10183 HAVE_ILOGB=1;
10184 HAVE_ILOGBF=1;
10185 HAVE_ILOGBL=1;
10186 HAVE_ISNANF=1;
10187 HAVE_ISNAND=1;
10188 HAVE_ISNANL=1;
10189 HAVE_LDEXPF=1;
10190 HAVE_LOGF=1;
10191 HAVE_LOGL=1;
10192 HAVE_LOG10F=1;
10193 HAVE_LOG10L=1;
10194 HAVE_LOG1P=1;
10195 HAVE_LOG1PF=1;
10196 HAVE_LOG1PL=1;
10197 HAVE_LOGBF=1;
10198 HAVE_LOGBL=1;
10199 HAVE_MODFF=1;
10200 HAVE_MODFL=1;
10201 HAVE_POWF=1;
10202 HAVE_REMAINDER=1;
10203 HAVE_REMAINDERF=1;
10204 HAVE_RINT=1;
10205 HAVE_RINTL=1;
10206 HAVE_SINF=1;
10207 HAVE_SINL=1;
10208 HAVE_SINHF=1;
10209 HAVE_SQRTF=1;
10210 HAVE_SQRTL=1;
10211 HAVE_TANF=1;
10212 HAVE_TANL=1;
10213 HAVE_TANHF=1;
10214 HAVE_DECL_ACOSL=1;
10215 HAVE_DECL_ASINL=1;
10216 HAVE_DECL_ATANL=1;
10217 HAVE_DECL_CBRTF=1;
10218 HAVE_DECL_CBRTL=1;
10219 HAVE_DECL_CEILF=1;
10220 HAVE_DECL_CEILL=1;
10221 HAVE_DECL_COPYSIGNF=1;
10222 HAVE_DECL_COSL=1;
10223 HAVE_DECL_EXPL=1;
10224 HAVE_DECL_EXP2=1;
10225 HAVE_DECL_EXP2F=1;
10226 HAVE_DECL_EXP2L=1;
10227 HAVE_DECL_EXPM1L=1;
10228 HAVE_DECL_FLOORF=1;
10229 HAVE_DECL_FLOORL=1;
10230 HAVE_DECL_FREXPL=1;
10231 HAVE_DECL_LDEXPL=1;
10232 HAVE_DECL_LOGL=1;
10233 HAVE_DECL_LOG10L=1;
10234 HAVE_DECL_LOG2=1;
10235 HAVE_DECL_LOG2F=1;
10236 HAVE_DECL_LOG2L=1;
10237 HAVE_DECL_LOGB=1;
10238 HAVE_DECL_REMAINDER=1;
10239 HAVE_DECL_REMAINDERL=1;
10240 HAVE_DECL_RINTF=1;
10241 HAVE_DECL_ROUND=1;
10242 HAVE_DECL_ROUNDF=1;
10243 HAVE_DECL_ROUNDL=1;
10244 HAVE_DECL_SINL=1;
10245 HAVE_DECL_SQRTL=1;
10246 HAVE_DECL_TANL=1;
10247 HAVE_DECL_TRUNC=1;
10248 HAVE_DECL_TRUNCF=1;
10249 HAVE_DECL_TRUNCL=1;
10250 REPLACE_ACOSF=0;
10251 REPLACE_ASINF=0;
10252 REPLACE_ATANF=0;
10253 REPLACE_ATAN2F=0;
10254 REPLACE_CBRTF=0;
10255 REPLACE_CBRTL=0;
10256 REPLACE_CEIL=0;
10257 REPLACE_CEILF=0;
10258 REPLACE_CEILL=0;
10259 REPLACE_COSF=0;
10260 REPLACE_COSHF=0;
10261 REPLACE_EXPF=0;
10262 REPLACE_EXPL=0;
10263 REPLACE_EXPM1=0;
10264 REPLACE_EXPM1F=0;
10265 REPLACE_EXPM1L=0;
10266 REPLACE_EXP2=0;
10267 REPLACE_EXP2L=0;
10268 REPLACE_FABSL=0;
10269 REPLACE_FLOOR=0;
10270 REPLACE_FLOORF=0;
10271 REPLACE_FLOORL=0;
10272 REPLACE_FMA=0;
10273 REPLACE_FMAF=0;
10274 REPLACE_FMAL=0;
10275 REPLACE_FMOD=0;
10276 REPLACE_FMODF=0;
10277 REPLACE_FMODL=0;
10278 REPLACE_FREXPF=0;
10279 REPLACE_FREXP=0;
10280 REPLACE_FREXPL=0;
10281 REPLACE_HUGE_VAL=0;
10282 REPLACE_HYPOT=0;
10283 REPLACE_HYPOTF=0;
10284 REPLACE_HYPOTL=0;
10285 REPLACE_ILOGB=0;
10286 REPLACE_ILOGBF=0;
10287 REPLACE_ILOGBL=0;
10288 REPLACE_ISFINITE=0;
10289 REPLACE_ISINF=0;
10290 REPLACE_ISNAN=0;
10291 REPLACE_LDEXPL=0;
10292 REPLACE_LOG=0;
10293 REPLACE_LOGF=0;
10294 REPLACE_LOGL=0;
10295 REPLACE_LOG10=0;
10296 REPLACE_LOG10F=0;
10297 REPLACE_LOG10L=0;
10298 REPLACE_LOG1P=0;
10299 REPLACE_LOG1PF=0;
10300 REPLACE_LOG1PL=0;
10301 REPLACE_LOG2=0;
10302 REPLACE_LOG2F=0;
10303 REPLACE_LOG2L=0;
10304 REPLACE_LOGB=0;
10305 REPLACE_LOGBF=0;
10306 REPLACE_LOGBL=0;
10307 REPLACE_MODF=0;
10308 REPLACE_MODFF=0;
10309 REPLACE_MODFL=0;
10310 REPLACE_NAN=0;
10311 REPLACE_REMAINDER=0;
10312 REPLACE_REMAINDERF=0;
10313 REPLACE_REMAINDERL=0;
10314 REPLACE_RINTL=0;
10315 REPLACE_ROUND=0;
10316 REPLACE_ROUNDF=0;
10317 REPLACE_ROUNDL=0;
10318 REPLACE_SIGNBIT=0;
10319 REPLACE_SIGNBIT_USING_BUILTINS=0;
10320 REPLACE_SINF=0;
10321 REPLACE_SINHF=0;
10322 REPLACE_SQRTF=0;
10323 REPLACE_SQRTL=0;
10324 REPLACE_TANF=0;
10325 REPLACE_TANHF=0;
10326 REPLACE_TRUNC=0;
10327 REPLACE_TRUNCF=0;
10328 REPLACE_TRUNCL=0;
10329
10330
10331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
10332 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
10333 if ${gl_cv_func_frexp_no_libm+:} false; then :
10334 $as_echo_n "(cached) " >&6
10335 else
10336
10337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10338 /* end confdefs.h. */
10339 #include <math.h>
10340 double x;
10341 int
10342 main ()
10343 {
10344 int e; return frexp (x, &e) > 0;
10345 ;
10346 return 0;
10347 }
10348 _ACEOF
10349 if ac_fn_c_try_link "$LINENO"; then :
10350 gl_cv_func_frexp_no_libm=yes
10351 else
10352 gl_cv_func_frexp_no_libm=no
10353 fi
10354 rm -f core conftest.err conftest.$ac_objext \
10355 conftest$ac_exeext conftest.$ac_ext
10356
10357 fi
10358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
10359 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
10360
10361 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
10362 if test "x$ac_cv_have_decl_alarm" = xyes; then :
10363 ac_have_decl=1
10364 else
10365 ac_have_decl=0
10366 fi
10367
10368 cat >>confdefs.h <<_ACEOF
10369 #define HAVE_DECL_ALARM $ac_have_decl
10370 _ACEOF
10371
10372
10373
10374
10375 FREXP_LIBM=
10376 if test $gl_cv_func_frexp_no_libm = no; then
10377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
10378 $as_echo_n "checking whether frexp() can be used with libm... " >&6; }
10379 if ${gl_cv_func_frexp_in_libm+:} false; then :
10380 $as_echo_n "(cached) " >&6
10381 else
10382
10383 save_LIBS="$LIBS"
10384 LIBS="$LIBS -lm"
10385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10386 /* end confdefs.h. */
10387 #include <math.h>
10388 double x;
10389 int
10390 main ()
10391 {
10392 int e; return frexp (x, &e) > 0;
10393 ;
10394 return 0;
10395 }
10396 _ACEOF
10397 if ac_fn_c_try_link "$LINENO"; then :
10398 gl_cv_func_frexp_in_libm=yes
10399 else
10400 gl_cv_func_frexp_in_libm=no
10401 fi
10402 rm -f core conftest.err conftest.$ac_objext \
10403 conftest$ac_exeext conftest.$ac_ext
10404 LIBS="$save_LIBS"
10405
10406 fi
10407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
10408 $as_echo "$gl_cv_func_frexp_in_libm" >&6; }
10409 if test $gl_cv_func_frexp_in_libm = yes; then
10410 FREXP_LIBM=-lm
10411 fi
10412 fi
10413 if test $gl_cv_func_frexp_no_libm = yes \
10414 || test $gl_cv_func_frexp_in_libm = yes; then
10415 save_LIBS="$LIBS"
10416 LIBS="$LIBS $FREXP_LIBM"
10417
10418
10419
10420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
10421 $as_echo_n "checking whether frexp works... " >&6; }
10422 if ${gl_cv_func_frexp_works+:} false; then :
10423 $as_echo_n "(cached) " >&6
10424 else
10425
10426 if test "$cross_compiling" = yes; then :
10427 case "$host_os" in
10428 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
10429 mingw*) # Guess yes with MSVC, no with mingw.
10430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10431 /* end confdefs.h. */
10432
10433 #ifdef _MSC_VER
10434 Good
10435 #endif
10436
10437 _ACEOF
10438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10439 $EGREP "Good" >/dev/null 2>&1; then :
10440 gl_cv_func_frexp_works="guessing yes"
10441 else
10442 gl_cv_func_frexp_works="guessing no"
10443 fi
10444 rm -f conftest*
10445
10446 ;;
10447 *) gl_cv_func_frexp_works="guessing yes" ;;
10448 esac
10449
10450 else
10451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10452 /* end confdefs.h. */
10453
10454 #include <float.h>
10455 #include <math.h>
10456 #include <string.h>
10457 #if HAVE_DECL_ALARM
10458 # include <signal.h>
10459 # include <unistd.h>
10460 #endif
10461 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
10462 ICC 10.0 has a bug when optimizing the expression -zero.
10463 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
10464 to PowerPC on Mac OS X 10.5. */
10465 #if defined __hpux || defined __sgi || defined __ICC
10466 static double
10467 compute_minus_zero (void)
10468 {
10469 return -DBL_MIN * DBL_MIN;
10470 }
10471 # define minus_zero compute_minus_zero ()
10472 #else
10473 double minus_zero = -0.0;
10474 #endif
10475 int main()
10476 {
10477 int result = 0;
10478 int i;
10479 volatile double x;
10480 double zero = 0.0;
10481 #if HAVE_DECL_ALARM
10482 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
10483 number. Let the test fail in this case. */
10484 signal (SIGALRM, SIG_DFL);
10485 alarm (5);
10486 #endif
10487 /* Test on denormalized numbers. */
10488 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
10489 ;
10490 if (x > 0.0)
10491 {
10492 int exp;
10493 double y = frexp (x, &exp);
10494 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
10495 On NetBSD: y = 0.75. Correct: y = 0.5. */
10496 if (y != 0.5)
10497 result |= 1;
10498 }
10499 /* Test on infinite numbers. */
10500 x = 1.0 / zero;
10501 {
10502 int exp;
10503 double y = frexp (x, &exp);
10504 if (y != x)
10505 result |= 2;
10506 }
10507 /* Test on negative zero. */
10508 x = minus_zero;
10509 {
10510 int exp;
10511 double y = frexp (x, &exp);
10512 if (memcmp (&y, &x, sizeof x))
10513 result |= 4;
10514 }
10515 return result;
10516 }
10517 _ACEOF
10518 if ac_fn_c_try_run "$LINENO"; then :
10519 gl_cv_func_frexp_works=yes
10520 else
10521 gl_cv_func_frexp_works=no
10522 fi
10523 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10524 conftest.$ac_objext conftest.beam conftest.$ac_ext
10525 fi
10526
10527
10528 fi
10529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
10530 $as_echo "$gl_cv_func_frexp_works" >&6; }
10531
10532 LIBS="$save_LIBS"
10533 case "$gl_cv_func_frexp_works" in
10534 *yes) gl_func_frexp=yes ;;
10535 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
10536 esac
10537 else
10538 gl_func_frexp=no
10539 fi
10540 if test $gl_func_frexp = yes; then
10541
10542 $as_echo "#define HAVE_FREXP 1" >>confdefs.h
10543
10544 fi
10545
10546
10547
10548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
10549 $as_echo_n "checking whether long double and double are the same... " >&6; }
10550 if ${gl_cv_long_double_equals_double+:} false; then :
10551 $as_echo_n "(cached) " >&6
10552 else
10553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10554 /* end confdefs.h. */
10555 #include <float.h>
10556 int
10557 main ()
10558 {
10559 typedef int check[sizeof (long double) == sizeof (double)
10560 && LDBL_MANT_DIG == DBL_MANT_DIG
10561 && LDBL_MAX_EXP == DBL_MAX_EXP
10562 && LDBL_MIN_EXP == DBL_MIN_EXP
10563 ? 1 : -1];
10564
10565 ;
10566 return 0;
10567 }
10568 _ACEOF
10569 if ac_fn_c_try_compile "$LINENO"; then :
10570 gl_cv_long_double_equals_double=yes
10571 else
10572 gl_cv_long_double_equals_double=no
10573 fi
10574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10575
10576 fi
10577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
10578 $as_echo "$gl_cv_long_double_equals_double" >&6; }
10579 if test $gl_cv_long_double_equals_double = yes; then
10580
10581 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
10582
10583 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
10584 else
10585 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
10586 fi
10587
10588
10589
10590
10591
10592
10593
10594
10595 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
10596 "
10597 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
10598
10599 else
10600 HAVE_DECL_FREXPL=0
10601 fi
10602
10603
10604 FREXPL_LIBM=
10605 if test $HAVE_DECL_FREXPL = 1; then
10606
10607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
10608 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
10609 if ${gl_cv_func_frexpl_no_libm+:} false; then :
10610 $as_echo_n "(cached) " >&6
10611 else
10612
10613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10614 /* end confdefs.h. */
10615 #include <math.h>
10616 long double x;
10617 int
10618 main ()
10619 {
10620 int e; return frexpl (x, &e) > 0;
10621 ;
10622 return 0;
10623 }
10624 _ACEOF
10625 if ac_fn_c_try_link "$LINENO"; then :
10626 gl_cv_func_frexpl_no_libm=yes
10627 else
10628 gl_cv_func_frexpl_no_libm=no
10629 fi
10630 rm -f core conftest.err conftest.$ac_objext \
10631 conftest$ac_exeext conftest.$ac_ext
10632
10633 fi
10634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
10635 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
10636
10637 if test $gl_cv_func_frexpl_no_libm = no; then
10638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
10639 $as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
10640 if ${gl_cv_func_frexpl_in_libm+:} false; then :
10641 $as_echo_n "(cached) " >&6
10642 else
10643
10644 save_LIBS="$LIBS"
10645 LIBS="$LIBS -lm"
10646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10647 /* end confdefs.h. */
10648 #include <math.h>
10649 long double x;
10650 int
10651 main ()
10652 {
10653 int e; return frexpl (x, &e) > 0;
10654 ;
10655 return 0;
10656 }
10657 _ACEOF
10658 if ac_fn_c_try_link "$LINENO"; then :
10659 gl_cv_func_frexpl_in_libm=yes
10660 else
10661 gl_cv_func_frexpl_in_libm=no
10662 fi
10663 rm -f core conftest.err conftest.$ac_objext \
10664 conftest$ac_exeext conftest.$ac_ext
10665 LIBS="$save_LIBS"
10666
10667 fi
10668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
10669 $as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
10670 if test $gl_cv_func_frexpl_in_libm = yes; then
10671 FREXPL_LIBM=-lm
10672 fi
10673 fi
10674 if test $gl_cv_func_frexpl_no_libm = yes \
10675 || test $gl_cv_func_frexpl_in_libm = yes; then
10676 save_LIBS="$LIBS"
10677 LIBS="$LIBS $FREXPL_LIBM"
10678
10679
10680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
10681 $as_echo_n "checking whether frexpl works... " >&6; }
10682 if ${gl_cv_func_frexpl_works+:} false; then :
10683 $as_echo_n "(cached) " >&6
10684 else
10685
10686 if test "$cross_compiling" = yes; then :
10687
10688 case "$host_os" in
10689 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
10690 gl_cv_func_frexpl_works="guessing no";;
10691 *) gl_cv_func_frexpl_works="guessing yes";;
10692 esac
10693
10694 else
10695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10696 /* end confdefs.h. */
10697
10698 #include <float.h>
10699 #include <math.h>
10700 /* Override the values of <float.h>, like done in float.in.h. */
10701 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
10702 # undef LDBL_MIN_EXP
10703 # define LDBL_MIN_EXP (-16381)
10704 #endif
10705 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
10706 # undef LDBL_MIN_EXP
10707 # define LDBL_MIN_EXP (-16381)
10708 #endif
10709 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
10710 # undef LDBL_MIN_EXP
10711 # define LDBL_MIN_EXP DBL_MIN_EXP
10712 #endif
10713 #if defined __sgi && (LDBL_MANT_DIG >= 106)
10714 # if defined __GNUC__
10715 # undef LDBL_MIN_EXP
10716 # define LDBL_MIN_EXP DBL_MIN_EXP
10717 # endif
10718 #endif
10719 extern
10720 #ifdef __cplusplus
10721 "C"
10722 #endif
10723 long double frexpl (long double, int *);
10724 long double zero = 0.0L;
10725 int main()
10726 {
10727 int result = 0;
10728 volatile long double x;
10729 /* Test on finite numbers that fails on AIX 5.1. */
10730 x = 16.0L;
10731 {
10732 int exp = -9999;
10733 frexpl (x, &exp);
10734 if (exp != 5)
10735 result |= 1;
10736 }
10737 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
10738 function returns an invalid (incorrectly normalized) value: it returns
10739 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
10740 but the correct result is
10741 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
10742 x = 1.01L;
10743 {
10744 int exp = -9999;
10745 long double y = frexpl (x, &exp);
10746 if (!(exp == 1 && y == 0.505L))
10747 result |= 2;
10748 }
10749 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
10750 LDBL_MAX_EXP = 16384.
10751 In the loop end test, we test x against Infinity, rather than comparing
10752 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
10753 {
10754 int i;
10755 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
10756 {
10757 int exp = -9999;
10758 frexpl (x, &exp);
10759 if (exp != i)
10760 {
10761 result |= 4;
10762 break;
10763 }
10764 }
10765 }
10766 /* Test on denormalized numbers. */
10767 {
10768 int i;
10769 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
10770 ;
10771 if (x > 0.0L)
10772 {
10773 int exp;
10774 long double y = frexpl (x, &exp);
10775 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
10776 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
10777 if (exp != LDBL_MIN_EXP - 1)
10778 result |= 8;
10779 }
10780 }
10781 /* Test on infinite numbers. */
10782 /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0. */
10783 x = 1.0L / zero;
10784 {
10785 int exp;
10786 long double y = frexpl (x, &exp);
10787 if (y != x)
10788 result |= 16;
10789 }
10790 return result;
10791 }
10792 _ACEOF
10793 if ac_fn_c_try_run "$LINENO"; then :
10794 gl_cv_func_frexpl_works=yes
10795 else
10796 gl_cv_func_frexpl_works=no
10797 fi
10798 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10799 conftest.$ac_objext conftest.beam conftest.$ac_ext
10800 fi
10801
10802
10803 fi
10804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
10805 $as_echo "$gl_cv_func_frexpl_works" >&6; }
10806
10807 LIBS="$save_LIBS"
10808 case "$gl_cv_func_frexpl_works" in
10809 *yes) gl_func_frexpl=yes ;;
10810 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
10811 esac
10812 else
10813 gl_func_frexpl=no
10814 fi
10815 if test $gl_func_frexpl = yes; then
10816
10817 $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
10818
10819 fi
10820 fi
10821 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
10822 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
10823
10824 FREXPL_LIBM="$FREXP_LIBM"
10825 else
10826 FREXPL_LIBM=
10827 fi
10828 fi
10829
10830
10831
10832 GNULIB_FCHMODAT=0;
10833 GNULIB_FSTAT=0;
10834 GNULIB_FSTATAT=0;
10835 GNULIB_FUTIMENS=0;
10836 GNULIB_GETUMASK=0;
10837 GNULIB_LCHMOD=0;
10838 GNULIB_LSTAT=0;
10839 GNULIB_MKDIR=0;
10840 GNULIB_MKDIRAT=0;
10841 GNULIB_MKFIFO=0;
10842 GNULIB_MKFIFOAT=0;
10843 GNULIB_MKNOD=0;
10844 GNULIB_MKNODAT=0;
10845 GNULIB_STAT=0;
10846 GNULIB_UTIMENSAT=0;
10847 GNULIB_OVERRIDES_STRUCT_STAT=0;
10848 GNULIB_MDA_CHMOD=1;
10849 GNULIB_MDA_MKDIR=1;
10850 GNULIB_MDA_UMASK=1;
10851 HAVE_FCHMODAT=1;
10852 HAVE_FSTATAT=1;
10853 HAVE_FUTIMENS=1;
10854 HAVE_GETUMASK=1;
10855 HAVE_LCHMOD=1;
10856 HAVE_LSTAT=1;
10857 HAVE_MKDIRAT=1;
10858 HAVE_MKFIFO=1;
10859 HAVE_MKFIFOAT=1;
10860 HAVE_MKNOD=1;
10861 HAVE_MKNODAT=1;
10862 HAVE_UTIMENSAT=1;
10863 REPLACE_FCHMODAT=0;
10864 REPLACE_FSTAT=0;
10865 REPLACE_FSTATAT=0;
10866 REPLACE_FUTIMENS=0;
10867 REPLACE_LSTAT=0;
10868 REPLACE_MKDIR=0;
10869 REPLACE_MKFIFO=0;
10870 REPLACE_MKFIFOAT=0;
10871 REPLACE_MKNOD=0;
10872 REPLACE_MKNODAT=0;
10873 REPLACE_STAT=0;
10874 REPLACE_UTIMENSAT=0;
10875
10876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
10877 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
10878 if ${ac_cv_header_stat_broken+:} false; then :
10879 $as_echo_n "(cached) " >&6
10880 else
10881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10882 /* end confdefs.h. */
10883 #include <sys/types.h>
10884 #include <sys/stat.h>
10885
10886 #if defined S_ISBLK && defined S_IFDIR
10887 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
10888 #endif
10889
10890 #if defined S_ISBLK && defined S_IFCHR
10891 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
10892 #endif
10893
10894 #if defined S_ISLNK && defined S_IFREG
10895 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
10896 #endif
10897
10898 #if defined S_ISSOCK && defined S_IFREG
10899 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
10900 #endif
10901
10902 _ACEOF
10903 if ac_fn_c_try_compile "$LINENO"; then :
10904 ac_cv_header_stat_broken=no
10905 else
10906 ac_cv_header_stat_broken=yes
10907 fi
10908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10909 fi
10910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
10911 $as_echo "$ac_cv_header_stat_broken" >&6; }
10912 if test $ac_cv_header_stat_broken = yes; then
10913
10914 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
10915
10916 fi
10917
10918
10919
10920
10921
10922 case "$host_os" in
10923 mingw*)
10924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10925 $as_echo_n "checking for 64-bit off_t... " >&6; }
10926 if ${gl_cv_type_off_t_64+:} false; then :
10927 $as_echo_n "(cached) " >&6
10928 else
10929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10930 /* end confdefs.h. */
10931 #include <sys/types.h>
10932 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10933
10934 int
10935 main ()
10936 {
10937
10938 ;
10939 return 0;
10940 }
10941 _ACEOF
10942 if ac_fn_c_try_compile "$LINENO"; then :
10943 gl_cv_type_off_t_64=yes
10944 else
10945 gl_cv_type_off_t_64=no
10946 fi
10947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10948
10949 fi
10950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10951 $as_echo "$gl_cv_type_off_t_64" >&6; }
10952 if test $gl_cv_type_off_t_64 = no; then
10953 WINDOWS_64_BIT_OFF_T=1
10954 else
10955 WINDOWS_64_BIT_OFF_T=0
10956 fi
10957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
10958 $as_echo_n "checking for 64-bit st_size... " >&6; }
10959 if ${gl_cv_member_st_size_64+:} false; then :
10960 $as_echo_n "(cached) " >&6
10961 else
10962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10963 /* end confdefs.h. */
10964 #include <sys/types.h>
10965 struct stat buf;
10966 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
10967
10968 int
10969 main ()
10970 {
10971
10972 ;
10973 return 0;
10974 }
10975 _ACEOF
10976 if ac_fn_c_try_compile "$LINENO"; then :
10977 gl_cv_member_st_size_64=yes
10978 else
10979 gl_cv_member_st_size_64=no
10980 fi
10981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10982
10983 fi
10984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
10985 $as_echo "$gl_cv_member_st_size_64" >&6; }
10986 if test $gl_cv_member_st_size_64 = no; then
10987 WINDOWS_64_BIT_ST_SIZE=1
10988 else
10989 WINDOWS_64_BIT_ST_SIZE=0
10990 fi
10991 ;;
10992 *)
10993 WINDOWS_64_BIT_OFF_T=0
10994 WINDOWS_64_BIT_ST_SIZE=0
10995 ;;
10996 esac
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012 if test $gl_cv_have_include_next = yes; then
11013 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11014 else
11015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
11016 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
11017 if ${gl_cv_next_sys_stat_h+:} false; then :
11018 $as_echo_n "(cached) " >&6
11019 else
11020
11021 if test $ac_cv_header_sys_stat_h = yes; then
11022
11023
11024
11025
11026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11027 /* end confdefs.h. */
11028 #include <sys/stat.h>
11029 _ACEOF
11030 case "$host_os" in
11031 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11032 *) gl_absname_cpp="$ac_cpp" ;;
11033 esac
11034
11035 case "$host_os" in
11036 mingw*)
11037 gl_dirsep_regex='[/\\]'
11038 ;;
11039 *)
11040 gl_dirsep_regex='\/'
11041 ;;
11042 esac
11043 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11044 gl_header_literal_regex=`echo 'sys/stat.h' \
11045 | sed -e "$gl_make_literal_regex_sed"`
11046 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11047 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11048 s|^/[^/]|//&|
11049 p
11050 q
11051 }'
11052
11053 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11054 sed -n "$gl_absolute_header_sed"`
11055
11056 gl_header=$gl_cv_absolute_sys_stat_h
11057 gl_cv_next_sys_stat_h='"'$gl_header'"'
11058 else
11059 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11060 fi
11061
11062
11063 fi
11064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
11065 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
11066 fi
11067 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
11068
11069 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11070 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11071 gl_next_as_first_directive='<'sys/stat.h'>'
11072 else
11073 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11074 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
11075 fi
11076 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
11077
11078
11079
11080
11081
11082
11083
11084
11085 WINDOWS_STAT_TIMESPEC=0
11086
11087
11088
11089
11090
11091
11092
11093
11094 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
11095 #include <sys/stat.h>
11096 "
11097 if test "x$ac_cv_type_nlink_t" = xyes; then :
11098
11099 else
11100
11101 $as_echo "#define nlink_t int" >>confdefs.h
11102
11103 fi
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114 case "$host_os" in
11115 mingw*)
11116 for ac_header in sdkddkver.h
11117 do :
11118 ac_fn_c_check_header_mongrel "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
11119 if test "x$ac_cv_header_sdkddkver_h" = xyes; then :
11120 cat >>confdefs.h <<_ACEOF
11121 #define HAVE_SDKDDKVER_H 1
11122 _ACEOF
11123
11124 fi
11125
11126 done
11127
11128 ;;
11129 esac
11130
11131
11132
11133
11134
11135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
11136 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
11137 if ${gl_cv_func_getcwd_null+:} false; then :
11138 $as_echo_n "(cached) " >&6
11139 else
11140 if test "$cross_compiling" = yes; then :
11141 case "$host_os" in
11142 # Guess yes on glibc systems.
11143 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
11144 # Guess yes on musl systems.
11145 *-musl*) gl_cv_func_getcwd_null="guessing yes";;
11146 # Guess yes on Cygwin.
11147 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
11148 # If we don't know, obey --enable-cross-guesses.
11149 *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
11150 esac
11151
11152 else
11153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11154 /* end confdefs.h. */
11155
11156 # include <stdlib.h>
11157 # if HAVE_UNISTD_H
11158 # include <unistd.h>
11159 # else /* on Windows with MSVC */
11160 # include <direct.h>
11161 # endif
11162
11163
11164 $gl_mda_defines
11165
11166 # ifndef getcwd
11167 char *getcwd ();
11168 # endif
11169
11170 int
11171 main ()
11172 {
11173
11174 #if defined _WIN32 && ! defined __CYGWIN__
11175 /* mingw cwd does not start with '/', but _getcwd does allocate.
11176 However, mingw fails to honor non-zero size. */
11177 #else
11178 if (chdir ("/") != 0)
11179 return 1;
11180 else
11181 {
11182 char *f = getcwd (NULL, 0);
11183 if (! f)
11184 return 2;
11185 if (f[0] != '/')
11186 { free (f); return 3; }
11187 if (f[1] != '\0')
11188 { free (f); return 4; }
11189 free (f);
11190 return 0;
11191 }
11192 #endif
11193
11194 ;
11195 return 0;
11196 }
11197 _ACEOF
11198 if ac_fn_c_try_run "$LINENO"; then :
11199 gl_cv_func_getcwd_null=yes
11200 else
11201 gl_cv_func_getcwd_null=no
11202 fi
11203 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11204 conftest.$ac_objext conftest.beam conftest.$ac_ext
11205 fi
11206
11207 fi
11208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
11209 $as_echo "$gl_cv_func_getcwd_null" >&6; }
11210
11211
11212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
11213 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
11214 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
11215 $as_echo_n "(cached) " >&6
11216 else
11217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11218 /* end confdefs.h. */
11219 #include <unistd.h>
11220
11221
11222 $gl_mda_defines
11223
11224 int
11225 main ()
11226 {
11227 extern
11228 #ifdef __cplusplus
11229 "C"
11230 #endif
11231 char *getcwd (char *, size_t);
11232
11233 ;
11234 return 0;
11235 }
11236
11237 _ACEOF
11238 if ac_fn_c_try_compile "$LINENO"; then :
11239 gl_cv_func_getcwd_posix_signature=yes
11240 else
11241 gl_cv_func_getcwd_posix_signature=no
11242 fi
11243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11244
11245 fi
11246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
11247 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
11248
11249 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
11250 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
11251 ac_have_decl=1
11252 else
11253 ac_have_decl=0
11254 fi
11255
11256 cat >>confdefs.h <<_ACEOF
11257 #define HAVE_DECL_GETCWD $ac_have_decl
11258 _ACEOF
11259
11260
11261 GNULIB_DPRINTF=0;
11262 GNULIB_FCLOSE=0;
11263 GNULIB_FDOPEN=0;
11264 GNULIB_FFLUSH=0;
11265 GNULIB_FGETC=0;
11266 GNULIB_FGETS=0;
11267 GNULIB_FOPEN=0;
11268 GNULIB_FPRINTF=0;
11269 GNULIB_FPRINTF_POSIX=0;
11270 GNULIB_FPURGE=0;
11271 GNULIB_FPUTC=0;
11272 GNULIB_FPUTS=0;
11273 GNULIB_FREAD=0;
11274 GNULIB_FREOPEN=0;
11275 GNULIB_FSCANF=0;
11276 GNULIB_FSEEK=0;
11277 GNULIB_FSEEKO=0;
11278 GNULIB_FTELL=0;
11279 GNULIB_FTELLO=0;
11280 GNULIB_FWRITE=0;
11281 GNULIB_GETC=0;
11282 GNULIB_GETCHAR=0;
11283 GNULIB_GETDELIM=0;
11284 GNULIB_GETLINE=0;
11285 GNULIB_OBSTACK_PRINTF=0;
11286 GNULIB_OBSTACK_PRINTF_POSIX=0;
11287 GNULIB_PCLOSE=0;
11288 GNULIB_PERROR=0;
11289 GNULIB_POPEN=0;
11290 GNULIB_PRINTF=0;
11291 GNULIB_PRINTF_POSIX=0;
11292 GNULIB_PUTC=0;
11293 GNULIB_PUTCHAR=0;
11294 GNULIB_PUTS=0;
11295 GNULIB_REMOVE=0;
11296 GNULIB_RENAME=0;
11297 GNULIB_RENAMEAT=0;
11298 GNULIB_SCANF=0;
11299 GNULIB_SNPRINTF=0;
11300 GNULIB_SPRINTF_POSIX=0;
11301 GNULIB_STDIO_H_NONBLOCKING=0;
11302 GNULIB_STDIO_H_SIGPIPE=0;
11303 GNULIB_TMPFILE=0;
11304 GNULIB_VASPRINTF=0;
11305 GNULIB_VFSCANF=0;
11306 GNULIB_VSCANF=0;
11307 GNULIB_VDPRINTF=0;
11308 GNULIB_VFPRINTF=0;
11309 GNULIB_VFPRINTF_POSIX=0;
11310 GNULIB_VPRINTF=0;
11311 GNULIB_VPRINTF_POSIX=0;
11312 GNULIB_VSNPRINTF=0;
11313 GNULIB_VSPRINTF_POSIX=0;
11314 GNULIB_MDA_FCLOSEALL=1;
11315 GNULIB_MDA_FDOPEN=1;
11316 GNULIB_MDA_FILENO=1;
11317 GNULIB_MDA_GETW=1;
11318 GNULIB_MDA_PUTW=1;
11319 GNULIB_MDA_TEMPNAM=1;
11320 HAVE_DECL_FCLOSEALL=1;
11321 HAVE_DECL_FPURGE=1;
11322 HAVE_DECL_FSEEKO=1;
11323 HAVE_DECL_FTELLO=1;
11324 HAVE_DECL_GETDELIM=1;
11325 HAVE_DECL_GETLINE=1;
11326 HAVE_DECL_OBSTACK_PRINTF=1;
11327 HAVE_DECL_SNPRINTF=1;
11328 HAVE_DECL_VSNPRINTF=1;
11329 HAVE_DPRINTF=1;
11330 HAVE_FSEEKO=1;
11331 HAVE_FTELLO=1;
11332 HAVE_PCLOSE=1;
11333 HAVE_POPEN=1;
11334 HAVE_RENAMEAT=1;
11335 HAVE_VASPRINTF=1;
11336 HAVE_VDPRINTF=1;
11337 REPLACE_DPRINTF=0;
11338 REPLACE_FCLOSE=0;
11339 REPLACE_FDOPEN=0;
11340 REPLACE_FFLUSH=0;
11341 REPLACE_FOPEN=0;
11342 REPLACE_FPRINTF=0;
11343 REPLACE_FPURGE=0;
11344 REPLACE_FREOPEN=0;
11345 REPLACE_FSEEK=0;
11346 REPLACE_FSEEKO=0;
11347 REPLACE_FTELL=0;
11348 REPLACE_FTELLO=0;
11349 REPLACE_GETDELIM=0;
11350 REPLACE_GETLINE=0;
11351 REPLACE_OBSTACK_PRINTF=0;
11352 REPLACE_PERROR=0;
11353 REPLACE_POPEN=0;
11354 REPLACE_PRINTF=0;
11355 REPLACE_REMOVE=0;
11356 REPLACE_RENAME=0;
11357 REPLACE_RENAMEAT=0;
11358 REPLACE_SNPRINTF=0;
11359 REPLACE_SPRINTF=0;
11360 REPLACE_STDIO_READ_FUNCS=0;
11361 REPLACE_STDIO_WRITE_FUNCS=0;
11362 REPLACE_TMPFILE=0;
11363 REPLACE_VASPRINTF=0;
11364 REPLACE_VDPRINTF=0;
11365 REPLACE_VFPRINTF=0;
11366 REPLACE_VPRINTF=0;
11367 REPLACE_VSNPRINTF=0;
11368 REPLACE_VSPRINTF=0;
11369
11370 ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
11371 if test "x$ac_cv_have_decl_getdelim" = xyes; then :
11372 ac_have_decl=1
11373 else
11374 ac_have_decl=0
11375 fi
11376
11377 cat >>confdefs.h <<_ACEOF
11378 #define HAVE_DECL_GETDELIM $ac_have_decl
11379 _ACEOF
11380
11381
11382
11383
11384
11385 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
11386 if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
11387 ac_have_decl=1
11388 else
11389 ac_have_decl=0
11390 fi
11391
11392 cat >>confdefs.h <<_ACEOF
11393 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
11394 _ACEOF
11395
11396 ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
11397 if test "x$ac_cv_have_decl_getline" = xyes; then :
11398 ac_have_decl=1
11399 else
11400 ac_have_decl=0
11401 fi
11402
11403 cat >>confdefs.h <<_ACEOF
11404 #define HAVE_DECL_GETLINE $ac_have_decl
11405 _ACEOF
11406
11407 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
11408 if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
11409 ac_have_decl=1
11410 else
11411 ac_have_decl=0
11412 fi
11413
11414 cat >>confdefs.h <<_ACEOF
11415 #define HAVE_DECL_GETLOGIN_R $ac_have_decl
11416 _ACEOF
11417
11418
11419
11420 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
11421 if test "x$ac_cv_have_decl_getlogin" = xyes; then :
11422 ac_have_decl=1
11423 else
11424 ac_have_decl=0
11425 fi
11426
11427 cat >>confdefs.h <<_ACEOF
11428 #define HAVE_DECL_GETLOGIN $ac_have_decl
11429 _ACEOF
11430
11431
11432
11433 case $host_os in
11434 mingw*)
11435 LIB_GETLOGIN='-ladvapi32' ;;
11436 *)
11437 LIB_GETLOGIN= ;;
11438 esac
11439
11440
11441
11442
11443
11444
11445
11446 GNULIB_GETRANDOM=0;
11447 HAVE_GETRANDOM=1;
11448 REPLACE_GETRANDOM=0;
11449
11450
11451
11452
11453 GNULIB_GETTIMEOFDAY=0;
11454 HAVE_GETTIMEOFDAY=1;
11455 HAVE_STRUCT_TIMEVAL=1;
11456 HAVE_SYS_TIME_H=1;
11457 REPLACE_GETTIMEOFDAY=0;
11458 REPLACE_STRUCT_TIMEVAL=0;
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475 if test $gl_cv_have_include_next = yes; then
11476 gl_cv_next_sys_time_h='<'sys/time.h'>'
11477 else
11478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
11479 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
11480 if ${gl_cv_next_sys_time_h+:} false; then :
11481 $as_echo_n "(cached) " >&6
11482 else
11483
11484 if test $ac_cv_header_sys_time_h = yes; then
11485
11486
11487
11488
11489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11490 /* end confdefs.h. */
11491 #include <sys/time.h>
11492 _ACEOF
11493 case "$host_os" in
11494 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11495 *) gl_absname_cpp="$ac_cpp" ;;
11496 esac
11497
11498 case "$host_os" in
11499 mingw*)
11500 gl_dirsep_regex='[/\\]'
11501 ;;
11502 *)
11503 gl_dirsep_regex='\/'
11504 ;;
11505 esac
11506 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11507 gl_header_literal_regex=`echo 'sys/time.h' \
11508 | sed -e "$gl_make_literal_regex_sed"`
11509 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11510 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11511 s|^/[^/]|//&|
11512 p
11513 q
11514 }'
11515
11516 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11517 sed -n "$gl_absolute_header_sed"`
11518
11519 gl_header=$gl_cv_absolute_sys_time_h
11520 gl_cv_next_sys_time_h='"'$gl_header'"'
11521 else
11522 gl_cv_next_sys_time_h='<'sys/time.h'>'
11523 fi
11524
11525
11526 fi
11527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
11528 $as_echo "$gl_cv_next_sys_time_h" >&6; }
11529 fi
11530 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
11531
11532 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11533 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11534 gl_next_as_first_directive='<'sys/time.h'>'
11535 else
11536 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11537 gl_next_as_first_directive=$gl_cv_next_sys_time_h
11538 fi
11539 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
11540
11541
11542
11543
11544
11545 if test $ac_cv_header_sys_time_h != yes; then
11546 HAVE_SYS_TIME_H=0
11547 fi
11548
11549
11550
11551
11552
11553 if test $ac_cv_header_sys_socket_h != yes; then
11554 for ac_header in winsock2.h
11555 do :
11556 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
11557 if test "x$ac_cv_header_winsock2_h" = xyes; then :
11558 cat >>confdefs.h <<_ACEOF
11559 #define HAVE_WINSOCK2_H 1
11560 _ACEOF
11561
11562 fi
11563
11564 done
11565
11566 fi
11567 if test "$ac_cv_header_winsock2_h" = yes; then
11568 HAVE_WINSOCK2_H=1
11569 UNISTD_H_HAVE_WINSOCK2_H=1
11570 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
11571 else
11572 HAVE_WINSOCK2_H=0
11573 fi
11574
11575
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
11577 $as_echo_n "checking for struct timeval... " >&6; }
11578 if ${gl_cv_sys_struct_timeval+:} false; then :
11579 $as_echo_n "(cached) " >&6
11580 else
11581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11582 /* end confdefs.h. */
11583 #if HAVE_SYS_TIME_H
11584 #include <sys/time.h>
11585 #endif
11586 #include <time.h>
11587 #if HAVE_WINSOCK2_H
11588 # include <winsock2.h>
11589 #endif
11590
11591 int
11592 main ()
11593 {
11594 static struct timeval x; x.tv_sec = x.tv_usec;
11595 ;
11596 return 0;
11597 }
11598 _ACEOF
11599 if ac_fn_c_try_compile "$LINENO"; then :
11600 gl_cv_sys_struct_timeval=yes
11601 else
11602 gl_cv_sys_struct_timeval=no
11603 fi
11604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11605
11606 fi
11607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
11608 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
11609 if test $gl_cv_sys_struct_timeval != yes; then
11610 HAVE_STRUCT_TIMEVAL=0
11611 else
11612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
11613 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
11614 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
11615 $as_echo_n "(cached) " >&6
11616 else
11617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11618 /* end confdefs.h. */
11619 #if HAVE_SYS_TIME_H
11620 #include <sys/time.h>
11621 #endif
11622 #include <time.h>
11623 #if HAVE_WINSOCK2_H
11624 # include <winsock2.h>
11625 #endif
11626
11627 int
11628 main ()
11629 {
11630 static struct timeval x;
11631 typedef int verify_tv_sec_type[
11632 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
11633 ];
11634
11635 ;
11636 return 0;
11637 }
11638 _ACEOF
11639 if ac_fn_c_try_compile "$LINENO"; then :
11640 gl_cv_sys_struct_timeval_tv_sec=yes
11641 else
11642 gl_cv_sys_struct_timeval_tv_sec=no
11643 fi
11644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11645
11646 fi
11647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
11648 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
11649 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
11650 REPLACE_STRUCT_TIMEVAL=1
11651 fi
11652 fi
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664 GNULIB_GLOB=0;
11665 HAVE_GLOB=1;
11666 HAVE_GLOB_PATTERN_P=1;
11667 REPLACE_GLOB=0;
11668 REPLACE_GLOB_PATTERN_P=0;
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686 if test $gl_cv_have_include_next = yes; then
11687 gl_cv_next_glob_h='<'glob.h'>'
11688 else
11689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5
11690 $as_echo_n "checking absolute name of <glob.h>... " >&6; }
11691 if ${gl_cv_next_glob_h+:} false; then :
11692 $as_echo_n "(cached) " >&6
11693 else
11694
11695 if test $ac_cv_header_glob_h = yes; then
11696
11697
11698
11699
11700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11701 /* end confdefs.h. */
11702 #include <glob.h>
11703 _ACEOF
11704 case "$host_os" in
11705 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11706 *) gl_absname_cpp="$ac_cpp" ;;
11707 esac
11708
11709 case "$host_os" in
11710 mingw*)
11711 gl_dirsep_regex='[/\\]'
11712 ;;
11713 *)
11714 gl_dirsep_regex='\/'
11715 ;;
11716 esac
11717 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11718 gl_header_literal_regex=`echo 'glob.h' \
11719 | sed -e "$gl_make_literal_regex_sed"`
11720 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11721 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11722 s|^/[^/]|//&|
11723 p
11724 q
11725 }'
11726
11727 gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11728 sed -n "$gl_absolute_header_sed"`
11729
11730 gl_header=$gl_cv_absolute_glob_h
11731 gl_cv_next_glob_h='"'$gl_header'"'
11732 else
11733 gl_cv_next_glob_h='<'glob.h'>'
11734 fi
11735
11736
11737 fi
11738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5
11739 $as_echo "$gl_cv_next_glob_h" >&6; }
11740 fi
11741 NEXT_GLOB_H=$gl_cv_next_glob_h
11742
11743 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11744 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11745 gl_next_as_first_directive='<'glob.h'>'
11746 else
11747 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11748 gl_next_as_first_directive=$gl_cv_next_glob_h
11749 fi
11750 NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive
11751
11752
11753
11754
11755
11756 if test $ac_cv_header_glob_h = yes; then
11757 HAVE_GLOB_H=1
11758 else
11759 HAVE_GLOB_H=0
11760 fi
11761
11762
11763 GLOB_H=''
11764 if false; then
11765 GLOB_H=glob.h
11766 else
11767 if test $ac_cv_header_glob_h != yes; then
11768 GLOB_H=glob.h
11769 fi
11770 fi
11771
11772
11773 if test -n "$GLOB_H"; then
11774 GL_GENERATE_GLOB_H_TRUE=
11775 GL_GENERATE_GLOB_H_FALSE='#'
11776 else
11777 GL_GENERATE_GLOB_H_TRUE='#'
11778 GL_GENERATE_GLOB_H_FALSE=
11779 fi
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796 if test -z "$gl_pthreadlib_body_done"; then
11797 gl_pthread_api=no
11798 LIBPTHREAD=
11799 LIBPMULTITHREAD=
11800 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
11801 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
11802 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11803 if test "x$ac_cv_header_pthread_h" = xyes; then :
11804 gl_have_pthread_h=yes
11805 else
11806 gl_have_pthread_h=no
11807 fi
11808
11809
11810 if test "$gl_have_pthread_h" = yes; then
11811 # Other possible tests:
11812 # -lpthreads (FSU threads, PCthreads)
11813 # -lgthreads
11814 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
11815 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
11816 # the second one only in libpthread, and lock.c needs it.
11817 #
11818 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
11819 # needs -pthread for some reason. See:
11820 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
11821 save_LIBS=$LIBS
11822 for gl_pthread in '' '-pthread'; do
11823 LIBS="$LIBS $gl_pthread"
11824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11825 /* end confdefs.h. */
11826 #include <pthread.h>
11827 pthread_mutex_t m;
11828 pthread_mutexattr_t ma;
11829
11830 int
11831 main ()
11832 {
11833 pthread_mutex_lock (&m);
11834 pthread_mutexattr_init (&ma);
11835 ;
11836 return 0;
11837 }
11838 _ACEOF
11839 if ac_fn_c_try_link "$LINENO"; then :
11840 gl_pthread_api=yes
11841 LIBPTHREAD=$gl_pthread
11842 LIBPMULTITHREAD=$gl_pthread
11843 fi
11844 rm -f core conftest.err conftest.$ac_objext \
11845 conftest$ac_exeext conftest.$ac_ext
11846 LIBS=$save_LIBS
11847 test $gl_pthread_api = yes && break
11848 done
11849
11850 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
11851 # since it is defined as a macro on OSF/1.)
11852 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
11853 # The program links fine without libpthread. But it may actually
11854 # need to link with libpthread in order to create multiple threads.
11855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11856 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11857 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
11858 $as_echo_n "(cached) " >&6
11859 else
11860 ac_check_lib_save_LIBS=$LIBS
11861 LIBS="-lpthread $LIBS"
11862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11863 /* end confdefs.h. */
11864
11865 /* Override any GCC internal prototype to avoid an error.
11866 Use char because int might match the return type of a GCC
11867 builtin and then its argument prototype would still apply. */
11868 #ifdef __cplusplus
11869 extern "C"
11870 #endif
11871 char pthread_kill ();
11872 int
11873 main ()
11874 {
11875 return pthread_kill ();
11876 ;
11877 return 0;
11878 }
11879 _ACEOF
11880 if ac_fn_c_try_link "$LINENO"; then :
11881 ac_cv_lib_pthread_pthread_kill=yes
11882 else
11883 ac_cv_lib_pthread_pthread_kill=no
11884 fi
11885 rm -f core conftest.err conftest.$ac_objext \
11886 conftest$ac_exeext conftest.$ac_ext
11887 LIBS=$ac_check_lib_save_LIBS
11888 fi
11889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11890 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11891 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
11892 LIBPMULTITHREAD=-lpthread
11893 # On Solaris and HP-UX, most pthread functions exist also in libc.
11894 # Therefore pthread_in_use() needs to actually try to create a
11895 # thread: pthread_create from libc will fail, whereas
11896 # pthread_create will actually create a thread.
11897 # On Solaris 10 or newer, this test is no longer needed, because
11898 # libc contains the fully functional pthread functions.
11899 case "$host_os" in
11900 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
11901
11902 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
11903
11904 esac
11905
11906 fi
11907
11908 elif test $gl_pthread_api != yes; then
11909 # Some library is needed. Try libpthread and libc_r.
11910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11911 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11912 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
11913 $as_echo_n "(cached) " >&6
11914 else
11915 ac_check_lib_save_LIBS=$LIBS
11916 LIBS="-lpthread $LIBS"
11917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11918 /* end confdefs.h. */
11919
11920 /* Override any GCC internal prototype to avoid an error.
11921 Use char because int might match the return type of a GCC
11922 builtin and then its argument prototype would still apply. */
11923 #ifdef __cplusplus
11924 extern "C"
11925 #endif
11926 char pthread_kill ();
11927 int
11928 main ()
11929 {
11930 return pthread_kill ();
11931 ;
11932 return 0;
11933 }
11934 _ACEOF
11935 if ac_fn_c_try_link "$LINENO"; then :
11936 ac_cv_lib_pthread_pthread_kill=yes
11937 else
11938 ac_cv_lib_pthread_pthread_kill=no
11939 fi
11940 rm -f core conftest.err conftest.$ac_objext \
11941 conftest$ac_exeext conftest.$ac_ext
11942 LIBS=$ac_check_lib_save_LIBS
11943 fi
11944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11945 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11946 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
11947 gl_pthread_api=yes
11948 LIBPTHREAD=-lpthread
11949 LIBPMULTITHREAD=-lpthread
11950 fi
11951
11952 if test $gl_pthread_api != yes; then
11953 # For FreeBSD 4.
11954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
11955 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
11956 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
11957 $as_echo_n "(cached) " >&6
11958 else
11959 ac_check_lib_save_LIBS=$LIBS
11960 LIBS="-lc_r $LIBS"
11961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11962 /* end confdefs.h. */
11963
11964 /* Override any GCC internal prototype to avoid an error.
11965 Use char because int might match the return type of a GCC
11966 builtin and then its argument prototype would still apply. */
11967 #ifdef __cplusplus
11968 extern "C"
11969 #endif
11970 char pthread_kill ();
11971 int
11972 main ()
11973 {
11974 return pthread_kill ();
11975 ;
11976 return 0;
11977 }
11978 _ACEOF
11979 if ac_fn_c_try_link "$LINENO"; then :
11980 ac_cv_lib_c_r_pthread_kill=yes
11981 else
11982 ac_cv_lib_c_r_pthread_kill=no
11983 fi
11984 rm -f core conftest.err conftest.$ac_objext \
11985 conftest$ac_exeext conftest.$ac_ext
11986 LIBS=$ac_check_lib_save_LIBS
11987 fi
11988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
11989 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
11990 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
11991 gl_pthread_api=yes
11992 LIBPTHREAD=-lc_r
11993 LIBPMULTITHREAD=-lc_r
11994 fi
11995
11996 fi
11997 fi
11998 fi
11999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
12000 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
12001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
12002 $as_echo "$gl_pthread_api" >&6; }
12003
12004
12005 if test $gl_pthread_api = yes; then
12006
12007 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
12008
12009 fi
12010
12011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12012 /* end confdefs.h. */
12013 #include <sched.h>
12014 int
12015 main ()
12016 {
12017 sched_yield ();
12018 ;
12019 return 0;
12020 }
12021 _ACEOF
12022 if ac_fn_c_try_link "$LINENO"; then :
12023 LIB_SCHED_YIELD=
12024
12025 else
12026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
12027 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
12028 if ${ac_cv_lib_rt_sched_yield+:} false; then :
12029 $as_echo_n "(cached) " >&6
12030 else
12031 ac_check_lib_save_LIBS=$LIBS
12032 LIBS="-lrt $LIBS"
12033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12034 /* end confdefs.h. */
12035
12036 /* Override any GCC internal prototype to avoid an error.
12037 Use char because int might match the return type of a GCC
12038 builtin and then its argument prototype would still apply. */
12039 #ifdef __cplusplus
12040 extern "C"
12041 #endif
12042 char sched_yield ();
12043 int
12044 main ()
12045 {
12046 return sched_yield ();
12047 ;
12048 return 0;
12049 }
12050 _ACEOF
12051 if ac_fn_c_try_link "$LINENO"; then :
12052 ac_cv_lib_rt_sched_yield=yes
12053 else
12054 ac_cv_lib_rt_sched_yield=no
12055 fi
12056 rm -f core conftest.err conftest.$ac_objext \
12057 conftest$ac_exeext conftest.$ac_ext
12058 LIBS=$ac_check_lib_save_LIBS
12059 fi
12060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
12061 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
12062 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
12063 LIB_SCHED_YIELD=-lrt
12064 else
12065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
12066 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
12067 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
12068 $as_echo_n "(cached) " >&6
12069 else
12070 ac_check_lib_save_LIBS=$LIBS
12071 LIBS="-lposix4 $LIBS"
12072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12073 /* end confdefs.h. */
12074
12075 /* Override any GCC internal prototype to avoid an error.
12076 Use char because int might match the return type of a GCC
12077 builtin and then its argument prototype would still apply. */
12078 #ifdef __cplusplus
12079 extern "C"
12080 #endif
12081 char sched_yield ();
12082 int
12083 main ()
12084 {
12085 return sched_yield ();
12086 ;
12087 return 0;
12088 }
12089 _ACEOF
12090 if ac_fn_c_try_link "$LINENO"; then :
12091 ac_cv_lib_posix4_sched_yield=yes
12092 else
12093 ac_cv_lib_posix4_sched_yield=no
12094 fi
12095 rm -f core conftest.err conftest.$ac_objext \
12096 conftest$ac_exeext conftest.$ac_ext
12097 LIBS=$ac_check_lib_save_LIBS
12098 fi
12099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
12100 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
12101 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
12102 LIB_SCHED_YIELD=-lposix4
12103 fi
12104
12105 fi
12106
12107
12108 fi
12109 rm -f core conftest.err conftest.$ac_objext \
12110 conftest$ac_exeext conftest.$ac_ext
12111
12112
12113 gl_pthreadlib_body_done=done
12114 fi
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
12125 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
12126 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
12127 $as_echo_n "(cached) " >&6
12128 else
12129 case "$host_os" in
12130 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
12131 *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
12132 gl_cv_func_setlocale_null_all_mtsafe=no ;;
12133 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
12134 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
12135 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
12136 # If we don't know, obey --enable-cross-guesses.
12137 *)
12138 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
12139 esac
12140
12141 fi
12142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
12143 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
12144 case "$host_os" in
12145 mingw*) ;;
12146 *)
12147 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
12148 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
12149 fi
12150 ;;
12151 esac
12152 case "$gl_cv_func_setlocale_null_all_mtsafe" in
12153 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
12154 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
12155 esac
12156
12157 cat >>confdefs.h <<_ACEOF
12158 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
12159 _ACEOF
12160
12161
12162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
12163 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
12164 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
12165 $as_echo_n "(cached) " >&6
12166 else
12167 case "$host_os" in
12168 # Guess no on OpenBSD, AIX.
12169 openbsd* | aix*)
12170 gl_cv_func_setlocale_null_one_mtsafe=no ;;
12171 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
12172 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
12173 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
12174 # If we don't know, obey --enable-cross-guesses.
12175 *)
12176 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
12177 esac
12178
12179 fi
12180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
12181 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
12182 case "$host_os" in
12183 mingw*) ;;
12184 *)
12185 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
12186 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
12187 fi
12188 ;;
12189 esac
12190 case "$gl_cv_func_setlocale_null_one_mtsafe" in
12191 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
12192 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
12193 esac
12194
12195 cat >>confdefs.h <<_ACEOF
12196 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
12197 _ACEOF
12198
12199
12200 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
12201 case "$host_os" in
12202 mingw*) LIB_SETLOCALE_NULL= ;;
12203 *)
12204
12205
12206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
12207 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
12208 if ${gl_cv_have_weak+:} false; then :
12209 $as_echo_n "(cached) " >&6
12210 else
12211 gl_cv_have_weak=no
12212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12213 /* end confdefs.h. */
12214 extern void xyzzy ();
12215 #pragma weak xyzzy
12216 int
12217 main ()
12218 {
12219 xyzzy();
12220 ;
12221 return 0;
12222 }
12223 _ACEOF
12224 if ac_fn_c_try_link "$LINENO"; then :
12225 gl_cv_have_weak=maybe
12226 fi
12227 rm -f core conftest.err conftest.$ac_objext \
12228 conftest$ac_exeext conftest.$ac_ext
12229 if test $gl_cv_have_weak = maybe; then
12230 if test "$cross_compiling" = yes; then :
12231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12232 /* end confdefs.h. */
12233 #ifdef __ELF__
12234 Extensible Linking Format
12235 #endif
12236
12237 _ACEOF
12238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12239 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
12240 gl_cv_have_weak="guessing yes"
12241 else
12242 gl_cv_have_weak="guessing no"
12243 fi
12244 rm -f conftest*
12245
12246
12247 else
12248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12249 /* end confdefs.h. */
12250
12251 #include <stdio.h>
12252 #pragma weak fputs
12253 int main ()
12254 {
12255 return (fputs == NULL);
12256 }
12257 _ACEOF
12258 if ac_fn_c_try_run "$LINENO"; then :
12259 gl_cv_have_weak=yes
12260 else
12261 gl_cv_have_weak=no
12262 fi
12263 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12264 conftest.$ac_objext conftest.beam conftest.$ac_ext
12265 fi
12266
12267 fi
12268 case " $LDFLAGS " in
12269 *" -static "*) gl_cv_have_weak=no ;;
12270 esac
12271 case "$gl_cv_have_weak" in
12272 *yes)
12273 case "$host_os" in
12274 freebsd* | dragonfly*)
12275 : > conftest1.c
12276 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
12277 cat <<EOF > conftest2.c
12278 #include <pthread.h>
12279 #pragma weak pthread_mutexattr_gettype
12280 int main ()
12281 {
12282 return (pthread_mutexattr_gettype != NULL);
12283 }
12284 EOF
12285 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
12286 || gl_cv_have_weak=no
12287 rm -f conftest1.c libempty.so conftest2.c conftest
12288 ;;
12289 esac
12290 ;;
12291 esac
12292
12293 fi
12294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
12295 $as_echo "$gl_cv_have_weak" >&6; }
12296 case "$gl_cv_have_weak" in
12297 *yes)
12298
12299 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
12300
12301 ;;
12302 esac
12303
12304 case "$gl_cv_have_weak" in
12305 *yes) LIB_SETLOCALE_NULL= ;;
12306 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
12307 esac
12308 ;;
12309 esac
12310 else
12311 LIB_SETLOCALE_NULL=
12312 fi
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
12324 $as_echo_n "checking for IPv4 sockets... " >&6; }
12325 if ${gl_cv_socket_ipv4+:} false; then :
12326 $as_echo_n "(cached) " >&6
12327 else
12328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12329 /* end confdefs.h. */
12330 #include <sys/types.h>
12331 #ifdef HAVE_SYS_SOCKET_H
12332 #include <sys/socket.h>
12333 #endif
12334 #ifdef HAVE_NETINET_IN_H
12335 #include <netinet/in.h>
12336 #endif
12337 #ifdef HAVE_WINSOCK2_H
12338 #include <winsock2.h>
12339 #endif
12340 int
12341 main ()
12342 {
12343 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
12344 if (&x && &y && &z) return 0;
12345 ;
12346 return 0;
12347 }
12348 _ACEOF
12349 if ac_fn_c_try_compile "$LINENO"; then :
12350 gl_cv_socket_ipv4=yes
12351 else
12352 gl_cv_socket_ipv4=no
12353 fi
12354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12355 fi
12356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
12357 $as_echo "$gl_cv_socket_ipv4" >&6; }
12358 if test $gl_cv_socket_ipv4 = yes; then
12359
12360 $as_echo "#define HAVE_IPV4 1" >>confdefs.h
12361
12362 fi
12363
12364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
12365 $as_echo_n "checking for IPv6 sockets... " >&6; }
12366 if ${gl_cv_socket_ipv6+:} false; then :
12367 $as_echo_n "(cached) " >&6
12368 else
12369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12370 /* end confdefs.h. */
12371 #include <sys/types.h>
12372 #ifdef HAVE_SYS_SOCKET_H
12373 #include <sys/socket.h>
12374 #endif
12375 #ifdef HAVE_NETINET_IN_H
12376 #include <netinet/in.h>
12377 #endif
12378 #ifdef HAVE_WINSOCK2_H
12379 #include <winsock2.h>
12380 #endif
12381 #ifdef HAVE_WS2TCPIP_H
12382 #include <ws2tcpip.h>
12383 #endif
12384 int
12385 main ()
12386 {
12387 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
12388 if (&x && &y && &z) return 0;
12389 ;
12390 return 0;
12391 }
12392 _ACEOF
12393 if ac_fn_c_try_compile "$LINENO"; then :
12394 gl_cv_socket_ipv6=yes
12395 else
12396 gl_cv_socket_ipv6=no
12397 fi
12398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12399 fi
12400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
12401 $as_echo "$gl_cv_socket_ipv6" >&6; }
12402 if test $gl_cv_socket_ipv6 = yes; then
12403
12404 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
12405
12406 fi
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420 if test $gl_cv_have_include_next = yes; then
12421 gl_cv_next_limits_h='<'limits.h'>'
12422 else
12423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
12424 $as_echo_n "checking absolute name of <limits.h>... " >&6; }
12425 if ${gl_cv_next_limits_h+:} false; then :
12426 $as_echo_n "(cached) " >&6
12427 else
12428
12429 if test $ac_cv_header_limits_h = yes; then
12430
12431
12432
12433
12434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12435 /* end confdefs.h. */
12436 #include <limits.h>
12437 _ACEOF
12438 case "$host_os" in
12439 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12440 *) gl_absname_cpp="$ac_cpp" ;;
12441 esac
12442
12443 case "$host_os" in
12444 mingw*)
12445 gl_dirsep_regex='[/\\]'
12446 ;;
12447 *)
12448 gl_dirsep_regex='\/'
12449 ;;
12450 esac
12451 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12452 gl_header_literal_regex=`echo 'limits.h' \
12453 | sed -e "$gl_make_literal_regex_sed"`
12454 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12455 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12456 s|^/[^/]|//&|
12457 p
12458 q
12459 }'
12460
12461 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12462 sed -n "$gl_absolute_header_sed"`
12463
12464 gl_header=$gl_cv_absolute_limits_h
12465 gl_cv_next_limits_h='"'$gl_header'"'
12466 else
12467 gl_cv_next_limits_h='<'limits.h'>'
12468 fi
12469
12470
12471 fi
12472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
12473 $as_echo "$gl_cv_next_limits_h" >&6; }
12474 fi
12475 NEXT_LIMITS_H=$gl_cv_next_limits_h
12476
12477 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12478 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12479 gl_next_as_first_directive='<'limits.h'>'
12480 else
12481 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12482 gl_next_as_first_directive=$gl_cv_next_limits_h
12483 fi
12484 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
12485
12486
12487
12488
12489
12490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
12491 $as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
12492 if ${gl_cv_header_limits_width+:} false; then :
12493 $as_echo_n "(cached) " >&6
12494 else
12495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12496 /* end confdefs.h. */
12497 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
12498 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
12499 #endif
12500 #include <limits.h>
12501 long long llm = LLONG_MAX;
12502 int wb = WORD_BIT;
12503 int ullw = ULLONG_WIDTH;
12504
12505 int
12506 main ()
12507 {
12508
12509 ;
12510 return 0;
12511 }
12512 _ACEOF
12513 if ac_fn_c_try_compile "$LINENO"; then :
12514 gl_cv_header_limits_width=yes
12515 else
12516 gl_cv_header_limits_width=no
12517 fi
12518 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12519 fi
12520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
12521 $as_echo "$gl_cv_header_limits_width" >&6; }
12522 if test "$gl_cv_header_limits_width" = yes; then
12523 LIMITS_H=
12524 else
12525 LIMITS_H=limits.h
12526 fi
12527
12528 if test -n "$LIMITS_H"; then
12529 GL_GENERATE_LIMITS_H_TRUE=
12530 GL_GENERATE_LIMITS_H_FALSE='#'
12531 else
12532 GL_GENERATE_LIMITS_H_TRUE='#'
12533 GL_GENERATE_LIMITS_H_FALSE=
12534 fi
12535
12536
12537
12538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
12539 $as_echo_n "checking for wint_t... " >&6; }
12540 if ${gt_cv_c_wint_t+:} false; then :
12541 $as_echo_n "(cached) " >&6
12542 else
12543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12544 /* end confdefs.h. */
12545 #include <wchar.h>
12546 wint_t foo = (wchar_t)'\0';
12547 int
12548 main ()
12549 {
12550
12551 ;
12552 return 0;
12553 }
12554 _ACEOF
12555 if ac_fn_c_try_compile "$LINENO"; then :
12556 gt_cv_c_wint_t=yes
12557 else
12558 gt_cv_c_wint_t=no
12559 fi
12560 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12561 fi
12562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
12563 $as_echo "$gt_cv_c_wint_t" >&6; }
12564 if test $gt_cv_c_wint_t = yes; then
12565
12566 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
12567
12568
12569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
12570 $as_echo_n "checking whether wint_t is large enough... " >&6; }
12571 if ${gl_cv_type_wint_t_large_enough+:} false; then :
12572 $as_echo_n "(cached) " >&6
12573 else
12574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12575 /* end confdefs.h. */
12576 #include <wchar.h>
12577 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
12578
12579 int
12580 main ()
12581 {
12582
12583 ;
12584 return 0;
12585 }
12586 _ACEOF
12587 if ac_fn_c_try_compile "$LINENO"; then :
12588 gl_cv_type_wint_t_large_enough=yes
12589 else
12590 gl_cv_type_wint_t_large_enough=no
12591 fi
12592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12593 fi
12594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
12595 $as_echo "$gl_cv_type_wint_t_large_enough" >&6; }
12596 if test $gl_cv_type_wint_t_large_enough = no; then
12597 GNULIB_OVERRIDES_WINT_T=1
12598 else
12599 GNULIB_OVERRIDES_WINT_T=0
12600 fi
12601 else
12602 GNULIB_OVERRIDES_WINT_T=0
12603 fi
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
12614 $as_echo_n "checking whether the compiler produces multi-arch binaries... " >&6; }
12615 if ${gl_cv_c_multiarch+:} false; then :
12616 $as_echo_n "(cached) " >&6
12617 else
12618 gl_cv_c_multiarch=no
12619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12620 /* end confdefs.h. */
12621 #ifndef __APPLE_CC__
12622 not a universal capable compiler
12623 #endif
12624 typedef int dummy;
12625
12626 _ACEOF
12627 if ac_fn_c_try_compile "$LINENO"; then :
12628
12629 arch=
12630 prev=
12631 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12632 if test -n "$prev"; then
12633 case $word in
12634 i?86 | x86_64 | ppc | ppc64 | arm | arm64)
12635 if test -z "$arch" || test "$arch" = "$word"; then
12636 arch="$word"
12637 else
12638 gl_cv_c_multiarch=yes
12639 fi
12640 ;;
12641 esac
12642 prev=
12643 else
12644 if test "x$word" = "x-arch"; then
12645 prev=arch
12646 fi
12647 fi
12648 done
12649
12650 fi
12651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12652
12653 fi
12654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
12655 $as_echo "$gl_cv_c_multiarch" >&6; }
12656 if test $gl_cv_c_multiarch = yes; then
12657 APPLE_UNIVERSAL_BUILD=1
12658 else
12659 APPLE_UNIVERSAL_BUILD=0
12660 fi
12661
12662
12663
12664
12665
12666
12667
12668
12669 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12670
12671
12672 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12673
12674
12675
12676 if test $ac_cv_header_wchar_h = yes; then
12677 HAVE_WCHAR_H=1
12678 else
12679 HAVE_WCHAR_H=0
12680 fi
12681
12682
12683
12684 if test $ac_cv_header_inttypes_h = yes; then
12685 HAVE_INTTYPES_H=1
12686 else
12687 HAVE_INTTYPES_H=0
12688 fi
12689
12690
12691
12692 if test $ac_cv_header_sys_types_h = yes; then
12693 HAVE_SYS_TYPES_H=1
12694 else
12695 HAVE_SYS_TYPES_H=0
12696 fi
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708 if test $gl_cv_have_include_next = yes; then
12709 gl_cv_next_stdint_h='<'stdint.h'>'
12710 else
12711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12712 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12713 if ${gl_cv_next_stdint_h+:} false; then :
12714 $as_echo_n "(cached) " >&6
12715 else
12716
12717 if test $ac_cv_header_stdint_h = yes; then
12718
12719
12720
12721
12722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12723 /* end confdefs.h. */
12724 #include <stdint.h>
12725 _ACEOF
12726 case "$host_os" in
12727 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12728 *) gl_absname_cpp="$ac_cpp" ;;
12729 esac
12730
12731 case "$host_os" in
12732 mingw*)
12733 gl_dirsep_regex='[/\\]'
12734 ;;
12735 *)
12736 gl_dirsep_regex='\/'
12737 ;;
12738 esac
12739 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12740 gl_header_literal_regex=`echo 'stdint.h' \
12741 | sed -e "$gl_make_literal_regex_sed"`
12742 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12743 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12744 s|^/[^/]|//&|
12745 p
12746 q
12747 }'
12748
12749 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12750 sed -n "$gl_absolute_header_sed"`
12751
12752 gl_header=$gl_cv_absolute_stdint_h
12753 gl_cv_next_stdint_h='"'$gl_header'"'
12754 else
12755 gl_cv_next_stdint_h='<'stdint.h'>'
12756 fi
12757
12758
12759 fi
12760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12761 $as_echo "$gl_cv_next_stdint_h" >&6; }
12762 fi
12763 NEXT_STDINT_H=$gl_cv_next_stdint_h
12764
12765 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12766 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12767 gl_next_as_first_directive='<'stdint.h'>'
12768 else
12769 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12770 gl_next_as_first_directive=$gl_cv_next_stdint_h
12771 fi
12772 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12773
12774
12775
12776
12777 if test $ac_cv_header_stdint_h = yes; then
12778 HAVE_STDINT_H=1
12779 else
12780 HAVE_STDINT_H=0
12781 fi
12782
12783
12784 if test $ac_cv_header_stdint_h = yes; then
12785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12786 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12787 if ${gl_cv_header_working_stdint_h+:} false; then :
12788 $as_echo_n "(cached) " >&6
12789 else
12790 gl_cv_header_working_stdint_h=no
12791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12792 /* end confdefs.h. */
12793
12794
12795 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12796 #define __STDC_CONSTANT_MACROS 1
12797 #define __STDC_LIMIT_MACROS 1
12798 #include <stdint.h>
12799 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
12800 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
12801 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12802 #endif
12803
12804
12805 #include <stddef.h>
12806 #include <signal.h>
12807 #if HAVE_WCHAR_H
12808 # include <wchar.h>
12809 #endif
12810
12811
12812 #ifdef INT8_MAX
12813 int8_t a1 = INT8_MAX;
12814 int8_t a1min = INT8_MIN;
12815 #endif
12816 #ifdef INT16_MAX
12817 int16_t a2 = INT16_MAX;
12818 int16_t a2min = INT16_MIN;
12819 #endif
12820 #ifdef INT32_MAX
12821 int32_t a3 = INT32_MAX;
12822 int32_t a3min = INT32_MIN;
12823 #endif
12824 #ifdef INT64_MAX
12825 int64_t a4 = INT64_MAX;
12826 int64_t a4min = INT64_MIN;
12827 #endif
12828 #ifdef UINT8_MAX
12829 uint8_t b1 = UINT8_MAX;
12830 #else
12831 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12832 #endif
12833 #ifdef UINT16_MAX
12834 uint16_t b2 = UINT16_MAX;
12835 #endif
12836 #ifdef UINT32_MAX
12837 uint32_t b3 = UINT32_MAX;
12838 #endif
12839 #ifdef UINT64_MAX
12840 uint64_t b4 = UINT64_MAX;
12841 #endif
12842 int_least8_t c1 = INT8_C (0x7f);
12843 int_least8_t c1max = INT_LEAST8_MAX;
12844 int_least8_t c1min = INT_LEAST8_MIN;
12845 int_least16_t c2 = INT16_C (0x7fff);
12846 int_least16_t c2max = INT_LEAST16_MAX;
12847 int_least16_t c2min = INT_LEAST16_MIN;
12848 int_least32_t c3 = INT32_C (0x7fffffff);
12849 int_least32_t c3max = INT_LEAST32_MAX;
12850 int_least32_t c3min = INT_LEAST32_MIN;
12851 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12852 int_least64_t c4max = INT_LEAST64_MAX;
12853 int_least64_t c4min = INT_LEAST64_MIN;
12854 uint_least8_t d1 = UINT8_C (0xff);
12855 uint_least8_t d1max = UINT_LEAST8_MAX;
12856 uint_least16_t d2 = UINT16_C (0xffff);
12857 uint_least16_t d2max = UINT_LEAST16_MAX;
12858 uint_least32_t d3 = UINT32_C (0xffffffff);
12859 uint_least32_t d3max = UINT_LEAST32_MAX;
12860 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12861 uint_least64_t d4max = UINT_LEAST64_MAX;
12862 int_fast8_t e1 = INT_FAST8_MAX;
12863 int_fast8_t e1min = INT_FAST8_MIN;
12864 int_fast16_t e2 = INT_FAST16_MAX;
12865 int_fast16_t e2min = INT_FAST16_MIN;
12866 int_fast32_t e3 = INT_FAST32_MAX;
12867 int_fast32_t e3min = INT_FAST32_MIN;
12868 int_fast64_t e4 = INT_FAST64_MAX;
12869 int_fast64_t e4min = INT_FAST64_MIN;
12870 uint_fast8_t f1 = UINT_FAST8_MAX;
12871 uint_fast16_t f2 = UINT_FAST16_MAX;
12872 uint_fast32_t f3 = UINT_FAST32_MAX;
12873 uint_fast64_t f4 = UINT_FAST64_MAX;
12874 #ifdef INTPTR_MAX
12875 intptr_t g = INTPTR_MAX;
12876 intptr_t gmin = INTPTR_MIN;
12877 #endif
12878 #ifdef UINTPTR_MAX
12879 uintptr_t h = UINTPTR_MAX;
12880 #endif
12881 intmax_t i = INTMAX_MAX;
12882 uintmax_t j = UINTMAX_MAX;
12883
12884 /* Check that SIZE_MAX has the correct type, if possible. */
12885 #if 201112 <= __STDC_VERSION__
12886 int k = _Generic (SIZE_MAX, size_t: 0);
12887 #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
12888 || (0x5110 <= __SUNPRO_C && !__STDC__))
12889 extern size_t k;
12890 extern __typeof__ (SIZE_MAX) k;
12891 #endif
12892
12893 #include <limits.h> /* for CHAR_BIT */
12894 #define TYPE_MINIMUM(t) \
12895 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12896 #define TYPE_MAXIMUM(t) \
12897 ((t) ((t) 0 < (t) -1 \
12898 ? (t) -1 \
12899 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12900 struct s {
12901 int check_PTRDIFF:
12902 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12903 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12904 ? 1 : -1;
12905 /* Detect bug in FreeBSD 6.0 / ia64. */
12906 int check_SIG_ATOMIC:
12907 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12908 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12909 ? 1 : -1;
12910 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12911 int check_WCHAR:
12912 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12913 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12914 ? 1 : -1;
12915 /* Detect bug in mingw. */
12916 int check_WINT:
12917 WINT_MIN == TYPE_MINIMUM (wint_t)
12918 && WINT_MAX == TYPE_MAXIMUM (wint_t)
12919 ? 1 : -1;
12920
12921 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
12922 int check_UINT8_C:
12923 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12924 int check_UINT16_C:
12925 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12926
12927 /* Detect bugs in OpenBSD 3.9 stdint.h. */
12928 #ifdef UINT8_MAX
12929 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12930 #endif
12931 #ifdef UINT16_MAX
12932 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12933 #endif
12934 #ifdef UINT32_MAX
12935 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12936 #endif
12937 #ifdef UINT64_MAX
12938 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12939 #endif
12940 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12941 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12942 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12943 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12944 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12945 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12946 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12947 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12948 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12949 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12950 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12951 };
12952
12953 int
12954 main ()
12955 {
12956
12957 ;
12958 return 0;
12959 }
12960 _ACEOF
12961 if ac_fn_c_try_compile "$LINENO"; then :
12962 if test "$cross_compiling" = yes; then :
12963 case "$host_os" in
12964 # Guess yes on native Windows.
12965 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
12966 # In general, assume it works.
12967 *) gl_cv_header_working_stdint_h="guessing yes" ;;
12968 esac
12969
12970 else
12971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12972 /* end confdefs.h. */
12973
12974
12975 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12976 #define __STDC_CONSTANT_MACROS 1
12977 #define __STDC_LIMIT_MACROS 1
12978 #include <stdint.h>
12979
12980
12981 #include <stddef.h>
12982 #include <signal.h>
12983 #if HAVE_WCHAR_H
12984 # include <wchar.h>
12985 #endif
12986
12987
12988 #include <stdio.h>
12989 #include <string.h>
12990 #define MVAL(macro) MVAL1(macro)
12991 #define MVAL1(expression) #expression
12992 static const char *macro_values[] =
12993 {
12994 #ifdef INT8_MAX
12995 MVAL (INT8_MAX),
12996 #endif
12997 #ifdef INT16_MAX
12998 MVAL (INT16_MAX),
12999 #endif
13000 #ifdef INT32_MAX
13001 MVAL (INT32_MAX),
13002 #endif
13003 #ifdef INT64_MAX
13004 MVAL (INT64_MAX),
13005 #endif
13006 #ifdef UINT8_MAX
13007 MVAL (UINT8_MAX),
13008 #endif
13009 #ifdef UINT16_MAX
13010 MVAL (UINT16_MAX),
13011 #endif
13012 #ifdef UINT32_MAX
13013 MVAL (UINT32_MAX),
13014 #endif
13015 #ifdef UINT64_MAX
13016 MVAL (UINT64_MAX),
13017 #endif
13018 NULL
13019 };
13020
13021 int
13022 main ()
13023 {
13024
13025 const char **mv;
13026 for (mv = macro_values; *mv != NULL; mv++)
13027 {
13028 const char *value = *mv;
13029 /* Test whether it looks like a cast expression. */
13030 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
13031 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
13032 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
13033 || strncmp (value, "((int)"/*)*/, 6) == 0
13034 || strncmp (value, "((signed short)"/*)*/, 15) == 0
13035 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
13036 return mv - macro_values + 1;
13037 }
13038 return 0;
13039
13040 ;
13041 return 0;
13042 }
13043 _ACEOF
13044 if ac_fn_c_try_run "$LINENO"; then :
13045 gl_cv_header_working_stdint_h=yes
13046 fi
13047 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13048 conftest.$ac_objext conftest.beam conftest.$ac_ext
13049 fi
13050
13051
13052 fi
13053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13054
13055 fi
13056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
13057 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
13058 fi
13059
13060 HAVE_C99_STDINT_H=0
13061 HAVE_SYS_BITYPES_H=0
13062 HAVE_SYS_INTTYPES_H=0
13063 STDINT_H=stdint.h
13064 case "$gl_cv_header_working_stdint_h" in
13065 *yes)
13066 HAVE_C99_STDINT_H=1
13067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
13068 $as_echo_n "checking whether stdint.h works without ISO C predefines... " >&6; }
13069 if ${gl_cv_header_stdint_without_STDC_macros+:} false; then :
13070 $as_echo_n "(cached) " >&6
13071 else
13072 gl_cv_header_stdint_without_STDC_macros=no
13073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13074 /* end confdefs.h. */
13075
13076
13077 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
13078 #include <stdint.h>
13079
13080
13081 #include <stddef.h>
13082 #include <signal.h>
13083 #if HAVE_WCHAR_H
13084 # include <wchar.h>
13085 #endif
13086
13087
13088 intmax_t im = INTMAX_MAX;
13089 int32_t i32 = INT32_C (0x7fffffff);
13090
13091 int
13092 main ()
13093 {
13094
13095 ;
13096 return 0;
13097 }
13098 _ACEOF
13099 if ac_fn_c_try_compile "$LINENO"; then :
13100 gl_cv_header_stdint_without_STDC_macros=yes
13101 fi
13102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13103
13104 fi
13105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
13106 $as_echo "$gl_cv_header_stdint_without_STDC_macros" >&6; }
13107
13108 if test $gl_cv_header_stdint_without_STDC_macros = no; then
13109
13110 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
13111
13112
13113 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
13114
13115 fi
13116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
13117 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
13118 if ${gl_cv_header_stdint_width+:} false; then :
13119 $as_echo_n "(cached) " >&6
13120 else
13121 gl_cv_header_stdint_width=no
13122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13123 /* end confdefs.h. */
13124
13125 /* Work if build is not clean. */
13126 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
13127 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
13128 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
13129 #endif
13130 #include <stdint.h>
13131
13132 #include <stddef.h>
13133 #include <signal.h>
13134 #if HAVE_WCHAR_H
13135 # include <wchar.h>
13136 #endif
13137
13138 int iw = UINTMAX_WIDTH;
13139
13140 int
13141 main ()
13142 {
13143
13144 ;
13145 return 0;
13146 }
13147 _ACEOF
13148 if ac_fn_c_try_compile "$LINENO"; then :
13149 gl_cv_header_stdint_width=yes
13150 fi
13151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13152 fi
13153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
13154 $as_echo "$gl_cv_header_stdint_width" >&6; }
13155 if test "$gl_cv_header_stdint_width" = yes; then
13156 STDINT_H=
13157 fi
13158 ;;
13159 *)
13160 for ac_header in sys/inttypes.h sys/bitypes.h
13161 do :
13162 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13163 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13164 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13165 cat >>confdefs.h <<_ACEOF
13166 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13167 _ACEOF
13168
13169 fi
13170
13171 done
13172
13173 if test $ac_cv_header_sys_inttypes_h = yes; then
13174 HAVE_SYS_INTTYPES_H=1
13175 fi
13176 if test $ac_cv_header_sys_bitypes_h = yes; then
13177 HAVE_SYS_BITYPES_H=1
13178 fi
13179
13180
13181 if test $APPLE_UNIVERSAL_BUILD = 0; then
13182
13183
13184 for gltype in ptrdiff_t size_t ; do
13185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13186 $as_echo_n "checking for bit size of $gltype... " >&6; }
13187 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
13188 $as_echo_n "(cached) " >&6
13189 else
13190 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
13191 #include <stddef.h>
13192 #include <signal.h>
13193 #if HAVE_WCHAR_H
13194 # include <wchar.h>
13195 #endif
13196
13197 #include <limits.h>"; then :
13198
13199 else
13200 result=unknown
13201 fi
13202
13203 eval gl_cv_bitsizeof_${gltype}=\$result
13204
13205 fi
13206 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13208 $as_echo "$ac_res" >&6; }
13209 eval result=\$gl_cv_bitsizeof_${gltype}
13210 if test $result = unknown; then
13211 result=0
13212 fi
13213 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13214 cat >>confdefs.h <<_ACEOF
13215 #define BITSIZEOF_${GLTYPE} $result
13216 _ACEOF
13217
13218 eval BITSIZEOF_${GLTYPE}=\$result
13219 done
13220
13221
13222 fi
13223
13224
13225 for gltype in sig_atomic_t wchar_t wint_t ; do
13226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13227 $as_echo_n "checking for bit size of $gltype... " >&6; }
13228 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
13229 $as_echo_n "(cached) " >&6
13230 else
13231 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
13232 #include <stddef.h>
13233 #include <signal.h>
13234 #if HAVE_WCHAR_H
13235 # include <wchar.h>
13236 #endif
13237
13238 #include <limits.h>"; then :
13239
13240 else
13241 result=unknown
13242 fi
13243
13244 eval gl_cv_bitsizeof_${gltype}=\$result
13245
13246 fi
13247 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13249 $as_echo "$ac_res" >&6; }
13250 eval result=\$gl_cv_bitsizeof_${gltype}
13251 if test $result = unknown; then
13252 result=0
13253 fi
13254 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13255 cat >>confdefs.h <<_ACEOF
13256 #define BITSIZEOF_${GLTYPE} $result
13257 _ACEOF
13258
13259 eval BITSIZEOF_${GLTYPE}=\$result
13260 done
13261
13262
13263
13264
13265 for gltype in sig_atomic_t wchar_t wint_t ; do
13266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
13267 $as_echo_n "checking whether $gltype is signed... " >&6; }
13268 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
13269 $as_echo_n "(cached) " >&6
13270 else
13271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13272 /* end confdefs.h. */
13273
13274 #include <stddef.h>
13275 #include <signal.h>
13276 #if HAVE_WCHAR_H
13277 # include <wchar.h>
13278 #endif
13279
13280 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
13281 int
13282 main ()
13283 {
13284
13285 ;
13286 return 0;
13287 }
13288 _ACEOF
13289 if ac_fn_c_try_compile "$LINENO"; then :
13290 result=yes
13291 else
13292 result=no
13293 fi
13294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13295 eval gl_cv_type_${gltype}_signed=\$result
13296
13297 fi
13298 eval ac_res=\$gl_cv_type_${gltype}_signed
13299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13300 $as_echo "$ac_res" >&6; }
13301 eval result=\$gl_cv_type_${gltype}_signed
13302 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13303 if test "$result" = yes; then
13304 cat >>confdefs.h <<_ACEOF
13305 #define HAVE_SIGNED_${GLTYPE} 1
13306 _ACEOF
13307
13308 eval HAVE_SIGNED_${GLTYPE}=1
13309 else
13310 eval HAVE_SIGNED_${GLTYPE}=0
13311 fi
13312 done
13313
13314
13315 gl_cv_type_ptrdiff_t_signed=yes
13316 gl_cv_type_size_t_signed=no
13317 if test $APPLE_UNIVERSAL_BUILD = 0; then
13318
13319
13320 for gltype in ptrdiff_t size_t ; do
13321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13322 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13323 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13324 $as_echo_n "(cached) " >&6
13325 else
13326 eval gl_cv_type_${gltype}_suffix=no
13327 eval result=\$gl_cv_type_${gltype}_signed
13328 if test "$result" = yes; then
13329 glsufu=
13330 else
13331 glsufu=u
13332 fi
13333 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13334 case $glsuf in
13335 '') gltype1='int';;
13336 l) gltype1='long int';;
13337 ll) gltype1='long long int';;
13338 i64) gltype1='__int64';;
13339 u) gltype1='unsigned int';;
13340 ul) gltype1='unsigned long int';;
13341 ull) gltype1='unsigned long long int';;
13342 ui64)gltype1='unsigned __int64';;
13343 esac
13344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13345 /* end confdefs.h. */
13346
13347 #include <stddef.h>
13348 #include <signal.h>
13349 #if HAVE_WCHAR_H
13350 # include <wchar.h>
13351 #endif
13352
13353 extern $gltype foo;
13354 extern $gltype1 foo;
13355 int
13356 main ()
13357 {
13358
13359 ;
13360 return 0;
13361 }
13362 _ACEOF
13363 if ac_fn_c_try_compile "$LINENO"; then :
13364 eval gl_cv_type_${gltype}_suffix=\$glsuf
13365 fi
13366 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13367 eval result=\$gl_cv_type_${gltype}_suffix
13368 test "$result" != no && break
13369 done
13370 fi
13371 eval ac_res=\$gl_cv_type_${gltype}_suffix
13372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13373 $as_echo "$ac_res" >&6; }
13374 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13375 eval result=\$gl_cv_type_${gltype}_suffix
13376 test "$result" = no && result=
13377 eval ${GLTYPE}_SUFFIX=\$result
13378 cat >>confdefs.h <<_ACEOF
13379 #define ${GLTYPE}_SUFFIX $result
13380 _ACEOF
13381
13382 done
13383
13384
13385 fi
13386
13387
13388 for gltype in sig_atomic_t wchar_t wint_t ; do
13389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13390 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13391 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13392 $as_echo_n "(cached) " >&6
13393 else
13394 eval gl_cv_type_${gltype}_suffix=no
13395 eval result=\$gl_cv_type_${gltype}_signed
13396 if test "$result" = yes; then
13397 glsufu=
13398 else
13399 glsufu=u
13400 fi
13401 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13402 case $glsuf in
13403 '') gltype1='int';;
13404 l) gltype1='long int';;
13405 ll) gltype1='long long int';;
13406 i64) gltype1='__int64';;
13407 u) gltype1='unsigned int';;
13408 ul) gltype1='unsigned long int';;
13409 ull) gltype1='unsigned long long int';;
13410 ui64)gltype1='unsigned __int64';;
13411 esac
13412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13413 /* end confdefs.h. */
13414
13415 #include <stddef.h>
13416 #include <signal.h>
13417 #if HAVE_WCHAR_H
13418 # include <wchar.h>
13419 #endif
13420
13421 extern $gltype foo;
13422 extern $gltype1 foo;
13423 int
13424 main ()
13425 {
13426
13427 ;
13428 return 0;
13429 }
13430 _ACEOF
13431 if ac_fn_c_try_compile "$LINENO"; then :
13432 eval gl_cv_type_${gltype}_suffix=\$glsuf
13433 fi
13434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13435 eval result=\$gl_cv_type_${gltype}_suffix
13436 test "$result" != no && break
13437 done
13438 fi
13439 eval ac_res=\$gl_cv_type_${gltype}_suffix
13440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13441 $as_echo "$ac_res" >&6; }
13442 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13443 eval result=\$gl_cv_type_${gltype}_suffix
13444 test "$result" = no && result=
13445 eval ${GLTYPE}_SUFFIX=\$result
13446 cat >>confdefs.h <<_ACEOF
13447 #define ${GLTYPE}_SUFFIX $result
13448 _ACEOF
13449
13450 done
13451
13452
13453
13454 if test $GNULIB_OVERRIDES_WINT_T = 1; then
13455 BITSIZEOF_WINT_T=32
13456 fi
13457
13458 ;;
13459 esac
13460
13461
13462
13463 LIMITS_H='limits.h'
13464 if test -n "$LIMITS_H"; then
13465 GL_GENERATE_LIMITS_H_TRUE=
13466 GL_GENERATE_LIMITS_H_FALSE='#'
13467 else
13468 GL_GENERATE_LIMITS_H_TRUE='#'
13469 GL_GENERATE_LIMITS_H_FALSE=
13470 fi
13471
13472
13473
13474
13475
13476
13477
13478 if test -n "$STDINT_H"; then
13479 GL_GENERATE_STDINT_H_TRUE=
13480 GL_GENERATE_STDINT_H_FALSE='#'
13481 else
13482 GL_GENERATE_STDINT_H_TRUE='#'
13483 GL_GENERATE_STDINT_H_FALSE=
13484 fi
13485
13486
13487
13488 GNULIB_IMAXABS=0;
13489 GNULIB_IMAXDIV=0;
13490 GNULIB_STRTOIMAX=0;
13491 GNULIB_STRTOUMAX=0;
13492 HAVE_DECL_IMAXABS=1;
13493 HAVE_DECL_IMAXDIV=1;
13494 HAVE_DECL_STRTOIMAX=1;
13495 HAVE_DECL_STRTOUMAX=1;
13496 HAVE_IMAXDIV_T=1;
13497 REPLACE_STRTOIMAX=0;
13498 REPLACE_STRTOUMAX=0;
13499 INT32_MAX_LT_INTMAX_MAX=1;
13500 INT64_MAX_EQ_LONG_MAX='defined _LP64';
13501 PRIPTR_PREFIX=__PRIPTR_PREFIX;
13502 UINT32_MAX_LT_UINTMAX_MAX=1;
13503 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519 if test $gl_cv_have_include_next = yes; then
13520 gl_cv_next_inttypes_h='<'inttypes.h'>'
13521 else
13522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
13523 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
13524 if ${gl_cv_next_inttypes_h+:} false; then :
13525 $as_echo_n "(cached) " >&6
13526 else
13527
13528 if test $ac_cv_header_inttypes_h = yes; then
13529
13530
13531
13532
13533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13534 /* end confdefs.h. */
13535 #include <inttypes.h>
13536 _ACEOF
13537 case "$host_os" in
13538 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13539 *) gl_absname_cpp="$ac_cpp" ;;
13540 esac
13541
13542 case "$host_os" in
13543 mingw*)
13544 gl_dirsep_regex='[/\\]'
13545 ;;
13546 *)
13547 gl_dirsep_regex='\/'
13548 ;;
13549 esac
13550 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13551 gl_header_literal_regex=`echo 'inttypes.h' \
13552 | sed -e "$gl_make_literal_regex_sed"`
13553 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13554 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13555 s|^/[^/]|//&|
13556 p
13557 q
13558 }'
13559
13560 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13561 sed -n "$gl_absolute_header_sed"`
13562
13563 gl_header=$gl_cv_absolute_inttypes_h
13564 gl_cv_next_inttypes_h='"'$gl_header'"'
13565 else
13566 gl_cv_next_inttypes_h='<'inttypes.h'>'
13567 fi
13568
13569
13570 fi
13571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13572 $as_echo "$gl_cv_next_inttypes_h" >&6; }
13573 fi
13574 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
13575
13576 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13577 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13578 gl_next_as_first_directive='<'inttypes.h'>'
13579 else
13580 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13581 gl_next_as_first_directive=$gl_cv_next_inttypes_h
13582 fi
13583 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
13601 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
13602 if ${gl_cv_cc_double_expbit0+:} false; then :
13603 $as_echo_n "(cached) " >&6
13604 else
13605
13606 if test "$cross_compiling" = yes; then :
13607
13608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13609 /* end confdefs.h. */
13610
13611 #if defined arm || defined __arm || defined __arm__
13612 mixed_endianness
13613 #endif
13614
13615 _ACEOF
13616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13617 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
13618 gl_cv_cc_double_expbit0="unknown"
13619 else
13620
13621 :
13622 if ${ac_cv_c_bigendian+:} false; then :
13623 $as_echo_n "(cached) " >&6
13624 else
13625 ac_cv_c_bigendian=unknown
13626 # See if we're dealing with a universal compiler.
13627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13628 /* end confdefs.h. */
13629 #ifndef __APPLE_CC__
13630 not a universal capable compiler
13631 #endif
13632 typedef int dummy;
13633
13634 _ACEOF
13635 if ac_fn_c_try_compile "$LINENO"; then :
13636
13637 # Check for potential -arch flags. It is not universal unless
13638 # there are at least two -arch flags with different values.
13639 ac_arch=
13640 ac_prev=
13641 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13642 if test -n "$ac_prev"; then
13643 case $ac_word in
13644 i?86 | x86_64 | ppc | ppc64)
13645 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13646 ac_arch=$ac_word
13647 else
13648 ac_cv_c_bigendian=universal
13649 break
13650 fi
13651 ;;
13652 esac
13653 ac_prev=
13654 elif test "x$ac_word" = "x-arch"; then
13655 ac_prev=arch
13656 fi
13657 done
13658 fi
13659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13660 if test $ac_cv_c_bigendian = unknown; then
13661 # See if sys/param.h defines the BYTE_ORDER macro.
13662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13663 /* end confdefs.h. */
13664 #include <sys/types.h>
13665 #include <sys/param.h>
13666
13667 int
13668 main ()
13669 {
13670 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13671 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13672 && LITTLE_ENDIAN)
13673 bogus endian macros
13674 #endif
13675
13676 ;
13677 return 0;
13678 }
13679 _ACEOF
13680 if ac_fn_c_try_compile "$LINENO"; then :
13681 # It does; now see whether it defined to BIG_ENDIAN or not.
13682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13683 /* end confdefs.h. */
13684 #include <sys/types.h>
13685 #include <sys/param.h>
13686
13687 int
13688 main ()
13689 {
13690 #if BYTE_ORDER != BIG_ENDIAN
13691 not big endian
13692 #endif
13693
13694 ;
13695 return 0;
13696 }
13697 _ACEOF
13698 if ac_fn_c_try_compile "$LINENO"; then :
13699 ac_cv_c_bigendian=yes
13700 else
13701 ac_cv_c_bigendian=no
13702 fi
13703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13704 fi
13705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13706 fi
13707 if test $ac_cv_c_bigendian = unknown; then
13708 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13710 /* end confdefs.h. */
13711 #include <limits.h>
13712
13713 int
13714 main ()
13715 {
13716 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13717 bogus endian macros
13718 #endif
13719
13720 ;
13721 return 0;
13722 }
13723 _ACEOF
13724 if ac_fn_c_try_compile "$LINENO"; then :
13725 # It does; now see whether it defined to _BIG_ENDIAN or not.
13726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13727 /* end confdefs.h. */
13728 #include <limits.h>
13729
13730 int
13731 main ()
13732 {
13733 #ifndef _BIG_ENDIAN
13734 not big endian
13735 #endif
13736
13737 ;
13738 return 0;
13739 }
13740 _ACEOF
13741 if ac_fn_c_try_compile "$LINENO"; then :
13742 ac_cv_c_bigendian=yes
13743 else
13744 ac_cv_c_bigendian=no
13745 fi
13746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13747 fi
13748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13749 fi
13750 if test $ac_cv_c_bigendian = unknown; then
13751 # Compile a test program.
13752 if test "$cross_compiling" = yes; then :
13753 # Try to guess by grepping values from an object file.
13754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13755 /* end confdefs.h. */
13756 short int ascii_mm[] =
13757 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13758 short int ascii_ii[] =
13759 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13760 int use_ascii (int i) {
13761 return ascii_mm[i] + ascii_ii[i];
13762 }
13763 short int ebcdic_ii[] =
13764 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13765 short int ebcdic_mm[] =
13766 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13767 int use_ebcdic (int i) {
13768 return ebcdic_mm[i] + ebcdic_ii[i];
13769 }
13770 extern int foo;
13771
13772 int
13773 main ()
13774 {
13775 return use_ascii (foo) == use_ebcdic (foo);
13776 ;
13777 return 0;
13778 }
13779 _ACEOF
13780 if ac_fn_c_try_compile "$LINENO"; then :
13781 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13782 ac_cv_c_bigendian=yes
13783 fi
13784 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13785 if test "$ac_cv_c_bigendian" = unknown; then
13786 ac_cv_c_bigendian=no
13787 else
13788 # finding both strings is unlikely to happen, but who knows?
13789 ac_cv_c_bigendian=unknown
13790 fi
13791 fi
13792 fi
13793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13794 else
13795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13796 /* end confdefs.h. */
13797 $ac_includes_default
13798 int
13799 main ()
13800 {
13801
13802 /* Are we little or big endian? From Harbison&Steele. */
13803 union
13804 {
13805 long int l;
13806 char c[sizeof (long int)];
13807 } u;
13808 u.l = 1;
13809 return u.c[sizeof (long int) - 1] == 1;
13810
13811 ;
13812 return 0;
13813 }
13814 _ACEOF
13815 if ac_fn_c_try_run "$LINENO"; then :
13816 ac_cv_c_bigendian=no
13817 else
13818 ac_cv_c_bigendian=yes
13819 fi
13820 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13821 conftest.$ac_objext conftest.beam conftest.$ac_ext
13822 fi
13823
13824 fi
13825 fi
13826 :
13827 case $ac_cv_c_bigendian in #(
13828 yes)
13829 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
13830 no)
13831 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
13832 universal)
13833
13834 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13835
13836 ;; #(
13837 *)
13838 gl_cv_cc_double_expbit0="unknown" ;;
13839 esac
13840
13841
13842 fi
13843 rm -f conftest*
13844
13845
13846 else
13847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13848 /* end confdefs.h. */
13849
13850 #include <float.h>
13851 #include <stddef.h>
13852 #include <stdio.h>
13853 #include <string.h>
13854 #define NWORDS \
13855 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13856 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
13857 static unsigned int ored_words[NWORDS];
13858 static unsigned int anded_words[NWORDS];
13859 static void add_to_ored_words (double x)
13860 {
13861 memory_double m;
13862 size_t i;
13863 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
13864 memset (&m, 0, sizeof (memory_double));
13865 m.value = x;
13866 for (i = 0; i < NWORDS; i++)
13867 {
13868 ored_words[i] |= m.word[i];
13869 anded_words[i] &= m.word[i];
13870 }
13871 }
13872 int main ()
13873 {
13874 size_t j;
13875 FILE *fp = fopen ("conftest.out", "w");
13876 if (fp == NULL)
13877 return 1;
13878 for (j = 0; j < NWORDS; j++)
13879 anded_words[j] = ~ (unsigned int) 0;
13880 add_to_ored_words (0.25);
13881 add_to_ored_words (0.5);
13882 add_to_ored_words (1.0);
13883 add_to_ored_words (2.0);
13884 add_to_ored_words (4.0);
13885 /* Remove bits that are common (e.g. if representation of the first mantissa
13886 bit is explicit). */
13887 for (j = 0; j < NWORDS; j++)
13888 ored_words[j] &= ~anded_words[j];
13889 /* Now find the nonzero word. */
13890 for (j = 0; j < NWORDS; j++)
13891 if (ored_words[j] != 0)
13892 break;
13893 if (j < NWORDS)
13894 {
13895 size_t i;
13896 for (i = j + 1; i < NWORDS; i++)
13897 if (ored_words[i] != 0)
13898 {
13899 fprintf (fp, "unknown");
13900 return (fclose (fp) != 0);
13901 }
13902 for (i = 0; ; i++)
13903 if ((ored_words[j] >> i) & 1)
13904 {
13905 fprintf (fp, "word %d bit %d", (int) j, (int) i);
13906 return (fclose (fp) != 0);
13907 }
13908 }
13909 fprintf (fp, "unknown");
13910 return (fclose (fp) != 0);
13911 }
13912
13913 _ACEOF
13914 if ac_fn_c_try_run "$LINENO"; then :
13915 gl_cv_cc_double_expbit0=`cat conftest.out`
13916 else
13917 gl_cv_cc_double_expbit0="unknown"
13918 fi
13919 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13920 conftest.$ac_objext conftest.beam conftest.$ac_ext
13921 fi
13922
13923 rm -f conftest.out
13924
13925 fi
13926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
13927 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
13928 case "$gl_cv_cc_double_expbit0" in
13929 word*bit*)
13930 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13931 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
13932
13933 cat >>confdefs.h <<_ACEOF
13934 #define DBL_EXPBIT0_WORD $word
13935 _ACEOF
13936
13937
13938 cat >>confdefs.h <<_ACEOF
13939 #define DBL_EXPBIT0_BIT $bit
13940 _ACEOF
13941
13942 ;;
13943 esac
13944
13945
13946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13947 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13948 if ${ac_cv_c_bigendian+:} false; then :
13949 $as_echo_n "(cached) " >&6
13950 else
13951 ac_cv_c_bigendian=unknown
13952 # See if we're dealing with a universal compiler.
13953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13954 /* end confdefs.h. */
13955 #ifndef __APPLE_CC__
13956 not a universal capable compiler
13957 #endif
13958 typedef int dummy;
13959
13960 _ACEOF
13961 if ac_fn_c_try_compile "$LINENO"; then :
13962
13963 # Check for potential -arch flags. It is not universal unless
13964 # there are at least two -arch flags with different values.
13965 ac_arch=
13966 ac_prev=
13967 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13968 if test -n "$ac_prev"; then
13969 case $ac_word in
13970 i?86 | x86_64 | ppc | ppc64)
13971 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13972 ac_arch=$ac_word
13973 else
13974 ac_cv_c_bigendian=universal
13975 break
13976 fi
13977 ;;
13978 esac
13979 ac_prev=
13980 elif test "x$ac_word" = "x-arch"; then
13981 ac_prev=arch
13982 fi
13983 done
13984 fi
13985 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13986 if test $ac_cv_c_bigendian = unknown; then
13987 # See if sys/param.h defines the BYTE_ORDER macro.
13988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13989 /* end confdefs.h. */
13990 #include <sys/types.h>
13991 #include <sys/param.h>
13992
13993 int
13994 main ()
13995 {
13996 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13997 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13998 && LITTLE_ENDIAN)
13999 bogus endian macros
14000 #endif
14001
14002 ;
14003 return 0;
14004 }
14005 _ACEOF
14006 if ac_fn_c_try_compile "$LINENO"; then :
14007 # It does; now see whether it defined to BIG_ENDIAN or not.
14008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14009 /* end confdefs.h. */
14010 #include <sys/types.h>
14011 #include <sys/param.h>
14012
14013 int
14014 main ()
14015 {
14016 #if BYTE_ORDER != BIG_ENDIAN
14017 not big endian
14018 #endif
14019
14020 ;
14021 return 0;
14022 }
14023 _ACEOF
14024 if ac_fn_c_try_compile "$LINENO"; then :
14025 ac_cv_c_bigendian=yes
14026 else
14027 ac_cv_c_bigendian=no
14028 fi
14029 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14030 fi
14031 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14032 fi
14033 if test $ac_cv_c_bigendian = unknown; then
14034 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14036 /* end confdefs.h. */
14037 #include <limits.h>
14038
14039 int
14040 main ()
14041 {
14042 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14043 bogus endian macros
14044 #endif
14045
14046 ;
14047 return 0;
14048 }
14049 _ACEOF
14050 if ac_fn_c_try_compile "$LINENO"; then :
14051 # It does; now see whether it defined to _BIG_ENDIAN or not.
14052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14053 /* end confdefs.h. */
14054 #include <limits.h>
14055
14056 int
14057 main ()
14058 {
14059 #ifndef _BIG_ENDIAN
14060 not big endian
14061 #endif
14062
14063 ;
14064 return 0;
14065 }
14066 _ACEOF
14067 if ac_fn_c_try_compile "$LINENO"; then :
14068 ac_cv_c_bigendian=yes
14069 else
14070 ac_cv_c_bigendian=no
14071 fi
14072 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14073 fi
14074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14075 fi
14076 if test $ac_cv_c_bigendian = unknown; then
14077 # Compile a test program.
14078 if test "$cross_compiling" = yes; then :
14079 # Try to guess by grepping values from an object file.
14080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14081 /* end confdefs.h. */
14082 short int ascii_mm[] =
14083 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14084 short int ascii_ii[] =
14085 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14086 int use_ascii (int i) {
14087 return ascii_mm[i] + ascii_ii[i];
14088 }
14089 short int ebcdic_ii[] =
14090 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14091 short int ebcdic_mm[] =
14092 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14093 int use_ebcdic (int i) {
14094 return ebcdic_mm[i] + ebcdic_ii[i];
14095 }
14096 extern int foo;
14097
14098 int
14099 main ()
14100 {
14101 return use_ascii (foo) == use_ebcdic (foo);
14102 ;
14103 return 0;
14104 }
14105 _ACEOF
14106 if ac_fn_c_try_compile "$LINENO"; then :
14107 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14108 ac_cv_c_bigendian=yes
14109 fi
14110 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14111 if test "$ac_cv_c_bigendian" = unknown; then
14112 ac_cv_c_bigendian=no
14113 else
14114 # finding both strings is unlikely to happen, but who knows?
14115 ac_cv_c_bigendian=unknown
14116 fi
14117 fi
14118 fi
14119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14120 else
14121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14122 /* end confdefs.h. */
14123 $ac_includes_default
14124 int
14125 main ()
14126 {
14127
14128 /* Are we little or big endian? From Harbison&Steele. */
14129 union
14130 {
14131 long int l;
14132 char c[sizeof (long int)];
14133 } u;
14134 u.l = 1;
14135 return u.c[sizeof (long int) - 1] == 1;
14136
14137 ;
14138 return 0;
14139 }
14140 _ACEOF
14141 if ac_fn_c_try_run "$LINENO"; then :
14142 ac_cv_c_bigendian=no
14143 else
14144 ac_cv_c_bigendian=yes
14145 fi
14146 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14147 conftest.$ac_objext conftest.beam conftest.$ac_ext
14148 fi
14149
14150 fi
14151 fi
14152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14153 $as_echo "$ac_cv_c_bigendian" >&6; }
14154 case $ac_cv_c_bigendian in #(
14155 yes)
14156 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14157 ;; #(
14158 no)
14159 ;; #(
14160 universal)
14161
14162 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14163
14164 ;; #(
14165 *)
14166 as_fn_error $? "unknown endianness
14167 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14168 esac
14169
14170
14171
14172 GNULIB_LOCALECONV=0;
14173 GNULIB_SETLOCALE=0;
14174 GNULIB_SETLOCALE_NULL=0;
14175 GNULIB_DUPLOCALE=0;
14176 GNULIB_LOCALENAME=0;
14177 HAVE_NEWLOCALE=1;
14178 HAVE_DUPLOCALE=1;
14179 HAVE_FREELOCALE=1;
14180 REPLACE_LOCALECONV=0;
14181 REPLACE_SETLOCALE=0;
14182 REPLACE_NEWLOCALE=0;
14183 REPLACE_DUPLOCALE=0;
14184 REPLACE_FREELOCALE=0;
14185 REPLACE_STRUCT_LCONV=0;
14186
14187
14188 REPLACE_NULL=0;
14189 HAVE_MAX_ALIGN_T=1;
14190 HAVE_WCHAR_T=1;
14191
14192
14193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
14194 $as_echo_n "checking for wchar_t... " >&6; }
14195 if ${gt_cv_c_wchar_t+:} false; then :
14196 $as_echo_n "(cached) " >&6
14197 else
14198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14199 /* end confdefs.h. */
14200 #include <stddef.h>
14201 wchar_t foo = (wchar_t)'\0';
14202 int
14203 main ()
14204 {
14205
14206 ;
14207 return 0;
14208 }
14209 _ACEOF
14210 if ac_fn_c_try_compile "$LINENO"; then :
14211 gt_cv_c_wchar_t=yes
14212 else
14213 gt_cv_c_wchar_t=no
14214 fi
14215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14216 fi
14217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
14218 $as_echo "$gt_cv_c_wchar_t" >&6; }
14219 if test $gt_cv_c_wchar_t = yes; then
14220
14221 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
14222
14223 fi
14224
14225
14226
14227
14228
14229
14230
14231 STDDEF_H=
14232
14233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
14234 $as_echo_n "checking for good max_align_t... " >&6; }
14235 if ${gl_cv_type_max_align_t+:} false; then :
14236 $as_echo_n "(cached) " >&6
14237 else
14238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14239 /* end confdefs.h. */
14240 #include <stddef.h>
14241 unsigned int s = sizeof (max_align_t);
14242 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
14243 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
14244 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
14245 #endif
14246 typedef struct { char a; max_align_t b; } max_helper;
14247 typedef struct { char a; long b; } long_helper;
14248 typedef struct { char a; double b; } double_helper;
14249 typedef struct { char a; long double b; } long_double_helper;
14250 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
14251 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
14252 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
14253
14254 int
14255 main ()
14256 {
14257
14258 ;
14259 return 0;
14260 }
14261 _ACEOF
14262 if ac_fn_c_try_compile "$LINENO"; then :
14263 gl_cv_type_max_align_t=yes
14264 else
14265 gl_cv_type_max_align_t=no
14266 fi
14267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14268
14269 fi
14270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
14271 $as_echo "$gl_cv_type_max_align_t" >&6; }
14272 if test $gl_cv_type_max_align_t = no; then
14273 HAVE_MAX_ALIGN_T=0
14274 STDDEF_H=stddef.h
14275 fi
14276
14277 if test $gt_cv_c_wchar_t = no; then
14278 HAVE_WCHAR_T=0
14279 STDDEF_H=stddef.h
14280 fi
14281
14282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
14283 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
14284 if ${gl_cv_decl_null_works+:} false; then :
14285 $as_echo_n "(cached) " >&6
14286 else
14287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14288 /* end confdefs.h. */
14289 #include <stddef.h>
14290 int test[2 * (sizeof NULL == sizeof (void *)) -1];
14291
14292 int
14293 main ()
14294 {
14295
14296 ;
14297 return 0;
14298 }
14299 _ACEOF
14300 if ac_fn_c_try_compile "$LINENO"; then :
14301 gl_cv_decl_null_works=yes
14302 else
14303 gl_cv_decl_null_works=no
14304 fi
14305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14306 fi
14307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
14308 $as_echo "$gl_cv_decl_null_works" >&6; }
14309 if test $gl_cv_decl_null_works = no; then
14310 REPLACE_NULL=1
14311 STDDEF_H=stddef.h
14312 fi
14313
14314
14315 if test -n "$STDDEF_H"; then
14316 GL_GENERATE_STDDEF_H_TRUE=
14317 GL_GENERATE_STDDEF_H_FALSE='#'
14318 else
14319 GL_GENERATE_STDDEF_H_TRUE='#'
14320 GL_GENERATE_STDDEF_H_FALSE=
14321 fi
14322
14323 if test -n "$STDDEF_H"; then
14324
14325
14326
14327
14328
14329
14330
14331
14332 if test $gl_cv_have_include_next = yes; then
14333 gl_cv_next_stddef_h='<'stddef.h'>'
14334 else
14335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
14336 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
14337 if ${gl_cv_next_stddef_h+:} false; then :
14338 $as_echo_n "(cached) " >&6
14339 else
14340
14341
14342
14343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14344 /* end confdefs.h. */
14345 #include <stddef.h>
14346 _ACEOF
14347 case "$host_os" in
14348 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14349 *) gl_absname_cpp="$ac_cpp" ;;
14350 esac
14351
14352 case "$host_os" in
14353 mingw*)
14354 gl_dirsep_regex='[/\\]'
14355 ;;
14356 *)
14357 gl_dirsep_regex='\/'
14358 ;;
14359 esac
14360 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14361 gl_header_literal_regex=`echo 'stddef.h' \
14362 | sed -e "$gl_make_literal_regex_sed"`
14363 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14364 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14365 s|^/[^/]|//&|
14366 p
14367 q
14368 }'
14369
14370 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14371 sed -n "$gl_absolute_header_sed"`
14372
14373 gl_header=$gl_cv_absolute_stddef_h
14374 gl_cv_next_stddef_h='"'$gl_header'"'
14375
14376
14377 fi
14378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
14379 $as_echo "$gl_cv_next_stddef_h" >&6; }
14380 fi
14381 NEXT_STDDEF_H=$gl_cv_next_stddef_h
14382
14383 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14384 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14385 gl_next_as_first_directive='<'stddef.h'>'
14386 else
14387 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14388 gl_next_as_first_directive=$gl_cv_next_stddef_h
14389 fi
14390 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
14391
14392
14393
14394
14395 fi
14396
14397
14398
14399
14400
14401
14402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
14403 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
14404 if ${gl_cv_header_locale_has_locale_t+:} false; then :
14405 $as_echo_n "(cached) " >&6
14406 else
14407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14408 /* end confdefs.h. */
14409 #include <locale.h>
14410 locale_t x;
14411 int
14412 main ()
14413 {
14414
14415 ;
14416 return 0;
14417 }
14418 _ACEOF
14419 if ac_fn_c_try_compile "$LINENO"; then :
14420 gl_cv_header_locale_has_locale_t=yes
14421 else
14422 gl_cv_header_locale_has_locale_t=no
14423 fi
14424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14425
14426 fi
14427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
14428 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
14429
14430
14431 if test $ac_cv_header_xlocale_h = yes; then
14432 HAVE_XLOCALE_H=1
14433 if test $gl_cv_header_locale_has_locale_t = yes; then
14434 gl_cv_header_locale_h_needs_xlocale_h=no
14435 else
14436 gl_cv_header_locale_h_needs_xlocale_h=yes
14437 fi
14438 HAVE_LOCALE_T=1
14439 else
14440 HAVE_XLOCALE_H=0
14441 gl_cv_header_locale_h_needs_xlocale_h=no
14442 if test $gl_cv_header_locale_has_locale_t = yes; then
14443 HAVE_LOCALE_T=1
14444 else
14445 HAVE_LOCALE_T=0
14446 fi
14447 fi
14448
14449
14450
14451
14452 gl_threads_api=none
14453 LIBTHREAD=
14454 LTLIBTHREAD=
14455 LIBMULTITHREAD=
14456 LTLIBMULTITHREAD=
14457 if test "$gl_use_threads" != no; then
14458
14459
14460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14461 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
14462 if ${gl_cv_have_weak+:} false; then :
14463 $as_echo_n "(cached) " >&6
14464 else
14465 gl_cv_have_weak=no
14466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14467 /* end confdefs.h. */
14468 extern void xyzzy ();
14469 #pragma weak xyzzy
14470 int
14471 main ()
14472 {
14473 xyzzy();
14474 ;
14475 return 0;
14476 }
14477 _ACEOF
14478 if ac_fn_c_try_link "$LINENO"; then :
14479 gl_cv_have_weak=maybe
14480 fi
14481 rm -f core conftest.err conftest.$ac_objext \
14482 conftest$ac_exeext conftest.$ac_ext
14483 if test $gl_cv_have_weak = maybe; then
14484 if test "$cross_compiling" = yes; then :
14485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14486 /* end confdefs.h. */
14487 #ifdef __ELF__
14488 Extensible Linking Format
14489 #endif
14490
14491 _ACEOF
14492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14493 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
14494 gl_cv_have_weak="guessing yes"
14495 else
14496 gl_cv_have_weak="guessing no"
14497 fi
14498 rm -f conftest*
14499
14500
14501 else
14502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14503 /* end confdefs.h. */
14504
14505 #include <stdio.h>
14506 #pragma weak fputs
14507 int main ()
14508 {
14509 return (fputs == NULL);
14510 }
14511 _ACEOF
14512 if ac_fn_c_try_run "$LINENO"; then :
14513 gl_cv_have_weak=yes
14514 else
14515 gl_cv_have_weak=no
14516 fi
14517 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14518 conftest.$ac_objext conftest.beam conftest.$ac_ext
14519 fi
14520
14521 fi
14522 case " $LDFLAGS " in
14523 *" -static "*) gl_cv_have_weak=no ;;
14524 esac
14525 case "$gl_cv_have_weak" in
14526 *yes)
14527 case "$host_os" in
14528 freebsd* | dragonfly*)
14529 : > conftest1.c
14530 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
14531 cat <<EOF > conftest2.c
14532 #include <pthread.h>
14533 #pragma weak pthread_mutexattr_gettype
14534 int main ()
14535 {
14536 return (pthread_mutexattr_gettype != NULL);
14537 }
14538 EOF
14539 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
14540 || gl_cv_have_weak=no
14541 rm -f conftest1.c libempty.so conftest2.c conftest
14542 ;;
14543 esac
14544 ;;
14545 esac
14546
14547 fi
14548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14549 $as_echo "$gl_cv_have_weak" >&6; }
14550 case "$gl_cv_have_weak" in
14551 *yes)
14552
14553 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
14554
14555 ;;
14556 esac
14557
14558 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14559
14560 :
14561 fi
14562 if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
14563
14564 gl_have_isoc_threads="$ac_cv_header_threads_h"
14565 fi
14566 if test "$gl_use_threads" = yes \
14567 || test "$gl_use_threads" = posix \
14568 || test "$gl_use_threads" = isoc+posix; then
14569
14570
14571 if test -z "$gl_pthreadlib_body_done"; then
14572 gl_pthread_api=no
14573 LIBPTHREAD=
14574 LIBPMULTITHREAD=
14575 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14576 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14577 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14578 if test "x$ac_cv_header_pthread_h" = xyes; then :
14579 gl_have_pthread_h=yes
14580 else
14581 gl_have_pthread_h=no
14582 fi
14583
14584
14585 if test "$gl_have_pthread_h" = yes; then
14586 # Other possible tests:
14587 # -lpthreads (FSU threads, PCthreads)
14588 # -lgthreads
14589 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14590 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14591 # the second one only in libpthread, and lock.c needs it.
14592 #
14593 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14594 # needs -pthread for some reason. See:
14595 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14596 save_LIBS=$LIBS
14597 for gl_pthread in '' '-pthread'; do
14598 LIBS="$LIBS $gl_pthread"
14599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14600 /* end confdefs.h. */
14601 #include <pthread.h>
14602 pthread_mutex_t m;
14603 pthread_mutexattr_t ma;
14604
14605 int
14606 main ()
14607 {
14608 pthread_mutex_lock (&m);
14609 pthread_mutexattr_init (&ma);
14610 ;
14611 return 0;
14612 }
14613 _ACEOF
14614 if ac_fn_c_try_link "$LINENO"; then :
14615 gl_pthread_api=yes
14616 LIBPTHREAD=$gl_pthread
14617 LIBPMULTITHREAD=$gl_pthread
14618 fi
14619 rm -f core conftest.err conftest.$ac_objext \
14620 conftest$ac_exeext conftest.$ac_ext
14621 LIBS=$save_LIBS
14622 test $gl_pthread_api = yes && break
14623 done
14624
14625 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14626 # since it is defined as a macro on OSF/1.)
14627 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14628 # The program links fine without libpthread. But it may actually
14629 # need to link with libpthread in order to create multiple threads.
14630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14631 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14632 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14633 $as_echo_n "(cached) " >&6
14634 else
14635 ac_check_lib_save_LIBS=$LIBS
14636 LIBS="-lpthread $LIBS"
14637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14638 /* end confdefs.h. */
14639
14640 /* Override any GCC internal prototype to avoid an error.
14641 Use char because int might match the return type of a GCC
14642 builtin and then its argument prototype would still apply. */
14643 #ifdef __cplusplus
14644 extern "C"
14645 #endif
14646 char pthread_kill ();
14647 int
14648 main ()
14649 {
14650 return pthread_kill ();
14651 ;
14652 return 0;
14653 }
14654 _ACEOF
14655 if ac_fn_c_try_link "$LINENO"; then :
14656 ac_cv_lib_pthread_pthread_kill=yes
14657 else
14658 ac_cv_lib_pthread_pthread_kill=no
14659 fi
14660 rm -f core conftest.err conftest.$ac_objext \
14661 conftest$ac_exeext conftest.$ac_ext
14662 LIBS=$ac_check_lib_save_LIBS
14663 fi
14664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14665 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14666 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14667 LIBPMULTITHREAD=-lpthread
14668 # On Solaris and HP-UX, most pthread functions exist also in libc.
14669 # Therefore pthread_in_use() needs to actually try to create a
14670 # thread: pthread_create from libc will fail, whereas
14671 # pthread_create will actually create a thread.
14672 # On Solaris 10 or newer, this test is no longer needed, because
14673 # libc contains the fully functional pthread functions.
14674 case "$host_os" in
14675 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
14676
14677 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14678
14679 esac
14680
14681 fi
14682
14683 elif test $gl_pthread_api != yes; then
14684 # Some library is needed. Try libpthread and libc_r.
14685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14686 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14687 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14688 $as_echo_n "(cached) " >&6
14689 else
14690 ac_check_lib_save_LIBS=$LIBS
14691 LIBS="-lpthread $LIBS"
14692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14693 /* end confdefs.h. */
14694
14695 /* Override any GCC internal prototype to avoid an error.
14696 Use char because int might match the return type of a GCC
14697 builtin and then its argument prototype would still apply. */
14698 #ifdef __cplusplus
14699 extern "C"
14700 #endif
14701 char pthread_kill ();
14702 int
14703 main ()
14704 {
14705 return pthread_kill ();
14706 ;
14707 return 0;
14708 }
14709 _ACEOF
14710 if ac_fn_c_try_link "$LINENO"; then :
14711 ac_cv_lib_pthread_pthread_kill=yes
14712 else
14713 ac_cv_lib_pthread_pthread_kill=no
14714 fi
14715 rm -f core conftest.err conftest.$ac_objext \
14716 conftest$ac_exeext conftest.$ac_ext
14717 LIBS=$ac_check_lib_save_LIBS
14718 fi
14719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14720 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14721 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14722 gl_pthread_api=yes
14723 LIBPTHREAD=-lpthread
14724 LIBPMULTITHREAD=-lpthread
14725 fi
14726
14727 if test $gl_pthread_api != yes; then
14728 # For FreeBSD 4.
14729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
14730 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
14731 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
14732 $as_echo_n "(cached) " >&6
14733 else
14734 ac_check_lib_save_LIBS=$LIBS
14735 LIBS="-lc_r $LIBS"
14736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14737 /* end confdefs.h. */
14738
14739 /* Override any GCC internal prototype to avoid an error.
14740 Use char because int might match the return type of a GCC
14741 builtin and then its argument prototype would still apply. */
14742 #ifdef __cplusplus
14743 extern "C"
14744 #endif
14745 char pthread_kill ();
14746 int
14747 main ()
14748 {
14749 return pthread_kill ();
14750 ;
14751 return 0;
14752 }
14753 _ACEOF
14754 if ac_fn_c_try_link "$LINENO"; then :
14755 ac_cv_lib_c_r_pthread_kill=yes
14756 else
14757 ac_cv_lib_c_r_pthread_kill=no
14758 fi
14759 rm -f core conftest.err conftest.$ac_objext \
14760 conftest$ac_exeext conftest.$ac_ext
14761 LIBS=$ac_check_lib_save_LIBS
14762 fi
14763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
14764 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
14765 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
14766 gl_pthread_api=yes
14767 LIBPTHREAD=-lc_r
14768 LIBPMULTITHREAD=-lc_r
14769 fi
14770
14771 fi
14772 fi
14773 fi
14774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
14775 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
14776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
14777 $as_echo "$gl_pthread_api" >&6; }
14778
14779
14780 if test $gl_pthread_api = yes; then
14781
14782 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
14783
14784 fi
14785
14786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14787 /* end confdefs.h. */
14788 #include <sched.h>
14789 int
14790 main ()
14791 {
14792 sched_yield ();
14793 ;
14794 return 0;
14795 }
14796 _ACEOF
14797 if ac_fn_c_try_link "$LINENO"; then :
14798 LIB_SCHED_YIELD=
14799
14800 else
14801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
14802 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
14803 if ${ac_cv_lib_rt_sched_yield+:} false; then :
14804 $as_echo_n "(cached) " >&6
14805 else
14806 ac_check_lib_save_LIBS=$LIBS
14807 LIBS="-lrt $LIBS"
14808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14809 /* end confdefs.h. */
14810
14811 /* Override any GCC internal prototype to avoid an error.
14812 Use char because int might match the return type of a GCC
14813 builtin and then its argument prototype would still apply. */
14814 #ifdef __cplusplus
14815 extern "C"
14816 #endif
14817 char sched_yield ();
14818 int
14819 main ()
14820 {
14821 return sched_yield ();
14822 ;
14823 return 0;
14824 }
14825 _ACEOF
14826 if ac_fn_c_try_link "$LINENO"; then :
14827 ac_cv_lib_rt_sched_yield=yes
14828 else
14829 ac_cv_lib_rt_sched_yield=no
14830 fi
14831 rm -f core conftest.err conftest.$ac_objext \
14832 conftest$ac_exeext conftest.$ac_ext
14833 LIBS=$ac_check_lib_save_LIBS
14834 fi
14835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
14836 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
14837 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
14838 LIB_SCHED_YIELD=-lrt
14839 else
14840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
14841 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
14842 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
14843 $as_echo_n "(cached) " >&6
14844 else
14845 ac_check_lib_save_LIBS=$LIBS
14846 LIBS="-lposix4 $LIBS"
14847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14848 /* end confdefs.h. */
14849
14850 /* Override any GCC internal prototype to avoid an error.
14851 Use char because int might match the return type of a GCC
14852 builtin and then its argument prototype would still apply. */
14853 #ifdef __cplusplus
14854 extern "C"
14855 #endif
14856 char sched_yield ();
14857 int
14858 main ()
14859 {
14860 return sched_yield ();
14861 ;
14862 return 0;
14863 }
14864 _ACEOF
14865 if ac_fn_c_try_link "$LINENO"; then :
14866 ac_cv_lib_posix4_sched_yield=yes
14867 else
14868 ac_cv_lib_posix4_sched_yield=no
14869 fi
14870 rm -f core conftest.err conftest.$ac_objext \
14871 conftest$ac_exeext conftest.$ac_ext
14872 LIBS=$ac_check_lib_save_LIBS
14873 fi
14874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
14875 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
14876 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
14877 LIB_SCHED_YIELD=-lposix4
14878 fi
14879
14880 fi
14881
14882
14883 fi
14884 rm -f core conftest.err conftest.$ac_objext \
14885 conftest$ac_exeext conftest.$ac_ext
14886
14887
14888 gl_pthreadlib_body_done=done
14889 fi
14890
14891 LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
14892 LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
14893 if test $gl_pthread_api = yes; then
14894 if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
14895 gl_threads_api='isoc+posix'
14896
14897 $as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
14898
14899 LIBTHREAD= LTLIBTHREAD=
14900 else
14901 gl_threads_api=posix
14902
14903 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
14904
14905 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14906 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14907
14908 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
14909
14910 LIBTHREAD= LTLIBTHREAD=
14911 else
14912 case "$host_os" in
14913 freebsd* | dragonfly*)
14914 if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
14915
14916 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14917
14918 fi
14919 ;;
14920 esac
14921 fi
14922 fi
14923 fi
14924 fi
14925 fi
14926 if test $gl_threads_api = none; then
14927 if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
14928
14929
14930
14931 if test -z "$gl_stdthreadlib_body_done"; then
14932
14933
14934 case "$host_os" in
14935 mingw*)
14936 LIBSTDTHREAD=
14937 ;;
14938 *)
14939
14940
14941 if test -z "$gl_pthreadlib_body_done"; then
14942 gl_pthread_api=no
14943 LIBPTHREAD=
14944 LIBPMULTITHREAD=
14945 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14946 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14947 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14948 if test "x$ac_cv_header_pthread_h" = xyes; then :
14949 gl_have_pthread_h=yes
14950 else
14951 gl_have_pthread_h=no
14952 fi
14953
14954
14955 if test "$gl_have_pthread_h" = yes; then
14956 # Other possible tests:
14957 # -lpthreads (FSU threads, PCthreads)
14958 # -lgthreads
14959 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14960 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14961 # the second one only in libpthread, and lock.c needs it.
14962 #
14963 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14964 # needs -pthread for some reason. See:
14965 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14966 save_LIBS=$LIBS
14967 for gl_pthread in '' '-pthread'; do
14968 LIBS="$LIBS $gl_pthread"
14969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14970 /* end confdefs.h. */
14971 #include <pthread.h>
14972 pthread_mutex_t m;
14973 pthread_mutexattr_t ma;
14974
14975 int
14976 main ()
14977 {
14978 pthread_mutex_lock (&m);
14979 pthread_mutexattr_init (&ma);
14980 ;
14981 return 0;
14982 }
14983 _ACEOF
14984 if ac_fn_c_try_link "$LINENO"; then :
14985 gl_pthread_api=yes
14986 LIBPTHREAD=$gl_pthread
14987 LIBPMULTITHREAD=$gl_pthread
14988 fi
14989 rm -f core conftest.err conftest.$ac_objext \
14990 conftest$ac_exeext conftest.$ac_ext
14991 LIBS=$save_LIBS
14992 test $gl_pthread_api = yes && break
14993 done
14994
14995 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14996 # since it is defined as a macro on OSF/1.)
14997 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14998 # The program links fine without libpthread. But it may actually
14999 # need to link with libpthread in order to create multiple threads.
15000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15001 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
15002 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
15003 $as_echo_n "(cached) " >&6
15004 else
15005 ac_check_lib_save_LIBS=$LIBS
15006 LIBS="-lpthread $LIBS"
15007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15008 /* end confdefs.h. */
15009
15010 /* Override any GCC internal prototype to avoid an error.
15011 Use char because int might match the return type of a GCC
15012 builtin and then its argument prototype would still apply. */
15013 #ifdef __cplusplus
15014 extern "C"
15015 #endif
15016 char pthread_kill ();
15017 int
15018 main ()
15019 {
15020 return pthread_kill ();
15021 ;
15022 return 0;
15023 }
15024 _ACEOF
15025 if ac_fn_c_try_link "$LINENO"; then :
15026 ac_cv_lib_pthread_pthread_kill=yes
15027 else
15028 ac_cv_lib_pthread_pthread_kill=no
15029 fi
15030 rm -f core conftest.err conftest.$ac_objext \
15031 conftest$ac_exeext conftest.$ac_ext
15032 LIBS=$ac_check_lib_save_LIBS
15033 fi
15034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15035 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
15036 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
15037 LIBPMULTITHREAD=-lpthread
15038 # On Solaris and HP-UX, most pthread functions exist also in libc.
15039 # Therefore pthread_in_use() needs to actually try to create a
15040 # thread: pthread_create from libc will fail, whereas
15041 # pthread_create will actually create a thread.
15042 # On Solaris 10 or newer, this test is no longer needed, because
15043 # libc contains the fully functional pthread functions.
15044 case "$host_os" in
15045 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
15046
15047 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15048
15049 esac
15050
15051 fi
15052
15053 elif test $gl_pthread_api != yes; then
15054 # Some library is needed. Try libpthread and libc_r.
15055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15056 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
15057 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
15058 $as_echo_n "(cached) " >&6
15059 else
15060 ac_check_lib_save_LIBS=$LIBS
15061 LIBS="-lpthread $LIBS"
15062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15063 /* end confdefs.h. */
15064
15065 /* Override any GCC internal prototype to avoid an error.
15066 Use char because int might match the return type of a GCC
15067 builtin and then its argument prototype would still apply. */
15068 #ifdef __cplusplus
15069 extern "C"
15070 #endif
15071 char pthread_kill ();
15072 int
15073 main ()
15074 {
15075 return pthread_kill ();
15076 ;
15077 return 0;
15078 }
15079 _ACEOF
15080 if ac_fn_c_try_link "$LINENO"; then :
15081 ac_cv_lib_pthread_pthread_kill=yes
15082 else
15083 ac_cv_lib_pthread_pthread_kill=no
15084 fi
15085 rm -f core conftest.err conftest.$ac_objext \
15086 conftest$ac_exeext conftest.$ac_ext
15087 LIBS=$ac_check_lib_save_LIBS
15088 fi
15089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15090 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
15091 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
15092 gl_pthread_api=yes
15093 LIBPTHREAD=-lpthread
15094 LIBPMULTITHREAD=-lpthread
15095 fi
15096
15097 if test $gl_pthread_api != yes; then
15098 # For FreeBSD 4.
15099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15100 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
15101 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
15102 $as_echo_n "(cached) " >&6
15103 else
15104 ac_check_lib_save_LIBS=$LIBS
15105 LIBS="-lc_r $LIBS"
15106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15107 /* end confdefs.h. */
15108
15109 /* Override any GCC internal prototype to avoid an error.
15110 Use char because int might match the return type of a GCC
15111 builtin and then its argument prototype would still apply. */
15112 #ifdef __cplusplus
15113 extern "C"
15114 #endif
15115 char pthread_kill ();
15116 int
15117 main ()
15118 {
15119 return pthread_kill ();
15120 ;
15121 return 0;
15122 }
15123 _ACEOF
15124 if ac_fn_c_try_link "$LINENO"; then :
15125 ac_cv_lib_c_r_pthread_kill=yes
15126 else
15127 ac_cv_lib_c_r_pthread_kill=no
15128 fi
15129 rm -f core conftest.err conftest.$ac_objext \
15130 conftest$ac_exeext conftest.$ac_ext
15131 LIBS=$ac_check_lib_save_LIBS
15132 fi
15133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15134 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
15135 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
15136 gl_pthread_api=yes
15137 LIBPTHREAD=-lc_r
15138 LIBPMULTITHREAD=-lc_r
15139 fi
15140
15141 fi
15142 fi
15143 fi
15144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
15145 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
15146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
15147 $as_echo "$gl_pthread_api" >&6; }
15148
15149
15150 if test $gl_pthread_api = yes; then
15151
15152 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
15153
15154 fi
15155
15156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15157 /* end confdefs.h. */
15158 #include <sched.h>
15159 int
15160 main ()
15161 {
15162 sched_yield ();
15163 ;
15164 return 0;
15165 }
15166 _ACEOF
15167 if ac_fn_c_try_link "$LINENO"; then :
15168 LIB_SCHED_YIELD=
15169
15170 else
15171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
15172 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
15173 if ${ac_cv_lib_rt_sched_yield+:} false; then :
15174 $as_echo_n "(cached) " >&6
15175 else
15176 ac_check_lib_save_LIBS=$LIBS
15177 LIBS="-lrt $LIBS"
15178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15179 /* end confdefs.h. */
15180
15181 /* Override any GCC internal prototype to avoid an error.
15182 Use char because int might match the return type of a GCC
15183 builtin and then its argument prototype would still apply. */
15184 #ifdef __cplusplus
15185 extern "C"
15186 #endif
15187 char sched_yield ();
15188 int
15189 main ()
15190 {
15191 return sched_yield ();
15192 ;
15193 return 0;
15194 }
15195 _ACEOF
15196 if ac_fn_c_try_link "$LINENO"; then :
15197 ac_cv_lib_rt_sched_yield=yes
15198 else
15199 ac_cv_lib_rt_sched_yield=no
15200 fi
15201 rm -f core conftest.err conftest.$ac_objext \
15202 conftest$ac_exeext conftest.$ac_ext
15203 LIBS=$ac_check_lib_save_LIBS
15204 fi
15205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
15206 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
15207 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
15208 LIB_SCHED_YIELD=-lrt
15209 else
15210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
15211 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
15212 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
15213 $as_echo_n "(cached) " >&6
15214 else
15215 ac_check_lib_save_LIBS=$LIBS
15216 LIBS="-lposix4 $LIBS"
15217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15218 /* end confdefs.h. */
15219
15220 /* Override any GCC internal prototype to avoid an error.
15221 Use char because int might match the return type of a GCC
15222 builtin and then its argument prototype would still apply. */
15223 #ifdef __cplusplus
15224 extern "C"
15225 #endif
15226 char sched_yield ();
15227 int
15228 main ()
15229 {
15230 return sched_yield ();
15231 ;
15232 return 0;
15233 }
15234 _ACEOF
15235 if ac_fn_c_try_link "$LINENO"; then :
15236 ac_cv_lib_posix4_sched_yield=yes
15237 else
15238 ac_cv_lib_posix4_sched_yield=no
15239 fi
15240 rm -f core conftest.err conftest.$ac_objext \
15241 conftest$ac_exeext conftest.$ac_ext
15242 LIBS=$ac_check_lib_save_LIBS
15243 fi
15244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
15245 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
15246 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
15247 LIB_SCHED_YIELD=-lposix4
15248 fi
15249
15250 fi
15251
15252
15253 fi
15254 rm -f core conftest.err conftest.$ac_objext \
15255 conftest$ac_exeext conftest.$ac_ext
15256
15257
15258 gl_pthreadlib_body_done=done
15259 fi
15260
15261 if test $ac_cv_header_threads_h = yes; then
15262 for ac_func in thrd_create
15263 do :
15264 ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
15265 if test "x$ac_cv_func_thrd_create" = xyes; then :
15266 cat >>confdefs.h <<_ACEOF
15267 #define HAVE_THRD_CREATE 1
15268 _ACEOF
15269
15270 fi
15271 done
15272
15273 if test $ac_cv_func_thrd_create = yes; then
15274 LIBSTDTHREAD=
15275 else
15276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
15277 $as_echo_n "checking for thrd_create in -lstdthreads... " >&6; }
15278 if ${ac_cv_lib_stdthreads_thrd_create+:} false; then :
15279 $as_echo_n "(cached) " >&6
15280 else
15281 ac_check_lib_save_LIBS=$LIBS
15282 LIBS="-lstdthreads $LIBS"
15283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15284 /* end confdefs.h. */
15285
15286 /* Override any GCC internal prototype to avoid an error.
15287 Use char because int might match the return type of a GCC
15288 builtin and then its argument prototype would still apply. */
15289 #ifdef __cplusplus
15290 extern "C"
15291 #endif
15292 char thrd_create ();
15293 int
15294 main ()
15295 {
15296 return thrd_create ();
15297 ;
15298 return 0;
15299 }
15300 _ACEOF
15301 if ac_fn_c_try_link "$LINENO"; then :
15302 ac_cv_lib_stdthreads_thrd_create=yes
15303 else
15304 ac_cv_lib_stdthreads_thrd_create=no
15305 fi
15306 rm -f core conftest.err conftest.$ac_objext \
15307 conftest$ac_exeext conftest.$ac_ext
15308 LIBS=$ac_check_lib_save_LIBS
15309 fi
15310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
15311 $as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; }
15312 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes; then :
15313
15314 LIBSTDTHREAD='-lstdthreads -lpthread'
15315
15316 else
15317
15318 LIBSTDTHREAD="$LIBPMULTITHREAD"
15319
15320 fi
15321
15322 fi
15323 else
15324 LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
15325 fi
15326 ;;
15327 esac
15328
15329
15330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
15331 $as_echo_n "checking whether ISO C threads API is available... " >&6; }
15332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
15333 $as_echo "$ac_cv_header_threads_h" >&6; }
15334 gl_stdthreadlib_body_done=done
15335 fi
15336
15337 LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
15338 LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
15339 gl_threads_api=isoc
15340
15341 $as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h
15342
15343 fi
15344 fi
15345 if test $gl_threads_api = none; then
15346 case "$gl_use_threads" in
15347 yes | windows | win32) # The 'win32' is for backward compatibility.
15348 if { case "$host_os" in
15349 mingw*) true;;
15350 *) false;;
15351 esac
15352 }; then
15353 gl_threads_api=windows
15354
15355 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
15356
15357 fi
15358 ;;
15359 esac
15360 fi
15361 fi
15362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
15363 $as_echo_n "checking for multithread API to use... " >&6; }
15364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
15365 $as_echo "$gl_threads_api" >&6; }
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
15379 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
15380 if ${gl_cv_func_malloc_posix+:} false; then :
15381 $as_echo_n "(cached) " >&6
15382 else
15383
15384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15385 /* end confdefs.h. */
15386
15387 int
15388 main ()
15389 {
15390 #if defined _WIN32 && ! defined __CYGWIN__
15391 choke me
15392 #endif
15393
15394 ;
15395 return 0;
15396 }
15397 _ACEOF
15398 if ac_fn_c_try_compile "$LINENO"; then :
15399 gl_cv_func_malloc_posix=yes
15400 else
15401 gl_cv_func_malloc_posix=no
15402 fi
15403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15404
15405 fi
15406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
15407 $as_echo "$gl_cv_func_malloc_posix" >&6; }
15408
15409
15410
15411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15412 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15413 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
15414 $as_echo_n "(cached) " >&6
15415 else
15416 if test "$cross_compiling" = yes; then :
15417 case "$host_os" in
15418 # Guess yes on platforms where we know the result.
15419 *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
15420 | hpux* | solaris* | cygwin* | mingw*)
15421 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
15422 # If we don't know, obey --enable-cross-guesses.
15423 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
15424 esac
15425
15426 else
15427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15428 /* end confdefs.h. */
15429 #include <stdlib.h>
15430
15431 int
15432 main ()
15433 {
15434 char *p = malloc (0);
15435 int result = !p;
15436 free (p);
15437 return result;
15438 ;
15439 return 0;
15440 }
15441
15442 _ACEOF
15443 if ac_fn_c_try_run "$LINENO"; then :
15444 ac_cv_func_malloc_0_nonnull=yes
15445 else
15446 ac_cv_func_malloc_0_nonnull=no
15447 fi
15448 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15449 conftest.$ac_objext conftest.beam conftest.$ac_ext
15450 fi
15451
15452
15453 fi
15454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
15455 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
15456 case "$ac_cv_func_malloc_0_nonnull" in
15457 *yes)
15458 gl_cv_func_malloc_0_nonnull=1
15459 ;;
15460 *)
15461 gl_cv_func_malloc_0_nonnull=0
15462 ;;
15463 esac
15464
15465
15466 cat >>confdefs.h <<_ACEOF
15467 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
15468 _ACEOF
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
15481 $as_echo_n "checking for a traditional japanese locale... " >&6; }
15482 if ${gt_cv_locale_ja+:} false; then :
15483 $as_echo_n "(cached) " >&6
15484 else
15485
15486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15487 /* end confdefs.h. */
15488
15489 #include <locale.h>
15490 #include <time.h>
15491 #if HAVE_LANGINFO_CODESET
15492 # include <langinfo.h>
15493 #endif
15494 #include <stdlib.h>
15495 #include <string.h>
15496 struct tm t;
15497 char buf[16];
15498 int main ()
15499 {
15500 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15501 imitates locale dependent behaviour by looking at the environment
15502 variables, and all locales use the UTF-8 encoding. */
15503 #if defined __BEOS__ || defined __HAIKU__
15504 return 1;
15505 #else
15506 /* Check whether the given locale name is recognized by the system. */
15507 # if defined _WIN32 && !defined __CYGWIN__
15508 /* On native Windows, setlocale(category, "") looks at the system settings,
15509 not at the environment variables. Also, when an encoding suffix such
15510 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15511 category of the locale to "C". */
15512 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15513 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15514 return 1;
15515 # else
15516 if (setlocale (LC_ALL, "") == NULL) return 1;
15517 # endif
15518 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15519 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15520 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15521 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15522 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15523 some unit tests fail.
15524 On MirBSD 10, when an unsupported locale is specified, setlocale()
15525 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15526 # if HAVE_LANGINFO_CODESET
15527 {
15528 const char *cs = nl_langinfo (CODESET);
15529 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15530 || strcmp (cs, "UTF-8") == 0)
15531 return 1;
15532 }
15533 # endif
15534 # ifdef __CYGWIN__
15535 /* On Cygwin, avoid locale names without encoding suffix, because the
15536 locale_charset() function relies on the encoding suffix. Note that
15537 LC_ALL is set on the command line. */
15538 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15539 # endif
15540 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
15541 on Cygwin 1.5.x. */
15542 if (MB_CUR_MAX == 1)
15543 return 1;
15544 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15545 This excludes the UTF-8 encoding (except on MirBSD). */
15546 {
15547 const char *p;
15548 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15549 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15550 for (p = buf; *p != '\0'; p++)
15551 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15552 return 1;
15553 }
15554 return 0;
15555 #endif
15556 }
15557
15558 _ACEOF
15559 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15560 (eval $ac_link) 2>&5
15561 ac_status=$?
15562 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15563 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15564 case "$host_os" in
15565 # Handle native Windows specially, because there setlocale() interprets
15566 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15567 # "fr" or "fra" as "French" or "French_France.1252",
15568 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15569 # "ja" as "Japanese" or "Japanese_Japan.932",
15570 # and similar.
15571 mingw*)
15572 # Note that on native Windows, the Japanese locale is
15573 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
15574 # cannot use it here.
15575 gt_cv_locale_ja=none
15576 ;;
15577 *)
15578 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15579 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15580 # configure script would override the LC_ALL setting. Likewise for
15581 # LC_CTYPE, which is also set at the beginning of the configure script.
15582 # Test for the AIX locale name.
15583 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15584 gt_cv_locale_ja=ja_JP
15585 else
15586 # Test for the locale name with explicit encoding suffix.
15587 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15588 gt_cv_locale_ja=ja_JP.EUC-JP
15589 else
15590 # Test for the HP-UX, OSF/1, NetBSD locale name.
15591 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15592 gt_cv_locale_ja=ja_JP.eucJP
15593 else
15594 # Test for the IRIX, FreeBSD locale name.
15595 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15596 gt_cv_locale_ja=ja_JP.EUC
15597 else
15598 # Test for the Solaris 7 locale name.
15599 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15600 gt_cv_locale_ja=ja
15601 else
15602 # Special test for NetBSD 1.6.
15603 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
15604 gt_cv_locale_ja=ja_JP.eucJP
15605 else
15606 # None found.
15607 gt_cv_locale_ja=none
15608 fi
15609 fi
15610 fi
15611 fi
15612 fi
15613 fi
15614 ;;
15615 esac
15616 fi
15617 rm -fr conftest*
15618
15619 fi
15620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
15621 $as_echo "$gt_cv_locale_ja" >&6; }
15622 LOCALE_JA=$gt_cv_locale_ja
15623
15624
15625
15626
15627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
15628 $as_echo_n "checking for a french Unicode locale... " >&6; }
15629 if ${gt_cv_locale_fr_utf8+:} false; then :
15630 $as_echo_n "(cached) " >&6
15631 else
15632
15633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15634 /* end confdefs.h. */
15635
15636 #include <locale.h>
15637 #include <time.h>
15638 #if HAVE_LANGINFO_CODESET
15639 # include <langinfo.h>
15640 #endif
15641 #include <stdlib.h>
15642 #include <string.h>
15643 struct tm t;
15644 char buf[16];
15645 int main () {
15646 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15647 imitates locale dependent behaviour by looking at the environment
15648 variables, and all locales use the UTF-8 encoding. */
15649 #if !(defined __BEOS__ || defined __HAIKU__)
15650 /* Check whether the given locale name is recognized by the system. */
15651 # if defined _WIN32 && !defined __CYGWIN__
15652 /* On native Windows, setlocale(category, "") looks at the system settings,
15653 not at the environment variables. Also, when an encoding suffix such
15654 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15655 category of the locale to "C". */
15656 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15657 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15658 return 1;
15659 # else
15660 if (setlocale (LC_ALL, "") == NULL) return 1;
15661 # endif
15662 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15663 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15664 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15665 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15666 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15667 some unit tests fail. */
15668 # if HAVE_LANGINFO_CODESET
15669 {
15670 const char *cs = nl_langinfo (CODESET);
15671 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
15672 return 1;
15673 }
15674 # endif
15675 # ifdef __CYGWIN__
15676 /* On Cygwin, avoid locale names without encoding suffix, because the
15677 locale_charset() function relies on the encoding suffix. Note that
15678 LC_ALL is set on the command line. */
15679 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15680 # endif
15681 /* Check whether in the abbreviation of the second month, the second
15682 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
15683 two bytes long, with UTF-8 encoding. */
15684 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15685 if (strftime (buf, sizeof (buf), "%b", &t) < 4
15686 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
15687 return 1;
15688 #endif
15689 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
15690 /* Check whether the decimal separator is a comma.
15691 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15692 are nl_langinfo(RADIXCHAR) are both ".". */
15693 if (localeconv () ->decimal_point[0] != ',') return 1;
15694 #endif
15695 return 0;
15696 }
15697
15698 _ACEOF
15699 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15700 (eval $ac_link) 2>&5
15701 ac_status=$?
15702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15703 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15704 case "$host_os" in
15705 # Handle native Windows specially, because there setlocale() interprets
15706 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15707 # "fr" or "fra" as "French" or "French_France.1252",
15708 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15709 # "ja" as "Japanese" or "Japanese_Japan.932",
15710 # and similar.
15711 mingw*)
15712 # Test for the hypothetical native Windows locale name.
15713 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15714 gt_cv_locale_fr_utf8=French_France.65001
15715 else
15716 # None found.
15717 gt_cv_locale_fr_utf8=none
15718 fi
15719 ;;
15720 *)
15721 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15722 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15723 # configure script would override the LC_ALL setting. Likewise for
15724 # LC_CTYPE, which is also set at the beginning of the configure script.
15725 # Test for the usual locale name.
15726 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15727 gt_cv_locale_fr_utf8=fr_FR
15728 else
15729 # Test for the locale name with explicit encoding suffix.
15730 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15731 gt_cv_locale_fr_utf8=fr_FR.UTF-8
15732 else
15733 # Test for the Solaris 7 locale name.
15734 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15735 gt_cv_locale_fr_utf8=fr.UTF-8
15736 else
15737 # None found.
15738 gt_cv_locale_fr_utf8=none
15739 fi
15740 fi
15741 fi
15742 ;;
15743 esac
15744 fi
15745 rm -fr conftest*
15746
15747 fi
15748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15749 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
15750 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15751
15752
15753
15754
15755
15756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
15757 $as_echo_n "checking for a transitional chinese locale... " >&6; }
15758 if ${gt_cv_locale_zh_CN+:} false; then :
15759 $as_echo_n "(cached) " >&6
15760 else
15761
15762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15763 /* end confdefs.h. */
15764
15765 #include <locale.h>
15766 #include <stdlib.h>
15767 #include <time.h>
15768 #if HAVE_LANGINFO_CODESET
15769 # include <langinfo.h>
15770 #endif
15771 #include <stdlib.h>
15772 #include <string.h>
15773 struct tm t;
15774 char buf[16];
15775 int main ()
15776 {
15777 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15778 imitates locale dependent behaviour by looking at the environment
15779 variables, and all locales use the UTF-8 encoding. */
15780 #if defined __BEOS__ || defined __HAIKU__
15781 return 1;
15782 #else
15783 /* Check whether the given locale name is recognized by the system. */
15784 # if defined _WIN32 && !defined __CYGWIN__
15785 /* On native Windows, setlocale(category, "") looks at the system settings,
15786 not at the environment variables. Also, when an encoding suffix such
15787 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15788 category of the locale to "C". */
15789 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15790 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15791 return 1;
15792 # else
15793 if (setlocale (LC_ALL, "") == NULL) return 1;
15794 # endif
15795 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15796 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15797 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15798 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15799 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15800 some unit tests fail.
15801 On MirBSD 10, when an unsupported locale is specified, setlocale()
15802 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15803 # if HAVE_LANGINFO_CODESET
15804 {
15805 const char *cs = nl_langinfo (CODESET);
15806 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15807 || strcmp (cs, "UTF-8") == 0)
15808 return 1;
15809 }
15810 # endif
15811 # ifdef __CYGWIN__
15812 /* On Cygwin, avoid locale names without encoding suffix, because the
15813 locale_charset() function relies on the encoding suffix. Note that
15814 LC_ALL is set on the command line. */
15815 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15816 # endif
15817 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15818 This excludes the UTF-8 encoding (except on MirBSD). */
15819 {
15820 const char *p;
15821 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15822 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15823 for (p = buf; *p != '\0'; p++)
15824 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15825 return 1;
15826 }
15827 /* Check whether a typical GB18030 multibyte sequence is recognized as a
15828 single wide character. This excludes the GB2312 and GBK encodings. */
15829 if (mblen ("\203\062\332\066", 5) != 4)
15830 return 1;
15831 return 0;
15832 #endif
15833 }
15834
15835 _ACEOF
15836 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15837 (eval $ac_link) 2>&5
15838 ac_status=$?
15839 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15840 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15841 case "$host_os" in
15842 # Handle native Windows specially, because there setlocale() interprets
15843 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15844 # "fr" or "fra" as "French" or "French_France.1252",
15845 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15846 # "ja" as "Japanese" or "Japanese_Japan.932",
15847 # and similar.
15848 mingw*)
15849 # Test for the hypothetical native Windows locale name.
15850 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15851 gt_cv_locale_zh_CN=Chinese_China.54936
15852 else
15853 # None found.
15854 gt_cv_locale_zh_CN=none
15855 fi
15856 ;;
15857 solaris2.8)
15858 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
15859 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
15860 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
15861 gt_cv_locale_zh_CN=none
15862 ;;
15863 *)
15864 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15865 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15866 # configure script would override the LC_ALL setting. Likewise for
15867 # LC_CTYPE, which is also set at the beginning of the configure script.
15868 # Test for the locale name without encoding suffix.
15869 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15870 gt_cv_locale_zh_CN=zh_CN
15871 else
15872 # Test for the locale name with explicit encoding suffix.
15873 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15874 gt_cv_locale_zh_CN=zh_CN.GB18030
15875 else
15876 # None found.
15877 gt_cv_locale_zh_CN=none
15878 fi
15879 fi
15880 ;;
15881 esac
15882 else
15883 # If there was a link error, due to mblen(), the system is so old that
15884 # it certainly doesn't have a chinese locale.
15885 gt_cv_locale_zh_CN=none
15886 fi
15887 rm -fr conftest*
15888
15889 fi
15890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
15891 $as_echo "$gt_cv_locale_zh_CN" >&6; }
15892 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
15893
15894
15895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
15896 $as_echo_n "checking for inline... " >&6; }
15897 if ${ac_cv_c_inline+:} false; then :
15898 $as_echo_n "(cached) " >&6
15899 else
15900 ac_cv_c_inline=no
15901 for ac_kw in inline __inline__ __inline; do
15902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15903 /* end confdefs.h. */
15904 #ifndef __cplusplus
15905 typedef int foo_t;
15906 static $ac_kw foo_t static_foo () {return 0; }
15907 $ac_kw foo_t foo () {return 0; }
15908 #endif
15909
15910 _ACEOF
15911 if ac_fn_c_try_compile "$LINENO"; then :
15912 ac_cv_c_inline=$ac_kw
15913 fi
15914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15915 test "$ac_cv_c_inline" != no && break
15916 done
15917
15918 fi
15919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
15920 $as_echo "$ac_cv_c_inline" >&6; }
15921
15922 case $ac_cv_c_inline in
15923 inline | yes) ;;
15924 *)
15925 case $ac_cv_c_inline in
15926 no) ac_val=;;
15927 *) ac_val=$ac_cv_c_inline;;
15928 esac
15929 cat >>confdefs.h <<_ACEOF
15930 #ifndef __cplusplus
15931 #define inline $ac_val
15932 #endif
15933 _ACEOF
15934 ;;
15935 esac
15936
15937
15938
15939
15940
15941
15942 GNULIB_EXPLICIT_BZERO=0;
15943 GNULIB_FFSL=0;
15944 GNULIB_FFSLL=0;
15945 GNULIB_MEMCHR=0;
15946 GNULIB_MEMMEM=0;
15947 GNULIB_MEMPCPY=0;
15948 GNULIB_MEMRCHR=0;
15949 GNULIB_RAWMEMCHR=0;
15950 GNULIB_STPCPY=0;
15951 GNULIB_STPNCPY=0;
15952 GNULIB_STRCHRNUL=0;
15953 GNULIB_STRDUP=0;
15954 GNULIB_STRNCAT=0;
15955 GNULIB_STRNDUP=0;
15956 GNULIB_STRNLEN=0;
15957 GNULIB_STRPBRK=0;
15958 GNULIB_STRSEP=0;
15959 GNULIB_STRSTR=0;
15960 GNULIB_STRCASESTR=0;
15961 GNULIB_STRTOK_R=0;
15962 GNULIB_MBSLEN=0;
15963 GNULIB_MBSNLEN=0;
15964 GNULIB_MBSCHR=0;
15965 GNULIB_MBSRCHR=0;
15966 GNULIB_MBSSTR=0;
15967 GNULIB_MBSCASECMP=0;
15968 GNULIB_MBSNCASECMP=0;
15969 GNULIB_MBSPCASECMP=0;
15970 GNULIB_MBSCASESTR=0;
15971 GNULIB_MBSCSPN=0;
15972 GNULIB_MBSPBRK=0;
15973 GNULIB_MBSSPN=0;
15974 GNULIB_MBSSEP=0;
15975 GNULIB_MBSTOK_R=0;
15976 GNULIB_STRERROR=0;
15977 GNULIB_STRERROR_R=0;
15978 GNULIB_STRERRORNAME_NP=0;
15979 GNULIB_SIGABBREV_NP=0;
15980 GNULIB_SIGDESCR_NP=0;
15981 GNULIB_STRSIGNAL=0;
15982 GNULIB_STRVERSCMP=0;
15983 HAVE_MBSLEN=0;
15984 GNULIB_MDA_MEMCCPY=1;
15985 GNULIB_MDA_STRDUP=1;
15986 HAVE_EXPLICIT_BZERO=1;
15987 HAVE_FFSL=1;
15988 HAVE_FFSLL=1;
15989 HAVE_DECL_MEMMEM=1;
15990 HAVE_MEMPCPY=1;
15991 HAVE_DECL_MEMRCHR=1;
15992 HAVE_RAWMEMCHR=1;
15993 HAVE_STPCPY=1;
15994 HAVE_STPNCPY=1;
15995 HAVE_STRCHRNUL=1;
15996 HAVE_DECL_STRDUP=1;
15997 HAVE_DECL_STRNDUP=1;
15998 HAVE_DECL_STRNLEN=1;
15999 HAVE_STRPBRK=1;
16000 HAVE_STRSEP=1;
16001 HAVE_STRCASESTR=1;
16002 HAVE_DECL_STRTOK_R=1;
16003 HAVE_DECL_STRERROR_R=1;
16004 HAVE_STRERRORNAME_NP=1;
16005 HAVE_SIGABBREV_NP=1;
16006 HAVE_SIGDESCR_NP=1;
16007 HAVE_DECL_STRSIGNAL=1;
16008 HAVE_STRVERSCMP=1;
16009 REPLACE_FFSLL=0;
16010 REPLACE_MEMCHR=0;
16011 REPLACE_MEMMEM=0;
16012 REPLACE_STPNCPY=0;
16013 REPLACE_STRCHRNUL=0;
16014 REPLACE_STRDUP=0;
16015 REPLACE_STRNCAT=0;
16016 REPLACE_STRNDUP=0;
16017 REPLACE_STRNLEN=0;
16018 REPLACE_STRSTR=0;
16019 REPLACE_STRCASESTR=0;
16020 REPLACE_STRTOK_R=0;
16021 REPLACE_STRERROR=0;
16022 REPLACE_STRERROR_R=0;
16023 REPLACE_STRERRORNAME_NP=0;
16024 REPLACE_STRSIGNAL=0;
16025 UNDEFINE_STRTOK_R=0;
16026
16027
16028
16029
16030
16031
16032 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
16033 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
16034 # irrelevant for anonymous mappings.
16035 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
16036 if test "x$ac_cv_func_mmap" = xyes; then :
16037 gl_have_mmap=yes
16038 else
16039 gl_have_mmap=no
16040 fi
16041
16042
16043 # Try to allow MAP_ANONYMOUS.
16044 gl_have_mmap_anonymous=no
16045 if test $gl_have_mmap = yes; then
16046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
16047 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
16048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16049 /* end confdefs.h. */
16050
16051 #include <sys/mman.h>
16052 #ifdef MAP_ANONYMOUS
16053 I cannot identify this map
16054 #endif
16055
16056 _ACEOF
16057 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16058 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
16059 gl_have_mmap_anonymous=yes
16060 fi
16061 rm -f conftest*
16062
16063 if test $gl_have_mmap_anonymous != yes; then
16064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16065 /* end confdefs.h. */
16066
16067 #include <sys/mman.h>
16068 #ifdef MAP_ANON
16069 I cannot identify this map
16070 #endif
16071
16072 _ACEOF
16073 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16074 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
16075
16076 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
16077
16078 gl_have_mmap_anonymous=yes
16079 fi
16080 rm -f conftest*
16081
16082 fi
16083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
16084 $as_echo "$gl_have_mmap_anonymous" >&6; }
16085 if test $gl_have_mmap_anonymous = yes; then
16086
16087 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
16088
16089 fi
16090 fi
16091
16092
16093
16094
16095
16096 # Detect platform-specific bugs in some versions of glibc:
16097 # memchr should not dereference anything with length 0
16098 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
16099 # memchr should not dereference overestimated length after a match
16100 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
16101 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
16102 # memchr should cast the second argument to 'unsigned char'.
16103 # This bug exists in Android 4.3.
16104 # Assume that memchr works on platforms that lack mprotect.
16105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
16106 $as_echo_n "checking whether memchr works... " >&6; }
16107 if ${gl_cv_func_memchr_works+:} false; then :
16108 $as_echo_n "(cached) " >&6
16109 else
16110 if test "$cross_compiling" = yes; then :
16111 case "$host_os" in
16112 # Guess no on Android.
16113 linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
16114 # Guess yes on native Windows.
16115 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
16116 # If we don't know, obey --enable-cross-guesses.
16117 *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
16118 esac
16119
16120 else
16121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16122 /* end confdefs.h. */
16123
16124 #include <string.h>
16125 #if HAVE_SYS_MMAN_H
16126 # include <fcntl.h>
16127 # include <unistd.h>
16128 # include <sys/types.h>
16129 # include <sys/mman.h>
16130 # ifndef MAP_FILE
16131 # define MAP_FILE 0
16132 # endif
16133 #endif
16134
16135 int
16136 main ()
16137 {
16138
16139 int result = 0;
16140 char *fence = NULL;
16141 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
16142 # if HAVE_MAP_ANONYMOUS
16143 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
16144 const int fd = -1;
16145 # else /* !HAVE_MAP_ANONYMOUS */
16146 const int flags = MAP_FILE | MAP_PRIVATE;
16147 int fd = open ("/dev/zero", O_RDONLY, 0666);
16148 if (fd >= 0)
16149 # endif
16150 {
16151 int pagesize = getpagesize ();
16152 char *two_pages =
16153 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
16154 flags, fd, 0);
16155 if (two_pages != (char *)(-1)
16156 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
16157 fence = two_pages + pagesize;
16158 }
16159 #endif
16160 if (fence)
16161 {
16162 /* Test against bugs on glibc systems. */
16163 if (memchr (fence, 0, 0))
16164 result |= 1;
16165 strcpy (fence - 9, "12345678");
16166 if (memchr (fence - 9, 0, 79) != fence - 1)
16167 result |= 2;
16168 if (memchr (fence - 1, 0, 3) != fence - 1)
16169 result |= 4;
16170 /* Test against bug on AIX 7.2. */
16171 if (memchr (fence - 4, '6', 16) != fence - 4)
16172 result |= 8;
16173 }
16174 /* Test against bug on Android 4.3. */
16175 {
16176 char input[3];
16177 input[0] = 'a';
16178 input[1] = 'b';
16179 input[2] = 'c';
16180 if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
16181 result |= 16;
16182 }
16183 return result;
16184
16185 ;
16186 return 0;
16187 }
16188 _ACEOF
16189 if ac_fn_c_try_run "$LINENO"; then :
16190 gl_cv_func_memchr_works=yes
16191 else
16192 gl_cv_func_memchr_works=no
16193 fi
16194 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16195 conftest.$ac_objext conftest.beam conftest.$ac_ext
16196 fi
16197
16198
16199 fi
16200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
16201 $as_echo "$gl_cv_func_memchr_works" >&6; }
16202 case "$gl_cv_func_memchr_works" in
16203 *yes) ;;
16204 *) REPLACE_MEMCHR=1 ;;
16205 esac
16206
16207 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
16208 if test "x$ac_cv_have_decl_memmem" = xyes; then :
16209 ac_have_decl=1
16210 else
16211 ac_have_decl=0
16212 fi
16213
16214 cat >>confdefs.h <<_ACEOF
16215 #define HAVE_DECL_MEMMEM $ac_have_decl
16216 _ACEOF
16217
16218
16219
16220
16221
16222 for ac_func in memmem
16223 do :
16224 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
16225 if test "x$ac_cv_func_memmem" = xyes; then :
16226 cat >>confdefs.h <<_ACEOF
16227 #define HAVE_MEMMEM 1
16228 _ACEOF
16229
16230 fi
16231 done
16232
16233 if test $ac_cv_func_memmem = yes; then
16234 HAVE_MEMMEM=1
16235 else
16236 HAVE_MEMMEM=0
16237 fi
16238
16239 if test $ac_cv_have_decl_memmem = no; then
16240 HAVE_DECL_MEMMEM=0
16241 else
16242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
16243 $as_echo_n "checking whether memmem works... " >&6; }
16244 if ${gl_cv_func_memmem_works_always+:} false; then :
16245 $as_echo_n "(cached) " >&6
16246 else
16247 if test "$cross_compiling" = yes; then :
16248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16249 /* end confdefs.h. */
16250
16251 #ifdef __GNU_LIBRARY__
16252 #include <features.h>
16253 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
16254 || __GLIBC_MINOR__ > 12)) \
16255 || (__GLIBC__ > 2)) \
16256 || defined __UCLIBC__
16257 Lucky user
16258 #endif
16259 #elif defined __CYGWIN__
16260 #include <cygwin/version.h>
16261 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
16262 Lucky user
16263 #endif
16264 #else
16265 Lucky user
16266 #endif
16267
16268 _ACEOF
16269 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16270 $EGREP "Lucky user" >/dev/null 2>&1; then :
16271 gl_cv_func_memmem_works_always="guessing yes"
16272 else
16273 gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
16274 fi
16275 rm -f conftest*
16276
16277
16278 else
16279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16280 /* end confdefs.h. */
16281
16282 #include <string.h> /* for memmem */
16283 #define P "_EF_BF_BD"
16284 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
16285 #define NEEDLE P P P P P
16286
16287 int
16288 main ()
16289 {
16290
16291 int result = 0;
16292 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
16293 result |= 1;
16294 /* Check for empty needle behavior. */
16295 {
16296 const char *haystack = "AAA";
16297 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
16298 result |= 2;
16299 }
16300 return result;
16301
16302 ;
16303 return 0;
16304 }
16305 _ACEOF
16306 if ac_fn_c_try_run "$LINENO"; then :
16307 gl_cv_func_memmem_works_always=yes
16308 else
16309 gl_cv_func_memmem_works_always=no
16310 fi
16311 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16312 conftest.$ac_objext conftest.beam conftest.$ac_ext
16313 fi
16314
16315
16316 fi
16317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
16318 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
16319 case "$gl_cv_func_memmem_works_always" in
16320 *yes) ;;
16321 *)
16322 REPLACE_MEMMEM=1
16323 ;;
16324 esac
16325 fi
16326 :
16327
16328 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
16329 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
16330 ac_have_decl=1
16331 else
16332 ac_have_decl=0
16333 fi
16334
16335 cat >>confdefs.h <<_ACEOF
16336 #define HAVE_DECL_MEMRCHR $ac_have_decl
16337 _ACEOF
16338
16339
16340
16341
16342
16343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
16344 $as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
16345 if ${gl_cv_minmax_in_limits_h+:} false; then :
16346 $as_echo_n "(cached) " >&6
16347 else
16348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16349 /* end confdefs.h. */
16350 #include <limits.h>
16351 int x = MIN (42, 17);
16352 int
16353 main ()
16354 {
16355
16356 ;
16357 return 0;
16358 }
16359 _ACEOF
16360 if ac_fn_c_try_compile "$LINENO"; then :
16361 gl_cv_minmax_in_limits_h=yes
16362 else
16363 gl_cv_minmax_in_limits_h=no
16364 fi
16365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16366 fi
16367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
16368 $as_echo "$gl_cv_minmax_in_limits_h" >&6; }
16369 if test $gl_cv_minmax_in_limits_h = yes; then
16370
16371 $as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
16372
16373 fi
16374
16375
16376
16377
16378
16379
16380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
16381 $as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
16382 if ${gl_cv_minmax_in_sys_param_h+:} false; then :
16383 $as_echo_n "(cached) " >&6
16384 else
16385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16386 /* end confdefs.h. */
16387 #include <sys/param.h>
16388 int x = MIN (42, 17);
16389 int
16390 main ()
16391 {
16392
16393 ;
16394 return 0;
16395 }
16396 _ACEOF
16397 if ac_fn_c_try_compile "$LINENO"; then :
16398 gl_cv_minmax_in_sys_param_h=yes
16399 else
16400 gl_cv_minmax_in_sys_param_h=no
16401 fi
16402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16403 fi
16404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
16405 $as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
16406 if test $gl_cv_minmax_in_sys_param_h = yes; then
16407
16408 $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
16409
16410 fi
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421 GNULIB_GETADDRINFO=0;
16422 HAVE_STRUCT_ADDRINFO=1;
16423 HAVE_DECL_FREEADDRINFO=1;
16424 HAVE_DECL_GAI_STRERROR=1;
16425 HAVE_DECL_GETADDRINFO=1;
16426 HAVE_DECL_GETNAMEINFO=1;
16427 REPLACE_GAI_STRERROR=0;
16428 REPLACE_GETADDRINFO=0;
16429
16430
16431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
16432 $as_echo_n "checking for O_CLOEXEC... " >&6; }
16433 if ${gl_cv_macro_O_CLOEXEC+:} false; then :
16434 $as_echo_n "(cached) " >&6
16435 else
16436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16437 /* end confdefs.h. */
16438 #include <fcntl.h>
16439 #ifndef O_CLOEXEC
16440 choke me;
16441 #endif
16442
16443 int
16444 main ()
16445 {
16446 return O_CLOEXEC;
16447 ;
16448 return 0;
16449 }
16450 _ACEOF
16451 if ac_fn_c_try_compile "$LINENO"; then :
16452 gl_cv_macro_O_CLOEXEC=yes
16453 else
16454 gl_cv_macro_O_CLOEXEC=no
16455 fi
16456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16457 fi
16458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
16459 $as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
16460
16461
16462
16463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
16464 $as_echo_n "checking for promoted mode_t type... " >&6; }
16465 if ${gl_cv_promoted_mode_t+:} false; then :
16466 $as_echo_n "(cached) " >&6
16467 else
16468
16469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16470 /* end confdefs.h. */
16471 #include <sys/types.h>
16472 int
16473 main ()
16474 {
16475 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
16476 ;
16477 return 0;
16478 }
16479 _ACEOF
16480 if ac_fn_c_try_compile "$LINENO"; then :
16481 gl_cv_promoted_mode_t='int'
16482 else
16483 gl_cv_promoted_mode_t='mode_t'
16484 fi
16485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16486
16487 fi
16488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
16489 $as_echo "$gl_cv_promoted_mode_t" >&6; }
16490
16491 cat >>confdefs.h <<_ACEOF
16492 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
16493 _ACEOF
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505 GNULIB_PSELECT=0;
16506 GNULIB_SELECT=0;
16507 HAVE_PSELECT=1;
16508 REPLACE_PSELECT=0;
16509 REPLACE_SELECT=0;
16510
16511
16512
16513
16514
16515
16516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
16517 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
16518 if ${gl_cv_header_sys_select_h_selfcontained+:} false; then :
16519 $as_echo_n "(cached) " >&6
16520 else
16521
16522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16523 /* end confdefs.h. */
16524 #include <sys/select.h>
16525 int
16526 main ()
16527 {
16528 struct timeval b;
16529 ;
16530 return 0;
16531 }
16532 _ACEOF
16533 if ac_fn_c_try_compile "$LINENO"; then :
16534 gl_cv_header_sys_select_h_selfcontained=yes
16535 else
16536 gl_cv_header_sys_select_h_selfcontained=no
16537 fi
16538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16539 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
16540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16541 /* end confdefs.h. */
16542 #include <sys/select.h>
16543 int
16544 main ()
16545 {
16546 int memset; int bzero;
16547 ;
16548 return 0;
16549 }
16550
16551 _ACEOF
16552 if ac_fn_c_try_compile "$LINENO"; then :
16553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16554 /* end confdefs.h. */
16555 #include <sys/select.h>
16556 int
16557 main ()
16558 {
16559
16560 #undef memset
16561 #define memset nonexistent_memset
16562 extern
16563 #ifdef __cplusplus
16564 "C"
16565 #endif
16566 void *memset (void *, int, unsigned long);
16567 #undef bzero
16568 #define bzero nonexistent_bzero
16569 extern
16570 #ifdef __cplusplus
16571 "C"
16572 #endif
16573 void bzero (void *, unsigned long);
16574 fd_set fds;
16575 FD_ZERO (&fds);
16576
16577 ;
16578 return 0;
16579 }
16580
16581 _ACEOF
16582 if ac_fn_c_try_link "$LINENO"; then :
16583
16584 else
16585 gl_cv_header_sys_select_h_selfcontained=no
16586 fi
16587 rm -f core conftest.err conftest.$ac_objext \
16588 conftest$ac_exeext conftest.$ac_ext
16589
16590 fi
16591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16592 fi
16593
16594 fi
16595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
16596 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606 if test $gl_cv_have_include_next = yes; then
16607 gl_cv_next_sys_select_h='<'sys/select.h'>'
16608 else
16609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
16610 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
16611 if ${gl_cv_next_sys_select_h+:} false; then :
16612 $as_echo_n "(cached) " >&6
16613 else
16614
16615 if test $ac_cv_header_sys_select_h = yes; then
16616
16617
16618
16619
16620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16621 /* end confdefs.h. */
16622 #include <sys/select.h>
16623 _ACEOF
16624 case "$host_os" in
16625 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16626 *) gl_absname_cpp="$ac_cpp" ;;
16627 esac
16628
16629 case "$host_os" in
16630 mingw*)
16631 gl_dirsep_regex='[/\\]'
16632 ;;
16633 *)
16634 gl_dirsep_regex='\/'
16635 ;;
16636 esac
16637 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16638 gl_header_literal_regex=`echo 'sys/select.h' \
16639 | sed -e "$gl_make_literal_regex_sed"`
16640 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16641 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16642 s|^/[^/]|//&|
16643 p
16644 q
16645 }'
16646
16647 gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16648 sed -n "$gl_absolute_header_sed"`
16649
16650 gl_header=$gl_cv_absolute_sys_select_h
16651 gl_cv_next_sys_select_h='"'$gl_header'"'
16652 else
16653 gl_cv_next_sys_select_h='<'sys/select.h'>'
16654 fi
16655
16656
16657 fi
16658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
16659 $as_echo "$gl_cv_next_sys_select_h" >&6; }
16660 fi
16661 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
16662
16663 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16664 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16665 gl_next_as_first_directive='<'sys/select.h'>'
16666 else
16667 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16668 gl_next_as_first_directive=$gl_cv_next_sys_select_h
16669 fi
16670 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
16671
16672
16673
16674
16675 if test $ac_cv_header_sys_select_h = yes; then
16676 HAVE_SYS_SELECT_H=1
16677 else
16678 HAVE_SYS_SELECT_H=0
16679 fi
16680
16681
16682
16683
16684
16685 if test $ac_cv_header_sys_socket_h != yes; then
16686 for ac_header in winsock2.h
16687 do :
16688 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
16689 if test "x$ac_cv_header_winsock2_h" = xyes; then :
16690 cat >>confdefs.h <<_ACEOF
16691 #define HAVE_WINSOCK2_H 1
16692 _ACEOF
16693
16694 fi
16695
16696 done
16697
16698 fi
16699 if test "$ac_cv_header_winsock2_h" = yes; then
16700 HAVE_WINSOCK2_H=1
16701 UNISTD_H_HAVE_WINSOCK2_H=1
16702 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
16703 else
16704 HAVE_WINSOCK2_H=0
16705 fi
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718 if test $ac_cv_header_sys_socket_h != yes; then
16719 for ac_header in winsock2.h
16720 do :
16721 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
16722 if test "x$ac_cv_header_winsock2_h" = xyes; then :
16723 cat >>confdefs.h <<_ACEOF
16724 #define HAVE_WINSOCK2_H 1
16725 _ACEOF
16726
16727 fi
16728
16729 done
16730
16731 fi
16732 if test "$ac_cv_header_winsock2_h" = yes; then
16733 HAVE_WINSOCK2_H=1
16734 UNISTD_H_HAVE_WINSOCK2_H=1
16735 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
16736 else
16737 HAVE_WINSOCK2_H=0
16738 fi
16739
16740 LIBSOCKET=
16741 if test $HAVE_WINSOCK2_H = 1; then
16742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
16743 $as_echo_n "checking for WSAStartup... " >&6; }
16744 if ${gl_cv_func_wsastartup+:} false; then :
16745 $as_echo_n "(cached) " >&6
16746 else
16747
16748 gl_save_LIBS="$LIBS"
16749 LIBS="$LIBS -lws2_32"
16750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16751 /* end confdefs.h. */
16752
16753 #ifdef HAVE_WINSOCK2_H
16754 # include <winsock2.h>
16755 #endif
16756 int
16757 main ()
16758 {
16759
16760 WORD wVersionRequested = MAKEWORD(1, 1);
16761 WSADATA wsaData;
16762 int err = WSAStartup(wVersionRequested, &wsaData);
16763 WSACleanup ();
16764
16765 ;
16766 return 0;
16767 }
16768
16769 _ACEOF
16770 if ac_fn_c_try_link "$LINENO"; then :
16771 gl_cv_func_wsastartup=yes
16772 else
16773 gl_cv_func_wsastartup=no
16774 fi
16775 rm -f core conftest.err conftest.$ac_objext \
16776 conftest$ac_exeext conftest.$ac_ext
16777 LIBS="$gl_save_LIBS"
16778
16779 fi
16780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
16781 $as_echo "$gl_cv_func_wsastartup" >&6; }
16782 if test "$gl_cv_func_wsastartup" = "yes"; then
16783
16784 $as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
16785
16786 LIBSOCKET='-lws2_32'
16787 fi
16788 else
16789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
16790 $as_echo_n "checking for library containing setsockopt... " >&6; }
16791 if ${gl_cv_lib_socket+:} false; then :
16792 $as_echo_n "(cached) " >&6
16793 else
16794
16795 gl_cv_lib_socket=
16796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16797 /* end confdefs.h. */
16798 extern
16799 #ifdef __cplusplus
16800 "C"
16801 #endif
16802 char setsockopt();
16803 int
16804 main ()
16805 {
16806 setsockopt();
16807 ;
16808 return 0;
16809 }
16810 _ACEOF
16811 if ac_fn_c_try_link "$LINENO"; then :
16812
16813 else
16814 gl_save_LIBS="$LIBS"
16815 LIBS="$gl_save_LIBS -lsocket"
16816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16817 /* end confdefs.h. */
16818 extern
16819 #ifdef __cplusplus
16820 "C"
16821 #endif
16822 char setsockopt();
16823 int
16824 main ()
16825 {
16826 setsockopt();
16827 ;
16828 return 0;
16829 }
16830 _ACEOF
16831 if ac_fn_c_try_link "$LINENO"; then :
16832 gl_cv_lib_socket="-lsocket"
16833 fi
16834 rm -f core conftest.err conftest.$ac_objext \
16835 conftest$ac_exeext conftest.$ac_ext
16836 if test -z "$gl_cv_lib_socket"; then
16837 LIBS="$gl_save_LIBS -lnetwork"
16838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16839 /* end confdefs.h. */
16840 extern
16841 #ifdef __cplusplus
16842 "C"
16843 #endif
16844 char setsockopt();
16845 int
16846 main ()
16847 {
16848 setsockopt();
16849 ;
16850 return 0;
16851 }
16852 _ACEOF
16853 if ac_fn_c_try_link "$LINENO"; then :
16854 gl_cv_lib_socket="-lnetwork"
16855 fi
16856 rm -f core conftest.err conftest.$ac_objext \
16857 conftest$ac_exeext conftest.$ac_ext
16858 if test -z "$gl_cv_lib_socket"; then
16859 LIBS="$gl_save_LIBS -lnet"
16860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16861 /* end confdefs.h. */
16862 extern
16863 #ifdef __cplusplus
16864 "C"
16865 #endif
16866 char setsockopt();
16867 int
16868 main ()
16869 {
16870 setsockopt();
16871 ;
16872 return 0;
16873 }
16874 _ACEOF
16875 if ac_fn_c_try_link "$LINENO"; then :
16876 gl_cv_lib_socket="-lnet"
16877 fi
16878 rm -f core conftest.err conftest.$ac_objext \
16879 conftest$ac_exeext conftest.$ac_ext
16880 fi
16881 fi
16882 LIBS="$gl_save_LIBS"
16883
16884 fi
16885 rm -f core conftest.err conftest.$ac_objext \
16886 conftest$ac_exeext conftest.$ac_ext
16887 if test -z "$gl_cv_lib_socket"; then
16888 gl_cv_lib_socket="none needed"
16889 fi
16890
16891 fi
16892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
16893 $as_echo "$gl_cv_lib_socket" >&6; }
16894 if test "$gl_cv_lib_socket" != "none needed"; then
16895 LIBSOCKET="$gl_cv_lib_socket"
16896 fi
16897 fi
16898
16899
16900
16901
16902
16903
16904 :
16905
16906
16907 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
16908 if test "x$ac_cv_have_decl_setenv" = xyes; then :
16909 ac_have_decl=1
16910 else
16911 ac_have_decl=0
16912 fi
16913
16914 cat >>confdefs.h <<_ACEOF
16915 #define HAVE_DECL_SETENV $ac_have_decl
16916 _ACEOF
16917
16918
16919
16920
16921
16922
16923 if test $ac_cv_have_decl_setenv = no; then
16924 HAVE_DECL_SETENV=0
16925 fi
16926
16927
16928
16929
16930
16931 for ac_header in search.h
16932 do :
16933 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
16934 if test "x$ac_cv_header_search_h" = xyes; then :
16935 cat >>confdefs.h <<_ACEOF
16936 #define HAVE_SEARCH_H 1
16937 _ACEOF
16938
16939 fi
16940
16941 done
16942
16943 for ac_func in tsearch
16944 do :
16945 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
16946 if test "x$ac_cv_func_tsearch" = xyes; then :
16947 cat >>confdefs.h <<_ACEOF
16948 #define HAVE_TSEARCH 1
16949 _ACEOF
16950
16951 fi
16952 done
16953
16954
16955
16956
16957 GNULIB_PTHREAD_SIGMASK=0;
16958 GNULIB_RAISE=0;
16959 GNULIB_SIGNAL_H_SIGPIPE=0;
16960 GNULIB_SIGPROCMASK=0;
16961 GNULIB_SIGACTION=0;
16962 HAVE_POSIX_SIGNALBLOCKING=1;
16963 HAVE_PTHREAD_SIGMASK=1;
16964 HAVE_RAISE=1;
16965 HAVE_SIGSET_T=1;
16966 HAVE_SIGINFO_T=1;
16967 HAVE_SIGACTION=1;
16968 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
16969
16970 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
16971
16972 HAVE_SIGHANDLER_T=1;
16973 REPLACE_PTHREAD_SIGMASK=0;
16974 REPLACE_RAISE=0;
16975
16976
16977 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
16978 #include <signal.h>
16979 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
16980 #include <sys/types.h>
16981
16982 "
16983 if test "x$ac_cv_type_sigset_t" = xyes; then :
16984
16985 cat >>confdefs.h <<_ACEOF
16986 #define HAVE_SIGSET_T 1
16987 _ACEOF
16988
16989 gl_cv_type_sigset_t=yes
16990 else
16991 gl_cv_type_sigset_t=no
16992 fi
16993
16994 if test $gl_cv_type_sigset_t != yes; then
16995 HAVE_SIGSET_T=0
16996 fi
16997
16998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16999 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
17000 if ${ac_cv_header_stdbool_h+:} false; then :
17001 $as_echo_n "(cached) " >&6
17002 else
17003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17004 /* end confdefs.h. */
17005
17006 #include <stdbool.h>
17007
17008 #ifdef __cplusplus
17009 typedef bool Bool;
17010 #else
17011 typedef _Bool Bool;
17012 #ifndef bool
17013 "error: bool is not defined"
17014 #endif
17015 #ifndef false
17016 "error: false is not defined"
17017 #endif
17018 #if false
17019 "error: false is not 0"
17020 #endif
17021 #ifndef true
17022 "error: true is not defined"
17023 #endif
17024 #if true != 1
17025 "error: true is not 1"
17026 #endif
17027 #endif
17028
17029 #ifndef __bool_true_false_are_defined
17030 "error: __bool_true_false_are_defined is not defined"
17031 #endif
17032
17033 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
17034
17035 char a[true == 1 ? 1 : -1];
17036 char b[false == 0 ? 1 : -1];
17037 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
17038 char d[(bool) 0.5 == true ? 1 : -1];
17039 /* See body of main program for 'e'. */
17040 char f[(Bool) 0.0 == false ? 1 : -1];
17041 char g[true];
17042 char h[sizeof (Bool)];
17043 char i[sizeof s.t];
17044 enum { j = false, k = true, l = false * true, m = true * 256 };
17045 /* The following fails for
17046 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
17047 Bool n[m];
17048 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
17049 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
17050 /* Catch a bug in an HP-UX C compiler. See
17051 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
17052 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
17053 */
17054 Bool q = true;
17055 Bool *pq = &q;
17056 bool *qq = &q;
17057
17058 int
17059 main ()
17060 {
17061
17062 bool e = &s;
17063 *pq |= q; *pq |= ! q;
17064 *qq |= q; *qq |= ! q;
17065 /* Refer to every declared value, to avoid compiler optimizations. */
17066 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
17067 + !m + !n + !o + !p + !q + !pq + !qq);
17068
17069 ;
17070 return 0;
17071 }
17072 _ACEOF
17073 if ac_fn_c_try_compile "$LINENO"; then :
17074 ac_cv_header_stdbool_h=yes
17075 else
17076 ac_cv_header_stdbool_h=no
17077 fi
17078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17079 fi
17080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
17081 $as_echo "$ac_cv_header_stdbool_h" >&6; }
17082 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
17083 if test "x$ac_cv_type__Bool" = xyes; then :
17084
17085 cat >>confdefs.h <<_ACEOF
17086 #define HAVE__BOOL 1
17087 _ACEOF
17088
17089
17090 fi
17091
17092
17093 ac_fn_c_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default"
17094 if test "x$ac_cv_have_decl_fcloseall" = xyes; then :
17095 ac_have_decl=1
17096 else
17097 ac_have_decl=0
17098 fi
17099
17100 cat >>confdefs.h <<_ACEOF
17101 #define HAVE_DECL_FCLOSEALL $ac_have_decl
17102 _ACEOF
17103
17104 ac_fn_c_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default"
17105 if test "x$ac_cv_have_decl_ecvt" = xyes; then :
17106 ac_have_decl=1
17107 else
17108 ac_have_decl=0
17109 fi
17110
17111 cat >>confdefs.h <<_ACEOF
17112 #define HAVE_DECL_ECVT $ac_have_decl
17113 _ACEOF
17114
17115 ac_fn_c_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default"
17116 if test "x$ac_cv_have_decl_fcvt" = xyes; then :
17117 ac_have_decl=1
17118 else
17119 ac_have_decl=0
17120 fi
17121
17122 cat >>confdefs.h <<_ACEOF
17123 #define HAVE_DECL_FCVT $ac_have_decl
17124 _ACEOF
17125
17126 ac_fn_c_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default"
17127 if test "x$ac_cv_have_decl_gcvt" = xyes; then :
17128 ac_have_decl=1
17129 else
17130 ac_have_decl=0
17131 fi
17132
17133 cat >>confdefs.h <<_ACEOF
17134 #define HAVE_DECL_GCVT $ac_have_decl
17135 _ACEOF
17136
17137 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
17138 if test "x$ac_cv_have_decl_strdup" = xyes; then :
17139 ac_have_decl=1
17140 else
17141 ac_have_decl=0
17142 fi
17143
17144 cat >>confdefs.h <<_ACEOF
17145 #define HAVE_DECL_STRDUP $ac_have_decl
17146 _ACEOF
17147
17148
17149 REPLACE_STRERROR_0=0
17150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
17151 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
17152 if ${gl_cv_func_strerror_0_works+:} false; then :
17153 $as_echo_n "(cached) " >&6
17154 else
17155 if test "$cross_compiling" = yes; then :
17156 case "$host_os" in
17157 # Guess yes on glibc systems.
17158 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
17159 # Guess yes on musl systems.
17160 *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;;
17161 # Guess yes on native Windows.
17162 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
17163 # If we don't know, obey --enable-cross-guesses.
17164 *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
17165 esac
17166
17167 else
17168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17169 /* end confdefs.h. */
17170 #include <string.h>
17171 #include <errno.h>
17172
17173 int
17174 main ()
17175 {
17176 int result = 0;
17177 char *str;
17178 errno = 0;
17179 str = strerror (0);
17180 if (!*str) result |= 1;
17181 if (errno) result |= 2;
17182 if (strstr (str, "nknown") || strstr (str, "ndefined"))
17183 result |= 4;
17184 return result;
17185 ;
17186 return 0;
17187 }
17188 _ACEOF
17189 if ac_fn_c_try_run "$LINENO"; then :
17190 gl_cv_func_strerror_0_works=yes
17191 else
17192 gl_cv_func_strerror_0_works=no
17193 fi
17194 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17195 conftest.$ac_objext conftest.beam conftest.$ac_ext
17196 fi
17197
17198
17199 fi
17200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
17201 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
17202 case "$gl_cv_func_strerror_0_works" in
17203 *yes) ;;
17204 *)
17205 REPLACE_STRERROR_0=1
17206
17207 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
17208
17209 ;;
17210 esac
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221 if test $ac_cv_func_strerror_r = yes; then
17222 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
17223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
17224 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
17225 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
17226 $as_echo_n "(cached) " >&6
17227 else
17228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17229 /* end confdefs.h. */
17230 #include <string.h>
17231 int strerror_r (int, char *, size_t);
17232
17233 int
17234 main ()
17235 {
17236
17237 ;
17238 return 0;
17239 }
17240 _ACEOF
17241 if ac_fn_c_try_compile "$LINENO"; then :
17242 gl_cv_func_strerror_r_posix_signature=yes
17243 else
17244 gl_cv_func_strerror_r_posix_signature=no
17245 fi
17246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17247
17248 fi
17249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
17250 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
17251 if test $gl_cv_func_strerror_r_posix_signature = yes; then
17252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
17253 $as_echo_n "checking whether strerror_r works... " >&6; }
17254 if ${gl_cv_func_strerror_r_works+:} false; then :
17255 $as_echo_n "(cached) " >&6
17256 else
17257 if test "$cross_compiling" = yes; then :
17258
17259 case "$host_os" in
17260 # Guess no on AIX.
17261 aix*) gl_cv_func_strerror_r_works="guessing no";;
17262 # Guess no on HP-UX.
17263 hpux*) gl_cv_func_strerror_r_works="guessing no";;
17264 # Guess no on BSD variants.
17265 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
17266 # Guess yes otherwise.
17267 *) gl_cv_func_strerror_r_works="guessing yes";;
17268 esac
17269
17270 else
17271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17272 /* end confdefs.h. */
17273 #include <errno.h>
17274 #include <string.h>
17275
17276 int
17277 main ()
17278 {
17279 int result = 0;
17280 char buf[79];
17281 if (strerror_r (EACCES, buf, 0) < 0)
17282 result |= 1;
17283 errno = 0;
17284 if (strerror_r (EACCES, buf, sizeof buf) != 0)
17285 result |= 2;
17286 strcpy (buf, "Unknown");
17287 if (strerror_r (0, buf, sizeof buf) != 0)
17288 result |= 4;
17289 if (errno)
17290 result |= 8;
17291 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
17292 result |= 0x10;
17293 errno = 0;
17294 *buf = 0;
17295 if (strerror_r (-3, buf, sizeof buf) < 0)
17296 result |= 0x20;
17297 if (errno)
17298 result |= 0x40;
17299 if (!*buf)
17300 result |= 0x80;
17301 return result;
17302
17303 ;
17304 return 0;
17305 }
17306 _ACEOF
17307 if ac_fn_c_try_run "$LINENO"; then :
17308 gl_cv_func_strerror_r_works=yes
17309 else
17310 gl_cv_func_strerror_r_works=no
17311 fi
17312 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17313 conftest.$ac_objext conftest.beam conftest.$ac_ext
17314 fi
17315
17316
17317 fi
17318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
17319 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
17320 else
17321
17322 if test $ac_cv_func___xpg_strerror_r = yes; then
17323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
17324 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
17325 if ${gl_cv_func_strerror_r_works+:} false; then :
17326 $as_echo_n "(cached) " >&6
17327 else
17328 if test "$cross_compiling" = yes; then :
17329 gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
17330
17331 else
17332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17333 /* end confdefs.h. */
17334 #include <errno.h>
17335 #include <string.h>
17336 extern
17337 #ifdef __cplusplus
17338 "C"
17339 #endif
17340 int __xpg_strerror_r(int, char *, size_t);
17341
17342 int
17343 main ()
17344 {
17345 int result = 0;
17346 char buf[256] = "^";
17347 char copy[256];
17348 char *str = strerror (-1);
17349 strcpy (copy, str);
17350 if (__xpg_strerror_r (-2, buf, 1) == 0)
17351 result |= 1;
17352 if (*buf)
17353 result |= 2;
17354 __xpg_strerror_r (-2, buf, 256);
17355 if (strcmp (str, copy))
17356 result |= 4;
17357 return result;
17358
17359 ;
17360 return 0;
17361 }
17362 _ACEOF
17363 if ac_fn_c_try_run "$LINENO"; then :
17364 gl_cv_func_strerror_r_works=yes
17365 else
17366 gl_cv_func_strerror_r_works=no
17367 fi
17368 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17369 conftest.$ac_objext conftest.beam conftest.$ac_ext
17370 fi
17371
17372
17373 fi
17374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
17375 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
17376 fi
17377 fi
17378 fi
17379 fi
17380
17381 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
17382 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
17383 ac_have_decl=1
17384 else
17385 ac_have_decl=0
17386 fi
17387
17388 cat >>confdefs.h <<_ACEOF
17389 #define HAVE_DECL_STRERROR_R $ac_have_decl
17390 _ACEOF
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406 if test $gl_cv_have_include_next = yes; then
17407 gl_cv_next_string_h='<'string.h'>'
17408 else
17409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
17410 $as_echo_n "checking absolute name of <string.h>... " >&6; }
17411 if ${gl_cv_next_string_h+:} false; then :
17412 $as_echo_n "(cached) " >&6
17413 else
17414
17415
17416
17417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17418 /* end confdefs.h. */
17419 #include <string.h>
17420 _ACEOF
17421 case "$host_os" in
17422 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17423 *) gl_absname_cpp="$ac_cpp" ;;
17424 esac
17425
17426 case "$host_os" in
17427 mingw*)
17428 gl_dirsep_regex='[/\\]'
17429 ;;
17430 *)
17431 gl_dirsep_regex='\/'
17432 ;;
17433 esac
17434 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17435 gl_header_literal_regex=`echo 'string.h' \
17436 | sed -e "$gl_make_literal_regex_sed"`
17437 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17438 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17439 s|^/[^/]|//&|
17440 p
17441 q
17442 }'
17443
17444 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17445 sed -n "$gl_absolute_header_sed"`
17446
17447 gl_header=$gl_cv_absolute_string_h
17448 gl_cv_next_string_h='"'$gl_header'"'
17449
17450
17451 fi
17452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
17453 $as_echo "$gl_cv_next_string_h" >&6; }
17454 fi
17455 NEXT_STRING_H=$gl_cv_next_string_h
17456
17457 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17458 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17459 gl_next_as_first_directive='<'string.h'>'
17460 else
17461 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17462 gl_next_as_first_directive=$gl_cv_next_string_h
17463 fi
17464 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490 if test $gl_cv_have_include_next = yes; then
17491 gl_cv_next_strings_h='<'strings.h'>'
17492 else
17493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
17494 $as_echo_n "checking absolute name of <strings.h>... " >&6; }
17495 if ${gl_cv_next_strings_h+:} false; then :
17496 $as_echo_n "(cached) " >&6
17497 else
17498
17499 if test $ac_cv_header_strings_h = yes; then
17500
17501
17502
17503
17504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17505 /* end confdefs.h. */
17506 #include <strings.h>
17507 _ACEOF
17508 case "$host_os" in
17509 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17510 *) gl_absname_cpp="$ac_cpp" ;;
17511 esac
17512
17513 case "$host_os" in
17514 mingw*)
17515 gl_dirsep_regex='[/\\]'
17516 ;;
17517 *)
17518 gl_dirsep_regex='\/'
17519 ;;
17520 esac
17521 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17522 gl_header_literal_regex=`echo 'strings.h' \
17523 | sed -e "$gl_make_literal_regex_sed"`
17524 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17525 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17526 s|^/[^/]|//&|
17527 p
17528 q
17529 }'
17530
17531 gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17532 sed -n "$gl_absolute_header_sed"`
17533
17534 gl_header=$gl_cv_absolute_strings_h
17535 gl_cv_next_strings_h='"'$gl_header'"'
17536 else
17537 gl_cv_next_strings_h='<'strings.h'>'
17538 fi
17539
17540
17541 fi
17542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
17543 $as_echo "$gl_cv_next_strings_h" >&6; }
17544 fi
17545 NEXT_STRINGS_H=$gl_cv_next_strings_h
17546
17547 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17548 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17549 gl_next_as_first_directive='<'strings.h'>'
17550 else
17551 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17552 gl_next_as_first_directive=$gl_cv_next_strings_h
17553 fi
17554 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
17555
17556
17557
17558
17559 if test $ac_cv_header_strings_h = yes; then
17560 HAVE_STRINGS_H=1
17561 else
17562 HAVE_STRINGS_H=0
17563 fi
17564
17565
17566
17567
17568
17569
17570 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
17571 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
17572 ac_have_decl=1
17573 else
17574 ac_have_decl=0
17575 fi
17576
17577 cat >>confdefs.h <<_ACEOF
17578 #define HAVE_DECL_STRNLEN $ac_have_decl
17579 _ACEOF
17580
17581
17582
17583
17584 if test $REPLACE_MEMCHR = 1; then
17585 REPLACE_STRSTR=1
17586 else
17587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
17588 $as_echo_n "checking whether strstr works... " >&6; }
17589 if ${gl_cv_func_strstr_works_always+:} false; then :
17590 $as_echo_n "(cached) " >&6
17591 else
17592 if test "$cross_compiling" = yes; then :
17593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17594 /* end confdefs.h. */
17595
17596 #ifdef __GNU_LIBRARY__
17597 #include <features.h>
17598 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
17599 || defined __UCLIBC__
17600 Lucky user
17601 #endif
17602 #elif defined __CYGWIN__
17603 #include <cygwin/version.h>
17604 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
17605 Lucky user
17606 #endif
17607 #else
17608 Lucky user
17609 #endif
17610
17611 _ACEOF
17612 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17613 $EGREP "Lucky user" >/dev/null 2>&1; then :
17614 gl_cv_func_strstr_works_always="guessing yes"
17615 else
17616 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
17617 fi
17618 rm -f conftest*
17619
17620
17621 else
17622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17623 /* end confdefs.h. */
17624
17625 #include <string.h> /* for strstr */
17626 #ifdef __GNU_LIBRARY__
17627 #include <features.h>
17628 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
17629 Unlucky user
17630 #endif
17631 #endif
17632 #define P "_EF_BF_BD"
17633 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
17634 #define NEEDLE P P P P P
17635
17636 int
17637 main ()
17638 {
17639 return !!strstr (HAYSTACK, NEEDLE);
17640
17641 ;
17642 return 0;
17643 }
17644 _ACEOF
17645 if ac_fn_c_try_run "$LINENO"; then :
17646 gl_cv_func_strstr_works_always=yes
17647 else
17648 gl_cv_func_strstr_works_always=no
17649 fi
17650 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17651 conftest.$ac_objext conftest.beam conftest.$ac_ext
17652 fi
17653
17654
17655 fi
17656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
17657 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
17658 case "$gl_cv_func_strstr_works_always" in
17659 *yes) ;;
17660 *)
17661 REPLACE_STRSTR=1
17662 ;;
17663 esac
17664 fi
17665
17666 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
17667 if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
17668 ac_have_decl=1
17669 else
17670 ac_have_decl=0
17671 fi
17672
17673 cat >>confdefs.h <<_ACEOF
17674 #define HAVE_DECL_STRTOK_R $ac_have_decl
17675 _ACEOF
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689 $as_echo "#define _USE_STD_STAT 1" >>confdefs.h
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701 if test $gl_cv_have_include_next = yes; then
17702 gl_cv_next_sys_types_h='<'sys/types.h'>'
17703 else
17704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
17705 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
17706 if ${gl_cv_next_sys_types_h+:} false; then :
17707 $as_echo_n "(cached) " >&6
17708 else
17709
17710
17711
17712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17713 /* end confdefs.h. */
17714 #include <sys/types.h>
17715 _ACEOF
17716 case "$host_os" in
17717 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17718 *) gl_absname_cpp="$ac_cpp" ;;
17719 esac
17720
17721 case "$host_os" in
17722 mingw*)
17723 gl_dirsep_regex='[/\\]'
17724 ;;
17725 *)
17726 gl_dirsep_regex='\/'
17727 ;;
17728 esac
17729 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17730 gl_header_literal_regex=`echo 'sys/types.h' \
17731 | sed -e "$gl_make_literal_regex_sed"`
17732 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17733 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17734 s|^/[^/]|//&|
17735 p
17736 q
17737 }'
17738
17739 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17740 sed -n "$gl_absolute_header_sed"`
17741
17742 gl_header=$gl_cv_absolute_sys_types_h
17743 gl_cv_next_sys_types_h='"'$gl_header'"'
17744
17745
17746 fi
17747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
17748 $as_echo "$gl_cv_next_sys_types_h" >&6; }
17749 fi
17750 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
17751
17752 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17753 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17754 gl_next_as_first_directive='<'sys/types.h'>'
17755 else
17756 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17757 gl_next_as_first_directive=$gl_cv_next_sys_types_h
17758 fi
17759 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772 WINDOWS_STAT_INODES=0
17773
17774
17775
17776
17777
17778
17779
17780
17781 GNULIB_WAITPID=0;
17782
17783
17784
17785
17786 GNULIB_CTIME=0;
17787 GNULIB_MKTIME=0;
17788 GNULIB_LOCALTIME=0;
17789 GNULIB_NANOSLEEP=0;
17790 GNULIB_STRFTIME=0;
17791 GNULIB_STRPTIME=0;
17792 GNULIB_TIMEGM=0;
17793 GNULIB_TIMESPEC_GET=0;
17794 GNULIB_TIME_R=0;
17795 GNULIB_TIME_RZ=0;
17796 GNULIB_TZSET=0;
17797 GNULIB_MDA_TZSET=1;
17798 HAVE_DECL_LOCALTIME_R=1;
17799 HAVE_NANOSLEEP=1;
17800 HAVE_STRPTIME=1;
17801 HAVE_TIMEGM=1;
17802 HAVE_TIMESPEC_GET=1;
17803 HAVE_TIMEZONE_T=0;
17804 REPLACE_CTIME=GNULIB_PORTCHECK;
17805 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
17806 REPLACE_MKTIME=GNULIB_PORTCHECK;
17807 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
17808 REPLACE_STRFTIME=GNULIB_PORTCHECK;
17809 REPLACE_TIMEGM=GNULIB_PORTCHECK;
17810 REPLACE_TZSET=GNULIB_PORTCHECK;
17811
17812 : ${GNULIB_GETTIMEOFDAY=0};
17813 REPLACE_GMTIME=0;
17814 REPLACE_LOCALTIME=0;
17815
17816
17817
17818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17819 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
17820 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
17821 $as_echo_n "(cached) " >&6
17822 else
17823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17824 /* end confdefs.h. */
17825 #include <time.h>
17826
17827 int
17828 main ()
17829 {
17830 static struct timespec x; x.tv_sec = x.tv_nsec;
17831 ;
17832 return 0;
17833 }
17834 _ACEOF
17835 if ac_fn_c_try_compile "$LINENO"; then :
17836 gl_cv_sys_struct_timespec_in_time_h=yes
17837 else
17838 gl_cv_sys_struct_timespec_in_time_h=no
17839 fi
17840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17841 fi
17842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
17843 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
17844
17845 TIME_H_DEFINES_STRUCT_TIMESPEC=0
17846 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
17847 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
17848 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
17849 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
17850 TIME_H_DEFINES_STRUCT_TIMESPEC=1
17851 else
17852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
17853 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
17854 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
17855 $as_echo_n "(cached) " >&6
17856 else
17857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17858 /* end confdefs.h. */
17859 #include <sys/time.h>
17860
17861 int
17862 main ()
17863 {
17864 static struct timespec x; x.tv_sec = x.tv_nsec;
17865 ;
17866 return 0;
17867 }
17868 _ACEOF
17869 if ac_fn_c_try_compile "$LINENO"; then :
17870 gl_cv_sys_struct_timespec_in_sys_time_h=yes
17871 else
17872 gl_cv_sys_struct_timespec_in_sys_time_h=no
17873 fi
17874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17875 fi
17876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
17877 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
17878 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
17879 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
17880 else
17881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
17882 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
17883 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
17884 $as_echo_n "(cached) " >&6
17885 else
17886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17887 /* end confdefs.h. */
17888 #include <pthread.h>
17889
17890 int
17891 main ()
17892 {
17893 static struct timespec x; x.tv_sec = x.tv_nsec;
17894 ;
17895 return 0;
17896 }
17897 _ACEOF
17898 if ac_fn_c_try_compile "$LINENO"; then :
17899 gl_cv_sys_struct_timespec_in_pthread_h=yes
17900 else
17901 gl_cv_sys_struct_timespec_in_pthread_h=no
17902 fi
17903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17904 fi
17905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17906 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17907 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17908 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17909 else
17910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
17911 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
17912 if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
17913 $as_echo_n "(cached) " >&6
17914 else
17915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17916 /* end confdefs.h. */
17917 #include <unistd.h>
17918
17919 int
17920 main ()
17921 {
17922 static struct timespec x; x.tv_sec = x.tv_nsec;
17923 ;
17924 return 0;
17925 }
17926 _ACEOF
17927 if ac_fn_c_try_compile "$LINENO"; then :
17928 gl_cv_sys_struct_timespec_in_unistd_h=yes
17929 else
17930 gl_cv_sys_struct_timespec_in_unistd_h=no
17931 fi
17932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17933 fi
17934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
17935 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
17936 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
17937 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
17938 fi
17939 fi
17940 fi
17941 fi
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958 if test $gl_cv_have_include_next = yes; then
17959 gl_cv_next_time_h='<'time.h'>'
17960 else
17961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17962 $as_echo_n "checking absolute name of <time.h>... " >&6; }
17963 if ${gl_cv_next_time_h+:} false; then :
17964 $as_echo_n "(cached) " >&6
17965 else
17966
17967
17968
17969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17970 /* end confdefs.h. */
17971 #include <time.h>
17972 _ACEOF
17973 case "$host_os" in
17974 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17975 *) gl_absname_cpp="$ac_cpp" ;;
17976 esac
17977
17978 case "$host_os" in
17979 mingw*)
17980 gl_dirsep_regex='[/\\]'
17981 ;;
17982 *)
17983 gl_dirsep_regex='\/'
17984 ;;
17985 esac
17986 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17987 gl_header_literal_regex=`echo 'time.h' \
17988 | sed -e "$gl_make_literal_regex_sed"`
17989 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17990 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17991 s|^/[^/]|//&|
17992 p
17993 q
17994 }'
17995
17996 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17997 sed -n "$gl_absolute_header_sed"`
17998
17999 gl_header=$gl_cv_absolute_time_h
18000 gl_cv_next_time_h='"'$gl_header'"'
18001
18002
18003 fi
18004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
18005 $as_echo "$gl_cv_next_time_h" >&6; }
18006 fi
18007 NEXT_TIME_H=$gl_cv_next_time_h
18008
18009 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18010 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18011 gl_next_as_first_directive='<'time.h'>'
18012 else
18013 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18014 gl_next_as_first_directive=$gl_cv_next_time_h
18015 fi
18016 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
18017
18018
18019
18020
18021
18022
18023
18024
18025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
18026 $as_echo_n "checking for TIME_UTC in <time.h>... " >&6; }
18027 if ${gl_cv_time_h_has_TIME_UTC+:} false; then :
18028 $as_echo_n "(cached) " >&6
18029 else
18030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18031 /* end confdefs.h. */
18032 #include <time.h>
18033
18034 int
18035 main ()
18036 {
18037 static int x = TIME_UTC; x++;
18038 ;
18039 return 0;
18040 }
18041 _ACEOF
18042 if ac_fn_c_try_compile "$LINENO"; then :
18043 gl_cv_time_h_has_TIME_UTC=yes
18044 else
18045 gl_cv_time_h_has_TIME_UTC=no
18046 fi
18047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18048 fi
18049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
18050 $as_echo "$gl_cv_time_h_has_TIME_UTC" >&6; }
18051 if test $gl_cv_time_h_has_TIME_UTC = yes; then
18052 TIME_H_DEFINES_TIME_UTC=1
18053 else
18054 TIME_H_DEFINES_TIME_UTC=0
18055 fi
18056
18057
18058
18059
18060 ac_fn_c_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default"
18061 if test "x$ac_cv_have_decl_execvpe" = xyes; then :
18062 ac_have_decl=1
18063 else
18064 ac_have_decl=0
18065 fi
18066
18067 cat >>confdefs.h <<_ACEOF
18068 #define HAVE_DECL_EXECVPE $ac_have_decl
18069 _ACEOF
18070
18071 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
18072 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
18073 ac_have_decl=1
18074 else
18075 ac_have_decl=0
18076 fi
18077
18078 cat >>confdefs.h <<_ACEOF
18079 #define HAVE_DECL_UNSETENV $ac_have_decl
18080 _ACEOF
18081
18082
18083
18084
18085
18086 if test $ac_cv_header_crtdefs_h = yes; then
18087 HAVE_CRTDEFS_H=1
18088 else
18089 HAVE_CRTDEFS_H=0
18090 fi
18091
18092
18093
18094 GNULIB_ISWBLANK=0;
18095 GNULIB_ISWDIGIT=0;
18096 GNULIB_ISWXDIGIT=0;
18097 GNULIB_WCTYPE=0;
18098 GNULIB_ISWCTYPE=0;
18099 GNULIB_WCTRANS=0;
18100 GNULIB_TOWCTRANS=0;
18101 HAVE_ISWBLANK=1;
18102 HAVE_WCTYPE_T=1;
18103 HAVE_WCTRANS_T=1;
18104 REPLACE_ISWBLANK=0;
18105 REPLACE_ISWDIGIT=0;
18106 REPLACE_ISWXDIGIT=0;
18107
18108
18109
18110
18111
18112
18113
18114
18115 if false; then
18116 GL_COND_LIBTOOL_TRUE=
18117 GL_COND_LIBTOOL_FALSE='#'
18118 else
18119 GL_COND_LIBTOOL_TRUE='#'
18120 GL_COND_LIBTOOL_FALSE=
18121 fi
18122
18123 gl_cond_libtool=false
18124 gl_libdeps=
18125 gl_ltlibdeps=
18126 gl_m4_base='import/m4'
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137 gl_source_base='import'
18138
18139 if test "$ac_cv_header_winsock2_h" = yes; then
18140
18141
18142
18143
18144
18145
18146
18147
18148 gl_LIBOBJS="$gl_LIBOBJS accept.$ac_objext"
18149
18150 fi
18151
18152
18153
18154
18155
18156 GNULIB_ACCEPT=1
18157
18158
18159
18160
18161
18162 $as_echo "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
18163
18164
18165
18166
18167
18168 if test $ac_cv_func_alloca_works = no; then
18169 :
18170 fi
18171
18172 # Define an additional variable used in the Makefile substitution.
18173 if test $ac_cv_working_alloca_h = yes; then
18174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
18175 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
18176 if ${gl_cv_rpl_alloca+:} false; then :
18177 $as_echo_n "(cached) " >&6
18178 else
18179
18180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18181 /* end confdefs.h. */
18182
18183 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
18184 Need own alloca
18185 #endif
18186
18187 _ACEOF
18188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18189 $EGREP "Need own alloca" >/dev/null 2>&1; then :
18190 gl_cv_rpl_alloca=yes
18191 else
18192 gl_cv_rpl_alloca=no
18193 fi
18194 rm -f conftest*
18195
18196
18197 fi
18198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
18199 $as_echo "$gl_cv_rpl_alloca" >&6; }
18200 if test $gl_cv_rpl_alloca = yes; then
18201
18202 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
18203
18204 ALLOCA_H=alloca.h
18205 else
18206 ALLOCA_H=
18207 fi
18208 else
18209 ALLOCA_H=alloca.h
18210 fi
18211
18212 if test -n "$ALLOCA_H"; then
18213 GL_GENERATE_ALLOCA_H_TRUE=
18214 GL_GENERATE_ALLOCA_H_FALSE='#'
18215 else
18216 GL_GENERATE_ALLOCA_H_TRUE='#'
18217 GL_GENERATE_ALLOCA_H_FALSE=
18218 fi
18219
18220
18221 if test $ac_cv_working_alloca_h = yes; then
18222 HAVE_ALLOCA_H=1
18223 else
18224 HAVE_ALLOCA_H=0
18225 fi
18226
18227
18228
18229
18230
18231
18232 if test $ac_cv_header_arpa_inet_h = yes; then
18233 HAVE_ARPA_INET_H=1
18234 else
18235 HAVE_ARPA_INET_H=0
18236 fi
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247 if test $gl_cv_have_include_next = yes; then
18248 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
18249 else
18250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
18251 $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
18252 if ${gl_cv_next_arpa_inet_h+:} false; then :
18253 $as_echo_n "(cached) " >&6
18254 else
18255
18256 if test $ac_cv_header_arpa_inet_h = yes; then
18257
18258
18259
18260
18261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18262 /* end confdefs.h. */
18263 #include <arpa/inet.h>
18264 _ACEOF
18265 case "$host_os" in
18266 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18267 *) gl_absname_cpp="$ac_cpp" ;;
18268 esac
18269
18270 case "$host_os" in
18271 mingw*)
18272 gl_dirsep_regex='[/\\]'
18273 ;;
18274 *)
18275 gl_dirsep_regex='\/'
18276 ;;
18277 esac
18278 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18279 gl_header_literal_regex=`echo 'arpa/inet.h' \
18280 | sed -e "$gl_make_literal_regex_sed"`
18281 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18282 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18283 s|^/[^/]|//&|
18284 p
18285 q
18286 }'
18287
18288 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18289 sed -n "$gl_absolute_header_sed"`
18290
18291 gl_header=$gl_cv_absolute_arpa_inet_h
18292 gl_cv_next_arpa_inet_h='"'$gl_header'"'
18293 else
18294 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
18295 fi
18296
18297
18298 fi
18299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
18300 $as_echo "$gl_cv_next_arpa_inet_h" >&6; }
18301 fi
18302 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
18303
18304 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18305 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18306 gl_next_as_first_directive='<'arpa/inet.h'>'
18307 else
18308 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18309 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
18310 fi
18311 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321 if test $ac_cv_header_sys_socket_h = yes; then
18322 HAVE_WS2TCPIP_H=0
18323 else
18324 if test $ac_cv_header_ws2tcpip_h = yes; then
18325 HAVE_WS2TCPIP_H=1
18326 else
18327 HAVE_WS2TCPIP_H=0
18328 fi
18329 fi
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340 if test "$ac_cv_header_winsock2_h" = yes; then
18341
18342
18343
18344
18345
18346
18347
18348
18349 gl_LIBOBJS="$gl_LIBOBJS bind.$ac_objext"
18350
18351 fi
18352
18353
18354
18355
18356
18357 GNULIB_BIND=1
18358
18359
18360
18361
18362
18363 $as_echo "#define GNULIB_TEST_BIND 1" >>confdefs.h
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373 if test $ac_cv_func_btowc = no; then
18374 HAVE_BTOWC=0
18375 else
18376
18377
18378
18379
18380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
18381 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
18382 if ${gl_cv_func_btowc_nul+:} false; then :
18383 $as_echo_n "(cached) " >&6
18384 else
18385
18386 if test "$cross_compiling" = yes; then :
18387
18388 case "$host_os" in
18389 # Guess no on Cygwin.
18390 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
18391 # Guess yes on native Windows.
18392 mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
18393 # Guess yes otherwise.
18394 *) gl_cv_func_btowc_nul="guessing yes" ;;
18395 esac
18396
18397 else
18398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18399 /* end confdefs.h. */
18400
18401 #include <wchar.h>
18402 int main ()
18403 {
18404 if (btowc ('\0') != 0)
18405 return 1;
18406 return 0;
18407 }
18408 _ACEOF
18409 if ac_fn_c_try_run "$LINENO"; then :
18410 gl_cv_func_btowc_nul=yes
18411 else
18412 gl_cv_func_btowc_nul=no
18413 fi
18414 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18415 conftest.$ac_objext conftest.beam conftest.$ac_ext
18416 fi
18417
18418
18419 fi
18420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
18421 $as_echo "$gl_cv_func_btowc_nul" >&6; }
18422
18423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
18424 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
18425 if ${gl_cv_func_btowc_eof+:} false; then :
18426 $as_echo_n "(cached) " >&6
18427 else
18428
18429 case "$host_os" in
18430 # Guess no on IRIX.
18431 irix*) gl_cv_func_btowc_eof="guessing no" ;;
18432 # Guess yes on native Windows.
18433 mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
18434 # Guess yes otherwise.
18435 *) gl_cv_func_btowc_eof="guessing yes" ;;
18436 esac
18437 if test $LOCALE_FR != none; then
18438 if test "$cross_compiling" = yes; then :
18439 :
18440 else
18441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18442 /* end confdefs.h. */
18443
18444 #include <locale.h>
18445 #include <stdio.h>
18446 #include <wchar.h>
18447 int main ()
18448 {
18449 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
18450 {
18451 if (btowc (EOF) != WEOF)
18452 return 1;
18453 }
18454 return 0;
18455 }
18456 _ACEOF
18457 if ac_fn_c_try_run "$LINENO"; then :
18458 gl_cv_func_btowc_eof=yes
18459 else
18460 gl_cv_func_btowc_eof=no
18461 fi
18462 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18463 conftest.$ac_objext conftest.beam conftest.$ac_ext
18464 fi
18465
18466 fi
18467
18468 fi
18469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
18470 $as_echo "$gl_cv_func_btowc_eof" >&6; }
18471
18472 case "$gl_cv_func_btowc_nul" in
18473 *yes) ;;
18474 *) REPLACE_BTOWC=1 ;;
18475 esac
18476 case "$gl_cv_func_btowc_eof" in
18477 *yes) ;;
18478 *) REPLACE_BTOWC=1 ;;
18479 esac
18480 fi
18481
18482 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
18483
18484
18485
18486
18487
18488
18489
18490
18491 gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
18492
18493
18494 :
18495
18496 fi
18497
18498
18499
18500
18501
18502 GNULIB_BTOWC=1
18503
18504
18505
18506
18507
18508 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
18509
18510
18511
18512
18513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
18514 $as_echo_n "checking for __builtin_expect... " >&6; }
18515 if ${gl_cv___builtin_expect+:} false; then :
18516 $as_echo_n "(cached) " >&6
18517 else
18518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18519 /* end confdefs.h. */
18520
18521 int
18522 main (int argc, char **argv)
18523 {
18524 argc = __builtin_expect (argc, 100);
18525 return argv[argc != 100][0];
18526 }
18527 _ACEOF
18528 if ac_fn_c_try_link "$LINENO"; then :
18529 gl_cv___builtin_expect=yes
18530 else
18531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18532 /* end confdefs.h. */
18533
18534 #include <builtins.h>
18535 int
18536 main (int argc, char **argv)
18537 {
18538 argc = __builtin_expect (argc, 100);
18539 return argv[argc != 100][0];
18540 }
18541 _ACEOF
18542 if ac_fn_c_try_link "$LINENO"; then :
18543 gl_cv___builtin_expect="in <builtins.h>"
18544 else
18545 gl_cv___builtin_expect=no
18546 fi
18547 rm -f core conftest.err conftest.$ac_objext \
18548 conftest$ac_exeext conftest.$ac_ext
18549 fi
18550 rm -f core conftest.err conftest.$ac_objext \
18551 conftest$ac_exeext conftest.$ac_ext
18552 fi
18553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
18554 $as_echo "$gl_cv___builtin_expect" >&6; }
18555 if test "$gl_cv___builtin_expect" = yes; then
18556 $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
18557
18558 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
18559 $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
18560
18561 fi
18562
18563
18564
18565
18566
18567 if test $ac_cv_func_canonicalize_file_name = no; then
18568 HAVE_CANONICALIZE_FILE_NAME=0
18569 if test $ac_cv_func_realpath = no; then
18570 HAVE_REALPATH=0
18571 else
18572 case "$gl_cv_func_realpath_works" in
18573 *yes) ;;
18574 *) REPLACE_REALPATH=1 ;;
18575 esac
18576 fi
18577 else
18578 case "$gl_cv_func_realpath_works" in
18579 *yes)
18580 ;;
18581 *)
18582 REPLACE_CANONICALIZE_FILE_NAME=1
18583 REPLACE_REALPATH=1
18584 ;;
18585 esac
18586 fi
18587
18588 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
18589
18590
18591
18592
18593
18594
18595
18596
18597 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
18598
18599 fi
18600
18601
18602 cat >>confdefs.h <<_ACEOF
18603 #define GNULIB_CANONICALIZE_LGPL 1
18604 _ACEOF
18605
18606
18607
18608
18609
18610
18611
18612 GNULIB_CANONICALIZE_FILE_NAME=1
18613
18614
18615
18616
18617
18618 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
18619
18620
18621
18622
18623
18624
18625
18626
18627 GNULIB_REALPATH=1
18628
18629
18630
18631
18632
18633 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
18634
18635
18636
18637
18638
18639
18640
18641
18642 GNULIB_CHDIR=1
18643
18644
18645
18646
18647
18648 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
18649
18650
18651
18652
18653
18654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
18655 $as_echo_n "checking whether this system supports file names of any length... " >&6; }
18656 if ${gl_cv_have_unlimited_file_name_length+:} false; then :
18657 $as_echo_n "(cached) " >&6
18658 else
18659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18660 /* end confdefs.h. */
18661
18662 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
18663 #if HAVE_UNISTD_H
18664 # include <unistd.h>
18665 #endif
18666 #include <limits.h>
18667 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
18668 # include <sys/param.h>
18669 #endif
18670 #if !defined PATH_MAX && defined MAXPATHLEN
18671 # define PATH_MAX MAXPATHLEN
18672 #endif
18673 #ifdef __hpux
18674 # undef PATH_MAX
18675 # define PATH_MAX 1024
18676 #endif
18677 #if defined _WIN32 && ! defined __CYGWIN__
18678 # undef PATH_MAX
18679 # define PATH_MAX 260
18680 #endif
18681
18682 #ifdef PATH_MAX
18683 have_arbitrary_file_name_length_limit
18684 #endif
18685 _ACEOF
18686 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18687 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
18688 gl_cv_have_unlimited_file_name_length=no
18689 else
18690 gl_cv_have_unlimited_file_name_length=yes
18691 fi
18692 rm -f conftest*
18693
18694 fi
18695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
18696 $as_echo "$gl_cv_have_unlimited_file_name_length" >&6; }
18697
18698 if test $gl_cv_have_unlimited_file_name_length = no; then
18699
18700
18701
18702
18703
18704
18705
18706
18707 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
18708
18709 :
18710 fi
18711
18712 if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
18713
18714
18715
18716
18717
18718
18719
18720
18721 gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
18722
18723 fi
18724 if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
18725
18726
18727
18728
18729
18730
18731
18732
18733 gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
18734
18735 fi
18736
18737
18738
18739
18740
18741 GNULIB_CHOWN=1
18742
18743
18744
18745
18746
18747 $as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
18748
18749
18750
18751
18752
18753
18754 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
18755 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
18756
18757 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
18758 # programs in the package would end up linked with that potentially-shared
18759 # library, inducing unnecessary run-time overhead.
18760 LIB_CLOCK_GETTIME=
18761
18762 gl_saved_libs=$LIBS
18763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18764 $as_echo_n "checking for library containing clock_gettime... " >&6; }
18765 if ${ac_cv_search_clock_gettime+:} false; then :
18766 $as_echo_n "(cached) " >&6
18767 else
18768 ac_func_search_save_LIBS=$LIBS
18769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18770 /* end confdefs.h. */
18771
18772 /* Override any GCC internal prototype to avoid an error.
18773 Use char because int might match the return type of a GCC
18774 builtin and then its argument prototype would still apply. */
18775 #ifdef __cplusplus
18776 extern "C"
18777 #endif
18778 char clock_gettime ();
18779 int
18780 main ()
18781 {
18782 return clock_gettime ();
18783 ;
18784 return 0;
18785 }
18786 _ACEOF
18787 for ac_lib in '' rt posix4; do
18788 if test -z "$ac_lib"; then
18789 ac_res="none required"
18790 else
18791 ac_res=-l$ac_lib
18792 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18793 fi
18794 if ac_fn_c_try_link "$LINENO"; then :
18795 ac_cv_search_clock_gettime=$ac_res
18796 fi
18797 rm -f core conftest.err conftest.$ac_objext \
18798 conftest$ac_exeext
18799 if ${ac_cv_search_clock_gettime+:} false; then :
18800 break
18801 fi
18802 done
18803 if ${ac_cv_search_clock_gettime+:} false; then :
18804
18805 else
18806 ac_cv_search_clock_gettime=no
18807 fi
18808 rm conftest.$ac_ext
18809 LIBS=$ac_func_search_save_LIBS
18810 fi
18811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18812 $as_echo "$ac_cv_search_clock_gettime" >&6; }
18813 ac_res=$ac_cv_search_clock_gettime
18814 if test "$ac_res" != no; then :
18815 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18816 test "$ac_cv_search_clock_gettime" = "none required" ||
18817 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
18818 fi
18819
18820 for ac_func in clock_gettime clock_settime
18821 do :
18822 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18823 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18824 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18825 cat >>confdefs.h <<_ACEOF
18826 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18827 _ACEOF
18828
18829 fi
18830 done
18831
18832 LIBS=$gl_saved_libs
18833
18834
18835
18836 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
18837
18838
18839
18840
18841
18842
18843 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18844 REPLACE_CLOSE=1
18845 fi
18846
18847
18848
18849
18850
18851
18852 if test $ac_cv_header_sys_socket_h != yes; then
18853 for ac_header in winsock2.h
18854 do :
18855 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18856 if test "x$ac_cv_header_winsock2_h" = xyes; then :
18857 cat >>confdefs.h <<_ACEOF
18858 #define HAVE_WINSOCK2_H 1
18859 _ACEOF
18860
18861 fi
18862
18863 done
18864
18865 fi
18866 if test "$ac_cv_header_winsock2_h" = yes; then
18867 HAVE_WINSOCK2_H=1
18868 UNISTD_H_HAVE_WINSOCK2_H=1
18869 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18870 else
18871 HAVE_WINSOCK2_H=0
18872 fi
18873
18874
18875 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
18876 REPLACE_CLOSE=1
18877 fi
18878
18879
18880 if test $REPLACE_CLOSE = 0; then
18881
18882
18883
18884 if test $ac_cv_func_fchdir = no; then
18885 HAVE_FCHDIR=0
18886 fi
18887
18888 if test $HAVE_FCHDIR = 0; then
18889 REPLACE_CLOSE=1
18890 fi
18891 fi
18892
18893
18894 if test $REPLACE_CLOSE = 1; then
18895
18896
18897
18898
18899
18900
18901
18902
18903 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
18904
18905 fi
18906
18907
18908
18909
18910
18911 GNULIB_CLOSE=1
18912
18913
18914
18915
18916
18917 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
18918
18919
18920
18921
18922
18923
18924 for ac_func in closedir
18925 do :
18926 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
18927 if test "x$ac_cv_func_closedir" = xyes; then :
18928 cat >>confdefs.h <<_ACEOF
18929 #define HAVE_CLOSEDIR 1
18930 _ACEOF
18931
18932 fi
18933 done
18934
18935 if test $ac_cv_func_closedir = no; then
18936 HAVE_CLOSEDIR=0
18937 fi
18938
18939
18940
18941
18942 if test $ac_cv_func_fchdir = no; then
18943 HAVE_FCHDIR=0
18944 fi
18945
18946 if test $HAVE_FCHDIR = 0; then
18947 if test $HAVE_CLOSEDIR = 1; then
18948 REPLACE_CLOSEDIR=1
18949 fi
18950 fi
18951
18952 case $host_os,$HAVE_CLOSEDIR in
18953 os2*,1)
18954 REPLACE_CLOSEDIR=1;;
18955 esac
18956
18957 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
18958
18959
18960
18961
18962
18963
18964
18965
18966 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
18967
18968 fi
18969
18970
18971
18972
18973
18974 GNULIB_CLOSEDIR=1
18975
18976
18977
18978
18979
18980 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
18981
18982
18983
18984
18985 if test "$ac_cv_header_winsock2_h" = yes; then
18986
18987
18988
18989
18990
18991
18992
18993
18994 gl_LIBOBJS="$gl_LIBOBJS connect.$ac_objext"
18995
18996 fi
18997
18998
18999
19000
19001
19002 GNULIB_CONNECT=1
19003
19004
19005
19006
19007
19008 $as_echo "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
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_ctype_h='<'ctype.h'>'
19025 else
19026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
19027 $as_echo_n "checking absolute name of <ctype.h>... " >&6; }
19028 if ${gl_cv_next_ctype_h+:} false; then :
19029 $as_echo_n "(cached) " >&6
19030 else
19031
19032
19033
19034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19035 /* end confdefs.h. */
19036 #include <ctype.h>
19037 _ACEOF
19038 case "$host_os" in
19039 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19040 *) gl_absname_cpp="$ac_cpp" ;;
19041 esac
19042
19043 case "$host_os" in
19044 mingw*)
19045 gl_dirsep_regex='[/\\]'
19046 ;;
19047 *)
19048 gl_dirsep_regex='\/'
19049 ;;
19050 esac
19051 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19052 gl_header_literal_regex=`echo 'ctype.h' \
19053 | sed -e "$gl_make_literal_regex_sed"`
19054 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19055 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19056 s|^/[^/]|//&|
19057 p
19058 q
19059 }'
19060
19061 gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19062 sed -n "$gl_absolute_header_sed"`
19063
19064 gl_header=$gl_cv_absolute_ctype_h
19065 gl_cv_next_ctype_h='"'$gl_header'"'
19066
19067
19068 fi
19069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
19070 $as_echo "$gl_cv_next_ctype_h" >&6; }
19071 fi
19072 NEXT_CTYPE_H=$gl_cv_next_ctype_h
19073
19074 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19075 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19076 gl_next_as_first_directive='<'ctype.h'>'
19077 else
19078 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19079 gl_next_as_first_directive=$gl_cv_next_ctype_h
19080 fi
19081 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
19092 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
19093 if ${gl_cv_struct_dirent_d_ino+:} false; then :
19094 $as_echo_n "(cached) " >&6
19095 else
19096 if test "$cross_compiling" = yes; then :
19097 case "$host_os" in
19098 # Guess yes on glibc systems with Linux kernel.
19099 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
19100 # Guess yes on musl systems with Linux kernel.
19101 linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
19102 # Guess no on native Windows.
19103 mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
19104 # If we don't know, obey --enable-cross-guesses.
19105 *) gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
19106 esac
19107
19108 else
19109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19110 /* end confdefs.h. */
19111 #include <sys/types.h>
19112 #include <sys/stat.h>
19113 #include <dirent.h>
19114
19115 int
19116 main ()
19117 {
19118 DIR *dp = opendir (".");
19119 struct dirent *e;
19120 struct stat st;
19121 if (! dp)
19122 return 1;
19123 e = readdir (dp);
19124 if (! e)
19125 { closedir (dp); return 2; }
19126 if (lstat (e->d_name, &st) != 0)
19127 { closedir (dp); return 3; }
19128 if (e->d_ino != st.st_ino)
19129 { closedir (dp); return 4; }
19130 closedir (dp);
19131 return 0;
19132
19133 ;
19134 return 0;
19135 }
19136 _ACEOF
19137 if ac_fn_c_try_run "$LINENO"; then :
19138 gl_cv_struct_dirent_d_ino=yes
19139 else
19140 gl_cv_struct_dirent_d_ino=no
19141 fi
19142 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19143 conftest.$ac_objext conftest.beam conftest.$ac_ext
19144 fi
19145
19146 fi
19147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
19148 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
19149 case "$gl_cv_struct_dirent_d_ino" in
19150 *yes)
19151
19152 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
19153
19154 ;;
19155 esac
19156
19157
19158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
19159 $as_echo_n "checking for d_type member in directory struct... " >&6; }
19160 if ${gl_cv_struct_dirent_d_type+:} false; then :
19161 $as_echo_n "(cached) " >&6
19162 else
19163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19164 /* end confdefs.h. */
19165
19166 #include <sys/types.h>
19167 #include <dirent.h>
19168
19169 int
19170 main ()
19171 {
19172 struct dirent dp; dp.d_type = 0;
19173 ;
19174 return 0;
19175 }
19176 _ACEOF
19177 if ac_fn_c_try_link "$LINENO"; then :
19178 gl_cv_struct_dirent_d_type=yes
19179 else
19180 gl_cv_struct_dirent_d_type=no
19181 fi
19182 rm -f core conftest.err conftest.$ac_objext \
19183 conftest$ac_exeext conftest.$ac_ext
19184
19185
19186 fi
19187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
19188 $as_echo "$gl_cv_struct_dirent_d_type" >&6; }
19189 if test $gl_cv_struct_dirent_d_type = yes; then
19190
19191 $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
19192
19193 fi
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208 if test $gl_cv_have_include_next = yes; then
19209 gl_cv_next_dirent_h='<'dirent.h'>'
19210 else
19211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
19212 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
19213 if ${gl_cv_next_dirent_h+:} false; then :
19214 $as_echo_n "(cached) " >&6
19215 else
19216
19217 if test $ac_cv_header_dirent_h = yes; then
19218
19219
19220
19221
19222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19223 /* end confdefs.h. */
19224 #include <dirent.h>
19225 _ACEOF
19226 case "$host_os" in
19227 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19228 *) gl_absname_cpp="$ac_cpp" ;;
19229 esac
19230
19231 case "$host_os" in
19232 mingw*)
19233 gl_dirsep_regex='[/\\]'
19234 ;;
19235 *)
19236 gl_dirsep_regex='\/'
19237 ;;
19238 esac
19239 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19240 gl_header_literal_regex=`echo 'dirent.h' \
19241 | sed -e "$gl_make_literal_regex_sed"`
19242 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19243 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19244 s|^/[^/]|//&|
19245 p
19246 q
19247 }'
19248
19249 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19250 sed -n "$gl_absolute_header_sed"`
19251
19252 gl_header=$gl_cv_absolute_dirent_h
19253 gl_cv_next_dirent_h='"'$gl_header'"'
19254 else
19255 gl_cv_next_dirent_h='<'dirent.h'>'
19256 fi
19257
19258
19259 fi
19260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
19261 $as_echo "$gl_cv_next_dirent_h" >&6; }
19262 fi
19263 NEXT_DIRENT_H=$gl_cv_next_dirent_h
19264
19265 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19266 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19267 gl_next_as_first_directive='<'dirent.h'>'
19268 else
19269 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19270 gl_next_as_first_directive=$gl_cv_next_dirent_h
19271 fi
19272 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
19273
19274
19275
19276
19277 if test $ac_cv_header_dirent_h = yes; then
19278 HAVE_DIRENT_H=1
19279 else
19280 HAVE_DIRENT_H=0
19281 fi
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293 for ac_func in dirfd
19294 do :
19295 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
19296 if test "x$ac_cv_func_dirfd" = xyes; then :
19297 cat >>confdefs.h <<_ACEOF
19298 #define HAVE_DIRFD 1
19299 _ACEOF
19300
19301 fi
19302 done
19303
19304 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
19305 #include <dirent.h>
19306 "
19307 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
19308 ac_have_decl=1
19309 else
19310 ac_have_decl=0
19311 fi
19312
19313 cat >>confdefs.h <<_ACEOF
19314 #define HAVE_DECL_DIRFD $ac_have_decl
19315 _ACEOF
19316
19317 if test $ac_cv_have_decl_dirfd = no; then
19318 HAVE_DECL_DIRFD=0
19319 fi
19320
19321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
19322 $as_echo_n "checking whether dirfd is a macro... " >&6; }
19323 if ${gl_cv_func_dirfd_macro+:} false; then :
19324 $as_echo_n "(cached) " >&6
19325 else
19326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19327 /* end confdefs.h. */
19328
19329 #include <sys/types.h>
19330 #include <dirent.h>
19331 #ifdef dirfd
19332 dirent_header_defines_dirfd
19333 #endif
19334 _ACEOF
19335 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19336 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
19337 gl_cv_func_dirfd_macro=yes
19338 else
19339 gl_cv_func_dirfd_macro=no
19340 fi
19341 rm -f conftest*
19342
19343 fi
19344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
19345 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
19346
19347 # Use the replacement if we have no function or macro with that name,
19348 # or if OS/2 kLIBC whose dirfd() does not work.
19349 # Replace only if the system declares dirfd already.
19350 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
19351 no,no,*,yes | *,*,os2*,yes)
19352 REPLACE_DIRFD=1
19353
19354 $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
19355 ;;
19356 esac
19357
19358 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
19359 || test $REPLACE_DIRFD = 1; then
19360
19361
19362
19363
19364
19365
19366
19367
19368 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
19369
19370
19371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
19372 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
19373 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
19374 $as_echo_n "(cached) " >&6
19375 else
19376
19377 dirfd_save_CFLAGS=$CFLAGS
19378 for ac_expr in d_fd dd_fd; do
19379
19380 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
19381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19382 /* end confdefs.h. */
19383
19384 #include <sys/types.h>
19385 #include <dirent.h>
19386 int
19387 main ()
19388 {
19389 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
19390 ;
19391 return 0;
19392 }
19393 _ACEOF
19394 if ac_fn_c_try_compile "$LINENO"; then :
19395 dir_fd_found=yes
19396
19397 fi
19398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19399 CFLAGS=$dirfd_save_CFLAGS
19400 test "$dir_fd_found" = yes && break
19401 done
19402 test "$dir_fd_found" = yes || ac_expr=no_such_member
19403
19404 gl_cv_sys_dir_fd_member_name=$ac_expr
19405
19406
19407 fi
19408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
19409 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
19410 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
19411
19412 cat >>confdefs.h <<_ACEOF
19413 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
19414 _ACEOF
19415
19416 fi
19417
19418
19419 fi
19420
19421
19422
19423
19424
19425 GNULIB_DIRFD=1
19426
19427
19428
19429
19430
19431 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
19432
19433
19434
19435
19436
19437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
19438 $as_echo_n "checking whether // is distinct from /... " >&6; }
19439 if ${gl_cv_double_slash_root+:} false; then :
19440 $as_echo_n "(cached) " >&6
19441 else
19442 if test x"$cross_compiling" = xyes ; then
19443 # When cross-compiling, there is no way to tell whether // is special
19444 # short of a list of hosts. However, the only known hosts to date
19445 # that have a distinct // are Apollo DomainOS (too old to port to),
19446 # Cygwin, and z/OS. If anyone knows of another system for which // has
19447 # special semantics and is distinct from /, please report it to
19448 # <bug-gnulib@gnu.org>.
19449 case $host in
19450 *-cygwin | i370-ibm-openedition)
19451 gl_cv_double_slash_root=yes ;;
19452 *)
19453 # Be optimistic and assume that / and // are the same when we
19454 # don't know.
19455 gl_cv_double_slash_root='unknown, assuming no' ;;
19456 esac
19457 else
19458 set x `ls -di / // 2>/dev/null`
19459 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
19460 gl_cv_double_slash_root=no
19461 else
19462 gl_cv_double_slash_root=yes
19463 fi
19464 fi
19465 fi
19466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
19467 $as_echo "$gl_cv_double_slash_root" >&6; }
19468 if test "$gl_cv_double_slash_root" = yes; then
19469
19470 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
19471
19472 fi
19473
19474
19475
19476
19477
19478 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19479 REPLACE_DUP=1
19480 fi
19481
19482
19483
19484
19485
19486 if test $ac_cv_func_fchdir = no; then
19487 HAVE_FCHDIR=0
19488 fi
19489
19490 if test $HAVE_FCHDIR = 0; then
19491 REPLACE_DUP=1
19492 fi
19493
19494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
19495 $as_echo_n "checking whether dup works... " >&6; }
19496 if ${gl_cv_func_dup_works+:} false; then :
19497 $as_echo_n "(cached) " >&6
19498 else
19499 if test "$cross_compiling" = yes; then :
19500 case "$host_os" in
19501 # Guess no on native Windows.
19502 mingw*) gl_cv_func_dup_works="guessing no" ;;
19503 *) gl_cv_func_dup_works="guessing yes" ;;
19504 esac
19505
19506 else
19507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19508 /* end confdefs.h. */
19509 #include <unistd.h>
19510 #include <fcntl.h>
19511 #include <errno.h>
19512
19513
19514 $gl_mda_defines
19515
19516 int
19517 main ()
19518 {
19519 /* On OS/2 kLIBC, dup does not work on a directory fd. */
19520 int fd = open (".", O_RDONLY);
19521 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
19522
19523 ;
19524 return 0;
19525 }
19526
19527 _ACEOF
19528 if ac_fn_c_try_run "$LINENO"; then :
19529 gl_cv_func_dup_works=yes
19530 else
19531 gl_cv_func_dup_works=no
19532 fi
19533 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19534 conftest.$ac_objext conftest.beam conftest.$ac_ext
19535 fi
19536
19537
19538 fi
19539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
19540 $as_echo "$gl_cv_func_dup_works" >&6; }
19541 case "$gl_cv_func_dup_works" in
19542 *yes) ;;
19543 *)
19544 REPLACE_DUP=1
19545 ;;
19546 esac
19547
19548 if test $REPLACE_DUP = 1; then
19549
19550
19551
19552
19553
19554
19555
19556
19557 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
19558
19559 :
19560 fi
19561
19562
19563
19564
19565
19566 GNULIB_DUP=1
19567
19568
19569
19570
19571
19572 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
19573
19574
19575
19576
19577
19578
19579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
19580 $as_echo_n "checking whether dup2 works... " >&6; }
19581 if ${gl_cv_func_dup2_works+:} false; then :
19582 $as_echo_n "(cached) " >&6
19583 else
19584 if test "$cross_compiling" = yes; then :
19585 case "$host_os" in
19586 mingw*) # on this platform, dup2 always returns 0 for success
19587 gl_cv_func_dup2_works="guessing no" ;;
19588 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
19589 gl_cv_func_dup2_works="guessing no" ;;
19590 aix* | freebsd*)
19591 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
19592 # not EBADF.
19593 gl_cv_func_dup2_works="guessing no" ;;
19594 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
19595 gl_cv_func_dup2_works="guessing no" ;;
19596 *-android*) # implemented using dup3(), which fails if oldfd == newfd
19597 gl_cv_func_dup2_works="guessing no" ;;
19598 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
19599 gl_cv_func_dup2_works="guessing no" ;;
19600 *) gl_cv_func_dup2_works="guessing yes" ;;
19601 esac
19602 else
19603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19604 /* end confdefs.h. */
19605
19606 #include <errno.h>
19607 #include <fcntl.h>
19608 #include <limits.h>
19609 #include <sys/resource.h>
19610 #include <unistd.h>
19611
19612
19613 $gl_mda_defines
19614
19615 #ifndef RLIM_SAVED_CUR
19616 # define RLIM_SAVED_CUR RLIM_INFINITY
19617 #endif
19618 #ifndef RLIM_SAVED_MAX
19619 # define RLIM_SAVED_MAX RLIM_INFINITY
19620 #endif
19621
19622 int
19623 main ()
19624 {
19625 int result = 0;
19626 int bad_fd = INT_MAX;
19627 struct rlimit rlim;
19628 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19629 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19630 && rlim.rlim_cur != RLIM_INFINITY
19631 && rlim.rlim_cur != RLIM_SAVED_MAX
19632 && rlim.rlim_cur != RLIM_SAVED_CUR)
19633 bad_fd = rlim.rlim_cur;
19634 #ifdef FD_CLOEXEC
19635 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
19636 result |= 1;
19637 #endif
19638 if (dup2 (1, 1) != 1)
19639 result |= 2;
19640 #ifdef FD_CLOEXEC
19641 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
19642 result |= 4;
19643 #endif
19644 close (0);
19645 if (dup2 (0, 0) != -1)
19646 result |= 8;
19647 /* Many gnulib modules require POSIX conformance of EBADF. */
19648 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
19649 result |= 16;
19650 /* Flush out some cygwin core dumps. */
19651 if (dup2 (2, -1) != -1 || errno != EBADF)
19652 result |= 32;
19653 dup2 (2, 255);
19654 dup2 (2, 256);
19655 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
19656 {
19657 int fd = open (".", O_RDONLY);
19658 if (fd == -1)
19659 result |= 64;
19660 else if (dup2 (fd, fd + 1) == -1)
19661 result |= 128;
19662 close (fd);
19663 }
19664 return result;
19665 ;
19666 return 0;
19667 }
19668
19669 _ACEOF
19670 if ac_fn_c_try_run "$LINENO"; then :
19671 gl_cv_func_dup2_works=yes
19672 else
19673 gl_cv_func_dup2_works=no
19674 fi
19675 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19676 conftest.$ac_objext conftest.beam conftest.$ac_ext
19677 fi
19678
19679
19680 fi
19681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
19682 $as_echo "$gl_cv_func_dup2_works" >&6; }
19683 case "$gl_cv_func_dup2_works" in
19684 *yes) ;;
19685 *)
19686 REPLACE_DUP2=1
19687 for ac_func in setdtablesize
19688 do :
19689 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
19690 if test "x$ac_cv_func_setdtablesize" = xyes; then :
19691 cat >>confdefs.h <<_ACEOF
19692 #define HAVE_SETDTABLESIZE 1
19693 _ACEOF
19694
19695 fi
19696 done
19697
19698 ;;
19699 esac
19700
19701
19702
19703
19704 if test $ac_cv_func_fchdir = no; then
19705 HAVE_FCHDIR=0
19706 fi
19707
19708 if test $HAVE_FCHDIR = 0; then
19709 REPLACE_DUP2=1
19710 fi
19711
19712
19713 if test $REPLACE_DUP2 = 1; then
19714
19715
19716
19717
19718
19719
19720
19721
19722 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
19723
19724
19725 fi
19726
19727
19728
19729
19730
19731 GNULIB_DUP2=1
19732
19733
19734
19735
19736
19737 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747 GNULIB_ENVIRON=1
19748
19749
19750
19751
19752
19753 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
19754
19755
19756
19757
19758
19759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
19760 $as_echo_n "checking for error_at_line... " >&6; }
19761 if ${ac_cv_lib_error_at_line+:} false; then :
19762 $as_echo_n "(cached) " >&6
19763 else
19764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19765 /* end confdefs.h. */
19766 #include <error.h>
19767 int
19768 main ()
19769 {
19770 error_at_line (0, 0, "", 0, "an error occurred");
19771 ;
19772 return 0;
19773 }
19774 _ACEOF
19775 if ac_fn_c_try_link "$LINENO"; then :
19776 ac_cv_lib_error_at_line=yes
19777 else
19778 ac_cv_lib_error_at_line=no
19779 fi
19780 rm -f core conftest.err conftest.$ac_objext \
19781 conftest$ac_exeext conftest.$ac_ext
19782 fi
19783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
19784 $as_echo "$ac_cv_lib_error_at_line" >&6; }
19785
19786 if test $ac_cv_lib_error_at_line = no; then
19787
19788
19789
19790
19791
19792
19793
19794
19795 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
19796
19797
19798
19799 :
19800
19801 fi
19802
19803
19804
19805
19806
19807
19808
19809 if test $ac_cv_have_decl_fchdir = no; then
19810 HAVE_DECL_FCHDIR=0
19811 fi
19812
19813
19814 if test $HAVE_FCHDIR = 0; then
19815
19816
19817
19818
19819
19820
19821
19822
19823 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
19824
19825 :
19826
19827 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
19828
19829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
19830 $as_echo_n "checking whether open can visit directories... " >&6; }
19831 if ${gl_cv_func_open_directory_works+:} false; then :
19832 $as_echo_n "(cached) " >&6
19833 else
19834 if test "$cross_compiling" = yes; then :
19835 case "$host_os" in
19836 # Guess yes on Linux systems.
19837 linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
19838 # Guess yes on glibc systems.
19839 *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
19840 # Guess no on native Windows.
19841 mingw*) gl_cv_func_open_directory_works="guessing no" ;;
19842 # If we don't know, obey --enable-cross-guesses.
19843 *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
19844 esac
19845
19846 else
19847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19848 /* end confdefs.h. */
19849 #include <fcntl.h>
19850
19851
19852 $gl_mda_defines
19853
19854 int
19855 main ()
19856 {
19857 return open(".", O_RDONLY) < 0;
19858 ;
19859 return 0;
19860 }
19861 _ACEOF
19862 if ac_fn_c_try_run "$LINENO"; then :
19863 gl_cv_func_open_directory_works=yes
19864 else
19865 gl_cv_func_open_directory_works=no
19866 fi
19867 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19868 conftest.$ac_objext conftest.beam conftest.$ac_ext
19869 fi
19870
19871 fi
19872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
19873 $as_echo "$gl_cv_func_open_directory_works" >&6; }
19874 case "$gl_cv_func_open_directory_works" in
19875 *yes) ;;
19876 *)
19877
19878 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
19879
19880 ;;
19881 esac
19882 fi
19883
19884
19885
19886
19887
19888
19889 GNULIB_FCHDIR=1
19890
19891
19892
19893
19894
19895 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
19896
19897
19898
19899
19900
19901
19902
19903
19904 if test $ac_cv_func_fcntl = no; then
19905
19906
19907
19908 if test $ac_cv_func_fcntl = no; then
19909 HAVE_FCNTL=0
19910 else
19911 REPLACE_FCNTL=1
19912 fi
19913
19914 else
19915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
19916 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
19917 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
19918 $as_echo_n "(cached) " >&6
19919 else
19920 if test "$cross_compiling" = yes; then :
19921 case $host_os in
19922 aix* | cygwin* | haiku*)
19923 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
19924 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
19925 esac
19926 else
19927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19928 /* end confdefs.h. */
19929 #include <errno.h>
19930 #include <fcntl.h>
19931 #include <limits.h>
19932 #include <sys/resource.h>
19933 #include <unistd.h>
19934
19935
19936 $gl_mda_defines
19937
19938 #ifndef RLIM_SAVED_CUR
19939 # define RLIM_SAVED_CUR RLIM_INFINITY
19940 #endif
19941 #ifndef RLIM_SAVED_MAX
19942 # define RLIM_SAVED_MAX RLIM_INFINITY
19943 #endif
19944
19945 int
19946 main ()
19947 {
19948 int result = 0;
19949 int bad_fd = INT_MAX;
19950 struct rlimit rlim;
19951 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19952 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19953 && rlim.rlim_cur != RLIM_INFINITY
19954 && rlim.rlim_cur != RLIM_SAVED_MAX
19955 && rlim.rlim_cur != RLIM_SAVED_CUR)
19956 bad_fd = rlim.rlim_cur;
19957 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
19958 if (errno != EINVAL) result |= 2;
19959 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
19960 if (errno != EINVAL) result |= 8;
19961 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
19962 {
19963 int fd;
19964 fd = open (".", O_RDONLY);
19965 if (fd == -1)
19966 result |= 16;
19967 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
19968 result |= 32;
19969
19970 close (fd);
19971 }
19972 return result;
19973 ;
19974 return 0;
19975 }
19976 _ACEOF
19977 if ac_fn_c_try_run "$LINENO"; then :
19978 gl_cv_func_fcntl_f_dupfd_works=yes
19979 else
19980 gl_cv_func_fcntl_f_dupfd_works=no
19981 fi
19982 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19983 conftest.$ac_objext conftest.beam conftest.$ac_ext
19984 fi
19985
19986 fi
19987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
19988 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
19989 case $gl_cv_func_fcntl_f_dupfd_works in
19990 *yes) ;;
19991 *)
19992
19993
19994 if test $ac_cv_func_fcntl = no; then
19995 HAVE_FCNTL=0
19996 else
19997 REPLACE_FCNTL=1
19998 fi
19999
20000
20001 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
20002 ;;
20003 esac
20004
20005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
20006 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
20007 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
20008 $as_echo_n "(cached) " >&6
20009 else
20010 if test "$cross_compiling" = yes; then :
20011 case "$host_os" in
20012 # Guess no on NetBSD.
20013 netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
20014 *) gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
20015 esac
20016
20017 else
20018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20019 /* end confdefs.h. */
20020 #include <fcntl.h>
20021 #include <unistd.h>
20022 int main (int argc, char *argv[])
20023 {
20024 if (argc == 1)
20025 /* parent process */
20026 {
20027 if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
20028 return 1;
20029 return execl ("./conftest", "./conftest", "child", NULL);
20030 }
20031 else
20032 /* child process */
20033 return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
20034 }
20035
20036
20037 _ACEOF
20038 if ac_fn_c_try_run "$LINENO"; then :
20039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20040 /* end confdefs.h. */
20041
20042 #ifdef __linux__
20043 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
20044 it to support the semantics on older kernels that failed with EINVAL. */
20045 choke me
20046 #endif
20047
20048 int
20049 main ()
20050 {
20051
20052 ;
20053 return 0;
20054 }
20055 _ACEOF
20056 if ac_fn_c_try_compile "$LINENO"; then :
20057 gl_cv_func_fcntl_f_dupfd_cloexec=yes
20058 else
20059 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
20060 fi
20061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20062
20063 else
20064 gl_cv_func_fcntl_f_dupfd_cloexec=no
20065 fi
20066 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20067 conftest.$ac_objext conftest.beam conftest.$ac_ext
20068 fi
20069
20070
20071 fi
20072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
20073 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
20074 case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
20075 *yes) ;;
20076 *)
20077
20078
20079 if test $ac_cv_func_fcntl = no; then
20080 HAVE_FCNTL=0
20081 else
20082 REPLACE_FCNTL=1
20083 fi
20084
20085 ;;
20086 esac
20087 fi
20088
20089
20090
20091
20092 if test $ac_cv_func_fchdir = no; then
20093 HAVE_FCHDIR=0
20094 fi
20095
20096 if test $HAVE_FCHDIR = 0; then
20097
20098
20099
20100 if test $ac_cv_func_fcntl = no; then
20101 HAVE_FCNTL=0
20102 else
20103 REPLACE_FCNTL=1
20104 fi
20105
20106 fi
20107
20108
20109 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
20110
20111
20112
20113
20114
20115
20116
20117
20118 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
20119
20120 fi
20121
20122
20123
20124
20125
20126 GNULIB_FCNTL=1
20127
20128
20129
20130
20131
20132 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147 if test $gl_cv_have_include_next = yes; then
20148 gl_cv_next_fcntl_h='<'fcntl.h'>'
20149 else
20150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
20151 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
20152 if ${gl_cv_next_fcntl_h+:} false; then :
20153 $as_echo_n "(cached) " >&6
20154 else
20155
20156
20157
20158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20159 /* end confdefs.h. */
20160 #include <fcntl.h>
20161 _ACEOF
20162 case "$host_os" in
20163 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20164 *) gl_absname_cpp="$ac_cpp" ;;
20165 esac
20166
20167 case "$host_os" in
20168 mingw*)
20169 gl_dirsep_regex='[/\\]'
20170 ;;
20171 *)
20172 gl_dirsep_regex='\/'
20173 ;;
20174 esac
20175 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20176 gl_header_literal_regex=`echo 'fcntl.h' \
20177 | sed -e "$gl_make_literal_regex_sed"`
20178 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20179 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20180 s|^/[^/]|//&|
20181 p
20182 q
20183 }'
20184
20185 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20186 sed -n "$gl_absolute_header_sed"`
20187
20188 gl_header=$gl_cv_absolute_fcntl_h
20189 gl_cv_next_fcntl_h='"'$gl_header'"'
20190
20191
20192 fi
20193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
20194 $as_echo "$gl_cv_next_fcntl_h" >&6; }
20195 fi
20196 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
20197
20198 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20199 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20200 gl_next_as_first_directive='<'fcntl.h'>'
20201 else
20202 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20203 gl_next_as_first_directive=$gl_cv_next_fcntl_h
20204 fi
20205 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221 cat >>confdefs.h <<_ACEOF
20222 #define GNULIB_FD_SAFER_FLAG 1
20223 _ACEOF
20224
20225
20226
20227
20228
20229
20230
20231 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
20232 #include <dirent.h>
20233
20234 "
20235 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
20236 ac_have_decl=1
20237 else
20238 ac_have_decl=0
20239 fi
20240
20241 cat >>confdefs.h <<_ACEOF
20242 #define HAVE_DECL_FDOPENDIR $ac_have_decl
20243 _ACEOF
20244 if test $ac_have_decl = 1; then :
20245
20246 else
20247 HAVE_DECL_FDOPENDIR=0
20248 fi
20249
20250
20251 if test $ac_cv_func_fdopendir = no; then
20252 HAVE_FDOPENDIR=0
20253 else
20254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
20255 $as_echo_n "checking whether fdopendir works... " >&6; }
20256 if ${gl_cv_func_fdopendir_works+:} false; then :
20257 $as_echo_n "(cached) " >&6
20258 else
20259 if test "$cross_compiling" = yes; then :
20260 case "$host_os" in
20261 # Guess yes on glibc systems.
20262 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
20263 # Guess yes on musl systems.
20264 *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
20265 # If we don't know, obey --enable-cross-guesses.
20266 *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
20267 esac
20268
20269 else
20270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20271 /* end confdefs.h. */
20272
20273 #include <dirent.h>
20274 #include <fcntl.h>
20275 #include <unistd.h>
20276
20277
20278 $gl_mda_defines
20279
20280 #if !HAVE_DECL_FDOPENDIR
20281 extern
20282 # ifdef __cplusplus
20283 "C"
20284 # endif
20285 DIR *fdopendir (int);
20286 #endif
20287
20288 int
20289 main ()
20290 {
20291 int result = 0;
20292 int fd = open ("conftest.c", O_RDONLY);
20293 if (fd < 0) result |= 1;
20294 if (fdopendir (fd)) result |= 2;
20295 if (close (fd)) result |= 4;
20296 return result;
20297
20298 ;
20299 return 0;
20300 }
20301 _ACEOF
20302 if ac_fn_c_try_run "$LINENO"; then :
20303 gl_cv_func_fdopendir_works=yes
20304 else
20305 gl_cv_func_fdopendir_works=no
20306 fi
20307 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20308 conftest.$ac_objext conftest.beam conftest.$ac_ext
20309 fi
20310
20311 fi
20312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
20313 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
20314 case "$gl_cv_func_fdopendir_works" in
20315 *yes) ;;
20316 *)
20317 REPLACE_FDOPENDIR=1
20318 ;;
20319 esac
20320 fi
20321
20322 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
20323
20324
20325
20326
20327
20328
20329
20330
20331 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
20332
20333 fi
20334
20335
20336
20337
20338
20339 GNULIB_FDOPENDIR=1
20340
20341
20342
20343
20344
20345 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
20346
20347
20348
20349
20350
20351 cat >>confdefs.h <<_ACEOF
20352 #define GNULIB_FDOPENDIR 1
20353 _ACEOF
20354
20355
20356
20357
20358
20359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffs" >&5
20360 $as_echo_n "checking for ffs... " >&6; }
20361 if ${gl_cv_func_ffs+:} false; then :
20362 $as_echo_n "(cached) " >&6
20363 else
20364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20365 /* end confdefs.h. */
20366 #include <strings.h>
20367 int x;
20368
20369 int
20370 main ()
20371 {
20372 int (*func) (int) = ffs;
20373 return func (x);
20374
20375 ;
20376 return 0;
20377 }
20378
20379 _ACEOF
20380 if ac_fn_c_try_link "$LINENO"; then :
20381 gl_cv_func_ffs=yes
20382 else
20383 gl_cv_func_ffs=no
20384 fi
20385 rm -f core conftest.err conftest.$ac_objext \
20386 conftest$ac_exeext conftest.$ac_ext
20387
20388 fi
20389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ffs" >&5
20390 $as_echo "$gl_cv_func_ffs" >&6; }
20391 if test $gl_cv_func_ffs = no; then
20392 HAVE_FFS=0
20393 fi
20394
20395 if test $HAVE_FFS = 0; then
20396
20397
20398
20399
20400
20401
20402
20403
20404 gl_LIBOBJS="$gl_LIBOBJS ffs.$ac_objext"
20405
20406 fi
20407
20408
20409
20410
20411
20412 GNULIB_FFS=1
20413
20414
20415
20416
20417
20418
20419
20420
20421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
20422 $as_echo_n "checking for flexible array member... " >&6; }
20423 if ${ac_cv_c_flexmember+:} false; then :
20424 $as_echo_n "(cached) " >&6
20425 else
20426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20427 /* end confdefs.h. */
20428 #include <stdlib.h>
20429 #include <stdio.h>
20430 #include <stddef.h>
20431 struct m { struct m *next, **list; char name[]; };
20432 struct s { struct s *p; struct m *m; int n; double d[]; };
20433 int
20434 main ()
20435 {
20436 int m = getchar ();
20437 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
20438 nbytes += sizeof (struct s) - 1;
20439 nbytes -= nbytes % sizeof (struct s);
20440 struct s *p = malloc (nbytes);
20441 p->p = p;
20442 p->m = NULL;
20443 p->d[0] = 0.0;
20444 return p->d != (double *) NULL;
20445 ;
20446 return 0;
20447 }
20448 _ACEOF
20449 if ac_fn_c_try_compile "$LINENO"; then :
20450 ac_cv_c_flexmember=yes
20451 else
20452 ac_cv_c_flexmember=no
20453 fi
20454 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20455 fi
20456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
20457 $as_echo "$ac_cv_c_flexmember" >&6; }
20458 if test $ac_cv_c_flexmember = yes; then
20459
20460 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
20461
20462 else
20463 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
20464
20465 fi
20466
20467
20468
20469
20470 FLOAT_H=
20471 REPLACE_FLOAT_LDBL=0
20472 case "$host_os" in
20473 aix* | beos* | openbsd* | mirbsd* | irix*)
20474 FLOAT_H=float.h
20475 ;;
20476 freebsd* | dragonfly*)
20477 case "$host_cpu" in
20478 i[34567]86 )
20479 FLOAT_H=float.h
20480 ;;
20481 x86_64 )
20482 # On x86_64 systems, the C compiler may still be generating
20483 # 32-bit code.
20484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20485 /* end confdefs.h. */
20486 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
20487 int ok;
20488 #else
20489 error fail
20490 #endif
20491
20492 _ACEOF
20493 if ac_fn_c_try_compile "$LINENO"; then :
20494
20495 else
20496 FLOAT_H=float.h
20497 fi
20498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20499 ;;
20500 esac
20501 ;;
20502 linux*)
20503 case "$host_cpu" in
20504 powerpc*)
20505 FLOAT_H=float.h
20506 ;;
20507 esac
20508 ;;
20509 esac
20510 case "$host_os" in
20511 aix* | freebsd* | dragonfly* | linux*)
20512 if test -n "$FLOAT_H"; then
20513 REPLACE_FLOAT_LDBL=1
20514 fi
20515 ;;
20516 esac
20517
20518 REPLACE_ITOLD=0
20519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
20520 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
20521 if ${gl_cv_func_itold_works+:} false; then :
20522 $as_echo_n "(cached) " >&6
20523 else
20524
20525 if test "$cross_compiling" = yes; then :
20526 case "$host" in
20527 sparc*-*-linux*)
20528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20529 /* end confdefs.h. */
20530 #if defined __LP64__ || defined __arch64__
20531 int ok;
20532 #else
20533 error fail
20534 #endif
20535
20536 _ACEOF
20537 if ac_fn_c_try_compile "$LINENO"; then :
20538 gl_cv_func_itold_works="guessing no"
20539 else
20540 gl_cv_func_itold_works="guessing yes"
20541 fi
20542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20543 ;;
20544 # Guess yes on native Windows.
20545 mingw*) gl_cv_func_itold_works="guessing yes" ;;
20546 *) gl_cv_func_itold_works="guessing yes" ;;
20547 esac
20548
20549 else
20550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20551 /* end confdefs.h. */
20552
20553 int i = -1;
20554 volatile long double ld;
20555 int main ()
20556 {
20557 ld += i * 1.0L;
20558 if (ld > 0)
20559 return 1;
20560 return 0;
20561 }
20562 _ACEOF
20563 if ac_fn_c_try_run "$LINENO"; then :
20564 gl_cv_func_itold_works=yes
20565 else
20566 gl_cv_func_itold_works=no
20567 fi
20568 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20569 conftest.$ac_objext conftest.beam conftest.$ac_ext
20570 fi
20571
20572
20573 fi
20574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
20575 $as_echo "$gl_cv_func_itold_works" >&6; }
20576 case "$gl_cv_func_itold_works" in
20577 *no)
20578 REPLACE_ITOLD=1
20579 FLOAT_H=float.h
20580 ;;
20581 esac
20582
20583 if test -n "$FLOAT_H"; then
20584
20585
20586
20587
20588
20589
20590
20591
20592 if test $gl_cv_have_include_next = yes; then
20593 gl_cv_next_float_h='<'float.h'>'
20594 else
20595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
20596 $as_echo_n "checking absolute name of <float.h>... " >&6; }
20597 if ${gl_cv_next_float_h+:} false; then :
20598 $as_echo_n "(cached) " >&6
20599 else
20600
20601
20602
20603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20604 /* end confdefs.h. */
20605 #include <float.h>
20606 _ACEOF
20607 case "$host_os" in
20608 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20609 *) gl_absname_cpp="$ac_cpp" ;;
20610 esac
20611
20612 case "$host_os" in
20613 mingw*)
20614 gl_dirsep_regex='[/\\]'
20615 ;;
20616 *)
20617 gl_dirsep_regex='\/'
20618 ;;
20619 esac
20620 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20621 gl_header_literal_regex=`echo 'float.h' \
20622 | sed -e "$gl_make_literal_regex_sed"`
20623 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20624 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20625 s|^/[^/]|//&|
20626 p
20627 q
20628 }'
20629
20630 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20631 sed -n "$gl_absolute_header_sed"`
20632
20633 gl_header=$gl_cv_absolute_float_h
20634 gl_cv_next_float_h='"'$gl_header'"'
20635
20636
20637 fi
20638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
20639 $as_echo "$gl_cv_next_float_h" >&6; }
20640 fi
20641 NEXT_FLOAT_H=$gl_cv_next_float_h
20642
20643 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20644 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20645 gl_next_as_first_directive='<'float.h'>'
20646 else
20647 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20648 gl_next_as_first_directive=$gl_cv_next_float_h
20649 fi
20650 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
20651
20652
20653
20654
20655 fi
20656
20657 if test -n "$FLOAT_H"; then
20658 GL_GENERATE_FLOAT_H_TRUE=
20659 GL_GENERATE_FLOAT_H_FALSE='#'
20660 else
20661 GL_GENERATE_FLOAT_H_TRUE='#'
20662 GL_GENERATE_FLOAT_H_FALSE=
20663 fi
20664
20665
20666
20667 if test $REPLACE_FLOAT_LDBL = 1; then
20668
20669
20670
20671
20672
20673
20674
20675
20676 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
20677
20678 fi
20679 if test $REPLACE_ITOLD = 1; then
20680
20681
20682
20683
20684
20685
20686
20687
20688 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
20689
20690 fi
20691
20692
20693
20694
20695 gl_fnmatch_required_lowercase=`
20696 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
20697 `
20698
20699 if test $ac_cv_func_fnmatch = no; then
20700 HAVE_FNMATCH=0
20701 else
20702 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
20703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
20704 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
20705 if eval \${$gl_fnmatch_cache_var+:} false; then :
20706 $as_echo_n "(cached) " >&6
20707 else
20708 if test $gl_fnmatch_required = GNU; then
20709 gl_fnmatch_gnu_start=
20710 gl_fnmatch_gnu_end=
20711 else
20712 gl_fnmatch_gnu_start='#if 0'
20713 gl_fnmatch_gnu_end='#endif'
20714 fi
20715 if test "$cross_compiling" = yes; then :
20716 case "$host_os" in
20717 # Guess yes on musl systems.
20718 *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
20719 # Guess no otherwise, even on glibc systems.
20720 *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
20721 esac
20722
20723 else
20724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20725 /* end confdefs.h. */
20726 #include <fnmatch.h>
20727 static int
20728 y (char const *pattern, char const *string, int flags)
20729 {
20730 return fnmatch (pattern, string, flags) == 0;
20731 }
20732 static int
20733 n (char const *pattern, char const *string, int flags)
20734 {
20735 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
20736 }
20737
20738 int
20739 main ()
20740 {
20741 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
20742 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
20743 static char const A_1[] = { 'A' - 1, 0 };
20744 static char const A01[] = { 'A' + 1, 0 };
20745 static char const a_1[] = { 'a' - 1, 0 };
20746 static char const a01[] = { 'a' + 1, 0 };
20747 static char const bs_1[] = { '\\\\' - 1, 0 };
20748 static char const bs01[] = { '\\\\' + 1, 0 };
20749 int result = 0;
20750 if (!n ("a*", "", 0))
20751 return 1;
20752 if (!y ("a*", "abc", 0))
20753 return 1;
20754 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
20755 return 1;
20756 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
20757 return 2;
20758 if (!y ("a\\\\bc", "abc", 0))
20759 return 3;
20760 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
20761 return 3;
20762 if (!y ("*x", ".x", 0))
20763 return 4;
20764 if (!n ("*x", ".x", FNM_PERIOD))
20765 return 4;
20766 if (!y (Apat, "\\\\", 0))
20767 return 5;
20768 if (!y (Apat, "A", 0))
20769 return 5;
20770 if (!y (apat, "\\\\", 0))
20771 return 5;
20772 if (!y (apat, "a", 0))
20773 return 5;
20774 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
20775 return 5;
20776 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
20777 return 5;
20778 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
20779 return 5;
20780 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
20781 return 5;
20782 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
20783 return 5;
20784 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
20785 return 5;
20786 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
20787 return 5;
20788 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
20789 return 5;
20790 $gl_fnmatch_gnu_start
20791 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
20792 result |= 8;
20793 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
20794 result |= 16;
20795 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
20796 result |= 32;
20797 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
20798 result |= 64;
20799 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
20800 result |= 64;
20801 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
20802 result |= 64;
20803 $gl_fnmatch_gnu_end
20804 return result;
20805
20806 ;
20807 return 0;
20808 }
20809 _ACEOF
20810 if ac_fn_c_try_run "$LINENO"; then :
20811 eval "$gl_fnmatch_cache_var=yes"
20812 else
20813 eval "$gl_fnmatch_cache_var=no"
20814 fi
20815 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20816 conftest.$ac_objext conftest.beam conftest.$ac_ext
20817 fi
20818
20819
20820 fi
20821 eval ac_res=\$$gl_fnmatch_cache_var
20822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20823 $as_echo "$ac_res" >&6; }
20824 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
20825 case "$gl_fnmatch_result" in
20826 *yes) ;;
20827 *) REPLACE_FNMATCH=1 ;;
20828 esac
20829 fi
20830 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
20831
20832
20833 FNMATCH_H='fnmatch.h'
20834 if test -n "$FNMATCH_H"; then
20835 GL_GENERATE_FNMATCH_H_TRUE=
20836 GL_GENERATE_FNMATCH_H_FALSE='#'
20837 else
20838 GL_GENERATE_FNMATCH_H_TRUE='#'
20839 GL_GENERATE_FNMATCH_H_FALSE=
20840 fi
20841
20842
20843 fi
20844
20845 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
20846
20847
20848
20849
20850
20851
20852
20853
20854 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
20855
20856
20857
20858
20859
20860 fi
20861
20862
20863
20864
20865
20866 GNULIB_FNMATCH=1
20867
20868
20869
20870
20871
20872 $as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
20873
20874
20875
20876
20877
20878
20879
20880
20881 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
20882
20883
20884
20885
20886
20887
20888
20889
20890 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
20891
20892
20893
20894
20895
20896 fi
20897
20898
20899 cat >>confdefs.h <<_ACEOF
20900 #define GNULIB_FNMATCH_GNU 1
20901 _ACEOF
20902
20903
20904
20905
20906
20907
20908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
20909 $as_echo_n "checking whether free is known to preserve errno... " >&6; }
20910 if ${gl_cv_func_free_preserves_errno+:} false; then :
20911 $as_echo_n "(cached) " >&6
20912 else
20913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20914 /* end confdefs.h. */
20915 #include <stdlib.h>
20916
20917 int
20918 main ()
20919 {
20920 #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
20921 #elif defined __OpenBSD__
20922 #elif defined __sun
20923 #else
20924 #error "'free' is not known to preserve errno"
20925 #endif
20926
20927 ;
20928 return 0;
20929 }
20930 _ACEOF
20931 if ac_fn_c_try_compile "$LINENO"; then :
20932 gl_cv_func_free_preserves_errno=yes
20933 else
20934 gl_cv_func_free_preserves_errno=no
20935 fi
20936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20937
20938 fi
20939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
20940 $as_echo "$gl_cv_func_free_preserves_errno" >&6; }
20941
20942 case $gl_cv_func_free_preserves_errno in
20943 *yes) ;;
20944 *) REPLACE_FREE=1 ;;
20945 esac
20946
20947 if test $REPLACE_FREE = 1; then
20948
20949
20950
20951
20952
20953
20954
20955
20956 gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
20957
20958 :
20959 fi
20960
20961
20962
20963
20964
20965 GNULIB_FREE_POSIX=1
20966
20967
20968
20969
20970
20971 $as_echo "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
20972
20973
20974
20975
20976 if test $gl_func_frexp != yes; then
20977
20978
20979
20980
20981
20982
20983
20984
20985 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
20986
20987 fi
20988
20989
20990
20991
20992
20993 GNULIB_FREXP=1
20994
20995
20996
20997
20998
20999 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
21000
21001
21002
21003
21004 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
21005
21006
21007
21008
21009
21010
21011
21012
21013 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
21014
21015 fi
21016
21017
21018
21019
21020
21021 GNULIB_FREXPL=1
21022
21023
21024
21025
21026
21027 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
21028
21029
21030
21031
21032
21033
21034
21035 case "$host_os" in
21036 mingw* | solaris*)
21037 REPLACE_FSTAT=1
21038 ;;
21039 esac
21040
21041
21042
21043
21044
21045 if test $ac_cv_func_fchdir = no; then
21046 HAVE_FCHDIR=0
21047 fi
21048
21049 if test $HAVE_FCHDIR = 0; then
21050 case "$gl_cv_func_open_directory_works" in
21051 *yes) ;;
21052 *)
21053 REPLACE_FSTAT=1
21054 ;;
21055 esac
21056 fi
21057
21058
21059 if test $REPLACE_FSTAT = 1; then
21060
21061
21062
21063
21064
21065
21066
21067
21068 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
21069
21070 case "$host_os" in
21071 mingw*)
21072
21073
21074
21075
21076
21077
21078
21079
21080 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
21081
21082 ;;
21083 esac
21084
21085
21086
21087 :
21088
21089 fi
21090
21091
21092
21093
21094
21095 GNULIB_FSTAT=1
21096
21097
21098
21099
21100
21101 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112 if test $ac_cv_func_fstatat = no; then
21113 HAVE_FSTATAT=0
21114 else
21115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
21116 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
21117 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
21118 $as_echo_n "(cached) " >&6
21119 else
21120 if test "$cross_compiling" = yes; then :
21121 case "$host_os" in
21122 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
21123 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
21124 esac
21125
21126 else
21127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21128 /* end confdefs.h. */
21129
21130 #include <fcntl.h>
21131 #include <sys/stat.h>
21132 int
21133 main (void)
21134 {
21135 struct stat a;
21136 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
21137 }
21138
21139 _ACEOF
21140 if ac_fn_c_try_run "$LINENO"; then :
21141 gl_cv_func_fstatat_zero_flag=yes
21142 else
21143 gl_cv_func_fstatat_zero_flag=no
21144 fi
21145 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21146 conftest.$ac_objext conftest.beam conftest.$ac_ext
21147 fi
21148
21149
21150 fi
21151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
21152 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
21153
21154 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
21155 *yes+*yes) ;;
21156 *) REPLACE_FSTATAT=1 ;;
21157 esac
21158
21159 case $host_os in
21160 solaris*)
21161 REPLACE_FSTATAT=1 ;;
21162 esac
21163
21164 case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
21165 1,*yes)
21166
21167 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
21168
21169 ;;
21170 esac
21171 fi
21172
21173 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
21174
21175
21176
21177
21178
21179
21180
21181
21182 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
21183
21184 fi
21185
21186
21187
21188
21189
21190 GNULIB_FSTATAT=1
21191
21192
21193
21194
21195
21196 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
21197
21198
21199
21200
21201
21202
21203
21204
21205 gl_abort_bug=no
21206 case "$host_os" in
21207 mingw*)
21208 gl_cv_func_getcwd_path_max=yes
21209 ;;
21210 *)
21211
21212
21213
21214
21215
21216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
21217 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
21218 if ${gl_cv_func_getcwd_path_max+:} false; then :
21219 $as_echo_n "(cached) " >&6
21220 else
21221 # Arrange for deletion of the temporary directory this test creates.
21222 ac_clean_files="$ac_clean_files confdir3"
21223 if test "$cross_compiling" = yes; then :
21224 # Cross-compilation guesses:
21225 case "$host_os" in
21226 aix*) # On AIX, it has the AIX bug.
21227 gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;;
21228 gnu*) # On Hurd, it is 'yes'.
21229 gl_cv_func_getcwd_path_max='guessing yes' ;;
21230 linux* | kfreebsd*)
21231 # On older Linux+glibc it's 'no, but it is partly working',
21232 # on newer Linux+glibc it's 'yes'.
21233 # On Linux+musl libc, it's 'no, but it is partly working'.
21234 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
21235 gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;;
21236 *) # If we don't know, obey --enable-cross-guesses.
21237 gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;;
21238 esac
21239
21240 else
21241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21242 /* end confdefs.h. */
21243
21244 #include <errno.h>
21245 #include <stdlib.h>
21246 #if HAVE_UNISTD_H
21247 # include <unistd.h>
21248 #else
21249 # include <direct.h>
21250 #endif
21251 #include <string.h>
21252 #include <limits.h>
21253 #include <sys/stat.h>
21254 #include <sys/types.h>
21255 #include <fcntl.h>
21256
21257
21258 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
21259 #if HAVE_UNISTD_H
21260 # include <unistd.h>
21261 #endif
21262 #include <limits.h>
21263 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
21264 # include <sys/param.h>
21265 #endif
21266 #if !defined PATH_MAX && defined MAXPATHLEN
21267 # define PATH_MAX MAXPATHLEN
21268 #endif
21269 #ifdef __hpux
21270 # undef PATH_MAX
21271 # define PATH_MAX 1024
21272 #endif
21273 #if defined _WIN32 && ! defined __CYGWIN__
21274 # undef PATH_MAX
21275 # define PATH_MAX 260
21276 #endif
21277
21278
21279 #ifndef AT_FDCWD
21280 # define AT_FDCWD 0
21281 #endif
21282 #ifdef ENAMETOOLONG
21283 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
21284 #else
21285 # define is_ENAMETOOLONG(x) 0
21286 #endif
21287
21288 /* Use the getcwd function, not any macro. */
21289 #undef getcwd
21290
21291
21292
21293 $gl_mda_defines
21294
21295
21296 #ifndef S_IRWXU
21297 # define S_IRWXU 0700
21298 #endif
21299
21300 /* The length of this name must be 8. */
21301 #define DIR_NAME "confdir3"
21302 #define DIR_NAME_LEN 8
21303 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
21304
21305 /* The length of "../". */
21306 #define DOTDOTSLASH_LEN 3
21307
21308 /* Leftover bytes in the buffer, to work around library or OS bugs. */
21309 #define BUF_SLOP 20
21310
21311 int
21312 main ()
21313 {
21314 #ifndef PATH_MAX
21315 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
21316 at least not on a local file system. And if we were to start worrying
21317 about remote file systems, we'd have to enable the wrapper function
21318 all of the time, just to be safe. That's not worth the cost. */
21319 exit (0);
21320 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
21321 - DIR_NAME_SIZE - BUF_SLOP) \
21322 <= PATH_MAX)
21323 /* FIXME: Assuming there's a system for which this is true,
21324 this should be done in a compile test. */
21325 exit (0);
21326 #else
21327 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
21328 + DIR_NAME_SIZE + BUF_SLOP];
21329 char *cwd = getcwd (buf, PATH_MAX);
21330 size_t initial_cwd_len;
21331 size_t cwd_len;
21332 int fail = 0;
21333 size_t n_chdirs = 0;
21334
21335 if (cwd == NULL)
21336 exit (10);
21337
21338 cwd_len = initial_cwd_len = strlen (cwd);
21339
21340 while (1)
21341 {
21342 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
21343 char *c = NULL;
21344
21345 cwd_len += DIR_NAME_SIZE;
21346 /* If mkdir or chdir fails, it could be that this system cannot create
21347 any file with an absolute name longer than PATH_MAX, such as cygwin.
21348 If so, leave fail as 0, because the current working directory can't
21349 be too long for getcwd if it can't even be created. On Linux with
21350 the 9p file system, mkdir fails with error EINVAL when cwd_len gets
21351 too long; ignore this failure because the getcwd() system call
21352 produces good results whereas the gnulib substitute calls getdents64
21353 which fails with error EPROTO.
21354 For other errors, be pessimistic and consider that as a failure,
21355 too. */
21356 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
21357 {
21358 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
21359 #ifdef __linux__
21360 if (! (errno == EINVAL))
21361 #endif
21362 fail = 20;
21363 break;
21364 }
21365
21366 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
21367 {
21368 struct stat sb;
21369
21370 c = getcwd (buf, PATH_MAX);
21371 if (!c && errno == ENOENT)
21372 {
21373 fail = 11;
21374 break;
21375 }
21376 if (c)
21377 {
21378 fail = 31;
21379 break;
21380 }
21381 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
21382 {
21383 fail = 21;
21384 break;
21385 }
21386
21387 /* Our replacement needs to be able to stat() long ../../paths,
21388 so generate a path larger than PATH_MAX to check,
21389 avoiding the replacement if we can't stat(). */
21390 c = getcwd (buf, cwd_len + 1);
21391 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
21392 {
21393 fail = 32;
21394 break;
21395 }
21396 }
21397
21398 if (dotdot_max <= cwd_len - initial_cwd_len)
21399 {
21400 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
21401 break;
21402 c = getcwd (buf, cwd_len + 1);
21403 if (!c)
21404 {
21405 if (! (errno == ERANGE || errno == ENOENT
21406 || is_ENAMETOOLONG (errno)))
21407 {
21408 fail = 22;
21409 break;
21410 }
21411 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
21412 {
21413 fail = 12;
21414 break;
21415 }
21416 }
21417 }
21418
21419 if (c && strlen (c) != cwd_len)
21420 {
21421 fail = 23;
21422 break;
21423 }
21424 ++n_chdirs;
21425 }
21426
21427 /* Leaving behind such a deep directory is not polite.
21428 So clean up here, right away, even though the driving
21429 shell script would also clean up. */
21430 {
21431 size_t i;
21432
21433 /* Try rmdir first, in case the chdir failed. */
21434 rmdir (DIR_NAME);
21435 for (i = 0; i <= n_chdirs; i++)
21436 {
21437 if (chdir ("..") < 0)
21438 break;
21439 if (rmdir (DIR_NAME) != 0)
21440 break;
21441 }
21442 }
21443
21444 exit (fail);
21445 #endif
21446 }
21447
21448 _ACEOF
21449 if ac_fn_c_try_run "$LINENO"; then :
21450 gl_cv_func_getcwd_path_max=yes
21451 else
21452 case $? in
21453 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
21454 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
21455 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
21456 *) gl_cv_func_getcwd_path_max=no;;
21457 esac
21458 fi
21459 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21460 conftest.$ac_objext conftest.beam conftest.$ac_ext
21461 fi
21462
21463
21464 fi
21465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
21466 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
21467
21468 case "$gl_cv_func_getcwd_null" in
21469 *yes)
21470
21471
21472
21473
21474
21475
21476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
21477 $as_echo_n "checking for getpagesize... " >&6; }
21478 if ${gl_cv_func_getpagesize+:} false; then :
21479 $as_echo_n "(cached) " >&6
21480 else
21481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21482 /* end confdefs.h. */
21483 #include <unistd.h>
21484 int
21485 main ()
21486 {
21487 return getpagesize();
21488 ;
21489 return 0;
21490 }
21491
21492 _ACEOF
21493 if ac_fn_c_try_link "$LINENO"; then :
21494 gl_cv_func_getpagesize=yes
21495 else
21496 gl_cv_func_getpagesize=no
21497 fi
21498 rm -f core conftest.err conftest.$ac_objext \
21499 conftest$ac_exeext conftest.$ac_ext
21500
21501 fi
21502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
21503 $as_echo "$gl_cv_func_getpagesize" >&6; }
21504
21505 if test $gl_cv_func_getpagesize = yes; then
21506
21507 cat >>confdefs.h <<_ACEOF
21508 #define HAVE_GETPAGESIZE 1
21509 _ACEOF
21510
21511 fi
21512
21513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5
21514 $as_echo_n "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; }
21515 if ${gl_cv_func_getcwd_succeeds_beyond_4k+:} false; then :
21516 $as_echo_n "(cached) " >&6
21517 else
21518 # Remove any remnants of a previous test.
21519 rm -rf confdir-14B---
21520 # Arrange for deletion of the temporary directory this test creates.
21521 ac_clean_files="$ac_clean_files confdir-14B---"
21522 if test "$cross_compiling" = yes; then :
21523 case "$host_os" in
21524 # Guess yes on musl systems.
21525 *-musl*) gl_cv_func_getcwd_succeeds_beyond_4k="guessing yes" ;;
21526 # Guess no otherwise, even on glibc systems.
21527 *) gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
21528 esac
21529
21530 else
21531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21532 /* end confdefs.h. */
21533
21534 #include <errno.h>
21535 #include <stdlib.h>
21536 #if HAVE_UNISTD_H
21537 # include <unistd.h>
21538 #else /* on Windows with MSVC */
21539 # include <direct.h>
21540 #endif
21541 #include <string.h>
21542 #include <sys/stat.h>
21543
21544
21545 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
21546 #if HAVE_UNISTD_H
21547 # include <unistd.h>
21548 #endif
21549 #include <limits.h>
21550 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
21551 # include <sys/param.h>
21552 #endif
21553 #if !defined PATH_MAX && defined MAXPATHLEN
21554 # define PATH_MAX MAXPATHLEN
21555 #endif
21556 #ifdef __hpux
21557 # undef PATH_MAX
21558 # define PATH_MAX 1024
21559 #endif
21560 #if defined _WIN32 && ! defined __CYGWIN__
21561 # undef PATH_MAX
21562 # define PATH_MAX 260
21563 #endif
21564
21565
21566
21567 $gl_mda_defines
21568
21569
21570 #ifndef S_IRWXU
21571 # define S_IRWXU 0700
21572 #endif
21573
21574 /* FIXME: skip the run-test altogether on systems without getpagesize. */
21575 #if ! HAVE_GETPAGESIZE
21576 # define getpagesize() 0
21577 #endif
21578
21579 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
21580 the 16kB pagesize on ia64 linux. Those conditions make the code below
21581 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
21582 #define TARGET_LEN (5 * 1024)
21583
21584 int
21585 main ()
21586 {
21587 char *cwd;
21588 size_t initial_cwd_len;
21589 int fail = 0;
21590
21591 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
21592 this relatively expensive and invasive test if that's not true. */
21593 #ifdef PATH_MAX
21594 int bug_possible = PATH_MAX < getpagesize ();
21595 #else
21596 int bug_possible = 0;
21597 #endif
21598 if (! bug_possible)
21599 return 0;
21600
21601 cwd = getcwd (NULL, 0);
21602 if (cwd == NULL)
21603 return 2;
21604
21605 initial_cwd_len = strlen (cwd);
21606 free (cwd);
21607
21608 if (1)
21609 {
21610 static char const dir_name[] = "confdir-14B---";
21611 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
21612 / sizeof dir_name);
21613 size_t d;
21614 for (d = 0; d < desired_depth; d++)
21615 {
21616 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
21617 {
21618 if (! (errno == ERANGE || errno == ENAMETOOLONG
21619 || errno == ENOENT))
21620 fail = 3; /* Unable to construct deep hierarchy. */
21621 break;
21622 }
21623 }
21624
21625 /* If libc has the bug in question, this invocation of getcwd
21626 results in a failed assertion. */
21627 cwd = getcwd (NULL, 0);
21628 if (cwd == NULL)
21629 fail = 4; /* getcwd didn't assert, but it failed for a long name
21630 where the answer could have been learned. */
21631 free (cwd);
21632
21633 /* Call rmdir first, in case the above chdir failed. */
21634 rmdir (dir_name);
21635 while (0 < d--)
21636 {
21637 if (chdir ("..") < 0)
21638 {
21639 fail = 5;
21640 break;
21641 }
21642 rmdir (dir_name);
21643 }
21644 }
21645
21646 return fail;
21647 }
21648
21649 _ACEOF
21650 if ac_fn_c_try_run "$LINENO"; then :
21651 gl_cv_func_getcwd_succeeds_beyond_4k=yes
21652 else
21653 ret=$?
21654 if test $ret -ge 128 || test $ret = 4; then
21655 gl_cv_func_getcwd_succeeds_beyond_4k=no
21656 else
21657 gl_cv_func_getcwd_succeeds_beyond_4k=yes
21658 fi
21659
21660 fi
21661 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21662 conftest.$ac_objext conftest.beam conftest.$ac_ext
21663 fi
21664
21665
21666 fi
21667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5
21668 $as_echo "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; }
21669 case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
21670 *no)
21671 gl_abort_bug=yes
21672 ;;
21673 *)
21674
21675 ;;
21676 esac
21677
21678 ;;
21679 esac
21680 ;;
21681 esac
21682 case "$gl_cv_func_getcwd_path_max" in
21683 *"no" | *"no, it has the AIX bug") ;;
21684 *)
21685
21686 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
21687
21688 ;;
21689 esac
21690 case "$gl_cv_func_getcwd_path_max" in
21691 *"no, but it is partly working")
21692
21693 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
21694
21695 ;;
21696 *"yes, but with shorter paths")
21697
21698 $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
21699
21700 ;;
21701 esac
21702
21703 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
21704 || test $gl_cv_func_getcwd_posix_signature != yes \
21705 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
21706 || test $gl_abort_bug = yes; then
21707 REPLACE_GETCWD=1
21708 fi
21709
21710 if test $REPLACE_GETCWD = 1; then
21711
21712
21713
21714
21715
21716
21717
21718
21719 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
21720
21721
21722
21723
21724 :
21725
21726 fi
21727
21728
21729 cat >>confdefs.h <<_ACEOF
21730 #define GNULIB_GETCWD 1
21731 _ACEOF
21732
21733
21734
21735
21736
21737
21738
21739 GNULIB_GETCWD=1
21740
21741
21742
21743
21744
21745 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
21746
21747
21748
21749
21750
21751
21752
21753
21754 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
21755 *yes,yes) ;;
21756 *)
21757 REPLACE_GETCWD=1
21758 ;;
21759 esac
21760
21761 if test $REPLACE_GETCWD = 1; then
21762
21763
21764
21765
21766
21767
21768
21769
21770 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
21771
21772 fi
21773
21774
21775
21776
21777
21778 GNULIB_GETCWD=1
21779
21780
21781
21782
21783
21784 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796 if test $ac_cv_func_getdelim = yes; then
21797 HAVE_GETDELIM=1
21798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
21799 $as_echo_n "checking for working getdelim function... " >&6; }
21800 if ${gl_cv_func_working_getdelim+:} false; then :
21801 $as_echo_n "(cached) " >&6
21802 else
21803 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
21804 if test "$cross_compiling" = yes; then :
21805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21806 /* end confdefs.h. */
21807
21808 #include <features.h>
21809 #ifdef __GNU_LIBRARY__
21810 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
21811 Lucky GNU user
21812 #endif
21813 #endif
21814
21815 _ACEOF
21816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21817 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
21818 gl_cv_func_working_getdelim="guessing yes"
21819 else
21820 case "$host_os" in
21821 *-musl*) gl_cv_func_working_getdelim="guessing yes" ;;
21822 *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
21823 esac
21824
21825 fi
21826 rm -f conftest*
21827
21828
21829 else
21830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21831 /* end confdefs.h. */
21832
21833 # include <stdio.h>
21834 # include <stdlib.h>
21835 # include <string.h>
21836 int main ()
21837 {
21838 FILE *in = fopen ("./conftest.data", "r");
21839 if (!in)
21840 return 1;
21841 {
21842 /* Test result for a NULL buffer and a zero size.
21843 Based on a test program from Karl Heuer. */
21844 char *line = NULL;
21845 size_t siz = 0;
21846 int len = getdelim (&line, &siz, '\n', in);
21847 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
21848 { free (line); fclose (in); return 2; }
21849 free (line);
21850 }
21851 {
21852 /* Test result for a NULL buffer and a non-zero size.
21853 This crashes on FreeBSD 8.0. */
21854 char *line = NULL;
21855 size_t siz = (size_t)(~0) / 4;
21856 if (getdelim (&line, &siz, '\n', in) == -1)
21857 { fclose (in); return 3; }
21858 free (line);
21859 }
21860 fclose (in);
21861 return 0;
21862 }
21863
21864 _ACEOF
21865 if ac_fn_c_try_run "$LINENO"; then :
21866 gl_cv_func_working_getdelim=yes
21867 else
21868 gl_cv_func_working_getdelim=no
21869 fi
21870 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21871 conftest.$ac_objext conftest.beam conftest.$ac_ext
21872 fi
21873
21874
21875 fi
21876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
21877 $as_echo "$gl_cv_func_working_getdelim" >&6; }
21878 case "$gl_cv_func_working_getdelim" in
21879 *yes) ;;
21880 *) REPLACE_GETDELIM=1 ;;
21881 esac
21882 else
21883 HAVE_GETDELIM=0
21884 fi
21885
21886 if test $ac_cv_have_decl_getdelim = no; then
21887 HAVE_DECL_GETDELIM=0
21888 fi
21889
21890 if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
21891
21892
21893
21894
21895
21896
21897
21898
21899 gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
21900
21901
21902 for ac_func in flockfile funlockfile
21903 do :
21904 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21905 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
21906 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
21907 cat >>confdefs.h <<_ACEOF
21908 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21909 _ACEOF
21910
21911 fi
21912 done
21913
21914 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
21915 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
21916 ac_have_decl=1
21917 else
21918 ac_have_decl=0
21919 fi
21920
21921 cat >>confdefs.h <<_ACEOF
21922 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
21923 _ACEOF
21924
21925
21926 fi
21927
21928
21929
21930
21931
21932 GNULIB_GETDELIM=1
21933
21934
21935
21936
21937
21938 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
21939
21940
21941
21942
21943
21944
21945
21946
21947 if test $ac_cv_func_getdtablesize = yes &&
21948 test $ac_cv_have_decl_getdtablesize = yes; then
21949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
21950 $as_echo_n "checking whether getdtablesize works... " >&6; }
21951 if ${gl_cv_func_getdtablesize_works+:} false; then :
21952 $as_echo_n "(cached) " >&6
21953 else
21954 case "$host_os" in
21955 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
21956 *)
21957 if test "$cross_compiling" = yes; then :
21958 case "$host_os" in
21959 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
21960 gl_cv_func_getdtablesize_works="guessing no" ;;
21961 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
21962 esac
21963
21964 else
21965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21966 /* end confdefs.h. */
21967
21968 #include <unistd.h>
21969
21970
21971 $gl_mda_defines
21972
21973
21974 int
21975 main ()
21976 {
21977 int size = getdtablesize();
21978 if (dup2 (0, getdtablesize()) != -1)
21979 return 1;
21980 if (size != getdtablesize())
21981 return 2;
21982
21983 ;
21984 return 0;
21985 }
21986 _ACEOF
21987 if ac_fn_c_try_run "$LINENO"; then :
21988 gl_cv_func_getdtablesize_works=yes
21989 else
21990 gl_cv_func_getdtablesize_works=no
21991 fi
21992 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21993 conftest.$ac_objext conftest.beam conftest.$ac_ext
21994 fi
21995
21996 ;;
21997 esac
21998
21999 fi
22000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
22001 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
22002 case "$gl_cv_func_getdtablesize_works" in
22003 *yes | "no (limitation)") ;;
22004 *) REPLACE_GETDTABLESIZE=1 ;;
22005 esac
22006 else
22007 HAVE_GETDTABLESIZE=0
22008 fi
22009
22010 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
22011
22012
22013
22014
22015
22016
22017
22018
22019 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
22020
22021 :
22022 fi
22023
22024
22025
22026
22027
22028 GNULIB_GETDTABLESIZE=1
22029
22030
22031
22032
22033
22034 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045 gl_getline_needs_run_time_check=no
22046 ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
22047 if test "x$ac_cv_func_getline" = xyes; then :
22048 gl_getline_needs_run_time_check=yes
22049 else
22050 am_cv_func_working_getline=no
22051 fi
22052
22053 if test $gl_getline_needs_run_time_check = yes; then
22054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
22055 $as_echo_n "checking for working getline function... " >&6; }
22056 if ${am_cv_func_working_getline+:} false; then :
22057 $as_echo_n "(cached) " >&6
22058 else
22059 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
22060 if test "$cross_compiling" = yes; then :
22061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22062 /* end confdefs.h. */
22063
22064 #include <features.h>
22065 #ifdef __GNU_LIBRARY__
22066 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
22067 Lucky GNU user
22068 #endif
22069 #endif
22070
22071 _ACEOF
22072 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22073 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
22074 am_cv_func_working_getline="guessing yes"
22075 else
22076 case "$host_os" in
22077 *-musl*) am_cv_func_working_getline="guessing yes" ;;
22078 *) am_cv_func_working_getline="$gl_cross_guess_normal" ;;
22079 esac
22080
22081 fi
22082 rm -f conftest*
22083
22084
22085 else
22086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22087 /* end confdefs.h. */
22088
22089 # include <stdio.h>
22090 # include <stdlib.h>
22091 # include <string.h>
22092 int main ()
22093 {
22094 FILE *in = fopen ("./conftest.data", "r");
22095 if (!in)
22096 return 1;
22097 {
22098 /* Test result for a NULL buffer and a zero size.
22099 Based on a test program from Karl Heuer. */
22100 char *line = NULL;
22101 size_t siz = 0;
22102 int len = getline (&line, &siz, in);
22103 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
22104 { free (line); fclose (in); return 2; }
22105 free (line);
22106 }
22107 {
22108 /* Test result for a NULL buffer and a non-zero size.
22109 This crashes on FreeBSD 8.0. */
22110 char *line = NULL;
22111 size_t siz = (size_t)(~0) / 4;
22112 if (getline (&line, &siz, in) == -1)
22113 { fclose (in); return 3; }
22114 free (line);
22115 }
22116 fclose (in);
22117 return 0;
22118 }
22119
22120 _ACEOF
22121 if ac_fn_c_try_run "$LINENO"; then :
22122 am_cv_func_working_getline=yes
22123 else
22124 am_cv_func_working_getline=no
22125 fi
22126 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22127 conftest.$ac_objext conftest.beam conftest.$ac_ext
22128 fi
22129
22130
22131 fi
22132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
22133 $as_echo "$am_cv_func_working_getline" >&6; }
22134 fi
22135
22136 if test $ac_cv_have_decl_getline = no; then
22137 HAVE_DECL_GETLINE=0
22138 fi
22139
22140 case "$am_cv_func_working_getline" in
22141 *yes) ;;
22142 *)
22143 REPLACE_GETLINE=1
22144 ;;
22145 esac
22146
22147 if test $REPLACE_GETLINE = 1; then
22148
22149
22150
22151
22152
22153
22154
22155
22156 gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
22157
22158
22159 :
22160
22161 fi
22162
22163
22164
22165
22166
22167 GNULIB_GETLINE=1
22168
22169
22170
22171
22172
22173 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183 if test $ac_cv_have_decl_getlogin_r = no; then
22184 HAVE_DECL_GETLOGIN_R=0
22185 fi
22186
22187
22188 if test $ac_cv_func_getlogin_r = no; then
22189 HAVE_GETLOGIN_R=0
22190 else
22191 HAVE_GETLOGIN_R=1
22192
22193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
22194 $as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
22195 if ${gl_cv_func_getlogin_r_works+:} false; then :
22196 $as_echo_n "(cached) " >&6
22197 else
22198
22199 case "$host_os" in
22200 # Guess no on Mac OS X, OSF/1.
22201 darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
22202 # Guess yes otherwise.
22203 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
22204 esac
22205 if test "$cross_compiling" = yes; then :
22206 :
22207 else
22208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22209 /* end confdefs.h. */
22210
22211 #include <stddef.h>
22212 #include <string.h>
22213 #include <unistd.h>
22214 #if !HAVE_DECL_GETLOGIN_R
22215 extern
22216 # ifdef __cplusplus
22217 "C"
22218 # endif
22219 int getlogin_r (char *, size_t);
22220 #endif
22221 int
22222 main (void)
22223 {
22224 int result = 0;
22225 char buf[100];
22226
22227 if (getlogin_r (buf, 0) == 0)
22228 result |= 1;
22229 if (getlogin_r (buf, 1) == 0)
22230 result |= 2;
22231 if (getlogin_r (buf, 100) == 0)
22232 {
22233 size_t n = strlen (buf);
22234 if (getlogin_r (buf, n) == 0)
22235 result |= 4;
22236 }
22237 return result;
22238 }
22239 _ACEOF
22240 if ac_fn_c_try_run "$LINENO"; then :
22241 gl_cv_func_getlogin_r_works=yes
22242 else
22243 gl_cv_func_getlogin_r_works=no
22244 fi
22245 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22246 conftest.$ac_objext conftest.beam conftest.$ac_ext
22247 fi
22248
22249
22250 fi
22251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
22252 $as_echo "$gl_cv_func_getlogin_r_works" >&6; }
22253 case "$gl_cv_func_getlogin_r_works" in
22254 *yes) ;;
22255 *) REPLACE_GETLOGIN_R=1 ;;
22256 esac
22257 fi
22258
22259 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
22260
22261
22262
22263
22264
22265
22266
22267
22268 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
22269
22270
22271
22272
22273 fi
22274
22275
22276
22277
22278
22279 GNULIB_GETLOGIN_R=1
22280
22281
22282
22283
22284
22285 $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
22286
22287
22288
22289
22290
22291
22292
22293 ac_found=0
22294 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
22295 "
22296 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
22297 ac_have_decl=1
22298 else
22299 ac_have_decl=0
22300 fi
22301
22302 cat >>confdefs.h <<_ACEOF
22303 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
22304 _ACEOF
22305 if test $ac_have_decl = 1; then :
22306 ac_found=1
22307 fi
22308
22309 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
22310 "
22311 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
22312 ac_have_decl=1
22313 else
22314 ac_have_decl=0
22315 fi
22316
22317 cat >>confdefs.h <<_ACEOF
22318 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
22319 _ACEOF
22320 if test $ac_have_decl = 1; then :
22321 ac_found=1
22322 fi
22323
22324 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
22325 "
22326 if test "x$ac_cv_have_decl___argv" = xyes; then :
22327 ac_have_decl=1
22328 else
22329 ac_have_decl=0
22330 fi
22331
22332 cat >>confdefs.h <<_ACEOF
22333 #define HAVE_DECL___ARGV $ac_have_decl
22334 _ACEOF
22335 if test $ac_have_decl = 1; then :
22336 ac_found=1
22337 fi
22338
22339
22340 # Incur the cost of this test only if none of the above worked.
22341 if test $ac_found = 0; then
22342 # On OpenBSD 5.1, using the global __progname variable appears to be
22343 # the only way to implement getprogname.
22344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
22345 $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
22346 if ${gl_cv_var___progname+:} false; then :
22347 $as_echo_n "(cached) " >&6
22348 else
22349
22350 gl_cv_var___progname=
22351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22352 /* end confdefs.h. */
22353 extern char *__progname;
22354 int
22355 main ()
22356 {
22357 return *__progname;
22358
22359 ;
22360 return 0;
22361 }
22362 _ACEOF
22363 if ac_fn_c_try_link "$LINENO"; then :
22364 gl_cv_var___progname=yes
22365
22366 fi
22367 rm -f core conftest.err conftest.$ac_objext \
22368 conftest$ac_exeext conftest.$ac_ext
22369
22370
22371 fi
22372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
22373 $as_echo "$gl_cv_var___progname" >&6; }
22374 if test "$gl_cv_var___progname" = yes; then
22375
22376 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
22377
22378 fi
22379 fi
22380
22381
22382
22383
22384
22385 if test "$ac_cv_func_getrandom" != yes; then
22386 HAVE_GETRANDOM=0
22387 else
22388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
22389 $as_echo_n "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
22390 if ${gl_cv_func_getrandom_ok+:} false; then :
22391 $as_echo_n "(cached) " >&6
22392 else
22393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22394 /* end confdefs.h. */
22395 /* Additional includes are needed before <sys/random.h> on uClibc
22396 and Mac OS X. */
22397 #include <sys/types.h>
22398 #include <stdlib.h>
22399 #include <sys/random.h>
22400 ssize_t getrandom (void *, size_t, unsigned int);
22401
22402 int
22403 main ()
22404 {
22405
22406 ;
22407 return 0;
22408 }
22409
22410 _ACEOF
22411 if ac_fn_c_try_compile "$LINENO"; then :
22412 gl_cv_func_getrandom_ok=yes
22413 else
22414 gl_cv_func_getrandom_ok=no
22415 fi
22416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22417
22418 fi
22419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
22420 $as_echo "$gl_cv_func_getrandom_ok" >&6; }
22421 if test $gl_cv_func_getrandom_ok = no; then
22422 REPLACE_GETRANDOM=1
22423 fi
22424 fi
22425
22426 case "$host_os" in
22427 mingw*)
22428 for ac_header in bcrypt.h
22429 do :
22430 ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
22431
22432 "
22433 if test "x$ac_cv_header_bcrypt_h" = xyes; then :
22434 cat >>confdefs.h <<_ACEOF
22435 #define HAVE_BCRYPT_H 1
22436 _ACEOF
22437
22438 fi
22439
22440 done
22441
22442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
22443 $as_echo_n "checking whether the bcrypt library is guaranteed to be present... " >&6; }
22444 if ${gl_cv_lib_assume_bcrypt+:} false; then :
22445 $as_echo_n "(cached) " >&6
22446 else
22447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22448 /* end confdefs.h. */
22449 #include <windows.h>
22450 int
22451 main ()
22452 {
22453 #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
22454 cannot assume it
22455 #endif
22456
22457 ;
22458 return 0;
22459 }
22460
22461 _ACEOF
22462 if ac_fn_c_try_compile "$LINENO"; then :
22463 gl_cv_lib_assume_bcrypt=yes
22464 else
22465 gl_cv_lib_assume_bcrypt=no
22466 fi
22467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22468
22469 fi
22470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
22471 $as_echo "$gl_cv_lib_assume_bcrypt" >&6; }
22472 if test $gl_cv_lib_assume_bcrypt = yes; then
22473
22474 $as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
22475
22476 LIB_GETRANDOM='-lbcrypt'
22477 else
22478 LIB_GETRANDOM='-ladvapi32'
22479 fi
22480 ;;
22481 *)
22482 LIB_GETRANDOM= ;;
22483 esac
22484
22485
22486 if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
22487
22488
22489
22490
22491
22492
22493
22494
22495 gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext"
22496
22497 fi
22498
22499
22500
22501
22502
22503 GNULIB_GETRANDOM=1
22504
22505
22506
22507
22508
22509 $as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522 gl_gettimeofday_timezone=void
22523 if test $ac_cv_func_gettimeofday != yes; then
22524 HAVE_GETTIMEOFDAY=0
22525 else
22526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
22527 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
22528 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
22529 $as_echo_n "(cached) " >&6
22530 else
22531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22532 /* end confdefs.h. */
22533 #include <sys/time.h>
22534 struct timeval c;
22535 int gettimeofday (struct timeval *restrict, void *restrict);
22536
22537 int
22538 main ()
22539 {
22540 /* glibc uses struct timezone * rather than the POSIX void *
22541 if _GNU_SOURCE is defined. However, since the only portable
22542 use of gettimeofday uses NULL as the second parameter, and
22543 since the glibc definition is actually more typesafe, it is
22544 not worth wrapping this to get a compliant signature. */
22545 int (*f) (struct timeval *restrict, void *restrict)
22546 = gettimeofday;
22547 int x = f (&c, 0);
22548 return !(x | c.tv_sec | c.tv_usec);
22549
22550 ;
22551 return 0;
22552 }
22553 _ACEOF
22554 if ac_fn_c_try_compile "$LINENO"; then :
22555 gl_cv_func_gettimeofday_posix_signature=yes
22556 else
22557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22558 /* end confdefs.h. */
22559 #include <sys/time.h>
22560 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
22561
22562 int
22563 main ()
22564 {
22565
22566 ;
22567 return 0;
22568 }
22569 _ACEOF
22570 if ac_fn_c_try_compile "$LINENO"; then :
22571 gl_cv_func_gettimeofday_posix_signature=almost
22572 else
22573 gl_cv_func_gettimeofday_posix_signature=no
22574 fi
22575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22576 fi
22577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22578 fi
22579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
22580 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
22581 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
22582 gl_gettimeofday_timezone='struct timezone'
22583 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
22584 REPLACE_GETTIMEOFDAY=1
22585 fi
22586 if test $REPLACE_STRUCT_TIMEVAL = 1; then
22587 REPLACE_GETTIMEOFDAY=1
22588 fi
22589 case "$host_os" in
22590 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
22591 esac
22592 fi
22593
22594 cat >>confdefs.h <<_ACEOF
22595 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
22596 _ACEOF
22597
22598
22599 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
22600
22601
22602
22603
22604
22605
22606
22607
22608 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
22609
22610 :
22611 fi
22612
22613
22614
22615
22616
22617 GNULIB_GETTIMEOFDAY=1
22618
22619
22620
22621
22622
22623 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
22624
22625
22626
22627
22628
22629
22630
22631 if test $ac_cv_func_glob = no; then
22632 HAVE_GLOB=0
22633 else
22634
22635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5
22636 $as_echo_n "checking for GNU glob interface version 1 or 2... " >&6; }
22637 if ${gl_cv_gnu_glob_interface_version_1_2+:} false; then :
22638 $as_echo_n "(cached) " >&6
22639 else
22640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22641 /* end confdefs.h. */
22642 #include <gnu-versions.h>
22643 char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1];
22644 _ACEOF
22645 if ac_fn_c_try_compile "$LINENO"; then :
22646 gl_cv_gnu_glob_interface_version_1_2=yes
22647 else
22648 gl_cv_gnu_glob_interface_version_1_2=no
22649 fi
22650 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22651 fi
22652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5
22653 $as_echo "$gl_cv_gnu_glob_interface_version_1_2" >&6; }
22654 if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then
22655 REPLACE_GLOB=1
22656 fi
22657
22658 if test $REPLACE_GLOB = 0; then
22659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
22660 $as_echo_n "checking whether glob lists broken symlinks... " >&6; }
22661 if ${gl_cv_glob_lists_symlinks+:} false; then :
22662 $as_echo_n "(cached) " >&6
22663 else
22664 if test $cross_compiling != yes; then
22665 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
22666 gl_cv_glob_lists_symlinks=maybe
22667 else
22668 # If we can't make a symlink, then we cannot test this issue. Be
22669 # pessimistic about this.
22670 gl_cv_glob_lists_symlinks=no
22671 fi
22672 if test $gl_cv_glob_lists_symlinks = maybe; then
22673 if test "$cross_compiling" = yes; then :
22674 :
22675
22676 else
22677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22678 /* end confdefs.h. */
22679 #include <stddef.h>
22680 #include <glob.h>
22681 int
22682 main ()
22683 {
22684 glob_t found;
22685 if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH)
22686 return 1;
22687 globfree (&found);
22688
22689 ;
22690 return 0;
22691 }
22692 _ACEOF
22693 if ac_fn_c_try_run "$LINENO"; then :
22694 gl_cv_glob_lists_symlinks=yes
22695 else
22696 gl_cv_glob_lists_symlinks=no
22697 fi
22698 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22699 conftest.$ac_objext conftest.beam conftest.$ac_ext
22700 fi
22701
22702 fi
22703 rm -f conf$$-globtest
22704 else
22705 gl_cv_glob_lists_symlinks="$gl_cross_guess_normal"
22706 fi
22707
22708 fi
22709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
22710 $as_echo "$gl_cv_glob_lists_symlinks" >&6; }
22711 case "$gl_cv_glob_lists_symlinks" in
22712 *yes) ;;
22713 *) REPLACE_GLOB=1 ;;
22714 esac
22715 fi
22716
22717 fi
22718
22719 if test $ac_cv_func_glob_pattern_p = no; then
22720 HAVE_GLOB_PATTERN_P=0
22721 else
22722 if test $REPLACE_GLOB = 1; then
22723 REPLACE_GLOB_PATTERN_P=1
22724 fi
22725 fi
22726
22727 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
22728
22729
22730 GLOB_H='glob.h'
22731 if test -n "$GLOB_H"; then
22732 GL_GENERATE_GLOB_H_TRUE=
22733 GL_GENERATE_GLOB_H_FALSE='#'
22734 else
22735 GL_GENERATE_GLOB_H_TRUE='#'
22736 GL_GENERATE_GLOB_H_FALSE=
22737 fi
22738
22739
22740 fi
22741
22742 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
22743
22744
22745
22746
22747
22748
22749
22750
22751 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761 gl_LIBOBJS="$gl_LIBOBJS globfree.$ac_objext"
22762
22763
22764
22765
22766
22767
22768 fi
22769 if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then
22770
22771
22772
22773
22774
22775
22776
22777
22778 gl_LIBOBJS="$gl_LIBOBJS glob_pattern_p.$ac_objext"
22779
22780 fi
22781
22782
22783
22784
22785
22786 GNULIB_GLOB=1
22787
22788
22789
22790
22791
22792 $as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h
22793
22794
22795
22796
22797
22798 LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
22799
22800
22801
22802
22803
22804
22805
22806
22807 HAVE_INET_NTOP=1
22808 INET_NTOP_LIB=
22809
22810
22811
22812
22813 if test $ac_cv_header_sys_socket_h != yes; then
22814 for ac_header in winsock2.h
22815 do :
22816 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
22817 if test "x$ac_cv_header_winsock2_h" = xyes; then :
22818 cat >>confdefs.h <<_ACEOF
22819 #define HAVE_WINSOCK2_H 1
22820 _ACEOF
22821
22822 fi
22823
22824 done
22825
22826 fi
22827 if test "$ac_cv_header_winsock2_h" = yes; then
22828 HAVE_WINSOCK2_H=1
22829 UNISTD_H_HAVE_WINSOCK2_H=1
22830 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
22831 else
22832 HAVE_WINSOCK2_H=0
22833 fi
22834
22835
22836 if test $HAVE_WINSOCK2_H = 1; then
22837 REPLACE_INET_NTOP=1
22838 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
22839 "
22840 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
22841 ac_have_decl=1
22842 else
22843 ac_have_decl=0
22844 fi
22845
22846 cat >>confdefs.h <<_ACEOF
22847 #define HAVE_DECL_INET_NTOP $ac_have_decl
22848 _ACEOF
22849
22850 if test $ac_cv_have_decl_inet_ntop = yes; then
22851 INET_NTOP_LIB="-lws2_32"
22852 else
22853 HAVE_DECL_INET_NTOP=0
22854 fi
22855 else
22856 gl_save_LIBS=$LIBS
22857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
22858 $as_echo_n "checking for library containing inet_ntop... " >&6; }
22859 if ${ac_cv_search_inet_ntop+:} false; then :
22860 $as_echo_n "(cached) " >&6
22861 else
22862 ac_func_search_save_LIBS=$LIBS
22863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22864 /* end confdefs.h. */
22865
22866 /* Override any GCC internal prototype to avoid an error.
22867 Use char because int might match the return type of a GCC
22868 builtin and then its argument prototype would still apply. */
22869 #ifdef __cplusplus
22870 extern "C"
22871 #endif
22872 char inet_ntop ();
22873 int
22874 main ()
22875 {
22876 return inet_ntop ();
22877 ;
22878 return 0;
22879 }
22880 _ACEOF
22881 for ac_lib in '' nsl resolv network; do
22882 if test -z "$ac_lib"; then
22883 ac_res="none required"
22884 else
22885 ac_res=-l$ac_lib
22886 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22887 fi
22888 if ac_fn_c_try_link "$LINENO"; then :
22889 ac_cv_search_inet_ntop=$ac_res
22890 fi
22891 rm -f core conftest.err conftest.$ac_objext \
22892 conftest$ac_exeext
22893 if ${ac_cv_search_inet_ntop+:} false; then :
22894 break
22895 fi
22896 done
22897 if ${ac_cv_search_inet_ntop+:} false; then :
22898
22899 else
22900 ac_cv_search_inet_ntop=no
22901 fi
22902 rm conftest.$ac_ext
22903 LIBS=$ac_func_search_save_LIBS
22904 fi
22905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
22906 $as_echo "$ac_cv_search_inet_ntop" >&6; }
22907 ac_res=$ac_cv_search_inet_ntop
22908 if test "$ac_res" != no; then :
22909 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22910
22911 else
22912 for ac_func in inet_ntop
22913 do :
22914 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
22915 if test "x$ac_cv_func_inet_ntop" = xyes; then :
22916 cat >>confdefs.h <<_ACEOF
22917 #define HAVE_INET_NTOP 1
22918 _ACEOF
22919
22920 fi
22921 done
22922
22923 if test $ac_cv_func_inet_ntop = no; then
22924 HAVE_INET_NTOP=0
22925 fi
22926
22927 fi
22928
22929 LIBS=$gl_save_LIBS
22930
22931 if test "$ac_cv_search_inet_ntop" != "no" \
22932 && test "$ac_cv_search_inet_ntop" != "none required"; then
22933 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
22934 fi
22935
22936
22937 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
22938 #if HAVE_NETDB_H
22939 # include <netdb.h>
22940 #endif
22941
22942 "
22943 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
22944 ac_have_decl=1
22945 else
22946 ac_have_decl=0
22947 fi
22948
22949 cat >>confdefs.h <<_ACEOF
22950 #define HAVE_DECL_INET_NTOP $ac_have_decl
22951 _ACEOF
22952
22953 if test $ac_cv_have_decl_inet_ntop = no; then
22954 HAVE_DECL_INET_NTOP=0
22955 fi
22956 fi
22957
22958
22959 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
22960
22961
22962
22963
22964
22965
22966
22967
22968 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
22969
22970
22971
22972
22973 fi
22974
22975
22976
22977
22978
22979 GNULIB_INET_NTOP=1
22980
22981
22982
22983
22984
22985
22986
22987 PRIPTR_PREFIX=
22988 if test -n "$STDINT_H"; then
22989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22990 /* end confdefs.h. */
22991
22992 #ifdef _WIN64
22993 LLP64
22994 #endif
22995
22996 int
22997 main ()
22998 {
22999
23000 ;
23001 return 0;
23002 }
23003
23004 _ACEOF
23005 if ac_fn_c_try_compile "$LINENO"; then :
23006 PRIPTR_PREFIX='"l"'
23007 else
23008 PRIPTR_PREFIX='"ll"'
23009 fi
23010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23011 else
23012 for glpfx in '' l ll I64; do
23013 case $glpfx in
23014 '') gltype1='int';;
23015 l) gltype1='long int';;
23016 ll) gltype1='long long int';;
23017 I64) gltype1='__int64';;
23018 esac
23019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23020 /* end confdefs.h. */
23021 #include <stdint.h>
23022 extern intptr_t foo;
23023 extern $gltype1 foo;
23024 int
23025 main ()
23026 {
23027
23028 ;
23029 return 0;
23030 }
23031 _ACEOF
23032 if ac_fn_c_try_compile "$LINENO"; then :
23033 PRIPTR_PREFIX='"'$glpfx'"'
23034 fi
23035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23036 test -n "$PRIPTR_PREFIX" && break
23037 done
23038 fi
23039
23040
23041
23042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
23043 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
23044 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
23045 $as_echo_n "(cached) " >&6
23046 else
23047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23048 /* end confdefs.h. */
23049 /* Work also in C++ mode. */
23050 #define __STDC_LIMIT_MACROS 1
23051
23052 /* Work if build is not clean. */
23053 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23054
23055 #include <limits.h>
23056 #if HAVE_STDINT_H
23057 #include <stdint.h>
23058 #endif
23059
23060 #if defined INT32_MAX && defined INTMAX_MAX
23061 #define CONDITION (INT32_MAX < INTMAX_MAX)
23062 #else
23063 #define CONDITION (sizeof (int) < sizeof (long long int))
23064 #endif
23065 int test[CONDITION ? 1 : -1];
23066 int
23067 main ()
23068 {
23069
23070 ;
23071 return 0;
23072 }
23073 _ACEOF
23074 if ac_fn_c_try_compile "$LINENO"; then :
23075 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
23076 else
23077 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
23078 fi
23079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23080 fi
23081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
23082 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
23083 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
23084 INT32_MAX_LT_INTMAX_MAX=1;
23085 else
23086 INT32_MAX_LT_INTMAX_MAX=0;
23087 fi
23088
23089
23090 if test $APPLE_UNIVERSAL_BUILD = 0; then
23091
23092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
23093 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
23094 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
23095 $as_echo_n "(cached) " >&6
23096 else
23097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23098 /* end confdefs.h. */
23099 /* Work also in C++ mode. */
23100 #define __STDC_LIMIT_MACROS 1
23101
23102 /* Work if build is not clean. */
23103 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23104
23105 #include <limits.h>
23106 #if HAVE_STDINT_H
23107 #include <stdint.h>
23108 #endif
23109
23110 #if defined INT64_MAX
23111 #define CONDITION (INT64_MAX == LONG_MAX)
23112 #else
23113 #define CONDITION (sizeof (long long int) == sizeof (long int))
23114 #endif
23115 int test[CONDITION ? 1 : -1];
23116 int
23117 main ()
23118 {
23119
23120 ;
23121 return 0;
23122 }
23123 _ACEOF
23124 if ac_fn_c_try_compile "$LINENO"; then :
23125 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
23126 else
23127 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
23128 fi
23129 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23130 fi
23131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
23132 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
23133 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
23134 INT64_MAX_EQ_LONG_MAX=1;
23135 else
23136 INT64_MAX_EQ_LONG_MAX=0;
23137 fi
23138
23139
23140 else
23141 INT64_MAX_EQ_LONG_MAX=-1
23142 fi
23143
23144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
23145 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
23146 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
23147 $as_echo_n "(cached) " >&6
23148 else
23149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23150 /* end confdefs.h. */
23151 /* Work also in C++ mode. */
23152 #define __STDC_LIMIT_MACROS 1
23153
23154 /* Work if build is not clean. */
23155 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23156
23157 #include <limits.h>
23158 #if HAVE_STDINT_H
23159 #include <stdint.h>
23160 #endif
23161
23162 #if defined UINT32_MAX && defined UINTMAX_MAX
23163 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
23164 #else
23165 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
23166 #endif
23167 int test[CONDITION ? 1 : -1];
23168 int
23169 main ()
23170 {
23171
23172 ;
23173 return 0;
23174 }
23175 _ACEOF
23176 if ac_fn_c_try_compile "$LINENO"; then :
23177 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
23178 else
23179 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
23180 fi
23181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23182 fi
23183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
23184 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
23185 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
23186 UINT32_MAX_LT_UINTMAX_MAX=1;
23187 else
23188 UINT32_MAX_LT_UINTMAX_MAX=0;
23189 fi
23190
23191
23192 if test $APPLE_UNIVERSAL_BUILD = 0; then
23193
23194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
23195 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
23196 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
23197 $as_echo_n "(cached) " >&6
23198 else
23199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23200 /* end confdefs.h. */
23201 /* Work also in C++ mode. */
23202 #define __STDC_LIMIT_MACROS 1
23203
23204 /* Work if build is not clean. */
23205 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23206
23207 #include <limits.h>
23208 #if HAVE_STDINT_H
23209 #include <stdint.h>
23210 #endif
23211
23212 #if defined UINT64_MAX
23213 #define CONDITION (UINT64_MAX == ULONG_MAX)
23214 #else
23215 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
23216 #endif
23217 int test[CONDITION ? 1 : -1];
23218 int
23219 main ()
23220 {
23221
23222 ;
23223 return 0;
23224 }
23225 _ACEOF
23226 if ac_fn_c_try_compile "$LINENO"; then :
23227 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
23228 else
23229 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
23230 fi
23231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23232 fi
23233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
23234 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
23235 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
23236 UINT64_MAX_EQ_ULONG_MAX=1;
23237 else
23238 UINT64_MAX_EQ_ULONG_MAX=0;
23239 fi
23240
23241
23242 else
23243 UINT64_MAX_EQ_ULONG_MAX=-1
23244 fi
23245
23246
23247
23248
23249
23250
23251
23252
23253 if test $ac_cv_func_isblank = no; then
23254 HAVE_ISBLANK=0
23255 fi
23256
23257 if test $HAVE_ISBLANK = 0; then
23258
23259
23260
23261
23262
23263
23264
23265
23266 gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
23267
23268 fi
23269
23270
23271 cat >>confdefs.h <<_ACEOF
23272 #define GNULIB_ISBLANK 1
23273 _ACEOF
23274
23275
23276
23277
23278
23279
23280
23281 GNULIB_ISBLANK=1
23282
23283
23284
23285
23286
23287
23288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
23289 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
23290 if ${gl_cv_func_isnand_no_libm+:} false; then :
23291 $as_echo_n "(cached) " >&6
23292 else
23293
23294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23295 /* end confdefs.h. */
23296 #include <math.h>
23297 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
23298 # undef isnand
23299 # define isnand(x) __builtin_isnan ((double)(x))
23300 #else
23301 # undef isnand
23302 # define isnand(x) isnan ((double)(x))
23303 #endif
23304 double x;
23305 int
23306 main ()
23307 {
23308 return isnand (x);
23309 ;
23310 return 0;
23311 }
23312 _ACEOF
23313 if ac_fn_c_try_link "$LINENO"; then :
23314 gl_cv_func_isnand_no_libm=yes
23315 else
23316 gl_cv_func_isnand_no_libm=no
23317 fi
23318 rm -f core conftest.err conftest.$ac_objext \
23319 conftest$ac_exeext conftest.$ac_ext
23320
23321 fi
23322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
23323 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
23324
23325 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
23326 if test $gl_cv_func_isnand_no_libm = yes; then
23327
23328 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
23329
23330 fi
23331
23332 if test $gl_func_isnand_no_libm != yes; then
23333
23334
23335
23336
23337
23338
23339
23340
23341 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
23342
23343
23344
23345
23346 fi
23347
23348
23349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
23350 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
23351 if ${gl_cv_func_isnanl_no_libm+:} false; then :
23352 $as_echo_n "(cached) " >&6
23353 else
23354
23355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23356 /* end confdefs.h. */
23357 #include <math.h>
23358 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
23359 # undef isnanl
23360 # define isnanl(x) __builtin_isnan ((long double)(x))
23361 #elif defined isnan
23362 # undef isnanl
23363 # define isnanl(x) isnan ((long double)(x))
23364 #endif
23365 long double x;
23366 int
23367 main ()
23368 {
23369 return isnanl (x);
23370 ;
23371 return 0;
23372 }
23373 _ACEOF
23374 if ac_fn_c_try_link "$LINENO"; then :
23375 gl_cv_func_isnanl_no_libm=yes
23376 else
23377 gl_cv_func_isnanl_no_libm=no
23378 fi
23379 rm -f core conftest.err conftest.$ac_objext \
23380 conftest$ac_exeext conftest.$ac_ext
23381
23382 fi
23383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
23384 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
23385
23386 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
23387 if test $gl_func_isnanl_no_libm = yes; then
23388
23389
23390
23391
23392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
23393 $as_echo_n "checking whether isnanl works... " >&6; }
23394 if ${gl_cv_func_isnanl_works+:} false; then :
23395 $as_echo_n "(cached) " >&6
23396 else
23397
23398 if test "$cross_compiling" = yes; then :
23399 case "$host_os" in
23400 mingw*) # Guess yes on mingw, no on MSVC.
23401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23402 /* end confdefs.h. */
23403
23404 #ifdef __MINGW32__
23405 Known
23406 #endif
23407
23408 _ACEOF
23409 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23410 $EGREP "Known" >/dev/null 2>&1; then :
23411 gl_cv_func_isnanl_works="guessing yes"
23412 else
23413 gl_cv_func_isnanl_works="guessing no"
23414 fi
23415 rm -f conftest*
23416
23417 ;;
23418 *) gl_cv_func_isnanl_works="guessing yes" ;;
23419 esac
23420
23421 else
23422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23423 /* end confdefs.h. */
23424
23425 #include <float.h>
23426 #include <limits.h>
23427 #include <math.h>
23428 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
23429 # undef isnanl
23430 # define isnanl(x) __builtin_isnan ((long double)(x))
23431 #elif defined isnan
23432 # undef isnanl
23433 # define isnanl(x) isnan ((long double)(x))
23434 #endif
23435 #define NWORDS \
23436 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23437 typedef union { unsigned int word[NWORDS]; long double value; }
23438 memory_long_double;
23439 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
23440 runtime type conversion. */
23441 #ifdef __sgi
23442 static long double NaNl ()
23443 {
23444 double zero = 0.0;
23445 return zero / zero;
23446 }
23447 #else
23448 # define NaNl() (0.0L / 0.0L)
23449 #endif
23450 int main ()
23451 {
23452 int result = 0;
23453
23454 if (!isnanl (NaNl ()))
23455 result |= 1;
23456
23457 {
23458 memory_long_double m;
23459 unsigned int i;
23460
23461 /* The isnanl function should be immune against changes in the sign bit and
23462 in the mantissa bits. The xor operation twiddles a bit that can only be
23463 a sign bit or a mantissa bit (since the exponent never extends to
23464 bit 31). */
23465 m.value = NaNl ();
23466 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
23467 for (i = 0; i < NWORDS; i++)
23468 m.word[i] |= 1;
23469 if (!isnanl (m.value))
23470 result |= 1;
23471 }
23472
23473 #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
23474 /* Representation of an 80-bit 'long double' as an initializer for a sequence
23475 of 'unsigned int' words. */
23476 # ifdef WORDS_BIGENDIAN
23477 # define LDBL80_WORDS(exponent,manthi,mantlo) \
23478 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
23479 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
23480 (unsigned int) (mantlo) << 16 \
23481 }
23482 # else
23483 # define LDBL80_WORDS(exponent,manthi,mantlo) \
23484 { mantlo, manthi, exponent }
23485 # endif
23486 { /* Quiet NaN. */
23487 static memory_long_double x =
23488 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
23489 if (!isnanl (x.value))
23490 result |= 2;
23491 }
23492 {
23493 /* Signalling NaN. */
23494 static memory_long_double x =
23495 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
23496 if (!isnanl (x.value))
23497 result |= 2;
23498 }
23499 /* isnanl should return something even for noncanonical values. */
23500 { /* Pseudo-NaN. */
23501 static memory_long_double x =
23502 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
23503 if (isnanl (x.value) && !isnanl (x.value))
23504 result |= 4;
23505 }
23506 { /* Pseudo-Infinity. */
23507 static memory_long_double x =
23508 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
23509 if (isnanl (x.value) && !isnanl (x.value))
23510 result |= 8;
23511 }
23512 { /* Pseudo-Zero. */
23513 static memory_long_double x =
23514 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
23515 if (isnanl (x.value) && !isnanl (x.value))
23516 result |= 16;
23517 }
23518 { /* Unnormalized number. */
23519 static memory_long_double x =
23520 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
23521 if (isnanl (x.value) && !isnanl (x.value))
23522 result |= 32;
23523 }
23524 { /* Pseudo-Denormal. */
23525 static memory_long_double x =
23526 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
23527 if (isnanl (x.value) && !isnanl (x.value))
23528 result |= 64;
23529 }
23530 #endif
23531
23532 return result;
23533 }
23534 _ACEOF
23535 if ac_fn_c_try_run "$LINENO"; then :
23536 gl_cv_func_isnanl_works=yes
23537 else
23538 gl_cv_func_isnanl_works=no
23539 fi
23540 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23541 conftest.$ac_objext conftest.beam conftest.$ac_ext
23542 fi
23543
23544
23545 fi
23546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
23547 $as_echo "$gl_cv_func_isnanl_works" >&6; }
23548
23549 case "$gl_cv_func_isnanl_works" in
23550 *yes) ;;
23551 *) gl_func_isnanl_no_libm=no ;;
23552 esac
23553 fi
23554 if test $gl_func_isnanl_no_libm = yes; then
23555
23556 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
23557
23558 fi
23559
23560 if test $gl_func_isnanl_no_libm != yes; then
23561
23562
23563
23564
23565
23566
23567
23568
23569 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
23570
23571
23572
23573
23574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
23575 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
23576 if ${gl_cv_cc_long_double_expbit0+:} false; then :
23577 $as_echo_n "(cached) " >&6
23578 else
23579
23580 if test "$cross_compiling" = yes; then :
23581
23582 gl_cv_cc_long_double_expbit0="unknown"
23583 case "$host_os" in
23584 mingw*) # On native Windows (little-endian), we know the result
23585 # in two cases: mingw, MSVC.
23586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23587 /* end confdefs.h. */
23588
23589 #ifdef __MINGW32__
23590 Known
23591 #endif
23592
23593 _ACEOF
23594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23595 $EGREP "Known" >/dev/null 2>&1; then :
23596 gl_cv_cc_long_double_expbit0="word 2 bit 0"
23597 fi
23598 rm -f conftest*
23599
23600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23601 /* end confdefs.h. */
23602
23603 #ifdef _MSC_VER
23604 Known
23605 #endif
23606
23607 _ACEOF
23608 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23609 $EGREP "Known" >/dev/null 2>&1; then :
23610 gl_cv_cc_long_double_expbit0="word 1 bit 20"
23611 fi
23612 rm -f conftest*
23613
23614 ;;
23615 esac
23616
23617 else
23618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23619 /* end confdefs.h. */
23620
23621 #include <float.h>
23622 #include <stddef.h>
23623 #include <stdio.h>
23624 #include <string.h>
23625 #define NWORDS \
23626 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23627 typedef union { long double value; unsigned int word[NWORDS]; }
23628 memory_long_double;
23629 static unsigned int ored_words[NWORDS];
23630 static unsigned int anded_words[NWORDS];
23631 static void add_to_ored_words (long double *x)
23632 {
23633 memory_long_double m;
23634 size_t i;
23635 /* Clear it first, in case
23636 sizeof (long double) < sizeof (memory_long_double). */
23637 memset (&m, 0, sizeof (memory_long_double));
23638 m.value = *x;
23639 for (i = 0; i < NWORDS; i++)
23640 {
23641 ored_words[i] |= m.word[i];
23642 anded_words[i] &= m.word[i];
23643 }
23644 }
23645 int main ()
23646 {
23647 static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
23648 size_t j;
23649 FILE *fp = fopen ("conftest.out", "w");
23650 if (fp == NULL)
23651 return 1;
23652 for (j = 0; j < NWORDS; j++)
23653 anded_words[j] = ~ (unsigned int) 0;
23654 for (j = 0; j < 5; j++)
23655 add_to_ored_words (&samples[j]);
23656 /* Remove bits that are common (e.g. if representation of the first mantissa
23657 bit is explicit). */
23658 for (j = 0; j < NWORDS; j++)
23659 ored_words[j] &= ~anded_words[j];
23660 /* Now find the nonzero word. */
23661 for (j = 0; j < NWORDS; j++)
23662 if (ored_words[j] != 0)
23663 break;
23664 if (j < NWORDS)
23665 {
23666 size_t i;
23667 for (i = j + 1; i < NWORDS; i++)
23668 if (ored_words[i] != 0)
23669 {
23670 fprintf (fp, "unknown");
23671 return (fclose (fp) != 0);
23672 }
23673 for (i = 0; ; i++)
23674 if ((ored_words[j] >> i) & 1)
23675 {
23676 fprintf (fp, "word %d bit %d", (int) j, (int) i);
23677 return (fclose (fp) != 0);
23678 }
23679 }
23680 fprintf (fp, "unknown");
23681 return (fclose (fp) != 0);
23682 }
23683
23684 _ACEOF
23685 if ac_fn_c_try_run "$LINENO"; then :
23686 gl_cv_cc_long_double_expbit0=`cat conftest.out`
23687 else
23688 gl_cv_cc_long_double_expbit0="unknown"
23689 fi
23690 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23691 conftest.$ac_objext conftest.beam conftest.$ac_ext
23692 fi
23693
23694 rm -f conftest.out
23695
23696 fi
23697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
23698 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
23699 case "$gl_cv_cc_long_double_expbit0" in
23700 word*bit*)
23701 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23702 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
23703
23704 cat >>confdefs.h <<_ACEOF
23705 #define LDBL_EXPBIT0_WORD $word
23706 _ACEOF
23707
23708
23709 cat >>confdefs.h <<_ACEOF
23710 #define LDBL_EXPBIT0_BIT $bit
23711 _ACEOF
23712
23713 ;;
23714 esac
23715
23716
23717
23718 fi
23719
23720
23721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
23722 $as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
23723 if ${gl_cv_c___inline+:} false; then :
23724 $as_echo_n "(cached) " >&6
23725 else
23726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23727 /* end confdefs.h. */
23728 typedef int foo_t;
23729 static __inline foo_t foo (void) { return 0; }
23730 int
23731 main ()
23732 {
23733 return foo ();
23734 ;
23735 return 0;
23736 }
23737 _ACEOF
23738 if ac_fn_c_try_compile "$LINENO"; then :
23739 gl_cv_c___inline=yes
23740 else
23741 gl_cv_c___inline=no
23742 fi
23743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23744 fi
23745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
23746 $as_echo "$gl_cv_c___inline" >&6; }
23747 if test $gl_cv_c___inline = yes; then
23748
23749 $as_echo "#define HAVE___INLINE 1" >>confdefs.h
23750
23751 fi
23752
23753
23754
23755 if test "$ac_cv_header_winsock2_h" = yes; then
23756
23757
23758
23759
23760
23761
23762
23763
23764 gl_LIBOBJS="$gl_LIBOBJS listen.$ac_objext"
23765
23766 fi
23767
23768
23769
23770
23771
23772 GNULIB_LISTEN=1
23773
23774
23775
23776
23777
23778 $as_echo "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
23779
23780
23781
23782
23783
23784
23785 LOCALCHARSET_TESTS_ENVIRONMENT=
23786
23787
23788
23789
23790
23791
23792
23793
23794
23795
23796
23797 case "$host_os" in
23798 solaris*)
23799
23800 $as_echo "#define _LCONV_C99 1" >>confdefs.h
23801
23802 ;;
23803 esac
23804
23805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
23806 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
23807 if ${gl_cv_header_locale_h_posix2001+:} false; then :
23808 $as_echo_n "(cached) " >&6
23809 else
23810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23811 /* end confdefs.h. */
23812 #include <locale.h>
23813 int x = LC_MESSAGES;
23814 int y = sizeof (((struct lconv *) 0)->decimal_point);
23815 int
23816 main ()
23817 {
23818
23819 ;
23820 return 0;
23821 }
23822 _ACEOF
23823 if ac_fn_c_try_compile "$LINENO"; then :
23824 gl_cv_header_locale_h_posix2001=yes
23825 else
23826 gl_cv_header_locale_h_posix2001=no
23827 fi
23828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23829 fi
23830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
23831 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
23832
23833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
23834 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
23835 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
23836 $as_echo_n "(cached) " >&6
23837 else
23838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23839 /* end confdefs.h. */
23840 #include <locale.h>
23841 struct lconv l;
23842 int x = sizeof (l.decimal_point);
23843 int y = sizeof (l.int_p_cs_precedes);
23844 int
23845 main ()
23846 {
23847
23848 ;
23849 return 0;
23850 }
23851 _ACEOF
23852 if ac_fn_c_try_compile "$LINENO"; then :
23853 gl_cv_sys_struct_lconv_ok=yes
23854 else
23855 gl_cv_sys_struct_lconv_ok=no
23856 fi
23857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23858
23859 fi
23860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
23861 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
23862 if test $gl_cv_sys_struct_lconv_ok = no; then
23863 case "$host_os" in
23864 mingw*)
23865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23866 /* end confdefs.h. */
23867
23868 #ifdef _MSC_VER
23869 Special
23870 #endif
23871
23872 _ACEOF
23873 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23874 $EGREP "Special" >/dev/null 2>&1; then :
23875
23876 else
23877 REPLACE_STRUCT_LCONV=1
23878 fi
23879 rm -f conftest*
23880
23881 ;;
23882 *) REPLACE_STRUCT_LCONV=1 ;;
23883 esac
23884 fi
23885
23886
23887
23888
23889
23890
23891
23892
23893
23894 if test $gl_cv_have_include_next = yes; then
23895 gl_cv_next_locale_h='<'locale.h'>'
23896 else
23897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
23898 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
23899 if ${gl_cv_next_locale_h+:} false; then :
23900 $as_echo_n "(cached) " >&6
23901 else
23902
23903
23904
23905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23906 /* end confdefs.h. */
23907 #include <locale.h>
23908 _ACEOF
23909 case "$host_os" in
23910 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23911 *) gl_absname_cpp="$ac_cpp" ;;
23912 esac
23913
23914 case "$host_os" in
23915 mingw*)
23916 gl_dirsep_regex='[/\\]'
23917 ;;
23918 *)
23919 gl_dirsep_regex='\/'
23920 ;;
23921 esac
23922 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23923 gl_header_literal_regex=`echo 'locale.h' \
23924 | sed -e "$gl_make_literal_regex_sed"`
23925 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23926 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23927 s|^/[^/]|//&|
23928 p
23929 q
23930 }'
23931
23932 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23933 sed -n "$gl_absolute_header_sed"`
23934
23935 gl_header=$gl_cv_absolute_locale_h
23936 gl_cv_next_locale_h='"'$gl_header'"'
23937
23938
23939 fi
23940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
23941 $as_echo "$gl_cv_next_locale_h" >&6; }
23942 fi
23943 NEXT_LOCALE_H=$gl_cv_next_locale_h
23944
23945 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23946 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23947 gl_next_as_first_directive='<'locale.h'>'
23948 else
23949 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23950 gl_next_as_first_directive=$gl_cv_next_locale_h
23951 fi
23952 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964 if test "$gl_threads_api" = posix; then
23965 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
23966 # pthread_rwlock_* functions.
23967 has_rwlock=false
23968 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
23969 "
23970 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
23971 has_rwlock=true
23972
23973 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
23974
23975 fi
23976
23977 if $has_rwlock; then
23978
23979
23980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
23981 $as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
23982 if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
23983 $as_echo_n "(cached) " >&6
23984 else
23985 save_LIBS="$LIBS"
23986 LIBS="$LIBS $LIBMULTITHREAD"
23987 if test "$cross_compiling" = yes; then :
23988 case "$host_os" in
23989 # Guess no on glibc systems.
23990 *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
23991 # Guess no on musl systems.
23992 *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
23993 # Guess no on bionic systems.
23994 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
23995 # Guess yes on native Windows with the mingw-w64 winpthreads library.
23996 # Guess no on native Windows with the gnulib windows-rwlock module.
23997 mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
23998 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
23999 else
24000 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
24001 fi
24002 ;;
24003 # If we don't know, obey --enable-cross-guesses.
24004 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
24005 esac
24006
24007 else
24008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24009 /* end confdefs.h. */
24010
24011 #include <errno.h>
24012 #include <pthread.h>
24013 #include <stdlib.h>
24014 #include <unistd.h>
24015
24016 #define SUCCEED() exit (0)
24017 #define FAILURE() exit (1)
24018 #define UNEXPECTED(n) (exit (10 + (n)))
24019
24020 /* The main thread creates the waiting writer and the requesting reader threads
24021 in the default way; this guarantees that they have the same priority.
24022 We can reuse the main thread as first reader thread. */
24023
24024 static pthread_rwlock_t lock;
24025 static pthread_t reader1;
24026 static pthread_t writer;
24027 static pthread_t reader2;
24028 static pthread_t timer;
24029 /* Used to pass control from writer to reader2 and from reader2 to timer,
24030 as in a relay race.
24031 Passing control from one running thread to another running thread
24032 is most likely faster than to create the second thread. */
24033 static pthread_mutex_t baton;
24034
24035 static void *
24036 timer_func (void *ignored)
24037 {
24038 /* Step 13 (can be before or after step 12):
24039 The timer thread takes the baton, then waits a moment to make sure
24040 it can tell whether the second reader thread is blocked at step 12. */
24041 if (pthread_mutex_lock (&baton))
24042 UNEXPECTED (13);
24043 usleep (100000);
24044 /* By the time we get here, it's clear that the second reader thread is
24045 blocked at step 12. This is the desired behaviour. */
24046 SUCCEED ();
24047 }
24048
24049 static void *
24050 reader2_func (void *ignored)
24051 {
24052 int err;
24053
24054 /* Step 8 (can be before or after step 7):
24055 The second reader thread takes the baton, then waits a moment to make sure
24056 the writer thread has reached step 7. */
24057 if (pthread_mutex_lock (&baton))
24058 UNEXPECTED (8);
24059 usleep (100000);
24060 /* Step 9: The second reader thread requests the lock. */
24061 err = pthread_rwlock_tryrdlock (&lock);
24062 if (err == 0)
24063 FAILURE ();
24064 else if (err != EBUSY)
24065 UNEXPECTED (9);
24066 /* Step 10: Launch a timer, to test whether the next call blocks. */
24067 if (pthread_create (&timer, NULL, timer_func, NULL))
24068 UNEXPECTED (10);
24069 /* Step 11: Release the baton. */
24070 if (pthread_mutex_unlock (&baton))
24071 UNEXPECTED (11);
24072 /* Step 12: The second reader thread requests the lock. */
24073 err = pthread_rwlock_rdlock (&lock);
24074 if (err == 0)
24075 FAILURE ();
24076 else
24077 UNEXPECTED (12);
24078 }
24079
24080 static void *
24081 writer_func (void *ignored)
24082 {
24083 /* Step 4: Take the baton, so that the second reader thread does not go ahead
24084 too early. */
24085 if (pthread_mutex_lock (&baton))
24086 UNEXPECTED (4);
24087 /* Step 5: Create the second reader thread. */
24088 if (pthread_create (&reader2, NULL, reader2_func, NULL))
24089 UNEXPECTED (5);
24090 /* Step 6: Release the baton. */
24091 if (pthread_mutex_unlock (&baton))
24092 UNEXPECTED (6);
24093 /* Step 7: The writer thread requests the lock. */
24094 if (pthread_rwlock_wrlock (&lock))
24095 UNEXPECTED (7);
24096 return NULL;
24097 }
24098
24099 int
24100 main ()
24101 {
24102 reader1 = pthread_self ();
24103
24104 /* Step 1: The main thread initializes the lock and the baton. */
24105 if (pthread_rwlock_init (&lock, NULL))
24106 UNEXPECTED (1);
24107 if (pthread_mutex_init (&baton, NULL))
24108 UNEXPECTED (1);
24109 /* Step 2: The main thread acquires the lock as a reader. */
24110 if (pthread_rwlock_rdlock (&lock))
24111 UNEXPECTED (2);
24112 /* Step 3: Create the writer thread. */
24113 if (pthread_create (&writer, NULL, writer_func, NULL))
24114 UNEXPECTED (3);
24115 /* Job done. Go to sleep. */
24116 for (;;)
24117 {
24118 sleep (1);
24119 }
24120 }
24121
24122 _ACEOF
24123 if ac_fn_c_try_run "$LINENO"; then :
24124 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
24125 else
24126 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
24127 fi
24128 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24129 conftest.$ac_objext conftest.beam conftest.$ac_ext
24130 fi
24131
24132 LIBS="$save_LIBS"
24133
24134 fi
24135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
24136 $as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
24137 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
24138 *yes)
24139
24140 $as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
24141
24142 ;;
24143 esac
24144
24145 fi
24146 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
24147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24148 /* end confdefs.h. */
24149
24150 #include <pthread.h>
24151 int
24152 main ()
24153 {
24154
24155 #if __FreeBSD__ == 4
24156 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
24157 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
24158 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
24159 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
24160 #else
24161 int x = (int)PTHREAD_MUTEX_RECURSIVE;
24162 return !x;
24163 #endif
24164
24165 ;
24166 return 0;
24167 }
24168 _ACEOF
24169 if ac_fn_c_try_compile "$LINENO"; then :
24170
24171 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
24172
24173 fi
24174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24175 fi
24176 :
24177
24178
24179
24180 cat >>confdefs.h <<_ACEOF
24181 #define GNULIB_LOCK 1
24182 _ACEOF
24183
24184
24185
24186
24187
24188
24189 if test $ac_cv_func_lstat = yes; then
24190
24191 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
24192 solaris* | *no)
24193 REPLACE_LSTAT=1
24194 ;;
24195 esac
24196 else
24197 HAVE_LSTAT=0
24198 fi
24199
24200 if test $REPLACE_LSTAT = 1; then
24201
24202
24203
24204
24205
24206
24207
24208
24209 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
24210
24211 :
24212 fi
24213
24214
24215
24216
24217
24218 GNULIB_LSTAT=1
24219
24220
24221
24222
24223
24224 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
24225
24226
24227
24228
24229
24230
24231 if test $gl_cv_func_malloc_posix = yes; then
24232
24233 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
24234
24235 else
24236 REPLACE_MALLOC=1
24237 fi
24238
24239 if test $REPLACE_MALLOC = 1; then
24240
24241
24242
24243
24244
24245
24246
24247
24248 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
24249
24250 fi
24251
24252
24253
24254
24255
24256 GNULIB_MALLOC_POSIX=1
24257
24258
24259
24260
24261
24262 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280 if test $gl_cv_have_include_next = yes; then
24281 gl_cv_next_math_h='<'math.h'>'
24282 else
24283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
24284 $as_echo_n "checking absolute name of <math.h>... " >&6; }
24285 if ${gl_cv_next_math_h+:} false; then :
24286 $as_echo_n "(cached) " >&6
24287 else
24288
24289 if test $ac_cv_header_math_h = yes; then
24290
24291
24292
24293
24294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24295 /* end confdefs.h. */
24296 #include <math.h>
24297 _ACEOF
24298 case "$host_os" in
24299 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24300 *) gl_absname_cpp="$ac_cpp" ;;
24301 esac
24302
24303 case "$host_os" in
24304 mingw*)
24305 gl_dirsep_regex='[/\\]'
24306 ;;
24307 *)
24308 gl_dirsep_regex='\/'
24309 ;;
24310 esac
24311 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24312 gl_header_literal_regex=`echo 'math.h' \
24313 | sed -e "$gl_make_literal_regex_sed"`
24314 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24315 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24316 s|^/[^/]|//&|
24317 p
24318 q
24319 }'
24320
24321 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24322 sed -n "$gl_absolute_header_sed"`
24323
24324 gl_header=$gl_cv_absolute_math_h
24325 gl_cv_next_math_h='"'$gl_header'"'
24326 else
24327 gl_cv_next_math_h='<'math.h'>'
24328 fi
24329
24330
24331 fi
24332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
24333 $as_echo "$gl_cv_next_math_h" >&6; }
24334 fi
24335 NEXT_MATH_H=$gl_cv_next_math_h
24336
24337 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24338 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24339 gl_next_as_first_directive='<'math.h'>'
24340 else
24341 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24342 gl_next_as_first_directive=$gl_cv_next_math_h
24343 fi
24344 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
24345
24346
24347
24348
24349
24350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
24351 $as_echo_n "checking whether NAN macro works... " >&6; }
24352 if ${gl_cv_header_math_nan_works+:} false; then :
24353 $as_echo_n "(cached) " >&6
24354 else
24355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24356 /* end confdefs.h. */
24357 #include <math.h>
24358 int
24359 main ()
24360 {
24361 /* Solaris 10 has a broken definition of NAN. Other platforms
24362 fail to provide NAN, or provide it only in C99 mode; this
24363 test only needs to fail when NAN is provided but wrong. */
24364 float f = 1.0f;
24365 #ifdef NAN
24366 f = NAN;
24367 #endif
24368 return f == 0;
24369 ;
24370 return 0;
24371 }
24372 _ACEOF
24373 if ac_fn_c_try_compile "$LINENO"; then :
24374 gl_cv_header_math_nan_works=yes
24375 else
24376 gl_cv_header_math_nan_works=no
24377 fi
24378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24379 fi
24380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
24381 $as_echo "$gl_cv_header_math_nan_works" >&6; }
24382 if test $gl_cv_header_math_nan_works = no; then
24383 REPLACE_NAN=1
24384 fi
24385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
24386 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
24387 if ${gl_cv_header_math_huge_val_works+:} false; then :
24388 $as_echo_n "(cached) " >&6
24389 else
24390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24391 /* end confdefs.h. */
24392 #include <math.h>
24393 int
24394 main ()
24395 {
24396 /* Solaris 10 has a broken definition of HUGE_VAL. */
24397 double d = HUGE_VAL;
24398 return d == 0;
24399 ;
24400 return 0;
24401 }
24402 _ACEOF
24403 if ac_fn_c_try_compile "$LINENO"; then :
24404 gl_cv_header_math_huge_val_works=yes
24405 else
24406 gl_cv_header_math_huge_val_works=no
24407 fi
24408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24409 fi
24410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
24411 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
24412 if test $gl_cv_header_math_huge_val_works = no; then
24413 REPLACE_HUGE_VAL=1
24414 fi
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433 if case "$host_os" in
24434 mingw*) true ;;
24435 *) test $ac_cv_func_mbsinit = yes ;;
24436 esac \
24437 && test $ac_cv_func_mbrtowc = yes; then
24438
24439
24440
24441
24442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24443 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24444 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24445 $as_echo_n "(cached) " >&6
24446 else
24447
24448 case "$host_os" in
24449 # Guess no on AIX and OSF/1.
24450 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24451 # Guess yes otherwise.
24452 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24453 esac
24454 if test $LOCALE_JA != none; then
24455 if test "$cross_compiling" = yes; then :
24456 :
24457 else
24458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24459 /* end confdefs.h. */
24460
24461 #include <locale.h>
24462 #include <string.h>
24463 #include <wchar.h>
24464 int main ()
24465 {
24466 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24467 {
24468 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24469 mbstate_t state;
24470 wchar_t wc;
24471
24472 memset (&state, '\0', sizeof (mbstate_t));
24473 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24474 if (mbsinit (&state))
24475 return 2;
24476 }
24477 return 0;
24478 }
24479 _ACEOF
24480 if ac_fn_c_try_run "$LINENO"; then :
24481 gl_cv_func_mbrtowc_incomplete_state=yes
24482 else
24483 gl_cv_func_mbrtowc_incomplete_state=no
24484 fi
24485 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24486 conftest.$ac_objext conftest.beam conftest.$ac_ext
24487 fi
24488
24489 else
24490 if test $LOCALE_FR_UTF8 != none; then
24491 if test "$cross_compiling" = yes; then :
24492 :
24493 else
24494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24495 /* end confdefs.h. */
24496
24497 #include <locale.h>
24498 #include <string.h>
24499 #include <wchar.h>
24500 int main ()
24501 {
24502 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24503 {
24504 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
24505 mbstate_t state;
24506 wchar_t wc;
24507
24508 memset (&state, '\0', sizeof (mbstate_t));
24509 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24510 if (mbsinit (&state))
24511 return 2;
24512 }
24513 return 0;
24514 }
24515 _ACEOF
24516 if ac_fn_c_try_run "$LINENO"; then :
24517 gl_cv_func_mbrtowc_incomplete_state=yes
24518 else
24519 gl_cv_func_mbrtowc_incomplete_state=no
24520 fi
24521 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24522 conftest.$ac_objext conftest.beam conftest.$ac_ext
24523 fi
24524
24525 fi
24526 fi
24527
24528 fi
24529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24530 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24531
24532
24533
24534
24535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24536 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
24537 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
24538 $as_echo_n "(cached) " >&6
24539 else
24540
24541 case "$host_os" in
24542 # Guess no on Solaris 8.
24543 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24544 # Guess yes otherwise.
24545 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24546 esac
24547 if test $LOCALE_ZH_CN != none; then
24548 if test "$cross_compiling" = yes; then :
24549 :
24550 else
24551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24552 /* end confdefs.h. */
24553
24554 #include <locale.h>
24555 #include <stdlib.h>
24556 #include <string.h>
24557 #include <wchar.h>
24558 int main ()
24559 {
24560 /* This fails on Solaris 8:
24561 mbrtowc returns 2, and sets wc to 0x00F0.
24562 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
24563 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24564 {
24565 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24566 mbstate_t state;
24567 wchar_t wc;
24568
24569 memset (&state, '\0', sizeof (mbstate_t));
24570 if (mbrtowc (&wc, input + 3, 6, &state) != 4
24571 && mbtowc (&wc, input + 3, 6) == 4)
24572 return 2;
24573 }
24574 return 0;
24575 }
24576 _ACEOF
24577 if ac_fn_c_try_run "$LINENO"; then :
24578 gl_cv_func_mbrtowc_sanitycheck=yes
24579 else
24580 gl_cv_func_mbrtowc_sanitycheck=no
24581 fi
24582 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24583 conftest.$ac_objext conftest.beam conftest.$ac_ext
24584 fi
24585
24586 fi
24587
24588 fi
24589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24590 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24591
24592 REPLACE_MBSTATE_T=0
24593 case "$gl_cv_func_mbrtowc_incomplete_state" in
24594 *yes) ;;
24595 *) REPLACE_MBSTATE_T=1 ;;
24596 esac
24597 case "$gl_cv_func_mbrtowc_sanitycheck" in
24598 *yes) ;;
24599 *) REPLACE_MBSTATE_T=1 ;;
24600 esac
24601 else
24602 REPLACE_MBSTATE_T=1
24603 fi
24604
24605
24606
24607 if test $ac_cv_func_mbrtowc = no; then
24608 HAVE_MBRTOWC=0
24609 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
24610 #include <wchar.h>
24611
24612 "
24613 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
24614 ac_have_decl=1
24615 else
24616 ac_have_decl=0
24617 fi
24618
24619 cat >>confdefs.h <<_ACEOF
24620 #define HAVE_DECL_MBRTOWC $ac_have_decl
24621 _ACEOF
24622
24623 if test $ac_cv_have_decl_mbrtowc = yes; then
24624 REPLACE_MBRTOWC=1
24625 fi
24626 else
24627 if test $REPLACE_MBSTATE_T = 1; then
24628 REPLACE_MBRTOWC=1
24629 else
24630
24631
24632
24633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
24634 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
24635 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
24636 $as_echo_n "(cached) " >&6
24637 else
24638
24639 case "$host_os" in
24640 # Guess no on Solaris.
24641 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
24642 # Guess yes otherwise.
24643 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
24644 esac
24645 if test $LOCALE_FR_UTF8 != none; then
24646 if test "$cross_compiling" = yes; then :
24647 :
24648 else
24649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24650 /* end confdefs.h. */
24651
24652 #include <locale.h>
24653 #include <stdlib.h>
24654 #include <string.h>
24655 #include <wchar.h>
24656 int main ()
24657 {
24658 int result = 0;
24659
24660 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24661 {
24662 char input[] = "\303\237er";
24663 mbstate_t state;
24664 wchar_t wc;
24665 size_t ret;
24666
24667 memset (&state, '\0', sizeof (mbstate_t));
24668 wc = (wchar_t) 0xBADFACE;
24669 ret = mbrtowc (&wc, input, 5, &state);
24670 if (ret != 2)
24671 result |= 1;
24672 if (!mbsinit (&state))
24673 result |= 2;
24674
24675 memset (&state, '\0', sizeof (mbstate_t));
24676 ret = mbrtowc (NULL, input, 5, &state);
24677 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
24678 result |= 4;
24679 if (!mbsinit (&state))
24680 result |= 8;
24681 }
24682 return result;
24683 }
24684 _ACEOF
24685 if ac_fn_c_try_run "$LINENO"; then :
24686 gl_cv_func_mbrtowc_null_arg1=yes
24687 else
24688 gl_cv_func_mbrtowc_null_arg1=no
24689 fi
24690 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24691 conftest.$ac_objext conftest.beam conftest.$ac_ext
24692 fi
24693
24694 fi
24695
24696 fi
24697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
24698 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
24699
24700
24701
24702
24703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
24704 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
24705 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
24706 $as_echo_n "(cached) " >&6
24707 else
24708
24709 case "$host_os" in
24710 # Guess no on OSF/1.
24711 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
24712 # Guess yes otherwise.
24713 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
24714 esac
24715 if test $LOCALE_FR_UTF8 != none; then
24716 if test "$cross_compiling" = yes; then :
24717 :
24718 else
24719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24720 /* end confdefs.h. */
24721
24722 #include <locale.h>
24723 #include <string.h>
24724 #include <wchar.h>
24725 int main ()
24726 {
24727 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24728 {
24729 mbstate_t state;
24730 wchar_t wc;
24731 int ret;
24732
24733 memset (&state, '\0', sizeof (mbstate_t));
24734 wc = (wchar_t) 0xBADFACE;
24735 mbrtowc (&wc, NULL, 5, &state);
24736 /* Check that wc was not modified. */
24737 if (wc != (wchar_t) 0xBADFACE)
24738 return 2;
24739 }
24740 return 0;
24741 }
24742 _ACEOF
24743 if ac_fn_c_try_run "$LINENO"; then :
24744 gl_cv_func_mbrtowc_null_arg2=yes
24745 else
24746 gl_cv_func_mbrtowc_null_arg2=no
24747 fi
24748 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24749 conftest.$ac_objext conftest.beam conftest.$ac_ext
24750 fi
24751
24752 fi
24753
24754 fi
24755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
24756 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
24757
24758
24759
24760
24761
24762
24763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
24764 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
24765 if ${gl_cv_func_mbrtowc_retval+:} false; then :
24766 $as_echo_n "(cached) " >&6
24767 else
24768
24769 case "$host_os" in
24770 # Guess no on HP-UX, Solaris, native Windows.
24771 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
24772 # Guess yes otherwise.
24773 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
24774 esac
24775 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
24776 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
24777 if test "$cross_compiling" = yes; then :
24778 :
24779 else
24780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24781 /* end confdefs.h. */
24782
24783 #include <locale.h>
24784 #include <string.h>
24785 #include <wchar.h>
24786 int main ()
24787 {
24788 int result = 0;
24789 int found_some_locale = 0;
24790 /* This fails on Solaris. */
24791 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24792 {
24793 char input[] = "B\303\274\303\237er"; /* "Büßer" */
24794 mbstate_t state;
24795 wchar_t wc;
24796
24797 memset (&state, '\0', sizeof (mbstate_t));
24798 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24799 {
24800 input[1] = '\0';
24801 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
24802 result |= 1;
24803 }
24804 found_some_locale = 1;
24805 }
24806 /* This fails on HP-UX 11.11. */
24807 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24808 {
24809 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24810 mbstate_t state;
24811 wchar_t wc;
24812
24813 memset (&state, '\0', sizeof (mbstate_t));
24814 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24815 {
24816 input[1] = '\0';
24817 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
24818 result |= 2;
24819 }
24820 found_some_locale = 1;
24821 }
24822 /* This fails on native Windows. */
24823 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
24824 {
24825 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
24826 mbstate_t state;
24827 wchar_t wc;
24828
24829 memset (&state, '\0', sizeof (mbstate_t));
24830 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24831 {
24832 input[3] = '\0';
24833 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24834 result |= 4;
24835 }
24836 found_some_locale = 1;
24837 }
24838 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
24839 {
24840 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
24841 mbstate_t state;
24842 wchar_t wc;
24843
24844 memset (&state, '\0', sizeof (mbstate_t));
24845 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24846 {
24847 input[3] = '\0';
24848 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24849 result |= 8;
24850 }
24851 found_some_locale = 1;
24852 }
24853 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
24854 {
24855 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
24856 mbstate_t state;
24857 wchar_t wc;
24858
24859 memset (&state, '\0', sizeof (mbstate_t));
24860 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24861 {
24862 input[3] = '\0';
24863 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24864 result |= 16;
24865 }
24866 found_some_locale = 1;
24867 }
24868 return (found_some_locale ? result : 77);
24869 }
24870 _ACEOF
24871 if ac_fn_c_try_run "$LINENO"; then :
24872 gl_cv_func_mbrtowc_retval=yes
24873 else
24874 if test $? != 77; then
24875 gl_cv_func_mbrtowc_retval=no
24876 fi
24877
24878 fi
24879 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24880 conftest.$ac_objext conftest.beam conftest.$ac_ext
24881 fi
24882
24883 fi
24884
24885 fi
24886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
24887 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
24888
24889
24890
24891
24892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
24893 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
24894 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
24895 $as_echo_n "(cached) " >&6
24896 else
24897
24898 case "$host_os" in
24899 # Guess no on Solaris 8 and 9.
24900 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
24901 # Guess yes otherwise.
24902 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
24903 esac
24904 if test $LOCALE_ZH_CN != none; then
24905 if test "$cross_compiling" = yes; then :
24906 :
24907 else
24908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24909 /* end confdefs.h. */
24910
24911 #include <locale.h>
24912 #include <string.h>
24913 #include <wchar.h>
24914 int main ()
24915 {
24916 /* This fails on Solaris 8 and 9. */
24917 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24918 {
24919 mbstate_t state;
24920 wchar_t wc;
24921
24922 memset (&state, '\0', sizeof (mbstate_t));
24923 if (mbrtowc (&wc, "", 1, &state) != 0)
24924 return 2;
24925 }
24926 return 0;
24927 }
24928 _ACEOF
24929 if ac_fn_c_try_run "$LINENO"; then :
24930 gl_cv_func_mbrtowc_nul_retval=yes
24931 else
24932 gl_cv_func_mbrtowc_nul_retval=no
24933 fi
24934 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24935 conftest.$ac_objext conftest.beam conftest.$ac_ext
24936 fi
24937
24938 fi
24939
24940 fi
24941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
24942 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
24943
24944
24945
24946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
24947 $as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; }
24948 if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then :
24949 $as_echo_n "(cached) " >&6
24950 else
24951
24952 case "$host_os" in
24953 # Guess yes on native Windows.
24954 mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
24955 *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
24956 esac
24957 case "$host_os" in
24958 mingw*)
24959 if test "$cross_compiling" = yes; then :
24960 :
24961 else
24962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24963 /* end confdefs.h. */
24964
24965 #include <locale.h>
24966 #include <string.h>
24967 #include <wchar.h>
24968 int main ()
24969 {
24970 int result = 0;
24971 if (setlocale (LC_ALL, "French_France.65001") != NULL)
24972 {
24973 wchar_t wc = (wchar_t) 0xBADFACE;
24974 mbstate_t state;
24975
24976 memset (&state, '\0', sizeof (mbstate_t));
24977 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
24978 && wc != (wchar_t) 0xBADFACE)
24979 result |= 1;
24980 }
24981 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
24982 {
24983 wchar_t wc = (wchar_t) 0xBADFACE;
24984 mbstate_t state;
24985
24986 memset (&state, '\0', sizeof (mbstate_t));
24987 if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
24988 && wc != (wchar_t) 0xBADFACE)
24989 result |= 2;
24990 }
24991 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
24992 {
24993 wchar_t wc = (wchar_t) 0xBADFACE;
24994 mbstate_t state;
24995
24996 memset (&state, '\0', sizeof (mbstate_t));
24997 if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
24998 && wc != (wchar_t) 0xBADFACE)
24999 result |= 4;
25000 }
25001 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
25002 {
25003 wchar_t wc = (wchar_t) 0xBADFACE;
25004 mbstate_t state;
25005
25006 memset (&state, '\0', sizeof (mbstate_t));
25007 if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
25008 && wc != (wchar_t) 0xBADFACE)
25009 result |= 8;
25010 }
25011 return result;
25012 }
25013 _ACEOF
25014 if ac_fn_c_try_run "$LINENO"; then :
25015 gl_cv_func_mbrtowc_stores_incomplete=no
25016 else
25017 gl_cv_func_mbrtowc_stores_incomplete=yes
25018 fi
25019 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25020 conftest.$ac_objext conftest.beam conftest.$ac_ext
25021 fi
25022
25023 ;;
25024 *)
25025
25026 if test $LOCALE_FR_UTF8 != none; then
25027 if test "$cross_compiling" = yes; then :
25028 :
25029 else
25030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25031 /* end confdefs.h. */
25032
25033 #include <locale.h>
25034 #include <string.h>
25035 #include <wchar.h>
25036 int main ()
25037 {
25038 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25039 {
25040 wchar_t wc = (wchar_t) 0xBADFACE;
25041 mbstate_t state;
25042
25043 memset (&state, '\0', sizeof (mbstate_t));
25044 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
25045 && wc != (wchar_t) 0xBADFACE)
25046 return 1;
25047 }
25048 return 0;
25049 }
25050 _ACEOF
25051 if ac_fn_c_try_run "$LINENO"; then :
25052 gl_cv_func_mbrtowc_stores_incomplete=no
25053 else
25054 gl_cv_func_mbrtowc_stores_incomplete=yes
25055 fi
25056 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25057 conftest.$ac_objext conftest.beam conftest.$ac_ext
25058 fi
25059
25060 fi
25061 ;;
25062 esac
25063
25064 fi
25065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
25066 $as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
25067
25068
25069
25070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
25071 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
25072 if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
25073 $as_echo_n "(cached) " >&6
25074 else
25075
25076 case "$host_os" in
25077 # Guess no on AIX and glibc systems.
25078 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
25079 # Guess yes on native Windows.
25080 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
25081 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
25082 esac
25083 if test "$cross_compiling" = yes; then :
25084 :
25085 else
25086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25087 /* end confdefs.h. */
25088
25089 #include <wchar.h>
25090 static wchar_t wc;
25091 static mbstate_t mbs;
25092 int
25093 main (void)
25094 {
25095 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
25096 }
25097 _ACEOF
25098 if ac_fn_c_try_run "$LINENO"; then :
25099 gl_cv_func_mbrtowc_empty_input=yes
25100 else
25101 gl_cv_func_mbrtowc_empty_input=no
25102 fi
25103 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25104 conftest.$ac_objext conftest.beam conftest.$ac_ext
25105 fi
25106
25107
25108 fi
25109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
25110 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
25111
25112
25113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
25114 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
25115 if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then :
25116 $as_echo_n "(cached) " >&6
25117 else
25118
25119 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
25120
25121 if test "$cross_compiling" = yes; then :
25122 case "$host_os" in
25123 # Guess yes on native Windows.
25124 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
25125 esac
25126
25127 else
25128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25129 /* end confdefs.h. */
25130 #include <limits.h>
25131 #include <locale.h>
25132 #include <wchar.h>
25133
25134 int
25135 main ()
25136 {
25137
25138 int i;
25139 char *locale = setlocale (LC_ALL, "C");
25140 if (! locale)
25141 return 2;
25142 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
25143 {
25144 char c = i;
25145 wchar_t wc;
25146 mbstate_t mbs = { 0, };
25147 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
25148 if (1 < ss)
25149 return 3;
25150 }
25151 return 0;
25152
25153 ;
25154 return 0;
25155 }
25156 _ACEOF
25157 if ac_fn_c_try_run "$LINENO"; then :
25158 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
25159 else
25160 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
25161 fi
25162 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25163 conftest.$ac_objext conftest.beam conftest.$ac_ext
25164 fi
25165
25166
25167 fi
25168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
25169 $as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
25170
25171 case "$gl_cv_func_mbrtowc_null_arg1" in
25172 *yes) ;;
25173 *)
25174 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
25175
25176 REPLACE_MBRTOWC=1
25177 ;;
25178 esac
25179 case "$gl_cv_func_mbrtowc_null_arg2" in
25180 *yes) ;;
25181 *)
25182 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
25183
25184 REPLACE_MBRTOWC=1
25185 ;;
25186 esac
25187 case "$gl_cv_func_mbrtowc_retval" in
25188 *yes) ;;
25189 *)
25190 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
25191
25192 REPLACE_MBRTOWC=1
25193 ;;
25194 esac
25195 case "$gl_cv_func_mbrtowc_nul_retval" in
25196 *yes) ;;
25197 *)
25198 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
25199
25200 REPLACE_MBRTOWC=1
25201 ;;
25202 esac
25203 case "$gl_cv_func_mbrtowc_stores_incomplete" in
25204 *no) ;;
25205 *)
25206 $as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
25207
25208 REPLACE_MBRTOWC=1
25209 ;;
25210 esac
25211 case "$gl_cv_func_mbrtowc_empty_input" in
25212 *yes) ;;
25213 *)
25214 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
25215
25216 REPLACE_MBRTOWC=1
25217 ;;
25218 esac
25219 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
25220 *yes) ;;
25221 *)
25222 $as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
25223
25224 REPLACE_MBRTOWC=1
25225 ;;
25226 esac
25227 fi
25228 fi
25229 if test $REPLACE_MBSTATE_T = 1; then
25230 case "$host_os" in
25231 mingw*) LIB_MBRTOWC= ;;
25232 *)
25233
25234
25235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
25236 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
25237 if ${gl_cv_have_weak+:} false; then :
25238 $as_echo_n "(cached) " >&6
25239 else
25240 gl_cv_have_weak=no
25241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25242 /* end confdefs.h. */
25243 extern void xyzzy ();
25244 #pragma weak xyzzy
25245 int
25246 main ()
25247 {
25248 xyzzy();
25249 ;
25250 return 0;
25251 }
25252 _ACEOF
25253 if ac_fn_c_try_link "$LINENO"; then :
25254 gl_cv_have_weak=maybe
25255 fi
25256 rm -f core conftest.err conftest.$ac_objext \
25257 conftest$ac_exeext conftest.$ac_ext
25258 if test $gl_cv_have_weak = maybe; then
25259 if test "$cross_compiling" = yes; then :
25260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25261 /* end confdefs.h. */
25262 #ifdef __ELF__
25263 Extensible Linking Format
25264 #endif
25265
25266 _ACEOF
25267 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25268 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
25269 gl_cv_have_weak="guessing yes"
25270 else
25271 gl_cv_have_weak="guessing no"
25272 fi
25273 rm -f conftest*
25274
25275
25276 else
25277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25278 /* end confdefs.h. */
25279
25280 #include <stdio.h>
25281 #pragma weak fputs
25282 int main ()
25283 {
25284 return (fputs == NULL);
25285 }
25286 _ACEOF
25287 if ac_fn_c_try_run "$LINENO"; then :
25288 gl_cv_have_weak=yes
25289 else
25290 gl_cv_have_weak=no
25291 fi
25292 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25293 conftest.$ac_objext conftest.beam conftest.$ac_ext
25294 fi
25295
25296 fi
25297 case " $LDFLAGS " in
25298 *" -static "*) gl_cv_have_weak=no ;;
25299 esac
25300 case "$gl_cv_have_weak" in
25301 *yes)
25302 case "$host_os" in
25303 freebsd* | dragonfly*)
25304 : > conftest1.c
25305 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
25306 cat <<EOF > conftest2.c
25307 #include <pthread.h>
25308 #pragma weak pthread_mutexattr_gettype
25309 int main ()
25310 {
25311 return (pthread_mutexattr_gettype != NULL);
25312 }
25313 EOF
25314 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
25315 || gl_cv_have_weak=no
25316 rm -f conftest1.c libempty.so conftest2.c conftest
25317 ;;
25318 esac
25319 ;;
25320 esac
25321
25322 fi
25323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
25324 $as_echo "$gl_cv_have_weak" >&6; }
25325 case "$gl_cv_have_weak" in
25326 *yes)
25327
25328 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
25329
25330 ;;
25331 esac
25332
25333 case "$gl_cv_have_weak" in
25334 *yes) LIB_MBRTOWC= ;;
25335 *) LIB_MBRTOWC="$LIBPTHREAD" ;;
25336 esac
25337 ;;
25338 esac
25339 else
25340 LIB_MBRTOWC=
25341 fi
25342
25343
25344 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
25345
25346
25347
25348
25349
25350
25351
25352
25353 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
25354
25355 if test $REPLACE_MBSTATE_T = 1; then
25356
25357
25358
25359
25360
25361
25362
25363
25364 gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374 gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
25375
25376
25377
25378
25379 CFLAG_VISIBILITY=
25380 HAVE_VISIBILITY=0
25381 if test -n "$GCC"; then
25382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
25383 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
25384 if ${gl_cv_cc_vis_werror+:} false; then :
25385 $as_echo_n "(cached) " >&6
25386 else
25387 gl_save_CFLAGS="$CFLAGS"
25388 CFLAGS="$CFLAGS -Werror"
25389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25390 /* end confdefs.h. */
25391
25392 int
25393 main ()
25394 {
25395
25396 ;
25397 return 0;
25398 }
25399 _ACEOF
25400 if ac_fn_c_try_compile "$LINENO"; then :
25401 gl_cv_cc_vis_werror=yes
25402 else
25403 gl_cv_cc_vis_werror=no
25404 fi
25405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25406 CFLAGS="$gl_save_CFLAGS"
25407
25408 fi
25409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
25410 $as_echo "$gl_cv_cc_vis_werror" >&6; }
25411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
25412 $as_echo_n "checking for simple visibility declarations... " >&6; }
25413 if ${gl_cv_cc_visibility+:} false; then :
25414 $as_echo_n "(cached) " >&6
25415 else
25416 gl_save_CFLAGS="$CFLAGS"
25417 CFLAGS="$CFLAGS -fvisibility=hidden"
25418 if test $gl_cv_cc_vis_werror = yes; then
25419 CFLAGS="$CFLAGS -Werror"
25420 fi
25421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25422 /* end confdefs.h. */
25423 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
25424 extern __attribute__((__visibility__("default"))) int exportedvar;
25425 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
25426 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
25427 void dummyfunc (void) {}
25428
25429 int
25430 main ()
25431 {
25432
25433 ;
25434 return 0;
25435 }
25436 _ACEOF
25437 if ac_fn_c_try_compile "$LINENO"; then :
25438 gl_cv_cc_visibility=yes
25439 else
25440 gl_cv_cc_visibility=no
25441 fi
25442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25443 CFLAGS="$gl_save_CFLAGS"
25444
25445 fi
25446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
25447 $as_echo "$gl_cv_cc_visibility" >&6; }
25448 if test $gl_cv_cc_visibility = yes; then
25449 CFLAG_VISIBILITY="-fvisibility=hidden"
25450 HAVE_VISIBILITY=1
25451 fi
25452 fi
25453
25454
25455
25456 cat >>confdefs.h <<_ACEOF
25457 #define HAVE_VISIBILITY $HAVE_VISIBILITY
25458 _ACEOF
25459
25460
25461
25462 fi
25463
25464
25465 :
25466
25467 fi
25468
25469
25470
25471
25472
25473 GNULIB_MBRTOWC=1
25474
25475
25476
25477
25478
25479 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495 if case "$host_os" in
25496 mingw*) true ;;
25497 *) test $ac_cv_func_mbsinit = yes ;;
25498 esac \
25499 && test $ac_cv_func_mbrtowc = yes; then
25500
25501
25502
25503
25504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
25505 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
25506 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
25507 $as_echo_n "(cached) " >&6
25508 else
25509
25510 case "$host_os" in
25511 # Guess no on AIX and OSF/1.
25512 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
25513 # Guess yes otherwise.
25514 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
25515 esac
25516 if test $LOCALE_JA != none; then
25517 if test "$cross_compiling" = yes; then :
25518 :
25519 else
25520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25521 /* end confdefs.h. */
25522
25523 #include <locale.h>
25524 #include <string.h>
25525 #include <wchar.h>
25526 int main ()
25527 {
25528 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25529 {
25530 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25531 mbstate_t state;
25532 wchar_t wc;
25533
25534 memset (&state, '\0', sizeof (mbstate_t));
25535 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25536 if (mbsinit (&state))
25537 return 2;
25538 }
25539 return 0;
25540 }
25541 _ACEOF
25542 if ac_fn_c_try_run "$LINENO"; then :
25543 gl_cv_func_mbrtowc_incomplete_state=yes
25544 else
25545 gl_cv_func_mbrtowc_incomplete_state=no
25546 fi
25547 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25548 conftest.$ac_objext conftest.beam conftest.$ac_ext
25549 fi
25550
25551 else
25552 if test $LOCALE_FR_UTF8 != none; then
25553 if test "$cross_compiling" = yes; then :
25554 :
25555 else
25556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25557 /* end confdefs.h. */
25558
25559 #include <locale.h>
25560 #include <string.h>
25561 #include <wchar.h>
25562 int main ()
25563 {
25564 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25565 {
25566 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
25567 mbstate_t state;
25568 wchar_t wc;
25569
25570 memset (&state, '\0', sizeof (mbstate_t));
25571 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25572 if (mbsinit (&state))
25573 return 2;
25574 }
25575 return 0;
25576 }
25577 _ACEOF
25578 if ac_fn_c_try_run "$LINENO"; then :
25579 gl_cv_func_mbrtowc_incomplete_state=yes
25580 else
25581 gl_cv_func_mbrtowc_incomplete_state=no
25582 fi
25583 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25584 conftest.$ac_objext conftest.beam conftest.$ac_ext
25585 fi
25586
25587 fi
25588 fi
25589
25590 fi
25591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25592 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25593
25594
25595
25596
25597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25598 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25599 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25600 $as_echo_n "(cached) " >&6
25601 else
25602
25603 case "$host_os" in
25604 # Guess no on Solaris 8.
25605 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
25606 # Guess yes otherwise.
25607 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
25608 esac
25609 if test $LOCALE_ZH_CN != none; then
25610 if test "$cross_compiling" = yes; then :
25611 :
25612 else
25613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25614 /* end confdefs.h. */
25615
25616 #include <locale.h>
25617 #include <stdlib.h>
25618 #include <string.h>
25619 #include <wchar.h>
25620 int main ()
25621 {
25622 /* This fails on Solaris 8:
25623 mbrtowc returns 2, and sets wc to 0x00F0.
25624 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
25625 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25626 {
25627 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25628 mbstate_t state;
25629 wchar_t wc;
25630
25631 memset (&state, '\0', sizeof (mbstate_t));
25632 if (mbrtowc (&wc, input + 3, 6, &state) != 4
25633 && mbtowc (&wc, input + 3, 6) == 4)
25634 return 2;
25635 }
25636 return 0;
25637 }
25638 _ACEOF
25639 if ac_fn_c_try_run "$LINENO"; then :
25640 gl_cv_func_mbrtowc_sanitycheck=yes
25641 else
25642 gl_cv_func_mbrtowc_sanitycheck=no
25643 fi
25644 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25645 conftest.$ac_objext conftest.beam conftest.$ac_ext
25646 fi
25647
25648 fi
25649
25650 fi
25651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25652 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25653
25654 REPLACE_MBSTATE_T=0
25655 case "$gl_cv_func_mbrtowc_incomplete_state" in
25656 *yes) ;;
25657 *) REPLACE_MBSTATE_T=1 ;;
25658 esac
25659 case "$gl_cv_func_mbrtowc_sanitycheck" in
25660 *yes) ;;
25661 *) REPLACE_MBSTATE_T=1 ;;
25662 esac
25663 else
25664 REPLACE_MBSTATE_T=1
25665 fi
25666
25667
25668
25669 if test $ac_cv_func_mbsinit = no; then
25670 HAVE_MBSINIT=0
25671 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
25672 #include <wchar.h>
25673
25674 "
25675 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
25676 ac_have_decl=1
25677 else
25678 ac_have_decl=0
25679 fi
25680
25681 cat >>confdefs.h <<_ACEOF
25682 #define HAVE_DECL_MBSINIT $ac_have_decl
25683 _ACEOF
25684
25685 if test $ac_cv_have_decl_mbsinit = yes; then
25686 REPLACE_MBSINIT=1
25687 fi
25688 else
25689 if test $REPLACE_MBSTATE_T = 1; then
25690 REPLACE_MBSINIT=1
25691 else
25692 case "$host_os" in
25693 mingw*) REPLACE_MBSINIT=1 ;;
25694 esac
25695 fi
25696 fi
25697
25698 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
25699
25700
25701
25702
25703
25704
25705
25706
25707 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
25708
25709
25710 :
25711
25712 fi
25713
25714
25715
25716
25717
25718 GNULIB_MBSINIT=1
25719
25720
25721
25722
25723
25724 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
25738
25739 if case "$host_os" in
25740 mingw*) true ;;
25741 *) test $ac_cv_func_mbsinit = yes ;;
25742 esac \
25743 && test $ac_cv_func_mbrtowc = yes; then
25744
25745
25746
25747
25748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
25749 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
25750 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
25751 $as_echo_n "(cached) " >&6
25752 else
25753
25754 case "$host_os" in
25755 # Guess no on AIX and OSF/1.
25756 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
25757 # Guess yes otherwise.
25758 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
25759 esac
25760 if test $LOCALE_JA != none; then
25761 if test "$cross_compiling" = yes; then :
25762 :
25763 else
25764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25765 /* end confdefs.h. */
25766
25767 #include <locale.h>
25768 #include <string.h>
25769 #include <wchar.h>
25770 int main ()
25771 {
25772 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25773 {
25774 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25775 mbstate_t state;
25776 wchar_t wc;
25777
25778 memset (&state, '\0', sizeof (mbstate_t));
25779 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25780 if (mbsinit (&state))
25781 return 2;
25782 }
25783 return 0;
25784 }
25785 _ACEOF
25786 if ac_fn_c_try_run "$LINENO"; then :
25787 gl_cv_func_mbrtowc_incomplete_state=yes
25788 else
25789 gl_cv_func_mbrtowc_incomplete_state=no
25790 fi
25791 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25792 conftest.$ac_objext conftest.beam conftest.$ac_ext
25793 fi
25794
25795 else
25796 if test $LOCALE_FR_UTF8 != none; then
25797 if test "$cross_compiling" = yes; then :
25798 :
25799 else
25800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25801 /* end confdefs.h. */
25802
25803 #include <locale.h>
25804 #include <string.h>
25805 #include <wchar.h>
25806 int main ()
25807 {
25808 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25809 {
25810 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
25811 mbstate_t state;
25812 wchar_t wc;
25813
25814 memset (&state, '\0', sizeof (mbstate_t));
25815 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25816 if (mbsinit (&state))
25817 return 2;
25818 }
25819 return 0;
25820 }
25821 _ACEOF
25822 if ac_fn_c_try_run "$LINENO"; then :
25823 gl_cv_func_mbrtowc_incomplete_state=yes
25824 else
25825 gl_cv_func_mbrtowc_incomplete_state=no
25826 fi
25827 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25828 conftest.$ac_objext conftest.beam conftest.$ac_ext
25829 fi
25830
25831 fi
25832 fi
25833
25834 fi
25835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25836 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25837
25838
25839
25840
25841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25842 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25843 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25844 $as_echo_n "(cached) " >&6
25845 else
25846
25847 case "$host_os" in
25848 # Guess no on Solaris 8.
25849 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
25850 # Guess yes otherwise.
25851 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
25852 esac
25853 if test $LOCALE_ZH_CN != none; then
25854 if test "$cross_compiling" = yes; then :
25855 :
25856 else
25857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25858 /* end confdefs.h. */
25859
25860 #include <locale.h>
25861 #include <stdlib.h>
25862 #include <string.h>
25863 #include <wchar.h>
25864 int main ()
25865 {
25866 /* This fails on Solaris 8:
25867 mbrtowc returns 2, and sets wc to 0x00F0.
25868 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
25869 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25870 {
25871 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25872 mbstate_t state;
25873 wchar_t wc;
25874
25875 memset (&state, '\0', sizeof (mbstate_t));
25876 if (mbrtowc (&wc, input + 3, 6, &state) != 4
25877 && mbtowc (&wc, input + 3, 6) == 4)
25878 return 2;
25879 }
25880 return 0;
25881 }
25882 _ACEOF
25883 if ac_fn_c_try_run "$LINENO"; then :
25884 gl_cv_func_mbrtowc_sanitycheck=yes
25885 else
25886 gl_cv_func_mbrtowc_sanitycheck=no
25887 fi
25888 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25889 conftest.$ac_objext conftest.beam conftest.$ac_ext
25890 fi
25891
25892 fi
25893
25894 fi
25895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25896 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25897
25898 REPLACE_MBSTATE_T=0
25899 case "$gl_cv_func_mbrtowc_incomplete_state" in
25900 *yes) ;;
25901 *) REPLACE_MBSTATE_T=1 ;;
25902 esac
25903 case "$gl_cv_func_mbrtowc_sanitycheck" in
25904 *yes) ;;
25905 *) REPLACE_MBSTATE_T=1 ;;
25906 esac
25907 else
25908 REPLACE_MBSTATE_T=1
25909 fi
25910
25911
25912
25913 if test $ac_cv_func_mbsrtowcs = no; then
25914 HAVE_MBSRTOWCS=0
25915 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
25916 #include <wchar.h>
25917
25918 "
25919 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
25920 ac_have_decl=1
25921 else
25922 ac_have_decl=0
25923 fi
25924
25925 cat >>confdefs.h <<_ACEOF
25926 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
25927 _ACEOF
25928
25929 if test $ac_cv_have_decl_mbsrtowcs = yes; then
25930 REPLACE_MBSRTOWCS=1
25931 fi
25932 else
25933 if test $REPLACE_MBSTATE_T = 1; then
25934 REPLACE_MBSRTOWCS=1
25935 else
25936
25937
25938
25939
25940
25941
25942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
25943 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
25944 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
25945 $as_echo_n "(cached) " >&6
25946 else
25947
25948 case "$host_os" in
25949 # Guess no on HP-UX, Solaris, mingw.
25950 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
25951 # Guess yes otherwise.
25952 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
25953 esac
25954 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
25955 if test "$cross_compiling" = yes; then :
25956 :
25957 else
25958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25959 /* end confdefs.h. */
25960
25961 #include <locale.h>
25962 #include <string.h>
25963 #include <wchar.h>
25964 int main ()
25965 {
25966 int result = 0;
25967 /* Test whether the function supports a NULL destination argument.
25968 This fails on native Windows. */
25969 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
25970 {
25971 const char input[] = "\337er";
25972 const char *src = input;
25973 mbstate_t state;
25974
25975 memset (&state, '\0', sizeof (mbstate_t));
25976 if (mbsrtowcs (NULL, &src, 1, &state) != 3
25977 || src != input)
25978 result |= 1;
25979 }
25980 /* Test whether the function works when started with a conversion state
25981 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
25982 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25983 {
25984 const char input[] = "B\303\274\303\237er";
25985 mbstate_t state;
25986
25987 memset (&state, '\0', sizeof (mbstate_t));
25988 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
25989 if (!mbsinit (&state))
25990 {
25991 const char *src = input + 2;
25992 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
25993 result |= 2;
25994 }
25995 }
25996 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25997 {
25998 const char input[] = "<\306\374\313\334\270\354>";
25999 mbstate_t state;
26000
26001 memset (&state, '\0', sizeof (mbstate_t));
26002 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
26003 if (!mbsinit (&state))
26004 {
26005 const char *src = input + 4;
26006 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
26007 result |= 4;
26008 }
26009 }
26010 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
26011 {
26012 const char input[] = "B\250\271\201\060\211\070er";
26013 mbstate_t state;
26014
26015 memset (&state, '\0', sizeof (mbstate_t));
26016 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
26017 if (!mbsinit (&state))
26018 {
26019 const char *src = input + 2;
26020 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
26021 result |= 8;
26022 }
26023 }
26024 return result;
26025 }
26026 _ACEOF
26027 if ac_fn_c_try_run "$LINENO"; then :
26028 gl_cv_func_mbsrtowcs_works=yes
26029 else
26030 gl_cv_func_mbsrtowcs_works=no
26031 fi
26032 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26033 conftest.$ac_objext conftest.beam conftest.$ac_ext
26034 fi
26035
26036 fi
26037
26038 fi
26039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
26040 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
26041
26042 case "$gl_cv_func_mbsrtowcs_works" in
26043 *yes) ;;
26044 *) REPLACE_MBSRTOWCS=1 ;;
26045 esac
26046 fi
26047 fi
26048
26049 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
26050
26051
26052
26053
26054
26055
26056
26057
26058 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
26059
26060
26061
26062
26063
26064
26065
26066
26067
26068 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
26069
26070
26071 :
26072
26073 fi
26074
26075
26076
26077
26078
26079 GNULIB_MBSRTOWCS=1
26080
26081
26082
26083
26084
26085 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
26086
26087
26088
26089
26090
26091
26092 for ac_func in mbtowc
26093 do :
26094 ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
26095 if test "x$ac_cv_func_mbtowc" = xyes; then :
26096 cat >>confdefs.h <<_ACEOF
26097 #define HAVE_MBTOWC 1
26098 _ACEOF
26099
26100 fi
26101 done
26102
26103 if test $ac_cv_func_mbtowc = no; then
26104 HAVE_MBTOWC=0
26105 else
26106 if false; then
26107 REPLACE_MBTOWC=1
26108 fi
26109 fi
26110
26111 if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
26112
26113
26114
26115
26116
26117
26118
26119
26120 gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
26121
26122
26123 :
26124
26125 fi
26126
26127
26128
26129
26130
26131 GNULIB_MBTOWC=1
26132
26133
26134
26135
26136
26137 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
26138
26139
26140
26141
26142 if test $REPLACE_MEMCHR = 1; then
26143
26144
26145
26146
26147
26148
26149
26150
26151 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
26152
26153
26154 for ac_header in bp-sym.h
26155 do :
26156 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
26157 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
26158 cat >>confdefs.h <<_ACEOF
26159 #define HAVE_BP_SYM_H 1
26160 _ACEOF
26161
26162 fi
26163
26164 done
26165
26166
26167 fi
26168
26169
26170
26171
26172
26173 GNULIB_MEMCHR=1
26174
26175
26176
26177
26178
26179 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
26180
26181
26182
26183
26184
26185 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
26186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
26187 $as_echo_n "checking whether memmem works in linear time... " >&6; }
26188 if ${gl_cv_func_memmem_works_fast+:} false; then :
26189 $as_echo_n "(cached) " >&6
26190 else
26191 if test "$cross_compiling" = yes; then :
26192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26193 /* end confdefs.h. */
26194
26195 #include <features.h>
26196 #ifdef __GNU_LIBRARY__
26197 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
26198 && !defined __UCLIBC__
26199 Lucky user
26200 #endif
26201 #endif
26202 #ifdef __CYGWIN__
26203 #include <cygwin/version.h>
26204 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
26205 Lucky user
26206 #endif
26207 #endif
26208
26209 _ACEOF
26210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26211 $EGREP "Lucky user" >/dev/null 2>&1; then :
26212 gl_cv_func_memmem_works_fast="guessing yes"
26213 else
26214 gl_cv_func_memmem_works_fast="$gl_cross_guess_normal"
26215 fi
26216 rm -f conftest*
26217
26218
26219 else
26220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26221 /* end confdefs.h. */
26222
26223 #include <signal.h> /* for signal */
26224 #include <string.h> /* for memmem */
26225 #include <stdlib.h> /* for malloc */
26226 #include <unistd.h> /* for alarm */
26227 static void quit (int sig) { _exit (sig + 128); }
26228
26229 int
26230 main ()
26231 {
26232
26233 int result = 0;
26234 size_t m = 1000000;
26235 char *haystack = (char *) malloc (2 * m + 1);
26236 char *needle = (char *) malloc (m + 1);
26237 /* Failure to compile this test due to missing alarm is okay,
26238 since all such platforms (mingw) also lack memmem. */
26239 signal (SIGALRM, quit);
26240 alarm (5);
26241 /* Check for quadratic performance. */
26242 if (haystack && needle)
26243 {
26244 memset (haystack, 'A', 2 * m);
26245 haystack[2 * m] = 'B';
26246 memset (needle, 'A', m);
26247 needle[m] = 'B';
26248 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
26249 result |= 1;
26250 }
26251 /* Free allocated memory, in case some sanitizer is watching. */
26252 free (haystack);
26253 free (needle);
26254 return result;
26255
26256 ;
26257 return 0;
26258 }
26259 _ACEOF
26260 if ac_fn_c_try_run "$LINENO"; then :
26261 gl_cv_func_memmem_works_fast=yes
26262 else
26263 gl_cv_func_memmem_works_fast=no
26264 fi
26265 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26266 conftest.$ac_objext conftest.beam conftest.$ac_ext
26267 fi
26268
26269
26270 fi
26271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
26272 $as_echo "$gl_cv_func_memmem_works_fast" >&6; }
26273 case "$gl_cv_func_memmem_works_fast" in
26274 *yes) ;;
26275 *)
26276 REPLACE_MEMMEM=1
26277 ;;
26278 esac
26279 fi
26280
26281 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
26282
26283
26284
26285
26286
26287
26288
26289
26290 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
26291
26292 fi
26293
26294
26295
26296
26297 for ac_func in memmem
26298 do :
26299 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
26300 if test "x$ac_cv_func_memmem" = xyes; then :
26301 cat >>confdefs.h <<_ACEOF
26302 #define HAVE_MEMMEM 1
26303 _ACEOF
26304
26305 fi
26306 done
26307
26308 if test $ac_cv_func_memmem = yes; then
26309 HAVE_MEMMEM=1
26310 else
26311 HAVE_MEMMEM=0
26312 fi
26313
26314 if test $ac_cv_have_decl_memmem = no; then
26315 HAVE_DECL_MEMMEM=0
26316 else
26317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
26318 $as_echo_n "checking whether memmem works... " >&6; }
26319 if ${gl_cv_func_memmem_works_always+:} false; then :
26320 $as_echo_n "(cached) " >&6
26321 else
26322 if test "$cross_compiling" = yes; then :
26323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26324 /* end confdefs.h. */
26325
26326 #ifdef __GNU_LIBRARY__
26327 #include <features.h>
26328 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
26329 || __GLIBC_MINOR__ > 12)) \
26330 || (__GLIBC__ > 2)) \
26331 || defined __UCLIBC__
26332 Lucky user
26333 #endif
26334 #elif defined __CYGWIN__
26335 #include <cygwin/version.h>
26336 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
26337 Lucky user
26338 #endif
26339 #else
26340 Lucky user
26341 #endif
26342
26343 _ACEOF
26344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26345 $EGREP "Lucky user" >/dev/null 2>&1; then :
26346 gl_cv_func_memmem_works_always="guessing yes"
26347 else
26348 gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
26349 fi
26350 rm -f conftest*
26351
26352
26353 else
26354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26355 /* end confdefs.h. */
26356
26357 #include <string.h> /* for memmem */
26358 #define P "_EF_BF_BD"
26359 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
26360 #define NEEDLE P P P P P
26361
26362 int
26363 main ()
26364 {
26365
26366 int result = 0;
26367 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
26368 result |= 1;
26369 /* Check for empty needle behavior. */
26370 {
26371 const char *haystack = "AAA";
26372 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
26373 result |= 2;
26374 }
26375 return result;
26376
26377 ;
26378 return 0;
26379 }
26380 _ACEOF
26381 if ac_fn_c_try_run "$LINENO"; then :
26382 gl_cv_func_memmem_works_always=yes
26383 else
26384 gl_cv_func_memmem_works_always=no
26385 fi
26386 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26387 conftest.$ac_objext conftest.beam conftest.$ac_ext
26388 fi
26389
26390
26391 fi
26392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
26393 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
26394 case "$gl_cv_func_memmem_works_always" in
26395 *yes) ;;
26396 *)
26397 REPLACE_MEMMEM=1
26398 ;;
26399 esac
26400 fi
26401 :
26402
26403 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
26404
26405
26406
26407
26408
26409
26410
26411
26412 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
26413
26414 fi
26415
26416
26417
26418
26419
26420 GNULIB_MEMMEM=1
26421
26422
26423
26424
26425
26426 $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436 for ac_func in mempcpy
26437 do :
26438 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
26439 if test "x$ac_cv_func_mempcpy" = xyes; then :
26440 cat >>confdefs.h <<_ACEOF
26441 #define HAVE_MEMPCPY 1
26442 _ACEOF
26443
26444 fi
26445 done
26446
26447 if test $ac_cv_func_mempcpy = no; then
26448 HAVE_MEMPCPY=0
26449 fi
26450
26451 if test $HAVE_MEMPCPY = 0; then
26452
26453
26454
26455
26456
26457
26458
26459
26460 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
26461
26462
26463 :
26464
26465 fi
26466
26467
26468
26469
26470
26471 GNULIB_MEMPCPY=1
26472
26473
26474
26475
26476
26477 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
26478
26479
26480
26481
26482
26483
26484
26485
26486 if test $ac_cv_have_decl_memrchr = no; then
26487 HAVE_DECL_MEMRCHR=0
26488 fi
26489
26490 for ac_func in memrchr
26491 do :
26492 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
26493 if test "x$ac_cv_func_memrchr" = xyes; then :
26494 cat >>confdefs.h <<_ACEOF
26495 #define HAVE_MEMRCHR 1
26496 _ACEOF
26497
26498 fi
26499 done
26500
26501
26502 if test $ac_cv_func_memrchr = no; then
26503
26504
26505
26506
26507
26508
26509
26510
26511 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
26512
26513 :
26514 fi
26515
26516
26517
26518
26519
26520 GNULIB_MEMRCHR=1
26521
26522
26523
26524
26525
26526 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
26527
26528
26529
26530
26531
26532
26533
26534
26535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
26536 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
26537 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
26538 $as_echo_n "(cached) " >&6
26539 else
26540 rm -rf conftest.dir
26541 if test "$cross_compiling" = yes; then :
26542 case "$host_os" in
26543 # Guess yes on Linux systems.
26544 linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
26545 # Guess yes on glibc systems.
26546 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
26547 # Guess yes on MSVC, no on mingw.
26548 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26549 /* end confdefs.h. */
26550
26551 #ifdef _MSC_VER
26552 Known
26553 #endif
26554
26555 _ACEOF
26556 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26557 $EGREP "Known" >/dev/null 2>&1; then :
26558 gl_cv_func_mkdir_trailing_slash_works="guessing yes"
26559 else
26560 gl_cv_func_mkdir_trailing_slash_works="guessing no"
26561 fi
26562 rm -f conftest*
26563
26564 ;;
26565 # If we don't know, obey --enable-cross-guesses.
26566 *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
26567 esac
26568
26569 else
26570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26571 /* end confdefs.h. */
26572
26573 #include <sys/types.h>
26574 #include <sys/stat.h>
26575
26576
26577 $gl_mda_defines
26578
26579 int
26580 main ()
26581 {
26582 return mkdir ("conftest.dir/", 0700);
26583 ;
26584 return 0;
26585 }
26586 _ACEOF
26587 if ac_fn_c_try_run "$LINENO"; then :
26588 gl_cv_func_mkdir_trailing_slash_works=yes
26589 else
26590 gl_cv_func_mkdir_trailing_slash_works=no
26591 fi
26592 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26593 conftest.$ac_objext conftest.beam conftest.$ac_ext
26594 fi
26595
26596 rm -rf conftest.dir
26597
26598 fi
26599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
26600 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
26601 case "$gl_cv_func_mkdir_trailing_slash_works" in
26602 *yes) ;;
26603 *)
26604 REPLACE_MKDIR=1
26605 ;;
26606 esac
26607
26608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
26609 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
26610 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
26611 $as_echo_n "(cached) " >&6
26612 else
26613 rm -rf conftest.dir
26614 if test "$cross_compiling" = yes; then :
26615 case "$host_os" in
26616 # Guess yes on glibc systems.
26617 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
26618 # Guess yes on musl systems.
26619 *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
26620 # Guess no on native Windows.
26621 mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
26622 # If we don't know, obey --enable-cross-guesses.
26623 *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
26624 esac
26625
26626 else
26627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26628 /* end confdefs.h. */
26629
26630 #include <sys/types.h>
26631 #include <sys/stat.h>
26632
26633
26634 $gl_mda_defines
26635
26636 int
26637 main ()
26638 {
26639 return !mkdir ("conftest.dir/./", 0700);
26640 ;
26641 return 0;
26642 }
26643 _ACEOF
26644 if ac_fn_c_try_run "$LINENO"; then :
26645 gl_cv_func_mkdir_trailing_dot_works=yes
26646 else
26647 gl_cv_func_mkdir_trailing_dot_works=no
26648 fi
26649 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26650 conftest.$ac_objext conftest.beam conftest.$ac_ext
26651 fi
26652
26653 rm -rf conftest.dir
26654
26655
26656 fi
26657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
26658 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
26659 case "$gl_cv_func_mkdir_trailing_dot_works" in
26660 *yes) ;;
26661 *)
26662 REPLACE_MKDIR=1
26663
26664 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
26665
26666 ;;
26667 esac
26668
26669 if test $REPLACE_MKDIR = 1; then
26670
26671
26672
26673
26674
26675
26676
26677
26678 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
26679
26680 fi
26681
26682
26683
26684
26685
26686 GNULIB_MKDIR=1
26687
26688
26689
26690
26691
26692 $as_echo "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
26693
26694
26695
26696
26697
26698 for ac_func in mkdtemp
26699 do :
26700 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
26701 if test "x$ac_cv_func_mkdtemp" = xyes; then :
26702 cat >>confdefs.h <<_ACEOF
26703 #define HAVE_MKDTEMP 1
26704 _ACEOF
26705
26706 fi
26707 done
26708
26709 if test $ac_cv_func_mkdtemp = no; then
26710 HAVE_MKDTEMP=0
26711 fi
26712
26713 if test $HAVE_MKDTEMP = 0; then
26714
26715
26716
26717
26718
26719
26720
26721
26722 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
26723
26724 :
26725
26726 fi
26727
26728
26729
26730
26731
26732 GNULIB_MKDTEMP=1
26733
26734
26735
26736
26737
26738 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748 if test $ac_cv_func_mkostemp != yes; then
26749 HAVE_MKOSTEMP=0
26750 fi
26751
26752 if test $HAVE_MKOSTEMP = 0; then
26753
26754
26755
26756
26757
26758
26759
26760
26761 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
26762
26763
26764
26765 fi
26766
26767
26768 cat >>confdefs.h <<_ACEOF
26769 #define GNULIB_MKOSTEMP 1
26770 _ACEOF
26771
26772
26773
26774
26775
26776
26777
26778 GNULIB_MKOSTEMP=1
26779
26780
26781
26782
26783
26784 $as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
26785
26786
26787
26788
26789 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26790
26791
26792
26793
26794
26795
26796
26797
26798 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
26799
26800 fi
26801
26802 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26803
26804
26805
26806
26807
26808
26809
26810
26811 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
26812
26813 fi
26814
26815
26816 cat >>confdefs.h <<_ACEOF
26817 #define GNULIB_MSVC_NOTHROW 1
26818 _ACEOF
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830
26831
26832
26833 if test $gl_cv_have_include_next = yes; then
26834 gl_cv_next_netdb_h='<'netdb.h'>'
26835 else
26836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
26837 $as_echo_n "checking absolute name of <netdb.h>... " >&6; }
26838 if ${gl_cv_next_netdb_h+:} false; then :
26839 $as_echo_n "(cached) " >&6
26840 else
26841
26842 if test $ac_cv_header_netdb_h = yes; then
26843
26844
26845
26846
26847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26848 /* end confdefs.h. */
26849 #include <netdb.h>
26850 _ACEOF
26851 case "$host_os" in
26852 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26853 *) gl_absname_cpp="$ac_cpp" ;;
26854 esac
26855
26856 case "$host_os" in
26857 mingw*)
26858 gl_dirsep_regex='[/\\]'
26859 ;;
26860 *)
26861 gl_dirsep_regex='\/'
26862 ;;
26863 esac
26864 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26865 gl_header_literal_regex=`echo 'netdb.h' \
26866 | sed -e "$gl_make_literal_regex_sed"`
26867 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26868 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26869 s|^/[^/]|//&|
26870 p
26871 q
26872 }'
26873
26874 gl_cv_absolute_netdb_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26875 sed -n "$gl_absolute_header_sed"`
26876
26877 gl_header=$gl_cv_absolute_netdb_h
26878 gl_cv_next_netdb_h='"'$gl_header'"'
26879 else
26880 gl_cv_next_netdb_h='<'netdb.h'>'
26881 fi
26882
26883
26884 fi
26885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
26886 $as_echo "$gl_cv_next_netdb_h" >&6; }
26887 fi
26888 NEXT_NETDB_H=$gl_cv_next_netdb_h
26889
26890 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26891 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26892 gl_next_as_first_directive='<'netdb.h'>'
26893 else
26894 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26895 gl_next_as_first_directive=$gl_cv_next_netdb_h
26896 fi
26897 NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
26898
26899
26900
26901
26902 if test $ac_cv_header_netdb_h = yes; then
26903 HAVE_NETDB_H=1
26904 else
26905 HAVE_NETDB_H=0
26906 fi
26907
26908
26909
26910
26911
26912
26913
26914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
26915 $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
26916 if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
26917 $as_echo_n "(cached) " >&6
26918 else
26919
26920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26921 /* end confdefs.h. */
26922 #include <netinet/in.h>
26923 int
26924 main ()
26925 {
26926
26927 ;
26928 return 0;
26929 }
26930 _ACEOF
26931 if ac_fn_c_try_compile "$LINENO"; then :
26932 gl_cv_header_netinet_in_h_selfcontained=yes
26933 else
26934 gl_cv_header_netinet_in_h_selfcontained=no
26935 fi
26936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26937
26938 fi
26939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
26940 $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
26941 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
26942 NETINET_IN_H=''
26943 else
26944 NETINET_IN_H='netinet/in.h'
26945 for ac_header in netinet/in.h
26946 do :
26947 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
26948 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
26949 cat >>confdefs.h <<_ACEOF
26950 #define HAVE_NETINET_IN_H 1
26951 _ACEOF
26952
26953 fi
26954
26955 done
26956
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966 if test $gl_cv_have_include_next = yes; then
26967 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
26968 else
26969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
26970 $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
26971 if ${gl_cv_next_netinet_in_h+:} false; then :
26972 $as_echo_n "(cached) " >&6
26973 else
26974
26975 if test $ac_cv_header_netinet_in_h = yes; then
26976
26977
26978
26979
26980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26981 /* end confdefs.h. */
26982 #include <netinet/in.h>
26983 _ACEOF
26984 case "$host_os" in
26985 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26986 *) gl_absname_cpp="$ac_cpp" ;;
26987 esac
26988
26989 case "$host_os" in
26990 mingw*)
26991 gl_dirsep_regex='[/\\]'
26992 ;;
26993 *)
26994 gl_dirsep_regex='\/'
26995 ;;
26996 esac
26997 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26998 gl_header_literal_regex=`echo 'netinet/in.h' \
26999 | sed -e "$gl_make_literal_regex_sed"`
27000 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27001 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27002 s|^/[^/]|//&|
27003 p
27004 q
27005 }'
27006
27007 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27008 sed -n "$gl_absolute_header_sed"`
27009
27010 gl_header=$gl_cv_absolute_netinet_in_h
27011 gl_cv_next_netinet_in_h='"'$gl_header'"'
27012 else
27013 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
27014 fi
27015
27016
27017 fi
27018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
27019 $as_echo "$gl_cv_next_netinet_in_h" >&6; }
27020 fi
27021 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
27022
27023 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27024 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27025 gl_next_as_first_directive='<'netinet/in.h'>'
27026 else
27027 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27028 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
27029 fi
27030 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
27031
27032
27033
27034
27035 if test $ac_cv_header_netinet_in_h = yes; then
27036 HAVE_NETINET_IN_H=1
27037 else
27038 HAVE_NETINET_IN_H=0
27039 fi
27040
27041 fi
27042
27043 if test -n "$NETINET_IN_H"; then
27044 GL_GENERATE_NETINET_IN_H_TRUE=
27045 GL_GENERATE_NETINET_IN_H_FALSE='#'
27046 else
27047 GL_GENERATE_NETINET_IN_H_TRUE='#'
27048 GL_GENERATE_NETINET_IN_H_FALSE=
27049 fi
27050
27051
27052
27053
27054
27055
27056 case "$host_os" in
27057 mingw* | pw*)
27058 REPLACE_OPEN=1
27059 ;;
27060 *)
27061
27062 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
27063 REPLACE_OPEN=1
27064 fi
27065
27066
27067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
27068 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
27069 if ${gl_cv_func_open_slash+:} false; then :
27070 $as_echo_n "(cached) " >&6
27071 else
27072 # Assume that if we have lstat, we can also check symlinks.
27073 if test $ac_cv_func_lstat = yes; then
27074 touch conftest.tmp
27075 ln -s conftest.tmp conftest.lnk
27076 fi
27077 if test "$cross_compiling" = yes; then :
27078
27079 case "$host_os" in
27080 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
27081 gl_cv_func_open_slash="guessing no" ;;
27082 *)
27083 gl_cv_func_open_slash="guessing yes" ;;
27084 esac
27085
27086 else
27087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27088 /* end confdefs.h. */
27089
27090 #include <fcntl.h>
27091 #if HAVE_UNISTD_H
27092 # include <unistd.h>
27093 #endif
27094
27095
27096 $gl_mda_defines
27097
27098 int main ()
27099 {
27100 int result = 0;
27101 #if HAVE_LSTAT
27102 if (open ("conftest.lnk/", O_RDONLY) != -1)
27103 result |= 1;
27104 #endif
27105 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
27106 result |= 2;
27107 return result;
27108 }
27109 _ACEOF
27110 if ac_fn_c_try_run "$LINENO"; then :
27111 gl_cv_func_open_slash=yes
27112 else
27113 gl_cv_func_open_slash=no
27114 fi
27115 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27116 conftest.$ac_objext conftest.beam conftest.$ac_ext
27117 fi
27118
27119 rm -f conftest.sl conftest.tmp conftest.lnk
27120
27121 fi
27122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
27123 $as_echo "$gl_cv_func_open_slash" >&6; }
27124 case "$gl_cv_func_open_slash" in
27125 *no)
27126
27127 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
27128
27129 ;;
27130 esac
27131
27132 case "$gl_cv_func_open_slash" in
27133 *no)
27134 REPLACE_OPEN=1
27135 ;;
27136 esac
27137 ;;
27138 esac
27139
27140 if test $REPLACE_OPEN = 0; then
27141
27142
27143
27144 if test $ac_cv_func_fchdir = no; then
27145 HAVE_FCHDIR=0
27146 fi
27147
27148 if test $HAVE_FCHDIR = 0; then
27149 REPLACE_OPEN=1
27150 fi
27151 fi
27152
27153
27154
27155 if test $REPLACE_OPEN = 1; then
27156
27157
27158
27159
27160
27161
27162
27163
27164 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
27165
27166
27167
27168 :
27169
27170 fi
27171
27172
27173
27174
27175
27176 GNULIB_OPEN=1
27177
27178
27179
27180
27181
27182 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
27183
27184
27185
27186
27187
27188
27189
27190
27191
27192 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
27193 yes+*yes+yes)
27194 ;;
27195 yes+*)
27196 # Solaris 10 lacks O_CLOEXEC.
27197 # Solaris 9 has *at functions, but uniformly mishandles trailing
27198 # slash in all of them.
27199 REPLACE_OPENAT=1
27200 ;;
27201 *)
27202 HAVE_OPENAT=0
27203 ;;
27204 esac
27205
27206 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
27207
27208
27209
27210
27211
27212
27213
27214
27215 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
27216
27217
27218
27219 :
27220
27221 fi
27222
27223
27224 cat >>confdefs.h <<_ACEOF
27225 #define GNULIB_OPENAT 1
27226 _ACEOF
27227
27228
27229
27230
27231
27232
27233 GNULIB_OPENAT=1
27234
27235
27236
27237
27238
27239 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
27240
27241
27242
27243
27244
27245
27246 for ac_func in opendir
27247 do :
27248 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
27249 if test "x$ac_cv_func_opendir" = xyes; then :
27250 cat >>confdefs.h <<_ACEOF
27251 #define HAVE_OPENDIR 1
27252 _ACEOF
27253
27254 fi
27255 done
27256
27257 if test $ac_cv_func_opendir = no; then
27258 HAVE_OPENDIR=0
27259 fi
27260
27261
27262
27263
27264 if test $ac_cv_func_fchdir = no; then
27265 HAVE_FCHDIR=0
27266 fi
27267
27268 if test $HAVE_FCHDIR = 0; then
27269 if test $HAVE_OPENDIR = 1; then
27270 REPLACE_OPENDIR=1
27271 fi
27272 fi
27273
27274 case $host_os,$HAVE_OPENDIR in
27275 os2*,1)
27276 REPLACE_OPENDIR=1;;
27277 esac
27278
27279 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
27280
27281
27282
27283
27284
27285
27286
27287
27288 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
27289
27290 fi
27291
27292
27293
27294
27295
27296 GNULIB_OPENDIR=1
27297
27298
27299
27300
27301
27302 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
27303
27304
27305
27306
27307
27308
27309
27310
27311
27312
27313 if test $ac_cv_func_pipe != yes; then
27314 HAVE_PIPE=0
27315 fi
27316
27317 if test $HAVE_PIPE = 0; then
27318
27319
27320
27321
27322
27323
27324
27325
27326 gl_LIBOBJS="$gl_LIBOBJS pipe.$ac_objext"
27327
27328 fi
27329
27330
27331
27332
27333
27334 GNULIB_PIPE=1
27335
27336
27337
27338
27339
27340 $as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h
27341
27342
27343
27344
27345
27346
27347
27348 for ac_func in rawmemchr
27349 do :
27350 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
27351 if test "x$ac_cv_func_rawmemchr" = xyes; then :
27352 cat >>confdefs.h <<_ACEOF
27353 #define HAVE_RAWMEMCHR 1
27354 _ACEOF
27355
27356 fi
27357 done
27358
27359 if test $ac_cv_func_rawmemchr = no; then
27360 HAVE_RAWMEMCHR=0
27361 fi
27362
27363 if test $HAVE_RAWMEMCHR = 0; then
27364
27365
27366
27367
27368
27369
27370
27371
27372 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
27373
27374 :
27375 fi
27376
27377
27378
27379
27380
27381 GNULIB_RAWMEMCHR=1
27382
27383
27384
27385
27386
27387 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
27388
27389
27390
27391
27392
27393
27394 for ac_func in readdir
27395 do :
27396 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
27397 if test "x$ac_cv_func_readdir" = xyes; then :
27398 cat >>confdefs.h <<_ACEOF
27399 #define HAVE_READDIR 1
27400 _ACEOF
27401
27402 fi
27403 done
27404
27405 if test $ac_cv_func_readdir = no; then
27406 HAVE_READDIR=0
27407 fi
27408
27409 if test $HAVE_READDIR = 0; then
27410
27411
27412
27413
27414
27415
27416
27417
27418 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
27419
27420 fi
27421
27422
27423
27424
27425
27426 GNULIB_READDIR=1
27427
27428
27429
27430
27431
27432 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
27433
27434
27435
27436
27437
27438
27439 if test $ac_cv_func_readlink = no; then
27440 HAVE_READLINK=0
27441 else
27442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
27443 $as_echo_n "checking whether readlink signature is correct... " >&6; }
27444 if ${gl_cv_decl_readlink_works+:} false; then :
27445 $as_echo_n "(cached) " >&6
27446 else
27447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27448 /* end confdefs.h. */
27449 #include <unistd.h>
27450 /* Cause compilation failure if original declaration has wrong type. */
27451 ssize_t readlink (const char *, char *, size_t);
27452 int
27453 main ()
27454 {
27455
27456 ;
27457 return 0;
27458 }
27459 _ACEOF
27460 if ac_fn_c_try_compile "$LINENO"; then :
27461 gl_cv_decl_readlink_works=yes
27462 else
27463 gl_cv_decl_readlink_works=no
27464 fi
27465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27466 fi
27467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
27468 $as_echo "$gl_cv_decl_readlink_works" >&6; }
27469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
27470 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
27471 if ${gl_cv_func_readlink_trailing_slash+:} false; then :
27472 $as_echo_n "(cached) " >&6
27473 else
27474 # We have readlink, so assume ln -s works.
27475 ln -s conftest.no-such conftest.link
27476 ln -s conftest.link conftest.lnk2
27477 if test "$cross_compiling" = yes; then :
27478 case "$host_os" in
27479 # Guess yes on Linux or glibc systems.
27480 linux-* | linux | *-gnu* | gnu*)
27481 gl_cv_func_readlink_trailing_slash="guessing yes" ;;
27482 # Guess no on AIX or HP-UX.
27483 aix* | hpux*)
27484 gl_cv_func_readlink_trailing_slash="guessing no" ;;
27485 # If we don't know, obey --enable-cross-guesses.
27486 *)
27487 gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
27488 esac
27489
27490 else
27491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27492 /* end confdefs.h. */
27493 #include <unistd.h>
27494
27495 int
27496 main ()
27497 {
27498 char buf[20];
27499 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
27500 ;
27501 return 0;
27502 }
27503 _ACEOF
27504 if ac_fn_c_try_run "$LINENO"; then :
27505 gl_cv_func_readlink_trailing_slash=yes
27506 else
27507 gl_cv_func_readlink_trailing_slash=no
27508 fi
27509 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27510 conftest.$ac_objext conftest.beam conftest.$ac_ext
27511 fi
27512
27513 rm -f conftest.link conftest.lnk2
27514 fi
27515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
27516 $as_echo "$gl_cv_func_readlink_trailing_slash" >&6; }
27517 case "$gl_cv_func_readlink_trailing_slash" in
27518 *yes)
27519 if test "$gl_cv_decl_readlink_works" != yes; then
27520 REPLACE_READLINK=1
27521 fi
27522 ;;
27523 *)
27524
27525 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
27526
27527 REPLACE_READLINK=1
27528 ;;
27529 esac
27530
27531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
27532 $as_echo_n "checking whether readlink truncates results correctly... " >&6; }
27533 if ${gl_cv_func_readlink_truncate+:} false; then :
27534 $as_echo_n "(cached) " >&6
27535 else
27536 # We have readlink, so assume ln -s works.
27537 ln -s ab conftest.link
27538 if test "$cross_compiling" = yes; then :
27539 case "$host_os" in
27540 # Guess yes on Linux or glibc systems.
27541 linux-* | linux | *-gnu* | gnu*)
27542 gl_cv_func_readlink_truncate="guessing yes" ;;
27543 # Guess no on AIX or HP-UX.
27544 aix* | hpux*)
27545 gl_cv_func_readlink_truncate="guessing no" ;;
27546 # If we don't know, obey --enable-cross-guesses.
27547 *)
27548 gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
27549 esac
27550
27551 else
27552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27553 /* end confdefs.h. */
27554 #include <unistd.h>
27555
27556 int
27557 main ()
27558 {
27559 char c;
27560 return readlink ("conftest.link", &c, 1) != 1;
27561 ;
27562 return 0;
27563 }
27564 _ACEOF
27565 if ac_fn_c_try_run "$LINENO"; then :
27566 gl_cv_func_readlink_truncate=yes
27567 else
27568 gl_cv_func_readlink_truncate=no
27569 fi
27570 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27571 conftest.$ac_objext conftest.beam conftest.$ac_ext
27572 fi
27573
27574 rm -f conftest.link conftest.lnk2
27575 fi
27576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
27577 $as_echo "$gl_cv_func_readlink_truncate" >&6; }
27578 case $gl_cv_func_readlink_truncate in
27579 *yes)
27580 if test "$gl_cv_decl_readlink_works" != yes; then
27581 REPLACE_READLINK=1
27582 fi
27583 ;;
27584 *)
27585
27586 $as_echo "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
27587
27588 REPLACE_READLINK=1
27589 ;;
27590 esac
27591 fi
27592
27593 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
27594
27595
27596
27597
27598
27599
27600
27601
27602 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
27603
27604
27605 :
27606
27607 fi
27608
27609
27610
27611
27612
27613 GNULIB_READLINK=1
27614
27615
27616
27617
27618
27619 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
27620
27621
27622
27623
27624
27625
27626 if test $gl_cv_func_malloc_posix = yes; then
27627
27628 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
27629
27630 else
27631 REPLACE_REALLOC=1
27632 fi
27633
27634 if test $REPLACE_REALLOC = 1; then
27635
27636
27637
27638
27639
27640
27641
27642
27643 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
27644
27645 fi
27646
27647
27648
27649
27650
27651 GNULIB_REALLOC_POSIX=1
27652
27653
27654
27655
27656
27657 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
27658
27659
27660
27661
27662
27663
27664
27665
27666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
27667 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
27668 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
27669 $as_echo_n "(cached) " >&6
27670 else
27671 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27672 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
27673 as_fn_error $? "cannot create temporary files" "$LINENO" 5
27674 # Assume that if we have lstat, we can also check symlinks.
27675 if test $ac_cv_func_lstat = yes; then
27676 ln -s conftest.f conftest.lnk
27677 fi
27678 if test "$cross_compiling" = yes; then :
27679 case "$host_os" in
27680 # Guess yes on Linux systems.
27681 linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
27682 # Guess yes on glibc systems.
27683 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
27684 # Guess no on native Windows.
27685 mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
27686 # If we don't know, obey --enable-cross-guesses.
27687 *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
27688 esac
27689
27690 else
27691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27692 /* end confdefs.h. */
27693
27694 # include <stdio.h>
27695 # include <stdlib.h>
27696
27697 int
27698 main ()
27699 {
27700 int result = 0;
27701 if (rename ("conftest.f1", "conftest.f2/") == 0)
27702 result |= 1;
27703 if (rename ("conftest.d1", "conftest.d2/") != 0)
27704 result |= 2;
27705 #if HAVE_LSTAT
27706 if (rename ("conftest.f", "conftest.lnk/") == 0)
27707 result |= 4;
27708 #endif
27709 return result;
27710
27711 ;
27712 return 0;
27713 }
27714 _ACEOF
27715 if ac_fn_c_try_run "$LINENO"; then :
27716 gl_cv_func_rename_slash_dst_works=yes
27717 else
27718 gl_cv_func_rename_slash_dst_works=no
27719 fi
27720 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27721 conftest.$ac_objext conftest.beam conftest.$ac_ext
27722 fi
27723
27724 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27725
27726 fi
27727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
27728 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
27729 case "$gl_cv_func_rename_slash_dst_works" in
27730 *yes) ;;
27731 *)
27732 REPLACE_RENAME=1
27733
27734 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
27735
27736 ;;
27737 esac
27738
27739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
27740 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
27741 if ${gl_cv_func_rename_slash_src_works+:} false; then :
27742 $as_echo_n "(cached) " >&6
27743 else
27744 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27745 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
27746 as_fn_error $? "cannot create temporary files" "$LINENO" 5
27747 # Assume that if we have lstat, we can also check symlinks.
27748 if test $ac_cv_func_lstat = yes; then
27749 ln -s conftest.f conftest.lnk
27750 fi
27751 if test "$cross_compiling" = yes; then :
27752 case "$host_os" in
27753 # Guess yes on Linux systems.
27754 linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
27755 # Guess yes on glibc systems.
27756 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
27757 # Guess yes on native Windows.
27758 mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
27759 # If we don't know, obey --enable-cross-guesses.
27760 *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
27761 esac
27762
27763 else
27764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27765 /* end confdefs.h. */
27766
27767 # include <stdio.h>
27768 # include <stdlib.h>
27769
27770 int
27771 main ()
27772 {
27773 int result = 0;
27774 if (rename ("conftest.f1/", "conftest.d3") == 0)
27775 result |= 1;
27776 if (rename ("conftest.d1/", "conftest.d2") != 0)
27777 result |= 2;
27778 #if HAVE_LSTAT
27779 if (rename ("conftest.lnk/", "conftest.f") == 0)
27780 result |= 4;
27781 #endif
27782 return result;
27783
27784 ;
27785 return 0;
27786 }
27787 _ACEOF
27788 if ac_fn_c_try_run "$LINENO"; then :
27789 gl_cv_func_rename_slash_src_works=yes
27790 else
27791 gl_cv_func_rename_slash_src_works=no
27792 fi
27793 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27794 conftest.$ac_objext conftest.beam conftest.$ac_ext
27795 fi
27796
27797 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27798
27799 fi
27800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
27801 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
27802 case "$gl_cv_func_rename_slash_src_works" in
27803 *yes) ;;
27804 *)
27805 REPLACE_RENAME=1
27806
27807 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
27808
27809 ;;
27810 esac
27811
27812
27813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
27814 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
27815 if ${gl_cv_func_rename_link_works+:} false; then :
27816 $as_echo_n "(cached) " >&6
27817 else
27818 if test $ac_cv_func_link = yes; then
27819 if test $cross_compiling != yes; then
27820 rm -rf conftest.f conftest.f1 conftest.f2
27821 if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
27822 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
27823 if test "$cross_compiling" = yes; then :
27824 :
27825
27826 else
27827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27828 /* end confdefs.h. */
27829
27830 # include <errno.h>
27831 # include <stdio.h>
27832 # include <stdlib.h>
27833 # include <unistd.h>
27834
27835
27836 $gl_mda_defines
27837
27838 int
27839 main ()
27840 {
27841 int result = 0;
27842 if (rename ("conftest.f", "conftest.f1"))
27843 result |= 1;
27844 if (unlink ("conftest.f1"))
27845 result |= 2;
27846
27847 /* Allow either the POSIX-required behavior, where the
27848 previous rename kept conftest.f, or the (better) NetBSD
27849 behavior, where it removed conftest.f. */
27850 if (rename ("conftest.f", "conftest.f") != 0
27851 && errno != ENOENT)
27852 result |= 4;
27853
27854 if (rename ("conftest.f1", "conftest.f1") == 0)
27855 result |= 8;
27856 if (rename ("conftest.f2", "conftest.f2") != 0)
27857 result |= 16;
27858 return result;
27859
27860 ;
27861 return 0;
27862 }
27863 _ACEOF
27864 if ac_fn_c_try_run "$LINENO"; then :
27865 gl_cv_func_rename_link_works=yes
27866 else
27867 gl_cv_func_rename_link_works=no
27868 fi
27869 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27870 conftest.$ac_objext conftest.beam conftest.$ac_ext
27871 fi
27872
27873 else
27874 gl_cv_func_rename_link_works="guessing no"
27875 fi
27876 rm -rf conftest.f conftest.f1 conftest.f2
27877 else
27878 case "$host_os" in
27879 # Guess yes on Linux systems.
27880 linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
27881 # Guess yes on glibc systems.
27882 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
27883 # Guess yes on native Windows.
27884 mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
27885 # If we don't know, obey --enable-cross-guesses.
27886 *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
27887 esac
27888 fi
27889 else
27890 gl_cv_func_rename_link_works=yes
27891 fi
27892
27893 fi
27894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
27895 $as_echo "$gl_cv_func_rename_link_works" >&6; }
27896 case "$gl_cv_func_rename_link_works" in
27897 *yes) ;;
27898 *)
27899 REPLACE_RENAME=1
27900
27901 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
27902
27903 ;;
27904 esac
27905
27906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
27907 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
27908 if ${gl_cv_func_rename_dest_works+:} false; then :
27909 $as_echo_n "(cached) " >&6
27910 else
27911 rm -rf conftest.f conftest.d1 conftest.d2
27912 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
27913 as_fn_error $? "cannot create temporary files" "$LINENO" 5
27914 if test "$cross_compiling" = yes; then :
27915 case "$host_os" in
27916 # Guess yes on Linux systems.
27917 linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
27918 # Guess yes on glibc systems.
27919 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
27920 # Guess no on native Windows.
27921 mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
27922 # If we don't know, obey --enable-cross-guesses.
27923 *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
27924 esac
27925
27926 else
27927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27928 /* end confdefs.h. */
27929
27930 # include <stdio.h>
27931 # include <stdlib.h>
27932
27933 int
27934 main ()
27935 {
27936 int result = 0;
27937 if (rename ("conftest.d1", "conftest.d2") != 0)
27938 result |= 1;
27939 if (rename ("conftest.d2", "conftest.f") == 0)
27940 result |= 2;
27941 return result;
27942
27943 ;
27944 return 0;
27945 }
27946 _ACEOF
27947 if ac_fn_c_try_run "$LINENO"; then :
27948 gl_cv_func_rename_dest_works=yes
27949 else
27950 gl_cv_func_rename_dest_works=no
27951 fi
27952 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27953 conftest.$ac_objext conftest.beam conftest.$ac_ext
27954 fi
27955
27956 rm -rf conftest.f conftest.d1 conftest.d2
27957
27958 fi
27959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
27960 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
27961 case "$gl_cv_func_rename_dest_works" in
27962 *yes) ;;
27963 *)
27964 REPLACE_RENAME=1
27965
27966 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
27967
27968 ;;
27969 esac
27970
27971 if test $REPLACE_RENAME = 1; then
27972
27973
27974
27975
27976
27977
27978
27979
27980 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
27981
27982 fi
27983
27984
27985
27986
27987
27988 GNULIB_RENAME=1
27989
27990
27991
27992
27993
27994 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
27995
27996
27997
27998
27999
28000
28001 for ac_func in rewinddir
28002 do :
28003 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
28004 if test "x$ac_cv_func_rewinddir" = xyes; then :
28005 cat >>confdefs.h <<_ACEOF
28006 #define HAVE_REWINDDIR 1
28007 _ACEOF
28008
28009 fi
28010 done
28011
28012 if test $ac_cv_func_rewinddir = no; then
28013 HAVE_REWINDDIR=0
28014 fi
28015
28016 if test $HAVE_REWINDDIR = 0; then
28017
28018
28019
28020
28021
28022
28023
28024
28025 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
28026
28027 fi
28028
28029
28030
28031
28032
28033 GNULIB_REWINDDIR=1
28034
28035
28036
28037
28038
28039 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
28040
28041
28042
28043
28044
28045
28046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
28047 $as_echo_n "checking whether rmdir works... " >&6; }
28048 if ${gl_cv_func_rmdir_works+:} false; then :
28049 $as_echo_n "(cached) " >&6
28050 else
28051 mkdir conftest.dir
28052 touch conftest.file
28053 if test "$cross_compiling" = yes; then :
28054 case "$host_os" in
28055 # Guess yes on Linux systems.
28056 linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
28057 # Guess yes on glibc systems.
28058 *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
28059 # Guess no on native Windows.
28060 mingw*) gl_cv_func_rmdir_works="guessing no" ;;
28061 # If we don't know, obey --enable-cross-guesses.
28062 *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
28063 esac
28064
28065 else
28066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28067 /* end confdefs.h. */
28068 #include <stdio.h>
28069 #include <errno.h>
28070 #if HAVE_UNISTD_H
28071 # include <unistd.h>
28072 #else /* on Windows with MSVC */
28073 # include <direct.h>
28074 #endif
28075
28076
28077 $gl_mda_defines
28078
28079 int
28080 main ()
28081 {
28082 int result = 0;
28083 if (!rmdir ("conftest.file/"))
28084 result |= 1;
28085 else if (errno != ENOTDIR)
28086 result |= 2;
28087 if (!rmdir ("conftest.dir/./"))
28088 result |= 4;
28089 return result;
28090
28091 ;
28092 return 0;
28093 }
28094 _ACEOF
28095 if ac_fn_c_try_run "$LINENO"; then :
28096 gl_cv_func_rmdir_works=yes
28097 else
28098 gl_cv_func_rmdir_works=no
28099 fi
28100 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28101 conftest.$ac_objext conftest.beam conftest.$ac_ext
28102 fi
28103
28104 rm -rf conftest.dir conftest.file
28105 fi
28106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
28107 $as_echo "$gl_cv_func_rmdir_works" >&6; }
28108 case "$gl_cv_func_rmdir_works" in
28109 *yes) ;;
28110 *)
28111 REPLACE_RMDIR=1
28112 ;;
28113 esac
28114
28115 if test $REPLACE_RMDIR = 1; then
28116
28117
28118
28119
28120
28121
28122
28123
28124 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
28125
28126 fi
28127
28128
28129
28130
28131
28132 GNULIB_RMDIR=1
28133
28134
28135
28136
28137
28138 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
28139
28140
28141
28142
28143
28144
28145
28146
28147
28148
28149 if test "$ac_cv_header_winsock2_h" = yes; then
28150 REPLACE_SELECT=1
28151 else
28152
28153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
28154 $as_echo_n "checking whether select supports a 0 argument... " >&6; }
28155 if ${gl_cv_func_select_supports0+:} false; then :
28156 $as_echo_n "(cached) " >&6
28157 else
28158
28159 if test "$cross_compiling" = yes; then :
28160
28161 case "$host_os" in
28162 # Guess no on Interix.
28163 interix*) gl_cv_func_select_supports0="guessing no";;
28164 # Guess yes otherwise.
28165 *) gl_cv_func_select_supports0="guessing yes";;
28166 esac
28167
28168 else
28169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28170 /* end confdefs.h. */
28171
28172 #include <sys/types.h>
28173 #include <sys/time.h>
28174 #if HAVE_SYS_SELECT_H
28175 #include <sys/select.h>
28176 #endif
28177 int main ()
28178 {
28179 struct timeval timeout;
28180 timeout.tv_sec = 0;
28181 timeout.tv_usec = 5;
28182 return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
28183 }
28184 _ACEOF
28185 if ac_fn_c_try_run "$LINENO"; then :
28186 gl_cv_func_select_supports0=yes
28187 else
28188 gl_cv_func_select_supports0=no
28189 fi
28190 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28191 conftest.$ac_objext conftest.beam conftest.$ac_ext
28192 fi
28193
28194
28195 fi
28196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
28197 $as_echo "$gl_cv_func_select_supports0" >&6; }
28198 case "$gl_cv_func_select_supports0" in
28199 *yes) ;;
28200 *) REPLACE_SELECT=1 ;;
28201 esac
28202
28203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
28204 $as_echo_n "checking whether select detects invalid fds... " >&6; }
28205 if ${gl_cv_func_select_detects_ebadf+:} false; then :
28206 $as_echo_n "(cached) " >&6
28207 else
28208
28209 if test "$cross_compiling" = yes; then :
28210
28211 case "$host_os" in
28212 # Guess yes on Linux systems.
28213 linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
28214 # Guess yes on glibc systems.
28215 *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
28216 # If we don't know, obey --enable-cross-guesses.
28217 *) gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
28218 esac
28219
28220 else
28221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28222 /* end confdefs.h. */
28223
28224 #include <sys/types.h>
28225 #include <sys/time.h>
28226 #if HAVE_SYS_SELECT_H
28227 # include <sys/select.h>
28228 #endif
28229 #include <unistd.h>
28230 #include <errno.h>
28231
28232
28233 $gl_mda_defines
28234
28235 int
28236 main ()
28237 {
28238
28239 fd_set set;
28240 dup2(0, 16);
28241 FD_ZERO(&set);
28242 FD_SET(16, &set);
28243 close(16);
28244 struct timeval timeout;
28245 timeout.tv_sec = 0;
28246 timeout.tv_usec = 5;
28247 return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
28248
28249 ;
28250 return 0;
28251 }
28252 _ACEOF
28253 if ac_fn_c_try_run "$LINENO"; then :
28254 gl_cv_func_select_detects_ebadf=yes
28255 else
28256 gl_cv_func_select_detects_ebadf=no
28257 fi
28258 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28259 conftest.$ac_objext conftest.beam conftest.$ac_ext
28260 fi
28261
28262
28263 fi
28264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
28265 $as_echo "$gl_cv_func_select_detects_ebadf" >&6; }
28266 case $gl_cv_func_select_detects_ebadf in
28267 *yes) ;;
28268 *) REPLACE_SELECT=1 ;;
28269 esac
28270 fi
28271
28272 LIB_SELECT="$LIBSOCKET"
28273 if test $REPLACE_SELECT = 1; then
28274 case "$host_os" in
28275 mingw*)
28276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28277 /* end confdefs.h. */
28278
28279 #define WIN32_LEAN_AND_MEAN
28280 #include <windows.h>
28281 int
28282 main ()
28283 {
28284 MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
28285 return 0;
28286 }
28287 _ACEOF
28288 if ac_fn_c_try_link "$LINENO"; then :
28289
28290 else
28291 LIB_SELECT="$LIB_SELECT -luser32"
28292 fi
28293 rm -f core conftest.err conftest.$ac_objext \
28294 conftest$ac_exeext conftest.$ac_ext
28295 ;;
28296 esac
28297 fi
28298
28299
28300 if test $REPLACE_SELECT = 1; then
28301
28302
28303
28304
28305
28306
28307
28308
28309 gl_LIBOBJS="$gl_LIBOBJS select.$ac_objext"
28310
28311 fi
28312
28313
28314
28315
28316
28317 GNULIB_SELECT=1
28318
28319
28320
28321
28322
28323 $as_echo "#define GNULIB_TEST_SELECT 1" >>confdefs.h
28324
28325
28326
28327
28328
28329 if test $ac_cv_func_setenv = no; then
28330 HAVE_SETENV=0
28331 else
28332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
28333 $as_echo_n "checking whether setenv validates arguments... " >&6; }
28334 if ${gl_cv_func_setenv_works+:} false; then :
28335 $as_echo_n "(cached) " >&6
28336 else
28337 if test "$cross_compiling" = yes; then :
28338 case "$host_os" in
28339 # Guess yes on glibc systems.
28340 *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
28341 # Guess yes on musl systems.
28342 *-musl*) gl_cv_func_setenv_works="guessing yes" ;;
28343 # If we don't know, obey --enable-cross-guesses.
28344 *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
28345 esac
28346
28347 else
28348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28349 /* end confdefs.h. */
28350
28351 #include <stdlib.h>
28352 #include <errno.h>
28353 #include <string.h>
28354
28355 int
28356 main ()
28357 {
28358
28359 int result = 0;
28360 {
28361 if (setenv ("", "", 0) != -1)
28362 result |= 1;
28363 else if (errno != EINVAL)
28364 result |= 2;
28365 }
28366 {
28367 if (setenv ("a", "=", 1) != 0)
28368 result |= 4;
28369 else if (strcmp (getenv ("a"), "=") != 0)
28370 result |= 8;
28371 }
28372 return result;
28373
28374 ;
28375 return 0;
28376 }
28377 _ACEOF
28378 if ac_fn_c_try_run "$LINENO"; then :
28379 gl_cv_func_setenv_works=yes
28380 else
28381 gl_cv_func_setenv_works=no
28382 fi
28383 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28384 conftest.$ac_objext conftest.beam conftest.$ac_ext
28385 fi
28386
28387 fi
28388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
28389 $as_echo "$gl_cv_func_setenv_works" >&6; }
28390 case "$gl_cv_func_setenv_works" in
28391 *yes) ;;
28392 *)
28393 REPLACE_SETENV=1
28394 ;;
28395 esac
28396 fi
28397
28398 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
28399
28400
28401
28402
28403
28404
28405
28406
28407 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
28408
28409 fi
28410
28411
28412
28413
28414
28415 GNULIB_SETENV=1
28416
28417
28418
28419
28420
28421 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
28422
28423
28424
28425
28426
28427
28428
28429
28430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
28431 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
28432 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
28433 $as_echo_n "(cached) " >&6
28434 else
28435 case "$host_os" in
28436 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
28437 *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
28438 gl_cv_func_setlocale_null_all_mtsafe=no ;;
28439 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
28440 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
28441 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
28442 # If we don't know, obey --enable-cross-guesses.
28443 *)
28444 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
28445 esac
28446
28447 fi
28448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
28449 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
28450 case "$host_os" in
28451 mingw*) ;;
28452 *)
28453 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
28454 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
28455 fi
28456 ;;
28457 esac
28458 case "$gl_cv_func_setlocale_null_all_mtsafe" in
28459 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
28460 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
28461 esac
28462
28463 cat >>confdefs.h <<_ACEOF
28464 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
28465 _ACEOF
28466
28467
28468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
28469 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
28470 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
28471 $as_echo_n "(cached) " >&6
28472 else
28473 case "$host_os" in
28474 # Guess no on OpenBSD, AIX.
28475 openbsd* | aix*)
28476 gl_cv_func_setlocale_null_one_mtsafe=no ;;
28477 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
28478 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
28479 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
28480 # If we don't know, obey --enable-cross-guesses.
28481 *)
28482 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
28483 esac
28484
28485 fi
28486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
28487 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
28488 case "$host_os" in
28489 mingw*) ;;
28490 *)
28491 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
28492 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
28493 fi
28494 ;;
28495 esac
28496 case "$gl_cv_func_setlocale_null_one_mtsafe" in
28497 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
28498 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
28499 esac
28500
28501 cat >>confdefs.h <<_ACEOF
28502 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
28503 _ACEOF
28504
28505
28506 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
28507 case "$host_os" in
28508 mingw*) LIB_SETLOCALE_NULL= ;;
28509 *)
28510
28511
28512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
28513 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
28514 if ${gl_cv_have_weak+:} false; then :
28515 $as_echo_n "(cached) " >&6
28516 else
28517 gl_cv_have_weak=no
28518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28519 /* end confdefs.h. */
28520 extern void xyzzy ();
28521 #pragma weak xyzzy
28522 int
28523 main ()
28524 {
28525 xyzzy();
28526 ;
28527 return 0;
28528 }
28529 _ACEOF
28530 if ac_fn_c_try_link "$LINENO"; then :
28531 gl_cv_have_weak=maybe
28532 fi
28533 rm -f core conftest.err conftest.$ac_objext \
28534 conftest$ac_exeext conftest.$ac_ext
28535 if test $gl_cv_have_weak = maybe; then
28536 if test "$cross_compiling" = yes; then :
28537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28538 /* end confdefs.h. */
28539 #ifdef __ELF__
28540 Extensible Linking Format
28541 #endif
28542
28543 _ACEOF
28544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28545 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
28546 gl_cv_have_weak="guessing yes"
28547 else
28548 gl_cv_have_weak="guessing no"
28549 fi
28550 rm -f conftest*
28551
28552
28553 else
28554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28555 /* end confdefs.h. */
28556
28557 #include <stdio.h>
28558 #pragma weak fputs
28559 int main ()
28560 {
28561 return (fputs == NULL);
28562 }
28563 _ACEOF
28564 if ac_fn_c_try_run "$LINENO"; then :
28565 gl_cv_have_weak=yes
28566 else
28567 gl_cv_have_weak=no
28568 fi
28569 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28570 conftest.$ac_objext conftest.beam conftest.$ac_ext
28571 fi
28572
28573 fi
28574 case " $LDFLAGS " in
28575 *" -static "*) gl_cv_have_weak=no ;;
28576 esac
28577 case "$gl_cv_have_weak" in
28578 *yes)
28579 case "$host_os" in
28580 freebsd* | dragonfly*)
28581 : > conftest1.c
28582 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
28583 cat <<EOF > conftest2.c
28584 #include <pthread.h>
28585 #pragma weak pthread_mutexattr_gettype
28586 int main ()
28587 {
28588 return (pthread_mutexattr_gettype != NULL);
28589 }
28590 EOF
28591 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
28592 || gl_cv_have_weak=no
28593 rm -f conftest1.c libempty.so conftest2.c conftest
28594 ;;
28595 esac
28596 ;;
28597 esac
28598
28599 fi
28600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
28601 $as_echo "$gl_cv_have_weak" >&6; }
28602 case "$gl_cv_have_weak" in
28603 *yes)
28604
28605 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
28606
28607 ;;
28608 esac
28609
28610 case "$gl_cv_have_weak" in
28611 *yes) LIB_SETLOCALE_NULL= ;;
28612 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
28613 esac
28614 ;;
28615 esac
28616 else
28617 LIB_SETLOCALE_NULL=
28618 fi
28619
28620
28621 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
28622
28623
28624
28625
28626
28627
28628
28629
28630 gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
28631
28632
28633
28634
28635 CFLAG_VISIBILITY=
28636 HAVE_VISIBILITY=0
28637 if test -n "$GCC"; then
28638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
28639 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
28640 if ${gl_cv_cc_vis_werror+:} false; then :
28641 $as_echo_n "(cached) " >&6
28642 else
28643 gl_save_CFLAGS="$CFLAGS"
28644 CFLAGS="$CFLAGS -Werror"
28645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28646 /* end confdefs.h. */
28647
28648 int
28649 main ()
28650 {
28651
28652 ;
28653 return 0;
28654 }
28655 _ACEOF
28656 if ac_fn_c_try_compile "$LINENO"; then :
28657 gl_cv_cc_vis_werror=yes
28658 else
28659 gl_cv_cc_vis_werror=no
28660 fi
28661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28662 CFLAGS="$gl_save_CFLAGS"
28663
28664 fi
28665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
28666 $as_echo "$gl_cv_cc_vis_werror" >&6; }
28667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
28668 $as_echo_n "checking for simple visibility declarations... " >&6; }
28669 if ${gl_cv_cc_visibility+:} false; then :
28670 $as_echo_n "(cached) " >&6
28671 else
28672 gl_save_CFLAGS="$CFLAGS"
28673 CFLAGS="$CFLAGS -fvisibility=hidden"
28674 if test $gl_cv_cc_vis_werror = yes; then
28675 CFLAGS="$CFLAGS -Werror"
28676 fi
28677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28678 /* end confdefs.h. */
28679 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
28680 extern __attribute__((__visibility__("default"))) int exportedvar;
28681 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
28682 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
28683 void dummyfunc (void) {}
28684
28685 int
28686 main ()
28687 {
28688
28689 ;
28690 return 0;
28691 }
28692 _ACEOF
28693 if ac_fn_c_try_compile "$LINENO"; then :
28694 gl_cv_cc_visibility=yes
28695 else
28696 gl_cv_cc_visibility=no
28697 fi
28698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28699 CFLAGS="$gl_save_CFLAGS"
28700
28701 fi
28702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
28703 $as_echo "$gl_cv_cc_visibility" >&6; }
28704 if test $gl_cv_cc_visibility = yes; then
28705 CFLAG_VISIBILITY="-fvisibility=hidden"
28706 HAVE_VISIBILITY=1
28707 fi
28708 fi
28709
28710
28711
28712 cat >>confdefs.h <<_ACEOF
28713 #define HAVE_VISIBILITY $HAVE_VISIBILITY
28714 _ACEOF
28715
28716
28717
28718 fi
28719
28720
28721
28722
28723
28724 GNULIB_SETLOCALE_NULL=1
28725
28726
28727
28728
28729
28730 $as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
28731
28732
28733
28734
28735 if test "$ac_cv_header_winsock2_h" = yes; then
28736
28737
28738
28739
28740
28741
28742
28743
28744 gl_LIBOBJS="$gl_LIBOBJS setsockopt.$ac_objext"
28745
28746 fi
28747
28748
28749
28750
28751
28752 GNULIB_SETSOCKOPT=1
28753
28754
28755
28756
28757
28758 $as_echo "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773 if test $gl_cv_have_include_next = yes; then
28774 gl_cv_next_signal_h='<'signal.h'>'
28775 else
28776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
28777 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
28778 if ${gl_cv_next_signal_h+:} false; then :
28779 $as_echo_n "(cached) " >&6
28780 else
28781
28782
28783
28784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28785 /* end confdefs.h. */
28786 #include <signal.h>
28787 _ACEOF
28788 case "$host_os" in
28789 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28790 *) gl_absname_cpp="$ac_cpp" ;;
28791 esac
28792
28793 case "$host_os" in
28794 mingw*)
28795 gl_dirsep_regex='[/\\]'
28796 ;;
28797 *)
28798 gl_dirsep_regex='\/'
28799 ;;
28800 esac
28801 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28802 gl_header_literal_regex=`echo 'signal.h' \
28803 | sed -e "$gl_make_literal_regex_sed"`
28804 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28805 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28806 s|^/[^/]|//&|
28807 p
28808 q
28809 }'
28810
28811 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28812 sed -n "$gl_absolute_header_sed"`
28813
28814 gl_header=$gl_cv_absolute_signal_h
28815 gl_cv_next_signal_h='"'$gl_header'"'
28816
28817
28818 fi
28819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
28820 $as_echo "$gl_cv_next_signal_h" >&6; }
28821 fi
28822 NEXT_SIGNAL_H=$gl_cv_next_signal_h
28823
28824 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28825 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28826 gl_next_as_first_directive='<'signal.h'>'
28827 else
28828 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28829 gl_next_as_first_directive=$gl_cv_next_signal_h
28830 fi
28831 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
28832
28833
28834
28835
28836
28837 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
28838 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
28839 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
28840 #include <signal.h>
28841
28842 "
28843 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
28844
28845 else
28846 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
28847 fi
28848
28849
28850
28851
28852
28853
28854
28855 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
28856 #include <signal.h>
28857
28858 "
28859 if test "x$ac_cv_type_sighandler_t" = xyes; then :
28860
28861 else
28862 HAVE_SIGHANDLER_T=0
28863 fi
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873 if test "$ac_cv_header_winsock2_h" = yes; then
28874
28875
28876
28877
28878
28879
28880
28881
28882 gl_LIBOBJS="$gl_LIBOBJS socket.$ac_objext"
28883
28884 fi
28885 # When this module is used, sockets may actually occur as file descriptors,
28886 # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
28887
28888
28889
28890 if test "$ac_cv_header_winsock2_h" = yes; then
28891 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
28892 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
28893 fi
28894
28895
28896
28897
28898
28899 GNULIB_SOCKET=1
28900
28901
28902
28903
28904
28905 $as_echo "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
28906
28907
28908
28909
28910
28911 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
28912 /* <sys/types.h> is not needed according to POSIX, but the
28913 <sys/socket.h> in i386-unknown-freebsd4.10 and
28914 powerpc-apple-darwin5.5 required it. */
28915 #include <sys/types.h>
28916 #if HAVE_SYS_SOCKET_H
28917 # include <sys/socket.h>
28918 #elif HAVE_WS2TCPIP_H
28919 # include <ws2tcpip.h>
28920 #endif
28921
28922 "
28923 if test "x$ac_cv_type_socklen_t" = xyes; then :
28924
28925 else
28926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
28927 $as_echo_n "checking for socklen_t equivalent... " >&6; }
28928 if ${gl_cv_socklen_t_equiv+:} false; then :
28929 $as_echo_n "(cached) " >&6
28930 else
28931 # Systems have either "struct sockaddr *" or
28932 # "void *" as the second argument to getpeername
28933 gl_cv_socklen_t_equiv=
28934 for arg2 in "struct sockaddr" void; do
28935 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
28936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28937 /* end confdefs.h. */
28938 #include <sys/types.h>
28939 #include <sys/socket.h>
28940
28941 int getpeername (int, $arg2 *, $t *);
28942 int
28943 main ()
28944 {
28945 $t len;
28946 getpeername (0, 0, &len);
28947 ;
28948 return 0;
28949 }
28950 _ACEOF
28951 if ac_fn_c_try_compile "$LINENO"; then :
28952 gl_cv_socklen_t_equiv="$t"
28953 fi
28954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28955 test "$gl_cv_socklen_t_equiv" != "" && break
28956 done
28957 test "$gl_cv_socklen_t_equiv" != "" && break
28958 done
28959 if test "$gl_cv_socklen_t_equiv" = ""; then
28960 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
28961 fi
28962
28963 fi
28964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
28965 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
28966
28967 cat >>confdefs.h <<_ACEOF
28968 #define socklen_t $gl_cv_socklen_t_equiv
28969 _ACEOF
28970
28971 fi
28972
28973
28974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
28975 $as_echo_n "checking for ssize_t... " >&6; }
28976 if ${gt_cv_ssize_t+:} false; then :
28977 $as_echo_n "(cached) " >&6
28978 else
28979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28980 /* end confdefs.h. */
28981 #include <sys/types.h>
28982 int
28983 main ()
28984 {
28985 int x = sizeof (ssize_t *) + sizeof (ssize_t);
28986 return !x;
28987 ;
28988 return 0;
28989 }
28990 _ACEOF
28991 if ac_fn_c_try_compile "$LINENO"; then :
28992 gt_cv_ssize_t=yes
28993 else
28994 gt_cv_ssize_t=no
28995 fi
28996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28997 fi
28998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
28999 $as_echo "$gt_cv_ssize_t" >&6; }
29000 if test $gt_cv_ssize_t = no; then
29001
29002 $as_echo "#define ssize_t int" >>confdefs.h
29003
29004 fi
29005
29006
29007
29008
29009
29010 case "$host_os" in
29011 mingw*)
29012 ;;
29013 *)
29014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
29015 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
29016 if ${gl_cv_func_stat_file_slash+:} false; then :
29017 $as_echo_n "(cached) " >&6
29018 else
29019 touch conftest.tmp
29020 # Assume that if we have lstat, we can also check symlinks.
29021 if test $ac_cv_func_lstat = yes; then
29022 ln -s conftest.tmp conftest.lnk
29023 fi
29024 if test "$cross_compiling" = yes; then :
29025 case "$host_os" in
29026 # Guess yes on Linux systems.
29027 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
29028 # Guess yes on glibc systems.
29029 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
29030 # If we don't know, obey --enable-cross-guesses.
29031 *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
29032 esac
29033
29034 else
29035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29036 /* end confdefs.h. */
29037 #include <sys/stat.h>
29038
29039 int
29040 main ()
29041 {
29042 int result = 0;
29043 struct stat st;
29044 if (!stat ("conftest.tmp/", &st))
29045 result |= 1;
29046 #if HAVE_LSTAT
29047 if (!stat ("conftest.lnk/", &st))
29048 result |= 2;
29049 #endif
29050 return result;
29051
29052 ;
29053 return 0;
29054 }
29055 _ACEOF
29056 if ac_fn_c_try_run "$LINENO"; then :
29057 gl_cv_func_stat_file_slash=yes
29058 else
29059 gl_cv_func_stat_file_slash=no
29060 fi
29061 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29062 conftest.$ac_objext conftest.beam conftest.$ac_ext
29063 fi
29064
29065 rm -f conftest.tmp conftest.lnk
29066 fi
29067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
29068 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
29069 case $gl_cv_func_stat_file_slash in
29070 *no)
29071 REPLACE_STAT=1
29072
29073 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
29074 ;;
29075 esac
29076 case $host_os in
29077 solaris*)
29078 REPLACE_FSTAT=1 ;;
29079 esac
29080 ;;
29081 esac
29082
29083 if test $REPLACE_STAT = 1; then
29084
29085
29086
29087
29088
29089
29090
29091
29092 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
29093
29094 case "$host_os" in
29095 mingw*)
29096
29097
29098
29099
29100
29101
29102
29103
29104 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
29105
29106 ;;
29107 esac
29108
29109
29110
29111 :
29112
29113 fi
29114
29115
29116
29117
29118
29119 GNULIB_STAT=1
29120
29121
29122
29123
29124
29125 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
29126
29127
29128
29129
29130
29131
29132
29133 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>
29134 #include <sys/stat.h>
29135 "
29136 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
29137
29138 cat >>confdefs.h <<_ACEOF
29139 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
29140 _ACEOF
29141
29142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
29143 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
29144 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
29145 $as_echo_n "(cached) " >&6
29146 else
29147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29148 /* end confdefs.h. */
29149
29150 #include <sys/types.h>
29151 #include <sys/stat.h>
29152 #if HAVE_SYS_TIME_H
29153 # include <sys/time.h>
29154 #endif
29155 #include <time.h>
29156 struct timespec ts;
29157 struct stat st;
29158
29159 int
29160 main ()
29161 {
29162
29163 st.st_atim = ts;
29164
29165 ;
29166 return 0;
29167 }
29168 _ACEOF
29169 if ac_fn_c_try_compile "$LINENO"; then :
29170 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
29171 else
29172 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
29173 fi
29174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29175 fi
29176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
29177 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
29178 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
29179
29180 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
29181
29182 fi
29183 else
29184 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>
29185 #include <sys/stat.h>
29186 "
29187 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
29188
29189 cat >>confdefs.h <<_ACEOF
29190 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
29191 _ACEOF
29192
29193
29194 else
29195 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
29196 #include <sys/stat.h>
29197 "
29198 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
29199
29200 cat >>confdefs.h <<_ACEOF
29201 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
29202 _ACEOF
29203
29204
29205 else
29206 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>
29207 #include <sys/stat.h>
29208 "
29209 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
29210
29211 cat >>confdefs.h <<_ACEOF
29212 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
29213 _ACEOF
29214
29215
29216 fi
29217
29218 fi
29219
29220 fi
29221
29222 fi
29223
29224
29225
29226
29227
29228 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>
29229 #include <sys/stat.h>
29230 "
29231 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
29232
29233 cat >>confdefs.h <<_ACEOF
29234 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
29235 _ACEOF
29236
29237
29238 else
29239 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
29240 #include <sys/stat.h>
29241 "
29242 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
29243
29244 cat >>confdefs.h <<_ACEOF
29245 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
29246 _ACEOF
29247
29248
29249 else
29250 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>
29251 #include <sys/stat.h>
29252 "
29253 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
29254
29255 cat >>confdefs.h <<_ACEOF
29256 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
29257 _ACEOF
29258
29259
29260 fi
29261
29262 fi
29263
29264 fi
29265
29266
29267
29268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
29269 $as_echo_n "checking for working stdalign.h... " >&6; }
29270 if ${gl_cv_header_working_stdalign_h+:} false; then :
29271 $as_echo_n "(cached) " >&6
29272 else
29273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29274 /* end confdefs.h. */
29275 #include <stdalign.h>
29276 #include <stddef.h>
29277
29278 /* Test that alignof yields a result consistent with offsetof.
29279 This catches GCC bug 52023
29280 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
29281 #ifdef __cplusplus
29282 template <class t> struct alignof_helper { char a; t b; };
29283 # define ao(type) offsetof (alignof_helper<type>, b)
29284 #else
29285 # define ao(type) offsetof (struct { char a; type b; }, b)
29286 #endif
29287 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
29288 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
29289 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
29290
29291 /* Test _Alignas only on platforms where gnulib can help. */
29292 #if \
29293 ((defined __cplusplus && 201103 <= __cplusplus) \
29294 || (defined __APPLE__ && defined __MACH__ \
29295 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
29296 : __GNUC__) \
29297 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
29298 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
29299 || 1300 <= _MSC_VER)
29300 struct alignas_test { char c; char alignas (8) alignas_8; };
29301 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
29302 ? 1 : -1];
29303 #endif
29304
29305 int
29306 main ()
29307 {
29308
29309 ;
29310 return 0;
29311 }
29312 _ACEOF
29313 if ac_fn_c_try_compile "$LINENO"; then :
29314 gl_cv_header_working_stdalign_h=yes
29315 else
29316 gl_cv_header_working_stdalign_h=no
29317 fi
29318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29319 fi
29320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
29321 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
29322
29323 if test $gl_cv_header_working_stdalign_h = yes; then
29324 STDALIGN_H=''
29325 else
29326 STDALIGN_H='stdalign.h'
29327 fi
29328
29329
29330 if test -n "$STDALIGN_H"; then
29331 GL_GENERATE_STDALIGN_H_TRUE=
29332 GL_GENERATE_STDALIGN_H_FALSE='#'
29333 else
29334 GL_GENERATE_STDALIGN_H_TRUE='#'
29335 GL_GENERATE_STDALIGN_H_FALSE=
29336 fi
29337
29338
29339
29340
29341
29342
29343 if test "$ac_cv_header_stdbool_h" = yes; then
29344 case "$host_os" in
29345 solaris*)
29346 if test -z "$GCC"; then
29347 STDBOOL_H='stdbool.h'
29348 else
29349 STDBOOL_H=''
29350 fi
29351 ;;
29352 *)
29353 STDBOOL_H=''
29354 ;;
29355 esac
29356 else
29357 STDBOOL_H='stdbool.h'
29358 fi
29359
29360 if test -n "$STDBOOL_H"; then
29361 GL_GENERATE_STDBOOL_H_TRUE=
29362 GL_GENERATE_STDBOOL_H_FALSE='#'
29363 else
29364 GL_GENERATE_STDBOOL_H_TRUE='#'
29365 GL_GENERATE_STDBOOL_H_FALSE=
29366 fi
29367
29368
29369 if test "$ac_cv_type__Bool" = yes; then
29370 HAVE__BOOL=1
29371 else
29372 HAVE__BOOL=0
29373 fi
29374
29375
29376
29377
29378
29379
29380
29381
29382 STDDEF_H=
29383
29384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
29385 $as_echo_n "checking for good max_align_t... " >&6; }
29386 if ${gl_cv_type_max_align_t+:} false; then :
29387 $as_echo_n "(cached) " >&6
29388 else
29389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29390 /* end confdefs.h. */
29391 #include <stddef.h>
29392 unsigned int s = sizeof (max_align_t);
29393 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
29394 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
29395 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
29396 #endif
29397 typedef struct { char a; max_align_t b; } max_helper;
29398 typedef struct { char a; long b; } long_helper;
29399 typedef struct { char a; double b; } double_helper;
29400 typedef struct { char a; long double b; } long_double_helper;
29401 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
29402 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
29403 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
29404
29405 int
29406 main ()
29407 {
29408
29409 ;
29410 return 0;
29411 }
29412 _ACEOF
29413 if ac_fn_c_try_compile "$LINENO"; then :
29414 gl_cv_type_max_align_t=yes
29415 else
29416 gl_cv_type_max_align_t=no
29417 fi
29418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29419
29420 fi
29421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
29422 $as_echo "$gl_cv_type_max_align_t" >&6; }
29423 if test $gl_cv_type_max_align_t = no; then
29424 HAVE_MAX_ALIGN_T=0
29425 STDDEF_H=stddef.h
29426 fi
29427
29428 if test $gt_cv_c_wchar_t = no; then
29429 HAVE_WCHAR_T=0
29430 STDDEF_H=stddef.h
29431 fi
29432
29433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
29434 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
29435 if ${gl_cv_decl_null_works+:} false; then :
29436 $as_echo_n "(cached) " >&6
29437 else
29438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29439 /* end confdefs.h. */
29440 #include <stddef.h>
29441 int test[2 * (sizeof NULL == sizeof (void *)) -1];
29442
29443 int
29444 main ()
29445 {
29446
29447 ;
29448 return 0;
29449 }
29450 _ACEOF
29451 if ac_fn_c_try_compile "$LINENO"; then :
29452 gl_cv_decl_null_works=yes
29453 else
29454 gl_cv_decl_null_works=no
29455 fi
29456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29457 fi
29458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
29459 $as_echo "$gl_cv_decl_null_works" >&6; }
29460 if test $gl_cv_decl_null_works = no; then
29461 REPLACE_NULL=1
29462 STDDEF_H=stddef.h
29463 fi
29464
29465
29466 if test -n "$STDDEF_H"; then
29467 GL_GENERATE_STDDEF_H_TRUE=
29468 GL_GENERATE_STDDEF_H_FALSE='#'
29469 else
29470 GL_GENERATE_STDDEF_H_TRUE='#'
29471 GL_GENERATE_STDDEF_H_FALSE=
29472 fi
29473
29474 if test -n "$STDDEF_H"; then
29475
29476
29477
29478
29479
29480
29481
29482
29483 if test $gl_cv_have_include_next = yes; then
29484 gl_cv_next_stddef_h='<'stddef.h'>'
29485 else
29486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
29487 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
29488 if ${gl_cv_next_stddef_h+:} false; then :
29489 $as_echo_n "(cached) " >&6
29490 else
29491
29492
29493
29494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29495 /* end confdefs.h. */
29496 #include <stddef.h>
29497 _ACEOF
29498 case "$host_os" in
29499 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29500 *) gl_absname_cpp="$ac_cpp" ;;
29501 esac
29502
29503 case "$host_os" in
29504 mingw*)
29505 gl_dirsep_regex='[/\\]'
29506 ;;
29507 *)
29508 gl_dirsep_regex='\/'
29509 ;;
29510 esac
29511 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29512 gl_header_literal_regex=`echo 'stddef.h' \
29513 | sed -e "$gl_make_literal_regex_sed"`
29514 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29515 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29516 s|^/[^/]|//&|
29517 p
29518 q
29519 }'
29520
29521 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29522 sed -n "$gl_absolute_header_sed"`
29523
29524 gl_header=$gl_cv_absolute_stddef_h
29525 gl_cv_next_stddef_h='"'$gl_header'"'
29526
29527
29528 fi
29529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
29530 $as_echo "$gl_cv_next_stddef_h" >&6; }
29531 fi
29532 NEXT_STDDEF_H=$gl_cv_next_stddef_h
29533
29534 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29535 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29536 gl_next_as_first_directive='<'stddef.h'>'
29537 else
29538 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29539 gl_next_as_first_directive=$gl_cv_next_stddef_h
29540 fi
29541 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
29542
29543
29544
29545
29546 fi
29547
29548
29549
29550
29551 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562 if test $gl_cv_have_include_next = yes; then
29563 gl_cv_next_stdio_h='<'stdio.h'>'
29564 else
29565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
29566 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
29567 if ${gl_cv_next_stdio_h+:} false; then :
29568 $as_echo_n "(cached) " >&6
29569 else
29570
29571
29572
29573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29574 /* end confdefs.h. */
29575 #include <stdio.h>
29576 _ACEOF
29577 case "$host_os" in
29578 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29579 *) gl_absname_cpp="$ac_cpp" ;;
29580 esac
29581
29582 case "$host_os" in
29583 mingw*)
29584 gl_dirsep_regex='[/\\]'
29585 ;;
29586 *)
29587 gl_dirsep_regex='\/'
29588 ;;
29589 esac
29590 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29591 gl_header_literal_regex=`echo 'stdio.h' \
29592 | sed -e "$gl_make_literal_regex_sed"`
29593 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29594 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29595 s|^/[^/]|//&|
29596 p
29597 q
29598 }'
29599
29600 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29601 sed -n "$gl_absolute_header_sed"`
29602
29603 gl_header=$gl_cv_absolute_stdio_h
29604 gl_cv_next_stdio_h='"'$gl_header'"'
29605
29606
29607 fi
29608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
29609 $as_echo "$gl_cv_next_stdio_h" >&6; }
29610 fi
29611 NEXT_STDIO_H=$gl_cv_next_stdio_h
29612
29613 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29614 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29615 gl_next_as_first_directive='<'stdio.h'>'
29616 else
29617 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29618 gl_next_as_first_directive=$gl_cv_next_stdio_h
29619 fi
29620 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
29621
29622
29623
29624
29625
29626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
29627 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
29628 if ${gl_cv_func_printf_attribute_flavor+:} false; then :
29629 $as_echo_n "(cached) " >&6
29630 else
29631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29632 /* end confdefs.h. */
29633
29634 #define __STDC_FORMAT_MACROS 1
29635 #include <stdio.h>
29636 #include <inttypes.h>
29637 /* For non-mingw systems, compilation will trivially succeed.
29638 For mingw, compilation will succeed for older mingw (system
29639 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
29640 #if (defined _WIN32 && ! defined __CYGWIN__) && \
29641 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
29642 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
29643 #endif
29644
29645 int
29646 main ()
29647 {
29648
29649 ;
29650 return 0;
29651 }
29652 _ACEOF
29653 if ac_fn_c_try_compile "$LINENO"; then :
29654 gl_cv_func_printf_attribute_flavor=system
29655 else
29656 gl_cv_func_printf_attribute_flavor=gnu
29657 fi
29658 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29659 fi
29660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
29661 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
29662 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
29663
29664 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
29665
29666 fi
29667
29668 GNULIB_FSCANF=1
29669
29670
29671 cat >>confdefs.h <<_ACEOF
29672 #define GNULIB_FSCANF 1
29673 _ACEOF
29674
29675
29676 GNULIB_SCANF=1
29677
29678
29679 cat >>confdefs.h <<_ACEOF
29680 #define GNULIB_SCANF 1
29681 _ACEOF
29682
29683
29684 GNULIB_FGETC=1
29685 GNULIB_GETC=1
29686 GNULIB_GETCHAR=1
29687 GNULIB_FGETS=1
29688 GNULIB_FREAD=1
29689
29690
29691 GNULIB_FPRINTF=1
29692 GNULIB_PRINTF=1
29693 GNULIB_VFPRINTF=1
29694 GNULIB_VPRINTF=1
29695 GNULIB_FPUTC=1
29696 GNULIB_PUTC=1
29697 GNULIB_PUTCHAR=1
29698 GNULIB_FPUTS=1
29699 GNULIB_PUTS=1
29700 GNULIB_FWRITE=1
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711 if test $ac_cv_have_decl_fcloseall = no; then
29712 HAVE_DECL_FCLOSEALL=0
29713 fi
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725 if test $gl_cv_have_include_next = yes; then
29726 gl_cv_next_stdlib_h='<'stdlib.h'>'
29727 else
29728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
29729 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
29730 if ${gl_cv_next_stdlib_h+:} false; then :
29731 $as_echo_n "(cached) " >&6
29732 else
29733
29734
29735
29736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29737 /* end confdefs.h. */
29738 #include <stdlib.h>
29739 _ACEOF
29740 case "$host_os" in
29741 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29742 *) gl_absname_cpp="$ac_cpp" ;;
29743 esac
29744
29745 case "$host_os" in
29746 mingw*)
29747 gl_dirsep_regex='[/\\]'
29748 ;;
29749 *)
29750 gl_dirsep_regex='\/'
29751 ;;
29752 esac
29753 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29754 gl_header_literal_regex=`echo 'stdlib.h' \
29755 | sed -e "$gl_make_literal_regex_sed"`
29756 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29757 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29758 s|^/[^/]|//&|
29759 p
29760 q
29761 }'
29762
29763 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29764 sed -n "$gl_absolute_header_sed"`
29765
29766 gl_header=$gl_cv_absolute_stdlib_h
29767 gl_cv_next_stdlib_h='"'$gl_header'"'
29768
29769
29770 fi
29771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
29772 $as_echo "$gl_cv_next_stdlib_h" >&6; }
29773 fi
29774 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
29775
29776 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29777 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29778 gl_next_as_first_directive='<'stdlib.h'>'
29779 else
29780 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29781 gl_next_as_first_directive=$gl_cv_next_stdlib_h
29782 fi
29783 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
29784
29785
29786
29787
29788
29789
29790
29791
29792
29793
29794
29795
29796 if test $ac_cv_have_decl_ecvt = no; then
29797 HAVE_DECL_ECVT=0
29798 fi
29799
29800 if test $ac_cv_have_decl_fcvt = no; then
29801 HAVE_DECL_FCVT=0
29802 fi
29803
29804 if test $ac_cv_have_decl_gcvt = no; then
29805 HAVE_DECL_GCVT=0
29806 fi
29807
29808
29809
29810
29811
29812 for ac_func in strchrnul
29813 do :
29814 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
29815 if test "x$ac_cv_func_strchrnul" = xyes; then :
29816 cat >>confdefs.h <<_ACEOF
29817 #define HAVE_STRCHRNUL 1
29818 _ACEOF
29819
29820 fi
29821 done
29822
29823 if test $ac_cv_func_strchrnul = no; then
29824 HAVE_STRCHRNUL=0
29825 else
29826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
29827 $as_echo_n "checking whether strchrnul works... " >&6; }
29828 if ${gl_cv_func_strchrnul_works+:} false; then :
29829 $as_echo_n "(cached) " >&6
29830 else
29831 if test "$cross_compiling" = yes; then :
29832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29833 /* end confdefs.h. */
29834
29835 #if defined __CYGWIN__
29836 #include <cygwin/version.h>
29837 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
29838 Lucky user
29839 #endif
29840 #else
29841 Lucky user
29842 #endif
29843
29844 _ACEOF
29845 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29846 $EGREP "Lucky user" >/dev/null 2>&1; then :
29847 gl_cv_func_strchrnul_works="guessing yes"
29848 else
29849 gl_cv_func_strchrnul_works="guessing no"
29850 fi
29851 rm -f conftest*
29852
29853
29854 else
29855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29856 /* end confdefs.h. */
29857
29858 #include <string.h> /* for strchrnul */
29859
29860 int
29861 main ()
29862 {
29863 const char *buf = "a";
29864 return strchrnul (buf, 'b') != buf + 1;
29865
29866 ;
29867 return 0;
29868 }
29869 _ACEOF
29870 if ac_fn_c_try_run "$LINENO"; then :
29871 gl_cv_func_strchrnul_works=yes
29872 else
29873 gl_cv_func_strchrnul_works=no
29874 fi
29875 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29876 conftest.$ac_objext conftest.beam conftest.$ac_ext
29877 fi
29878
29879
29880 fi
29881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
29882 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
29883 case "$gl_cv_func_strchrnul_works" in
29884 *yes) ;;
29885 *) REPLACE_STRCHRNUL=1 ;;
29886 esac
29887 fi
29888
29889 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
29890
29891
29892
29893
29894
29895
29896
29897
29898 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
29899
29900 :
29901 fi
29902
29903
29904
29905
29906
29907 GNULIB_STRCHRNUL=1
29908
29909
29910
29911
29912
29913 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
29914
29915
29916
29917
29918
29919
29920 if test $gl_cv_func_malloc_posix != yes; then
29921 REPLACE_STRDUP=1
29922 fi
29923
29924 if test $ac_cv_have_decl_strdup = no; then
29925 HAVE_DECL_STRDUP=0
29926 fi
29927
29928 if test $REPLACE_STRDUP = 1; then
29929
29930
29931
29932
29933
29934
29935
29936
29937 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
29938
29939 :
29940 fi
29941
29942
29943
29944
29945
29946 GNULIB_STRDUP=1
29947
29948
29949
29950
29951
29952 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
29964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
29965 $as_echo_n "checking for working strerror function... " >&6; }
29966 if ${gl_cv_func_working_strerror+:} false; then :
29967 $as_echo_n "(cached) " >&6
29968 else
29969 if test "$cross_compiling" = yes; then :
29970 case "$host_os" in
29971 # Guess yes on glibc systems.
29972 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
29973 # Guess yes on musl systems.
29974 *-musl*) gl_cv_func_working_strerror="guessing yes" ;;
29975 # If we don't know, obey --enable-cross-guesses.
29976 *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
29977 esac
29978
29979 else
29980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29981 /* end confdefs.h. */
29982 #include <string.h>
29983
29984 int
29985 main ()
29986 {
29987 if (!*strerror (-2)) return 1;
29988 ;
29989 return 0;
29990 }
29991 _ACEOF
29992 if ac_fn_c_try_run "$LINENO"; then :
29993 gl_cv_func_working_strerror=yes
29994 else
29995 gl_cv_func_working_strerror=no
29996 fi
29997 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29998 conftest.$ac_objext conftest.beam conftest.$ac_ext
29999 fi
30000
30001
30002 fi
30003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
30004 $as_echo "$gl_cv_func_working_strerror" >&6; }
30005 case "$gl_cv_func_working_strerror" in
30006 *yes) ;;
30007 *)
30008 REPLACE_STRERROR=1
30009 ;;
30010 esac
30011
30012 case "$gl_cv_func_strerror_r_works" in
30013 *no) REPLACE_STRERROR=1 ;;
30014 esac
30015
30016 else
30017 REPLACE_STRERROR=1
30018 fi
30019
30020 if test $REPLACE_STRERROR = 1; then
30021
30022
30023
30024
30025
30026
30027
30028
30029 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
30030
30031 fi
30032
30033
30034 cat >>confdefs.h <<_ACEOF
30035 #define GNULIB_STRERROR 1
30036 _ACEOF
30037
30038
30039
30040
30041
30042
30043
30044 GNULIB_STRERROR=1
30045
30046
30047
30048
30049
30050 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
30051
30052
30053
30054
30055
30056 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
30057
30058
30059
30060
30061
30062
30063
30064
30065 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
30066
30067
30068
30069
30070
30071 if test $ac_cv_header_sys_socket_h != yes; then
30072 for ac_header in winsock2.h
30073 do :
30074 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
30075 if test "x$ac_cv_header_winsock2_h" = xyes; then :
30076 cat >>confdefs.h <<_ACEOF
30077 #define HAVE_WINSOCK2_H 1
30078 _ACEOF
30079
30080 fi
30081
30082 done
30083
30084 fi
30085 if test "$ac_cv_header_winsock2_h" = yes; then
30086 HAVE_WINSOCK2_H=1
30087 UNISTD_H_HAVE_WINSOCK2_H=1
30088 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
30089 else
30090 HAVE_WINSOCK2_H=0
30091 fi
30092
30093
30094 fi
30095
30096
30097
30098
30099
30100
30101
30102 if test $ac_cv_have_decl_strerror_r = no; then
30103 HAVE_DECL_STRERROR_R=0
30104 fi
30105
30106 if test $ac_cv_func_strerror_r = yes; then
30107 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
30108 if test $gl_cv_func_strerror_r_posix_signature = yes; then
30109 case "$gl_cv_func_strerror_r_works" in
30110 *no) REPLACE_STRERROR_R=1 ;;
30111 esac
30112 else
30113 REPLACE_STRERROR_R=1
30114 fi
30115 else
30116 REPLACE_STRERROR_R=1
30117 fi
30118 fi
30119
30120 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
30121
30122
30123
30124
30125
30126
30127
30128
30129 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
30130
30131
30132
30133
30134
30135
30136 fi
30137
30138
30139
30140
30141
30142 GNULIB_STRERROR_R=1
30143
30144
30145
30146
30147
30148 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
30149
30150
30151
30152
30153
30154 cat >>confdefs.h <<_ACEOF
30155 #define GNULIB_STRERROR_R_POSIX 1
30156 _ACEOF
30157
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171 if test $ac_cv_have_decl_strnlen = no; then
30172 HAVE_DECL_STRNLEN=0
30173 else
30174
30175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
30176 $as_echo_n "checking for working strnlen... " >&6; }
30177 if ${ac_cv_func_strnlen_working+:} false; then :
30178 $as_echo_n "(cached) " >&6
30179 else
30180 if test "$cross_compiling" = yes; then :
30181 # Guess no on AIX systems, yes otherwise.
30182 case "$host_os" in
30183 aix*) ac_cv_func_strnlen_working=no;;
30184 *) ac_cv_func_strnlen_working=yes;;
30185 esac
30186 else
30187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30188 /* end confdefs.h. */
30189 $ac_includes_default
30190 int
30191 main ()
30192 {
30193
30194 #define S "foobar"
30195 #define S_LEN (sizeof S - 1)
30196
30197 /* At least one implementation is buggy: that of AIX 4.3 would
30198 give strnlen (S, 1) == 3. */
30199
30200 int i;
30201 for (i = 0; i < S_LEN + 1; ++i)
30202 {
30203 int expected = i <= S_LEN ? i : S_LEN;
30204 if (strnlen (S, i) != expected)
30205 return 1;
30206 }
30207 return 0;
30208
30209 ;
30210 return 0;
30211 }
30212 _ACEOF
30213 if ac_fn_c_try_run "$LINENO"; then :
30214 ac_cv_func_strnlen_working=yes
30215 else
30216 ac_cv_func_strnlen_working=no
30217 fi
30218 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30219 conftest.$ac_objext conftest.beam conftest.$ac_ext
30220 fi
30221
30222 fi
30223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
30224 $as_echo "$ac_cv_func_strnlen_working" >&6; }
30225 test $ac_cv_func_strnlen_working = no && :
30226
30227
30228 if test $ac_cv_func_strnlen_working = no; then
30229 REPLACE_STRNLEN=1
30230 fi
30231 fi
30232
30233 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
30234
30235
30236
30237
30238
30239
30240
30241
30242 gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
30243
30244 :
30245 fi
30246
30247
30248
30249
30250
30251 GNULIB_STRNLEN=1
30252
30253
30254
30255
30256
30257 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
30258
30259
30260
30261
30262
30263 if test $REPLACE_STRSTR = 0; then
30264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
30265 $as_echo_n "checking whether strstr works in linear time... " >&6; }
30266 if ${gl_cv_func_strstr_linear+:} false; then :
30267 $as_echo_n "(cached) " >&6
30268 else
30269 if test "$cross_compiling" = yes; then :
30270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30271 /* end confdefs.h. */
30272
30273 #include <features.h>
30274 #ifdef __GNU_LIBRARY__
30275 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
30276 && !(defined __i386__ || defined __x86_64__) \
30277 && !defined __UCLIBC__
30278 Lucky user
30279 #endif
30280 #endif
30281 #ifdef __CYGWIN__
30282 #include <cygwin/version.h>
30283 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
30284 Lucky user
30285 #endif
30286 #endif
30287
30288 _ACEOF
30289 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30290 $EGREP "Lucky user" >/dev/null 2>&1; then :
30291 gl_cv_func_strstr_linear="guessing yes"
30292 else
30293 gl_cv_func_strstr_linear="$gl_cross_guess_normal"
30294 fi
30295 rm -f conftest*
30296
30297
30298 else
30299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30300 /* end confdefs.h. */
30301
30302 #ifdef __MVS__
30303 /* z/OS does not deliver signals while strstr() is running (thanks to
30304 restrictions on its LE runtime), which prevents us from limiting the
30305 running time of this test. */
30306 # error "This test does not work properly on z/OS"
30307 #endif
30308 #include <signal.h> /* for signal */
30309 #include <string.h> /* for strstr */
30310 #include <stdlib.h> /* for malloc */
30311 #include <unistd.h> /* for alarm */
30312 static void quit (int sig) { _exit (sig + 128); }
30313
30314 int
30315 main ()
30316 {
30317
30318 int result = 0;
30319 size_t m = 1000000;
30320 char *haystack = (char *) malloc (2 * m + 2);
30321 char *needle = (char *) malloc (m + 2);
30322 /* Failure to compile this test due to missing alarm is okay,
30323 since all such platforms (mingw) also have quadratic strstr. */
30324 signal (SIGALRM, quit);
30325 alarm (5);
30326 /* Check for quadratic performance. */
30327 if (haystack && needle)
30328 {
30329 memset (haystack, 'A', 2 * m);
30330 haystack[2 * m] = 'B';
30331 haystack[2 * m + 1] = 0;
30332 memset (needle, 'A', m);
30333 needle[m] = 'B';
30334 needle[m + 1] = 0;
30335 if (!strstr (haystack, needle))
30336 result |= 1;
30337 }
30338 /* Free allocated memory, in case some sanitizer is watching. */
30339 free (haystack);
30340 free (needle);
30341 return result;
30342
30343 ;
30344 return 0;
30345 }
30346 _ACEOF
30347 if ac_fn_c_try_run "$LINENO"; then :
30348 gl_cv_func_strstr_linear=yes
30349 else
30350 gl_cv_func_strstr_linear=no
30351 fi
30352 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30353 conftest.$ac_objext conftest.beam conftest.$ac_ext
30354 fi
30355
30356
30357 fi
30358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
30359 $as_echo "$gl_cv_func_strstr_linear" >&6; }
30360 case "$gl_cv_func_strstr_linear" in
30361 *yes) ;;
30362 *)
30363 REPLACE_STRSTR=1
30364 ;;
30365 esac
30366 fi
30367
30368 if test $REPLACE_STRSTR = 1; then
30369
30370
30371
30372
30373
30374
30375
30376
30377 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
30378
30379 fi
30380
30381
30382
30383 if test $REPLACE_MEMCHR = 1; then
30384 REPLACE_STRSTR=1
30385 else
30386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
30387 $as_echo_n "checking whether strstr works... " >&6; }
30388 if ${gl_cv_func_strstr_works_always+:} false; then :
30389 $as_echo_n "(cached) " >&6
30390 else
30391 if test "$cross_compiling" = yes; then :
30392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30393 /* end confdefs.h. */
30394
30395 #ifdef __GNU_LIBRARY__
30396 #include <features.h>
30397 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
30398 || defined __UCLIBC__
30399 Lucky user
30400 #endif
30401 #elif defined __CYGWIN__
30402 #include <cygwin/version.h>
30403 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
30404 Lucky user
30405 #endif
30406 #else
30407 Lucky user
30408 #endif
30409
30410 _ACEOF
30411 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30412 $EGREP "Lucky user" >/dev/null 2>&1; then :
30413 gl_cv_func_strstr_works_always="guessing yes"
30414 else
30415 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
30416 fi
30417 rm -f conftest*
30418
30419
30420 else
30421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30422 /* end confdefs.h. */
30423
30424 #include <string.h> /* for strstr */
30425 #ifdef __GNU_LIBRARY__
30426 #include <features.h>
30427 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
30428 Unlucky user
30429 #endif
30430 #endif
30431 #define P "_EF_BF_BD"
30432 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
30433 #define NEEDLE P P P P P
30434
30435 int
30436 main ()
30437 {
30438 return !!strstr (HAYSTACK, NEEDLE);
30439
30440 ;
30441 return 0;
30442 }
30443 _ACEOF
30444 if ac_fn_c_try_run "$LINENO"; then :
30445 gl_cv_func_strstr_works_always=yes
30446 else
30447 gl_cv_func_strstr_works_always=no
30448 fi
30449 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30450 conftest.$ac_objext conftest.beam conftest.$ac_ext
30451 fi
30452
30453
30454 fi
30455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
30456 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
30457 case "$gl_cv_func_strstr_works_always" in
30458 *yes) ;;
30459 *)
30460 REPLACE_STRSTR=1
30461 ;;
30462 esac
30463 fi
30464
30465 if test $REPLACE_STRSTR = 1; then
30466
30467
30468
30469
30470
30471
30472
30473
30474 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
30475
30476 fi
30477
30478
30479
30480
30481
30482 GNULIB_STRSTR=1
30483
30484
30485
30486
30487
30488 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
30489
30490
30491
30492
30493
30494
30495
30496 for ac_func in strtok_r
30497 do :
30498 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
30499 if test "x$ac_cv_func_strtok_r" = xyes; then :
30500 cat >>confdefs.h <<_ACEOF
30501 #define HAVE_STRTOK_R 1
30502 _ACEOF
30503
30504 fi
30505 done
30506
30507 if test $ac_cv_func_strtok_r = yes; then
30508 HAVE_STRTOK_R=1
30509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
30510 $as_echo_n "checking whether strtok_r works... " >&6; }
30511 if ${gl_cv_func_strtok_r_works+:} false; then :
30512 $as_echo_n "(cached) " >&6
30513 else
30514 if test "$cross_compiling" = yes; then :
30515 case "$host_os" in
30516 # Guess no on glibc systems.
30517 *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;;
30518 # Guess yes on native Windows.
30519 mingw*) gl_cv_func_strtok_r_works="guessing yes" ;;
30520 *) gl_cv_func_strtok_r_works="guessing yes" ;;
30521 esac
30522
30523 else
30524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30525 /* end confdefs.h. */
30526
30527 #ifndef __OPTIMIZE__
30528 # define __OPTIMIZE__ 1
30529 #endif
30530 #undef __OPTIMIZE_SIZE__
30531 #undef __NO_INLINE__
30532 #include <stdlib.h>
30533 #include <string.h>
30534
30535 int
30536 main ()
30537 {
30538 static const char dummy[] = "\177\01a";
30539 char delimiters[] = "xxxxxxxx";
30540 char *save_ptr = (char *) dummy;
30541 strtok_r (delimiters, "x", &save_ptr);
30542 strtok_r (NULL, "x", &save_ptr);
30543 return 0;
30544
30545 ;
30546 return 0;
30547 }
30548
30549 _ACEOF
30550 if ac_fn_c_try_run "$LINENO"; then :
30551 gl_cv_func_strtok_r_works=yes
30552 else
30553 gl_cv_func_strtok_r_works=no
30554 fi
30555 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30556 conftest.$ac_objext conftest.beam conftest.$ac_ext
30557 fi
30558
30559
30560 fi
30561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
30562 $as_echo "$gl_cv_func_strtok_r_works" >&6; }
30563 case "$gl_cv_func_strtok_r_works" in
30564 *no)
30565 UNDEFINE_STRTOK_R=1
30566 ;;
30567 esac
30568 else
30569 HAVE_STRTOK_R=0
30570 fi
30571
30572 if test $ac_cv_have_decl_strtok_r = no; then
30573 HAVE_DECL_STRTOK_R=0
30574 fi
30575
30576 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
30577
30578
30579
30580
30581
30582
30583
30584
30585 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
30586
30587
30588 :
30589
30590 fi
30591
30592
30593
30594
30595
30596 GNULIB_STRTOK_R=1
30597
30598
30599
30600
30601
30602 $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
30603
30604
30605
30606
30607
30608
30609
30610
30611
30612
30613
30614
30615
30616
30617 if test $gl_cv_have_include_next = yes; then
30618 gl_cv_next_sys_random_h='<'sys/random.h'>'
30619 else
30620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
30621 $as_echo_n "checking absolute name of <sys/random.h>... " >&6; }
30622 if ${gl_cv_next_sys_random_h+:} false; then :
30623 $as_echo_n "(cached) " >&6
30624 else
30625
30626 if test $ac_cv_header_sys_random_h = yes; then
30627
30628
30629
30630
30631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30632 /* end confdefs.h. */
30633 #include <sys/random.h>
30634 _ACEOF
30635 case "$host_os" in
30636 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30637 *) gl_absname_cpp="$ac_cpp" ;;
30638 esac
30639
30640 case "$host_os" in
30641 mingw*)
30642 gl_dirsep_regex='[/\\]'
30643 ;;
30644 *)
30645 gl_dirsep_regex='\/'
30646 ;;
30647 esac
30648 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30649 gl_header_literal_regex=`echo 'sys/random.h' \
30650 | sed -e "$gl_make_literal_regex_sed"`
30651 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30652 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30653 s|^/[^/]|//&|
30654 p
30655 q
30656 }'
30657
30658 gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30659 sed -n "$gl_absolute_header_sed"`
30660
30661 gl_header=$gl_cv_absolute_sys_random_h
30662 gl_cv_next_sys_random_h='"'$gl_header'"'
30663 else
30664 gl_cv_next_sys_random_h='<'sys/random.h'>'
30665 fi
30666
30667
30668 fi
30669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
30670 $as_echo "$gl_cv_next_sys_random_h" >&6; }
30671 fi
30672 NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
30673
30674 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30675 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30676 gl_next_as_first_directive='<'sys/random.h'>'
30677 else
30678 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30679 gl_next_as_first_directive=$gl_cv_next_sys_random_h
30680 fi
30681 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
30682
30683
30684
30685
30686 if test $ac_cv_header_sys_random_h = yes; then
30687 HAVE_SYS_RANDOM_H=1
30688 else
30689 HAVE_SYS_RANDOM_H=0
30690 fi
30691
30692
30693
30694 if test $ac_cv_header_sys_random_h = yes; then
30695 UNISTD_H_HAVE_SYS_RANDOM_H=1
30696 fi
30697
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721 if test $gl_cv_have_include_next = yes; then
30722 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
30723 else
30724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
30725 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
30726 if ${gl_cv_next_sys_stat_h+:} false; then :
30727 $as_echo_n "(cached) " >&6
30728 else
30729
30730 if test $ac_cv_header_sys_stat_h = yes; then
30731
30732
30733
30734
30735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30736 /* end confdefs.h. */
30737 #include <sys/stat.h>
30738 _ACEOF
30739 case "$host_os" in
30740 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30741 *) gl_absname_cpp="$ac_cpp" ;;
30742 esac
30743
30744 case "$host_os" in
30745 mingw*)
30746 gl_dirsep_regex='[/\\]'
30747 ;;
30748 *)
30749 gl_dirsep_regex='\/'
30750 ;;
30751 esac
30752 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30753 gl_header_literal_regex=`echo 'sys/stat.h' \
30754 | sed -e "$gl_make_literal_regex_sed"`
30755 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30756 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30757 s|^/[^/]|//&|
30758 p
30759 q
30760 }'
30761
30762 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30763 sed -n "$gl_absolute_header_sed"`
30764
30765 gl_header=$gl_cv_absolute_sys_stat_h
30766 gl_cv_next_sys_stat_h='"'$gl_header'"'
30767 else
30768 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
30769 fi
30770
30771
30772 fi
30773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
30774 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
30775 fi
30776 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
30777
30778 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30779 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30780 gl_next_as_first_directive='<'sys/stat.h'>'
30781 else
30782 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30783 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
30784 fi
30785 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
30786
30787
30788
30789
30790
30791
30792
30793
30794 WINDOWS_STAT_TIMESPEC=0
30795
30796
30797
30798
30799
30800
30801
30802
30803 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
30804 #include <sys/stat.h>
30805 "
30806 if test "x$ac_cv_type_nlink_t" = xyes; then :
30807
30808 else
30809
30810 $as_echo "#define nlink_t int" >>confdefs.h
30811
30812 fi
30813
30814
30815
30816
30817
30818
30819
30820
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830
30831
30832
30833
30834
30835
30836
30837
30838
30839 if test $gl_cv_have_include_next = yes; then
30840 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
30841 else
30842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
30843 $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
30844 if ${gl_cv_next_sys_uio_h+:} false; then :
30845 $as_echo_n "(cached) " >&6
30846 else
30847
30848 if test $ac_cv_header_sys_uio_h = yes; then
30849
30850
30851
30852
30853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30854 /* end confdefs.h. */
30855 #include <sys/uio.h>
30856 _ACEOF
30857 case "$host_os" in
30858 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30859 *) gl_absname_cpp="$ac_cpp" ;;
30860 esac
30861
30862 case "$host_os" in
30863 mingw*)
30864 gl_dirsep_regex='[/\\]'
30865 ;;
30866 *)
30867 gl_dirsep_regex='\/'
30868 ;;
30869 esac
30870 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30871 gl_header_literal_regex=`echo 'sys/uio.h' \
30872 | sed -e "$gl_make_literal_regex_sed"`
30873 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30874 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30875 s|^/[^/]|//&|
30876 p
30877 q
30878 }'
30879
30880 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30881 sed -n "$gl_absolute_header_sed"`
30882
30883 gl_header=$gl_cv_absolute_sys_uio_h
30884 gl_cv_next_sys_uio_h='"'$gl_header'"'
30885 else
30886 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
30887 fi
30888
30889
30890 fi
30891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
30892 $as_echo "$gl_cv_next_sys_uio_h" >&6; }
30893 fi
30894 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
30895
30896 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30897 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30898 gl_next_as_first_directive='<'sys/uio.h'>'
30899 else
30900 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30901 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
30902 fi
30903 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
30904
30905
30906
30907
30908 if test $ac_cv_header_sys_uio_h = yes; then
30909 HAVE_SYS_UIO_H=1
30910 else
30911 HAVE_SYS_UIO_H=0
30912 fi
30913
30914
30915
30916
30917
30918
30919
30920
30921
30922
30923
30924
30925
30926
30927
30928 if test $gl_cv_have_include_next = yes; then
30929 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
30930 else
30931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
30932 $as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
30933 if ${gl_cv_next_sys_wait_h+:} false; then :
30934 $as_echo_n "(cached) " >&6
30935 else
30936
30937 if test $ac_cv_header_sys_wait_h = yes; then
30938
30939
30940
30941
30942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30943 /* end confdefs.h. */
30944 #include <sys/wait.h>
30945 _ACEOF
30946 case "$host_os" in
30947 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30948 *) gl_absname_cpp="$ac_cpp" ;;
30949 esac
30950
30951 case "$host_os" in
30952 mingw*)
30953 gl_dirsep_regex='[/\\]'
30954 ;;
30955 *)
30956 gl_dirsep_regex='\/'
30957 ;;
30958 esac
30959 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30960 gl_header_literal_regex=`echo 'sys/wait.h' \
30961 | sed -e "$gl_make_literal_regex_sed"`
30962 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30963 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30964 s|^/[^/]|//&|
30965 p
30966 q
30967 }'
30968
30969 gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30970 sed -n "$gl_absolute_header_sed"`
30971
30972 gl_header=$gl_cv_absolute_sys_wait_h
30973 gl_cv_next_sys_wait_h='"'$gl_header'"'
30974 else
30975 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
30976 fi
30977
30978
30979 fi
30980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
30981 $as_echo "$gl_cv_next_sys_wait_h" >&6; }
30982 fi
30983 NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
30984
30985 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30986 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30987 gl_next_as_first_directive='<'sys/wait.h'>'
30988 else
30989 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30990 gl_next_as_first_directive=$gl_cv_next_sys_wait_h
30991 fi
30992 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
30993
30994
30995
30996
30997
30998
30999
31000
31001
31002
31003
31004
31005
31006
31007 :
31008
31009
31010
31011
31012 cat >>confdefs.h <<_ACEOF
31013 #define GNULIB_TEMPNAME 1
31014 _ACEOF
31015
31016
31017
31018
31019
31020
31021
31022
31023
31024
31025
31026
31027 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "/* mingw's <time.h> provides the functions asctime_r, ctime_r,
31028 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
31029 been included before. */
31030 #if defined __MINGW32__
31031 # include <unistd.h>
31032 #endif
31033 #include <time.h>
31034
31035 "
31036 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
31037 ac_have_decl=1
31038 else
31039 ac_have_decl=0
31040 fi
31041
31042 cat >>confdefs.h <<_ACEOF
31043 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
31044 _ACEOF
31045
31046 if test $ac_cv_have_decl_localtime_r = no; then
31047 HAVE_DECL_LOCALTIME_R=0
31048 fi
31049
31050
31051 if test $ac_cv_func_localtime_r = yes; then
31052 HAVE_LOCALTIME_R=1
31053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
31054 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
31055 if ${gl_cv_time_r_posix+:} false; then :
31056 $as_echo_n "(cached) " >&6
31057 else
31058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31059 /* end confdefs.h. */
31060 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
31061 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
31062 been included before. */
31063 #if defined __MINGW32__
31064 # include <unistd.h>
31065 #endif
31066 #include <time.h>
31067
31068 int
31069 main ()
31070 {
31071 /* We don't need to append 'restrict's to the argument types,
31072 even though the POSIX signature has the 'restrict's,
31073 since C99 says they can't affect type compatibility. */
31074 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
31075 if (ptr) return 0;
31076 /* Check the return type is a pointer.
31077 On HP-UX 10 it is 'int'. */
31078 *localtime_r (0, 0);
31079 ;
31080 return 0;
31081 }
31082
31083 _ACEOF
31084 if ac_fn_c_try_compile "$LINENO"; then :
31085 gl_cv_time_r_posix=yes
31086 else
31087 gl_cv_time_r_posix=no
31088 fi
31089 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31090
31091 fi
31092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
31093 $as_echo "$gl_cv_time_r_posix" >&6; }
31094 if test $gl_cv_time_r_posix = yes; then
31095 REPLACE_LOCALTIME_R=0
31096 else
31097 REPLACE_LOCALTIME_R=1
31098 fi
31099 else
31100 HAVE_LOCALTIME_R=0
31101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
31102 $as_echo_n "checking whether localtime_r exists as an inline function... " >&6; }
31103 if ${gl_cv_func_localtime_r_inline+:} false; then :
31104 $as_echo_n "(cached) " >&6
31105 else
31106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31107 /* end confdefs.h. */
31108 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
31109 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
31110 been included before. */
31111 #if defined __MINGW32__
31112 # include <unistd.h>
31113 #endif
31114 #include <time.h>
31115
31116 int
31117 main ()
31118 {
31119 time_t a;
31120 struct tm r;
31121 localtime_r (&a, &r);
31122
31123 ;
31124 return 0;
31125 }
31126
31127 _ACEOF
31128 if ac_fn_c_try_link "$LINENO"; then :
31129 gl_cv_func_localtime_r_inline=yes
31130 else
31131 gl_cv_func_localtime_r_inline=no
31132 fi
31133 rm -f core conftest.err conftest.$ac_objext \
31134 conftest$ac_exeext conftest.$ac_ext
31135
31136 fi
31137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
31138 $as_echo "$gl_cv_func_localtime_r_inline" >&6; }
31139 if test $gl_cv_func_localtime_r_inline = yes; then
31140 REPLACE_LOCALTIME_R=1
31141 fi
31142 fi
31143
31144 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
31145
31146
31147
31148
31149
31150
31151
31152
31153 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
31154
31155
31156 :
31157
31158 fi
31159
31160
31161
31162
31163
31164 GNULIB_TIME_R=1
31165
31166
31167
31168
31169
31170 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
31171
31172
31173
31174
31175
31176
31177
31178
31179
31180
31181
31182
31183
31184
31185
31186 if test $gl_cv_have_include_next = yes; then
31187 gl_cv_next_unistd_h='<'unistd.h'>'
31188 else
31189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
31190 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
31191 if ${gl_cv_next_unistd_h+:} false; then :
31192 $as_echo_n "(cached) " >&6
31193 else
31194
31195 if test $ac_cv_header_unistd_h = yes; then
31196
31197
31198
31199
31200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31201 /* end confdefs.h. */
31202 #include <unistd.h>
31203 _ACEOF
31204 case "$host_os" in
31205 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31206 *) gl_absname_cpp="$ac_cpp" ;;
31207 esac
31208
31209 case "$host_os" in
31210 mingw*)
31211 gl_dirsep_regex='[/\\]'
31212 ;;
31213 *)
31214 gl_dirsep_regex='\/'
31215 ;;
31216 esac
31217 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31218 gl_header_literal_regex=`echo 'unistd.h' \
31219 | sed -e "$gl_make_literal_regex_sed"`
31220 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31221 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31222 s|^/[^/]|//&|
31223 p
31224 q
31225 }'
31226
31227 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31228 sed -n "$gl_absolute_header_sed"`
31229
31230 gl_header=$gl_cv_absolute_unistd_h
31231 gl_cv_next_unistd_h='"'$gl_header'"'
31232 else
31233 gl_cv_next_unistd_h='<'unistd.h'>'
31234 fi
31235
31236
31237 fi
31238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
31239 $as_echo "$gl_cv_next_unistd_h" >&6; }
31240 fi
31241 NEXT_UNISTD_H=$gl_cv_next_unistd_h
31242
31243 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31244 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31245 gl_next_as_first_directive='<'unistd.h'>'
31246 else
31247 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31248 gl_next_as_first_directive=$gl_cv_next_unistd_h
31249 fi
31250 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
31251
31252
31253
31254
31255 if test $ac_cv_header_unistd_h = yes; then
31256 HAVE_UNISTD_H=1
31257 else
31258 HAVE_UNISTD_H=0
31259 fi
31260
31261
31262
31263
31264
31265
31266
31267
31268
31269
31270
31271
31272
31273 if test $ac_cv_have_decl_execvpe = no; then
31274 HAVE_DECL_EXECVPE=0
31275 fi
31276
31277
31278
31279
31280
31281
31282
31283 if test $ac_cv_have_decl_unsetenv = no; then
31284 HAVE_DECL_UNSETENV=0
31285 fi
31286 for ac_func in unsetenv
31287 do :
31288 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
31289 if test "x$ac_cv_func_unsetenv" = xyes; then :
31290 cat >>confdefs.h <<_ACEOF
31291 #define HAVE_UNSETENV 1
31292 _ACEOF
31293
31294 fi
31295 done
31296
31297 if test $ac_cv_func_unsetenv = no; then
31298 HAVE_UNSETENV=0
31299 else
31300 HAVE_UNSETENV=1
31301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
31302 $as_echo_n "checking for unsetenv() return type... " >&6; }
31303 if ${gt_cv_func_unsetenv_ret+:} false; then :
31304 $as_echo_n "(cached) " >&6
31305 else
31306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31307 /* end confdefs.h. */
31308
31309 #undef _BSD
31310 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
31311 #include <stdlib.h>
31312 extern
31313 #ifdef __cplusplus
31314 "C"
31315 #endif
31316 int unsetenv (const char *name);
31317
31318 int
31319 main ()
31320 {
31321
31322 ;
31323 return 0;
31324 }
31325 _ACEOF
31326 if ac_fn_c_try_compile "$LINENO"; then :
31327 gt_cv_func_unsetenv_ret='int'
31328 else
31329 gt_cv_func_unsetenv_ret='void'
31330 fi
31331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31332 fi
31333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
31334 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
31335 if test $gt_cv_func_unsetenv_ret = 'void'; then
31336
31337 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
31338
31339 REPLACE_UNSETENV=1
31340 fi
31341
31342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
31343 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
31344 if ${gl_cv_func_unsetenv_works+:} false; then :
31345 $as_echo_n "(cached) " >&6
31346 else
31347 if test "$cross_compiling" = yes; then :
31348 case "$host_os" in
31349 # Guess yes on glibc systems.
31350 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
31351 # If we don't know, obey --enable-cross-guesses.
31352 *) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
31353 esac
31354
31355 else
31356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31357 /* end confdefs.h. */
31358
31359 #include <stdlib.h>
31360 #include <errno.h>
31361 extern char **environ;
31362
31363
31364 $gl_mda_defines
31365
31366 int
31367 main ()
31368 {
31369
31370 char entry1[] = "a=1";
31371 char entry2[] = "b=2";
31372 char *env[] = { entry1, entry2, NULL };
31373 if (putenv ((char *) "a=1")) return 1;
31374 if (putenv (entry2)) return 2;
31375 entry2[0] = 'a';
31376 unsetenv ("a");
31377 if (getenv ("a")) return 3;
31378 if (!unsetenv ("") || errno != EINVAL) return 4;
31379 entry2[0] = 'b';
31380 environ = env;
31381 if (!getenv ("a")) return 5;
31382 entry2[0] = 'a';
31383 unsetenv ("a");
31384 if (getenv ("a")) return 6;
31385
31386 ;
31387 return 0;
31388 }
31389 _ACEOF
31390 if ac_fn_c_try_run "$LINENO"; then :
31391 gl_cv_func_unsetenv_works=yes
31392 else
31393 gl_cv_func_unsetenv_works=no
31394 fi
31395 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31396 conftest.$ac_objext conftest.beam conftest.$ac_ext
31397 fi
31398
31399
31400 fi
31401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
31402 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
31403 case "$gl_cv_func_unsetenv_works" in
31404 *yes) ;;
31405 *)
31406 REPLACE_UNSETENV=1
31407 ;;
31408 esac
31409 fi
31410
31411 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
31412
31413
31414
31415
31416
31417
31418
31419
31420 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
31421
31422
31423
31424
31425
31426 fi
31427
31428
31429
31430
31431
31432 GNULIB_UNSETENV=1
31433
31434
31435
31436
31437
31438 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
31439
31440
31441
31442
31443
31444
31445
31446
31447
31448
31449
31450
31451
31452
31453
31454 if test $gl_cv_have_include_next = yes; then
31455 gl_cv_next_wchar_h='<'wchar.h'>'
31456 else
31457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
31458 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
31459 if ${gl_cv_next_wchar_h+:} false; then :
31460 $as_echo_n "(cached) " >&6
31461 else
31462
31463 if test $ac_cv_header_wchar_h = yes; then
31464
31465
31466
31467
31468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31469 /* end confdefs.h. */
31470 #include <wchar.h>
31471 _ACEOF
31472 case "$host_os" in
31473 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31474 *) gl_absname_cpp="$ac_cpp" ;;
31475 esac
31476
31477 case "$host_os" in
31478 mingw*)
31479 gl_dirsep_regex='[/\\]'
31480 ;;
31481 *)
31482 gl_dirsep_regex='\/'
31483 ;;
31484 esac
31485 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31486 gl_header_literal_regex=`echo 'wchar.h' \
31487 | sed -e "$gl_make_literal_regex_sed"`
31488 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31489 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31490 s|^/[^/]|//&|
31491 p
31492 q
31493 }'
31494
31495 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31496 sed -n "$gl_absolute_header_sed"`
31497
31498 gl_header=$gl_cv_absolute_wchar_h
31499 gl_cv_next_wchar_h='"'$gl_header'"'
31500 else
31501 gl_cv_next_wchar_h='<'wchar.h'>'
31502 fi
31503
31504
31505 fi
31506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
31507 $as_echo "$gl_cv_next_wchar_h" >&6; }
31508 fi
31509 NEXT_WCHAR_H=$gl_cv_next_wchar_h
31510
31511 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31512 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31513 gl_next_as_first_directive='<'wchar.h'>'
31514 else
31515 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31516 gl_next_as_first_directive=$gl_cv_next_wchar_h
31517 fi
31518 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
31519
31520
31521
31522
31523 if test $ac_cv_header_wchar_h = yes; then
31524 HAVE_WCHAR_H=1
31525 else
31526 HAVE_WCHAR_H=0
31527 fi
31528
31529
31530
31531
31532
31533 if test $gt_cv_c_wint_t = yes; then
31534 HAVE_WINT_T=1
31535 else
31536 HAVE_WINT_T=0
31537 fi
31538
31539
31540
31541
31542
31543
31544
31545
31546
31547
31548 ac_fn_c_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
31549 #include <wchar.h>
31550
31551 "
31552 if test "x$ac_cv_have_decl_wcsdup" = xyes; then :
31553 ac_have_decl=1
31554 else
31555 ac_have_decl=0
31556 fi
31557
31558 cat >>confdefs.h <<_ACEOF
31559 #define HAVE_DECL_WCSDUP $ac_have_decl
31560 _ACEOF
31561
31562 if test $ac_cv_have_decl_wcsdup = no; then
31563 HAVE_DECL_WCSDUP=0
31564 fi
31565
31566
31567
31568
31569
31570
31571 if test $ac_cv_func_iswcntrl = yes; then
31572 HAVE_ISWCNTRL=1
31573 else
31574 HAVE_ISWCNTRL=0
31575 fi
31576
31577
31578
31579 if test $gt_cv_c_wint_t = yes; then
31580 HAVE_WINT_T=1
31581 else
31582 HAVE_WINT_T=0
31583 fi
31584
31585
31586
31587
31588
31589
31590
31591
31592
31593
31594
31595
31596
31597 if test $gl_cv_have_include_next = yes; then
31598 gl_cv_next_wctype_h='<'wctype.h'>'
31599 else
31600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
31601 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
31602 if ${gl_cv_next_wctype_h+:} false; then :
31603 $as_echo_n "(cached) " >&6
31604 else
31605
31606 if test $ac_cv_header_wctype_h = yes; then
31607
31608
31609
31610
31611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31612 /* end confdefs.h. */
31613 #include <wctype.h>
31614 _ACEOF
31615 case "$host_os" in
31616 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31617 *) gl_absname_cpp="$ac_cpp" ;;
31618 esac
31619
31620 case "$host_os" in
31621 mingw*)
31622 gl_dirsep_regex='[/\\]'
31623 ;;
31624 *)
31625 gl_dirsep_regex='\/'
31626 ;;
31627 esac
31628 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31629 gl_header_literal_regex=`echo 'wctype.h' \
31630 | sed -e "$gl_make_literal_regex_sed"`
31631 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31632 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31633 s|^/[^/]|//&|
31634 p
31635 q
31636 }'
31637
31638 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31639 sed -n "$gl_absolute_header_sed"`
31640
31641 gl_header=$gl_cv_absolute_wctype_h
31642 gl_cv_next_wctype_h='"'$gl_header'"'
31643 else
31644 gl_cv_next_wctype_h='<'wctype.h'>'
31645 fi
31646
31647
31648 fi
31649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
31650 $as_echo "$gl_cv_next_wctype_h" >&6; }
31651 fi
31652 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
31653
31654 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31655 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31656 gl_next_as_first_directive='<'wctype.h'>'
31657 else
31658 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31659 gl_next_as_first_directive=$gl_cv_next_wctype_h
31660 fi
31661 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
31662
31663
31664
31665
31666 if test $ac_cv_header_wctype_h = yes; then
31667 if test $ac_cv_func_iswcntrl = yes; then
31668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
31669 $as_echo_n "checking whether iswcntrl works... " >&6; }
31670 if ${gl_cv_func_iswcntrl_works+:} false; then :
31671 $as_echo_n "(cached) " >&6
31672 else
31673
31674 if test "$cross_compiling" = yes; then :
31675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31676 /* end confdefs.h. */
31677 #include <stdlib.h>
31678 #if __GNU_LIBRARY__ == 1
31679 Linux libc5 i18n is broken.
31680 #endif
31681 int
31682 main ()
31683 {
31684
31685 ;
31686 return 0;
31687 }
31688 _ACEOF
31689 if ac_fn_c_try_compile "$LINENO"; then :
31690 gl_cv_func_iswcntrl_works="guessing yes"
31691 else
31692 gl_cv_func_iswcntrl_works="guessing no"
31693 fi
31694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31695
31696 else
31697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31698 /* end confdefs.h. */
31699
31700 #include <wchar.h>
31701 #include <wctype.h>
31702 int main () { return iswprint ('x') == 0; }
31703
31704 _ACEOF
31705 if ac_fn_c_try_run "$LINENO"; then :
31706 gl_cv_func_iswcntrl_works=yes
31707 else
31708 gl_cv_func_iswcntrl_works=no
31709 fi
31710 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31711 conftest.$ac_objext conftest.beam conftest.$ac_ext
31712 fi
31713
31714
31715 fi
31716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
31717 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
31718 fi
31719 HAVE_WCTYPE_H=1
31720 else
31721 HAVE_WCTYPE_H=0
31722 fi
31723
31724
31725 if test $GNULIB_OVERRIDES_WINT_T = 1; then
31726 REPLACE_ISWCNTRL=1
31727 else
31728 case "$gl_cv_func_iswcntrl_works" in
31729 *yes) REPLACE_ISWCNTRL=0 ;;
31730 *) REPLACE_ISWCNTRL=1 ;;
31731 esac
31732 fi
31733
31734
31735 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
31736 :
31737 fi
31738
31739 if test $REPLACE_ISWCNTRL = 1; then
31740 REPLACE_TOWLOWER=1
31741 else
31742 for ac_func in towlower
31743 do :
31744 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
31745 if test "x$ac_cv_func_towlower" = xyes; then :
31746 cat >>confdefs.h <<_ACEOF
31747 #define HAVE_TOWLOWER 1
31748 _ACEOF
31749
31750 fi
31751 done
31752
31753 if test $ac_cv_func_towlower = yes; then
31754 REPLACE_TOWLOWER=0
31755 else
31756 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
31757 #if HAVE_WCTYPE_H
31758 # include <wctype.h>
31759 #endif
31760
31761 "
31762 if test "x$ac_cv_have_decl_towlower" = xyes; then :
31763 ac_have_decl=1
31764 else
31765 ac_have_decl=0
31766 fi
31767
31768 cat >>confdefs.h <<_ACEOF
31769 #define HAVE_DECL_TOWLOWER $ac_have_decl
31770 _ACEOF
31771
31772 if test $ac_cv_have_decl_towlower = yes; then
31773 REPLACE_TOWLOWER=1
31774 else
31775 REPLACE_TOWLOWER=0
31776 fi
31777 fi
31778 fi
31779
31780
31781 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
31782 :
31783 fi
31784
31785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
31786 $as_echo_n "checking for wctype_t... " >&6; }
31787 if ${gl_cv_type_wctype_t+:} false; then :
31788 $as_echo_n "(cached) " >&6
31789 else
31790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31791 /* end confdefs.h. */
31792 #include <wchar.h>
31793 #if HAVE_WCTYPE_H
31794 # include <wctype.h>
31795 #endif
31796 wctype_t a;
31797
31798 int
31799 main ()
31800 {
31801
31802 ;
31803 return 0;
31804 }
31805 _ACEOF
31806 if ac_fn_c_try_compile "$LINENO"; then :
31807 gl_cv_type_wctype_t=yes
31808 else
31809 gl_cv_type_wctype_t=no
31810 fi
31811 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31812
31813 fi
31814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
31815 $as_echo "$gl_cv_type_wctype_t" >&6; }
31816 if test $gl_cv_type_wctype_t = no; then
31817 HAVE_WCTYPE_T=0
31818 fi
31819
31820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
31821 $as_echo_n "checking for wctrans_t... " >&6; }
31822 if ${gl_cv_type_wctrans_t+:} false; then :
31823 $as_echo_n "(cached) " >&6
31824 else
31825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31826 /* end confdefs.h. */
31827 #include <wchar.h>
31828 #include <wctype.h>
31829 wctrans_t a;
31830
31831 int
31832 main ()
31833 {
31834
31835 ;
31836 return 0;
31837 }
31838 _ACEOF
31839 if ac_fn_c_try_compile "$LINENO"; then :
31840 gl_cv_type_wctrans_t=yes
31841 else
31842 gl_cv_type_wctrans_t=no
31843 fi
31844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31845
31846 fi
31847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
31848 $as_echo "$gl_cv_type_wctrans_t" >&6; }
31849 if test $gl_cv_type_wctrans_t = no; then
31850 HAVE_WCTRANS_T=0
31851 fi
31852
31853
31854
31855
31856
31857
31858 case "$host_os" in
31859 mingw*)
31860
31861
31862
31863
31864
31865
31866
31867
31868 gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext"
31869
31870 ;;
31871 esac
31872
31873 case "$host_os" in
31874 mingw*)
31875
31876
31877
31878
31879
31880
31881
31882
31883 gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext"
31884
31885 ;;
31886 esac
31887
31888 case "$host_os" in
31889 mingw*)
31890
31891
31892
31893
31894
31895
31896
31897
31898 gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext"
31899
31900 ;;
31901 esac
31902
31903 case "$host_os" in
31904 mingw*)
31905
31906
31907
31908
31909
31910
31911
31912
31913 gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext"
31914
31915 ;;
31916 esac
31917
31918
31919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
31920 $as_echo_n "checking for wmemchr... " >&6; }
31921 if ${gl_cv_func_wmemchr+:} false; then :
31922 $as_echo_n "(cached) " >&6
31923 else
31924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31925 /* end confdefs.h. */
31926 #include <wchar.h>
31927
31928 int
31929 main ()
31930 {
31931 return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
31932 ;
31933 return 0;
31934 }
31935
31936 _ACEOF
31937 if ac_fn_c_try_link "$LINENO"; then :
31938 gl_cv_func_wmemchr=yes
31939 else
31940 gl_cv_func_wmemchr=no
31941 fi
31942 rm -f core conftest.err conftest.$ac_objext \
31943 conftest$ac_exeext conftest.$ac_ext
31944
31945 fi
31946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
31947 $as_echo "$gl_cv_func_wmemchr" >&6; }
31948 if test $gl_cv_func_wmemchr = no; then
31949 HAVE_WMEMCHR=0
31950 fi
31951
31952 if test $HAVE_WMEMCHR = 0; then
31953
31954
31955
31956
31957
31958
31959
31960
31961 gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext"
31962
31963 fi
31964
31965
31966
31967
31968
31969 GNULIB_WMEMCHR=1
31970
31971
31972
31973
31974
31975 $as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
31976
31977
31978
31979
31980
31981
31982
31983
31984
31985
31986
31987 if test $ac_cv_func_wmempcpy = no; then
31988 HAVE_WMEMPCPY=0
31989 fi
31990
31991 if test $HAVE_WMEMPCPY = 0; then
31992
31993
31994
31995
31996
31997
31998
31999
32000 gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext"
32001
32002 fi
32003
32004
32005
32006
32007
32008 GNULIB_WMEMPCPY=1
32009
32010
32011
32012
32013
32014 $as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
32015
32016
32017
32018 # End of code from modules
32019
32020
32021
32022
32023
32024
32025
32026
32027
32028 gltests_libdeps=
32029 gltests_ltlibdeps=
32030
32031
32032
32033
32034
32035
32036
32037
32038
32039
32040 gl_source_base='tests'
32041 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
32042
32043 gl_module_indicator_condition=$gltests_WITNESS
32044
32045
32046
32047
32048
32049
32050
32051
32052
32053 LIBGNU_LIBDEPS="$gl_libdeps"
32054
32055 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
32056
32057
32058
32059 am__api_version='1.15'
32060
32061 # Find a good install program. We prefer a C program (faster),
32062 # so one script is as good as another. But avoid the broken or
32063 # incompatible versions:
32064 # SysV /etc/install, /usr/sbin/install
32065 # SunOS /usr/etc/install
32066 # IRIX /sbin/install
32067 # AIX /bin/install
32068 # AmigaOS /C/install, which installs bootblocks on floppy discs
32069 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
32070 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
32071 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
32072 # OS/2's system install, which has a completely different semantic
32073 # ./install, which can be erroneously created by make from ./install.sh.
32074 # Reject install programs that cannot install multiple files.
32075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
32076 $as_echo_n "checking for a BSD-compatible install... " >&6; }
32077 if test -z "$INSTALL"; then
32078 if ${ac_cv_path_install+:} false; then :
32079 $as_echo_n "(cached) " >&6
32080 else
32081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32082 for as_dir in $PATH
32083 do
32084 IFS=$as_save_IFS
32085 test -z "$as_dir" && as_dir=.
32086 # Account for people who put trailing slashes in PATH elements.
32087 case $as_dir/ in #((
32088 ./ | .// | /[cC]/* | \
32089 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
32090 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
32091 /usr/ucb/* ) ;;
32092 *)
32093 # OSF1 and SCO ODT 3.0 have their own names for install.
32094 # Don't use installbsd from OSF since it installs stuff as root
32095 # by default.
32096 for ac_prog in ginstall scoinst install; do
32097 for ac_exec_ext in '' $ac_executable_extensions; do
32098 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
32099 if test $ac_prog = install &&
32100 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
32101 # AIX install. It has an incompatible calling convention.
32102 :
32103 elif test $ac_prog = install &&
32104 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
32105 # program-specific install script used by HP pwplus--don't use.
32106 :
32107 else
32108 rm -rf conftest.one conftest.two conftest.dir
32109 echo one > conftest.one
32110 echo two > conftest.two
32111 mkdir conftest.dir
32112 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
32113 test -s conftest.one && test -s conftest.two &&
32114 test -s conftest.dir/conftest.one &&
32115 test -s conftest.dir/conftest.two
32116 then
32117 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
32118 break 3
32119 fi
32120 fi
32121 fi
32122 done
32123 done
32124 ;;
32125 esac
32126
32127 done
32128 IFS=$as_save_IFS
32129
32130 rm -rf conftest.one conftest.two conftest.dir
32131
32132 fi
32133 if test "${ac_cv_path_install+set}" = set; then
32134 INSTALL=$ac_cv_path_install
32135 else
32136 # As a last resort, use the slow shell script. Don't cache a
32137 # value for INSTALL within a source directory, because that will
32138 # break other packages using the cache if that directory is
32139 # removed, or if the value is a relative name.
32140 INSTALL=$ac_install_sh
32141 fi
32142 fi
32143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
32144 $as_echo "$INSTALL" >&6; }
32145
32146 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
32147 # It thinks the first close brace ends the variable substitution.
32148 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
32149
32150 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
32151
32152 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
32153
32154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
32155 $as_echo_n "checking whether build environment is sane... " >&6; }
32156 # Reject unsafe characters in $srcdir or the absolute working directory
32157 # name. Accept space and tab only in the latter.
32158 am_lf='
32159 '
32160 case `pwd` in
32161 *[\\\"\#\$\&\'\`$am_lf]*)
32162 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
32163 esac
32164 case $srcdir in
32165 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
32166 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
32167 esac
32168
32169 # Do 'set' in a subshell so we don't clobber the current shell's
32170 # arguments. Must try -L first in case configure is actually a
32171 # symlink; some systems play weird games with the mod time of symlinks
32172 # (eg FreeBSD returns the mod time of the symlink's containing
32173 # directory).
32174 if (
32175 am_has_slept=no
32176 for am_try in 1 2; do
32177 echo "timestamp, slept: $am_has_slept" > conftest.file
32178 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
32179 if test "$*" = "X"; then
32180 # -L didn't work.
32181 set X `ls -t "$srcdir/configure" conftest.file`
32182 fi
32183 if test "$*" != "X $srcdir/configure conftest.file" \
32184 && test "$*" != "X conftest.file $srcdir/configure"; then
32185
32186 # If neither matched, then we have a broken ls. This can happen
32187 # if, for instance, CONFIG_SHELL is bash and it inherits a
32188 # broken ls alias from the environment. This has actually
32189 # happened. Such a system could not be considered "sane".
32190 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
32191 alias in your environment" "$LINENO" 5
32192 fi
32193 if test "$2" = conftest.file || test $am_try -eq 2; then
32194 break
32195 fi
32196 # Just in case.
32197 sleep 1
32198 am_has_slept=yes
32199 done
32200 test "$2" = conftest.file
32201 )
32202 then
32203 # Ok.
32204 :
32205 else
32206 as_fn_error $? "newly created file is older than distributed files!
32207 Check your system clock" "$LINENO" 5
32208 fi
32209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32210 $as_echo "yes" >&6; }
32211 # If we didn't sleep, we still need to ensure time stamps of config.status and
32212 # generated files are strictly newer.
32213 am_sleep_pid=
32214 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
32215 ( sleep 1 ) &
32216 am_sleep_pid=$!
32217 fi
32218
32219 rm -f conftest.file
32220
32221 test "$program_prefix" != NONE &&
32222 program_transform_name="s&^&$program_prefix&;$program_transform_name"
32223 # Use a double $ so make ignores it.
32224 test "$program_suffix" != NONE &&
32225 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
32226 # Double any \ or $.
32227 # By default was `s,x,x', remove it if useless.
32228 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
32229 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
32230
32231 # Expand $ac_aux_dir to an absolute path.
32232 am_aux_dir=`cd "$ac_aux_dir" && pwd`
32233
32234 if test x"${MISSING+set}" != xset; then
32235 case $am_aux_dir in
32236 *\ * | *\ *)
32237 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
32238 *)
32239 MISSING="\${SHELL} $am_aux_dir/missing" ;;
32240 esac
32241 fi
32242 # Use eval to expand $SHELL
32243 if eval "$MISSING --is-lightweight"; then
32244 am_missing_run="$MISSING "
32245 else
32246 am_missing_run=
32247 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
32248 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
32249 fi
32250
32251 if test x"${install_sh+set}" != xset; then
32252 case $am_aux_dir in
32253 *\ * | *\ *)
32254 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
32255 *)
32256 install_sh="\${SHELL} $am_aux_dir/install-sh"
32257 esac
32258 fi
32259
32260 # Installed binaries are usually stripped using 'strip' when the user
32261 # run "make install-strip". However 'strip' might not be the right
32262 # tool to use in cross-compilation environments, therefore Automake
32263 # will honor the 'STRIP' environment variable to overrule this program.
32264 if test "$cross_compiling" != no; then
32265 if test -n "$ac_tool_prefix"; then
32266 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
32267 set dummy ${ac_tool_prefix}strip; ac_word=$2
32268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32269 $as_echo_n "checking for $ac_word... " >&6; }
32270 if ${ac_cv_prog_STRIP+:} false; then :
32271 $as_echo_n "(cached) " >&6
32272 else
32273 if test -n "$STRIP"; then
32274 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
32275 else
32276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32277 for as_dir in $PATH
32278 do
32279 IFS=$as_save_IFS
32280 test -z "$as_dir" && as_dir=.
32281 for ac_exec_ext in '' $ac_executable_extensions; do
32282 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32283 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
32284 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32285 break 2
32286 fi
32287 done
32288 done
32289 IFS=$as_save_IFS
32290
32291 fi
32292 fi
32293 STRIP=$ac_cv_prog_STRIP
32294 if test -n "$STRIP"; then
32295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
32296 $as_echo "$STRIP" >&6; }
32297 else
32298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32299 $as_echo "no" >&6; }
32300 fi
32301
32302
32303 fi
32304 if test -z "$ac_cv_prog_STRIP"; then
32305 ac_ct_STRIP=$STRIP
32306 # Extract the first word of "strip", so it can be a program name with args.
32307 set dummy strip; ac_word=$2
32308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32309 $as_echo_n "checking for $ac_word... " >&6; }
32310 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
32311 $as_echo_n "(cached) " >&6
32312 else
32313 if test -n "$ac_ct_STRIP"; then
32314 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
32315 else
32316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32317 for as_dir in $PATH
32318 do
32319 IFS=$as_save_IFS
32320 test -z "$as_dir" && as_dir=.
32321 for ac_exec_ext in '' $ac_executable_extensions; do
32322 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32323 ac_cv_prog_ac_ct_STRIP="strip"
32324 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32325 break 2
32326 fi
32327 done
32328 done
32329 IFS=$as_save_IFS
32330
32331 fi
32332 fi
32333 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
32334 if test -n "$ac_ct_STRIP"; then
32335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
32336 $as_echo "$ac_ct_STRIP" >&6; }
32337 else
32338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32339 $as_echo "no" >&6; }
32340 fi
32341
32342 if test "x$ac_ct_STRIP" = x; then
32343 STRIP=":"
32344 else
32345 case $cross_compiling:$ac_tool_warned in
32346 yes:)
32347 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32348 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32349 ac_tool_warned=yes ;;
32350 esac
32351 STRIP=$ac_ct_STRIP
32352 fi
32353 else
32354 STRIP="$ac_cv_prog_STRIP"
32355 fi
32356
32357 fi
32358 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
32359
32360 for ac_prog in gawk mawk nawk awk
32361 do
32362 # Extract the first word of "$ac_prog", so it can be a program name with args.
32363 set dummy $ac_prog; ac_word=$2
32364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32365 $as_echo_n "checking for $ac_word... " >&6; }
32366 if ${ac_cv_prog_AWK+:} false; then :
32367 $as_echo_n "(cached) " >&6
32368 else
32369 if test -n "$AWK"; then
32370 ac_cv_prog_AWK="$AWK" # Let the user override the test.
32371 else
32372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32373 for as_dir in $PATH
32374 do
32375 IFS=$as_save_IFS
32376 test -z "$as_dir" && as_dir=.
32377 for ac_exec_ext in '' $ac_executable_extensions; do
32378 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32379 ac_cv_prog_AWK="$ac_prog"
32380 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32381 break 2
32382 fi
32383 done
32384 done
32385 IFS=$as_save_IFS
32386
32387 fi
32388 fi
32389 AWK=$ac_cv_prog_AWK
32390 if test -n "$AWK"; then
32391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
32392 $as_echo "$AWK" >&6; }
32393 else
32394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32395 $as_echo "no" >&6; }
32396 fi
32397
32398
32399 test -n "$AWK" && break
32400 done
32401
32402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
32403 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
32404 set x ${MAKE-make}
32405 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
32406 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
32407 $as_echo_n "(cached) " >&6
32408 else
32409 cat >conftest.make <<\_ACEOF
32410 SHELL = /bin/sh
32411 all:
32412 @echo '@@@%%%=$(MAKE)=@@@%%%'
32413 _ACEOF
32414 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
32415 case `${MAKE-make} -f conftest.make 2>/dev/null` in
32416 *@@@%%%=?*=@@@%%%*)
32417 eval ac_cv_prog_make_${ac_make}_set=yes;;
32418 *)
32419 eval ac_cv_prog_make_${ac_make}_set=no;;
32420 esac
32421 rm -f conftest.make
32422 fi
32423 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
32424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32425 $as_echo "yes" >&6; }
32426 SET_MAKE=
32427 else
32428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32429 $as_echo "no" >&6; }
32430 SET_MAKE="MAKE=${MAKE-make}"
32431 fi
32432
32433 rm -rf .tst 2>/dev/null
32434 mkdir .tst 2>/dev/null
32435 if test -d .tst; then
32436 am__leading_dot=.
32437 else
32438 am__leading_dot=_
32439 fi
32440 rmdir .tst 2>/dev/null
32441
32442 DEPDIR="${am__leading_dot}deps"
32443
32444 ac_config_commands="$ac_config_commands depfiles"
32445
32446
32447 am_make=${MAKE-make}
32448 cat > confinc << 'END'
32449 am__doit:
32450 @echo this is the am__doit target
32451 .PHONY: am__doit
32452 END
32453 # If we don't find an include directive, just comment out the code.
32454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
32455 $as_echo_n "checking for style of include used by $am_make... " >&6; }
32456 am__include="#"
32457 am__quote=
32458 _am_result=none
32459 # First try GNU make style include.
32460 echo "include confinc" > confmf
32461 # Ignore all kinds of additional output from 'make'.
32462 case `$am_make -s -f confmf 2> /dev/null` in #(
32463 *the\ am__doit\ target*)
32464 am__include=include
32465 am__quote=
32466 _am_result=GNU
32467 ;;
32468 esac
32469 # Now try BSD make style include.
32470 if test "$am__include" = "#"; then
32471 echo '.include "confinc"' > confmf
32472 case `$am_make -s -f confmf 2> /dev/null` in #(
32473 *the\ am__doit\ target*)
32474 am__include=.include
32475 am__quote="\""
32476 _am_result=BSD
32477 ;;
32478 esac
32479 fi
32480
32481
32482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
32483 $as_echo "$_am_result" >&6; }
32484 rm -f confinc confmf
32485
32486 # Check whether --enable-dependency-tracking was given.
32487 if test "${enable_dependency_tracking+set}" = set; then :
32488 enableval=$enable_dependency_tracking;
32489 fi
32490
32491 if test "x$enable_dependency_tracking" != xno; then
32492 am_depcomp="$ac_aux_dir/depcomp"
32493 AMDEPBACKSLASH='\'
32494 am__nodep='_no'
32495 fi
32496 if test "x$enable_dependency_tracking" != xno; then
32497 AMDEP_TRUE=
32498 AMDEP_FALSE='#'
32499 else
32500 AMDEP_TRUE='#'
32501 AMDEP_FALSE=
32502 fi
32503
32504
32505 # Check whether --enable-silent-rules was given.
32506 if test "${enable_silent_rules+set}" = set; then :
32507 enableval=$enable_silent_rules;
32508 fi
32509
32510 case $enable_silent_rules in # (((
32511 yes) AM_DEFAULT_VERBOSITY=0;;
32512 no) AM_DEFAULT_VERBOSITY=1;;
32513 *) AM_DEFAULT_VERBOSITY=1;;
32514 esac
32515 am_make=${MAKE-make}
32516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
32517 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
32518 if ${am_cv_make_support_nested_variables+:} false; then :
32519 $as_echo_n "(cached) " >&6
32520 else
32521 if $as_echo 'TRUE=$(BAR$(V))
32522 BAR0=false
32523 BAR1=true
32524 V=1
32525 am__doit:
32526 @$(TRUE)
32527 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
32528 am_cv_make_support_nested_variables=yes
32529 else
32530 am_cv_make_support_nested_variables=no
32531 fi
32532 fi
32533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
32534 $as_echo "$am_cv_make_support_nested_variables" >&6; }
32535 if test $am_cv_make_support_nested_variables = yes; then
32536 AM_V='$(V)'
32537 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
32538 else
32539 AM_V=$AM_DEFAULT_VERBOSITY
32540 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
32541 fi
32542 AM_BACKSLASH='\'
32543
32544 if test "`cd $srcdir && pwd`" != "`pwd`"; then
32545 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
32546 # is not polluted with repeated "-I."
32547 am__isrc=' -I$(srcdir)'
32548 # test to see if srcdir already configured
32549 if test -f $srcdir/config.status; then
32550 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
32551 fi
32552 fi
32553
32554 # test whether we have cygpath
32555 if test -z "$CYGPATH_W"; then
32556 if (cygpath --version) >/dev/null 2>/dev/null; then
32557 CYGPATH_W='cygpath -w'
32558 else
32559 CYGPATH_W=echo
32560 fi
32561 fi
32562
32563
32564 # Define the identity of the package.
32565 PACKAGE='libgnu'
32566 VERSION='UNUSED-VERSION'
32567
32568
32569 # Some tools Automake needs.
32570
32571 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
32572
32573
32574 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
32575
32576
32577 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
32578
32579
32580 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
32581
32582
32583 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
32584
32585 # For better backward compatibility. To be removed once Automake 1.9.x
32586 # dies out for good. For more background, see:
32587 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
32588 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
32589 mkdir_p='$(MKDIR_P)'
32590
32591 # We need awk for the "check" target (and possibly the TAP driver). The
32592 # system "awk" is bad on some platforms.
32593 # Always define AMTAR for backward compatibility. Yes, it's still used
32594 # in the wild :-( We should find a proper way to deprecate it ...
32595 AMTAR='$${TAR-tar}'
32596
32597
32598 # We'll loop over all known methods to create a tar archive until one works.
32599 _am_tools='gnutar pax cpio none'
32600
32601 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
32602
32603
32604
32605
32606
32607 depcc="$CC" am_compiler_list=
32608
32609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
32610 $as_echo_n "checking dependency style of $depcc... " >&6; }
32611 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
32612 $as_echo_n "(cached) " >&6
32613 else
32614 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
32615 # We make a subdir and do the tests there. Otherwise we can end up
32616 # making bogus files that we don't know about and never remove. For
32617 # instance it was reported that on HP-UX the gcc test will end up
32618 # making a dummy file named 'D' -- because '-MD' means "put the output
32619 # in D".
32620 rm -rf conftest.dir
32621 mkdir conftest.dir
32622 # Copy depcomp to subdir because otherwise we won't find it if we're
32623 # using a relative directory.
32624 cp "$am_depcomp" conftest.dir
32625 cd conftest.dir
32626 # We will build objects and dependencies in a subdirectory because
32627 # it helps to detect inapplicable dependency modes. For instance
32628 # both Tru64's cc and ICC support -MD to output dependencies as a
32629 # side effect of compilation, but ICC will put the dependencies in
32630 # the current directory while Tru64 will put them in the object
32631 # directory.
32632 mkdir sub
32633
32634 am_cv_CC_dependencies_compiler_type=none
32635 if test "$am_compiler_list" = ""; then
32636 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
32637 fi
32638 am__universal=false
32639 case " $depcc " in #(
32640 *\ -arch\ *\ -arch\ *) am__universal=true ;;
32641 esac
32642
32643 for depmode in $am_compiler_list; do
32644 # Setup a source with many dependencies, because some compilers
32645 # like to wrap large dependency lists on column 80 (with \), and
32646 # we should not choose a depcomp mode which is confused by this.
32647 #
32648 # We need to recreate these files for each test, as the compiler may
32649 # overwrite some of them when testing with obscure command lines.
32650 # This happens at least with the AIX C compiler.
32651 : > sub/conftest.c
32652 for i in 1 2 3 4 5 6; do
32653 echo '#include "conftst'$i'.h"' >> sub/conftest.c
32654 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
32655 # Solaris 10 /bin/sh.
32656 echo '/* dummy */' > sub/conftst$i.h
32657 done
32658 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
32659
32660 # We check with '-c' and '-o' for the sake of the "dashmstdout"
32661 # mode. It turns out that the SunPro C++ compiler does not properly
32662 # handle '-M -o', and we need to detect this. Also, some Intel
32663 # versions had trouble with output in subdirs.
32664 am__obj=sub/conftest.${OBJEXT-o}
32665 am__minus_obj="-o $am__obj"
32666 case $depmode in
32667 gcc)
32668 # This depmode causes a compiler race in universal mode.
32669 test "$am__universal" = false || continue
32670 ;;
32671 nosideeffect)
32672 # After this tag, mechanisms are not by side-effect, so they'll
32673 # only be used when explicitly requested.
32674 if test "x$enable_dependency_tracking" = xyes; then
32675 continue
32676 else
32677 break
32678 fi
32679 ;;
32680 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
32681 # This compiler won't grok '-c -o', but also, the minuso test has
32682 # not run yet. These depmodes are late enough in the game, and
32683 # so weak that their functioning should not be impacted.
32684 am__obj=conftest.${OBJEXT-o}
32685 am__minus_obj=
32686 ;;
32687 none) break ;;
32688 esac
32689 if depmode=$depmode \
32690 source=sub/conftest.c object=$am__obj \
32691 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
32692 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
32693 >/dev/null 2>conftest.err &&
32694 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
32695 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
32696 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
32697 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
32698 # icc doesn't choke on unknown options, it will just issue warnings
32699 # or remarks (even with -Werror). So we grep stderr for any message
32700 # that says an option was ignored or not supported.
32701 # When given -MP, icc 7.0 and 7.1 complain thusly:
32702 # icc: Command line warning: ignoring option '-M'; no argument required
32703 # The diagnosis changed in icc 8.0:
32704 # icc: Command line remark: option '-MP' not supported
32705 if (grep 'ignoring option' conftest.err ||
32706 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
32707 am_cv_CC_dependencies_compiler_type=$depmode
32708 break
32709 fi
32710 fi
32711 done
32712
32713 cd ..
32714 rm -rf conftest.dir
32715 else
32716 am_cv_CC_dependencies_compiler_type=none
32717 fi
32718
32719 fi
32720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
32721 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
32722 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
32723
32724 if
32725 test "x$enable_dependency_tracking" != xno \
32726 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
32727 am__fastdepCC_TRUE=
32728 am__fastdepCC_FALSE='#'
32729 else
32730 am__fastdepCC_TRUE='#'
32731 am__fastdepCC_FALSE=
32732 fi
32733
32734
32735
32736 # POSIX will say in a future version that running "rm -f" with no argument
32737 # is OK; and we want to be able to make that assumption in our Makefile
32738 # recipes. So use an aggressive probe to check that the usage we want is
32739 # actually supported "in the wild" to an acceptable degree.
32740 # See automake bug#10828.
32741 # To make any issue more visible, cause the running configure to be aborted
32742 # by default if the 'rm' program in use doesn't match our expectations; the
32743 # user can still override this though.
32744 if rm -f && rm -fr && rm -rf; then : OK; else
32745 cat >&2 <<'END'
32746 Oops!
32747
32748 Your 'rm' program seems unable to run without file operands specified
32749 on the command line, even when the '-f' option is present. This is contrary
32750 to the behaviour of most rm programs out there, and not conforming with
32751 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
32752
32753 Please tell bug-automake@gnu.org about your system, including the value
32754 of your $PATH and any error possibly output before this message. This
32755 can help us improve future automake versions.
32756
32757 END
32758 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
32759 echo 'Configuration will proceed anyway, since you have set the' >&2
32760 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
32761 echo >&2
32762 else
32763 cat >&2 <<'END'
32764 Aborting the configuration process, to ensure you take notice of the issue.
32765
32766 You can download and install GNU coreutils to get an 'rm' implementation
32767 that behaves properly: <http://www.gnu.org/software/coreutils/>.
32768
32769 If you want to complete the configuration process using your problematic
32770 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
32771 to "yes", and re-run configure.
32772
32773 END
32774 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
32775 fi
32776 fi
32777
32778
32779 # Check whether --enable-silent-rules was given.
32780 if test "${enable_silent_rules+set}" = set; then :
32781 enableval=$enable_silent_rules;
32782 fi
32783
32784 case $enable_silent_rules in # (((
32785 yes) AM_DEFAULT_VERBOSITY=0;;
32786 no) AM_DEFAULT_VERBOSITY=1;;
32787 *) AM_DEFAULT_VERBOSITY=0;;
32788 esac
32789 am_make=${MAKE-make}
32790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
32791 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
32792 if ${am_cv_make_support_nested_variables+:} false; then :
32793 $as_echo_n "(cached) " >&6
32794 else
32795 if $as_echo 'TRUE=$(BAR$(V))
32796 BAR0=false
32797 BAR1=true
32798 V=1
32799 am__doit:
32800 @$(TRUE)
32801 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
32802 am_cv_make_support_nested_variables=yes
32803 else
32804 am_cv_make_support_nested_variables=no
32805 fi
32806 fi
32807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
32808 $as_echo "$am_cv_make_support_nested_variables" >&6; }
32809 if test $am_cv_make_support_nested_variables = yes; then
32810 AM_V='$(V)'
32811 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
32812 else
32813 AM_V=$AM_DEFAULT_VERBOSITY
32814 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
32815 fi
32816 AM_BACKSLASH='\'
32817
32818
32819 # --------------------- #
32820 # Checks for programs. #
32821 # --------------------- #
32822
32823
32824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
32825 $as_echo_n "checking whether ln -s works... " >&6; }
32826 LN_S=$as_ln_s
32827 if test "$LN_S" = "ln -s"; then
32828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32829 $as_echo "yes" >&6; }
32830 else
32831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
32832 $as_echo "no, using $LN_S" >&6; }
32833 fi
32834
32835 if test -n "$ac_tool_prefix"; then
32836 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
32837 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
32838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32839 $as_echo_n "checking for $ac_word... " >&6; }
32840 if ${ac_cv_prog_RANLIB+:} false; then :
32841 $as_echo_n "(cached) " >&6
32842 else
32843 if test -n "$RANLIB"; then
32844 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
32845 else
32846 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32847 for as_dir in $PATH
32848 do
32849 IFS=$as_save_IFS
32850 test -z "$as_dir" && as_dir=.
32851 for ac_exec_ext in '' $ac_executable_extensions; do
32852 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32853 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
32854 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32855 break 2
32856 fi
32857 done
32858 done
32859 IFS=$as_save_IFS
32860
32861 fi
32862 fi
32863 RANLIB=$ac_cv_prog_RANLIB
32864 if test -n "$RANLIB"; then
32865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
32866 $as_echo "$RANLIB" >&6; }
32867 else
32868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32869 $as_echo "no" >&6; }
32870 fi
32871
32872
32873 fi
32874 if test -z "$ac_cv_prog_RANLIB"; then
32875 ac_ct_RANLIB=$RANLIB
32876 # Extract the first word of "ranlib", so it can be a program name with args.
32877 set dummy ranlib; ac_word=$2
32878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32879 $as_echo_n "checking for $ac_word... " >&6; }
32880 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
32881 $as_echo_n "(cached) " >&6
32882 else
32883 if test -n "$ac_ct_RANLIB"; then
32884 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
32885 else
32886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32887 for as_dir in $PATH
32888 do
32889 IFS=$as_save_IFS
32890 test -z "$as_dir" && as_dir=.
32891 for ac_exec_ext in '' $ac_executable_extensions; do
32892 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32893 ac_cv_prog_ac_ct_RANLIB="ranlib"
32894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32895 break 2
32896 fi
32897 done
32898 done
32899 IFS=$as_save_IFS
32900
32901 fi
32902 fi
32903 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
32904 if test -n "$ac_ct_RANLIB"; then
32905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
32906 $as_echo "$ac_ct_RANLIB" >&6; }
32907 else
32908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32909 $as_echo "no" >&6; }
32910 fi
32911
32912 if test "x$ac_ct_RANLIB" = x; then
32913 RANLIB=":"
32914 else
32915 case $cross_compiling:$ac_tool_warned in
32916 yes:)
32917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32918 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32919 ac_tool_warned=yes ;;
32920 esac
32921 RANLIB=$ac_ct_RANLIB
32922 fi
32923 else
32924 RANLIB="$ac_cv_prog_RANLIB"
32925 fi
32926
32927
32928 if test -n "$ac_tool_prefix"; then
32929 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
32930 set dummy ${ac_tool_prefix}ar; ac_word=$2
32931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32932 $as_echo_n "checking for $ac_word... " >&6; }
32933 if ${ac_cv_prog_AR+:} false; then :
32934 $as_echo_n "(cached) " >&6
32935 else
32936 if test -n "$AR"; then
32937 ac_cv_prog_AR="$AR" # Let the user override the test.
32938 else
32939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32940 for as_dir in $PATH
32941 do
32942 IFS=$as_save_IFS
32943 test -z "$as_dir" && as_dir=.
32944 for ac_exec_ext in '' $ac_executable_extensions; do
32945 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32946 ac_cv_prog_AR="${ac_tool_prefix}ar"
32947 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32948 break 2
32949 fi
32950 done
32951 done
32952 IFS=$as_save_IFS
32953
32954 fi
32955 fi
32956 AR=$ac_cv_prog_AR
32957 if test -n "$AR"; then
32958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32959 $as_echo "$AR" >&6; }
32960 else
32961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32962 $as_echo "no" >&6; }
32963 fi
32964
32965
32966 fi
32967 if test -z "$ac_cv_prog_AR"; then
32968 ac_ct_AR=$AR
32969 # Extract the first word of "ar", so it can be a program name with args.
32970 set dummy ar; ac_word=$2
32971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32972 $as_echo_n "checking for $ac_word... " >&6; }
32973 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32974 $as_echo_n "(cached) " >&6
32975 else
32976 if test -n "$ac_ct_AR"; then
32977 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32978 else
32979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32980 for as_dir in $PATH
32981 do
32982 IFS=$as_save_IFS
32983 test -z "$as_dir" && as_dir=.
32984 for ac_exec_ext in '' $ac_executable_extensions; do
32985 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32986 ac_cv_prog_ac_ct_AR="ar"
32987 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32988 break 2
32989 fi
32990 done
32991 done
32992 IFS=$as_save_IFS
32993
32994 fi
32995 fi
32996 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32997 if test -n "$ac_ct_AR"; then
32998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32999 $as_echo "$ac_ct_AR" >&6; }
33000 else
33001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33002 $as_echo "no" >&6; }
33003 fi
33004
33005 if test "x$ac_ct_AR" = x; then
33006 AR=""
33007 else
33008 case $cross_compiling:$ac_tool_warned in
33009 yes:)
33010 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33011 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33012 ac_tool_warned=yes ;;
33013 esac
33014 AR=$ac_ct_AR
33015 fi
33016 else
33017 AR="$ac_cv_prog_AR"
33018 fi
33019
33020
33021 # ---------------------- #
33022 # Checks for libraries. #
33023 # ---------------------- #
33024
33025 ac_config_files="$ac_config_files Makefile.gnulib.inc"
33026
33027
33028 ac_config_files="$ac_config_files Makefile import/Makefile"
33029
33030 ac_config_commands="$ac_config_commands default"
33031
33032 cat >confcache <<\_ACEOF
33033 # This file is a shell script that caches the results of configure
33034 # tests run on this system so they can be shared between configure
33035 # scripts and configure runs, see configure's option --config-cache.
33036 # It is not useful on other systems. If it contains results you don't
33037 # want to keep, you may remove or edit it.
33038 #
33039 # config.status only pays attention to the cache file if you give it
33040 # the --recheck option to rerun configure.
33041 #
33042 # `ac_cv_env_foo' variables (set or unset) will be overridden when
33043 # loading this file, other *unset* `ac_cv_foo' will be assigned the
33044 # following values.
33045
33046 _ACEOF
33047
33048 # The following way of writing the cache mishandles newlines in values,
33049 # but we know of no workaround that is simple, portable, and efficient.
33050 # So, we kill variables containing newlines.
33051 # Ultrix sh set writes to stderr and can't be redirected directly,
33052 # and sets the high bit in the cache file unless we assign to the vars.
33053 (
33054 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33055 eval ac_val=\$$ac_var
33056 case $ac_val in #(
33057 *${as_nl}*)
33058 case $ac_var in #(
33059 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33060 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33061 esac
33062 case $ac_var in #(
33063 _ | IFS | as_nl) ;; #(
33064 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33065 *) { eval $ac_var=; unset $ac_var;} ;;
33066 esac ;;
33067 esac
33068 done
33069
33070 (set) 2>&1 |
33071 case $as_nl`(ac_space=' '; set) 2>&1` in #(
33072 *${as_nl}ac_space=\ *)
33073 # `set' does not quote correctly, so add quotes: double-quote
33074 # substitution turns \\\\ into \\, and sed turns \\ into \.
33075 sed -n \
33076 "s/'/'\\\\''/g;
33077 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33078 ;; #(
33079 *)
33080 # `set' quotes correctly as required by POSIX, so do not add quotes.
33081 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33082 ;;
33083 esac |
33084 sort
33085 ) |
33086 sed '
33087 /^ac_cv_env_/b end
33088 t clear
33089 :clear
33090 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33091 t end
33092 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33093 :end' >>confcache
33094 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33095 if test -w "$cache_file"; then
33096 if test "x$cache_file" != "x/dev/null"; then
33097 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33098 $as_echo "$as_me: updating cache $cache_file" >&6;}
33099 if test ! -f "$cache_file" || test -h "$cache_file"; then
33100 cat confcache >"$cache_file"
33101 else
33102 case $cache_file in #(
33103 */* | ?:*)
33104 mv -f confcache "$cache_file"$$ &&
33105 mv -f "$cache_file"$$ "$cache_file" ;; #(
33106 *)
33107 mv -f confcache "$cache_file" ;;
33108 esac
33109 fi
33110 fi
33111 else
33112 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33113 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33114 fi
33115 fi
33116 rm -f confcache
33117
33118 test "x$prefix" = xNONE && prefix=$ac_default_prefix
33119 # Let make expand exec_prefix.
33120 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33121
33122 DEFS=-DHAVE_CONFIG_H
33123
33124 ac_libobjs=
33125 ac_ltlibobjs=
33126 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33127 # 1. Remove the extension, and $U if already installed.
33128 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33129 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33130 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
33131 # will be set to the directory where LIBOBJS objects are built.
33132 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33133 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33134 done
33135 LIBOBJS=$ac_libobjs
33136
33137 LTLIBOBJS=$ac_ltlibobjs
33138
33139
33140 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
33141 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
33142 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33143 fi
33144 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
33145 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
33146 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33147 fi
33148 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
33149 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
33150 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33151 fi
33152 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
33153 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
33154 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33155 fi
33156 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
33157 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
33158 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33159 fi
33160 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
33161 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
33162 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33163 fi
33164 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
33165 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
33166 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33167 fi
33168 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
33169 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
33170 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33171 fi
33172 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
33173 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
33174 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33175 fi
33176 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
33177 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
33178 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33179 fi
33180 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
33181 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
33182 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33183 fi
33184 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
33185 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
33186 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33187 fi
33188
33189
33190 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
33191 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
33192 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33193 fi
33194 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
33195 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
33196 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33197 fi
33198 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
33199 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
33200 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33201 fi
33202 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
33203 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
33204 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33205 fi
33206 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
33207 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
33208 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33209 fi
33210
33211 gl_libobjs=
33212 gl_ltlibobjs=
33213 if test -n "$gl_LIBOBJS"; then
33214 # Remove the extension.
33215 sed_drop_objext='s/\.o$//;s/\.obj$//'
33216 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
33217 gl_libobjs="$gl_libobjs $i.$ac_objext"
33218 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
33219 done
33220 fi
33221 gl_LIBOBJS=$gl_libobjs
33222
33223 gl_LTLIBOBJS=$gl_ltlibobjs
33224
33225
33226
33227 gltests_libobjs=
33228 gltests_ltlibobjs=
33229 if test -n "$gltests_LIBOBJS"; then
33230 # Remove the extension.
33231 sed_drop_objext='s/\.o$//;s/\.obj$//'
33232 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
33233 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
33234 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
33235 done
33236 fi
33237 gltests_LIBOBJS=$gltests_libobjs
33238
33239 gltests_LTLIBOBJS=$gltests_ltlibobjs
33240
33241
33242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
33243 $as_echo_n "checking that generated files are newer than configure... " >&6; }
33244 if test -n "$am_sleep_pid"; then
33245 # Hide warnings about reused PIDs.
33246 wait $am_sleep_pid 2>/dev/null
33247 fi
33248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
33249 $as_echo "done" >&6; }
33250 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
33251 as_fn_error $? "conditional \"AMDEP\" was never defined.
33252 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33253 fi
33254 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
33255 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
33256 Usually this means the macro was only invoked conditionally." "$LINENO" 5
33257 fi
33258 if test -n "$EXEEXT"; then
33259 am__EXEEXT_TRUE=
33260 am__EXEEXT_FALSE='#'
33261 else
33262 am__EXEEXT_TRUE='#'
33263 am__EXEEXT_FALSE=
33264 fi
33265
33266
33267 : "${CONFIG_STATUS=./config.status}"
33268 ac_write_fail=0
33269 ac_clean_files_save=$ac_clean_files
33270 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33271 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33272 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33273 as_write_fail=0
33274 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33275 #! $SHELL
33276 # Generated by $as_me.
33277 # Run this file to recreate the current configuration.
33278 # Compiler output produced by configure, useful for debugging
33279 # configure, is in config.log if it exists.
33280
33281 debug=false
33282 ac_cs_recheck=false
33283 ac_cs_silent=false
33284
33285 SHELL=\${CONFIG_SHELL-$SHELL}
33286 export SHELL
33287 _ASEOF
33288 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33289 ## -------------------- ##
33290 ## M4sh Initialization. ##
33291 ## -------------------- ##
33292
33293 # Be more Bourne compatible
33294 DUALCASE=1; export DUALCASE # for MKS sh
33295 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33296 emulate sh
33297 NULLCMD=:
33298 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33299 # is contrary to our usage. Disable this feature.
33300 alias -g '${1+"$@"}'='"$@"'
33301 setopt NO_GLOB_SUBST
33302 else
33303 case `(set -o) 2>/dev/null` in #(
33304 *posix*) :
33305 set -o posix ;; #(
33306 *) :
33307 ;;
33308 esac
33309 fi
33310
33311
33312 as_nl='
33313 '
33314 export as_nl
33315 # Printing a long string crashes Solaris 7 /usr/bin/printf.
33316 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33317 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33318 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33319 # Prefer a ksh shell builtin over an external printf program on Solaris,
33320 # but without wasting forks for bash or zsh.
33321 if test -z "$BASH_VERSION$ZSH_VERSION" \
33322 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33323 as_echo='print -r --'
33324 as_echo_n='print -rn --'
33325 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33326 as_echo='printf %s\n'
33327 as_echo_n='printf %s'
33328 else
33329 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33330 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33331 as_echo_n='/usr/ucb/echo -n'
33332 else
33333 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33334 as_echo_n_body='eval
33335 arg=$1;
33336 case $arg in #(
33337 *"$as_nl"*)
33338 expr "X$arg" : "X\\(.*\\)$as_nl";
33339 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33340 esac;
33341 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33342 '
33343 export as_echo_n_body
33344 as_echo_n='sh -c $as_echo_n_body as_echo'
33345 fi
33346 export as_echo_body
33347 as_echo='sh -c $as_echo_body as_echo'
33348 fi
33349
33350 # The user is always right.
33351 if test "${PATH_SEPARATOR+set}" != set; then
33352 PATH_SEPARATOR=:
33353 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33354 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33355 PATH_SEPARATOR=';'
33356 }
33357 fi
33358
33359
33360 # IFS
33361 # We need space, tab and new line, in precisely that order. Quoting is
33362 # there to prevent editors from complaining about space-tab.
33363 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
33364 # splitting by setting IFS to empty value.)
33365 IFS=" "" $as_nl"
33366
33367 # Find who we are. Look in the path if we contain no directory separator.
33368 as_myself=
33369 case $0 in #((
33370 *[\\/]* ) as_myself=$0 ;;
33371 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33372 for as_dir in $PATH
33373 do
33374 IFS=$as_save_IFS
33375 test -z "$as_dir" && as_dir=.
33376 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33377 done
33378 IFS=$as_save_IFS
33379
33380 ;;
33381 esac
33382 # We did not find ourselves, most probably we were run as `sh COMMAND'
33383 # in which case we are not to be found in the path.
33384 if test "x$as_myself" = x; then
33385 as_myself=$0
33386 fi
33387 if test ! -f "$as_myself"; then
33388 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33389 exit 1
33390 fi
33391
33392 # Unset variables that we do not need and which cause bugs (e.g. in
33393 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
33394 # suppresses any "Segmentation fault" message there. '((' could
33395 # trigger a bug in pdksh 5.2.14.
33396 for as_var in BASH_ENV ENV MAIL MAILPATH
33397 do eval test x\${$as_var+set} = xset \
33398 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33399 done
33400 PS1='$ '
33401 PS2='> '
33402 PS4='+ '
33403
33404 # NLS nuisances.
33405 LC_ALL=C
33406 export LC_ALL
33407 LANGUAGE=C
33408 export LANGUAGE
33409
33410 # CDPATH.
33411 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33412
33413
33414 # as_fn_error STATUS ERROR [LINENO LOG_FD]
33415 # ----------------------------------------
33416 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33417 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33418 # script with STATUS, using 1 if that was 0.
33419 as_fn_error ()
33420 {
33421 as_status=$1; test $as_status -eq 0 && as_status=1
33422 if test "$4"; then
33423 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33424 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33425 fi
33426 $as_echo "$as_me: error: $2" >&2
33427 as_fn_exit $as_status
33428 } # as_fn_error
33429
33430
33431 # as_fn_set_status STATUS
33432 # -----------------------
33433 # Set $? to STATUS, without forking.
33434 as_fn_set_status ()
33435 {
33436 return $1
33437 } # as_fn_set_status
33438
33439 # as_fn_exit STATUS
33440 # -----------------
33441 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33442 as_fn_exit ()
33443 {
33444 set +e
33445 as_fn_set_status $1
33446 exit $1
33447 } # as_fn_exit
33448
33449 # as_fn_unset VAR
33450 # ---------------
33451 # Portably unset VAR.
33452 as_fn_unset ()
33453 {
33454 { eval $1=; unset $1;}
33455 }
33456 as_unset=as_fn_unset
33457 # as_fn_append VAR VALUE
33458 # ----------------------
33459 # Append the text in VALUE to the end of the definition contained in VAR. Take
33460 # advantage of any shell optimizations that allow amortized linear growth over
33461 # repeated appends, instead of the typical quadratic growth present in naive
33462 # implementations.
33463 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33464 eval 'as_fn_append ()
33465 {
33466 eval $1+=\$2
33467 }'
33468 else
33469 as_fn_append ()
33470 {
33471 eval $1=\$$1\$2
33472 }
33473 fi # as_fn_append
33474
33475 # as_fn_arith ARG...
33476 # ------------------
33477 # Perform arithmetic evaluation on the ARGs, and store the result in the
33478 # global $as_val. Take advantage of shells that can avoid forks. The arguments
33479 # must be portable across $(()) and expr.
33480 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33481 eval 'as_fn_arith ()
33482 {
33483 as_val=$(( $* ))
33484 }'
33485 else
33486 as_fn_arith ()
33487 {
33488 as_val=`expr "$@" || test $? -eq 1`
33489 }
33490 fi # as_fn_arith
33491
33492
33493 if expr a : '\(a\)' >/dev/null 2>&1 &&
33494 test "X`expr 00001 : '.*\(...\)'`" = X001; then
33495 as_expr=expr
33496 else
33497 as_expr=false
33498 fi
33499
33500 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33501 as_basename=basename
33502 else
33503 as_basename=false
33504 fi
33505
33506 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33507 as_dirname=dirname
33508 else
33509 as_dirname=false
33510 fi
33511
33512 as_me=`$as_basename -- "$0" ||
33513 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33514 X"$0" : 'X\(//\)$' \| \
33515 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33516 $as_echo X/"$0" |
33517 sed '/^.*\/\([^/][^/]*\)\/*$/{
33518 s//\1/
33519 q
33520 }
33521 /^X\/\(\/\/\)$/{
33522 s//\1/
33523 q
33524 }
33525 /^X\/\(\/\).*/{
33526 s//\1/
33527 q
33528 }
33529 s/.*/./; q'`
33530
33531 # Avoid depending upon Character Ranges.
33532 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33533 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33534 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33535 as_cr_digits='0123456789'
33536 as_cr_alnum=$as_cr_Letters$as_cr_digits
33537
33538 ECHO_C= ECHO_N= ECHO_T=
33539 case `echo -n x` in #(((((
33540 -n*)
33541 case `echo 'xy\c'` in
33542 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
33543 xy) ECHO_C='\c';;
33544 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
33545 ECHO_T=' ';;
33546 esac;;
33547 *)
33548 ECHO_N='-n';;
33549 esac
33550
33551 rm -f conf$$ conf$$.exe conf$$.file
33552 if test -d conf$$.dir; then
33553 rm -f conf$$.dir/conf$$.file
33554 else
33555 rm -f conf$$.dir
33556 mkdir conf$$.dir 2>/dev/null
33557 fi
33558 if (echo >conf$$.file) 2>/dev/null; then
33559 if ln -s conf$$.file conf$$ 2>/dev/null; then
33560 as_ln_s='ln -s'
33561 # ... but there are two gotchas:
33562 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33563 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33564 # In both cases, we have to default to `cp -pR'.
33565 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33566 as_ln_s='cp -pR'
33567 elif ln conf$$.file conf$$ 2>/dev/null; then
33568 as_ln_s=ln
33569 else
33570 as_ln_s='cp -pR'
33571 fi
33572 else
33573 as_ln_s='cp -pR'
33574 fi
33575 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33576 rmdir conf$$.dir 2>/dev/null
33577
33578
33579 # as_fn_mkdir_p
33580 # -------------
33581 # Create "$as_dir" as a directory, including parents if necessary.
33582 as_fn_mkdir_p ()
33583 {
33584
33585 case $as_dir in #(
33586 -*) as_dir=./$as_dir;;
33587 esac
33588 test -d "$as_dir" || eval $as_mkdir_p || {
33589 as_dirs=
33590 while :; do
33591 case $as_dir in #(
33592 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33593 *) as_qdir=$as_dir;;
33594 esac
33595 as_dirs="'$as_qdir' $as_dirs"
33596 as_dir=`$as_dirname -- "$as_dir" ||
33597 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33598 X"$as_dir" : 'X\(//\)[^/]' \| \
33599 X"$as_dir" : 'X\(//\)$' \| \
33600 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33601 $as_echo X"$as_dir" |
33602 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33603 s//\1/
33604 q
33605 }
33606 /^X\(\/\/\)[^/].*/{
33607 s//\1/
33608 q
33609 }
33610 /^X\(\/\/\)$/{
33611 s//\1/
33612 q
33613 }
33614 /^X\(\/\).*/{
33615 s//\1/
33616 q
33617 }
33618 s/.*/./; q'`
33619 test -d "$as_dir" && break
33620 done
33621 test -z "$as_dirs" || eval "mkdir $as_dirs"
33622 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33623
33624
33625 } # as_fn_mkdir_p
33626 if mkdir -p . 2>/dev/null; then
33627 as_mkdir_p='mkdir -p "$as_dir"'
33628 else
33629 test -d ./-p && rmdir ./-p
33630 as_mkdir_p=false
33631 fi
33632
33633
33634 # as_fn_executable_p FILE
33635 # -----------------------
33636 # Test if FILE is an executable regular file.
33637 as_fn_executable_p ()
33638 {
33639 test -f "$1" && test -x "$1"
33640 } # as_fn_executable_p
33641 as_test_x='test -x'
33642 as_executable_p=as_fn_executable_p
33643
33644 # Sed expression to map a string onto a valid CPP name.
33645 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33646
33647 # Sed expression to map a string onto a valid variable name.
33648 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33649
33650
33651 exec 6>&1
33652 ## ----------------------------------- ##
33653 ## Main body of $CONFIG_STATUS script. ##
33654 ## ----------------------------------- ##
33655 _ASEOF
33656 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33657
33658 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33659 # Save the log message, to keep $0 and so on meaningful, and to
33660 # report actual input values of CONFIG_FILES etc. instead of their
33661 # values after options handling.
33662 ac_log="
33663 This file was extended by libgnu $as_me UNUSED-VERSION, which was
33664 generated by GNU Autoconf 2.69. Invocation command line was
33665
33666 CONFIG_FILES = $CONFIG_FILES
33667 CONFIG_HEADERS = $CONFIG_HEADERS
33668 CONFIG_LINKS = $CONFIG_LINKS
33669 CONFIG_COMMANDS = $CONFIG_COMMANDS
33670 $ $0 $@
33671
33672 on `(hostname || uname -n) 2>/dev/null | sed 1q`
33673 "
33674
33675 _ACEOF
33676
33677 case $ac_config_files in *"
33678 "*) set x $ac_config_files; shift; ac_config_files=$*;;
33679 esac
33680
33681 case $ac_config_headers in *"
33682 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33683 esac
33684
33685
33686 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33687 # Files that config.status was made for.
33688 config_files="$ac_config_files"
33689 config_headers="$ac_config_headers"
33690 config_commands="$ac_config_commands"
33691
33692 _ACEOF
33693
33694 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33695 ac_cs_usage="\
33696 \`$as_me' instantiates files and other configuration actions
33697 from templates according to the current configuration. Unless the files
33698 and actions are specified as TAGs, all are instantiated by default.
33699
33700 Usage: $0 [OPTION]... [TAG]...
33701
33702 -h, --help print this help, then exit
33703 -V, --version print version number and configuration settings, then exit
33704 --config print configuration, then exit
33705 -q, --quiet, --silent
33706 do not print progress messages
33707 -d, --debug don't remove temporary files
33708 --recheck update $as_me by reconfiguring in the same conditions
33709 --file=FILE[:TEMPLATE]
33710 instantiate the configuration file FILE
33711 --header=FILE[:TEMPLATE]
33712 instantiate the configuration header FILE
33713
33714 Configuration files:
33715 $config_files
33716
33717 Configuration headers:
33718 $config_headers
33719
33720 Configuration commands:
33721 $config_commands
33722
33723 Report bugs to the package provider."
33724
33725 _ACEOF
33726 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33727 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33728 ac_cs_version="\\
33729 libgnu config.status UNUSED-VERSION
33730 configured by $0, generated by GNU Autoconf 2.69,
33731 with options \\"\$ac_cs_config\\"
33732
33733 Copyright (C) 2012 Free Software Foundation, Inc.
33734 This config.status script is free software; the Free Software Foundation
33735 gives unlimited permission to copy, distribute and modify it."
33736
33737 ac_pwd='$ac_pwd'
33738 srcdir='$srcdir'
33739 INSTALL='$INSTALL'
33740 MKDIR_P='$MKDIR_P'
33741 AWK='$AWK'
33742 test -n "\$AWK" || AWK=awk
33743 _ACEOF
33744
33745 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33746 # The default lists apply if the user does not specify any file.
33747 ac_need_defaults=:
33748 while test $# != 0
33749 do
33750 case $1 in
33751 --*=?*)
33752 ac_option=`expr "X$1" : 'X\([^=]*\)='`
33753 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33754 ac_shift=:
33755 ;;
33756 --*=)
33757 ac_option=`expr "X$1" : 'X\([^=]*\)='`
33758 ac_optarg=
33759 ac_shift=:
33760 ;;
33761 *)
33762 ac_option=$1
33763 ac_optarg=$2
33764 ac_shift=shift
33765 ;;
33766 esac
33767
33768 case $ac_option in
33769 # Handling of the options.
33770 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33771 ac_cs_recheck=: ;;
33772 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33773 $as_echo "$ac_cs_version"; exit ;;
33774 --config | --confi | --conf | --con | --co | --c )
33775 $as_echo "$ac_cs_config"; exit ;;
33776 --debug | --debu | --deb | --de | --d | -d )
33777 debug=: ;;
33778 --file | --fil | --fi | --f )
33779 $ac_shift
33780 case $ac_optarg in
33781 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33782 '') as_fn_error $? "missing file argument" ;;
33783 esac
33784 as_fn_append CONFIG_FILES " '$ac_optarg'"
33785 ac_need_defaults=false;;
33786 --header | --heade | --head | --hea )
33787 $ac_shift
33788 case $ac_optarg in
33789 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33790 esac
33791 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33792 ac_need_defaults=false;;
33793 --he | --h)
33794 # Conflict between --help and --header
33795 as_fn_error $? "ambiguous option: \`$1'
33796 Try \`$0 --help' for more information.";;
33797 --help | --hel | -h )
33798 $as_echo "$ac_cs_usage"; exit ;;
33799 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33800 | -silent | --silent | --silen | --sile | --sil | --si | --s)
33801 ac_cs_silent=: ;;
33802
33803 # This is an error.
33804 -*) as_fn_error $? "unrecognized option: \`$1'
33805 Try \`$0 --help' for more information." ;;
33806
33807 *) as_fn_append ac_config_targets " $1"
33808 ac_need_defaults=false ;;
33809
33810 esac
33811 shift
33812 done
33813
33814 ac_configure_extra_args=
33815
33816 if $ac_cs_silent; then
33817 exec 6>/dev/null
33818 ac_configure_extra_args="$ac_configure_extra_args --silent"
33819 fi
33820
33821 _ACEOF
33822 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33823 if \$ac_cs_recheck; then
33824 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33825 shift
33826 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33827 CONFIG_SHELL='$SHELL'
33828 export CONFIG_SHELL
33829 exec "\$@"
33830 fi
33831
33832 _ACEOF
33833 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33834 exec 5>>config.log
33835 {
33836 echo
33837 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33838 ## Running $as_me. ##
33839 _ASBOX
33840 $as_echo "$ac_log"
33841 } >&5
33842
33843 _ACEOF
33844 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33845 #
33846 # INIT-COMMANDS
33847 #
33848 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
33849
33850 _ACEOF
33851
33852 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33853
33854 # Handling of arguments.
33855 for ac_config_target in $ac_config_targets
33856 do
33857 case $ac_config_target in
33858 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
33859 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
33860 "Makefile.gnulib.inc") CONFIG_FILES="$CONFIG_FILES Makefile.gnulib.inc" ;;
33861 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
33862 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
33863 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
33864
33865 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33866 esac
33867 done
33868
33869
33870 # If the user did not use the arguments to specify the items to instantiate,
33871 # then the envvar interface is used. Set only those that are not.
33872 # We use the long form for the default assignment because of an extremely
33873 # bizarre bug on SunOS 4.1.3.
33874 if $ac_need_defaults; then
33875 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33876 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33877 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
33878 fi
33879
33880 # Have a temporary directory for convenience. Make it in the build tree
33881 # simply because there is no reason against having it here, and in addition,
33882 # creating and moving files from /tmp can sometimes cause problems.
33883 # Hook for its removal unless debugging.
33884 # Note that there is a small window in which the directory will not be cleaned:
33885 # after its creation but before its name has been assigned to `$tmp'.
33886 $debug ||
33887 {
33888 tmp= ac_tmp=
33889 trap 'exit_status=$?
33890 : "${ac_tmp:=$tmp}"
33891 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33892 ' 0
33893 trap 'as_fn_exit 1' 1 2 13 15
33894 }
33895 # Create a (secure) tmp directory for tmp files.
33896
33897 {
33898 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33899 test -d "$tmp"
33900 } ||
33901 {
33902 tmp=./conf$$-$RANDOM
33903 (umask 077 && mkdir "$tmp")
33904 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33905 ac_tmp=$tmp
33906
33907 # Set up the scripts for CONFIG_FILES section.
33908 # No need to generate them if there are no CONFIG_FILES.
33909 # This happens for instance with `./config.status config.h'.
33910 if test -n "$CONFIG_FILES"; then
33911
33912
33913 ac_cr=`echo X | tr X '\015'`
33914 # On cygwin, bash can eat \r inside `` if the user requested igncr.
33915 # But we know of no other shell where ac_cr would be empty at this
33916 # point, so we can use a bashism as a fallback.
33917 if test "x$ac_cr" = x; then
33918 eval ac_cr=\$\'\\r\'
33919 fi
33920 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33921 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33922 ac_cs_awk_cr='\\r'
33923 else
33924 ac_cs_awk_cr=$ac_cr
33925 fi
33926
33927 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33928 _ACEOF
33929
33930
33931 {
33932 echo "cat >conf$$subs.awk <<_ACEOF" &&
33933 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33934 echo "_ACEOF"
33935 } >conf$$subs.sh ||
33936 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33937 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33938 ac_delim='%!_!# '
33939 for ac_last_try in false false false false false :; do
33940 . ./conf$$subs.sh ||
33941 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33942
33943 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33944 if test $ac_delim_n = $ac_delim_num; then
33945 break
33946 elif $ac_last_try; then
33947 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33948 else
33949 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33950 fi
33951 done
33952 rm -f conf$$subs.sh
33953
33954 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33955 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
33956 _ACEOF
33957 sed -n '
33958 h
33959 s/^/S["/; s/!.*/"]=/
33960 p
33961 g
33962 s/^[^!]*!//
33963 :repl
33964 t repl
33965 s/'"$ac_delim"'$//
33966 t delim
33967 :nl
33968 h
33969 s/\(.\{148\}\)..*/\1/
33970 t more1
33971 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33972 p
33973 n
33974 b repl
33975 :more1
33976 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33977 p
33978 g
33979 s/.\{148\}//
33980 t nl
33981 :delim
33982 h
33983 s/\(.\{148\}\)..*/\1/
33984 t more2
33985 s/["\\]/\\&/g; s/^/"/; s/$/"/
33986 p
33987 b
33988 :more2
33989 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33990 p
33991 g
33992 s/.\{148\}//
33993 t delim
33994 ' <conf$$subs.awk | sed '
33995 /^[^""]/{
33996 N
33997 s/\n//
33998 }
33999 ' >>$CONFIG_STATUS || ac_write_fail=1
34000 rm -f conf$$subs.awk
34001 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34002 _ACAWK
34003 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34004 for (key in S) S_is_set[key] = 1
34005 FS = "\a"
34006
34007 }
34008 {
34009 line = $ 0
34010 nfields = split(line, field, "@")
34011 substed = 0
34012 len = length(field[1])
34013 for (i = 2; i < nfields; i++) {
34014 key = field[i]
34015 keylen = length(key)
34016 if (S_is_set[key]) {
34017 value = S[key]
34018 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34019 len += length(value) + length(field[++i])
34020 substed = 1
34021 } else
34022 len += 1 + keylen
34023 }
34024
34025 print line
34026 }
34027
34028 _ACAWK
34029 _ACEOF
34030 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34031 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34032 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34033 else
34034 cat
34035 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34036 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34037 _ACEOF
34038
34039 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34040 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34041 # trailing colons and then remove the whole line if VPATH becomes empty
34042 # (actually we leave an empty line to preserve line numbers).
34043 if test "x$srcdir" = x.; then
34044 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
34045 h
34046 s///
34047 s/^/:/
34048 s/[ ]*$/:/
34049 s/:\$(srcdir):/:/g
34050 s/:\${srcdir}:/:/g
34051 s/:@srcdir@:/:/g
34052 s/^:*//
34053 s/:*$//
34054 x
34055 s/\(=[ ]*\).*/\1/
34056 G
34057 s/\n//
34058 s/^[^=]*=[ ]*$//
34059 }'
34060 fi
34061
34062 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34063 fi # test -n "$CONFIG_FILES"
34064
34065 # Set up the scripts for CONFIG_HEADERS section.
34066 # No need to generate them if there are no CONFIG_HEADERS.
34067 # This happens for instance with `./config.status Makefile'.
34068 if test -n "$CONFIG_HEADERS"; then
34069 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34070 BEGIN {
34071 _ACEOF
34072
34073 # Transform confdefs.h into an awk script `defines.awk', embedded as
34074 # here-document in config.status, that substitutes the proper values into
34075 # config.h.in to produce config.h.
34076
34077 # Create a delimiter string that does not exist in confdefs.h, to ease
34078 # handling of long lines.
34079 ac_delim='%!_!# '
34080 for ac_last_try in false false :; do
34081 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34082 if test -z "$ac_tt"; then
34083 break
34084 elif $ac_last_try; then
34085 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34086 else
34087 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34088 fi
34089 done
34090
34091 # For the awk script, D is an array of macro values keyed by name,
34092 # likewise P contains macro parameters if any. Preserve backslash
34093 # newline sequences.
34094
34095 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34096 sed -n '
34097 s/.\{148\}/&'"$ac_delim"'/g
34098 t rset
34099 :rset
34100 s/^[ ]*#[ ]*define[ ][ ]*/ /
34101 t def
34102 d
34103 :def
34104 s/\\$//
34105 t bsnl
34106 s/["\\]/\\&/g
34107 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
34108 D["\1"]=" \3"/p
34109 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
34110 d
34111 :bsnl
34112 s/["\\]/\\&/g
34113 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
34114 D["\1"]=" \3\\\\\\n"\\/p
34115 t cont
34116 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34117 t cont
34118 d
34119 :cont
34120 n
34121 s/.\{148\}/&'"$ac_delim"'/g
34122 t clear
34123 :clear
34124 s/\\$//
34125 t bsnlc
34126 s/["\\]/\\&/g; s/^/"/; s/$/"/p
34127 d
34128 :bsnlc
34129 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34130 b cont
34131 ' <confdefs.h | sed '
34132 s/'"$ac_delim"'/"\\\
34133 "/g' >>$CONFIG_STATUS || ac_write_fail=1
34134
34135 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34136 for (key in D) D_is_set[key] = 1
34137 FS = "\a"
34138 }
34139 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34140 line = \$ 0
34141 split(line, arg, " ")
34142 if (arg[1] == "#") {
34143 defundef = arg[2]
34144 mac1 = arg[3]
34145 } else {
34146 defundef = substr(arg[1], 2)
34147 mac1 = arg[2]
34148 }
34149 split(mac1, mac2, "(") #)
34150 macro = mac2[1]
34151 prefix = substr(line, 1, index(line, defundef) - 1)
34152 if (D_is_set[macro]) {
34153 # Preserve the white space surrounding the "#".
34154 print prefix "define", macro P[macro] D[macro]
34155 next
34156 } else {
34157 # Replace #undef with comments. This is necessary, for example,
34158 # in the case of _POSIX_SOURCE, which is predefined and required
34159 # on some systems where configure will not decide to define it.
34160 if (defundef == "undef") {
34161 print "/*", prefix defundef, macro, "*/"
34162 next
34163 }
34164 }
34165 }
34166 { print }
34167 _ACAWK
34168 _ACEOF
34169 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34170 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34171 fi # test -n "$CONFIG_HEADERS"
34172
34173
34174 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
34175 shift
34176 for ac_tag
34177 do
34178 case $ac_tag in
34179 :[FHLC]) ac_mode=$ac_tag; continue;;
34180 esac
34181 case $ac_mode$ac_tag in
34182 :[FHL]*:*);;
34183 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34184 :[FH]-) ac_tag=-:-;;
34185 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34186 esac
34187 ac_save_IFS=$IFS
34188 IFS=:
34189 set x $ac_tag
34190 IFS=$ac_save_IFS
34191 shift
34192 ac_file=$1
34193 shift
34194
34195 case $ac_mode in
34196 :L) ac_source=$1;;
34197 :[FH])
34198 ac_file_inputs=
34199 for ac_f
34200 do
34201 case $ac_f in
34202 -) ac_f="$ac_tmp/stdin";;
34203 *) # Look for the file first in the build tree, then in the source tree
34204 # (if the path is not absolute). The absolute path cannot be DOS-style,
34205 # because $ac_f cannot contain `:'.
34206 test -f "$ac_f" ||
34207 case $ac_f in
34208 [\\/$]*) false;;
34209 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34210 esac ||
34211 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34212 esac
34213 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34214 as_fn_append ac_file_inputs " '$ac_f'"
34215 done
34216
34217 # Let's still pretend it is `configure' which instantiates (i.e., don't
34218 # use $as_me), people would be surprised to read:
34219 # /* config.h. Generated by config.status. */
34220 configure_input='Generated from '`
34221 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34222 `' by configure.'
34223 if test x"$ac_file" != x-; then
34224 configure_input="$ac_file. $configure_input"
34225 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34226 $as_echo "$as_me: creating $ac_file" >&6;}
34227 fi
34228 # Neutralize special characters interpreted by sed in replacement strings.
34229 case $configure_input in #(
34230 *\&* | *\|* | *\\* )
34231 ac_sed_conf_input=`$as_echo "$configure_input" |
34232 sed 's/[\\\\&|]/\\\\&/g'`;; #(
34233 *) ac_sed_conf_input=$configure_input;;
34234 esac
34235
34236 case $ac_tag in
34237 *:-:* | *:-) cat >"$ac_tmp/stdin" \
34238 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34239 esac
34240 ;;
34241 esac
34242
34243 ac_dir=`$as_dirname -- "$ac_file" ||
34244 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34245 X"$ac_file" : 'X\(//\)[^/]' \| \
34246 X"$ac_file" : 'X\(//\)$' \| \
34247 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34248 $as_echo X"$ac_file" |
34249 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34250 s//\1/
34251 q
34252 }
34253 /^X\(\/\/\)[^/].*/{
34254 s//\1/
34255 q
34256 }
34257 /^X\(\/\/\)$/{
34258 s//\1/
34259 q
34260 }
34261 /^X\(\/\).*/{
34262 s//\1/
34263 q
34264 }
34265 s/.*/./; q'`
34266 as_dir="$ac_dir"; as_fn_mkdir_p
34267 ac_builddir=.
34268
34269 case "$ac_dir" in
34270 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34271 *)
34272 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34273 # A ".." for each directory in $ac_dir_suffix.
34274 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34275 case $ac_top_builddir_sub in
34276 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34277 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34278 esac ;;
34279 esac
34280 ac_abs_top_builddir=$ac_pwd
34281 ac_abs_builddir=$ac_pwd$ac_dir_suffix
34282 # for backward compatibility:
34283 ac_top_builddir=$ac_top_build_prefix
34284
34285 case $srcdir in
34286 .) # We are building in place.
34287 ac_srcdir=.
34288 ac_top_srcdir=$ac_top_builddir_sub
34289 ac_abs_top_srcdir=$ac_pwd ;;
34290 [\\/]* | ?:[\\/]* ) # Absolute name.
34291 ac_srcdir=$srcdir$ac_dir_suffix;
34292 ac_top_srcdir=$srcdir
34293 ac_abs_top_srcdir=$srcdir ;;
34294 *) # Relative name.
34295 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34296 ac_top_srcdir=$ac_top_build_prefix$srcdir
34297 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34298 esac
34299 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34300
34301
34302 case $ac_mode in
34303 :F)
34304 #
34305 # CONFIG_FILE
34306 #
34307
34308 case $INSTALL in
34309 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
34310 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
34311 esac
34312 ac_MKDIR_P=$MKDIR_P
34313 case $MKDIR_P in
34314 [\\/$]* | ?:[\\/]* ) ;;
34315 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
34316 esac
34317 _ACEOF
34318
34319 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34320 # If the template does not know about datarootdir, expand it.
34321 # FIXME: This hack should be removed a few years after 2.60.
34322 ac_datarootdir_hack=; ac_datarootdir_seen=
34323 ac_sed_dataroot='
34324 /datarootdir/ {
34325 p
34326 q
34327 }
34328 /@datadir@/p
34329 /@docdir@/p
34330 /@infodir@/p
34331 /@localedir@/p
34332 /@mandir@/p'
34333 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34334 *datarootdir*) ac_datarootdir_seen=yes;;
34335 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34336 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34337 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34338 _ACEOF
34339 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34340 ac_datarootdir_hack='
34341 s&@datadir@&$datadir&g
34342 s&@docdir@&$docdir&g
34343 s&@infodir@&$infodir&g
34344 s&@localedir@&$localedir&g
34345 s&@mandir@&$mandir&g
34346 s&\\\${datarootdir}&$datarootdir&g' ;;
34347 esac
34348 _ACEOF
34349
34350 # Neutralize VPATH when `$srcdir' = `.'.
34351 # Shell code in configure.ac might set extrasub.
34352 # FIXME: do we really want to maintain this feature?
34353 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34354 ac_sed_extra="$ac_vpsub
34355 $extrasub
34356 _ACEOF
34357 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34358 :t
34359 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34360 s|@configure_input@|$ac_sed_conf_input|;t t
34361 s&@top_builddir@&$ac_top_builddir_sub&;t t
34362 s&@top_build_prefix@&$ac_top_build_prefix&;t t
34363 s&@srcdir@&$ac_srcdir&;t t
34364 s&@abs_srcdir@&$ac_abs_srcdir&;t t
34365 s&@top_srcdir@&$ac_top_srcdir&;t t
34366 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34367 s&@builddir@&$ac_builddir&;t t
34368 s&@abs_builddir@&$ac_abs_builddir&;t t
34369 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34370 s&@INSTALL@&$ac_INSTALL&;t t
34371 s&@MKDIR_P@&$ac_MKDIR_P&;t t
34372 $ac_datarootdir_hack
34373 "
34374 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34375 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34376
34377 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34378 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34379 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
34380 "$ac_tmp/out"`; test -z "$ac_out"; } &&
34381 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34382 which seems to be undefined. Please make sure it is defined" >&5
34383 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34384 which seems to be undefined. Please make sure it is defined" >&2;}
34385
34386 rm -f "$ac_tmp/stdin"
34387 case $ac_file in
34388 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34389 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34390 esac \
34391 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34392 ;;
34393 :H)
34394 #
34395 # CONFIG_HEADER
34396 #
34397 if test x"$ac_file" != x-; then
34398 {
34399 $as_echo "/* $configure_input */" \
34400 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34401 } >"$ac_tmp/config.h" \
34402 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34403 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34404 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34405 $as_echo "$as_me: $ac_file is unchanged" >&6;}
34406 else
34407 rm -f "$ac_file"
34408 mv "$ac_tmp/config.h" "$ac_file" \
34409 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34410 fi
34411 else
34412 $as_echo "/* $configure_input */" \
34413 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34414 || as_fn_error $? "could not create -" "$LINENO" 5
34415 fi
34416 # Compute "$ac_file"'s index in $config_headers.
34417 _am_arg="$ac_file"
34418 _am_stamp_count=1
34419 for _am_header in $config_headers :; do
34420 case $_am_header in
34421 $_am_arg | $_am_arg:* )
34422 break ;;
34423 * )
34424 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
34425 esac
34426 done
34427 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
34428 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34429 X"$_am_arg" : 'X\(//\)[^/]' \| \
34430 X"$_am_arg" : 'X\(//\)$' \| \
34431 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
34432 $as_echo X"$_am_arg" |
34433 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34434 s//\1/
34435 q
34436 }
34437 /^X\(\/\/\)[^/].*/{
34438 s//\1/
34439 q
34440 }
34441 /^X\(\/\/\)$/{
34442 s//\1/
34443 q
34444 }
34445 /^X\(\/\).*/{
34446 s//\1/
34447 q
34448 }
34449 s/.*/./; q'`/stamp-h$_am_stamp_count
34450 ;;
34451
34452 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
34453 $as_echo "$as_me: executing $ac_file commands" >&6;}
34454 ;;
34455 esac
34456
34457
34458 case $ac_file$ac_mode in
34459 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
34460 # Older Autoconf quotes --file arguments for eval, but not when files
34461 # are listed without --file. Let's play safe and only enable the eval
34462 # if we detect the quoting.
34463 case $CONFIG_FILES in
34464 *\'*) eval set x "$CONFIG_FILES" ;;
34465 *) set x $CONFIG_FILES ;;
34466 esac
34467 shift
34468 for mf
34469 do
34470 # Strip MF so we end up with the name of the file.
34471 mf=`echo "$mf" | sed -e 's/:.*$//'`
34472 # Check whether this is an Automake generated Makefile or not.
34473 # We used to match only the files named 'Makefile.in', but
34474 # some people rename them; so instead we look at the file content.
34475 # Grep'ing the first line is not enough: some people post-process
34476 # each Makefile.in and add a new line on top of each file to say so.
34477 # Grep'ing the whole file is not good either: AIX grep has a line
34478 # limit of 2048, but all sed's we know have understand at least 4000.
34479 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
34480 dirpart=`$as_dirname -- "$mf" ||
34481 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34482 X"$mf" : 'X\(//\)[^/]' \| \
34483 X"$mf" : 'X\(//\)$' \| \
34484 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
34485 $as_echo X"$mf" |
34486 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34487 s//\1/
34488 q
34489 }
34490 /^X\(\/\/\)[^/].*/{
34491 s//\1/
34492 q
34493 }
34494 /^X\(\/\/\)$/{
34495 s//\1/
34496 q
34497 }
34498 /^X\(\/\).*/{
34499 s//\1/
34500 q
34501 }
34502 s/.*/./; q'`
34503 else
34504 continue
34505 fi
34506 # Extract the definition of DEPDIR, am__include, and am__quote
34507 # from the Makefile without running 'make'.
34508 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
34509 test -z "$DEPDIR" && continue
34510 am__include=`sed -n 's/^am__include = //p' < "$mf"`
34511 test -z "$am__include" && continue
34512 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
34513 # Find all dependency output files, they are included files with
34514 # $(DEPDIR) in their names. We invoke sed twice because it is the
34515 # simplest approach to changing $(DEPDIR) to its actual value in the
34516 # expansion.
34517 for file in `sed -n "
34518 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
34519 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
34520 # Make sure the directory exists.
34521 test -f "$dirpart/$file" && continue
34522 fdir=`$as_dirname -- "$file" ||
34523 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34524 X"$file" : 'X\(//\)[^/]' \| \
34525 X"$file" : 'X\(//\)$' \| \
34526 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
34527 $as_echo X"$file" |
34528 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34529 s//\1/
34530 q
34531 }
34532 /^X\(\/\/\)[^/].*/{
34533 s//\1/
34534 q
34535 }
34536 /^X\(\/\/\)$/{
34537 s//\1/
34538 q
34539 }
34540 /^X\(\/\).*/{
34541 s//\1/
34542 q
34543 }
34544 s/.*/./; q'`
34545 as_dir=$dirpart/$fdir; as_fn_mkdir_p
34546 # echo "creating $dirpart/$file"
34547 echo '# dummy' > "$dirpart/$file"
34548 done
34549 done
34550 }
34551 ;;
34552 "default":C)
34553 case x$CONFIG_HEADERS in
34554 xconfig.h:config.in)
34555 echo > stamp-h ;;
34556 esac
34557 ;;
34558
34559 esac
34560 done # for ac_tag
34561
34562
34563 as_fn_exit 0
34564 _ACEOF
34565 ac_clean_files=$ac_clean_files_save
34566
34567 test $ac_write_fail = 0 ||
34568 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34569
34570
34571 # configure is writing to config.log, and then calls config.status.
34572 # config.status does its own redirection, appending to config.log.
34573 # Unfortunately, on DOS this fails, as config.log is still kept open
34574 # by configure, so config.status won't be able to write to it; its
34575 # output is simply discarded. So we exec the FD to /dev/null,
34576 # effectively closing config.log, so it can be properly (re)opened and
34577 # appended to by config.status. When coming back to configure, we
34578 # need to make the FD available again.
34579 if test "$no_create" != yes; then
34580 ac_cs_success=:
34581 ac_config_status_args=
34582 test "$silent" = yes &&
34583 ac_config_status_args="$ac_config_status_args --quiet"
34584 exec 5>/dev/null
34585 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34586 exec 5>>config.log
34587 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34588 # would make configure fail if this is the last instruction.
34589 $ac_cs_success || as_fn_exit 1
34590 fi
34591 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34592 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34593 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34594 fi
34595
34596
34597 exit 0