nm: Add --quiet to suppress "no symbols" diagnostic
[deliverable/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 HAVE_SYS_UIO_H
736 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
737 NEXT_SYS_UIO_H
738 WINDOWS_STAT_INODES
739 WINDOWS_64_BIT_OFF_T
740 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
741 NEXT_SYS_TYPES_H
742 HAVE_SYS_RANDOM_H
743 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
744 NEXT_SYS_RANDOM_H
745 NEXT_AS_FIRST_DIRECTIVE_STRING_H
746 NEXT_STRING_H
747 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
748 NEXT_STDLIB_H
749 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
750 NEXT_STDIO_H
751 HAVE__BOOL
752 GL_GENERATE_STDBOOL_H_FALSE
753 GL_GENERATE_STDBOOL_H_TRUE
754 STDBOOL_H
755 GL_GENERATE_STDALIGN_H_FALSE
756 GL_GENERATE_STDALIGN_H_TRUE
757 STDALIGN_H
758 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
759 NEXT_SIGNAL_H
760 REPLACE_RAISE
761 REPLACE_PTHREAD_SIGMASK
762 HAVE_SIGHANDLER_T
763 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
764 HAVE_STRUCT_SIGACTION_SA_SIGACTION
765 HAVE_SIGACTION
766 HAVE_SIGINFO_T
767 HAVE_SIGSET_T
768 HAVE_RAISE
769 HAVE_PTHREAD_SIGMASK
770 HAVE_POSIX_SIGNALBLOCKING
771 GNULIB_SIGACTION
772 GNULIB_SIGPROCMASK
773 GNULIB_SIGNAL_H_SIGPIPE
774 GNULIB_RAISE
775 GNULIB_PTHREAD_SIGMASK
776 REPLACE_VSPRINTF
777 REPLACE_VSNPRINTF
778 REPLACE_VPRINTF
779 REPLACE_VFPRINTF
780 REPLACE_VDPRINTF
781 REPLACE_VASPRINTF
782 REPLACE_TMPFILE
783 REPLACE_STDIO_WRITE_FUNCS
784 REPLACE_STDIO_READ_FUNCS
785 REPLACE_SPRINTF
786 REPLACE_SNPRINTF
787 REPLACE_RENAMEAT
788 REPLACE_RENAME
789 REPLACE_REMOVE
790 REPLACE_PRINTF
791 REPLACE_POPEN
792 REPLACE_PERROR
793 REPLACE_OBSTACK_PRINTF
794 REPLACE_GETLINE
795 REPLACE_GETDELIM
796 REPLACE_FTELLO
797 REPLACE_FTELL
798 REPLACE_FSEEKO
799 REPLACE_FSEEK
800 REPLACE_FREOPEN
801 REPLACE_FPURGE
802 REPLACE_FPRINTF
803 REPLACE_FOPEN
804 REPLACE_FFLUSH
805 REPLACE_FDOPEN
806 REPLACE_FCLOSE
807 REPLACE_DPRINTF
808 HAVE_VDPRINTF
809 HAVE_VASPRINTF
810 HAVE_RENAMEAT
811 HAVE_POPEN
812 HAVE_PCLOSE
813 HAVE_FTELLO
814 HAVE_FSEEKO
815 HAVE_DPRINTF
816 HAVE_DECL_VSNPRINTF
817 HAVE_DECL_SNPRINTF
818 HAVE_DECL_OBSTACK_PRINTF
819 HAVE_DECL_GETLINE
820 HAVE_DECL_GETDELIM
821 HAVE_DECL_FTELLO
822 HAVE_DECL_FSEEKO
823 HAVE_DECL_FPURGE
824 HAVE_DECL_FCLOSEALL
825 GNULIB_MDA_TEMPNAM
826 GNULIB_MDA_PUTW
827 GNULIB_MDA_GETW
828 GNULIB_MDA_FILENO
829 GNULIB_MDA_FDOPEN
830 GNULIB_MDA_FCLOSEALL
831 GNULIB_VSPRINTF_POSIX
832 GNULIB_VSNPRINTF
833 GNULIB_VPRINTF_POSIX
834 GNULIB_VPRINTF
835 GNULIB_VFPRINTF_POSIX
836 GNULIB_VFPRINTF
837 GNULIB_VDPRINTF
838 GNULIB_VSCANF
839 GNULIB_VFSCANF
840 GNULIB_VASPRINTF
841 GNULIB_TMPFILE
842 GNULIB_STDIO_H_SIGPIPE
843 GNULIB_STDIO_H_NONBLOCKING
844 GNULIB_SPRINTF_POSIX
845 GNULIB_SNPRINTF
846 GNULIB_SCANF
847 GNULIB_RENAMEAT
848 GNULIB_RENAME
849 GNULIB_REMOVE
850 GNULIB_PUTS
851 GNULIB_PUTCHAR
852 GNULIB_PUTC
853 GNULIB_PRINTF_POSIX
854 GNULIB_PRINTF
855 GNULIB_POPEN
856 GNULIB_PERROR
857 GNULIB_PCLOSE
858 GNULIB_OBSTACK_PRINTF_POSIX
859 GNULIB_OBSTACK_PRINTF
860 GNULIB_GETLINE
861 GNULIB_GETDELIM
862 GNULIB_GETCHAR
863 GNULIB_GETC
864 GNULIB_FWRITE
865 GNULIB_FTELLO
866 GNULIB_FTELL
867 GNULIB_FSEEKO
868 GNULIB_FSEEK
869 GNULIB_FSCANF
870 GNULIB_FREOPEN
871 GNULIB_FREAD
872 GNULIB_FPUTS
873 GNULIB_FPUTC
874 GNULIB_FPURGE
875 GNULIB_FPRINTF_POSIX
876 GNULIB_FPRINTF
877 GNULIB_FOPEN
878 GNULIB_FGETS
879 GNULIB_FGETC
880 GNULIB_FFLUSH
881 GNULIB_FDOPEN
882 GNULIB_FCLOSE
883 GNULIB_DPRINTF
884 GL_GENERATE_NETINET_IN_H_FALSE
885 GL_GENERATE_NETINET_IN_H_TRUE
886 NETINET_IN_H
887 HAVE_NETINET_IN_H
888 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
889 NEXT_NETINET_IN_H
890 UNDEFINE_STRTOK_R
891 REPLACE_STRSIGNAL
892 REPLACE_STRERRORNAME_NP
893 REPLACE_STRERROR_R
894 REPLACE_STRERROR
895 REPLACE_STRTOK_R
896 REPLACE_STRCASESTR
897 REPLACE_STRSTR
898 REPLACE_STRNLEN
899 REPLACE_STRNDUP
900 REPLACE_STRNCAT
901 REPLACE_STRDUP
902 REPLACE_STRCHRNUL
903 REPLACE_STPNCPY
904 REPLACE_MEMMEM
905 REPLACE_MEMCHR
906 REPLACE_FFSLL
907 HAVE_STRVERSCMP
908 HAVE_DECL_STRSIGNAL
909 HAVE_SIGDESCR_NP
910 HAVE_SIGABBREV_NP
911 HAVE_STRERRORNAME_NP
912 HAVE_DECL_STRERROR_R
913 HAVE_DECL_STRTOK_R
914 HAVE_STRCASESTR
915 HAVE_STRSEP
916 HAVE_STRPBRK
917 HAVE_DECL_STRNLEN
918 HAVE_DECL_STRNDUP
919 HAVE_DECL_STRDUP
920 HAVE_STRCHRNUL
921 HAVE_STPNCPY
922 HAVE_STPCPY
923 HAVE_RAWMEMCHR
924 HAVE_DECL_MEMRCHR
925 HAVE_MEMPCPY
926 HAVE_DECL_MEMMEM
927 HAVE_FFSLL
928 HAVE_FFSL
929 HAVE_EXPLICIT_BZERO
930 GNULIB_MDA_STRDUP
931 GNULIB_MDA_MEMCCPY
932 HAVE_MBSLEN
933 GNULIB_STRVERSCMP
934 GNULIB_STRSIGNAL
935 GNULIB_SIGDESCR_NP
936 GNULIB_SIGABBREV_NP
937 GNULIB_STRERRORNAME_NP
938 GNULIB_STRERROR_R
939 GNULIB_STRERROR
940 GNULIB_MBSTOK_R
941 GNULIB_MBSSEP
942 GNULIB_MBSSPN
943 GNULIB_MBSPBRK
944 GNULIB_MBSCSPN
945 GNULIB_MBSCASESTR
946 GNULIB_MBSPCASECMP
947 GNULIB_MBSNCASECMP
948 GNULIB_MBSCASECMP
949 GNULIB_MBSSTR
950 GNULIB_MBSRCHR
951 GNULIB_MBSCHR
952 GNULIB_MBSNLEN
953 GNULIB_MBSLEN
954 GNULIB_STRTOK_R
955 GNULIB_STRCASESTR
956 GNULIB_STRSTR
957 GNULIB_STRSEP
958 GNULIB_STRPBRK
959 GNULIB_STRNLEN
960 GNULIB_STRNDUP
961 GNULIB_STRNCAT
962 GNULIB_STRDUP
963 GNULIB_STRCHRNUL
964 GNULIB_STPNCPY
965 GNULIB_STPCPY
966 GNULIB_RAWMEMCHR
967 GNULIB_MEMRCHR
968 GNULIB_MEMPCPY
969 GNULIB_MEMMEM
970 GNULIB_MEMCHR
971 GNULIB_FFSLL
972 GNULIB_FFSL
973 GNULIB_EXPLICIT_BZERO
974 HAVE_VISIBILITY
975 CFLAG_VISIBILITY
976 LIB_MBRTOWC
977 LOCALE_ZH_CN
978 LOCALE_FR_UTF8
979 LOCALE_JA
980 NEXT_AS_FIRST_DIRECTIVE_MATH_H
981 NEXT_MATH_H
982 LTLIBMULTITHREAD
983 LIBMULTITHREAD
984 LTLIBTHREAD
985 LIBTHREAD
986 LIBSTDTHREAD
987 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
988 NEXT_LOCALE_H
989 HAVE_XLOCALE_H
990 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
991 NEXT_STDDEF_H
992 GL_GENERATE_STDDEF_H_FALSE
993 GL_GENERATE_STDDEF_H_TRUE
994 STDDEF_H
995 HAVE_WCHAR_T
996 HAVE_MAX_ALIGN_T
997 REPLACE_NULL
998 REPLACE_STRUCT_LCONV
999 REPLACE_FREELOCALE
1000 REPLACE_DUPLOCALE
1001 REPLACE_NEWLOCALE
1002 REPLACE_SETLOCALE
1003 REPLACE_LOCALECONV
1004 HAVE_FREELOCALE
1005 HAVE_DUPLOCALE
1006 HAVE_NEWLOCALE
1007 GNULIB_LOCALENAME
1008 GNULIB_DUPLOCALE
1009 GNULIB_SETLOCALE_NULL
1010 GNULIB_SETLOCALE
1011 GNULIB_LOCALECONV
1012 LOCALCHARSET_TESTS_ENVIRONMENT
1013 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1014 NEXT_INTTYPES_H
1015 UINT64_MAX_EQ_ULONG_MAX
1016 UINT32_MAX_LT_UINTMAX_MAX
1017 PRIPTR_PREFIX
1018 INT64_MAX_EQ_LONG_MAX
1019 INT32_MAX_LT_INTMAX_MAX
1020 REPLACE_STRTOUMAX
1021 REPLACE_STRTOIMAX
1022 HAVE_IMAXDIV_T
1023 HAVE_DECL_STRTOUMAX
1024 HAVE_DECL_STRTOIMAX
1025 HAVE_DECL_IMAXDIV
1026 HAVE_DECL_IMAXABS
1027 GNULIB_STRTOUMAX
1028 GNULIB_STRTOIMAX
1029 GNULIB_IMAXDIV
1030 GNULIB_IMAXABS
1031 GL_GENERATE_STDINT_H_FALSE
1032 GL_GENERATE_STDINT_H_TRUE
1033 STDINT_H
1034 HAVE_SYS_INTTYPES_H
1035 HAVE_SYS_BITYPES_H
1036 HAVE_C99_STDINT_H
1037 WINT_T_SUFFIX
1038 WCHAR_T_SUFFIX
1039 SIG_ATOMIC_T_SUFFIX
1040 SIZE_T_SUFFIX
1041 PTRDIFF_T_SUFFIX
1042 HAVE_SIGNED_WINT_T
1043 HAVE_SIGNED_WCHAR_T
1044 HAVE_SIGNED_SIG_ATOMIC_T
1045 BITSIZEOF_WINT_T
1046 BITSIZEOF_WCHAR_T
1047 BITSIZEOF_SIG_ATOMIC_T
1048 BITSIZEOF_SIZE_T
1049 BITSIZEOF_PTRDIFF_T
1050 APPLE_UNIVERSAL_BUILD
1051 HAVE_STDINT_H
1052 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1053 NEXT_STDINT_H
1054 HAVE_SYS_TYPES_H
1055 HAVE_INTTYPES_H
1056 HAVE_WCHAR_H
1057 GNULIB_OVERRIDES_WINT_T
1058 GL_GENERATE_LIMITS_H_FALSE
1059 GL_GENERATE_LIMITS_H_TRUE
1060 LIMITS_H
1061 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1062 NEXT_LIMITS_H
1063 HAVE_SYS_SOCKET_H
1064 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
1065 NEXT_SYS_SOCKET_H
1066 HAVE_ACCEPT4
1067 HAVE_SA_FAMILY_T
1068 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
1069 HAVE_STRUCT_SOCKADDR_STORAGE
1070 GNULIB_ACCEPT4
1071 GNULIB_SHUTDOWN
1072 GNULIB_SETSOCKOPT
1073 GNULIB_SENDTO
1074 GNULIB_RECVFROM
1075 GNULIB_SEND
1076 GNULIB_RECV
1077 GNULIB_LISTEN
1078 GNULIB_GETSOCKOPT
1079 GNULIB_GETSOCKNAME
1080 GNULIB_GETPEERNAME
1081 GNULIB_BIND
1082 GNULIB_ACCEPT
1083 GNULIB_CONNECT
1084 GNULIB_SOCKET
1085 INET_NTOP_LIB
1086 LIB_HARD_LOCALE
1087 LIB_SETLOCALE_NULL
1088 LIB_SCHED_YIELD
1089 LIBPMULTITHREAD
1090 LIBPTHREAD
1091 GL_GENERATE_GLOB_H_FALSE
1092 GL_GENERATE_GLOB_H_TRUE
1093 GLOB_H
1094 HAVE_GLOB_H
1095 NEXT_AS_FIRST_DIRECTIVE_GLOB_H
1096 NEXT_GLOB_H
1097 REPLACE_GLOB_PATTERN_P
1098 REPLACE_GLOB
1099 HAVE_GLOB_PATTERN_P
1100 HAVE_GLOB
1101 GNULIB_GLOB
1102 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1103 NEXT_SYS_TIME_H
1104 REPLACE_STRUCT_TIMEVAL
1105 REPLACE_GETTIMEOFDAY
1106 HAVE_SYS_TIME_H
1107 HAVE_STRUCT_TIMEVAL
1108 HAVE_GETTIMEOFDAY
1109 GNULIB_GETTIMEOFDAY
1110 LTLIBINTL
1111 LIBINTL
1112 LIB_GETRANDOM
1113 REPLACE_GETRANDOM
1114 HAVE_GETRANDOM
1115 GNULIB_GETRANDOM
1116 LIB_GETLOGIN
1117 WINDOWS_64_BIT_ST_SIZE
1118 WINDOWS_STAT_TIMESPEC
1119 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1120 NEXT_SYS_STAT_H
1121 REPLACE_UTIMENSAT
1122 REPLACE_STAT
1123 REPLACE_MKNODAT
1124 REPLACE_MKNOD
1125 REPLACE_MKFIFOAT
1126 REPLACE_MKFIFO
1127 REPLACE_MKDIR
1128 REPLACE_LSTAT
1129 REPLACE_FUTIMENS
1130 REPLACE_FSTATAT
1131 REPLACE_FSTAT
1132 REPLACE_FCHMODAT
1133 HAVE_UTIMENSAT
1134 HAVE_MKNODAT
1135 HAVE_MKNOD
1136 HAVE_MKFIFOAT
1137 HAVE_MKFIFO
1138 HAVE_MKDIRAT
1139 HAVE_LSTAT
1140 HAVE_LCHMOD
1141 HAVE_GETUMASK
1142 HAVE_FUTIMENS
1143 HAVE_FSTATAT
1144 HAVE_FCHMODAT
1145 GNULIB_MDA_UMASK
1146 GNULIB_MDA_MKDIR
1147 GNULIB_MDA_CHMOD
1148 GNULIB_OVERRIDES_STRUCT_STAT
1149 GNULIB_UTIMENSAT
1150 GNULIB_STAT
1151 GNULIB_MKNODAT
1152 GNULIB_MKNOD
1153 GNULIB_MKFIFOAT
1154 GNULIB_MKFIFO
1155 GNULIB_MKDIRAT
1156 GNULIB_MKDIR
1157 GNULIB_LSTAT
1158 GNULIB_LCHMOD
1159 GNULIB_GETUMASK
1160 GNULIB_FUTIMENS
1161 GNULIB_FSTATAT
1162 GNULIB_FSTAT
1163 GNULIB_FCHMODAT
1164 FREXPL_LIBM
1165 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1166 FREXP_LIBM
1167 REPLACE_TRUNCL
1168 REPLACE_TRUNCF
1169 REPLACE_TRUNC
1170 REPLACE_TANHF
1171 REPLACE_TANF
1172 REPLACE_SQRTL
1173 REPLACE_SQRTF
1174 REPLACE_SINHF
1175 REPLACE_SINF
1176 REPLACE_SIGNBIT_USING_BUILTINS
1177 REPLACE_SIGNBIT
1178 REPLACE_ROUNDL
1179 REPLACE_ROUNDF
1180 REPLACE_ROUND
1181 REPLACE_RINTL
1182 REPLACE_REMAINDERL
1183 REPLACE_REMAINDERF
1184 REPLACE_REMAINDER
1185 REPLACE_NAN
1186 REPLACE_MODFL
1187 REPLACE_MODFF
1188 REPLACE_MODF
1189 REPLACE_LOGBL
1190 REPLACE_LOGBF
1191 REPLACE_LOGB
1192 REPLACE_LOG2L
1193 REPLACE_LOG2F
1194 REPLACE_LOG2
1195 REPLACE_LOG1PL
1196 REPLACE_LOG1PF
1197 REPLACE_LOG1P
1198 REPLACE_LOG10L
1199 REPLACE_LOG10F
1200 REPLACE_LOG10
1201 REPLACE_LOGL
1202 REPLACE_LOGF
1203 REPLACE_LOG
1204 REPLACE_LDEXPL
1205 REPLACE_ISNAN
1206 REPLACE_ISINF
1207 REPLACE_ISFINITE
1208 REPLACE_ILOGBL
1209 REPLACE_ILOGBF
1210 REPLACE_ILOGB
1211 REPLACE_HYPOTL
1212 REPLACE_HYPOTF
1213 REPLACE_HYPOT
1214 REPLACE_HUGE_VAL
1215 REPLACE_FREXPL
1216 REPLACE_FREXP
1217 REPLACE_FREXPF
1218 REPLACE_FMODL
1219 REPLACE_FMODF
1220 REPLACE_FMOD
1221 REPLACE_FMAL
1222 REPLACE_FMAF
1223 REPLACE_FMA
1224 REPLACE_FLOORL
1225 REPLACE_FLOORF
1226 REPLACE_FLOOR
1227 REPLACE_FABSL
1228 REPLACE_EXP2L
1229 REPLACE_EXP2
1230 REPLACE_EXPM1L
1231 REPLACE_EXPM1F
1232 REPLACE_EXPM1
1233 REPLACE_EXPL
1234 REPLACE_EXPF
1235 REPLACE_COSHF
1236 REPLACE_COSF
1237 REPLACE_CEILL
1238 REPLACE_CEILF
1239 REPLACE_CEIL
1240 REPLACE_CBRTL
1241 REPLACE_CBRTF
1242 REPLACE_ATAN2F
1243 REPLACE_ATANF
1244 REPLACE_ASINF
1245 REPLACE_ACOSF
1246 HAVE_DECL_TRUNCL
1247 HAVE_DECL_TRUNCF
1248 HAVE_DECL_TRUNC
1249 HAVE_DECL_TANL
1250 HAVE_DECL_SQRTL
1251 HAVE_DECL_SINL
1252 HAVE_DECL_ROUNDL
1253 HAVE_DECL_ROUNDF
1254 HAVE_DECL_ROUND
1255 HAVE_DECL_RINTF
1256 HAVE_DECL_REMAINDERL
1257 HAVE_DECL_REMAINDER
1258 HAVE_DECL_LOGB
1259 HAVE_DECL_LOG2L
1260 HAVE_DECL_LOG2F
1261 HAVE_DECL_LOG2
1262 HAVE_DECL_LOG10L
1263 HAVE_DECL_LOGL
1264 HAVE_DECL_LDEXPL
1265 HAVE_DECL_FREXPL
1266 HAVE_DECL_FLOORL
1267 HAVE_DECL_FLOORF
1268 HAVE_DECL_EXPM1L
1269 HAVE_DECL_EXP2L
1270 HAVE_DECL_EXP2F
1271 HAVE_DECL_EXP2
1272 HAVE_DECL_EXPL
1273 HAVE_DECL_COSL
1274 HAVE_DECL_COPYSIGNF
1275 HAVE_DECL_CEILL
1276 HAVE_DECL_CEILF
1277 HAVE_DECL_CBRTL
1278 HAVE_DECL_CBRTF
1279 HAVE_DECL_ATANL
1280 HAVE_DECL_ASINL
1281 HAVE_DECL_ACOSL
1282 HAVE_TANHF
1283 HAVE_TANL
1284 HAVE_TANF
1285 HAVE_SQRTL
1286 HAVE_SQRTF
1287 HAVE_SINHF
1288 HAVE_SINL
1289 HAVE_SINF
1290 HAVE_RINTL
1291 HAVE_RINT
1292 HAVE_REMAINDERF
1293 HAVE_REMAINDER
1294 HAVE_POWF
1295 HAVE_MODFL
1296 HAVE_MODFF
1297 HAVE_LOGBL
1298 HAVE_LOGBF
1299 HAVE_LOG1PL
1300 HAVE_LOG1PF
1301 HAVE_LOG1P
1302 HAVE_LOG10L
1303 HAVE_LOG10F
1304 HAVE_LOGL
1305 HAVE_LOGF
1306 HAVE_LDEXPF
1307 HAVE_ISNANL
1308 HAVE_ISNAND
1309 HAVE_ISNANF
1310 HAVE_ILOGBL
1311 HAVE_ILOGBF
1312 HAVE_ILOGB
1313 HAVE_HYPOTL
1314 HAVE_HYPOTF
1315 HAVE_FREXPF
1316 HAVE_FMODL
1317 HAVE_FMODF
1318 HAVE_FMAL
1319 HAVE_FMAF
1320 HAVE_FMA
1321 HAVE_FABSL
1322 HAVE_FABSF
1323 HAVE_EXPM1F
1324 HAVE_EXPM1
1325 HAVE_EXPL
1326 HAVE_EXPF
1327 HAVE_COSHF
1328 HAVE_COSL
1329 HAVE_COSF
1330 HAVE_COPYSIGNL
1331 HAVE_COPYSIGN
1332 HAVE_CBRTL
1333 HAVE_CBRTF
1334 HAVE_CBRT
1335 HAVE_ATAN2F
1336 HAVE_ATANL
1337 HAVE_ATANF
1338 HAVE_ASINL
1339 HAVE_ASINF
1340 HAVE_ACOSL
1341 HAVE_ACOSF
1342 GNULIB_MDA_YN
1343 GNULIB_MDA_Y1
1344 GNULIB_MDA_Y0
1345 GNULIB_MDA_JN
1346 GNULIB_MDA_J1
1347 GNULIB_MDA_J0
1348 GNULIB_TRUNCL
1349 GNULIB_TRUNCF
1350 GNULIB_TRUNC
1351 GNULIB_TANHF
1352 GNULIB_TANL
1353 GNULIB_TANF
1354 GNULIB_SQRTL
1355 GNULIB_SQRTF
1356 GNULIB_SINHF
1357 GNULIB_SINL
1358 GNULIB_SINF
1359 GNULIB_SIGNBIT
1360 GNULIB_ROUNDL
1361 GNULIB_ROUNDF
1362 GNULIB_ROUND
1363 GNULIB_RINTL
1364 GNULIB_RINTF
1365 GNULIB_RINT
1366 GNULIB_REMAINDERL
1367 GNULIB_REMAINDERF
1368 GNULIB_REMAINDER
1369 GNULIB_POWF
1370 GNULIB_MODFL
1371 GNULIB_MODFF
1372 GNULIB_MODF
1373 GNULIB_LOGBL
1374 GNULIB_LOGBF
1375 GNULIB_LOGB
1376 GNULIB_LOG2L
1377 GNULIB_LOG2F
1378 GNULIB_LOG2
1379 GNULIB_LOG1PL
1380 GNULIB_LOG1PF
1381 GNULIB_LOG1P
1382 GNULIB_LOG10L
1383 GNULIB_LOG10F
1384 GNULIB_LOG10
1385 GNULIB_LOGL
1386 GNULIB_LOGF
1387 GNULIB_LOG
1388 GNULIB_LDEXPL
1389 GNULIB_LDEXPF
1390 GNULIB_ISNANL
1391 GNULIB_ISNAND
1392 GNULIB_ISNANF
1393 GNULIB_ISNAN
1394 GNULIB_ISINF
1395 GNULIB_ISFINITE
1396 GNULIB_ILOGBL
1397 GNULIB_ILOGBF
1398 GNULIB_ILOGB
1399 GNULIB_HYPOTL
1400 GNULIB_HYPOTF
1401 GNULIB_HYPOT
1402 GNULIB_FREXPL
1403 GNULIB_FREXP
1404 GNULIB_FREXPF
1405 GNULIB_FMODL
1406 GNULIB_FMODF
1407 GNULIB_FMOD
1408 GNULIB_FMAL
1409 GNULIB_FMAF
1410 GNULIB_FMA
1411 GNULIB_FLOORL
1412 GNULIB_FLOORF
1413 GNULIB_FLOOR
1414 GNULIB_FABSL
1415 GNULIB_FABSF
1416 GNULIB_EXPM1L
1417 GNULIB_EXPM1F
1418 GNULIB_EXPM1
1419 GNULIB_EXP2L
1420 GNULIB_EXP2F
1421 GNULIB_EXP2
1422 GNULIB_EXPL
1423 GNULIB_EXPF
1424 GNULIB_COSHF
1425 GNULIB_COSL
1426 GNULIB_COSF
1427 GNULIB_COPYSIGNL
1428 GNULIB_COPYSIGNF
1429 GNULIB_COPYSIGN
1430 GNULIB_CEILL
1431 GNULIB_CEILF
1432 GNULIB_CEIL
1433 GNULIB_CBRTL
1434 GNULIB_CBRTF
1435 GNULIB_CBRT
1436 GNULIB_ATAN2F
1437 GNULIB_ATANL
1438 GNULIB_ATANF
1439 GNULIB_ASINL
1440 GNULIB_ASINF
1441 GNULIB_ACOSL
1442 GNULIB_ACOSF
1443 GL_GENERATE_FNMATCH_H_FALSE
1444 GL_GENERATE_FNMATCH_H_TRUE
1445 FNMATCH_H
1446 HAVE_FNMATCH_H
1447 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1448 NEXT_FNMATCH_H
1449 REPLACE_FNMATCH
1450 HAVE_FNMATCH
1451 GNULIB_FNMATCH
1452 REPLACE_ITOLD
1453 GL_GENERATE_FLOAT_H_FALSE
1454 GL_GENERATE_FLOAT_H_TRUE
1455 FLOAT_H
1456 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1457 NEXT_FLOAT_H
1458 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1459 NEXT_FCNTL_H
1460 REPLACE_OPENAT
1461 REPLACE_OPEN
1462 REPLACE_FCNTL
1463 REPLACE_CREAT
1464 HAVE_OPENAT
1465 HAVE_FCNTL
1466 GNULIB_MDA_OPEN
1467 GNULIB_MDA_CREAT
1468 GNULIB_OPENAT
1469 GNULIB_OPEN
1470 GNULIB_NONBLOCKING
1471 GNULIB_FCNTL
1472 GNULIB_CREAT
1473 EOVERFLOW_VALUE
1474 EOVERFLOW_HIDDEN
1475 ENOLINK_VALUE
1476 ENOLINK_HIDDEN
1477 EMULTIHOP_VALUE
1478 EMULTIHOP_HIDDEN
1479 GL_GENERATE_ERRNO_H_FALSE
1480 GL_GENERATE_ERRNO_H_TRUE
1481 ERRNO_H
1482 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1483 NEXT_ERRNO_H
1484 HAVE_DIRENT_H
1485 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1486 NEXT_DIRENT_H
1487 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1488 NEXT_CTYPE_H
1489 HAVE_ISBLANK
1490 GNULIB_ISBLANK
1491 REPLACE_FDOPENDIR
1492 REPLACE_DIRFD
1493 REPLACE_CLOSEDIR
1494 REPLACE_OPENDIR
1495 HAVE_ALPHASORT
1496 HAVE_SCANDIR
1497 HAVE_FDOPENDIR
1498 HAVE_DECL_FDOPENDIR
1499 HAVE_DECL_DIRFD
1500 HAVE_CLOSEDIR
1501 HAVE_REWINDDIR
1502 HAVE_READDIR
1503 HAVE_OPENDIR
1504 GNULIB_ALPHASORT
1505 GNULIB_SCANDIR
1506 GNULIB_FDOPENDIR
1507 GNULIB_DIRFD
1508 GNULIB_CLOSEDIR
1509 GNULIB_REWINDDIR
1510 GNULIB_READDIR
1511 GNULIB_OPENDIR
1512 HAVE_WINSOCK2_H
1513 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1514 LIB_CLOCK_GETTIME
1515 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1516 UNISTD_H_HAVE_WINSOCK2_H
1517 UNISTD_H_HAVE_SYS_RANDOM_H
1518 REPLACE_WRITE
1519 REPLACE_USLEEP
1520 REPLACE_UNLINKAT
1521 REPLACE_UNLINK
1522 REPLACE_TTYNAME_R
1523 REPLACE_TRUNCATE
1524 REPLACE_SYMLINKAT
1525 REPLACE_SYMLINK
1526 REPLACE_SLEEP
1527 REPLACE_RMDIR
1528 REPLACE_READLINKAT
1529 REPLACE_READLINK
1530 REPLACE_READ
1531 REPLACE_PWRITE
1532 REPLACE_PREAD
1533 REPLACE_LSEEK
1534 REPLACE_LINKAT
1535 REPLACE_LINK
1536 REPLACE_LCHOWN
1537 REPLACE_ISATTY
1538 REPLACE_GETPASS
1539 REPLACE_GETPAGESIZE
1540 REPLACE_GETGROUPS
1541 REPLACE_GETLOGIN_R
1542 REPLACE_GETDTABLESIZE
1543 REPLACE_GETDOMAINNAME
1544 REPLACE_GETCWD
1545 REPLACE_FTRUNCATE
1546 REPLACE_FCHOWNAT
1547 REPLACE_FACCESSAT
1548 REPLACE_EXECVPE
1549 REPLACE_EXECVP
1550 REPLACE_EXECVE
1551 REPLACE_EXECV
1552 REPLACE_EXECLP
1553 REPLACE_EXECLE
1554 REPLACE_EXECL
1555 REPLACE_DUP2
1556 REPLACE_DUP
1557 REPLACE_CLOSE
1558 REPLACE_CHOWN
1559 REPLACE_ACCESS
1560 HAVE_SYS_PARAM_H
1561 HAVE_OS_H
1562 HAVE_DECL_TTYNAME_R
1563 HAVE_DECL_TRUNCATE
1564 HAVE_DECL_SETHOSTNAME
1565 HAVE_DECL_GETUSERSHELL
1566 HAVE_DECL_GETPAGESIZE
1567 HAVE_DECL_GETLOGIN_R
1568 HAVE_DECL_GETLOGIN
1569 HAVE_DECL_GETDOMAINNAME
1570 HAVE_DECL_FDATASYNC
1571 HAVE_DECL_FCHDIR
1572 HAVE_DECL_EXECVPE
1573 HAVE_DECL_ENVIRON
1574 HAVE_USLEEP
1575 HAVE_UNLINKAT
1576 HAVE_SYMLINKAT
1577 HAVE_SYMLINK
1578 HAVE_SLEEP
1579 HAVE_SETHOSTNAME
1580 HAVE_READLINKAT
1581 HAVE_READLINK
1582 HAVE_PWRITE
1583 HAVE_PREAD
1584 HAVE_PIPE2
1585 HAVE_PIPE
1586 HAVE_LINKAT
1587 HAVE_LINK
1588 HAVE_LCHOWN
1589 HAVE_GROUP_MEMBER
1590 HAVE_GETPASS
1591 HAVE_GETPAGESIZE
1592 HAVE_GETLOGIN
1593 HAVE_GETHOSTNAME
1594 HAVE_GETGROUPS
1595 HAVE_GETENTROPY
1596 HAVE_GETDTABLESIZE
1597 HAVE_FTRUNCATE
1598 HAVE_FSYNC
1599 HAVE_FDATASYNC
1600 HAVE_FCHOWNAT
1601 HAVE_FCHDIR
1602 HAVE_FACCESSAT
1603 HAVE_EXECVPE
1604 HAVE_EUIDACCESS
1605 HAVE_DUP3
1606 HAVE_COPY_FILE_RANGE
1607 HAVE_CHOWN
1608 GNULIB_MDA_WRITE
1609 GNULIB_MDA_UNLINK
1610 GNULIB_MDA_SWAB
1611 GNULIB_MDA_RMDIR
1612 GNULIB_MDA_READ
1613 GNULIB_MDA_LSEEK
1614 GNULIB_MDA_ISATTY
1615 GNULIB_MDA_GETPID
1616 GNULIB_MDA_GETCWD
1617 GNULIB_MDA_EXECVPE
1618 GNULIB_MDA_EXECVP
1619 GNULIB_MDA_EXECVE
1620 GNULIB_MDA_EXECV
1621 GNULIB_MDA_EXECLP
1622 GNULIB_MDA_EXECLE
1623 GNULIB_MDA_EXECL
1624 GNULIB_MDA_DUP2
1625 GNULIB_MDA_DUP
1626 GNULIB_MDA_CLOSE
1627 GNULIB_MDA_CHDIR
1628 GNULIB_MDA_ACCESS
1629 GNULIB_WRITE
1630 GNULIB_USLEEP
1631 GNULIB_UNLINKAT
1632 GNULIB_UNLINK
1633 GNULIB_UNISTD_H_SIGPIPE
1634 GNULIB_UNISTD_H_NONBLOCKING
1635 GNULIB_TTYNAME_R
1636 GNULIB_TRUNCATE
1637 GNULIB_SYMLINKAT
1638 GNULIB_SYMLINK
1639 GNULIB_SLEEP
1640 GNULIB_SETHOSTNAME
1641 GNULIB_RMDIR
1642 GNULIB_READLINKAT
1643 GNULIB_READLINK
1644 GNULIB_READ
1645 GNULIB_PWRITE
1646 GNULIB_PREAD
1647 GNULIB_PIPE2
1648 GNULIB_PIPE
1649 GNULIB_LSEEK
1650 GNULIB_LINKAT
1651 GNULIB_LINK
1652 GNULIB_LCHOWN
1653 GNULIB_ISATTY
1654 GNULIB_GROUP_MEMBER
1655 GNULIB_GETUSERSHELL
1656 GNULIB_GETPASS
1657 GNULIB_GETPAGESIZE
1658 GNULIB_GETOPT_POSIX
1659 GNULIB_GETLOGIN_R
1660 GNULIB_GETLOGIN
1661 GNULIB_GETHOSTNAME
1662 GNULIB_GETGROUPS
1663 GNULIB_GETENTROPY
1664 GNULIB_GETDTABLESIZE
1665 GNULIB_GETDOMAINNAME
1666 GNULIB_GETCWD
1667 GNULIB_FTRUNCATE
1668 GNULIB_FSYNC
1669 GNULIB_FDATASYNC
1670 GNULIB_FCHOWNAT
1671 GNULIB_FCHDIR
1672 GNULIB_FACCESSAT
1673 GNULIB_EXECVPE
1674 GNULIB_EXECVP
1675 GNULIB_EXECVE
1676 GNULIB_EXECV
1677 GNULIB_EXECLP
1678 GNULIB_EXECLE
1679 GNULIB_EXECL
1680 GNULIB_EUIDACCESS
1681 GNULIB_ENVIRON
1682 GNULIB_DUP3
1683 GNULIB_DUP2
1684 GNULIB_DUP
1685 GNULIB_COPY_FILE_RANGE
1686 GNULIB_CLOSE
1687 GNULIB_CHOWN
1688 GNULIB_CHDIR
1689 GNULIB_ACCESS
1690 REPLACE_WCTOMB
1691 REPLACE_UNSETENV
1692 REPLACE_STRTOLD
1693 REPLACE_STRTOD
1694 REPLACE_SETSTATE
1695 REPLACE_SETENV
1696 REPLACE_REALPATH
1697 REPLACE_REALLOC
1698 REPLACE_RANDOM_R
1699 REPLACE_RANDOM
1700 REPLACE_QSORT_R
1701 REPLACE_PUTENV
1702 REPLACE_PTSNAME_R
1703 REPLACE_PTSNAME
1704 REPLACE_POSIX_MEMALIGN
1705 REPLACE_MKSTEMP
1706 REPLACE_MBTOWC
1707 REPLACE_MALLOC
1708 REPLACE_INITSTATE
1709 REPLACE_FREE
1710 REPLACE_CANONICALIZE_FILE_NAME
1711 REPLACE_CALLOC
1712 REPLACE_ALIGNED_ALLOC
1713 HAVE_DECL_UNSETENV
1714 HAVE_UNLOCKPT
1715 HAVE_SYS_LOADAVG_H
1716 HAVE_STRUCT_RANDOM_DATA
1717 HAVE_STRTOULL
1718 HAVE_STRTOLL
1719 HAVE_STRTOLD
1720 HAVE_STRTOD
1721 HAVE_DECL_SETSTATE
1722 HAVE_SETSTATE
1723 HAVE_DECL_SETENV
1724 HAVE_SETENV
1725 HAVE_SECURE_GETENV
1726 HAVE_RPMATCH
1727 HAVE_REALPATH
1728 HAVE_REALLOCARRAY
1729 HAVE_RANDOM_R
1730 HAVE_RANDOM_H
1731 HAVE_RANDOM
1732 HAVE_QSORT_R
1733 HAVE_PTSNAME_R
1734 HAVE_PTSNAME
1735 HAVE_POSIX_OPENPT
1736 HAVE_POSIX_MEMALIGN
1737 HAVE_MKSTEMPS
1738 HAVE_MKSTEMP
1739 HAVE_MKOSTEMPS
1740 HAVE_MKOSTEMP
1741 HAVE_MKDTEMP
1742 HAVE_MBTOWC
1743 HAVE_DECL_INITSTATE
1744 HAVE_INITSTATE
1745 HAVE_GRANTPT
1746 HAVE_GETSUBOPT
1747 HAVE_DECL_GETLOADAVG
1748 HAVE_DECL_GCVT
1749 HAVE_DECL_FCVT
1750 HAVE_DECL_ECVT
1751 HAVE_CANONICALIZE_FILE_NAME
1752 HAVE_ATOLL
1753 HAVE_ALIGNED_ALLOC
1754 HAVE__EXIT
1755 GNULIB_MDA_PUTENV
1756 GNULIB_MDA_MKTEMP
1757 GNULIB_MDA_GCVT
1758 GNULIB_MDA_FCVT
1759 GNULIB_MDA_ECVT
1760 GNULIB_WCTOMB
1761 GNULIB_UNSETENV
1762 GNULIB_UNLOCKPT
1763 GNULIB_SYSTEM_POSIX
1764 GNULIB_STRTOULL
1765 GNULIB_STRTOLL
1766 GNULIB_STRTOLD
1767 GNULIB_STRTOD
1768 GNULIB_SETENV
1769 GNULIB_SECURE_GETENV
1770 GNULIB_RPMATCH
1771 GNULIB_REALPATH
1772 GNULIB_REALLOC_POSIX
1773 GNULIB_REALLOCARRAY
1774 GNULIB_RANDOM_R
1775 GNULIB_RANDOM
1776 GNULIB_QSORT_R
1777 GNULIB_PUTENV
1778 GNULIB_PTSNAME_R
1779 GNULIB_PTSNAME
1780 GNULIB_POSIX_OPENPT
1781 GNULIB_POSIX_MEMALIGN
1782 GNULIB_MKSTEMPS
1783 GNULIB_MKSTEMP
1784 GNULIB_MKOSTEMPS
1785 GNULIB_MKOSTEMP
1786 GNULIB_MKDTEMP
1787 GNULIB_MBTOWC
1788 GNULIB_MALLOC_POSIX
1789 GNULIB_GRANTPT
1790 GNULIB_GETSUBOPT
1791 GNULIB_GETLOADAVG
1792 GNULIB_FREE_POSIX
1793 GNULIB_CANONICALIZE_FILE_NAME
1794 GNULIB_CALLOC_POSIX
1795 GNULIB_ATOLL
1796 GNULIB_ALIGNED_ALLOC
1797 GNULIB__EXIT
1798 LOCALE_FR
1799 REPLACE_WCSTOK
1800 REPLACE_WCSFTIME
1801 REPLACE_WCSWIDTH
1802 REPLACE_WCWIDTH
1803 REPLACE_WCSNRTOMBS
1804 REPLACE_WCSRTOMBS
1805 REPLACE_WCRTOMB
1806 REPLACE_MBSNRTOWCS
1807 REPLACE_MBSRTOWCS
1808 REPLACE_MBRLEN
1809 REPLACE_MBRTOWC
1810 REPLACE_MBSINIT
1811 REPLACE_WCTOB
1812 REPLACE_BTOWC
1813 REPLACE_MBSTATE_T
1814 HAVE_DECL_WCWIDTH
1815 HAVE_DECL_WCSDUP
1816 HAVE_DECL_WCTOB
1817 HAVE_WCSFTIME
1818 HAVE_WCSWIDTH
1819 HAVE_WCSTOK
1820 HAVE_WCSSTR
1821 HAVE_WCSPBRK
1822 HAVE_WCSSPN
1823 HAVE_WCSCSPN
1824 HAVE_WCSRCHR
1825 HAVE_WCSCHR
1826 HAVE_WCSDUP
1827 HAVE_WCSXFRM
1828 HAVE_WCSCOLL
1829 HAVE_WCSNCASECMP
1830 HAVE_WCSCASECMP
1831 HAVE_WCSNCMP
1832 HAVE_WCSCMP
1833 HAVE_WCSNCAT
1834 HAVE_WCSCAT
1835 HAVE_WCPNCPY
1836 HAVE_WCSNCPY
1837 HAVE_WCPCPY
1838 HAVE_WCSCPY
1839 HAVE_WCSNLEN
1840 HAVE_WCSLEN
1841 HAVE_WMEMSET
1842 HAVE_WMEMPCPY
1843 HAVE_WMEMMOVE
1844 HAVE_WMEMCPY
1845 HAVE_WMEMCMP
1846 HAVE_WMEMCHR
1847 HAVE_WCSNRTOMBS
1848 HAVE_WCSRTOMBS
1849 HAVE_WCRTOMB
1850 HAVE_MBSNRTOWCS
1851 HAVE_MBSRTOWCS
1852 HAVE_MBRLEN
1853 HAVE_MBRTOWC
1854 HAVE_MBSINIT
1855 HAVE_BTOWC
1856 GNULIB_MDA_WCSDUP
1857 GNULIB_WCSFTIME
1858 GNULIB_WCSWIDTH
1859 GNULIB_WCSTOK
1860 GNULIB_WCSSTR
1861 GNULIB_WCSPBRK
1862 GNULIB_WCSSPN
1863 GNULIB_WCSCSPN
1864 GNULIB_WCSRCHR
1865 GNULIB_WCSCHR
1866 GNULIB_WCSDUP
1867 GNULIB_WCSXFRM
1868 GNULIB_WCSCOLL
1869 GNULIB_WCSNCASECMP
1870 GNULIB_WCSCASECMP
1871 GNULIB_WCSNCMP
1872 GNULIB_WCSCMP
1873 GNULIB_WCSNCAT
1874 GNULIB_WCSCAT
1875 GNULIB_WCPNCPY
1876 GNULIB_WCSNCPY
1877 GNULIB_WCPCPY
1878 GNULIB_WCSCPY
1879 GNULIB_WCSNLEN
1880 GNULIB_WCSLEN
1881 GNULIB_WMEMSET
1882 GNULIB_WMEMPCPY
1883 GNULIB_WMEMMOVE
1884 GNULIB_WMEMCPY
1885 GNULIB_WMEMCMP
1886 GNULIB_WMEMCHR
1887 GNULIB_WCWIDTH
1888 GNULIB_WCSNRTOMBS
1889 GNULIB_WCSRTOMBS
1890 GNULIB_WCRTOMB
1891 GNULIB_MBSNRTOWCS
1892 GNULIB_MBSRTOWCS
1893 GNULIB_MBRLEN
1894 GNULIB_MBRTOWC
1895 GNULIB_MBSINIT
1896 GNULIB_WCTOB
1897 GNULIB_BTOWC
1898 MKDIR_P
1899 HAVE_WS2TCPIP_H
1900 HAVE_FEATURES_H
1901 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
1902 NEXT_ARPA_INET_H
1903 PRAGMA_COLUMNS
1904 PRAGMA_SYSTEM_HEADER
1905 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1906 INCLUDE_NEXT
1907 HAVE_ARPA_INET_H
1908 REPLACE_INET_PTON
1909 REPLACE_INET_NTOP
1910 HAVE_DECL_INET_PTON
1911 HAVE_DECL_INET_NTOP
1912 GNULIB_INET_PTON
1913 GNULIB_INET_NTOP
1914 HAVE_ALLOCA_H
1915 GL_GENERATE_ALLOCA_H_FALSE
1916 GL_GENERATE_ALLOCA_H_TRUE
1917 ALLOCA_H
1918 ALLOCA
1919 GL_COND_LIBTOOL_FALSE
1920 GL_COND_LIBTOOL_TRUE
1921 RANLIB
1922 ARFLAGS
1923 AR
1924 LARGEFILE_CPPFLAGS
1925 target_os
1926 target_vendor
1927 target_cpu
1928 target
1929 host_os
1930 host_vendor
1931 host_cpu
1932 host
1933 build_os
1934 build_vendor
1935 build_cpu
1936 build
1937 EGREP
1938 GREP
1939 CPP
1940 OBJEXT
1941 EXEEXT
1942 ac_ct_CC
1943 CPPFLAGS
1944 LDFLAGS
1945 CFLAGS
1946 CC
1947 MAINT
1948 MAINTAINER_MODE_FALSE
1949 MAINTAINER_MODE_TRUE
1950 target_alias
1951 host_alias
1952 build_alias
1953 LIBS
1954 ECHO_T
1955 ECHO_N
1956 ECHO_C
1957 DEFS
1958 mandir
1959 localedir
1960 libdir
1961 psdir
1962 pdfdir
1963 dvidir
1964 htmldir
1965 infodir
1966 docdir
1967 oldincludedir
1968 includedir
1969 localstatedir
1970 sharedstatedir
1971 sysconfdir
1972 datadir
1973 datarootdir
1974 libexecdir
1975 sbindir
1976 bindir
1977 program_transform_name
1978 prefix
1979 exec_prefix
1980 PACKAGE_URL
1981 PACKAGE_BUGREPORT
1982 PACKAGE_STRING
1983 PACKAGE_VERSION
1984 PACKAGE_TARNAME
1985 PACKAGE_NAME
1986 PATH_SEPARATOR
1987 SHELL'
1988 ac_subst_files=''
1989 ac_user_opts='
1990 enable_option_checking
1991 enable_maintainer_mode
1992 enable_plugins
1993 enable_largefile
1994 enable_threads
1995 enable_cross_guesses
1996 enable_dependency_tracking
1997 enable_silent_rules
1998 '
1999 ac_precious_vars='build_alias
2000 host_alias
2001 target_alias
2002 CC
2003 CFLAGS
2004 LDFLAGS
2005 LIBS
2006 CPPFLAGS
2007 CPP'
2008
2009
2010 # Initialize some variables set by options.
2011 ac_init_help=
2012 ac_init_version=false
2013 ac_unrecognized_opts=
2014 ac_unrecognized_sep=
2015 # The variables have the same names as the options, with
2016 # dashes changed to underlines.
2017 cache_file=/dev/null
2018 exec_prefix=NONE
2019 no_create=
2020 no_recursion=
2021 prefix=NONE
2022 program_prefix=NONE
2023 program_suffix=NONE
2024 program_transform_name=s,x,x,
2025 silent=
2026 site=
2027 srcdir=
2028 verbose=
2029 x_includes=NONE
2030 x_libraries=NONE
2031
2032 # Installation directory options.
2033 # These are left unexpanded so users can "make install exec_prefix=/foo"
2034 # and all the variables that are supposed to be based on exec_prefix
2035 # by default will actually change.
2036 # Use braces instead of parens because sh, perl, etc. also accept them.
2037 # (The list follows the same order as the GNU Coding Standards.)
2038 bindir='${exec_prefix}/bin'
2039 sbindir='${exec_prefix}/sbin'
2040 libexecdir='${exec_prefix}/libexec'
2041 datarootdir='${prefix}/share'
2042 datadir='${datarootdir}'
2043 sysconfdir='${prefix}/etc'
2044 sharedstatedir='${prefix}/com'
2045 localstatedir='${prefix}/var'
2046 includedir='${prefix}/include'
2047 oldincludedir='/usr/include'
2048 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2049 infodir='${datarootdir}/info'
2050 htmldir='${docdir}'
2051 dvidir='${docdir}'
2052 pdfdir='${docdir}'
2053 psdir='${docdir}'
2054 libdir='${exec_prefix}/lib'
2055 localedir='${datarootdir}/locale'
2056 mandir='${datarootdir}/man'
2057
2058 ac_prev=
2059 ac_dashdash=
2060 for ac_option
2061 do
2062 # If the previous option needs an argument, assign it.
2063 if test -n "$ac_prev"; then
2064 eval $ac_prev=\$ac_option
2065 ac_prev=
2066 continue
2067 fi
2068
2069 case $ac_option in
2070 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2071 *=) ac_optarg= ;;
2072 *) ac_optarg=yes ;;
2073 esac
2074
2075 # Accept the important Cygnus configure options, so we can diagnose typos.
2076
2077 case $ac_dashdash$ac_option in
2078 --)
2079 ac_dashdash=yes ;;
2080
2081 -bindir | --bindir | --bindi | --bind | --bin | --bi)
2082 ac_prev=bindir ;;
2083 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2084 bindir=$ac_optarg ;;
2085
2086 -build | --build | --buil | --bui | --bu)
2087 ac_prev=build_alias ;;
2088 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2089 build_alias=$ac_optarg ;;
2090
2091 -cache-file | --cache-file | --cache-fil | --cache-fi \
2092 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2093 ac_prev=cache_file ;;
2094 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2095 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2096 cache_file=$ac_optarg ;;
2097
2098 --config-cache | -C)
2099 cache_file=config.cache ;;
2100
2101 -datadir | --datadir | --datadi | --datad)
2102 ac_prev=datadir ;;
2103 -datadir=* | --datadir=* | --datadi=* | --datad=*)
2104 datadir=$ac_optarg ;;
2105
2106 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2107 | --dataroo | --dataro | --datar)
2108 ac_prev=datarootdir ;;
2109 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2110 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2111 datarootdir=$ac_optarg ;;
2112
2113 -disable-* | --disable-*)
2114 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2115 # Reject names that are not valid shell variable names.
2116 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2117 as_fn_error $? "invalid feature name: $ac_useropt"
2118 ac_useropt_orig=$ac_useropt
2119 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2120 case $ac_user_opts in
2121 *"
2122 "enable_$ac_useropt"
2123 "*) ;;
2124 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2125 ac_unrecognized_sep=', ';;
2126 esac
2127 eval enable_$ac_useropt=no ;;
2128
2129 -docdir | --docdir | --docdi | --doc | --do)
2130 ac_prev=docdir ;;
2131 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2132 docdir=$ac_optarg ;;
2133
2134 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2135 ac_prev=dvidir ;;
2136 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2137 dvidir=$ac_optarg ;;
2138
2139 -enable-* | --enable-*)
2140 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2141 # Reject names that are not valid shell variable names.
2142 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2143 as_fn_error $? "invalid feature name: $ac_useropt"
2144 ac_useropt_orig=$ac_useropt
2145 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2146 case $ac_user_opts in
2147 *"
2148 "enable_$ac_useropt"
2149 "*) ;;
2150 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2151 ac_unrecognized_sep=', ';;
2152 esac
2153 eval enable_$ac_useropt=\$ac_optarg ;;
2154
2155 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2156 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2157 | --exec | --exe | --ex)
2158 ac_prev=exec_prefix ;;
2159 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2160 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2161 | --exec=* | --exe=* | --ex=*)
2162 exec_prefix=$ac_optarg ;;
2163
2164 -gas | --gas | --ga | --g)
2165 # Obsolete; use --with-gas.
2166 with_gas=yes ;;
2167
2168 -help | --help | --hel | --he | -h)
2169 ac_init_help=long ;;
2170 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2171 ac_init_help=recursive ;;
2172 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2173 ac_init_help=short ;;
2174
2175 -host | --host | --hos | --ho)
2176 ac_prev=host_alias ;;
2177 -host=* | --host=* | --hos=* | --ho=*)
2178 host_alias=$ac_optarg ;;
2179
2180 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2181 ac_prev=htmldir ;;
2182 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2183 | --ht=*)
2184 htmldir=$ac_optarg ;;
2185
2186 -includedir | --includedir | --includedi | --included | --include \
2187 | --includ | --inclu | --incl | --inc)
2188 ac_prev=includedir ;;
2189 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2190 | --includ=* | --inclu=* | --incl=* | --inc=*)
2191 includedir=$ac_optarg ;;
2192
2193 -infodir | --infodir | --infodi | --infod | --info | --inf)
2194 ac_prev=infodir ;;
2195 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2196 infodir=$ac_optarg ;;
2197
2198 -libdir | --libdir | --libdi | --libd)
2199 ac_prev=libdir ;;
2200 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2201 libdir=$ac_optarg ;;
2202
2203 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2204 | --libexe | --libex | --libe)
2205 ac_prev=libexecdir ;;
2206 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2207 | --libexe=* | --libex=* | --libe=*)
2208 libexecdir=$ac_optarg ;;
2209
2210 -localedir | --localedir | --localedi | --localed | --locale)
2211 ac_prev=localedir ;;
2212 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2213 localedir=$ac_optarg ;;
2214
2215 -localstatedir | --localstatedir | --localstatedi | --localstated \
2216 | --localstate | --localstat | --localsta | --localst | --locals)
2217 ac_prev=localstatedir ;;
2218 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2219 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2220 localstatedir=$ac_optarg ;;
2221
2222 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2223 ac_prev=mandir ;;
2224 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2225 mandir=$ac_optarg ;;
2226
2227 -nfp | --nfp | --nf)
2228 # Obsolete; use --without-fp.
2229 with_fp=no ;;
2230
2231 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2232 | --no-cr | --no-c | -n)
2233 no_create=yes ;;
2234
2235 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2236 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2237 no_recursion=yes ;;
2238
2239 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2240 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2241 | --oldin | --oldi | --old | --ol | --o)
2242 ac_prev=oldincludedir ;;
2243 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2244 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2245 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2246 oldincludedir=$ac_optarg ;;
2247
2248 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2249 ac_prev=prefix ;;
2250 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2251 prefix=$ac_optarg ;;
2252
2253 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2254 | --program-pre | --program-pr | --program-p)
2255 ac_prev=program_prefix ;;
2256 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2257 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2258 program_prefix=$ac_optarg ;;
2259
2260 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2261 | --program-suf | --program-su | --program-s)
2262 ac_prev=program_suffix ;;
2263 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2264 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2265 program_suffix=$ac_optarg ;;
2266
2267 -program-transform-name | --program-transform-name \
2268 | --program-transform-nam | --program-transform-na \
2269 | --program-transform-n | --program-transform- \
2270 | --program-transform | --program-transfor \
2271 | --program-transfo | --program-transf \
2272 | --program-trans | --program-tran \
2273 | --progr-tra | --program-tr | --program-t)
2274 ac_prev=program_transform_name ;;
2275 -program-transform-name=* | --program-transform-name=* \
2276 | --program-transform-nam=* | --program-transform-na=* \
2277 | --program-transform-n=* | --program-transform-=* \
2278 | --program-transform=* | --program-transfor=* \
2279 | --program-transfo=* | --program-transf=* \
2280 | --program-trans=* | --program-tran=* \
2281 | --progr-tra=* | --program-tr=* | --program-t=*)
2282 program_transform_name=$ac_optarg ;;
2283
2284 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2285 ac_prev=pdfdir ;;
2286 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2287 pdfdir=$ac_optarg ;;
2288
2289 -psdir | --psdir | --psdi | --psd | --ps)
2290 ac_prev=psdir ;;
2291 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2292 psdir=$ac_optarg ;;
2293
2294 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2295 | -silent | --silent | --silen | --sile | --sil)
2296 silent=yes ;;
2297
2298 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2299 ac_prev=sbindir ;;
2300 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2301 | --sbi=* | --sb=*)
2302 sbindir=$ac_optarg ;;
2303
2304 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2305 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2306 | --sharedst | --shareds | --shared | --share | --shar \
2307 | --sha | --sh)
2308 ac_prev=sharedstatedir ;;
2309 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2310 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2311 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2312 | --sha=* | --sh=*)
2313 sharedstatedir=$ac_optarg ;;
2314
2315 -site | --site | --sit)
2316 ac_prev=site ;;
2317 -site=* | --site=* | --sit=*)
2318 site=$ac_optarg ;;
2319
2320 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2321 ac_prev=srcdir ;;
2322 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2323 srcdir=$ac_optarg ;;
2324
2325 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2326 | --syscon | --sysco | --sysc | --sys | --sy)
2327 ac_prev=sysconfdir ;;
2328 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2329 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2330 sysconfdir=$ac_optarg ;;
2331
2332 -target | --target | --targe | --targ | --tar | --ta | --t)
2333 ac_prev=target_alias ;;
2334 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2335 target_alias=$ac_optarg ;;
2336
2337 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2338 verbose=yes ;;
2339
2340 -version | --version | --versio | --versi | --vers | -V)
2341 ac_init_version=: ;;
2342
2343 -with-* | --with-*)
2344 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2345 # Reject names that are not valid shell variable names.
2346 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2347 as_fn_error $? "invalid package name: $ac_useropt"
2348 ac_useropt_orig=$ac_useropt
2349 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2350 case $ac_user_opts in
2351 *"
2352 "with_$ac_useropt"
2353 "*) ;;
2354 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2355 ac_unrecognized_sep=', ';;
2356 esac
2357 eval with_$ac_useropt=\$ac_optarg ;;
2358
2359 -without-* | --without-*)
2360 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2361 # Reject names that are not valid shell variable names.
2362 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2363 as_fn_error $? "invalid package name: $ac_useropt"
2364 ac_useropt_orig=$ac_useropt
2365 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2366 case $ac_user_opts in
2367 *"
2368 "with_$ac_useropt"
2369 "*) ;;
2370 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2371 ac_unrecognized_sep=', ';;
2372 esac
2373 eval with_$ac_useropt=no ;;
2374
2375 --x)
2376 # Obsolete; use --with-x.
2377 with_x=yes ;;
2378
2379 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2380 | --x-incl | --x-inc | --x-in | --x-i)
2381 ac_prev=x_includes ;;
2382 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2383 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2384 x_includes=$ac_optarg ;;
2385
2386 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2387 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2388 ac_prev=x_libraries ;;
2389 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2390 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2391 x_libraries=$ac_optarg ;;
2392
2393 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2394 Try \`$0 --help' for more information"
2395 ;;
2396
2397 *=*)
2398 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2399 # Reject names that are not valid shell variable names.
2400 case $ac_envvar in #(
2401 '' | [0-9]* | *[!_$as_cr_alnum]* )
2402 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2403 esac
2404 eval $ac_envvar=\$ac_optarg
2405 export $ac_envvar ;;
2406
2407 *)
2408 # FIXME: should be removed in autoconf 3.0.
2409 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2410 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2411 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2412 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2413 ;;
2414
2415 esac
2416 done
2417
2418 if test -n "$ac_prev"; then
2419 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2420 as_fn_error $? "missing argument to $ac_option"
2421 fi
2422
2423 if test -n "$ac_unrecognized_opts"; then
2424 case $enable_option_checking in
2425 no) ;;
2426 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2427 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2428 esac
2429 fi
2430
2431 # Check all directory arguments for consistency.
2432 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2433 datadir sysconfdir sharedstatedir localstatedir includedir \
2434 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2435 libdir localedir mandir
2436 do
2437 eval ac_val=\$$ac_var
2438 # Remove trailing slashes.
2439 case $ac_val in
2440 */ )
2441 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2442 eval $ac_var=\$ac_val;;
2443 esac
2444 # Be sure to have absolute directory names.
2445 case $ac_val in
2446 [\\/$]* | ?:[\\/]* ) continue;;
2447 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2448 esac
2449 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2450 done
2451
2452 # There might be people who depend on the old broken behavior: `$host'
2453 # used to hold the argument of --host etc.
2454 # FIXME: To remove some day.
2455 build=$build_alias
2456 host=$host_alias
2457 target=$target_alias
2458
2459 # FIXME: To remove some day.
2460 if test "x$host_alias" != x; then
2461 if test "x$build_alias" = x; then
2462 cross_compiling=maybe
2463 elif test "x$build_alias" != "x$host_alias"; then
2464 cross_compiling=yes
2465 fi
2466 fi
2467
2468 ac_tool_prefix=
2469 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2470
2471 test "$silent" = yes && exec 6>/dev/null
2472
2473
2474 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2475 ac_ls_di=`ls -di .` &&
2476 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2477 as_fn_error $? "working directory cannot be determined"
2478 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2479 as_fn_error $? "pwd does not report name of working directory"
2480
2481
2482 # Find the source files, if location was not specified.
2483 if test -z "$srcdir"; then
2484 ac_srcdir_defaulted=yes
2485 # Try the directory containing this script, then the parent directory.
2486 ac_confdir=`$as_dirname -- "$as_myself" ||
2487 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2488 X"$as_myself" : 'X\(//\)[^/]' \| \
2489 X"$as_myself" : 'X\(//\)$' \| \
2490 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2491 $as_echo X"$as_myself" |
2492 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2493 s//\1/
2494 q
2495 }
2496 /^X\(\/\/\)[^/].*/{
2497 s//\1/
2498 q
2499 }
2500 /^X\(\/\/\)$/{
2501 s//\1/
2502 q
2503 }
2504 /^X\(\/\).*/{
2505 s//\1/
2506 q
2507 }
2508 s/.*/./; q'`
2509 srcdir=$ac_confdir
2510 if test ! -r "$srcdir/$ac_unique_file"; then
2511 srcdir=..
2512 fi
2513 else
2514 ac_srcdir_defaulted=no
2515 fi
2516 if test ! -r "$srcdir/$ac_unique_file"; then
2517 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2518 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2519 fi
2520 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2521 ac_abs_confdir=`(
2522 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2523 pwd)`
2524 # When building in place, set srcdir=.
2525 if test "$ac_abs_confdir" = "$ac_pwd"; then
2526 srcdir=.
2527 fi
2528 # Remove unnecessary trailing slashes from srcdir.
2529 # Double slashes in file names in object file debugging info
2530 # mess up M-x gdb in Emacs.
2531 case $srcdir in
2532 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2533 esac
2534 for ac_var in $ac_precious_vars; do
2535 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2536 eval ac_env_${ac_var}_value=\$${ac_var}
2537 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2538 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2539 done
2540
2541 #
2542 # Report the --help message.
2543 #
2544 if test "$ac_init_help" = "long"; then
2545 # Omit some internal or obsolete options to make the list less imposing.
2546 # This message is too long to be a string in the A/UX 3.1 sh.
2547 cat <<_ACEOF
2548 \`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
2549
2550 Usage: $0 [OPTION]... [VAR=VALUE]...
2551
2552 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2553 VAR=VALUE. See below for descriptions of some of the useful variables.
2554
2555 Defaults for the options are specified in brackets.
2556
2557 Configuration:
2558 -h, --help display this help and exit
2559 --help=short display options specific to this package
2560 --help=recursive display the short help of all the included packages
2561 -V, --version display version information and exit
2562 -q, --quiet, --silent do not print \`checking ...' messages
2563 --cache-file=FILE cache test results in FILE [disabled]
2564 -C, --config-cache alias for \`--cache-file=config.cache'
2565 -n, --no-create do not create output files
2566 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2567
2568 Installation directories:
2569 --prefix=PREFIX install architecture-independent files in PREFIX
2570 [$ac_default_prefix]
2571 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2572 [PREFIX]
2573
2574 By default, \`make install' will install all the files in
2575 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2576 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2577 for instance \`--prefix=\$HOME'.
2578
2579 For better control, use the options below.
2580
2581 Fine tuning of the installation directories:
2582 --bindir=DIR user executables [EPREFIX/bin]
2583 --sbindir=DIR system admin executables [EPREFIX/sbin]
2584 --libexecdir=DIR program executables [EPREFIX/libexec]
2585 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2586 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2587 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2588 --libdir=DIR object code libraries [EPREFIX/lib]
2589 --includedir=DIR C header files [PREFIX/include]
2590 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2591 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2592 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2593 --infodir=DIR info documentation [DATAROOTDIR/info]
2594 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2595 --mandir=DIR man documentation [DATAROOTDIR/man]
2596 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
2597 --htmldir=DIR html documentation [DOCDIR]
2598 --dvidir=DIR dvi documentation [DOCDIR]
2599 --pdfdir=DIR pdf documentation [DOCDIR]
2600 --psdir=DIR ps documentation [DOCDIR]
2601 _ACEOF
2602
2603 cat <<\_ACEOF
2604
2605 Program names:
2606 --program-prefix=PREFIX prepend PREFIX to installed program names
2607 --program-suffix=SUFFIX append SUFFIX to installed program names
2608 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2609
2610 System types:
2611 --build=BUILD configure for building on BUILD [guessed]
2612 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2613 --target=TARGET configure for building compilers for TARGET [HOST]
2614 _ACEOF
2615 fi
2616
2617 if test -n "$ac_init_help"; then
2618 case $ac_init_help in
2619 short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
2620 esac
2621 cat <<\_ACEOF
2622
2623 Optional Features:
2624 --disable-option-checking ignore unrecognized --enable/--with options
2625 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2626 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2627 --enable-maintainer-mode
2628 enable make rules and dependencies not useful (and
2629 sometimes confusing) to the casual installer
2630 --enable-plugins Enable support for plugins
2631 --disable-largefile omit support for large files
2632 --enable-threads={isoc|posix|isoc+posix|windows}
2633 specify multithreading API
2634 --disable-threads build without multithread safety
2635 --enable-cross-guesses={conservative|risky}
2636 specify policy for cross-compilation guesses
2637 --enable-dependency-tracking
2638 do not reject slow dependency extractors
2639 --disable-dependency-tracking
2640 speeds up one-time build
2641 --enable-silent-rules less verbose build output (undo: "make V=1")
2642 --disable-silent-rules verbose build output (undo: "make V=0")
2643
2644 Some influential environment variables:
2645 CC C compiler command
2646 CFLAGS C compiler flags
2647 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2648 nonstandard directory <lib dir>
2649 LIBS libraries to pass to the linker, e.g. -l<library>
2650 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2651 you have headers in a nonstandard directory <include dir>
2652 CPP C preprocessor
2653
2654 Use these variables to override the choices made by `configure' or to help
2655 it to find libraries and programs with nonstandard names/locations.
2656
2657 Report bugs to the package provider.
2658 _ACEOF
2659 ac_status=$?
2660 fi
2661
2662 if test "$ac_init_help" = "recursive"; then
2663 # If there are subdirs, report their specific --help.
2664 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2665 test -d "$ac_dir" ||
2666 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2667 continue
2668 ac_builddir=.
2669
2670 case "$ac_dir" in
2671 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2672 *)
2673 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2674 # A ".." for each directory in $ac_dir_suffix.
2675 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2676 case $ac_top_builddir_sub in
2677 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2678 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2679 esac ;;
2680 esac
2681 ac_abs_top_builddir=$ac_pwd
2682 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2683 # for backward compatibility:
2684 ac_top_builddir=$ac_top_build_prefix
2685
2686 case $srcdir in
2687 .) # We are building in place.
2688 ac_srcdir=.
2689 ac_top_srcdir=$ac_top_builddir_sub
2690 ac_abs_top_srcdir=$ac_pwd ;;
2691 [\\/]* | ?:[\\/]* ) # Absolute name.
2692 ac_srcdir=$srcdir$ac_dir_suffix;
2693 ac_top_srcdir=$srcdir
2694 ac_abs_top_srcdir=$srcdir ;;
2695 *) # Relative name.
2696 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2697 ac_top_srcdir=$ac_top_build_prefix$srcdir
2698 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2699 esac
2700 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2701
2702 cd "$ac_dir" || { ac_status=$?; continue; }
2703 # Check for guested configure.
2704 if test -f "$ac_srcdir/configure.gnu"; then
2705 echo &&
2706 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2707 elif test -f "$ac_srcdir/configure"; then
2708 echo &&
2709 $SHELL "$ac_srcdir/configure" --help=recursive
2710 else
2711 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2712 fi || ac_status=$?
2713 cd "$ac_pwd" || { ac_status=$?; break; }
2714 done
2715 fi
2716
2717 test -n "$ac_init_help" && exit $ac_status
2718 if $ac_init_version; then
2719 cat <<\_ACEOF
2720 libgnu configure UNUSED-VERSION
2721 generated by GNU Autoconf 2.69
2722
2723 Copyright (C) 2012 Free Software Foundation, Inc.
2724 This configure script is free software; the Free Software Foundation
2725 gives unlimited permission to copy, distribute and modify it.
2726 _ACEOF
2727 exit
2728 fi
2729
2730 ## ------------------------ ##
2731 ## Autoconf initialization. ##
2732 ## ------------------------ ##
2733
2734 # ac_fn_c_try_compile LINENO
2735 # --------------------------
2736 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2737 ac_fn_c_try_compile ()
2738 {
2739 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2740 rm -f conftest.$ac_objext
2741 if { { ac_try="$ac_compile"
2742 case "(($ac_try" in
2743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2744 *) ac_try_echo=$ac_try;;
2745 esac
2746 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2747 $as_echo "$ac_try_echo"; } >&5
2748 (eval "$ac_compile") 2>conftest.err
2749 ac_status=$?
2750 if test -s conftest.err; then
2751 grep -v '^ *+' conftest.err >conftest.er1
2752 cat conftest.er1 >&5
2753 mv -f conftest.er1 conftest.err
2754 fi
2755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2756 test $ac_status = 0; } && {
2757 test -z "$ac_c_werror_flag" ||
2758 test ! -s conftest.err
2759 } && test -s conftest.$ac_objext; then :
2760 ac_retval=0
2761 else
2762 $as_echo "$as_me: failed program was:" >&5
2763 sed 's/^/| /' conftest.$ac_ext >&5
2764
2765 ac_retval=1
2766 fi
2767 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2768 as_fn_set_status $ac_retval
2769
2770 } # ac_fn_c_try_compile
2771
2772 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2773 # -------------------------------------------------------
2774 # Tests whether HEADER exists and can be compiled using the include files in
2775 # INCLUDES, setting the cache variable VAR accordingly.
2776 ac_fn_c_check_header_compile ()
2777 {
2778 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2780 $as_echo_n "checking for $2... " >&6; }
2781 if eval \${$3+:} false; then :
2782 $as_echo_n "(cached) " >&6
2783 else
2784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2785 /* end confdefs.h. */
2786 $4
2787 #include <$2>
2788 _ACEOF
2789 if ac_fn_c_try_compile "$LINENO"; then :
2790 eval "$3=yes"
2791 else
2792 eval "$3=no"
2793 fi
2794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2795 fi
2796 eval ac_res=\$$3
2797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2798 $as_echo "$ac_res" >&6; }
2799 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2800
2801 } # ac_fn_c_check_header_compile
2802
2803 # ac_fn_c_try_cpp LINENO
2804 # ----------------------
2805 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2806 ac_fn_c_try_cpp ()
2807 {
2808 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2809 if { { ac_try="$ac_cpp conftest.$ac_ext"
2810 case "(($ac_try" in
2811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2812 *) ac_try_echo=$ac_try;;
2813 esac
2814 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2815 $as_echo "$ac_try_echo"; } >&5
2816 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2817 ac_status=$?
2818 if test -s conftest.err; then
2819 grep -v '^ *+' conftest.err >conftest.er1
2820 cat conftest.er1 >&5
2821 mv -f conftest.er1 conftest.err
2822 fi
2823 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2824 test $ac_status = 0; } > conftest.i && {
2825 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2826 test ! -s conftest.err
2827 }; then :
2828 ac_retval=0
2829 else
2830 $as_echo "$as_me: failed program was:" >&5
2831 sed 's/^/| /' conftest.$ac_ext >&5
2832
2833 ac_retval=1
2834 fi
2835 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2836 as_fn_set_status $ac_retval
2837
2838 } # ac_fn_c_try_cpp
2839
2840 # ac_fn_c_try_run LINENO
2841 # ----------------------
2842 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2843 # that executables *can* be run.
2844 ac_fn_c_try_run ()
2845 {
2846 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2847 if { { ac_try="$ac_link"
2848 case "(($ac_try" in
2849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2850 *) ac_try_echo=$ac_try;;
2851 esac
2852 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2853 $as_echo "$ac_try_echo"; } >&5
2854 (eval "$ac_link") 2>&5
2855 ac_status=$?
2856 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2857 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2858 { { case "(($ac_try" in
2859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2860 *) ac_try_echo=$ac_try;;
2861 esac
2862 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2863 $as_echo "$ac_try_echo"; } >&5
2864 (eval "$ac_try") 2>&5
2865 ac_status=$?
2866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2867 test $ac_status = 0; }; }; then :
2868 ac_retval=0
2869 else
2870 $as_echo "$as_me: program exited with status $ac_status" >&5
2871 $as_echo "$as_me: failed program was:" >&5
2872 sed 's/^/| /' conftest.$ac_ext >&5
2873
2874 ac_retval=$ac_status
2875 fi
2876 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2877 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2878 as_fn_set_status $ac_retval
2879
2880 } # ac_fn_c_try_run
2881
2882 # ac_fn_c_try_link LINENO
2883 # -----------------------
2884 # Try to link conftest.$ac_ext, and return whether this succeeded.
2885 ac_fn_c_try_link ()
2886 {
2887 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2888 rm -f conftest.$ac_objext conftest$ac_exeext
2889 if { { ac_try="$ac_link"
2890 case "(($ac_try" in
2891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2892 *) ac_try_echo=$ac_try;;
2893 esac
2894 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2895 $as_echo "$ac_try_echo"; } >&5
2896 (eval "$ac_link") 2>conftest.err
2897 ac_status=$?
2898 if test -s conftest.err; then
2899 grep -v '^ *+' conftest.err >conftest.er1
2900 cat conftest.er1 >&5
2901 mv -f conftest.er1 conftest.err
2902 fi
2903 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2904 test $ac_status = 0; } && {
2905 test -z "$ac_c_werror_flag" ||
2906 test ! -s conftest.err
2907 } && test -s conftest$ac_exeext && {
2908 test "$cross_compiling" = yes ||
2909 test -x conftest$ac_exeext
2910 }; then :
2911 ac_retval=0
2912 else
2913 $as_echo "$as_me: failed program was:" >&5
2914 sed 's/^/| /' conftest.$ac_ext >&5
2915
2916 ac_retval=1
2917 fi
2918 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2919 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2920 # interfere with the next link command; also delete a directory that is
2921 # left behind by Apple's compiler. We do this before executing the actions.
2922 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2923 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2924 as_fn_set_status $ac_retval
2925
2926 } # ac_fn_c_try_link
2927
2928 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2929 # -------------------------------------------
2930 # Tests whether TYPE exists after having included INCLUDES, setting cache
2931 # variable VAR accordingly.
2932 ac_fn_c_check_type ()
2933 {
2934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2936 $as_echo_n "checking for $2... " >&6; }
2937 if eval \${$3+:} false; then :
2938 $as_echo_n "(cached) " >&6
2939 else
2940 eval "$3=no"
2941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2942 /* end confdefs.h. */
2943 $4
2944 int
2945 main ()
2946 {
2947 if (sizeof ($2))
2948 return 0;
2949 ;
2950 return 0;
2951 }
2952 _ACEOF
2953 if ac_fn_c_try_compile "$LINENO"; then :
2954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2955 /* end confdefs.h. */
2956 $4
2957 int
2958 main ()
2959 {
2960 if (sizeof (($2)))
2961 return 0;
2962 ;
2963 return 0;
2964 }
2965 _ACEOF
2966 if ac_fn_c_try_compile "$LINENO"; then :
2967
2968 else
2969 eval "$3=yes"
2970 fi
2971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2972 fi
2973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2974 fi
2975 eval ac_res=\$$3
2976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2977 $as_echo "$ac_res" >&6; }
2978 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2979
2980 } # ac_fn_c_check_type
2981
2982 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2983 # -------------------------------------------------------
2984 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2985 # the include files in INCLUDES and setting the cache variable VAR
2986 # accordingly.
2987 ac_fn_c_check_header_mongrel ()
2988 {
2989 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2990 if eval \${$3+:} false; then :
2991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2992 $as_echo_n "checking for $2... " >&6; }
2993 if eval \${$3+:} false; then :
2994 $as_echo_n "(cached) " >&6
2995 fi
2996 eval ac_res=\$$3
2997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2998 $as_echo "$ac_res" >&6; }
2999 else
3000 # Is the header compilable?
3001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
3002 $as_echo_n "checking $2 usability... " >&6; }
3003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3004 /* end confdefs.h. */
3005 $4
3006 #include <$2>
3007 _ACEOF
3008 if ac_fn_c_try_compile "$LINENO"; then :
3009 ac_header_compiler=yes
3010 else
3011 ac_header_compiler=no
3012 fi
3013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
3015 $as_echo "$ac_header_compiler" >&6; }
3016
3017 # Is the header present?
3018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
3019 $as_echo_n "checking $2 presence... " >&6; }
3020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3021 /* end confdefs.h. */
3022 #include <$2>
3023 _ACEOF
3024 if ac_fn_c_try_cpp "$LINENO"; then :
3025 ac_header_preproc=yes
3026 else
3027 ac_header_preproc=no
3028 fi
3029 rm -f conftest.err conftest.i conftest.$ac_ext
3030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
3031 $as_echo "$ac_header_preproc" >&6; }
3032
3033 # So? What about this header?
3034 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
3035 yes:no: )
3036 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
3037 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
3038 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3039 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3040 ;;
3041 no:yes:* )
3042 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
3043 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
3044 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
3045 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
3046 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
3047 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
3048 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
3049 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
3050 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3051 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3052 ;;
3053 esac
3054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3055 $as_echo_n "checking for $2... " >&6; }
3056 if eval \${$3+:} false; then :
3057 $as_echo_n "(cached) " >&6
3058 else
3059 eval "$3=\$ac_header_compiler"
3060 fi
3061 eval ac_res=\$$3
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3063 $as_echo "$ac_res" >&6; }
3064 fi
3065 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3066
3067 } # ac_fn_c_check_header_mongrel
3068
3069 # ac_fn_c_check_func LINENO FUNC VAR
3070 # ----------------------------------
3071 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3072 ac_fn_c_check_func ()
3073 {
3074 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3076 $as_echo_n "checking for $2... " >&6; }
3077 if eval \${$3+:} false; then :
3078 $as_echo_n "(cached) " >&6
3079 else
3080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3081 /* end confdefs.h. */
3082 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3083 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3084 #define $2 innocuous_$2
3085
3086 /* System header to define __stub macros and hopefully few prototypes,
3087 which can conflict with char $2 (); below.
3088 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3089 <limits.h> exists even on freestanding compilers. */
3090
3091 #ifdef __STDC__
3092 # include <limits.h>
3093 #else
3094 # include <assert.h>
3095 #endif
3096
3097 #undef $2
3098
3099 /* Override any GCC internal prototype to avoid an error.
3100 Use char because int might match the return type of a GCC
3101 builtin and then its argument prototype would still apply. */
3102 #ifdef __cplusplus
3103 extern "C"
3104 #endif
3105 char $2 ();
3106 /* The GNU C library defines this for functions which it implements
3107 to always fail with ENOSYS. Some functions are actually named
3108 something starting with __ and the normal name is an alias. */
3109 #if defined __stub_$2 || defined __stub___$2
3110 choke me
3111 #endif
3112
3113 int
3114 main ()
3115 {
3116 return $2 ();
3117 ;
3118 return 0;
3119 }
3120 _ACEOF
3121 if ac_fn_c_try_link "$LINENO"; then :
3122 eval "$3=yes"
3123 else
3124 eval "$3=no"
3125 fi
3126 rm -f core conftest.err conftest.$ac_objext \
3127 conftest$ac_exeext conftest.$ac_ext
3128 fi
3129 eval ac_res=\$$3
3130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3131 $as_echo "$ac_res" >&6; }
3132 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3133
3134 } # ac_fn_c_check_func
3135
3136 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3137 # ---------------------------------------------
3138 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3139 # accordingly.
3140 ac_fn_c_check_decl ()
3141 {
3142 ac_save_ac_compile="$ac_compile"
3143 if test -n "$ac_compile_for_check_decl"; then
3144 ac_compile="$ac_compile_for_check_decl"
3145 fi
3146 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3147 as_decl_name=`echo $2|sed 's/ *(.*//'`
3148 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3150 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3151 if eval \${$3+:} false; then :
3152 $as_echo_n "(cached) " >&6
3153 else
3154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3155 /* end confdefs.h. */
3156 $4
3157 int
3158 main ()
3159 {
3160 #ifndef $as_decl_name
3161 #ifdef __cplusplus
3162 (void) $as_decl_use;
3163 #else
3164 (void) $as_decl_name;
3165 #endif
3166 #endif
3167
3168 ;
3169 return 0;
3170 }
3171 _ACEOF
3172 if ac_fn_c_try_compile "$LINENO"; then :
3173 eval "$3=yes"
3174 else
3175 eval "$3=no"
3176 fi
3177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3178 fi
3179 eval ac_res=\$$3
3180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3181 $as_echo "$ac_res" >&6; }
3182 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3183 ac_compile="$ac_save_ac_compile"
3184
3185 } # ac_fn_c_check_decl
3186
3187 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3188 # --------------------------------------------
3189 # Tries to find the compile-time value of EXPR in a program that includes
3190 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3191 # computed
3192 ac_fn_c_compute_int ()
3193 {
3194 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3195 if test "$cross_compiling" = yes; then
3196 # Depending upon the size, compute the lo and hi bounds.
3197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3198 /* end confdefs.h. */
3199 $4
3200 int
3201 main ()
3202 {
3203 static int test_array [1 - 2 * !(($2) >= 0)];
3204 test_array [0] = 0;
3205 return test_array [0];
3206
3207 ;
3208 return 0;
3209 }
3210 _ACEOF
3211 if ac_fn_c_try_compile "$LINENO"; then :
3212 ac_lo=0 ac_mid=0
3213 while :; do
3214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3215 /* end confdefs.h. */
3216 $4
3217 int
3218 main ()
3219 {
3220 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3221 test_array [0] = 0;
3222 return test_array [0];
3223
3224 ;
3225 return 0;
3226 }
3227 _ACEOF
3228 if ac_fn_c_try_compile "$LINENO"; then :
3229 ac_hi=$ac_mid; break
3230 else
3231 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3232 if test $ac_lo -le $ac_mid; then
3233 ac_lo= ac_hi=
3234 break
3235 fi
3236 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3237 fi
3238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3239 done
3240 else
3241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3242 /* end confdefs.h. */
3243 $4
3244 int
3245 main ()
3246 {
3247 static int test_array [1 - 2 * !(($2) < 0)];
3248 test_array [0] = 0;
3249 return test_array [0];
3250
3251 ;
3252 return 0;
3253 }
3254 _ACEOF
3255 if ac_fn_c_try_compile "$LINENO"; then :
3256 ac_hi=-1 ac_mid=-1
3257 while :; do
3258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3259 /* end confdefs.h. */
3260 $4
3261 int
3262 main ()
3263 {
3264 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3265 test_array [0] = 0;
3266 return test_array [0];
3267
3268 ;
3269 return 0;
3270 }
3271 _ACEOF
3272 if ac_fn_c_try_compile "$LINENO"; then :
3273 ac_lo=$ac_mid; break
3274 else
3275 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3276 if test $ac_mid -le $ac_hi; then
3277 ac_lo= ac_hi=
3278 break
3279 fi
3280 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3281 fi
3282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3283 done
3284 else
3285 ac_lo= ac_hi=
3286 fi
3287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3288 fi
3289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3290 # Binary search between lo and hi bounds.
3291 while test "x$ac_lo" != "x$ac_hi"; do
3292 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3294 /* end confdefs.h. */
3295 $4
3296 int
3297 main ()
3298 {
3299 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3300 test_array [0] = 0;
3301 return test_array [0];
3302
3303 ;
3304 return 0;
3305 }
3306 _ACEOF
3307 if ac_fn_c_try_compile "$LINENO"; then :
3308 ac_hi=$ac_mid
3309 else
3310 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3311 fi
3312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3313 done
3314 case $ac_lo in #((
3315 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3316 '') ac_retval=1 ;;
3317 esac
3318 else
3319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3320 /* end confdefs.h. */
3321 $4
3322 static long int longval () { return $2; }
3323 static unsigned long int ulongval () { return $2; }
3324 #include <stdio.h>
3325 #include <stdlib.h>
3326 int
3327 main ()
3328 {
3329
3330 FILE *f = fopen ("conftest.val", "w");
3331 if (! f)
3332 return 1;
3333 if (($2) < 0)
3334 {
3335 long int i = longval ();
3336 if (i != ($2))
3337 return 1;
3338 fprintf (f, "%ld", i);
3339 }
3340 else
3341 {
3342 unsigned long int i = ulongval ();
3343 if (i != ($2))
3344 return 1;
3345 fprintf (f, "%lu", i);
3346 }
3347 /* Do not output a trailing newline, as this causes \r\n confusion
3348 on some platforms. */
3349 return ferror (f) || fclose (f) != 0;
3350
3351 ;
3352 return 0;
3353 }
3354 _ACEOF
3355 if ac_fn_c_try_run "$LINENO"; then :
3356 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3357 else
3358 ac_retval=1
3359 fi
3360 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3361 conftest.$ac_objext conftest.beam conftest.$ac_ext
3362 rm -f conftest.val
3363
3364 fi
3365 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3366 as_fn_set_status $ac_retval
3367
3368 } # ac_fn_c_compute_int
3369
3370 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3371 # ----------------------------------------------------
3372 # Tries to find if the field MEMBER exists in type AGGR, after including
3373 # INCLUDES, setting cache variable VAR accordingly.
3374 ac_fn_c_check_member ()
3375 {
3376 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3378 $as_echo_n "checking for $2.$3... " >&6; }
3379 if eval \${$4+:} false; then :
3380 $as_echo_n "(cached) " >&6
3381 else
3382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3383 /* end confdefs.h. */
3384 $5
3385 int
3386 main ()
3387 {
3388 static $2 ac_aggr;
3389 if (ac_aggr.$3)
3390 return 0;
3391 ;
3392 return 0;
3393 }
3394 _ACEOF
3395 if ac_fn_c_try_compile "$LINENO"; then :
3396 eval "$4=yes"
3397 else
3398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3399 /* end confdefs.h. */
3400 $5
3401 int
3402 main ()
3403 {
3404 static $2 ac_aggr;
3405 if (sizeof ac_aggr.$3)
3406 return 0;
3407 ;
3408 return 0;
3409 }
3410 _ACEOF
3411 if ac_fn_c_try_compile "$LINENO"; then :
3412 eval "$4=yes"
3413 else
3414 eval "$4=no"
3415 fi
3416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3417 fi
3418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3419 fi
3420 eval ac_res=\$$4
3421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3422 $as_echo "$ac_res" >&6; }
3423 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3424
3425 } # ac_fn_c_check_member
3426 cat >config.log <<_ACEOF
3427 This file contains any messages produced by compilers while
3428 running configure, to aid debugging if configure makes a mistake.
3429
3430 It was created by libgnu $as_me UNUSED-VERSION, which was
3431 generated by GNU Autoconf 2.69. Invocation command line was
3432
3433 $ $0 $@
3434
3435 _ACEOF
3436 exec 5>>config.log
3437 {
3438 cat <<_ASUNAME
3439 ## --------- ##
3440 ## Platform. ##
3441 ## --------- ##
3442
3443 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3444 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3445 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3446 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3447 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3448
3449 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3450 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3451
3452 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3453 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3454 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3455 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3456 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3457 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3458 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3459
3460 _ASUNAME
3461
3462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3463 for as_dir in $PATH
3464 do
3465 IFS=$as_save_IFS
3466 test -z "$as_dir" && as_dir=.
3467 $as_echo "PATH: $as_dir"
3468 done
3469 IFS=$as_save_IFS
3470
3471 } >&5
3472
3473 cat >&5 <<_ACEOF
3474
3475
3476 ## ----------- ##
3477 ## Core tests. ##
3478 ## ----------- ##
3479
3480 _ACEOF
3481
3482
3483 # Keep a trace of the command line.
3484 # Strip out --no-create and --no-recursion so they do not pile up.
3485 # Strip out --silent because we don't want to record it for future runs.
3486 # Also quote any args containing shell meta-characters.
3487 # Make two passes to allow for proper duplicate-argument suppression.
3488 ac_configure_args=
3489 ac_configure_args0=
3490 ac_configure_args1=
3491 ac_must_keep_next=false
3492 for ac_pass in 1 2
3493 do
3494 for ac_arg
3495 do
3496 case $ac_arg in
3497 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3498 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3499 | -silent | --silent | --silen | --sile | --sil)
3500 continue ;;
3501 *\'*)
3502 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3503 esac
3504 case $ac_pass in
3505 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3506 2)
3507 as_fn_append ac_configure_args1 " '$ac_arg'"
3508 if test $ac_must_keep_next = true; then
3509 ac_must_keep_next=false # Got value, back to normal.
3510 else
3511 case $ac_arg in
3512 *=* | --config-cache | -C | -disable-* | --disable-* \
3513 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3514 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3515 | -with-* | --with-* | -without-* | --without-* | --x)
3516 case "$ac_configure_args0 " in
3517 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3518 esac
3519 ;;
3520 -* ) ac_must_keep_next=true ;;
3521 esac
3522 fi
3523 as_fn_append ac_configure_args " '$ac_arg'"
3524 ;;
3525 esac
3526 done
3527 done
3528 { ac_configure_args0=; unset ac_configure_args0;}
3529 { ac_configure_args1=; unset ac_configure_args1;}
3530
3531 # When interrupted or exit'd, cleanup temporary files, and complete
3532 # config.log. We remove comments because anyway the quotes in there
3533 # would cause problems or look ugly.
3534 # WARNING: Use '\'' to represent an apostrophe within the trap.
3535 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3536 trap 'exit_status=$?
3537 # Save into config.log some information that might help in debugging.
3538 {
3539 echo
3540
3541 $as_echo "## ---------------- ##
3542 ## Cache variables. ##
3543 ## ---------------- ##"
3544 echo
3545 # The following way of writing the cache mishandles newlines in values,
3546 (
3547 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3548 eval ac_val=\$$ac_var
3549 case $ac_val in #(
3550 *${as_nl}*)
3551 case $ac_var in #(
3552 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3553 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3554 esac
3555 case $ac_var in #(
3556 _ | IFS | as_nl) ;; #(
3557 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3558 *) { eval $ac_var=; unset $ac_var;} ;;
3559 esac ;;
3560 esac
3561 done
3562 (set) 2>&1 |
3563 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3564 *${as_nl}ac_space=\ *)
3565 sed -n \
3566 "s/'\''/'\''\\\\'\'''\''/g;
3567 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3568 ;; #(
3569 *)
3570 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3571 ;;
3572 esac |
3573 sort
3574 )
3575 echo
3576
3577 $as_echo "## ----------------- ##
3578 ## Output variables. ##
3579 ## ----------------- ##"
3580 echo
3581 for ac_var in $ac_subst_vars
3582 do
3583 eval ac_val=\$$ac_var
3584 case $ac_val in
3585 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3586 esac
3587 $as_echo "$ac_var='\''$ac_val'\''"
3588 done | sort
3589 echo
3590
3591 if test -n "$ac_subst_files"; then
3592 $as_echo "## ------------------- ##
3593 ## File substitutions. ##
3594 ## ------------------- ##"
3595 echo
3596 for ac_var in $ac_subst_files
3597 do
3598 eval ac_val=\$$ac_var
3599 case $ac_val in
3600 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3601 esac
3602 $as_echo "$ac_var='\''$ac_val'\''"
3603 done | sort
3604 echo
3605 fi
3606
3607 if test -s confdefs.h; then
3608 $as_echo "## ----------- ##
3609 ## confdefs.h. ##
3610 ## ----------- ##"
3611 echo
3612 cat confdefs.h
3613 echo
3614 fi
3615 test "$ac_signal" != 0 &&
3616 $as_echo "$as_me: caught signal $ac_signal"
3617 $as_echo "$as_me: exit $exit_status"
3618 } >&5
3619 rm -f core *.core core.conftest.* &&
3620 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3621 exit $exit_status
3622 ' 0
3623 for ac_signal in 1 2 13 15; do
3624 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3625 done
3626 ac_signal=0
3627
3628 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3629 rm -f -r conftest* confdefs.h
3630
3631 $as_echo "/* confdefs.h */" > confdefs.h
3632
3633 # Predefined preprocessor variables.
3634
3635 cat >>confdefs.h <<_ACEOF
3636 #define PACKAGE_NAME "$PACKAGE_NAME"
3637 _ACEOF
3638
3639 cat >>confdefs.h <<_ACEOF
3640 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3641 _ACEOF
3642
3643 cat >>confdefs.h <<_ACEOF
3644 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3645 _ACEOF
3646
3647 cat >>confdefs.h <<_ACEOF
3648 #define PACKAGE_STRING "$PACKAGE_STRING"
3649 _ACEOF
3650
3651 cat >>confdefs.h <<_ACEOF
3652 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3653 _ACEOF
3654
3655 cat >>confdefs.h <<_ACEOF
3656 #define PACKAGE_URL "$PACKAGE_URL"
3657 _ACEOF
3658
3659
3660 # Let the site file select an alternate cache file if it wants to.
3661 # Prefer an explicitly selected file to automatically selected ones.
3662 ac_site_file1=NONE
3663 ac_site_file2=NONE
3664 if test -n "$CONFIG_SITE"; then
3665 # We do not want a PATH search for config.site.
3666 case $CONFIG_SITE in #((
3667 -*) ac_site_file1=./$CONFIG_SITE;;
3668 */*) ac_site_file1=$CONFIG_SITE;;
3669 *) ac_site_file1=./$CONFIG_SITE;;
3670 esac
3671 elif test "x$prefix" != xNONE; then
3672 ac_site_file1=$prefix/share/config.site
3673 ac_site_file2=$prefix/etc/config.site
3674 else
3675 ac_site_file1=$ac_default_prefix/share/config.site
3676 ac_site_file2=$ac_default_prefix/etc/config.site
3677 fi
3678 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3679 do
3680 test "x$ac_site_file" = xNONE && continue
3681 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3682 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3683 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3684 sed 's/^/| /' "$ac_site_file" >&5
3685 . "$ac_site_file" \
3686 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3687 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3688 as_fn_error $? "failed to load site script $ac_site_file
3689 See \`config.log' for more details" "$LINENO" 5; }
3690 fi
3691 done
3692
3693 if test -r "$cache_file"; then
3694 # Some versions of bash will fail to source /dev/null (special files
3695 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3696 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3697 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3698 $as_echo "$as_me: loading cache $cache_file" >&6;}
3699 case $cache_file in
3700 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3701 *) . "./$cache_file";;
3702 esac
3703 fi
3704 else
3705 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3706 $as_echo "$as_me: creating cache $cache_file" >&6;}
3707 >$cache_file
3708 fi
3709
3710 as_fn_append ac_header_list " wchar.h"
3711 as_fn_append ac_header_list " minix/config.h"
3712 as_fn_append ac_header_list " arpa/inet.h"
3713 as_fn_append ac_header_list " features.h"
3714 as_fn_append ac_header_list " sys/socket.h"
3715 as_fn_append ac_func_list " btowc"
3716 as_fn_append ac_func_list " canonicalize_file_name"
3717 as_fn_append ac_func_list " faccessat"
3718 as_fn_append ac_func_list " realpath"
3719 as_fn_append ac_header_list " sys/param.h"
3720 as_fn_append ac_header_list " unistd.h"
3721 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3722 as_fn_append ac_func_list " fchdir"
3723 as_fn_append ac_header_list " dirent.h"
3724 as_fn_append ac_func_list " fcntl"
3725 as_fn_append ac_func_list " symlink"
3726 as_fn_append ac_func_list " fdopendir"
3727 as_fn_append ac_func_list " mempcpy"
3728 as_fn_append ac_header_list " fnmatch.h"
3729 as_fn_append ac_func_list " fnmatch"
3730 as_fn_append ac_func_list " mbsrtowcs"
3731 gl_fnmatch_required=GNU
3732 as_fn_append ac_header_list " sys/stat.h"
3733 as_fn_append ac_func_list " fstatat"
3734 as_fn_append ac_func_list " getdtablesize"
3735 as_fn_append ac_func_list " getlogin_r"
3736 as_fn_append ac_func_list " getprogname"
3737 as_fn_append ac_func_list " getexecname"
3738 as_fn_append ac_func_list " getrandom"
3739 as_fn_append ac_header_list " sys/time.h"
3740 as_fn_append ac_func_list " gettimeofday"
3741 as_fn_append ac_header_list " glob.h"
3742 as_fn_append ac_func_list " glob"
3743 as_fn_append ac_func_list " glob_pattern_p"
3744 as_fn_append ac_func_list " getpwnam_r"
3745 as_fn_append ac_header_list " threads.h"
3746 as_fn_append ac_header_list " netdb.h"
3747 as_fn_append ac_header_list " netinet/in.h"
3748 as_fn_append ac_header_list " limits.h"
3749 as_fn_append ac_header_list " inttypes.h"
3750 as_fn_append ac_header_list " sys/types.h"
3751 as_fn_append ac_header_list " stdint.h"
3752 as_fn_append ac_func_list " isblank"
3753 as_fn_append ac_header_list " xlocale.h"
3754 as_fn_append ac_func_list " lstat"
3755 as_fn_append ac_header_list " math.h"
3756 as_fn_append ac_func_list " mbsinit"
3757 as_fn_append ac_func_list " mbrtowc"
3758 as_fn_append ac_header_list " sys/mman.h"
3759 as_fn_append ac_func_list " mprotect"
3760 as_fn_append ac_func_list " mkostemp"
3761 as_fn_append ac_func_list " openat"
3762 as_fn_append ac_func_list " pipe"
3763 as_fn_append ac_func_list " readlink"
3764 as_fn_append ac_func_list " link"
3765 as_fn_append ac_func_list " setenv"
3766 as_fn_append ac_func_list " strerror_r"
3767 as_fn_append ac_func_list " __xpg_strerror_r"
3768 as_fn_append ac_func_list " catgets"
3769 as_fn_append ac_func_list " snprintf"
3770 as_fn_append ac_header_list " sys/random.h"
3771 as_fn_append ac_header_list " sys/uio.h"
3772 as_fn_append ac_func_list " localtime_r"
3773 as_fn_append ac_header_list " crtdefs.h"
3774 as_fn_append ac_func_list " iswcntrl"
3775 as_fn_append ac_header_list " wctype.h"
3776 as_fn_append ac_func_list " wmempcpy"
3777 # Check that the precious variables saved in the cache have kept the same
3778 # value.
3779 ac_cache_corrupted=false
3780 for ac_var in $ac_precious_vars; do
3781 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3782 eval ac_new_set=\$ac_env_${ac_var}_set
3783 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3784 eval ac_new_val=\$ac_env_${ac_var}_value
3785 case $ac_old_set,$ac_new_set in
3786 set,)
3787 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3788 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3789 ac_cache_corrupted=: ;;
3790 ,set)
3791 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3792 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3793 ac_cache_corrupted=: ;;
3794 ,);;
3795 *)
3796 if test "x$ac_old_val" != "x$ac_new_val"; then
3797 # differences in whitespace do not lead to failure.
3798 ac_old_val_w=`echo x $ac_old_val`
3799 ac_new_val_w=`echo x $ac_new_val`
3800 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3801 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3802 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3803 ac_cache_corrupted=:
3804 else
3805 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3806 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3807 eval $ac_var=\$ac_old_val
3808 fi
3809 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3810 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3811 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3812 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3813 fi;;
3814 esac
3815 # Pass precious variables to config.status.
3816 if test "$ac_new_set" = set; then
3817 case $ac_new_val in
3818 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3819 *) ac_arg=$ac_var=$ac_new_val ;;
3820 esac
3821 case " $ac_configure_args " in
3822 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3823 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3824 esac
3825 fi
3826 done
3827 if $ac_cache_corrupted; then
3828 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3829 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3830 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3831 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3832 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3833 fi
3834 ## -------------------- ##
3835 ## Main body of script. ##
3836 ## -------------------- ##
3837
3838 ac_ext=c
3839 ac_cpp='$CPP $CPPFLAGS'
3840 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3841 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3842 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3843
3844
3845
3846
3847
3848
3849 ac_config_headers="$ac_config_headers config.h:config.in"
3850
3851
3852
3853
3854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3855 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3856 # Check whether --enable-maintainer-mode was given.
3857 if test "${enable_maintainer_mode+set}" = set; then :
3858 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3859 else
3860 USE_MAINTAINER_MODE=no
3861 fi
3862
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3864 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3865 if test $USE_MAINTAINER_MODE = yes; then
3866 MAINTAINER_MODE_TRUE=
3867 MAINTAINER_MODE_FALSE='#'
3868 else
3869 MAINTAINER_MODE_TRUE='#'
3870 MAINTAINER_MODE_FALSE=
3871 fi
3872
3873 MAINT=$MAINTAINER_MODE_TRUE
3874
3875
3876
3877 ac_ext=c
3878 ac_cpp='$CPP $CPPFLAGS'
3879 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3880 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3881 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3882 if test -n "$ac_tool_prefix"; then
3883 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3884 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3886 $as_echo_n "checking for $ac_word... " >&6; }
3887 if ${ac_cv_prog_CC+:} false; then :
3888 $as_echo_n "(cached) " >&6
3889 else
3890 if test -n "$CC"; then
3891 ac_cv_prog_CC="$CC" # Let the user override the test.
3892 else
3893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3894 for as_dir in $PATH
3895 do
3896 IFS=$as_save_IFS
3897 test -z "$as_dir" && as_dir=.
3898 for ac_exec_ext in '' $ac_executable_extensions; do
3899 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3900 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3901 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3902 break 2
3903 fi
3904 done
3905 done
3906 IFS=$as_save_IFS
3907
3908 fi
3909 fi
3910 CC=$ac_cv_prog_CC
3911 if test -n "$CC"; then
3912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3913 $as_echo "$CC" >&6; }
3914 else
3915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3916 $as_echo "no" >&6; }
3917 fi
3918
3919
3920 fi
3921 if test -z "$ac_cv_prog_CC"; then
3922 ac_ct_CC=$CC
3923 # Extract the first word of "gcc", so it can be a program name with args.
3924 set dummy gcc; ac_word=$2
3925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3926 $as_echo_n "checking for $ac_word... " >&6; }
3927 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3928 $as_echo_n "(cached) " >&6
3929 else
3930 if test -n "$ac_ct_CC"; then
3931 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3932 else
3933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3934 for as_dir in $PATH
3935 do
3936 IFS=$as_save_IFS
3937 test -z "$as_dir" && as_dir=.
3938 for ac_exec_ext in '' $ac_executable_extensions; do
3939 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3940 ac_cv_prog_ac_ct_CC="gcc"
3941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3942 break 2
3943 fi
3944 done
3945 done
3946 IFS=$as_save_IFS
3947
3948 fi
3949 fi
3950 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3951 if test -n "$ac_ct_CC"; then
3952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3953 $as_echo "$ac_ct_CC" >&6; }
3954 else
3955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3956 $as_echo "no" >&6; }
3957 fi
3958
3959 if test "x$ac_ct_CC" = x; then
3960 CC=""
3961 else
3962 case $cross_compiling:$ac_tool_warned in
3963 yes:)
3964 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3965 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3966 ac_tool_warned=yes ;;
3967 esac
3968 CC=$ac_ct_CC
3969 fi
3970 else
3971 CC="$ac_cv_prog_CC"
3972 fi
3973
3974 if test -z "$CC"; then
3975 if test -n "$ac_tool_prefix"; then
3976 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3977 set dummy ${ac_tool_prefix}cc; ac_word=$2
3978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3979 $as_echo_n "checking for $ac_word... " >&6; }
3980 if ${ac_cv_prog_CC+:} false; then :
3981 $as_echo_n "(cached) " >&6
3982 else
3983 if test -n "$CC"; then
3984 ac_cv_prog_CC="$CC" # Let the user override the test.
3985 else
3986 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3987 for as_dir in $PATH
3988 do
3989 IFS=$as_save_IFS
3990 test -z "$as_dir" && as_dir=.
3991 for ac_exec_ext in '' $ac_executable_extensions; do
3992 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3993 ac_cv_prog_CC="${ac_tool_prefix}cc"
3994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3995 break 2
3996 fi
3997 done
3998 done
3999 IFS=$as_save_IFS
4000
4001 fi
4002 fi
4003 CC=$ac_cv_prog_CC
4004 if test -n "$CC"; then
4005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4006 $as_echo "$CC" >&6; }
4007 else
4008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4009 $as_echo "no" >&6; }
4010 fi
4011
4012
4013 fi
4014 fi
4015 if test -z "$CC"; then
4016 # Extract the first word of "cc", so it can be a program name with args.
4017 set dummy cc; ac_word=$2
4018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4019 $as_echo_n "checking for $ac_word... " >&6; }
4020 if ${ac_cv_prog_CC+:} false; then :
4021 $as_echo_n "(cached) " >&6
4022 else
4023 if test -n "$CC"; then
4024 ac_cv_prog_CC="$CC" # Let the user override the test.
4025 else
4026 ac_prog_rejected=no
4027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4028 for as_dir in $PATH
4029 do
4030 IFS=$as_save_IFS
4031 test -z "$as_dir" && as_dir=.
4032 for ac_exec_ext in '' $ac_executable_extensions; do
4033 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4034 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4035 ac_prog_rejected=yes
4036 continue
4037 fi
4038 ac_cv_prog_CC="cc"
4039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4040 break 2
4041 fi
4042 done
4043 done
4044 IFS=$as_save_IFS
4045
4046 if test $ac_prog_rejected = yes; then
4047 # We found a bogon in the path, so make sure we never use it.
4048 set dummy $ac_cv_prog_CC
4049 shift
4050 if test $# != 0; then
4051 # We chose a different compiler from the bogus one.
4052 # However, it has the same basename, so the bogon will be chosen
4053 # first if we set CC to just the basename; use the full file name.
4054 shift
4055 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4056 fi
4057 fi
4058 fi
4059 fi
4060 CC=$ac_cv_prog_CC
4061 if test -n "$CC"; then
4062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4063 $as_echo "$CC" >&6; }
4064 else
4065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4066 $as_echo "no" >&6; }
4067 fi
4068
4069
4070 fi
4071 if test -z "$CC"; then
4072 if test -n "$ac_tool_prefix"; then
4073 for ac_prog in cl.exe
4074 do
4075 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4076 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4078 $as_echo_n "checking for $ac_word... " >&6; }
4079 if ${ac_cv_prog_CC+:} false; then :
4080 $as_echo_n "(cached) " >&6
4081 else
4082 if test -n "$CC"; then
4083 ac_cv_prog_CC="$CC" # Let the user override the test.
4084 else
4085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4086 for as_dir in $PATH
4087 do
4088 IFS=$as_save_IFS
4089 test -z "$as_dir" && as_dir=.
4090 for ac_exec_ext in '' $ac_executable_extensions; do
4091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4092 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4094 break 2
4095 fi
4096 done
4097 done
4098 IFS=$as_save_IFS
4099
4100 fi
4101 fi
4102 CC=$ac_cv_prog_CC
4103 if test -n "$CC"; then
4104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4105 $as_echo "$CC" >&6; }
4106 else
4107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4108 $as_echo "no" >&6; }
4109 fi
4110
4111
4112 test -n "$CC" && break
4113 done
4114 fi
4115 if test -z "$CC"; then
4116 ac_ct_CC=$CC
4117 for ac_prog in cl.exe
4118 do
4119 # Extract the first word of "$ac_prog", so it can be a program name with args.
4120 set dummy $ac_prog; ac_word=$2
4121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4122 $as_echo_n "checking for $ac_word... " >&6; }
4123 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4124 $as_echo_n "(cached) " >&6
4125 else
4126 if test -n "$ac_ct_CC"; then
4127 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4128 else
4129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4130 for as_dir in $PATH
4131 do
4132 IFS=$as_save_IFS
4133 test -z "$as_dir" && as_dir=.
4134 for ac_exec_ext in '' $ac_executable_extensions; do
4135 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4136 ac_cv_prog_ac_ct_CC="$ac_prog"
4137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4138 break 2
4139 fi
4140 done
4141 done
4142 IFS=$as_save_IFS
4143
4144 fi
4145 fi
4146 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4147 if test -n "$ac_ct_CC"; then
4148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4149 $as_echo "$ac_ct_CC" >&6; }
4150 else
4151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4152 $as_echo "no" >&6; }
4153 fi
4154
4155
4156 test -n "$ac_ct_CC" && break
4157 done
4158
4159 if test "x$ac_ct_CC" = x; then
4160 CC=""
4161 else
4162 case $cross_compiling:$ac_tool_warned in
4163 yes:)
4164 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4165 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4166 ac_tool_warned=yes ;;
4167 esac
4168 CC=$ac_ct_CC
4169 fi
4170 fi
4171
4172 fi
4173 if test -z "$CC"; then
4174 if test -n "$ac_tool_prefix"; then
4175 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4176 set dummy ${ac_tool_prefix}clang; ac_word=$2
4177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4178 $as_echo_n "checking for $ac_word... " >&6; }
4179 if ${ac_cv_prog_CC+:} false; then :
4180 $as_echo_n "(cached) " >&6
4181 else
4182 if test -n "$CC"; then
4183 ac_cv_prog_CC="$CC" # Let the user override the test.
4184 else
4185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4186 for as_dir in $PATH
4187 do
4188 IFS=$as_save_IFS
4189 test -z "$as_dir" && as_dir=.
4190 for ac_exec_ext in '' $ac_executable_extensions; do
4191 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4192 ac_cv_prog_CC="${ac_tool_prefix}clang"
4193 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4194 break 2
4195 fi
4196 done
4197 done
4198 IFS=$as_save_IFS
4199
4200 fi
4201 fi
4202 CC=$ac_cv_prog_CC
4203 if test -n "$CC"; then
4204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4205 $as_echo "$CC" >&6; }
4206 else
4207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4208 $as_echo "no" >&6; }
4209 fi
4210
4211
4212 fi
4213 if test -z "$ac_cv_prog_CC"; then
4214 ac_ct_CC=$CC
4215 # Extract the first word of "clang", so it can be a program name with args.
4216 set dummy clang; ac_word=$2
4217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4218 $as_echo_n "checking for $ac_word... " >&6; }
4219 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4220 $as_echo_n "(cached) " >&6
4221 else
4222 if test -n "$ac_ct_CC"; then
4223 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4224 else
4225 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4226 for as_dir in $PATH
4227 do
4228 IFS=$as_save_IFS
4229 test -z "$as_dir" && as_dir=.
4230 for ac_exec_ext in '' $ac_executable_extensions; do
4231 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4232 ac_cv_prog_ac_ct_CC="clang"
4233 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4234 break 2
4235 fi
4236 done
4237 done
4238 IFS=$as_save_IFS
4239
4240 fi
4241 fi
4242 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4243 if test -n "$ac_ct_CC"; then
4244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4245 $as_echo "$ac_ct_CC" >&6; }
4246 else
4247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4248 $as_echo "no" >&6; }
4249 fi
4250
4251 if test "x$ac_ct_CC" = x; then
4252 CC=""
4253 else
4254 case $cross_compiling:$ac_tool_warned in
4255 yes:)
4256 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4257 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4258 ac_tool_warned=yes ;;
4259 esac
4260 CC=$ac_ct_CC
4261 fi
4262 else
4263 CC="$ac_cv_prog_CC"
4264 fi
4265
4266 fi
4267
4268
4269 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4270 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4271 as_fn_error $? "no acceptable C compiler found in \$PATH
4272 See \`config.log' for more details" "$LINENO" 5; }
4273
4274 # Provide some information about the compiler.
4275 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4276 set X $ac_compile
4277 ac_compiler=$2
4278 for ac_option in --version -v -V -qversion -version; do
4279 { { ac_try="$ac_compiler $ac_option >&5"
4280 case "(($ac_try" in
4281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4282 *) ac_try_echo=$ac_try;;
4283 esac
4284 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4285 $as_echo "$ac_try_echo"; } >&5
4286 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4287 ac_status=$?
4288 if test -s conftest.err; then
4289 sed '10a\
4290 ... rest of stderr output deleted ...
4291 10q' conftest.err >conftest.er1
4292 cat conftest.er1 >&5
4293 fi
4294 rm -f conftest.er1 conftest.err
4295 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4296 test $ac_status = 0; }
4297 done
4298
4299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4300 /* end confdefs.h. */
4301
4302 int
4303 main ()
4304 {
4305
4306 ;
4307 return 0;
4308 }
4309 _ACEOF
4310 ac_clean_files_save=$ac_clean_files
4311 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4312 # Try to create an executable without -o first, disregard a.out.
4313 # It will help us diagnose broken compilers, and finding out an intuition
4314 # of exeext.
4315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4316 $as_echo_n "checking whether the C compiler works... " >&6; }
4317 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4318
4319 # The possible output files:
4320 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4321
4322 ac_rmfiles=
4323 for ac_file in $ac_files
4324 do
4325 case $ac_file in
4326 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4327 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4328 esac
4329 done
4330 rm -f $ac_rmfiles
4331
4332 if { { ac_try="$ac_link_default"
4333 case "(($ac_try" in
4334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4335 *) ac_try_echo=$ac_try;;
4336 esac
4337 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4338 $as_echo "$ac_try_echo"; } >&5
4339 (eval "$ac_link_default") 2>&5
4340 ac_status=$?
4341 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4342 test $ac_status = 0; }; then :
4343 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4344 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4345 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4346 # so that the user can short-circuit this test for compilers unknown to
4347 # Autoconf.
4348 for ac_file in $ac_files ''
4349 do
4350 test -f "$ac_file" || continue
4351 case $ac_file in
4352 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4353 ;;
4354 [ab].out )
4355 # We found the default executable, but exeext='' is most
4356 # certainly right.
4357 break;;
4358 *.* )
4359 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4360 then :; else
4361 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4362 fi
4363 # We set ac_cv_exeext here because the later test for it is not
4364 # safe: cross compilers may not add the suffix if given an `-o'
4365 # argument, so we may need to know it at that point already.
4366 # Even if this section looks crufty: it has the advantage of
4367 # actually working.
4368 break;;
4369 * )
4370 break;;
4371 esac
4372 done
4373 test "$ac_cv_exeext" = no && ac_cv_exeext=
4374
4375 else
4376 ac_file=''
4377 fi
4378 if test -z "$ac_file"; then :
4379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4380 $as_echo "no" >&6; }
4381 $as_echo "$as_me: failed program was:" >&5
4382 sed 's/^/| /' conftest.$ac_ext >&5
4383
4384 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4385 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4386 as_fn_error 77 "C compiler cannot create executables
4387 See \`config.log' for more details" "$LINENO" 5; }
4388 else
4389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4390 $as_echo "yes" >&6; }
4391 fi
4392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4393 $as_echo_n "checking for C compiler default output file name... " >&6; }
4394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4395 $as_echo "$ac_file" >&6; }
4396 ac_exeext=$ac_cv_exeext
4397
4398 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4399 ac_clean_files=$ac_clean_files_save
4400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4401 $as_echo_n "checking for suffix of executables... " >&6; }
4402 if { { ac_try="$ac_link"
4403 case "(($ac_try" in
4404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4405 *) ac_try_echo=$ac_try;;
4406 esac
4407 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4408 $as_echo "$ac_try_echo"; } >&5
4409 (eval "$ac_link") 2>&5
4410 ac_status=$?
4411 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4412 test $ac_status = 0; }; then :
4413 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4414 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4415 # work properly (i.e., refer to `conftest.exe'), while it won't with
4416 # `rm'.
4417 for ac_file in conftest.exe conftest conftest.*; do
4418 test -f "$ac_file" || continue
4419 case $ac_file in
4420 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4421 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4422 break;;
4423 * ) break;;
4424 esac
4425 done
4426 else
4427 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4428 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4429 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4430 See \`config.log' for more details" "$LINENO" 5; }
4431 fi
4432 rm -f conftest conftest$ac_cv_exeext
4433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4434 $as_echo "$ac_cv_exeext" >&6; }
4435
4436 rm -f conftest.$ac_ext
4437 EXEEXT=$ac_cv_exeext
4438 ac_exeext=$EXEEXT
4439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4440 /* end confdefs.h. */
4441 #include <stdio.h>
4442 int
4443 main ()
4444 {
4445 FILE *f = fopen ("conftest.out", "w");
4446 return ferror (f) || fclose (f) != 0;
4447
4448 ;
4449 return 0;
4450 }
4451 _ACEOF
4452 ac_clean_files="$ac_clean_files conftest.out"
4453 # Check that the compiler produces executables we can run. If not, either
4454 # the compiler is broken, or we cross compile.
4455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4456 $as_echo_n "checking whether we are cross compiling... " >&6; }
4457 if test "$cross_compiling" != yes; then
4458 { { ac_try="$ac_link"
4459 case "(($ac_try" in
4460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4461 *) ac_try_echo=$ac_try;;
4462 esac
4463 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4464 $as_echo "$ac_try_echo"; } >&5
4465 (eval "$ac_link") 2>&5
4466 ac_status=$?
4467 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4468 test $ac_status = 0; }
4469 if { ac_try='./conftest$ac_cv_exeext'
4470 { { case "(($ac_try" in
4471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4472 *) ac_try_echo=$ac_try;;
4473 esac
4474 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4475 $as_echo "$ac_try_echo"; } >&5
4476 (eval "$ac_try") 2>&5
4477 ac_status=$?
4478 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4479 test $ac_status = 0; }; }; then
4480 cross_compiling=no
4481 else
4482 if test "$cross_compiling" = maybe; then
4483 cross_compiling=yes
4484 else
4485 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4486 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4487 as_fn_error $? "cannot run C compiled programs.
4488 If you meant to cross compile, use \`--host'.
4489 See \`config.log' for more details" "$LINENO" 5; }
4490 fi
4491 fi
4492 fi
4493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4494 $as_echo "$cross_compiling" >&6; }
4495
4496 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4497 ac_clean_files=$ac_clean_files_save
4498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4499 $as_echo_n "checking for suffix of object files... " >&6; }
4500 if ${ac_cv_objext+:} false; then :
4501 $as_echo_n "(cached) " >&6
4502 else
4503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4504 /* end confdefs.h. */
4505
4506 int
4507 main ()
4508 {
4509
4510 ;
4511 return 0;
4512 }
4513 _ACEOF
4514 rm -f conftest.o conftest.obj
4515 if { { ac_try="$ac_compile"
4516 case "(($ac_try" in
4517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4518 *) ac_try_echo=$ac_try;;
4519 esac
4520 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4521 $as_echo "$ac_try_echo"; } >&5
4522 (eval "$ac_compile") 2>&5
4523 ac_status=$?
4524 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4525 test $ac_status = 0; }; then :
4526 for ac_file in conftest.o conftest.obj conftest.*; do
4527 test -f "$ac_file" || continue;
4528 case $ac_file in
4529 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4530 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4531 break;;
4532 esac
4533 done
4534 else
4535 $as_echo "$as_me: failed program was:" >&5
4536 sed 's/^/| /' conftest.$ac_ext >&5
4537
4538 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4539 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4540 as_fn_error $? "cannot compute suffix of object files: cannot compile
4541 See \`config.log' for more details" "$LINENO" 5; }
4542 fi
4543 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4544 fi
4545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4546 $as_echo "$ac_cv_objext" >&6; }
4547 OBJEXT=$ac_cv_objext
4548 ac_objext=$OBJEXT
4549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4550 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4551 if ${ac_cv_c_compiler_gnu+:} false; then :
4552 $as_echo_n "(cached) " >&6
4553 else
4554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4555 /* end confdefs.h. */
4556
4557 int
4558 main ()
4559 {
4560 #ifndef __GNUC__
4561 choke me
4562 #endif
4563
4564 ;
4565 return 0;
4566 }
4567 _ACEOF
4568 if ac_fn_c_try_compile "$LINENO"; then :
4569 ac_compiler_gnu=yes
4570 else
4571 ac_compiler_gnu=no
4572 fi
4573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4574 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4575
4576 fi
4577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4578 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4579 if test $ac_compiler_gnu = yes; then
4580 GCC=yes
4581 else
4582 GCC=
4583 fi
4584 ac_test_CFLAGS=${CFLAGS+set}
4585 ac_save_CFLAGS=$CFLAGS
4586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4587 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4588 if ${ac_cv_prog_cc_g+:} false; then :
4589 $as_echo_n "(cached) " >&6
4590 else
4591 ac_save_c_werror_flag=$ac_c_werror_flag
4592 ac_c_werror_flag=yes
4593 ac_cv_prog_cc_g=no
4594 CFLAGS="-g"
4595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596 /* end confdefs.h. */
4597
4598 int
4599 main ()
4600 {
4601
4602 ;
4603 return 0;
4604 }
4605 _ACEOF
4606 if ac_fn_c_try_compile "$LINENO"; then :
4607 ac_cv_prog_cc_g=yes
4608 else
4609 CFLAGS=""
4610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4611 /* end confdefs.h. */
4612
4613 int
4614 main ()
4615 {
4616
4617 ;
4618 return 0;
4619 }
4620 _ACEOF
4621 if ac_fn_c_try_compile "$LINENO"; then :
4622
4623 else
4624 ac_c_werror_flag=$ac_save_c_werror_flag
4625 CFLAGS="-g"
4626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4627 /* end confdefs.h. */
4628
4629 int
4630 main ()
4631 {
4632
4633 ;
4634 return 0;
4635 }
4636 _ACEOF
4637 if ac_fn_c_try_compile "$LINENO"; then :
4638 ac_cv_prog_cc_g=yes
4639 fi
4640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4641 fi
4642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4643 fi
4644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4645 ac_c_werror_flag=$ac_save_c_werror_flag
4646 fi
4647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4648 $as_echo "$ac_cv_prog_cc_g" >&6; }
4649 if test "$ac_test_CFLAGS" = set; then
4650 CFLAGS=$ac_save_CFLAGS
4651 elif test $ac_cv_prog_cc_g = yes; then
4652 if test "$GCC" = yes; then
4653 CFLAGS="-g -O2"
4654 else
4655 CFLAGS="-g"
4656 fi
4657 else
4658 if test "$GCC" = yes; then
4659 CFLAGS="-O2"
4660 else
4661 CFLAGS=
4662 fi
4663 fi
4664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4665 $as_echo_n "checking for $CC option to enable C11 features... " >&6; }
4666 if ${ac_cv_prog_cc_c11+:} false; then :
4667 $as_echo_n "(cached) " >&6
4668 else
4669 ac_cv_prog_cc_c11=no
4670 ac_save_CC=$CC
4671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4672 /* end confdefs.h. */
4673 #include <stdarg.h>
4674 #include <stdbool.h>
4675 #include <stddef.h>
4676 #include <stdlib.h>
4677 #include <wchar.h>
4678 #include <stdio.h>
4679
4680 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4681 #define debug(...) fprintf (stderr, __VA_ARGS__)
4682 #define showlist(...) puts (#__VA_ARGS__)
4683 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4684 static void
4685 test_varargs_macros (void)
4686 {
4687 int x = 1234;
4688 int y = 5678;
4689 debug ("Flag");
4690 debug ("X = %d\n", x);
4691 showlist (The first, second, and third items.);
4692 report (x>y, "x is %d but y is %d", x, y);
4693 }
4694
4695 // Check long long types.
4696 #define BIG64 18446744073709551615ull
4697 #define BIG32 4294967295ul
4698 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4699 #if !BIG_OK
4700 your preprocessor is broken;
4701 #endif
4702 #if BIG_OK
4703 #else
4704 your preprocessor is broken;
4705 #endif
4706 static long long int bignum = -9223372036854775807LL;
4707 static unsigned long long int ubignum = BIG64;
4708
4709 struct incomplete_array
4710 {
4711 int datasize;
4712 double data[];
4713 };
4714
4715 struct named_init {
4716 int number;
4717 const wchar_t *name;
4718 double average;
4719 };
4720
4721 typedef const char *ccp;
4722
4723 static inline int
4724 test_restrict (ccp restrict text)
4725 {
4726 // See if C++-style comments work.
4727 // Iterate through items via the restricted pointer.
4728 // Also check for declarations in for loops.
4729 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4730 continue;
4731 return 0;
4732 }
4733
4734 // Check varargs and va_copy.
4735 static bool
4736 test_varargs (const char *format, ...)
4737 {
4738 va_list args;
4739 va_start (args, format);
4740 va_list args_copy;
4741 va_copy (args_copy, args);
4742
4743 const char *str = "";
4744 int number = 0;
4745 float fnumber = 0;
4746
4747 while (*format)
4748 {
4749 switch (*format++)
4750 {
4751 case 's': // string
4752 str = va_arg (args_copy, const char *);
4753 break;
4754 case 'd': // int
4755 number = va_arg (args_copy, int);
4756 break;
4757 case 'f': // float
4758 fnumber = va_arg (args_copy, double);
4759 break;
4760 default:
4761 break;
4762 }
4763 }
4764 va_end (args_copy);
4765 va_end (args);
4766
4767 return *str && number && fnumber;
4768 }
4769 // Check _Alignas.
4770 char _Alignas (double) aligned_as_double;
4771 char _Alignas (0) no_special_alignment;
4772 extern char aligned_as_int;
4773 char _Alignas (0) _Alignas (int) aligned_as_int;
4774
4775 // Check _Alignof.
4776 enum
4777 {
4778 int_alignment = _Alignof (int),
4779 int_array_alignment = _Alignof (int[100]),
4780 char_alignment = _Alignof (char)
4781 };
4782 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4783
4784 // Check _Noreturn.
4785 int _Noreturn does_not_return (void) { for (;;) continue; }
4786
4787 // Check _Static_assert.
4788 struct test_static_assert
4789 {
4790 int x;
4791 _Static_assert (sizeof (int) <= sizeof (long int),
4792 "_Static_assert does not work in struct");
4793 long int y;
4794 };
4795
4796 // Check UTF-8 literals.
4797 #define u8 syntax error!
4798 char const utf8_literal[] = u8"happens to be ASCII" "another string";
4799
4800 // Check duplicate typedefs.
4801 typedef long *long_ptr;
4802 typedef long int *long_ptr;
4803 typedef long_ptr long_ptr;
4804
4805 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4806 struct anonymous
4807 {
4808 union {
4809 struct { int i; int j; };
4810 struct { int k; long int l; } w;
4811 };
4812 int m;
4813 } v1;
4814
4815 int
4816 main ()
4817 {
4818
4819 // Check bool.
4820 _Bool success = false;
4821
4822 // Check restrict.
4823 if (test_restrict ("String literal") == 0)
4824 success = true;
4825 char *restrict newvar = "Another string";
4826
4827 // Check varargs.
4828 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
4829 test_varargs_macros ();
4830
4831 // Check flexible array members.
4832 struct incomplete_array *ia =
4833 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4834 ia->datasize = 10;
4835 for (int i = 0; i < ia->datasize; ++i)
4836 ia->data[i] = i * 1.234;
4837
4838 // Check named initializers.
4839 struct named_init ni = {
4840 .number = 34,
4841 .name = L"Test wide string",
4842 .average = 543.34343,
4843 };
4844
4845 ni.number = 58;
4846
4847 int dynamic_array[ni.number];
4848 dynamic_array[ni.number - 1] = 543;
4849
4850 // work around unused variable warnings
4851 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4852 || dynamic_array[ni.number - 1] != 543);
4853
4854 v1.i = 2;
4855 v1.w.k = 5;
4856 _Static_assert ((offsetof (struct anonymous, i)
4857 == offsetof (struct anonymous, w.k)),
4858 "Anonymous union alignment botch");
4859
4860 ;
4861 return 0;
4862 }
4863 _ACEOF
4864 for ac_arg in '' -std=gnu11
4865 do
4866 CC="$ac_save_CC $ac_arg"
4867 if ac_fn_c_try_compile "$LINENO"; then :
4868 ac_cv_prog_cc_c11=$ac_arg
4869 fi
4870 rm -f core conftest.err conftest.$ac_objext
4871 test "x$ac_cv_prog_cc_c11" != "xno" && break
4872 done
4873 rm -f conftest.$ac_ext
4874 CC=$ac_save_CC
4875
4876 fi
4877 # AC_CACHE_VAL
4878 ac_prog_cc_stdc_options=
4879 case "x$ac_cv_prog_cc_c11" in
4880 x)
4881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4882 $as_echo "none needed" >&6; } ;;
4883 xno)
4884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4885 $as_echo "unsupported" >&6; } ;;
4886 *)
4887 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
4888 CC=$CC$ac_prog_cc_stdc_options
4889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4890 $as_echo "$ac_cv_prog_cc_c11" >&6; } ;;
4891 esac
4892 if test "x$ac_cv_prog_cc_c11" != xno; then :
4893 ac_prog_cc_stdc=c11
4894 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4895 else
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4897 $as_echo_n "checking for $CC option to enable C99 features... " >&6; }
4898 if ${ac_cv_prog_cc_c99+:} false; then :
4899 $as_echo_n "(cached) " >&6
4900 else
4901 ac_cv_prog_cc_c99=no
4902 ac_save_CC=$CC
4903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4904 /* end confdefs.h. */
4905 #include <stdarg.h>
4906 #include <stdbool.h>
4907 #include <stddef.h>
4908 #include <stdlib.h>
4909 #include <wchar.h>
4910 #include <stdio.h>
4911
4912 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4913 #define debug(...) fprintf (stderr, __VA_ARGS__)
4914 #define showlist(...) puts (#__VA_ARGS__)
4915 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4916 static void
4917 test_varargs_macros (void)
4918 {
4919 int x = 1234;
4920 int y = 5678;
4921 debug ("Flag");
4922 debug ("X = %d\n", x);
4923 showlist (The first, second, and third items.);
4924 report (x>y, "x is %d but y is %d", x, y);
4925 }
4926
4927 // Check long long types.
4928 #define BIG64 18446744073709551615ull
4929 #define BIG32 4294967295ul
4930 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4931 #if !BIG_OK
4932 your preprocessor is broken;
4933 #endif
4934 #if BIG_OK
4935 #else
4936 your preprocessor is broken;
4937 #endif
4938 static long long int bignum = -9223372036854775807LL;
4939 static unsigned long long int ubignum = BIG64;
4940
4941 struct incomplete_array
4942 {
4943 int datasize;
4944 double data[];
4945 };
4946
4947 struct named_init {
4948 int number;
4949 const wchar_t *name;
4950 double average;
4951 };
4952
4953 typedef const char *ccp;
4954
4955 static inline int
4956 test_restrict (ccp restrict text)
4957 {
4958 // See if C++-style comments work.
4959 // Iterate through items via the restricted pointer.
4960 // Also check for declarations in for loops.
4961 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4962 continue;
4963 return 0;
4964 }
4965
4966 // Check varargs and va_copy.
4967 static bool
4968 test_varargs (const char *format, ...)
4969 {
4970 va_list args;
4971 va_start (args, format);
4972 va_list args_copy;
4973 va_copy (args_copy, args);
4974
4975 const char *str = "";
4976 int number = 0;
4977 float fnumber = 0;
4978
4979 while (*format)
4980 {
4981 switch (*format++)
4982 {
4983 case 's': // string
4984 str = va_arg (args_copy, const char *);
4985 break;
4986 case 'd': // int
4987 number = va_arg (args_copy, int);
4988 break;
4989 case 'f': // float
4990 fnumber = va_arg (args_copy, double);
4991 break;
4992 default:
4993 break;
4994 }
4995 }
4996 va_end (args_copy);
4997 va_end (args);
4998
4999 return *str && number && fnumber;
5000 }
5001 int
5002 main ()
5003 {
5004
5005 // Check bool.
5006 _Bool success = false;
5007
5008 // Check restrict.
5009 if (test_restrict ("String literal") == 0)
5010 success = true;
5011 char *restrict newvar = "Another string";
5012
5013 // Check varargs.
5014 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5015 test_varargs_macros ();
5016
5017 // Check flexible array members.
5018 struct incomplete_array *ia =
5019 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5020 ia->datasize = 10;
5021 for (int i = 0; i < ia->datasize; ++i)
5022 ia->data[i] = i * 1.234;
5023
5024 // Check named initializers.
5025 struct named_init ni = {
5026 .number = 34,
5027 .name = L"Test wide string",
5028 .average = 543.34343,
5029 };
5030
5031 ni.number = 58;
5032
5033 int dynamic_array[ni.number];
5034 dynamic_array[ni.number - 1] = 543;
5035
5036 // work around unused variable warnings
5037 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5038 || dynamic_array[ni.number - 1] != 543);
5039
5040 ;
5041 return 0;
5042 }
5043 _ACEOF
5044 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5045 do
5046 CC="$ac_save_CC $ac_arg"
5047 if ac_fn_c_try_compile "$LINENO"; then :
5048 ac_cv_prog_cc_c99=$ac_arg
5049 fi
5050 rm -f core conftest.err conftest.$ac_objext
5051 test "x$ac_cv_prog_cc_c99" != "xno" && break
5052 done
5053 rm -f conftest.$ac_ext
5054 CC=$ac_save_CC
5055
5056 fi
5057 # AC_CACHE_VAL
5058 ac_prog_cc_stdc_options=
5059 case "x$ac_cv_prog_cc_c99" in
5060 x)
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5062 $as_echo "none needed" >&6; } ;;
5063 xno)
5064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5065 $as_echo "unsupported" >&6; } ;;
5066 *)
5067 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5068 CC=$CC$ac_prog_cc_stdc_options
5069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5070 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5071 esac
5072 if test "x$ac_cv_prog_cc_c99" != xno; then :
5073 ac_prog_cc_stdc=c99
5074 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5075 else
5076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5077 $as_echo_n "checking for $CC option to enable C89 features... " >&6; }
5078 if ${ac_cv_prog_cc_c89+:} false; then :
5079 $as_echo_n "(cached) " >&6
5080 else
5081 ac_cv_prog_cc_c89=no
5082 ac_save_CC=$CC
5083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5084 /* end confdefs.h. */
5085 #include <stdarg.h>
5086 #include <stdio.h>
5087 struct stat;
5088 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5089 struct buf { int x; };
5090 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5091 static char *e (p, i)
5092 char **p;
5093 int i;
5094 {
5095 return p[i];
5096 }
5097 static char *f (char * (*g) (char **, int), char **p, ...)
5098 {
5099 char *s;
5100 va_list v;
5101 va_start (v,p);
5102 s = g (p, va_arg (v,int));
5103 va_end (v);
5104 return s;
5105 }
5106
5107 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5108 function prototypes and stuff, but not '\xHH' hex character constants.
5109 These don't provoke an error unfortunately, instead are silently treated
5110 as 'x'. The following induces an error, until -std is added to get
5111 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5112 array size at least. It's necessary to write '\x00'==0 to get something
5113 that's true only with -std. */
5114 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5115
5116 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5117 inside strings and character constants. */
5118 #define FOO(x) 'x'
5119 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5120
5121 int test (int i, double x);
5122 struct s1 {int (*f) (int a);};
5123 struct s2 {int (*f) (double a);};
5124 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5125 int argc;
5126 char **argv;
5127 int
5128 main ()
5129 {
5130 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5131 ;
5132 return 0;
5133 }
5134 _ACEOF
5135 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5136 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5137 do
5138 CC="$ac_save_CC $ac_arg"
5139 if ac_fn_c_try_compile "$LINENO"; then :
5140 ac_cv_prog_cc_c89=$ac_arg
5141 fi
5142 rm -f core conftest.err conftest.$ac_objext
5143 test "x$ac_cv_prog_cc_c89" != "xno" && break
5144 done
5145 rm -f conftest.$ac_ext
5146 CC=$ac_save_CC
5147
5148 fi
5149 # AC_CACHE_VAL
5150 ac_prog_cc_stdc_options=
5151 case "x$ac_cv_prog_cc_c89" in
5152 x)
5153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5154 $as_echo "none needed" >&6; } ;;
5155 xno)
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5157 $as_echo "unsupported" >&6; } ;;
5158 *)
5159 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5160 CC=$CC$ac_prog_cc_stdc_options
5161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5162 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5163 esac
5164 if test "x$ac_cv_prog_cc_c89" != xno; then :
5165 ac_prog_cc_stdc=c89
5166 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5167 else
5168 ac_prog_cc_stdc=no
5169 ac_cv_prog_cc_stdc=no
5170 fi
5171
5172 fi
5173
5174 fi
5175
5176 ac_ext=c
5177 ac_cpp='$CPP $CPPFLAGS'
5178 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5179 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5180 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5181
5182
5183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
5184 $as_echo_n "checking whether the compiler is clang... " >&6; }
5185 if ${gl_cv_compiler_clang+:} false; then :
5186 $as_echo_n "(cached) " >&6
5187 else
5188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5189 /* end confdefs.h. */
5190
5191 #ifdef __clang__
5192 barfbarf
5193 #endif
5194
5195 int
5196 main ()
5197 {
5198
5199 ;
5200 return 0;
5201 }
5202
5203 _ACEOF
5204 if ac_fn_c_try_compile "$LINENO"; then :
5205 gl_cv_compiler_clang=no
5206 else
5207 gl_cv_compiler_clang=yes
5208 fi
5209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5210
5211 fi
5212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
5213 $as_echo "$gl_cv_compiler_clang" >&6; }
5214
5215
5216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
5217 $as_echo_n "checking for compiler option needed when checking for declarations... " >&6; }
5218 if ${gl_cv_compiler_check_decl_option+:} false; then :
5219 $as_echo_n "(cached) " >&6
5220 else
5221 if test $gl_cv_compiler_clang = yes; then
5222 save_ac_compile="$ac_compile"
5223 ac_compile="$ac_compile -Werror=implicit-function-declaration"
5224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5225 /* end confdefs.h. */
5226
5227 int
5228 main ()
5229 {
5230
5231 ;
5232 return 0;
5233 }
5234 _ACEOF
5235 if ac_fn_c_try_compile "$LINENO"; then :
5236 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
5237 else
5238 gl_cv_compiler_check_decl_option=none
5239 fi
5240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5241 ac_compile="$save_ac_compile"
5242 else
5243 gl_cv_compiler_check_decl_option=none
5244 fi
5245
5246 fi
5247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
5248 $as_echo "$gl_cv_compiler_check_decl_option" >&6; }
5249 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
5250 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
5251 else
5252 ac_compile_for_check_decl="$ac_compile"
5253 fi
5254
5255
5256
5257
5258 ac_ext=c
5259 ac_cpp='$CPP $CPPFLAGS'
5260 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5261 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5262 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5264 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5265 # On Suns, sometimes $CPP names a directory.
5266 if test -n "$CPP" && test -d "$CPP"; then
5267 CPP=
5268 fi
5269 if test -z "$CPP"; then
5270 if ${ac_cv_prog_CPP+:} false; then :
5271 $as_echo_n "(cached) " >&6
5272 else
5273 # Double quotes because CPP needs to be expanded
5274 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5275 do
5276 ac_preproc_ok=false
5277 for ac_c_preproc_warn_flag in '' yes
5278 do
5279 # Use a header file that comes with gcc, so configuring glibc
5280 # with a fresh cross-compiler works.
5281 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5282 # <limits.h> exists even on freestanding compilers.
5283 # On the NeXT, cc -E runs the code through the compiler's parser,
5284 # not just through cpp. "Syntax error" is here to catch this case.
5285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5286 /* end confdefs.h. */
5287 #ifdef __STDC__
5288 # include <limits.h>
5289 #else
5290 # include <assert.h>
5291 #endif
5292 Syntax error
5293 _ACEOF
5294 if ac_fn_c_try_cpp "$LINENO"; then :
5295
5296 else
5297 # Broken: fails on valid input.
5298 continue
5299 fi
5300 rm -f conftest.err conftest.i conftest.$ac_ext
5301
5302 # OK, works on sane cases. Now check whether nonexistent headers
5303 # can be detected and how.
5304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5305 /* end confdefs.h. */
5306 #include <ac_nonexistent.h>
5307 _ACEOF
5308 if ac_fn_c_try_cpp "$LINENO"; then :
5309 # Broken: success on invalid input.
5310 continue
5311 else
5312 # Passes both tests.
5313 ac_preproc_ok=:
5314 break
5315 fi
5316 rm -f conftest.err conftest.i conftest.$ac_ext
5317
5318 done
5319 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5320 rm -f conftest.i conftest.err conftest.$ac_ext
5321 if $ac_preproc_ok; then :
5322 break
5323 fi
5324
5325 done
5326 ac_cv_prog_CPP=$CPP
5327
5328 fi
5329 CPP=$ac_cv_prog_CPP
5330 else
5331 ac_cv_prog_CPP=$CPP
5332 fi
5333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5334 $as_echo "$CPP" >&6; }
5335 ac_preproc_ok=false
5336 for ac_c_preproc_warn_flag in '' yes
5337 do
5338 # Use a header file that comes with gcc, so configuring glibc
5339 # with a fresh cross-compiler works.
5340 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5341 # <limits.h> exists even on freestanding compilers.
5342 # On the NeXT, cc -E runs the code through the compiler's parser,
5343 # not just through cpp. "Syntax error" is here to catch this case.
5344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5345 /* end confdefs.h. */
5346 #ifdef __STDC__
5347 # include <limits.h>
5348 #else
5349 # include <assert.h>
5350 #endif
5351 Syntax error
5352 _ACEOF
5353 if ac_fn_c_try_cpp "$LINENO"; then :
5354
5355 else
5356 # Broken: fails on valid input.
5357 continue
5358 fi
5359 rm -f conftest.err conftest.i conftest.$ac_ext
5360
5361 # OK, works on sane cases. Now check whether nonexistent headers
5362 # can be detected and how.
5363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5364 /* end confdefs.h. */
5365 #include <ac_nonexistent.h>
5366 _ACEOF
5367 if ac_fn_c_try_cpp "$LINENO"; then :
5368 # Broken: success on invalid input.
5369 continue
5370 else
5371 # Passes both tests.
5372 ac_preproc_ok=:
5373 break
5374 fi
5375 rm -f conftest.err conftest.i conftest.$ac_ext
5376
5377 done
5378 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5379 rm -f conftest.i conftest.err conftest.$ac_ext
5380 if $ac_preproc_ok; then :
5381
5382 else
5383 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5384 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5385 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5386 See \`config.log' for more details" "$LINENO" 5; }
5387 fi
5388
5389 ac_ext=c
5390 ac_cpp='$CPP $CPPFLAGS'
5391 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5392 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5393 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5394
5395
5396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5397 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5398 if ${ac_cv_path_GREP+:} false; then :
5399 $as_echo_n "(cached) " >&6
5400 else
5401 if test -z "$GREP"; then
5402 ac_path_GREP_found=false
5403 # Loop through the user's path and test for each of PROGNAME-LIST
5404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5405 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5406 do
5407 IFS=$as_save_IFS
5408 test -z "$as_dir" && as_dir=.
5409 for ac_prog in grep ggrep; do
5410 for ac_exec_ext in '' $ac_executable_extensions; do
5411 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5412 as_fn_executable_p "$ac_path_GREP" || continue
5413 # Check for GNU ac_path_GREP and select it if it is found.
5414 # Check for GNU $ac_path_GREP
5415 case `"$ac_path_GREP" --version 2>&1` in
5416 *GNU*)
5417 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5418 *)
5419 ac_count=0
5420 $as_echo_n 0123456789 >"conftest.in"
5421 while :
5422 do
5423 cat "conftest.in" "conftest.in" >"conftest.tmp"
5424 mv "conftest.tmp" "conftest.in"
5425 cp "conftest.in" "conftest.nl"
5426 $as_echo 'GREP' >> "conftest.nl"
5427 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5428 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5429 as_fn_arith $ac_count + 1 && ac_count=$as_val
5430 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5431 # Best one so far, save it but keep looking for a better one
5432 ac_cv_path_GREP="$ac_path_GREP"
5433 ac_path_GREP_max=$ac_count
5434 fi
5435 # 10*(2^10) chars as input seems more than enough
5436 test $ac_count -gt 10 && break
5437 done
5438 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5439 esac
5440
5441 $ac_path_GREP_found && break 3
5442 done
5443 done
5444 done
5445 IFS=$as_save_IFS
5446 if test -z "$ac_cv_path_GREP"; then
5447 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5448 fi
5449 else
5450 ac_cv_path_GREP=$GREP
5451 fi
5452
5453 fi
5454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5455 $as_echo "$ac_cv_path_GREP" >&6; }
5456 GREP="$ac_cv_path_GREP"
5457
5458
5459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5460 $as_echo_n "checking for egrep... " >&6; }
5461 if ${ac_cv_path_EGREP+:} false; then :
5462 $as_echo_n "(cached) " >&6
5463 else
5464 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5465 then ac_cv_path_EGREP="$GREP -E"
5466 else
5467 if test -z "$EGREP"; then
5468 ac_path_EGREP_found=false
5469 # Loop through the user's path and test for each of PROGNAME-LIST
5470 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5471 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5472 do
5473 IFS=$as_save_IFS
5474 test -z "$as_dir" && as_dir=.
5475 for ac_prog in egrep; do
5476 for ac_exec_ext in '' $ac_executable_extensions; do
5477 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5478 as_fn_executable_p "$ac_path_EGREP" || continue
5479 # Check for GNU ac_path_EGREP and select it if it is found.
5480 # Check for GNU $ac_path_EGREP
5481 case `"$ac_path_EGREP" --version 2>&1` in
5482 *GNU*)
5483 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5484 *)
5485 ac_count=0
5486 $as_echo_n 0123456789 >"conftest.in"
5487 while :
5488 do
5489 cat "conftest.in" "conftest.in" >"conftest.tmp"
5490 mv "conftest.tmp" "conftest.in"
5491 cp "conftest.in" "conftest.nl"
5492 $as_echo 'EGREP' >> "conftest.nl"
5493 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5494 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5495 as_fn_arith $ac_count + 1 && ac_count=$as_val
5496 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5497 # Best one so far, save it but keep looking for a better one
5498 ac_cv_path_EGREP="$ac_path_EGREP"
5499 ac_path_EGREP_max=$ac_count
5500 fi
5501 # 10*(2^10) chars as input seems more than enough
5502 test $ac_count -gt 10 && break
5503 done
5504 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5505 esac
5506
5507 $ac_path_EGREP_found && break 3
5508 done
5509 done
5510 done
5511 IFS=$as_save_IFS
5512 if test -z "$ac_cv_path_EGREP"; then
5513 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5514 fi
5515 else
5516 ac_cv_path_EGREP=$EGREP
5517 fi
5518
5519 fi
5520 fi
5521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5522 $as_echo "$ac_cv_path_EGREP" >&6; }
5523 EGREP="$ac_cv_path_EGREP"
5524
5525
5526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5527 $as_echo_n "checking for ANSI C header files... " >&6; }
5528 if ${ac_cv_header_stdc+:} false; then :
5529 $as_echo_n "(cached) " >&6
5530 else
5531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5532 /* end confdefs.h. */
5533 #include <stdlib.h>
5534 #include <stdarg.h>
5535 #include <string.h>
5536 #include <float.h>
5537
5538 int
5539 main ()
5540 {
5541
5542 ;
5543 return 0;
5544 }
5545 _ACEOF
5546 if ac_fn_c_try_compile "$LINENO"; then :
5547 ac_cv_header_stdc=yes
5548 else
5549 ac_cv_header_stdc=no
5550 fi
5551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5552
5553 if test $ac_cv_header_stdc = yes; then
5554 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5556 /* end confdefs.h. */
5557 #include <string.h>
5558
5559 _ACEOF
5560 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5561 $EGREP "memchr" >/dev/null 2>&1; then :
5562
5563 else
5564 ac_cv_header_stdc=no
5565 fi
5566 rm -f conftest*
5567
5568 fi
5569
5570 if test $ac_cv_header_stdc = yes; then
5571 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5573 /* end confdefs.h. */
5574 #include <stdlib.h>
5575
5576 _ACEOF
5577 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5578 $EGREP "free" >/dev/null 2>&1; then :
5579
5580 else
5581 ac_cv_header_stdc=no
5582 fi
5583 rm -f conftest*
5584
5585 fi
5586
5587 if test $ac_cv_header_stdc = yes; then
5588 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5589 if test "$cross_compiling" = yes; then :
5590 :
5591 else
5592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5593 /* end confdefs.h. */
5594 #include <ctype.h>
5595 #include <stdlib.h>
5596 #if ((' ' & 0x0FF) == 0x020)
5597 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5598 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5599 #else
5600 # define ISLOWER(c) \
5601 (('a' <= (c) && (c) <= 'i') \
5602 || ('j' <= (c) && (c) <= 'r') \
5603 || ('s' <= (c) && (c) <= 'z'))
5604 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5605 #endif
5606
5607 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5608 int
5609 main ()
5610 {
5611 int i;
5612 for (i = 0; i < 256; i++)
5613 if (XOR (islower (i), ISLOWER (i))
5614 || toupper (i) != TOUPPER (i))
5615 return 2;
5616 return 0;
5617 }
5618 _ACEOF
5619 if ac_fn_c_try_run "$LINENO"; then :
5620
5621 else
5622 ac_cv_header_stdc=no
5623 fi
5624 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5625 conftest.$ac_objext conftest.beam conftest.$ac_ext
5626 fi
5627
5628 fi
5629 fi
5630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5631 $as_echo "$ac_cv_header_stdc" >&6; }
5632 if test $ac_cv_header_stdc = yes; then
5633
5634 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5635
5636 fi
5637
5638 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5639 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5640 inttypes.h stdint.h unistd.h
5641 do :
5642 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5643 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5644 "
5645 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5646 cat >>confdefs.h <<_ACEOF
5647 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5648 _ACEOF
5649
5650 fi
5651
5652 done
5653
5654
5655
5656
5657
5658 for ac_header in $ac_header_list
5659 do :
5660 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5661 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5662 "
5663 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5664 cat >>confdefs.h <<_ACEOF
5665 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5666 _ACEOF
5667
5668 fi
5669
5670 done
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5681 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5682 if ${ac_cv_safe_to_define___extensions__+:} false; then :
5683 $as_echo_n "(cached) " >&6
5684 else
5685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5686 /* end confdefs.h. */
5687
5688 # define __EXTENSIONS__ 1
5689 $ac_includes_default
5690 int
5691 main ()
5692 {
5693
5694 ;
5695 return 0;
5696 }
5697 _ACEOF
5698 if ac_fn_c_try_compile "$LINENO"; then :
5699 ac_cv_safe_to_define___extensions__=yes
5700 else
5701 ac_cv_safe_to_define___extensions__=no
5702 fi
5703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5704 fi
5705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5706 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5707
5708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5709 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5710 if ${ac_cv_should_define__xopen_source+:} false; then :
5711 $as_echo_n "(cached) " >&6
5712 else
5713 ac_cv_should_define__xopen_source=no
5714 if test $ac_cv_header_wchar_h = yes; then :
5715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5716 /* end confdefs.h. */
5717
5718 #include <wchar.h>
5719 mbstate_t x;
5720 int
5721 main ()
5722 {
5723
5724 ;
5725 return 0;
5726 }
5727 _ACEOF
5728 if ac_fn_c_try_compile "$LINENO"; then :
5729
5730 else
5731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5732 /* end confdefs.h. */
5733
5734 #define _XOPEN_SOURCE 500
5735 #include <wchar.h>
5736 mbstate_t x;
5737 int
5738 main ()
5739 {
5740
5741 ;
5742 return 0;
5743 }
5744 _ACEOF
5745 if ac_fn_c_try_compile "$LINENO"; then :
5746 ac_cv_should_define__xopen_source=yes
5747 fi
5748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5749 fi
5750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5751 fi
5752 fi
5753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5754 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
5755
5756 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5757
5758 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5759
5760 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5761
5762 $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
5763
5764 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
5765
5766 $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
5767
5768 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5769
5770 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5771
5772 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5773
5774 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5775
5776 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5777
5778 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5779
5780 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5781
5782 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5783
5784 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5785
5786 if test $ac_cv_header_minix_config_h = yes; then :
5787 MINIX=yes
5788 $as_echo "#define _MINIX 1" >>confdefs.h
5789
5790 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5791
5792 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5793
5794 else
5795 MINIX=
5796 fi
5797 if test $ac_cv_safe_to_define___extensions__ = yes; then :
5798 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5799
5800 fi
5801 if test $ac_cv_should_define__xopen_source = yes; then :
5802 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5803
5804 fi
5805
5806 # Needs to run before gl_EARLY so it can override AC_SYS_LARGEFILE included
5807 # there.
5808 ac_aux_dir=
5809 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
5810 if test -f "$ac_dir/install-sh"; then
5811 ac_aux_dir=$ac_dir
5812 ac_install_sh="$ac_aux_dir/install-sh -c"
5813 break
5814 elif test -f "$ac_dir/install.sh"; then
5815 ac_aux_dir=$ac_dir
5816 ac_install_sh="$ac_aux_dir/install.sh -c"
5817 break
5818 elif test -f "$ac_dir/shtool"; then
5819 ac_aux_dir=$ac_dir
5820 ac_install_sh="$ac_aux_dir/shtool install -c"
5821 break
5822 fi
5823 done
5824 if test -z "$ac_aux_dir"; then
5825 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5826 fi
5827
5828 # These three variables are undocumented and unsupported,
5829 # and are intended to be withdrawn in a future Autoconf release.
5830 # They can cause serious problems if a builder's source tree is in a directory
5831 # whose full name contains unusual characters.
5832 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5833 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5834 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5835
5836
5837 # Make sure we can run config.sub.
5838 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5839 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5840
5841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5842 $as_echo_n "checking build system type... " >&6; }
5843 if ${ac_cv_build+:} false; then :
5844 $as_echo_n "(cached) " >&6
5845 else
5846 ac_build_alias=$build_alias
5847 test "x$ac_build_alias" = x &&
5848 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5849 test "x$ac_build_alias" = x &&
5850 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5851 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5852 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5853
5854 fi
5855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5856 $as_echo "$ac_cv_build" >&6; }
5857 case $ac_cv_build in
5858 *-*-*) ;;
5859 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5860 esac
5861 build=$ac_cv_build
5862 ac_save_IFS=$IFS; IFS='-'
5863 set x $ac_cv_build
5864 shift
5865 build_cpu=$1
5866 build_vendor=$2
5867 shift; shift
5868 # Remember, the first character of IFS is used to create $*,
5869 # except with old shells:
5870 build_os=$*
5871 IFS=$ac_save_IFS
5872 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5873
5874
5875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5876 $as_echo_n "checking host system type... " >&6; }
5877 if ${ac_cv_host+:} false; then :
5878 $as_echo_n "(cached) " >&6
5879 else
5880 if test "x$host_alias" = x; then
5881 ac_cv_host=$ac_cv_build
5882 else
5883 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5884 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5885 fi
5886
5887 fi
5888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5889 $as_echo "$ac_cv_host" >&6; }
5890 case $ac_cv_host in
5891 *-*-*) ;;
5892 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5893 esac
5894 host=$ac_cv_host
5895 ac_save_IFS=$IFS; IFS='-'
5896 set x $ac_cv_host
5897 shift
5898 host_cpu=$1
5899 host_vendor=$2
5900 shift; shift
5901 # Remember, the first character of IFS is used to create $*,
5902 # except with old shells:
5903 host_os=$*
5904 IFS=$ac_save_IFS
5905 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5906
5907
5908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
5909 $as_echo_n "checking target system type... " >&6; }
5910 if ${ac_cv_target+:} false; then :
5911 $as_echo_n "(cached) " >&6
5912 else
5913 if test "x$target_alias" = x; then
5914 ac_cv_target=$ac_cv_host
5915 else
5916 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
5917 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
5918 fi
5919
5920 fi
5921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
5922 $as_echo "$ac_cv_target" >&6; }
5923 case $ac_cv_target in
5924 *-*-*) ;;
5925 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
5926 esac
5927 target=$ac_cv_target
5928 ac_save_IFS=$IFS; IFS='-'
5929 set x $ac_cv_target
5930 shift
5931 target_cpu=$1
5932 target_vendor=$2
5933 shift; shift
5934 # Remember, the first character of IFS is used to create $*,
5935 # except with old shells:
5936 target_os=$*
5937 IFS=$ac_save_IFS
5938 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
5939
5940
5941 # The aliases save the names the user supplied, while $host etc.
5942 # will get canonicalized.
5943 test -n "$target_alias" &&
5944 test "$program_prefix$program_suffix$program_transform_name" = \
5945 NONENONEs,x,x, &&
5946 program_prefix=${target_alias}-
5947
5948 # The tests for host and target for $enable_largefile require
5949 # canonical names.
5950
5951
5952
5953 # As the $enable_largefile decision depends on --enable-plugins we must set it
5954 # even in directories otherwise not depending on the $plugins option.
5955
5956
5957 maybe_plugins=no
5958 for ac_header in dlfcn.h
5959 do :
5960 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
5961 "
5962 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
5963 cat >>confdefs.h <<_ACEOF
5964 #define HAVE_DLFCN_H 1
5965 _ACEOF
5966 maybe_plugins=yes
5967 fi
5968
5969 done
5970
5971 for ac_header in windows.h
5972 do :
5973 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
5974 "
5975 if test "x$ac_cv_header_windows_h" = xyes; then :
5976 cat >>confdefs.h <<_ACEOF
5977 #define HAVE_WINDOWS_H 1
5978 _ACEOF
5979 maybe_plugins=yes
5980 fi
5981
5982 done
5983
5984
5985 # Check whether --enable-plugins was given.
5986 if test "${enable_plugins+set}" = set; then :
5987 enableval=$enable_plugins; case "${enableval}" in
5988 no) plugins=no ;;
5989 *) plugins=yes
5990 if test "$maybe_plugins" != "yes" ; then
5991 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
5992 fi ;;
5993 esac
5994 else
5995 plugins=$maybe_plugins
5996
5997 fi
5998
5999 if test "$plugins" = "yes"; then
6000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
6001 $as_echo_n "checking for library containing dlsym... " >&6; }
6002 if ${ac_cv_search_dlsym+:} false; then :
6003 $as_echo_n "(cached) " >&6
6004 else
6005 ac_func_search_save_LIBS=$LIBS
6006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6007 /* end confdefs.h. */
6008
6009 /* Override any GCC internal prototype to avoid an error.
6010 Use char because int might match the return type of a GCC
6011 builtin and then its argument prototype would still apply. */
6012 #ifdef __cplusplus
6013 extern "C"
6014 #endif
6015 char dlsym ();
6016 int
6017 main ()
6018 {
6019 return dlsym ();
6020 ;
6021 return 0;
6022 }
6023 _ACEOF
6024 for ac_lib in '' dl; do
6025 if test -z "$ac_lib"; then
6026 ac_res="none required"
6027 else
6028 ac_res=-l$ac_lib
6029 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6030 fi
6031 if ac_fn_c_try_link "$LINENO"; then :
6032 ac_cv_search_dlsym=$ac_res
6033 fi
6034 rm -f core conftest.err conftest.$ac_objext \
6035 conftest$ac_exeext
6036 if ${ac_cv_search_dlsym+:} false; then :
6037 break
6038 fi
6039 done
6040 if ${ac_cv_search_dlsym+:} false; then :
6041
6042 else
6043 ac_cv_search_dlsym=no
6044 fi
6045 rm conftest.$ac_ext
6046 LIBS=$ac_func_search_save_LIBS
6047 fi
6048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
6049 $as_echo "$ac_cv_search_dlsym" >&6; }
6050 ac_res=$ac_cv_search_dlsym
6051 if test "$ac_res" != no; then :
6052 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6053
6054 fi
6055
6056 fi
6057
6058
6059 case "${host}" in
6060 sparc-*-solaris*|i?86-*-solaris*)
6061 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
6062 # were mutually exclusive until Solaris 11.3. Without procfs support,
6063 # the bfd/ elf module cannot provide certain routines such as
6064 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
6065 # explicitly requested large-file support through the
6066 # --enable-largefile switch, disable large-file support in favor of
6067 # procfs support.
6068 #
6069 # Check if <sys/procfs.h> is incompatible with large-file support.
6070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6071 /* end confdefs.h. */
6072 #define _FILE_OFFSET_BITS 64
6073 #define _STRUCTURED_PROC 1
6074 #include <sys/procfs.h>
6075 int
6076 main ()
6077 {
6078
6079 ;
6080 return 0;
6081 }
6082 _ACEOF
6083 if ac_fn_c_try_compile "$LINENO"; then :
6084 acx_cv_procfs_lfs=yes
6085 else
6086 acx_cv_procfs_lfs=no
6087 fi
6088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6089 #
6090 # Forcefully disable large-file support only if necessary, gdb is in
6091 # tree and enabled.
6092 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
6093 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
6094 : ${enable_largefile="no"}
6095 if test "$plugins" = yes; then
6096 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
6097 plugin support disabled; require large-file support which is incompatible with GDB." >&5
6098 $as_echo "$as_me: WARNING:
6099 plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
6100 plugins=no
6101 fi
6102 fi
6103 #
6104 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
6105 # benefit of g++ 9+ which predefines it on Solaris.
6106 if test "$enable_largefile" = no; then
6107 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
6108
6109 fi
6110 ;;
6111 esac
6112
6113 # Check whether --enable-largefile was given.
6114 if test "${enable_largefile+set}" = set; then :
6115 enableval=$enable_largefile;
6116 fi
6117
6118 if test "$enable_largefile" != no; then
6119
6120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6121 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6122 if ${ac_cv_sys_largefile_CC+:} false; then :
6123 $as_echo_n "(cached) " >&6
6124 else
6125 ac_cv_sys_largefile_CC=no
6126 if test "$GCC" != yes; then
6127 ac_save_CC=$CC
6128 while :; do
6129 # IRIX 6.2 and later do not support large files by default,
6130 # so use the C compiler's -n32 option if that helps.
6131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6132 /* end confdefs.h. */
6133 #include <sys/types.h>
6134 /* Check that off_t can represent 2**63 - 1 correctly.
6135 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6136 since some C++ compilers masquerading as C compilers
6137 incorrectly reject 9223372036854775807. */
6138 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6139 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6140 && LARGE_OFF_T % 2147483647 == 1)
6141 ? 1 : -1];
6142 int
6143 main ()
6144 {
6145
6146 ;
6147 return 0;
6148 }
6149 _ACEOF
6150 if ac_fn_c_try_compile "$LINENO"; then :
6151 break
6152 fi
6153 rm -f core conftest.err conftest.$ac_objext
6154 CC="$CC -n32"
6155 if ac_fn_c_try_compile "$LINENO"; then :
6156 ac_cv_sys_largefile_CC=' -n32'; break
6157 fi
6158 rm -f core conftest.err conftest.$ac_objext
6159 break
6160 done
6161 CC=$ac_save_CC
6162 rm -f conftest.$ac_ext
6163 fi
6164 fi
6165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6166 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6167 if test "$ac_cv_sys_largefile_CC" != no; then
6168 CC=$CC$ac_cv_sys_largefile_CC
6169 fi
6170
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6172 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6173 if ${ac_cv_sys_file_offset_bits+:} false; then :
6174 $as_echo_n "(cached) " >&6
6175 else
6176 while :; do
6177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6178 /* end confdefs.h. */
6179 #include <sys/types.h>
6180 /* Check that off_t can represent 2**63 - 1 correctly.
6181 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6182 since some C++ compilers masquerading as C compilers
6183 incorrectly reject 9223372036854775807. */
6184 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6185 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6186 && LARGE_OFF_T % 2147483647 == 1)
6187 ? 1 : -1];
6188 int
6189 main ()
6190 {
6191
6192 ;
6193 return 0;
6194 }
6195 _ACEOF
6196 if ac_fn_c_try_compile "$LINENO"; then :
6197 ac_cv_sys_file_offset_bits=no; break
6198 fi
6199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6201 /* end confdefs.h. */
6202 #define _FILE_OFFSET_BITS 64
6203 #include <sys/types.h>
6204 /* Check that off_t can represent 2**63 - 1 correctly.
6205 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6206 since some C++ compilers masquerading as C compilers
6207 incorrectly reject 9223372036854775807. */
6208 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6209 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6210 && LARGE_OFF_T % 2147483647 == 1)
6211 ? 1 : -1];
6212 int
6213 main ()
6214 {
6215
6216 ;
6217 return 0;
6218 }
6219 _ACEOF
6220 if ac_fn_c_try_compile "$LINENO"; then :
6221 ac_cv_sys_file_offset_bits=64; break
6222 fi
6223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6224 ac_cv_sys_file_offset_bits=unknown
6225 break
6226 done
6227 fi
6228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6229 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6230 case $ac_cv_sys_file_offset_bits in #(
6231 no | unknown) ;;
6232 *)
6233 cat >>confdefs.h <<_ACEOF
6234 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6235 _ACEOF
6236 ;;
6237 esac
6238 rm -rf conftest*
6239 if test $ac_cv_sys_file_offset_bits = unknown; then
6240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6241 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6242 if ${ac_cv_sys_large_files+:} false; then :
6243 $as_echo_n "(cached) " >&6
6244 else
6245 while :; do
6246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6247 /* end confdefs.h. */
6248 #include <sys/types.h>
6249 /* Check that off_t can represent 2**63 - 1 correctly.
6250 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6251 since some C++ compilers masquerading as C compilers
6252 incorrectly reject 9223372036854775807. */
6253 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6254 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6255 && LARGE_OFF_T % 2147483647 == 1)
6256 ? 1 : -1];
6257 int
6258 main ()
6259 {
6260
6261 ;
6262 return 0;
6263 }
6264 _ACEOF
6265 if ac_fn_c_try_compile "$LINENO"; then :
6266 ac_cv_sys_large_files=no; break
6267 fi
6268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6270 /* end confdefs.h. */
6271 #define _LARGE_FILES 1
6272 #include <sys/types.h>
6273 /* Check that off_t can represent 2**63 - 1 correctly.
6274 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6275 since some C++ compilers masquerading as C compilers
6276 incorrectly reject 9223372036854775807. */
6277 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6278 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6279 && LARGE_OFF_T % 2147483647 == 1)
6280 ? 1 : -1];
6281 int
6282 main ()
6283 {
6284
6285 ;
6286 return 0;
6287 }
6288 _ACEOF
6289 if ac_fn_c_try_compile "$LINENO"; then :
6290 ac_cv_sys_large_files=1; break
6291 fi
6292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6293 ac_cv_sys_large_files=unknown
6294 break
6295 done
6296 fi
6297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6298 $as_echo "$ac_cv_sys_large_files" >&6; }
6299 case $ac_cv_sys_large_files in #(
6300 no | unknown) ;;
6301 *)
6302 cat >>confdefs.h <<_ACEOF
6303 #define _LARGE_FILES $ac_cv_sys_large_files
6304 _ACEOF
6305 ;;
6306 esac
6307 rm -rf conftest*
6308 fi
6309 fi
6310
6311
6312
6313
6314
6315
6316 case "$host_os" in
6317 openbsd*)
6318
6319 $as_echo "#define _ISOC11_SOURCE 1" >>confdefs.h
6320
6321 ;;
6322 esac
6323
6324
6325
6326
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6328 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6329 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6330 $as_echo_n "(cached) " >&6
6331 else
6332
6333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6334 /* end confdefs.h. */
6335
6336 #ifdef __ACK__
6337 Amsterdam
6338 #endif
6339
6340 _ACEOF
6341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6342 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6343 gl_cv_c_amsterdam_compiler=yes
6344 else
6345 gl_cv_c_amsterdam_compiler=no
6346 fi
6347 rm -f conftest*
6348
6349
6350 fi
6351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6352 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6353
6354 if test $gl_cv_c_amsterdam_compiler = yes; then
6355 if test -z "$AR"; then
6356 AR='cc -c.a'
6357 fi
6358 if test -z "$ARFLAGS"; then
6359 ARFLAGS='-o'
6360 fi
6361 else
6362 :
6363 fi
6364
6365 if test -n "$ac_tool_prefix"; then
6366 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6367 set dummy ${ac_tool_prefix}ar; ac_word=$2
6368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6369 $as_echo_n "checking for $ac_word... " >&6; }
6370 if ${ac_cv_prog_AR+:} false; then :
6371 $as_echo_n "(cached) " >&6
6372 else
6373 if test -n "$AR"; then
6374 ac_cv_prog_AR="$AR" # Let the user override the test.
6375 else
6376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6377 for as_dir in $PATH
6378 do
6379 IFS=$as_save_IFS
6380 test -z "$as_dir" && as_dir=.
6381 for ac_exec_ext in '' $ac_executable_extensions; do
6382 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6383 ac_cv_prog_AR="${ac_tool_prefix}ar"
6384 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6385 break 2
6386 fi
6387 done
6388 done
6389 IFS=$as_save_IFS
6390
6391 fi
6392 fi
6393 AR=$ac_cv_prog_AR
6394 if test -n "$AR"; then
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6396 $as_echo "$AR" >&6; }
6397 else
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6399 $as_echo "no" >&6; }
6400 fi
6401
6402
6403 fi
6404 if test -z "$ac_cv_prog_AR"; then
6405 ac_ct_AR=$AR
6406 # Extract the first word of "ar", so it can be a program name with args.
6407 set dummy ar; ac_word=$2
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6409 $as_echo_n "checking for $ac_word... " >&6; }
6410 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6411 $as_echo_n "(cached) " >&6
6412 else
6413 if test -n "$ac_ct_AR"; then
6414 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6415 else
6416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6417 for as_dir in $PATH
6418 do
6419 IFS=$as_save_IFS
6420 test -z "$as_dir" && as_dir=.
6421 for ac_exec_ext in '' $ac_executable_extensions; do
6422 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6423 ac_cv_prog_ac_ct_AR="ar"
6424 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6425 break 2
6426 fi
6427 done
6428 done
6429 IFS=$as_save_IFS
6430
6431 fi
6432 fi
6433 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6434 if test -n "$ac_ct_AR"; then
6435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6436 $as_echo "$ac_ct_AR" >&6; }
6437 else
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6439 $as_echo "no" >&6; }
6440 fi
6441
6442 if test "x$ac_ct_AR" = x; then
6443 AR="ar"
6444 else
6445 case $cross_compiling:$ac_tool_warned in
6446 yes:)
6447 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6448 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6449 ac_tool_warned=yes ;;
6450 esac
6451 AR=$ac_ct_AR
6452 fi
6453 else
6454 AR="$ac_cv_prog_AR"
6455 fi
6456
6457 if test -z "$ARFLAGS"; then
6458 ARFLAGS='cr'
6459 fi
6460
6461
6462
6463 if test -z "$RANLIB"; then
6464 if test $gl_cv_c_amsterdam_compiler = yes; then
6465 RANLIB=':'
6466 else
6467 if test -n "$ac_tool_prefix"; then
6468 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6469 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6471 $as_echo_n "checking for $ac_word... " >&6; }
6472 if ${ac_cv_prog_RANLIB+:} false; then :
6473 $as_echo_n "(cached) " >&6
6474 else
6475 if test -n "$RANLIB"; then
6476 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6477 else
6478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6479 for as_dir in $PATH
6480 do
6481 IFS=$as_save_IFS
6482 test -z "$as_dir" && as_dir=.
6483 for ac_exec_ext in '' $ac_executable_extensions; do
6484 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6485 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6486 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6487 break 2
6488 fi
6489 done
6490 done
6491 IFS=$as_save_IFS
6492
6493 fi
6494 fi
6495 RANLIB=$ac_cv_prog_RANLIB
6496 if test -n "$RANLIB"; then
6497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6498 $as_echo "$RANLIB" >&6; }
6499 else
6500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6501 $as_echo "no" >&6; }
6502 fi
6503
6504
6505 fi
6506 if test -z "$ac_cv_prog_RANLIB"; then
6507 ac_ct_RANLIB=$RANLIB
6508 # Extract the first word of "ranlib", so it can be a program name with args.
6509 set dummy ranlib; ac_word=$2
6510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6511 $as_echo_n "checking for $ac_word... " >&6; }
6512 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6513 $as_echo_n "(cached) " >&6
6514 else
6515 if test -n "$ac_ct_RANLIB"; then
6516 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6517 else
6518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6519 for as_dir in $PATH
6520 do
6521 IFS=$as_save_IFS
6522 test -z "$as_dir" && as_dir=.
6523 for ac_exec_ext in '' $ac_executable_extensions; do
6524 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6525 ac_cv_prog_ac_ct_RANLIB="ranlib"
6526 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6527 break 2
6528 fi
6529 done
6530 done
6531 IFS=$as_save_IFS
6532
6533 fi
6534 fi
6535 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6536 if test -n "$ac_ct_RANLIB"; then
6537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6538 $as_echo "$ac_ct_RANLIB" >&6; }
6539 else
6540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6541 $as_echo "no" >&6; }
6542 fi
6543
6544 if test "x$ac_ct_RANLIB" = x; then
6545 RANLIB=":"
6546 else
6547 case $cross_compiling:$ac_tool_warned in
6548 yes:)
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6550 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6551 ac_tool_warned=yes ;;
6552 esac
6553 RANLIB=$ac_ct_RANLIB
6554 fi
6555 else
6556 RANLIB="$ac_cv_prog_RANLIB"
6557 fi
6558
6559 fi
6560 fi
6561
6562
6563
6564
6565
6566
6567 # IEEE behaviour is the default on all CPUs except Alpha and SH
6568 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6569 # and the GCC 4.1.2 manual).
6570 case "$host_cpu" in
6571 alpha*)
6572 # On Alpha systems, a compiler option provides the behaviour.
6573 # See the ieee(3) manual page, also available at
6574 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
6575 if test -n "$GCC"; then
6576 # GCC has the option -mieee.
6577 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6578 CPPFLAGS="$CPPFLAGS -mieee"
6579 else
6580 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6581 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6582 CPPFLAGS="$CPPFLAGS -ieee"
6583 fi
6584 ;;
6585 sh*)
6586 if test -n "$GCC"; then
6587 # GCC has the option -mieee.
6588 CPPFLAGS="$CPPFLAGS -mieee"
6589 fi
6590 ;;
6591 esac
6592
6593
6594
6595
6596
6597
6598
6599 # Check whether --enable-threads was given.
6600 if test "${enable_threads+set}" = set; then :
6601 enableval=$enable_threads; gl_use_threads=$enableval
6602 else
6603 if test -n "$gl_use_threads_default"; then
6604 gl_use_threads="$gl_use_threads_default"
6605 else
6606 case "$host_os" in
6607 osf*) gl_use_threads=no ;;
6608 cygwin*)
6609 case `uname -r` in
6610 1.[0-5].*) gl_use_threads=no ;;
6611 *) gl_use_threads=yes ;;
6612 esac
6613 ;;
6614 mingw*)
6615 case "$gl_use_winpthreads_default" in
6616 yes) gl_use_threads=posix ;;
6617 no) gl_use_threads=windows ;;
6618 *) gl_use_threads=yes ;;
6619 esac
6620 ;;
6621 *) gl_use_threads=yes ;;
6622 esac
6623 fi
6624
6625 fi
6626
6627 if test "$gl_use_threads" = yes \
6628 || test "$gl_use_threads" = isoc \
6629 || test "$gl_use_threads" = posix \
6630 || test "$gl_use_threads" = isoc+posix; then
6631 # For using <threads.h> or <pthread.h>:
6632
6633
6634 if test -z "$gl_anythreadlib_early_done"; then
6635 case "$host_os" in
6636 osf*)
6637 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6638 # groks <pthread.h>. cc also understands the flag -pthread, but
6639 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6640 # 2. putting a flag into CPPFLAGS that has an effect on the linker
6641 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
6642 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6643 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
6644 ;;
6645 esac
6646 # Some systems optimize for single-threaded programs by default, and
6647 # need special flags to disable these optimizations. For example, the
6648 # definition of 'errno' in <errno.h>.
6649 case "$host_os" in
6650 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
6651 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
6652 esac
6653 gl_anythreadlib_early_done=done
6654 fi
6655
6656 fi
6657
6658
6659
6660 # Pre-early section.
6661
6662
6663
6664
6665 # Code from module absolute-header:
6666 # Code from module alloca:
6667 # Code from module alloca-opt:
6668 # Code from module arpa_inet:
6669 # Code from module assure:
6670 # Code from module at-internal:
6671 # Code from module attribute:
6672 # Code from module basename-lgpl:
6673 # Code from module btowc:
6674 # Code from module builtin-expect:
6675 # Code from module c99:
6676 # Code from module canonicalize-lgpl:
6677 # Code from module chdir:
6678 # Code from module chdir-long:
6679 # Code from module clock-time:
6680 # Code from module cloexec:
6681 # Code from module close:
6682 # Code from module closedir:
6683 # Code from module count-one-bits:
6684 # Code from module ctype:
6685 # Code from module d-ino:
6686 # Code from module d-type:
6687 # Code from module dirent:
6688 # Code from module dirfd:
6689 # Code from module dirname-lgpl:
6690 # Code from module double-slash-root:
6691 # Code from module dup:
6692 # Code from module dup2:
6693 # Code from module eloop-threshold:
6694 # Code from module environ:
6695 # Code from module errno:
6696 # Code from module error:
6697 # Code from module exitfail:
6698 # Code from module extensions:
6699 # Code from module extern-inline:
6700 # Code from module fchdir:
6701 # Code from module fcntl:
6702 # Code from module fcntl-h:
6703 # Code from module fd-hook:
6704 # Code from module fd-safer-flag:
6705 # Code from module fdopendir:
6706 # Code from module filename:
6707 # Code from module filenamecat-lgpl:
6708 # Code from module flexmember:
6709 # Code from module float:
6710 # Code from module fnmatch:
6711 # Code from module fnmatch-gnu:
6712 # Code from module fnmatch-h:
6713 # Code from module fpieee:
6714
6715 # Code from module fpucw:
6716 # Code from module free-posix:
6717 # Code from module frexp:
6718 # Code from module frexpl:
6719 # Code from module fstat:
6720 # Code from module fstatat:
6721 # Code from module getcwd:
6722 # Code from module getcwd-lgpl:
6723 # Code from module getdtablesize:
6724 # Code from module getlogin_r:
6725 # Code from module getprogname:
6726 # Code from module getrandom:
6727 # Code from module gettext-h:
6728 # Code from module gettimeofday:
6729 # Code from module glob:
6730 # Code from module glob-h:
6731 # Code from module hard-locale:
6732 # Code from module idx:
6733 # Code from module include_next:
6734 # Code from module inet_ntop:
6735 # Code from module intprops:
6736 # Code from module inttypes:
6737 # Code from module inttypes-incomplete:
6738 # Code from module isblank:
6739 # Code from module isnand-nolibm:
6740 # Code from module isnanl-nolibm:
6741 # Code from module largefile:
6742
6743 # Code from module libc-config:
6744 # Code from module limits-h:
6745 # Code from module localcharset:
6746 # Code from module locale:
6747 # Code from module lock:
6748 # Code from module lstat:
6749 # Code from module malloc-posix:
6750 # Code from module malloca:
6751 # Code from module math:
6752 # Code from module mbrtowc:
6753 # Code from module mbsinit:
6754 # Code from module mbsrtowcs:
6755 # Code from module mbtowc:
6756 # Code from module memchr:
6757 # Code from module memmem:
6758 # Code from module memmem-simple:
6759 # Code from module mempcpy:
6760 # Code from module memrchr:
6761 # Code from module minmax:
6762 # Code from module mkdir:
6763 # Code from module mkdtemp:
6764 # Code from module mkostemp:
6765 # Code from module msvc-inval:
6766 # Code from module msvc-nothrow:
6767 # Code from module multiarch:
6768 # Code from module netinet_in:
6769 # Code from module nocrash:
6770 # Code from module open:
6771 # Code from module openat:
6772 # Code from module openat-die:
6773 # Code from module openat-h:
6774 # Code from module opendir:
6775 # Code from module pathmax:
6776 # Code from module pipe-posix:
6777 # Code from module rawmemchr:
6778 # Code from module readdir:
6779 # Code from module readlink:
6780 # Code from module realloc-posix:
6781 # Code from module rename:
6782 # Code from module rewinddir:
6783 # Code from module rmdir:
6784 # Code from module same-inode:
6785 # Code from module save-cwd:
6786 # Code from module scratch_buffer:
6787 # Code from module setenv:
6788 # Code from module setlocale-null:
6789 # Code from module signal-h:
6790 # Code from module snippet/_Noreturn:
6791 # Code from module snippet/arg-nonnull:
6792 # Code from module snippet/c++defs:
6793 # Code from module snippet/warn-on-use:
6794 # Code from module socklen:
6795 # Code from module ssize_t:
6796 # Code from module stat:
6797 # Code from module stat-time:
6798 # Code from module std-gnu11:
6799 # Code from module stdalign:
6800 # Code from module stdbool:
6801 # Code from module stddef:
6802 # Code from module stdint:
6803 # Code from module stdio:
6804 # Code from module stdlib:
6805 # Code from module strchrnul:
6806 # Code from module strdup-posix:
6807 # Code from module streq:
6808 # Code from module strerror:
6809 # Code from module strerror-override:
6810 # Code from module strerror_r-posix:
6811 # Code from module string:
6812 # Code from module strnlen:
6813 # Code from module strnlen1:
6814 # Code from module strstr:
6815 # Code from module strstr-simple:
6816 # Code from module strtok_r:
6817 # Code from module sys_random:
6818 # Code from module sys_socket:
6819 # Code from module sys_stat:
6820 # Code from module sys_time:
6821 # Code from module sys_types:
6822 # Code from module sys_uio:
6823 # Code from module tempname:
6824 # Code from module threadlib:
6825
6826
6827
6828 # Code from module time:
6829 # Code from module time_r:
6830 # Code from module unistd:
6831 # Code from module unistd-safer:
6832 # Code from module unsetenv:
6833 # Code from module update-copyright:
6834 # Code from module verify:
6835 # Code from module wchar:
6836 # Code from module wctype-h:
6837 # Code from module windows-mutex:
6838 # Code from module windows-once:
6839 # Code from module windows-recmutex:
6840 # Code from module windows-rwlock:
6841 # Code from module wmemchr:
6842 # Code from module wmempcpy:
6843 # Code from module xalloc-oversized:
6844
6845
6846 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6847
6848
6849 ac_aux_dir=
6850 for ac_dir in .. "$srcdir"/..; do
6851 if test -f "$ac_dir/install-sh"; then
6852 ac_aux_dir=$ac_dir
6853 ac_install_sh="$ac_aux_dir/install-sh -c"
6854 break
6855 elif test -f "$ac_dir/install.sh"; then
6856 ac_aux_dir=$ac_dir
6857 ac_install_sh="$ac_aux_dir/install.sh -c"
6858 break
6859 elif test -f "$ac_dir/shtool"; then
6860 ac_aux_dir=$ac_dir
6861 ac_install_sh="$ac_aux_dir/shtool install -c"
6862 break
6863 fi
6864 done
6865 if test -z "$ac_aux_dir"; then
6866 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
6867 fi
6868
6869 # These three variables are undocumented and unsupported,
6870 # and are intended to be withdrawn in a future Autoconf release.
6871 # They can cause serious problems if a builder's source tree is in a directory
6872 # whose full name contains unusual characters.
6873 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6874 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6875 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888 # Check whether --enable-cross-guesses was given.
6889 if test "${enable_cross_guesses+set}" = set; then :
6890 enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
6891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
6892 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
6893 enableval=conservative
6894 fi
6895 gl_cross_guesses="$enableval"
6896 else
6897 gl_cross_guesses=conservative
6898 fi
6899
6900 if test $gl_cross_guesses = risky; then
6901 gl_cross_guess_normal="guessing yes"
6902 gl_cross_guess_inverted="guessing no"
6903 else
6904 gl_cross_guess_normal="guessing no"
6905 gl_cross_guess_inverted="guessing yes"
6906 fi
6907 LIBC_FATAL_STDERR_=1
6908 export LIBC_FATAL_STDERR_
6909
6910
6911 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6912 if test "x$ac_cv_type_size_t" = xyes; then :
6913
6914 else
6915
6916 cat >>confdefs.h <<_ACEOF
6917 #define size_t unsigned int
6918 _ACEOF
6919
6920 fi
6921
6922 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6923 # for constant arguments. Useless!
6924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6925 $as_echo_n "checking for working alloca.h... " >&6; }
6926 if ${ac_cv_working_alloca_h+:} false; then :
6927 $as_echo_n "(cached) " >&6
6928 else
6929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6930 /* end confdefs.h. */
6931 #include <alloca.h>
6932 int
6933 main ()
6934 {
6935 char *p = (char *) alloca (2 * sizeof (int));
6936 if (p) return 0;
6937 ;
6938 return 0;
6939 }
6940 _ACEOF
6941 if ac_fn_c_try_link "$LINENO"; then :
6942 ac_cv_working_alloca_h=yes
6943 else
6944 ac_cv_working_alloca_h=no
6945 fi
6946 rm -f core conftest.err conftest.$ac_objext \
6947 conftest$ac_exeext conftest.$ac_ext
6948 fi
6949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6950 $as_echo "$ac_cv_working_alloca_h" >&6; }
6951 if test $ac_cv_working_alloca_h = yes; then
6952
6953 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6954
6955 fi
6956
6957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6958 $as_echo_n "checking for alloca... " >&6; }
6959 if ${ac_cv_func_alloca_works+:} false; then :
6960 $as_echo_n "(cached) " >&6
6961 else
6962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6963 /* end confdefs.h. */
6964 #ifdef __GNUC__
6965 # define alloca __builtin_alloca
6966 #else
6967 # ifdef _MSC_VER
6968 # include <malloc.h>
6969 # define alloca _alloca
6970 # else
6971 # ifdef HAVE_ALLOCA_H
6972 # include <alloca.h>
6973 # else
6974 # ifdef _AIX
6975 #pragma alloca
6976 # else
6977 # ifndef alloca /* predefined by HP cc +Olibcalls */
6978 void *alloca (size_t);
6979 # endif
6980 # endif
6981 # endif
6982 # endif
6983 #endif
6984
6985 int
6986 main ()
6987 {
6988 char *p = (char *) alloca (1);
6989 if (p) return 0;
6990 ;
6991 return 0;
6992 }
6993 _ACEOF
6994 if ac_fn_c_try_link "$LINENO"; then :
6995 ac_cv_func_alloca_works=yes
6996 else
6997 ac_cv_func_alloca_works=no
6998 fi
6999 rm -f core conftest.err conftest.$ac_objext \
7000 conftest$ac_exeext conftest.$ac_ext
7001 fi
7002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7003 $as_echo "$ac_cv_func_alloca_works" >&6; }
7004
7005 if test $ac_cv_func_alloca_works = yes; then
7006
7007 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7008
7009 else
7010 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7011 # that cause trouble. Some versions do not even contain alloca or
7012 # contain a buggy version. If you still want to use their alloca,
7013 # use ar to extract alloca.o from them instead of compiling alloca.c.
7014
7015
7016
7017
7018
7019 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7020
7021 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7022
7023
7024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7025 $as_echo_n "checking stack direction for C alloca... " >&6; }
7026 if ${ac_cv_c_stack_direction+:} false; then :
7027 $as_echo_n "(cached) " >&6
7028 else
7029 if test "$cross_compiling" = yes; then :
7030 ac_cv_c_stack_direction=0
7031 else
7032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7033 /* end confdefs.h. */
7034 $ac_includes_default
7035 int
7036 find_stack_direction (int *addr, int depth)
7037 {
7038 int dir, dummy = 0;
7039 if (! addr)
7040 addr = &dummy;
7041 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7042 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7043 return dir + dummy;
7044 }
7045
7046 int
7047 main (int argc, char **argv)
7048 {
7049 return find_stack_direction (0, argc + !argv + 20) < 0;
7050 }
7051 _ACEOF
7052 if ac_fn_c_try_run "$LINENO"; then :
7053 ac_cv_c_stack_direction=1
7054 else
7055 ac_cv_c_stack_direction=-1
7056 fi
7057 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7058 conftest.$ac_objext conftest.beam conftest.$ac_ext
7059 fi
7060
7061 fi
7062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7063 $as_echo "$ac_cv_c_stack_direction" >&6; }
7064 cat >>confdefs.h <<_ACEOF
7065 #define STACK_DIRECTION $ac_cv_c_stack_direction
7066 _ACEOF
7067
7068
7069 fi
7070
7071
7072 GNULIB_INET_NTOP=0;
7073 GNULIB_INET_PTON=0;
7074 HAVE_DECL_INET_NTOP=1;
7075 HAVE_DECL_INET_PTON=1;
7076 REPLACE_INET_NTOP=0;
7077 REPLACE_INET_PTON=0;
7078
7079
7080
7081
7082
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7084 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7085 if ${gl_cv_have_include_next+:} false; then :
7086 $as_echo_n "(cached) " >&6
7087 else
7088 rm -rf conftestd1a conftestd1b conftestd2
7089 mkdir conftestd1a conftestd1b conftestd2
7090 cat <<EOF > conftestd1a/conftest.h
7091 #define DEFINED_IN_CONFTESTD1
7092 #include_next <conftest.h>
7093 #ifdef DEFINED_IN_CONFTESTD2
7094 int foo;
7095 #else
7096 #error "include_next doesn't work"
7097 #endif
7098 EOF
7099 cat <<EOF > conftestd1b/conftest.h
7100 #define DEFINED_IN_CONFTESTD1
7101 #include <stdio.h>
7102 #include_next <conftest.h>
7103 #ifdef DEFINED_IN_CONFTESTD2
7104 int foo;
7105 #else
7106 #error "include_next doesn't work"
7107 #endif
7108 EOF
7109 cat <<EOF > conftestd2/conftest.h
7110 #ifndef DEFINED_IN_CONFTESTD1
7111 #error "include_next test doesn't work"
7112 #endif
7113 #define DEFINED_IN_CONFTESTD2
7114 EOF
7115 gl_save_CPPFLAGS="$CPPFLAGS"
7116 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7118 /* end confdefs.h. */
7119 #include <conftest.h>
7120 _ACEOF
7121 if ac_fn_c_try_compile "$LINENO"; then :
7122 gl_cv_have_include_next=yes
7123 else
7124 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7126 /* end confdefs.h. */
7127 #include <conftest.h>
7128 _ACEOF
7129 if ac_fn_c_try_compile "$LINENO"; then :
7130 gl_cv_have_include_next=buggy
7131 else
7132 gl_cv_have_include_next=no
7133 fi
7134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7135
7136 fi
7137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7138 CPPFLAGS="$gl_save_CPPFLAGS"
7139 rm -rf conftestd1a conftestd1b conftestd2
7140
7141 fi
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7143 $as_echo "$gl_cv_have_include_next" >&6; }
7144 PRAGMA_SYSTEM_HEADER=
7145 if test $gl_cv_have_include_next = yes; then
7146 INCLUDE_NEXT=include_next
7147 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7148 if test -n "$GCC"; then
7149 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7150 fi
7151 else
7152 if test $gl_cv_have_include_next = buggy; then
7153 INCLUDE_NEXT=include
7154 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7155 else
7156 INCLUDE_NEXT=include
7157 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7158 fi
7159 fi
7160
7161
7162
7163
7164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
7165 $as_echo_n "checking whether source code line length is unlimited... " >&6; }
7166 if ${gl_cv_source_line_length_unlimited+:} false; then :
7167 $as_echo_n "(cached) " >&6
7168 else
7169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7170 /* end confdefs.h. */
7171
7172 #ifdef __TANDEM
7173 choke me
7174 #endif
7175
7176 _ACEOF
7177 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7178 $EGREP "choke me" >/dev/null 2>&1; then :
7179 gl_cv_source_line_length_unlimited=no
7180 else
7181 gl_cv_source_line_length_unlimited=yes
7182 fi
7183 rm -f conftest*
7184
7185
7186 fi
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
7188 $as_echo "$gl_cv_source_line_length_unlimited" >&6; }
7189 if test $gl_cv_source_line_length_unlimited = no; then
7190 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7191 else
7192 PRAGMA_COLUMNS=
7193 fi
7194
7195
7196
7197
7198
7199
7200 if test $ac_cv_header_features_h = yes; then
7201 HAVE_FEATURES_H=1
7202 else
7203 HAVE_FEATURES_H=0
7204 fi
7205
7206
7207
7208
7209
7210 if test $ac_cv_header_sys_socket_h = no; then
7211 for ac_header in ws2tcpip.h
7212 do :
7213 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
7214 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
7215 cat >>confdefs.h <<_ACEOF
7216 #define HAVE_WS2TCPIP_H 1
7217 _ACEOF
7218
7219 fi
7220
7221 done
7222
7223 fi
7224
7225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7226 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7227 if test -z "$MKDIR_P"; then
7228 if ${ac_cv_path_mkdir+:} false; then :
7229 $as_echo_n "(cached) " >&6
7230 else
7231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7232 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7233 do
7234 IFS=$as_save_IFS
7235 test -z "$as_dir" && as_dir=.
7236 for ac_prog in mkdir gmkdir; do
7237 for ac_exec_ext in '' $ac_executable_extensions; do
7238 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7239 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7240 'mkdir (GNU coreutils) '* | \
7241 'mkdir (coreutils) '* | \
7242 'mkdir (fileutils) '4.1*)
7243 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7244 break 3;;
7245 esac
7246 done
7247 done
7248 done
7249 IFS=$as_save_IFS
7250
7251 fi
7252
7253 test -d ./--version && rmdir ./--version
7254 if test "${ac_cv_path_mkdir+set}" = set; then
7255 MKDIR_P="$ac_cv_path_mkdir -p"
7256 else
7257 # As a last resort, use the slow shell script. Don't cache a
7258 # value for MKDIR_P within a source directory, because that will
7259 # break other packages using the cache if that directory is
7260 # removed, or if the value is a relative name.
7261 MKDIR_P="$ac_install_sh -d"
7262 fi
7263 fi
7264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7265 $as_echo "$MKDIR_P" >&6; }
7266
7267
7268 GNULIB_BTOWC=0;
7269 GNULIB_WCTOB=0;
7270 GNULIB_MBSINIT=0;
7271 GNULIB_MBRTOWC=0;
7272 GNULIB_MBRLEN=0;
7273 GNULIB_MBSRTOWCS=0;
7274 GNULIB_MBSNRTOWCS=0;
7275 GNULIB_WCRTOMB=0;
7276 GNULIB_WCSRTOMBS=0;
7277 GNULIB_WCSNRTOMBS=0;
7278 GNULIB_WCWIDTH=0;
7279 GNULIB_WMEMCHR=0;
7280 GNULIB_WMEMCMP=0;
7281 GNULIB_WMEMCPY=0;
7282 GNULIB_WMEMMOVE=0;
7283 GNULIB_WMEMPCPY=0;
7284 GNULIB_WMEMSET=0;
7285 GNULIB_WCSLEN=0;
7286 GNULIB_WCSNLEN=0;
7287 GNULIB_WCSCPY=0;
7288 GNULIB_WCPCPY=0;
7289 GNULIB_WCSNCPY=0;
7290 GNULIB_WCPNCPY=0;
7291 GNULIB_WCSCAT=0;
7292 GNULIB_WCSNCAT=0;
7293 GNULIB_WCSCMP=0;
7294 GNULIB_WCSNCMP=0;
7295 GNULIB_WCSCASECMP=0;
7296 GNULIB_WCSNCASECMP=0;
7297 GNULIB_WCSCOLL=0;
7298 GNULIB_WCSXFRM=0;
7299 GNULIB_WCSDUP=0;
7300 GNULIB_WCSCHR=0;
7301 GNULIB_WCSRCHR=0;
7302 GNULIB_WCSCSPN=0;
7303 GNULIB_WCSSPN=0;
7304 GNULIB_WCSPBRK=0;
7305 GNULIB_WCSSTR=0;
7306 GNULIB_WCSTOK=0;
7307 GNULIB_WCSWIDTH=0;
7308 GNULIB_WCSFTIME=0;
7309 GNULIB_MDA_WCSDUP=1;
7310 HAVE_BTOWC=1;
7311 HAVE_MBSINIT=1;
7312 HAVE_MBRTOWC=1;
7313 HAVE_MBRLEN=1;
7314 HAVE_MBSRTOWCS=1;
7315 HAVE_MBSNRTOWCS=1;
7316 HAVE_WCRTOMB=1;
7317 HAVE_WCSRTOMBS=1;
7318 HAVE_WCSNRTOMBS=1;
7319 HAVE_WMEMCHR=1;
7320 HAVE_WMEMCMP=1;
7321 HAVE_WMEMCPY=1;
7322 HAVE_WMEMMOVE=1;
7323 HAVE_WMEMPCPY=1;
7324 HAVE_WMEMSET=1;
7325 HAVE_WCSLEN=1;
7326 HAVE_WCSNLEN=1;
7327 HAVE_WCSCPY=1;
7328 HAVE_WCPCPY=1;
7329 HAVE_WCSNCPY=1;
7330 HAVE_WCPNCPY=1;
7331 HAVE_WCSCAT=1;
7332 HAVE_WCSNCAT=1;
7333 HAVE_WCSCMP=1;
7334 HAVE_WCSNCMP=1;
7335 HAVE_WCSCASECMP=1;
7336 HAVE_WCSNCASECMP=1;
7337 HAVE_WCSCOLL=1;
7338 HAVE_WCSXFRM=1;
7339 HAVE_WCSDUP=1;
7340 HAVE_WCSCHR=1;
7341 HAVE_WCSRCHR=1;
7342 HAVE_WCSCSPN=1;
7343 HAVE_WCSSPN=1;
7344 HAVE_WCSPBRK=1;
7345 HAVE_WCSSTR=1;
7346 HAVE_WCSTOK=1;
7347 HAVE_WCSWIDTH=1;
7348 HAVE_WCSFTIME=1;
7349 HAVE_DECL_WCTOB=1;
7350 HAVE_DECL_WCSDUP=1;
7351 HAVE_DECL_WCWIDTH=1;
7352 REPLACE_MBSTATE_T=0;
7353 REPLACE_BTOWC=0;
7354 REPLACE_WCTOB=0;
7355 REPLACE_MBSINIT=0;
7356 REPLACE_MBRTOWC=0;
7357 REPLACE_MBRLEN=0;
7358 REPLACE_MBSRTOWCS=0;
7359 REPLACE_MBSNRTOWCS=0;
7360 REPLACE_WCRTOMB=0;
7361 REPLACE_WCSRTOMBS=0;
7362 REPLACE_WCSNRTOMBS=0;
7363 REPLACE_WCWIDTH=0;
7364 REPLACE_WCSWIDTH=0;
7365 REPLACE_WCSFTIME=0;
7366 REPLACE_WCSTOK=0;
7367
7368
7369
7370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
7371 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
7372 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
7373 $as_echo_n "(cached) " >&6
7374 else
7375 gl_cv_header_wchar_h_correct_inline=yes
7376 case "$host_os" in
7377 *-gnu* | gnu*)
7378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7379 /* end confdefs.h. */
7380
7381
7382 #define wcstod renamed_wcstod
7383 #include <wchar.h>
7384 extern int zero (void);
7385 int main () { return zero(); }
7386
7387 _ACEOF
7388 save_ac_compile="$ac_compile"
7389 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
7390 if echo '#include "conftest.c"' >conftest1.c \
7391 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7392 (eval $ac_compile) 2>&5
7393 ac_status=$?
7394 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7395 test $ac_status = 0; }; then
7396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7397 /* end confdefs.h. */
7398
7399
7400 #define wcstod renamed_wcstod
7401 #include <wchar.h>
7402 int zero (void) { return 0; }
7403
7404 _ACEOF
7405 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
7406 if echo '#include "conftest.c"' >conftest2.c \
7407 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7408 (eval $ac_compile) 2>&5
7409 ac_status=$?
7410 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7411 test $ac_status = 0; }; then
7412 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
7413 :
7414 else
7415 gl_cv_header_wchar_h_correct_inline=no
7416 fi
7417 fi
7418 fi
7419 ac_compile="$save_ac_compile"
7420 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
7421 ;;
7422 esac
7423
7424 fi
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
7426 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
7427 if test $gl_cv_header_wchar_h_correct_inline = no; then
7428 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
7429 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
7430 C99 mode. You have four options:
7431 - Add the flag -fgnu89-inline to CC and reconfigure, or
7432 - Fix your include files, using parts of
7433 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
7434 - Use a gcc version older than 4.3, or
7435 - Don't use the flags -std=c99 or -std=gnu99.
7436 Configuration aborted." "$LINENO" 5
7437 fi
7438
7439
7440
7441
7442 for ac_func in $ac_func_list
7443 do :
7444 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7445 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7446 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7447 cat >>confdefs.h <<_ACEOF
7448 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7449 _ACEOF
7450
7451 fi
7452 done
7453
7454
7455
7456
7457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
7458 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
7459 if ${am_cv_langinfo_codeset+:} false; then :
7460 $as_echo_n "(cached) " >&6
7461 else
7462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7463 /* end confdefs.h. */
7464 #include <langinfo.h>
7465 int
7466 main ()
7467 {
7468 char* cs = nl_langinfo(CODESET); return !cs;
7469 ;
7470 return 0;
7471 }
7472 _ACEOF
7473 if ac_fn_c_try_link "$LINENO"; then :
7474 am_cv_langinfo_codeset=yes
7475 else
7476 am_cv_langinfo_codeset=no
7477 fi
7478 rm -f core conftest.err conftest.$ac_objext \
7479 conftest$ac_exeext conftest.$ac_ext
7480
7481 fi
7482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
7483 $as_echo "$am_cv_langinfo_codeset" >&6; }
7484 if test $am_cv_langinfo_codeset = yes; then
7485
7486 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
7487
7488 fi
7489
7490
7491
7492
7493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
7494 $as_echo_n "checking for a traditional french locale... " >&6; }
7495 if ${gt_cv_locale_fr+:} false; then :
7496 $as_echo_n "(cached) " >&6
7497 else
7498
7499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7500 /* end confdefs.h. */
7501
7502 #include <locale.h>
7503 #include <time.h>
7504 #if HAVE_LANGINFO_CODESET
7505 # include <langinfo.h>
7506 #endif
7507 #include <stdlib.h>
7508 #include <string.h>
7509 struct tm t;
7510 char buf[16];
7511 int main () {
7512 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
7513 imitates locale dependent behaviour by looking at the environment
7514 variables, and all locales use the UTF-8 encoding. */
7515 #if defined __BEOS__ || defined __HAIKU__
7516 return 1;
7517 #else
7518 /* Check whether the given locale name is recognized by the system. */
7519 # if defined _WIN32 && !defined __CYGWIN__
7520 /* On native Windows, setlocale(category, "") looks at the system settings,
7521 not at the environment variables. Also, when an encoding suffix such
7522 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
7523 category of the locale to "C". */
7524 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
7525 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
7526 return 1;
7527 # else
7528 if (setlocale (LC_ALL, "") == NULL) return 1;
7529 # endif
7530 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
7531 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
7532 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
7533 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
7534 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
7535 some unit tests fail.
7536 On MirBSD 10, when an unsupported locale is specified, setlocale()
7537 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
7538 # if HAVE_LANGINFO_CODESET
7539 {
7540 const char *cs = nl_langinfo (CODESET);
7541 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
7542 || strcmp (cs, "UTF-8") == 0)
7543 return 1;
7544 }
7545 # endif
7546 # ifdef __CYGWIN__
7547 /* On Cygwin, avoid locale names without encoding suffix, because the
7548 locale_charset() function relies on the encoding suffix. Note that
7549 LC_ALL is set on the command line. */
7550 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
7551 # endif
7552 /* Check whether in the abbreviation of the second month, the second
7553 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
7554 one byte long. This excludes the UTF-8 encoding. */
7555 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
7556 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
7557 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
7558 /* Check whether the decimal separator is a comma.
7559 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
7560 are nl_langinfo(RADIXCHAR) are both ".". */
7561 if (localeconv () ->decimal_point[0] != ',') return 1;
7562 # endif
7563 return 0;
7564 #endif
7565 }
7566
7567 _ACEOF
7568 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7569 (eval $ac_link) 2>&5
7570 ac_status=$?
7571 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7572 test $ac_status = 0; } && test -s conftest$ac_exeext; then
7573 case "$host_os" in
7574 # Handle native Windows specially, because there setlocale() interprets
7575 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
7576 # "fr" or "fra" as "French" or "French_France.1252",
7577 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
7578 # "ja" as "Japanese" or "Japanese_Japan.932",
7579 # and similar.
7580 mingw*)
7581 # Test for the native Windows locale name.
7582 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7583 gt_cv_locale_fr=French_France.1252
7584 else
7585 # None found.
7586 gt_cv_locale_fr=none
7587 fi
7588 ;;
7589 *)
7590 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
7591 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
7592 # configure script would override the LC_ALL setting. Likewise for
7593 # LC_CTYPE, which is also set at the beginning of the configure script.
7594 # Test for the usual locale name.
7595 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7596 gt_cv_locale_fr=fr_FR
7597 else
7598 # Test for the locale name with explicit encoding suffix.
7599 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7600 gt_cv_locale_fr=fr_FR.ISO-8859-1
7601 else
7602 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
7603 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7604 gt_cv_locale_fr=fr_FR.ISO8859-1
7605 else
7606 # Test for the HP-UX locale name.
7607 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7608 gt_cv_locale_fr=fr_FR.iso88591
7609 else
7610 # Test for the Solaris 7 locale name.
7611 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7612 gt_cv_locale_fr=fr
7613 else
7614 # None found.
7615 gt_cv_locale_fr=none
7616 fi
7617 fi
7618 fi
7619 fi
7620 fi
7621 ;;
7622 esac
7623 fi
7624 rm -fr conftest*
7625
7626 fi
7627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
7628 $as_echo "$gt_cv_locale_fr" >&6; }
7629 LOCALE_FR=$gt_cv_locale_fr
7630
7631
7632
7633 GNULIB__EXIT=0;
7634 GNULIB_ALIGNED_ALLOC=0;
7635 GNULIB_ATOLL=0;
7636 GNULIB_CALLOC_POSIX=0;
7637 GNULIB_CANONICALIZE_FILE_NAME=0;
7638 GNULIB_FREE_POSIX=0;
7639 GNULIB_GETLOADAVG=0;
7640 GNULIB_GETSUBOPT=0;
7641 GNULIB_GRANTPT=0;
7642 GNULIB_MALLOC_POSIX=0;
7643 GNULIB_MBTOWC=0;
7644 GNULIB_MKDTEMP=0;
7645 GNULIB_MKOSTEMP=0;
7646 GNULIB_MKOSTEMPS=0;
7647 GNULIB_MKSTEMP=0;
7648 GNULIB_MKSTEMPS=0;
7649 GNULIB_POSIX_MEMALIGN=0;
7650 GNULIB_POSIX_OPENPT=0;
7651 GNULIB_PTSNAME=0;
7652 GNULIB_PTSNAME_R=0;
7653 GNULIB_PUTENV=0;
7654 GNULIB_QSORT_R=0;
7655 GNULIB_RANDOM=0;
7656 GNULIB_RANDOM_R=0;
7657 GNULIB_REALLOCARRAY=0;
7658 GNULIB_REALLOC_POSIX=0;
7659 GNULIB_REALPATH=0;
7660 GNULIB_RPMATCH=0;
7661 GNULIB_SECURE_GETENV=0;
7662 GNULIB_SETENV=0;
7663 GNULIB_STRTOD=0;
7664 GNULIB_STRTOLD=0;
7665 GNULIB_STRTOLL=0;
7666 GNULIB_STRTOULL=0;
7667 GNULIB_SYSTEM_POSIX=0;
7668 GNULIB_UNLOCKPT=0;
7669 GNULIB_UNSETENV=0;
7670 GNULIB_WCTOMB=0;
7671 GNULIB_MDA_ECVT=1;
7672 GNULIB_MDA_FCVT=1;
7673 GNULIB_MDA_GCVT=1;
7674 GNULIB_MDA_MKTEMP=1;
7675 GNULIB_MDA_PUTENV=1;
7676 HAVE__EXIT=1;
7677 HAVE_ALIGNED_ALLOC=1;
7678 HAVE_ATOLL=1;
7679 HAVE_CANONICALIZE_FILE_NAME=1;
7680 HAVE_DECL_ECVT=1;
7681 HAVE_DECL_FCVT=1;
7682 HAVE_DECL_GCVT=1;
7683 HAVE_DECL_GETLOADAVG=1;
7684 HAVE_GETSUBOPT=1;
7685 HAVE_GRANTPT=1;
7686 HAVE_INITSTATE=1;
7687 HAVE_DECL_INITSTATE=1;
7688 HAVE_MBTOWC=1;
7689 HAVE_MKDTEMP=1;
7690 HAVE_MKOSTEMP=1;
7691 HAVE_MKOSTEMPS=1;
7692 HAVE_MKSTEMP=1;
7693 HAVE_MKSTEMPS=1;
7694 HAVE_POSIX_MEMALIGN=1;
7695 HAVE_POSIX_OPENPT=1;
7696 HAVE_PTSNAME=1;
7697 HAVE_PTSNAME_R=1;
7698 HAVE_QSORT_R=1;
7699 HAVE_RANDOM=1;
7700 HAVE_RANDOM_H=1;
7701 HAVE_RANDOM_R=1;
7702 HAVE_REALLOCARRAY=1;
7703 HAVE_REALPATH=1;
7704 HAVE_RPMATCH=1;
7705 HAVE_SECURE_GETENV=1;
7706 HAVE_SETENV=1;
7707 HAVE_DECL_SETENV=1;
7708 HAVE_SETSTATE=1;
7709 HAVE_DECL_SETSTATE=1;
7710 HAVE_STRTOD=1;
7711 HAVE_STRTOLD=1;
7712 HAVE_STRTOLL=1;
7713 HAVE_STRTOULL=1;
7714 HAVE_STRUCT_RANDOM_DATA=1;
7715 HAVE_SYS_LOADAVG_H=0;
7716 HAVE_UNLOCKPT=1;
7717 HAVE_DECL_UNSETENV=1;
7718 REPLACE_ALIGNED_ALLOC=0;
7719 REPLACE_CALLOC=0;
7720 REPLACE_CANONICALIZE_FILE_NAME=0;
7721 REPLACE_FREE=0;
7722 REPLACE_INITSTATE=0;
7723 REPLACE_MALLOC=0;
7724 REPLACE_MBTOWC=0;
7725 REPLACE_MKSTEMP=0;
7726 REPLACE_POSIX_MEMALIGN=0;
7727 REPLACE_PTSNAME=0;
7728 REPLACE_PTSNAME_R=0;
7729 REPLACE_PUTENV=0;
7730 REPLACE_QSORT_R=0;
7731 REPLACE_RANDOM=0;
7732 REPLACE_RANDOM_R=0;
7733 REPLACE_REALLOC=0;
7734 REPLACE_REALPATH=0;
7735 REPLACE_SETENV=0;
7736 REPLACE_SETSTATE=0;
7737 REPLACE_STRTOD=0;
7738 REPLACE_STRTOLD=0;
7739 REPLACE_UNSETENV=0;
7740 REPLACE_WCTOMB=0;
7741
7742
7743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
7744 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
7745 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
7746 $as_echo_n "(cached) " >&6
7747 else
7748 rm -f conftest.sym conftest.file
7749 echo >conftest.file
7750 if test "$cross_compiling" = yes; then :
7751 case "$host_os" in
7752 linux-* | linux)
7753 # Guess yes on Linux systems.
7754 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
7755 *-gnu* | gnu*)
7756 # Guess yes on glibc systems.
7757 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
7758 mingw*)
7759 # Guess no on native Windows.
7760 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
7761 *)
7762 # If we don't know, obey --enable-cross-guesses.
7763 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
7764 esac
7765
7766 else
7767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7768 /* end confdefs.h. */
7769 $ac_includes_default
7770 int
7771 main ()
7772 {
7773 struct stat sbuf;
7774 if (symlink ("conftest.file", "conftest.sym") != 0)
7775 return 1;
7776 /* Linux will dereference the symlink and fail, as required by
7777 POSIX. That is better in the sense that it means we will not
7778 have to compile and use the lstat wrapper. */
7779 return lstat ("conftest.sym/", &sbuf) == 0;
7780
7781 ;
7782 return 0;
7783 }
7784 _ACEOF
7785 if ac_fn_c_try_run "$LINENO"; then :
7786 gl_cv_func_lstat_dereferences_slashed_symlink=yes
7787 else
7788 gl_cv_func_lstat_dereferences_slashed_symlink=no
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 rm -f conftest.sym conftest.file
7795
7796 fi
7797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
7798 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
7799 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
7800 *yes)
7801
7802 cat >>confdefs.h <<_ACEOF
7803 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
7804 _ACEOF
7805
7806 ;;
7807 esac
7808
7809
7810
7811
7812
7813
7814
7815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7816 $as_echo_n "checking whether // is distinct from /... " >&6; }
7817 if ${gl_cv_double_slash_root+:} false; then :
7818 $as_echo_n "(cached) " >&6
7819 else
7820 if test x"$cross_compiling" = xyes ; then
7821 # When cross-compiling, there is no way to tell whether // is special
7822 # short of a list of hosts. However, the only known hosts to date
7823 # that have a distinct // are Apollo DomainOS (too old to port to),
7824 # Cygwin, and z/OS. If anyone knows of another system for which // has
7825 # special semantics and is distinct from /, please report it to
7826 # <bug-gnulib@gnu.org>.
7827 case $host in
7828 *-cygwin | i370-ibm-openedition)
7829 gl_cv_double_slash_root=yes ;;
7830 *)
7831 # Be optimistic and assume that / and // are the same when we
7832 # don't know.
7833 gl_cv_double_slash_root='unknown, assuming no' ;;
7834 esac
7835 else
7836 set x `ls -di / // 2>/dev/null`
7837 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7838 gl_cv_double_slash_root=no
7839 else
7840 gl_cv_double_slash_root=yes
7841 fi
7842 fi
7843 fi
7844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7845 $as_echo "$gl_cv_double_slash_root" >&6; }
7846 if test "$gl_cv_double_slash_root" = yes; then
7847
7848 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7849
7850 fi
7851
7852
7853
7854
7855
7856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
7857 $as_echo_n "checking whether realpath works... " >&6; }
7858 if ${gl_cv_func_realpath_works+:} false; then :
7859 $as_echo_n "(cached) " >&6
7860 else
7861
7862 rm -rf conftest.a conftest.d
7863 touch conftest.a
7864 mkdir conftest.d
7865 if test "$cross_compiling" = yes; then :
7866 case "$host_os" in
7867 # Guess yes on glibc systems.
7868 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
7869 # Guess yes on musl systems.
7870 *-musl*) gl_cv_func_realpath_works="guessing yes" ;;
7871 # Guess no on native Windows.
7872 mingw*) gl_cv_func_realpath_works="guessing no" ;;
7873 # If we don't know, obey --enable-cross-guesses.
7874 *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
7875 esac
7876
7877 else
7878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7879 /* end confdefs.h. */
7880
7881
7882
7883 #include <stdlib.h>
7884 #if defined __MACH__ && defined __APPLE__
7885 /* Avoid a crash on Mac OS X. */
7886 #include <mach/mach.h>
7887 #include <mach/mach_error.h>
7888 #include <mach/thread_status.h>
7889 #include <mach/exception.h>
7890 #include <mach/task.h>
7891 #include <pthread.h>
7892 /* The exception port on which our thread listens. */
7893 static mach_port_t our_exception_port;
7894 /* The main function of the thread listening for exceptions of type
7895 EXC_BAD_ACCESS. */
7896 static void *
7897 mach_exception_thread (void *arg)
7898 {
7899 /* Buffer for a message to be received. */
7900 struct {
7901 mach_msg_header_t head;
7902 mach_msg_body_t msgh_body;
7903 char data[1024];
7904 } msg;
7905 mach_msg_return_t retval;
7906 /* Wait for a message on the exception port. */
7907 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
7908 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
7909 if (retval != MACH_MSG_SUCCESS)
7910 abort ();
7911 exit (1);
7912 }
7913 static void
7914 nocrash_init (void)
7915 {
7916 mach_port_t self = mach_task_self ();
7917 /* Allocate a port on which the thread shall listen for exceptions. */
7918 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
7919 == KERN_SUCCESS) {
7920 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
7921 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
7922 MACH_MSG_TYPE_MAKE_SEND)
7923 == KERN_SUCCESS) {
7924 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
7925 for us. */
7926 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
7927 /* Create the thread listening on the exception port. */
7928 pthread_attr_t attr;
7929 pthread_t thread;
7930 if (pthread_attr_init (&attr) == 0
7931 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
7932 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
7933 pthread_attr_destroy (&attr);
7934 /* Replace the exception port info for these exceptions with our own.
7935 Note that we replace the exception port for the entire task, not only
7936 for a particular thread. This has the effect that when our exception
7937 port gets the message, the thread specific exception port has already
7938 been asked, and we don't need to bother about it.
7939 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
7940 task_set_exception_ports (self, mask, our_exception_port,
7941 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
7942 }
7943 }
7944 }
7945 }
7946 #elif defined _WIN32 && ! defined __CYGWIN__
7947 /* Avoid a crash on native Windows. */
7948 #define WIN32_LEAN_AND_MEAN
7949 #include <windows.h>
7950 #include <winerror.h>
7951 static LONG WINAPI
7952 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
7953 {
7954 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
7955 {
7956 case EXCEPTION_ACCESS_VIOLATION:
7957 case EXCEPTION_IN_PAGE_ERROR:
7958 case EXCEPTION_STACK_OVERFLOW:
7959 case EXCEPTION_GUARD_PAGE:
7960 case EXCEPTION_PRIV_INSTRUCTION:
7961 case EXCEPTION_ILLEGAL_INSTRUCTION:
7962 case EXCEPTION_DATATYPE_MISALIGNMENT:
7963 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
7964 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
7965 exit (1);
7966 }
7967 return EXCEPTION_CONTINUE_SEARCH;
7968 }
7969 static void
7970 nocrash_init (void)
7971 {
7972 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
7973 }
7974 #else
7975 /* Avoid a crash on POSIX systems. */
7976 #include <signal.h>
7977 #include <unistd.h>
7978 /* A POSIX signal handler. */
7979 static void
7980 exception_handler (int sig)
7981 {
7982 _exit (1);
7983 }
7984 static void
7985 nocrash_init (void)
7986 {
7987 #ifdef SIGSEGV
7988 signal (SIGSEGV, exception_handler);
7989 #endif
7990 #ifdef SIGBUS
7991 signal (SIGBUS, exception_handler);
7992 #endif
7993 }
7994 #endif
7995
7996 #include <stdlib.h>
7997 #include <string.h>
7998
7999 int
8000 main ()
8001 {
8002
8003 int result = 0;
8004 {
8005 char *name = realpath ("conftest.a", NULL);
8006 if (!(name && *name == '/'))
8007 result |= 1;
8008 free (name);
8009 }
8010 {
8011 char *name = realpath ("conftest.b/../conftest.a", NULL);
8012 if (name != NULL)
8013 result |= 2;
8014 free (name);
8015 }
8016 {
8017 char *name = realpath ("conftest.a/", NULL);
8018 if (name != NULL)
8019 result |= 4;
8020 free (name);
8021 }
8022 {
8023 char *name1 = realpath (".", NULL);
8024 char *name2 = realpath ("conftest.d//./..", NULL);
8025 if (! name1 || ! name2 || strcmp (name1, name2))
8026 result |= 8;
8027 free (name1);
8028 free (name2);
8029 }
8030 return result;
8031
8032 ;
8033 return 0;
8034 }
8035
8036 _ACEOF
8037 if ac_fn_c_try_run "$LINENO"; then :
8038 gl_cv_func_realpath_works=yes
8039 else
8040 gl_cv_func_realpath_works=no
8041 fi
8042 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8043 conftest.$ac_objext conftest.beam conftest.$ac_ext
8044 fi
8045
8046 rm -rf conftest.a conftest.d
8047
8048 fi
8049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
8050 $as_echo "$gl_cv_func_realpath_works" >&6; }
8051 case "$gl_cv_func_realpath_works" in
8052 *yes)
8053
8054 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
8055
8056 ;;
8057 esac
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067 case "$host_os" in
8068 mingw*) ;;
8069 *) for ac_func in getcwd
8070 do :
8071 ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
8072 if test "x$ac_cv_func_getcwd" = xyes; then :
8073 cat >>confdefs.h <<_ACEOF
8074 #define HAVE_GETCWD 1
8075 _ACEOF
8076
8077 fi
8078 done
8079 ;;
8080 esac
8081
8082
8083
8084
8085
8086
8087 GNULIB_ACCESS=0;
8088 GNULIB_CHDIR=0;
8089 GNULIB_CHOWN=0;
8090 GNULIB_CLOSE=0;
8091 GNULIB_COPY_FILE_RANGE=0;
8092 GNULIB_DUP=0;
8093 GNULIB_DUP2=0;
8094 GNULIB_DUP3=0;
8095 GNULIB_ENVIRON=0;
8096 GNULIB_EUIDACCESS=0;
8097 GNULIB_EXECL=0;
8098 GNULIB_EXECLE=0;
8099 GNULIB_EXECLP=0;
8100 GNULIB_EXECV=0;
8101 GNULIB_EXECVE=0;
8102 GNULIB_EXECVP=0;
8103 GNULIB_EXECVPE=0;
8104 GNULIB_FACCESSAT=0;
8105 GNULIB_FCHDIR=0;
8106 GNULIB_FCHOWNAT=0;
8107 GNULIB_FDATASYNC=0;
8108 GNULIB_FSYNC=0;
8109 GNULIB_FTRUNCATE=0;
8110 GNULIB_GETCWD=0;
8111 GNULIB_GETDOMAINNAME=0;
8112 GNULIB_GETDTABLESIZE=0;
8113 GNULIB_GETENTROPY=0;
8114 GNULIB_GETGROUPS=0;
8115 GNULIB_GETHOSTNAME=0;
8116 GNULIB_GETLOGIN=0;
8117 GNULIB_GETLOGIN_R=0;
8118 GNULIB_GETOPT_POSIX=0;
8119 GNULIB_GETPAGESIZE=0;
8120 GNULIB_GETPASS=0;
8121 GNULIB_GETUSERSHELL=0;
8122 GNULIB_GROUP_MEMBER=0;
8123 GNULIB_ISATTY=0;
8124 GNULIB_LCHOWN=0;
8125 GNULIB_LINK=0;
8126 GNULIB_LINKAT=0;
8127 GNULIB_LSEEK=0;
8128 GNULIB_PIPE=0;
8129 GNULIB_PIPE2=0;
8130 GNULIB_PREAD=0;
8131 GNULIB_PWRITE=0;
8132 GNULIB_READ=0;
8133 GNULIB_READLINK=0;
8134 GNULIB_READLINKAT=0;
8135 GNULIB_RMDIR=0;
8136 GNULIB_SETHOSTNAME=0;
8137 GNULIB_SLEEP=0;
8138 GNULIB_SYMLINK=0;
8139 GNULIB_SYMLINKAT=0;
8140 GNULIB_TRUNCATE=0;
8141 GNULIB_TTYNAME_R=0;
8142 GNULIB_UNISTD_H_NONBLOCKING=0;
8143 GNULIB_UNISTD_H_SIGPIPE=0;
8144 GNULIB_UNLINK=0;
8145 GNULIB_UNLINKAT=0;
8146 GNULIB_USLEEP=0;
8147 GNULIB_WRITE=0;
8148 GNULIB_MDA_ACCESS=1;
8149 GNULIB_MDA_CHDIR=1;
8150 GNULIB_MDA_CLOSE=1;
8151 GNULIB_MDA_DUP=1;
8152 GNULIB_MDA_DUP2=1;
8153 GNULIB_MDA_EXECL=1;
8154 GNULIB_MDA_EXECLE=1;
8155 GNULIB_MDA_EXECLP=1;
8156 GNULIB_MDA_EXECV=1;
8157 GNULIB_MDA_EXECVE=1;
8158 GNULIB_MDA_EXECVP=1;
8159 GNULIB_MDA_EXECVPE=1;
8160 GNULIB_MDA_GETCWD=1;
8161 GNULIB_MDA_GETPID=1;
8162 GNULIB_MDA_ISATTY=1;
8163 GNULIB_MDA_LSEEK=1;
8164 GNULIB_MDA_READ=1;
8165 GNULIB_MDA_RMDIR=1;
8166 GNULIB_MDA_SWAB=1;
8167 GNULIB_MDA_UNLINK=1;
8168 GNULIB_MDA_WRITE=1;
8169 HAVE_CHOWN=1;
8170 HAVE_COPY_FILE_RANGE=1;
8171 HAVE_DUP3=1;
8172 HAVE_EUIDACCESS=1;
8173 HAVE_EXECVPE=1;
8174 HAVE_FACCESSAT=1;
8175 HAVE_FCHDIR=1;
8176 HAVE_FCHOWNAT=1;
8177 HAVE_FDATASYNC=1;
8178 HAVE_FSYNC=1;
8179 HAVE_FTRUNCATE=1;
8180 HAVE_GETDTABLESIZE=1;
8181 HAVE_GETENTROPY=1;
8182 HAVE_GETGROUPS=1;
8183 HAVE_GETHOSTNAME=1;
8184 HAVE_GETLOGIN=1;
8185 HAVE_GETPAGESIZE=1;
8186 HAVE_GETPASS=1;
8187 HAVE_GROUP_MEMBER=1;
8188 HAVE_LCHOWN=1;
8189 HAVE_LINK=1;
8190 HAVE_LINKAT=1;
8191 HAVE_PIPE=1;
8192 HAVE_PIPE2=1;
8193 HAVE_PREAD=1;
8194 HAVE_PWRITE=1;
8195 HAVE_READLINK=1;
8196 HAVE_READLINKAT=1;
8197 HAVE_SETHOSTNAME=1;
8198 HAVE_SLEEP=1;
8199 HAVE_SYMLINK=1;
8200 HAVE_SYMLINKAT=1;
8201 HAVE_UNLINKAT=1;
8202 HAVE_USLEEP=1;
8203 HAVE_DECL_ENVIRON=1;
8204 HAVE_DECL_EXECVPE=1;
8205 HAVE_DECL_FCHDIR=1;
8206 HAVE_DECL_FDATASYNC=1;
8207 HAVE_DECL_GETDOMAINNAME=1;
8208 HAVE_DECL_GETLOGIN=1;
8209 HAVE_DECL_GETLOGIN_R=1;
8210 HAVE_DECL_GETPAGESIZE=1;
8211 HAVE_DECL_GETUSERSHELL=1;
8212 HAVE_DECL_SETHOSTNAME=1;
8213 HAVE_DECL_TRUNCATE=1;
8214 HAVE_DECL_TTYNAME_R=1;
8215 HAVE_OS_H=0;
8216 HAVE_SYS_PARAM_H=0;
8217 REPLACE_ACCESS=0;
8218 REPLACE_CHOWN=0;
8219 REPLACE_CLOSE=0;
8220 REPLACE_DUP=0;
8221 REPLACE_DUP2=0;
8222 REPLACE_EXECL=0;
8223 REPLACE_EXECLE=0;
8224 REPLACE_EXECLP=0;
8225 REPLACE_EXECV=0;
8226 REPLACE_EXECVE=0;
8227 REPLACE_EXECVP=0;
8228 REPLACE_EXECVPE=0;
8229 REPLACE_FACCESSAT=0;
8230 REPLACE_FCHOWNAT=0;
8231 REPLACE_FTRUNCATE=0;
8232 REPLACE_GETCWD=0;
8233 REPLACE_GETDOMAINNAME=0;
8234 REPLACE_GETDTABLESIZE=0;
8235 REPLACE_GETLOGIN_R=0;
8236 REPLACE_GETGROUPS=0;
8237 REPLACE_GETPAGESIZE=0;
8238 REPLACE_GETPASS=0;
8239 REPLACE_ISATTY=0;
8240 REPLACE_LCHOWN=0;
8241 REPLACE_LINK=0;
8242 REPLACE_LINKAT=0;
8243 REPLACE_LSEEK=0;
8244 REPLACE_PREAD=0;
8245 REPLACE_PWRITE=0;
8246 REPLACE_READ=0;
8247 REPLACE_READLINK=0;
8248 REPLACE_READLINKAT=0;
8249 REPLACE_RMDIR=0;
8250 REPLACE_SLEEP=0;
8251 REPLACE_SYMLINK=0;
8252 REPLACE_SYMLINKAT=0;
8253 REPLACE_TRUNCATE=0;
8254 REPLACE_TTYNAME_R=0;
8255 REPLACE_UNLINK=0;
8256 REPLACE_UNLINKAT=0;
8257 REPLACE_USLEEP=0;
8258 REPLACE_WRITE=0;
8259 UNISTD_H_HAVE_SYS_RANDOM_H=0;
8260 UNISTD_H_HAVE_WINSOCK2_H=0;
8261 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
8274 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
8275
8276 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
8277
8278 else
8279 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
8280 fi
8281
8282
8283
8284
8285
8286 GNULIB_OPENDIR=0;
8287 GNULIB_READDIR=0;
8288 GNULIB_REWINDDIR=0;
8289 GNULIB_CLOSEDIR=0;
8290 GNULIB_DIRFD=0;
8291 GNULIB_FDOPENDIR=0;
8292 GNULIB_SCANDIR=0;
8293 GNULIB_ALPHASORT=0;
8294 HAVE_OPENDIR=1;
8295 HAVE_READDIR=1;
8296 HAVE_REWINDDIR=1;
8297 HAVE_CLOSEDIR=1;
8298 HAVE_DECL_DIRFD=1;
8299 HAVE_DECL_FDOPENDIR=1;
8300 HAVE_FDOPENDIR=1;
8301 HAVE_SCANDIR=1;
8302 HAVE_ALPHASORT=1;
8303 REPLACE_OPENDIR=0;
8304 REPLACE_CLOSEDIR=0;
8305 REPLACE_DIRFD=0;
8306 REPLACE_FDOPENDIR=0;
8307
8308
8309 GNULIB_ISBLANK=0;
8310 HAVE_ISBLANK=1;
8311
8312
8313
8314 gl_mda_defines='
8315 #if defined _WIN32 && !defined __CYGWIN__
8316 #define access _access
8317 #define chdir _chdir
8318 #define chmod _chmod
8319 #define close _close
8320 #define creat _creat
8321 #define dup _dup
8322 #define dup2 _dup2
8323 #define ecvt _ecvt
8324 #define execl _execl
8325 #define execle _execle
8326 #define execlp _execlp
8327 #define execv _execv
8328 #define execve _execve
8329 #define execvp _execvp
8330 #define execvpe _execvpe
8331 #define fcloseall _fcloseall
8332 #define fcvt _fcvt
8333 #define fdopen _fdopen
8334 #define fileno _fileno
8335 #define gcvt _gcvt
8336 #define getcwd _getcwd
8337 #define getpid _getpid
8338 #define getw _getw
8339 #define isatty _isatty
8340 #define j0 _j0
8341 #define j1 _j1
8342 #define jn _jn
8343 #define lfind _lfind
8344 #define lsearch _lsearch
8345 #define lseek _lseek
8346 #define memccpy _memccpy
8347 #define mkdir _mkdir
8348 #define mktemp _mktemp
8349 #define open _open
8350 #define putenv _putenv
8351 #define putw _putw
8352 #define read _read
8353 #define rmdir _rmdir
8354 #define strdup _strdup
8355 #define swab _swab
8356 #define tempnam _tempnam
8357 #define tzset _tzset
8358 #define umask _umask
8359 #define unlink _unlink
8360 #define utime _utime
8361 #define wcsdup _wcsdup
8362 #define write _write
8363 #define y0 _y0
8364 #define y1 _y1
8365 #define yn _yn
8366 #endif
8367 '
8368
8369
8370
8371
8372
8373
8374
8375
8376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
8377 $as_echo_n "checking if environ is properly declared... " >&6; }
8378 if ${gt_cv_var_environ_declaration+:} false; then :
8379 $as_echo_n "(cached) " >&6
8380 else
8381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8382 /* end confdefs.h. */
8383 #if HAVE_UNISTD_H
8384 #include <unistd.h>
8385 #endif
8386 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
8387 #include <stdlib.h>
8388
8389 extern struct { int foo; } environ;
8390 int
8391 main ()
8392 {
8393 environ.foo = 1;
8394 ;
8395 return 0;
8396 }
8397 _ACEOF
8398 if ac_fn_c_try_compile "$LINENO"; then :
8399 gt_cv_var_environ_declaration=no
8400 else
8401 gt_cv_var_environ_declaration=yes
8402 fi
8403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8404 fi
8405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
8406 $as_echo "$gt_cv_var_environ_declaration" >&6; }
8407 if test $gt_cv_var_environ_declaration = yes; then
8408
8409 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
8410
8411 fi
8412
8413
8414 if test $gt_cv_var_environ_declaration != yes; then
8415 HAVE_DECL_ENVIRON=0
8416 fi
8417
8418
8419
8420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8421 $as_echo_n "checking for complete errno.h... " >&6; }
8422 if ${gl_cv_header_errno_h_complete+:} false; then :
8423 $as_echo_n "(cached) " >&6
8424 else
8425
8426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8427 /* end confdefs.h. */
8428
8429 #include <errno.h>
8430 #if !defined ETXTBSY
8431 booboo
8432 #endif
8433 #if !defined ENOMSG
8434 booboo
8435 #endif
8436 #if !defined EIDRM
8437 booboo
8438 #endif
8439 #if !defined ENOLINK
8440 booboo
8441 #endif
8442 #if !defined EPROTO
8443 booboo
8444 #endif
8445 #if !defined EMULTIHOP
8446 booboo
8447 #endif
8448 #if !defined EBADMSG
8449 booboo
8450 #endif
8451 #if !defined EOVERFLOW
8452 booboo
8453 #endif
8454 #if !defined ENOTSUP
8455 booboo
8456 #endif
8457 #if !defined ENETRESET
8458 booboo
8459 #endif
8460 #if !defined ECONNABORTED
8461 booboo
8462 #endif
8463 #if !defined ESTALE
8464 booboo
8465 #endif
8466 #if !defined EDQUOT
8467 booboo
8468 #endif
8469 #if !defined ECANCELED
8470 booboo
8471 #endif
8472 #if !defined EOWNERDEAD
8473 booboo
8474 #endif
8475 #if !defined ENOTRECOVERABLE
8476 booboo
8477 #endif
8478 #if !defined EILSEQ
8479 booboo
8480 #endif
8481
8482 _ACEOF
8483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8484 $EGREP "booboo" >/dev/null 2>&1; then :
8485 gl_cv_header_errno_h_complete=no
8486 else
8487 gl_cv_header_errno_h_complete=yes
8488 fi
8489 rm -f conftest*
8490
8491
8492 fi
8493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8494 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
8495 if test $gl_cv_header_errno_h_complete = yes; then
8496 ERRNO_H=''
8497 else
8498
8499
8500
8501
8502
8503
8504
8505
8506 if test $gl_cv_have_include_next = yes; then
8507 gl_cv_next_errno_h='<'errno.h'>'
8508 else
8509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8510 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
8511 if ${gl_cv_next_errno_h+:} false; then :
8512 $as_echo_n "(cached) " >&6
8513 else
8514
8515
8516
8517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8518 /* end confdefs.h. */
8519 #include <errno.h>
8520 _ACEOF
8521 case "$host_os" in
8522 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8523 *) gl_absname_cpp="$ac_cpp" ;;
8524 esac
8525
8526 case "$host_os" in
8527 mingw*)
8528 gl_dirsep_regex='[/\\]'
8529 ;;
8530 *)
8531 gl_dirsep_regex='\/'
8532 ;;
8533 esac
8534 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8535 gl_header_literal_regex=`echo 'errno.h' \
8536 | sed -e "$gl_make_literal_regex_sed"`
8537 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8538 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8539 s|^/[^/]|//&|
8540 p
8541 q
8542 }'
8543
8544 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8545 sed -n "$gl_absolute_header_sed"`
8546
8547 gl_header=$gl_cv_absolute_errno_h
8548 gl_cv_next_errno_h='"'$gl_header'"'
8549
8550
8551 fi
8552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8553 $as_echo "$gl_cv_next_errno_h" >&6; }
8554 fi
8555 NEXT_ERRNO_H=$gl_cv_next_errno_h
8556
8557 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8558 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8559 gl_next_as_first_directive='<'errno.h'>'
8560 else
8561 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8562 gl_next_as_first_directive=$gl_cv_next_errno_h
8563 fi
8564 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8565
8566
8567
8568
8569 ERRNO_H='errno.h'
8570 fi
8571
8572 if test -n "$ERRNO_H"; then
8573 GL_GENERATE_ERRNO_H_TRUE=
8574 GL_GENERATE_ERRNO_H_FALSE='#'
8575 else
8576 GL_GENERATE_ERRNO_H_TRUE='#'
8577 GL_GENERATE_ERRNO_H_FALSE=
8578 fi
8579
8580
8581 if test -n "$ERRNO_H"; then
8582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8583 $as_echo_n "checking for EMULTIHOP value... " >&6; }
8584 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
8585 $as_echo_n "(cached) " >&6
8586 else
8587
8588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8589 /* end confdefs.h. */
8590
8591 #include <errno.h>
8592 #ifdef EMULTIHOP
8593 yes
8594 #endif
8595
8596 _ACEOF
8597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8598 $EGREP "yes" >/dev/null 2>&1; then :
8599 gl_cv_header_errno_h_EMULTIHOP=yes
8600 else
8601 gl_cv_header_errno_h_EMULTIHOP=no
8602 fi
8603 rm -f conftest*
8604
8605 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8607 /* end confdefs.h. */
8608
8609 #define _XOPEN_SOURCE_EXTENDED 1
8610 #include <errno.h>
8611 #ifdef EMULTIHOP
8612 yes
8613 #endif
8614
8615 _ACEOF
8616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8617 $EGREP "yes" >/dev/null 2>&1; then :
8618 gl_cv_header_errno_h_EMULTIHOP=hidden
8619 fi
8620 rm -f conftest*
8621
8622 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
8623 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
8624 #define _XOPEN_SOURCE_EXTENDED 1
8625 #include <errno.h>
8626 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8627 #include <stdio.h>
8628 #include <stdlib.h>
8629 "; then :
8630
8631 fi
8632
8633 fi
8634 fi
8635
8636 fi
8637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
8638 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
8639 case $gl_cv_header_errno_h_EMULTIHOP in
8640 yes | no)
8641 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
8642 ;;
8643 *)
8644 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
8645 ;;
8646 esac
8647
8648
8649 fi
8650
8651
8652 if test -n "$ERRNO_H"; then
8653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
8654 $as_echo_n "checking for ENOLINK value... " >&6; }
8655 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
8656 $as_echo_n "(cached) " >&6
8657 else
8658
8659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8660 /* end confdefs.h. */
8661
8662 #include <errno.h>
8663 #ifdef ENOLINK
8664 yes
8665 #endif
8666
8667 _ACEOF
8668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8669 $EGREP "yes" >/dev/null 2>&1; then :
8670 gl_cv_header_errno_h_ENOLINK=yes
8671 else
8672 gl_cv_header_errno_h_ENOLINK=no
8673 fi
8674 rm -f conftest*
8675
8676 if test $gl_cv_header_errno_h_ENOLINK = no; then
8677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8678 /* end confdefs.h. */
8679
8680 #define _XOPEN_SOURCE_EXTENDED 1
8681 #include <errno.h>
8682 #ifdef ENOLINK
8683 yes
8684 #endif
8685
8686 _ACEOF
8687 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8688 $EGREP "yes" >/dev/null 2>&1; then :
8689 gl_cv_header_errno_h_ENOLINK=hidden
8690 fi
8691 rm -f conftest*
8692
8693 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
8694 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
8695 #define _XOPEN_SOURCE_EXTENDED 1
8696 #include <errno.h>
8697 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8698 #include <stdio.h>
8699 #include <stdlib.h>
8700 "; then :
8701
8702 fi
8703
8704 fi
8705 fi
8706
8707 fi
8708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
8709 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
8710 case $gl_cv_header_errno_h_ENOLINK in
8711 yes | no)
8712 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
8713 ;;
8714 *)
8715 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
8716 ;;
8717 esac
8718
8719
8720 fi
8721
8722
8723 if test -n "$ERRNO_H"; then
8724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
8725 $as_echo_n "checking for EOVERFLOW value... " >&6; }
8726 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
8727 $as_echo_n "(cached) " >&6
8728 else
8729
8730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8731 /* end confdefs.h. */
8732
8733 #include <errno.h>
8734 #ifdef EOVERFLOW
8735 yes
8736 #endif
8737
8738 _ACEOF
8739 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8740 $EGREP "yes" >/dev/null 2>&1; then :
8741 gl_cv_header_errno_h_EOVERFLOW=yes
8742 else
8743 gl_cv_header_errno_h_EOVERFLOW=no
8744 fi
8745 rm -f conftest*
8746
8747 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
8748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8749 /* end confdefs.h. */
8750
8751 #define _XOPEN_SOURCE_EXTENDED 1
8752 #include <errno.h>
8753 #ifdef EOVERFLOW
8754 yes
8755 #endif
8756
8757 _ACEOF
8758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8759 $EGREP "yes" >/dev/null 2>&1; then :
8760 gl_cv_header_errno_h_EOVERFLOW=hidden
8761 fi
8762 rm -f conftest*
8763
8764 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
8765 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
8766 #define _XOPEN_SOURCE_EXTENDED 1
8767 #include <errno.h>
8768 /* The following two lines are a workaround against an autoconf-2.52 bug. */
8769 #include <stdio.h>
8770 #include <stdlib.h>
8771 "; then :
8772
8773 fi
8774
8775 fi
8776 fi
8777
8778 fi
8779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
8780 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
8781 case $gl_cv_header_errno_h_EOVERFLOW in
8782 yes | no)
8783 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
8784 ;;
8785 *)
8786 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
8787 ;;
8788 esac
8789
8790
8791 fi
8792
8793
8794 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8795 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8796 ac_have_decl=1
8797 else
8798 ac_have_decl=0
8799 fi
8800
8801 cat >>confdefs.h <<_ACEOF
8802 #define HAVE_DECL_STRERROR_R $ac_have_decl
8803 _ACEOF
8804
8805 for ac_func in strerror_r
8806 do :
8807 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8808 if test "x$ac_cv_func_strerror_r" = xyes; then :
8809 cat >>confdefs.h <<_ACEOF
8810 #define HAVE_STRERROR_R 1
8811 _ACEOF
8812
8813 fi
8814 done
8815
8816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8817 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
8818 if ${ac_cv_func_strerror_r_char_p+:} false; then :
8819 $as_echo_n "(cached) " >&6
8820 else
8821
8822 ac_cv_func_strerror_r_char_p=no
8823 if test $ac_cv_have_decl_strerror_r = yes; then
8824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8825 /* end confdefs.h. */
8826 $ac_includes_default
8827 int
8828 main ()
8829 {
8830
8831 char buf[100];
8832 char x = *strerror_r (0, buf, sizeof buf);
8833 char *p = strerror_r (0, buf, sizeof buf);
8834 return !p || x;
8835
8836 ;
8837 return 0;
8838 }
8839 _ACEOF
8840 if ac_fn_c_try_compile "$LINENO"; then :
8841 ac_cv_func_strerror_r_char_p=yes
8842 fi
8843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8844 else
8845 # strerror_r is not declared. Choose between
8846 # systems that have relatively inaccessible declarations for the
8847 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
8848 # former has a strerror_r that returns char*, while the latter
8849 # has a strerror_r that returns `int'.
8850 # This test should segfault on the DEC system.
8851 if test "$cross_compiling" = yes; then :
8852 :
8853 else
8854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8855 /* end confdefs.h. */
8856 $ac_includes_default
8857 extern char *strerror_r ();
8858 int
8859 main ()
8860 {
8861 char buf[100];
8862 char x = *strerror_r (0, buf, sizeof buf);
8863 return ! isalpha (x);
8864 ;
8865 return 0;
8866 }
8867 _ACEOF
8868 if ac_fn_c_try_run "$LINENO"; then :
8869 ac_cv_func_strerror_r_char_p=yes
8870 fi
8871 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8872 conftest.$ac_objext conftest.beam conftest.$ac_ext
8873 fi
8874
8875 fi
8876
8877 fi
8878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8879 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
8880 if test $ac_cv_func_strerror_r_char_p = yes; then
8881
8882 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8883
8884 fi
8885
8886
8887
8888
8889 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
8890 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
8891 ac_have_decl=1
8892 else
8893 ac_have_decl=0
8894 fi
8895
8896 cat >>confdefs.h <<_ACEOF
8897 #define HAVE_DECL_FCHDIR $ac_have_decl
8898 _ACEOF
8899
8900
8901 GNULIB_CREAT=0;
8902 GNULIB_FCNTL=0;
8903 GNULIB_NONBLOCKING=0;
8904 GNULIB_OPEN=0;
8905 GNULIB_OPENAT=0;
8906 GNULIB_MDA_CREAT=1;
8907 GNULIB_MDA_OPEN=1;
8908 HAVE_FCNTL=1;
8909 HAVE_OPENAT=1;
8910 REPLACE_CREAT=0;
8911 REPLACE_FCNTL=0;
8912 REPLACE_OPEN=0;
8913 REPLACE_OPENAT=0;
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
8925 $as_echo_n "checking for working fcntl.h... " >&6; }
8926 if ${gl_cv_header_working_fcntl_h+:} false; then :
8927 $as_echo_n "(cached) " >&6
8928 else
8929 if test "$cross_compiling" = yes; then :
8930 case "$host_os" in
8931 # Guess 'no' on native Windows.
8932 mingw*) gl_cv_header_working_fcntl_h='no' ;;
8933 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
8934 esac
8935
8936 else
8937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8938 /* end confdefs.h. */
8939 #include <sys/types.h>
8940 #include <sys/stat.h>
8941 #if HAVE_UNISTD_H
8942 # include <unistd.h>
8943 #else /* on Windows with MSVC */
8944 # include <io.h>
8945 # include <stdlib.h>
8946 # defined sleep(n) _sleep ((n) * 1000)
8947 #endif
8948 #include <fcntl.h>
8949
8950
8951 $gl_mda_defines
8952
8953 #ifndef O_NOATIME
8954 #define O_NOATIME 0
8955 #endif
8956 #ifndef O_NOFOLLOW
8957 #define O_NOFOLLOW 0
8958 #endif
8959 static int const constants[] =
8960 {
8961 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
8962 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
8963 };
8964
8965 int
8966 main ()
8967 {
8968
8969 int result = !constants;
8970 #if HAVE_SYMLINK
8971 {
8972 static char const sym[] = "conftest.sym";
8973 if (symlink ("/dev/null", sym) != 0)
8974 result |= 2;
8975 else
8976 {
8977 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
8978 if (fd >= 0)
8979 {
8980 close (fd);
8981 result |= 4;
8982 }
8983 }
8984 if (unlink (sym) != 0 || symlink (".", sym) != 0)
8985 result |= 2;
8986 else
8987 {
8988 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
8989 if (fd >= 0)
8990 {
8991 close (fd);
8992 result |= 4;
8993 }
8994 }
8995 unlink (sym);
8996 }
8997 #endif
8998 {
8999 static char const file[] = "confdefs.h";
9000 int fd = open (file, O_RDONLY | O_NOATIME);
9001 if (fd < 0)
9002 result |= 8;
9003 else
9004 {
9005 struct stat st0;
9006 if (fstat (fd, &st0) != 0)
9007 result |= 16;
9008 else
9009 {
9010 char c;
9011 sleep (1);
9012 if (read (fd, &c, 1) != 1)
9013 result |= 24;
9014 else
9015 {
9016 if (close (fd) != 0)
9017 result |= 32;
9018 else
9019 {
9020 struct stat st1;
9021 if (stat (file, &st1) != 0)
9022 result |= 40;
9023 else
9024 if (st0.st_atime != st1.st_atime)
9025 result |= 64;
9026 }
9027 }
9028 }
9029 }
9030 }
9031 return result;
9032 ;
9033 return 0;
9034 }
9035 _ACEOF
9036 if ac_fn_c_try_run "$LINENO"; then :
9037 gl_cv_header_working_fcntl_h=yes
9038 else
9039 case $? in #(
9040 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
9041 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
9042 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
9043 *) gl_cv_header_working_fcntl_h='no';;
9044 esac
9045 fi
9046 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9047 conftest.$ac_objext conftest.beam conftest.$ac_ext
9048 fi
9049
9050
9051 fi
9052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
9053 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
9054
9055 case $gl_cv_header_working_fcntl_h in #(
9056 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
9057 *) ac_val=1;;
9058 esac
9059
9060 cat >>confdefs.h <<_ACEOF
9061 #define HAVE_WORKING_O_NOATIME $ac_val
9062 _ACEOF
9063
9064
9065 case $gl_cv_header_working_fcntl_h in #(
9066 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
9067 *) ac_val=1;;
9068 esac
9069
9070 cat >>confdefs.h <<_ACEOF
9071 #define HAVE_WORKING_O_NOFOLLOW $ac_val
9072 _ACEOF
9073
9074
9075
9076 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
9077 "
9078 if test "x$ac_cv_type_pid_t" = xyes; then :
9079
9080 else
9081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9082 /* end confdefs.h. */
9083
9084 #if defined _WIN64 && !defined __CYGWIN__
9085 LLP64
9086 #endif
9087
9088 int
9089 main ()
9090 {
9091
9092 ;
9093 return 0;
9094 }
9095
9096 _ACEOF
9097 if ac_fn_c_try_compile "$LINENO"; then :
9098 gl_pid_type='int'
9099 else
9100 gl_pid_type='__int64'
9101 fi
9102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9103
9104 cat >>confdefs.h <<_ACEOF
9105 #define pid_t $gl_pid_type
9106 _ACEOF
9107
9108
9109 fi
9110
9111
9112 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
9113 if test "x$ac_cv_type_mode_t" = xyes; then :
9114
9115 else
9116
9117 cat >>confdefs.h <<_ACEOF
9118 #define mode_t int
9119 _ACEOF
9120
9121 fi
9122
9123
9124
9125
9126
9127
9128 GNULIB_FNMATCH=0;
9129 HAVE_FNMATCH=1;
9130 REPLACE_FNMATCH=0;
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147 if test $gl_cv_have_include_next = yes; then
9148 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
9149 else
9150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
9151 $as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
9152 if ${gl_cv_next_fnmatch_h+:} false; then :
9153 $as_echo_n "(cached) " >&6
9154 else
9155
9156 if test $ac_cv_header_fnmatch_h = yes; then
9157
9158
9159
9160
9161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9162 /* end confdefs.h. */
9163 #include <fnmatch.h>
9164 _ACEOF
9165 case "$host_os" in
9166 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9167 *) gl_absname_cpp="$ac_cpp" ;;
9168 esac
9169
9170 case "$host_os" in
9171 mingw*)
9172 gl_dirsep_regex='[/\\]'
9173 ;;
9174 *)
9175 gl_dirsep_regex='\/'
9176 ;;
9177 esac
9178 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9179 gl_header_literal_regex=`echo 'fnmatch.h' \
9180 | sed -e "$gl_make_literal_regex_sed"`
9181 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9182 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9183 s|^/[^/]|//&|
9184 p
9185 q
9186 }'
9187
9188 gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9189 sed -n "$gl_absolute_header_sed"`
9190
9191 gl_header=$gl_cv_absolute_fnmatch_h
9192 gl_cv_next_fnmatch_h='"'$gl_header'"'
9193 else
9194 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
9195 fi
9196
9197
9198 fi
9199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
9200 $as_echo "$gl_cv_next_fnmatch_h" >&6; }
9201 fi
9202 NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
9203
9204 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9205 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9206 gl_next_as_first_directive='<'fnmatch.h'>'
9207 else
9208 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9209 gl_next_as_first_directive=$gl_cv_next_fnmatch_h
9210 fi
9211 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
9212
9213
9214
9215
9216
9217
9218
9219 if test $ac_cv_header_fnmatch_h = yes; then
9220 HAVE_FNMATCH_H=1
9221 else
9222 HAVE_FNMATCH_H=0
9223 fi
9224
9225
9226 FNMATCH_H=''
9227 if false; then
9228 FNMATCH_H=fnmatch.h
9229 else
9230 if test $ac_cv_header_fnmatch_h != yes; then
9231 FNMATCH_H=fnmatch.h
9232 fi
9233 fi
9234
9235
9236 if test -n "$FNMATCH_H"; then
9237 GL_GENERATE_FNMATCH_H_TRUE=
9238 GL_GENERATE_FNMATCH_H_FALSE='#'
9239 else
9240 GL_GENERATE_FNMATCH_H_TRUE='#'
9241 GL_GENERATE_FNMATCH_H_FALSE=
9242 fi
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
9254 $as_echo_n "checking for mbstate_t... " >&6; }
9255 if ${ac_cv_type_mbstate_t+:} false; then :
9256 $as_echo_n "(cached) " >&6
9257 else
9258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9259 /* end confdefs.h. */
9260 $ac_includes_default
9261 #include <wchar.h>
9262 int
9263 main ()
9264 {
9265 mbstate_t x; return sizeof x;
9266 ;
9267 return 0;
9268 }
9269 _ACEOF
9270 if ac_fn_c_try_compile "$LINENO"; then :
9271 ac_cv_type_mbstate_t=yes
9272 else
9273 ac_cv_type_mbstate_t=no
9274 fi
9275 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9276 fi
9277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
9278 $as_echo "$ac_cv_type_mbstate_t" >&6; }
9279 if test $ac_cv_type_mbstate_t = yes; then
9280
9281 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
9282
9283 else
9284
9285 $as_echo "#define mbstate_t int" >>confdefs.h
9286
9287 fi
9288
9289
9290
9291
9292 GNULIB_ACOSF=0;
9293 GNULIB_ACOSL=0;
9294 GNULIB_ASINF=0;
9295 GNULIB_ASINL=0;
9296 GNULIB_ATANF=0;
9297 GNULIB_ATANL=0;
9298 GNULIB_ATAN2F=0;
9299 GNULIB_CBRT=0;
9300 GNULIB_CBRTF=0;
9301 GNULIB_CBRTL=0;
9302 GNULIB_CEIL=0;
9303 GNULIB_CEILF=0;
9304 GNULIB_CEILL=0;
9305 GNULIB_COPYSIGN=0;
9306 GNULIB_COPYSIGNF=0;
9307 GNULIB_COPYSIGNL=0;
9308 GNULIB_COSF=0;
9309 GNULIB_COSL=0;
9310 GNULIB_COSHF=0;
9311 GNULIB_EXPF=0;
9312 GNULIB_EXPL=0;
9313 GNULIB_EXP2=0;
9314 GNULIB_EXP2F=0;
9315 GNULIB_EXP2L=0;
9316 GNULIB_EXPM1=0;
9317 GNULIB_EXPM1F=0;
9318 GNULIB_EXPM1L=0;
9319 GNULIB_FABSF=0;
9320 GNULIB_FABSL=0;
9321 GNULIB_FLOOR=0;
9322 GNULIB_FLOORF=0;
9323 GNULIB_FLOORL=0;
9324 GNULIB_FMA=0;
9325 GNULIB_FMAF=0;
9326 GNULIB_FMAL=0;
9327 GNULIB_FMOD=0;
9328 GNULIB_FMODF=0;
9329 GNULIB_FMODL=0;
9330 GNULIB_FREXPF=0;
9331 GNULIB_FREXP=0;
9332 GNULIB_FREXPL=0;
9333 GNULIB_HYPOT=0;
9334 GNULIB_HYPOTF=0;
9335 GNULIB_HYPOTL=0;
9336 GNULIB_ILOGB=0;
9337 GNULIB_ILOGBF=0;
9338 GNULIB_ILOGBL=0;
9339 GNULIB_ISFINITE=0;
9340 GNULIB_ISINF=0;
9341 GNULIB_ISNAN=0;
9342 GNULIB_ISNANF=0;
9343 GNULIB_ISNAND=0;
9344 GNULIB_ISNANL=0;
9345 GNULIB_LDEXPF=0;
9346 GNULIB_LDEXPL=0;
9347 GNULIB_LOG=0;
9348 GNULIB_LOGF=0;
9349 GNULIB_LOGL=0;
9350 GNULIB_LOG10=0;
9351 GNULIB_LOG10F=0;
9352 GNULIB_LOG10L=0;
9353 GNULIB_LOG1P=0;
9354 GNULIB_LOG1PF=0;
9355 GNULIB_LOG1PL=0;
9356 GNULIB_LOG2=0;
9357 GNULIB_LOG2F=0;
9358 GNULIB_LOG2L=0;
9359 GNULIB_LOGB=0;
9360 GNULIB_LOGBF=0;
9361 GNULIB_LOGBL=0;
9362 GNULIB_MODF=0;
9363 GNULIB_MODFF=0;
9364 GNULIB_MODFL=0;
9365 GNULIB_POWF=0;
9366 GNULIB_REMAINDER=0;
9367 GNULIB_REMAINDERF=0;
9368 GNULIB_REMAINDERL=0;
9369 GNULIB_RINT=0;
9370 GNULIB_RINTF=0;
9371 GNULIB_RINTL=0;
9372 GNULIB_ROUND=0;
9373 GNULIB_ROUNDF=0;
9374 GNULIB_ROUNDL=0;
9375 GNULIB_SIGNBIT=0;
9376 GNULIB_SINF=0;
9377 GNULIB_SINL=0;
9378 GNULIB_SINHF=0;
9379 GNULIB_SQRTF=0;
9380 GNULIB_SQRTL=0;
9381 GNULIB_TANF=0;
9382 GNULIB_TANL=0;
9383 GNULIB_TANHF=0;
9384 GNULIB_TRUNC=0;
9385 GNULIB_TRUNCF=0;
9386 GNULIB_TRUNCL=0;
9387 GNULIB_MDA_J0=1;
9388 GNULIB_MDA_J1=1;
9389 GNULIB_MDA_JN=1;
9390 GNULIB_MDA_Y0=1;
9391 GNULIB_MDA_Y1=1;
9392 GNULIB_MDA_YN=1;
9393 HAVE_ACOSF=1;
9394 HAVE_ACOSL=1;
9395 HAVE_ASINF=1;
9396 HAVE_ASINL=1;
9397 HAVE_ATANF=1;
9398 HAVE_ATANL=1;
9399 HAVE_ATAN2F=1;
9400 HAVE_CBRT=1;
9401 HAVE_CBRTF=1;
9402 HAVE_CBRTL=1;
9403 HAVE_COPYSIGN=1;
9404 HAVE_COPYSIGNL=1;
9405 HAVE_COSF=1;
9406 HAVE_COSL=1;
9407 HAVE_COSHF=1;
9408 HAVE_EXPF=1;
9409 HAVE_EXPL=1;
9410 HAVE_EXPM1=1;
9411 HAVE_EXPM1F=1;
9412 HAVE_FABSF=1;
9413 HAVE_FABSL=1;
9414 HAVE_FMA=1;
9415 HAVE_FMAF=1;
9416 HAVE_FMAL=1;
9417 HAVE_FMODF=1;
9418 HAVE_FMODL=1;
9419 HAVE_FREXPF=1;
9420 HAVE_HYPOTF=1;
9421 HAVE_HYPOTL=1;
9422 HAVE_ILOGB=1;
9423 HAVE_ILOGBF=1;
9424 HAVE_ILOGBL=1;
9425 HAVE_ISNANF=1;
9426 HAVE_ISNAND=1;
9427 HAVE_ISNANL=1;
9428 HAVE_LDEXPF=1;
9429 HAVE_LOGF=1;
9430 HAVE_LOGL=1;
9431 HAVE_LOG10F=1;
9432 HAVE_LOG10L=1;
9433 HAVE_LOG1P=1;
9434 HAVE_LOG1PF=1;
9435 HAVE_LOG1PL=1;
9436 HAVE_LOGBF=1;
9437 HAVE_LOGBL=1;
9438 HAVE_MODFF=1;
9439 HAVE_MODFL=1;
9440 HAVE_POWF=1;
9441 HAVE_REMAINDER=1;
9442 HAVE_REMAINDERF=1;
9443 HAVE_RINT=1;
9444 HAVE_RINTL=1;
9445 HAVE_SINF=1;
9446 HAVE_SINL=1;
9447 HAVE_SINHF=1;
9448 HAVE_SQRTF=1;
9449 HAVE_SQRTL=1;
9450 HAVE_TANF=1;
9451 HAVE_TANL=1;
9452 HAVE_TANHF=1;
9453 HAVE_DECL_ACOSL=1;
9454 HAVE_DECL_ASINL=1;
9455 HAVE_DECL_ATANL=1;
9456 HAVE_DECL_CBRTF=1;
9457 HAVE_DECL_CBRTL=1;
9458 HAVE_DECL_CEILF=1;
9459 HAVE_DECL_CEILL=1;
9460 HAVE_DECL_COPYSIGNF=1;
9461 HAVE_DECL_COSL=1;
9462 HAVE_DECL_EXPL=1;
9463 HAVE_DECL_EXP2=1;
9464 HAVE_DECL_EXP2F=1;
9465 HAVE_DECL_EXP2L=1;
9466 HAVE_DECL_EXPM1L=1;
9467 HAVE_DECL_FLOORF=1;
9468 HAVE_DECL_FLOORL=1;
9469 HAVE_DECL_FREXPL=1;
9470 HAVE_DECL_LDEXPL=1;
9471 HAVE_DECL_LOGL=1;
9472 HAVE_DECL_LOG10L=1;
9473 HAVE_DECL_LOG2=1;
9474 HAVE_DECL_LOG2F=1;
9475 HAVE_DECL_LOG2L=1;
9476 HAVE_DECL_LOGB=1;
9477 HAVE_DECL_REMAINDER=1;
9478 HAVE_DECL_REMAINDERL=1;
9479 HAVE_DECL_RINTF=1;
9480 HAVE_DECL_ROUND=1;
9481 HAVE_DECL_ROUNDF=1;
9482 HAVE_DECL_ROUNDL=1;
9483 HAVE_DECL_SINL=1;
9484 HAVE_DECL_SQRTL=1;
9485 HAVE_DECL_TANL=1;
9486 HAVE_DECL_TRUNC=1;
9487 HAVE_DECL_TRUNCF=1;
9488 HAVE_DECL_TRUNCL=1;
9489 REPLACE_ACOSF=0;
9490 REPLACE_ASINF=0;
9491 REPLACE_ATANF=0;
9492 REPLACE_ATAN2F=0;
9493 REPLACE_CBRTF=0;
9494 REPLACE_CBRTL=0;
9495 REPLACE_CEIL=0;
9496 REPLACE_CEILF=0;
9497 REPLACE_CEILL=0;
9498 REPLACE_COSF=0;
9499 REPLACE_COSHF=0;
9500 REPLACE_EXPF=0;
9501 REPLACE_EXPL=0;
9502 REPLACE_EXPM1=0;
9503 REPLACE_EXPM1F=0;
9504 REPLACE_EXPM1L=0;
9505 REPLACE_EXP2=0;
9506 REPLACE_EXP2L=0;
9507 REPLACE_FABSL=0;
9508 REPLACE_FLOOR=0;
9509 REPLACE_FLOORF=0;
9510 REPLACE_FLOORL=0;
9511 REPLACE_FMA=0;
9512 REPLACE_FMAF=0;
9513 REPLACE_FMAL=0;
9514 REPLACE_FMOD=0;
9515 REPLACE_FMODF=0;
9516 REPLACE_FMODL=0;
9517 REPLACE_FREXPF=0;
9518 REPLACE_FREXP=0;
9519 REPLACE_FREXPL=0;
9520 REPLACE_HUGE_VAL=0;
9521 REPLACE_HYPOT=0;
9522 REPLACE_HYPOTF=0;
9523 REPLACE_HYPOTL=0;
9524 REPLACE_ILOGB=0;
9525 REPLACE_ILOGBF=0;
9526 REPLACE_ILOGBL=0;
9527 REPLACE_ISFINITE=0;
9528 REPLACE_ISINF=0;
9529 REPLACE_ISNAN=0;
9530 REPLACE_LDEXPL=0;
9531 REPLACE_LOG=0;
9532 REPLACE_LOGF=0;
9533 REPLACE_LOGL=0;
9534 REPLACE_LOG10=0;
9535 REPLACE_LOG10F=0;
9536 REPLACE_LOG10L=0;
9537 REPLACE_LOG1P=0;
9538 REPLACE_LOG1PF=0;
9539 REPLACE_LOG1PL=0;
9540 REPLACE_LOG2=0;
9541 REPLACE_LOG2F=0;
9542 REPLACE_LOG2L=0;
9543 REPLACE_LOGB=0;
9544 REPLACE_LOGBF=0;
9545 REPLACE_LOGBL=0;
9546 REPLACE_MODF=0;
9547 REPLACE_MODFF=0;
9548 REPLACE_MODFL=0;
9549 REPLACE_NAN=0;
9550 REPLACE_REMAINDER=0;
9551 REPLACE_REMAINDERF=0;
9552 REPLACE_REMAINDERL=0;
9553 REPLACE_RINTL=0;
9554 REPLACE_ROUND=0;
9555 REPLACE_ROUNDF=0;
9556 REPLACE_ROUNDL=0;
9557 REPLACE_SIGNBIT=0;
9558 REPLACE_SIGNBIT_USING_BUILTINS=0;
9559 REPLACE_SINF=0;
9560 REPLACE_SINHF=0;
9561 REPLACE_SQRTF=0;
9562 REPLACE_SQRTL=0;
9563 REPLACE_TANF=0;
9564 REPLACE_TANHF=0;
9565 REPLACE_TRUNC=0;
9566 REPLACE_TRUNCF=0;
9567 REPLACE_TRUNCL=0;
9568
9569
9570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
9571 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
9572 if ${gl_cv_func_frexp_no_libm+:} false; then :
9573 $as_echo_n "(cached) " >&6
9574 else
9575
9576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9577 /* end confdefs.h. */
9578 #include <math.h>
9579 double x;
9580 int
9581 main ()
9582 {
9583 int e; return frexp (x, &e) > 0;
9584 ;
9585 return 0;
9586 }
9587 _ACEOF
9588 if ac_fn_c_try_link "$LINENO"; then :
9589 gl_cv_func_frexp_no_libm=yes
9590 else
9591 gl_cv_func_frexp_no_libm=no
9592 fi
9593 rm -f core conftest.err conftest.$ac_objext \
9594 conftest$ac_exeext conftest.$ac_ext
9595
9596 fi
9597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
9598 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
9599
9600 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
9601 if test "x$ac_cv_have_decl_alarm" = xyes; then :
9602 ac_have_decl=1
9603 else
9604 ac_have_decl=0
9605 fi
9606
9607 cat >>confdefs.h <<_ACEOF
9608 #define HAVE_DECL_ALARM $ac_have_decl
9609 _ACEOF
9610
9611
9612
9613
9614 FREXP_LIBM=
9615 if test $gl_cv_func_frexp_no_libm = no; then
9616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
9617 $as_echo_n "checking whether frexp() can be used with libm... " >&6; }
9618 if ${gl_cv_func_frexp_in_libm+:} false; then :
9619 $as_echo_n "(cached) " >&6
9620 else
9621
9622 save_LIBS="$LIBS"
9623 LIBS="$LIBS -lm"
9624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9625 /* end confdefs.h. */
9626 #include <math.h>
9627 double x;
9628 int
9629 main ()
9630 {
9631 int e; return frexp (x, &e) > 0;
9632 ;
9633 return 0;
9634 }
9635 _ACEOF
9636 if ac_fn_c_try_link "$LINENO"; then :
9637 gl_cv_func_frexp_in_libm=yes
9638 else
9639 gl_cv_func_frexp_in_libm=no
9640 fi
9641 rm -f core conftest.err conftest.$ac_objext \
9642 conftest$ac_exeext conftest.$ac_ext
9643 LIBS="$save_LIBS"
9644
9645 fi
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
9647 $as_echo "$gl_cv_func_frexp_in_libm" >&6; }
9648 if test $gl_cv_func_frexp_in_libm = yes; then
9649 FREXP_LIBM=-lm
9650 fi
9651 fi
9652 if test $gl_cv_func_frexp_no_libm = yes \
9653 || test $gl_cv_func_frexp_in_libm = yes; then
9654 save_LIBS="$LIBS"
9655 LIBS="$LIBS $FREXP_LIBM"
9656
9657
9658
9659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
9660 $as_echo_n "checking whether frexp works... " >&6; }
9661 if ${gl_cv_func_frexp_works+:} false; then :
9662 $as_echo_n "(cached) " >&6
9663 else
9664
9665 if test "$cross_compiling" = yes; then :
9666 case "$host_os" in
9667 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
9668 mingw*) # Guess yes with MSVC, no with mingw.
9669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9670 /* end confdefs.h. */
9671
9672 #ifdef _MSC_VER
9673 Good
9674 #endif
9675
9676 _ACEOF
9677 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9678 $EGREP "Good" >/dev/null 2>&1; then :
9679 gl_cv_func_frexp_works="guessing yes"
9680 else
9681 gl_cv_func_frexp_works="guessing no"
9682 fi
9683 rm -f conftest*
9684
9685 ;;
9686 *) gl_cv_func_frexp_works="guessing yes" ;;
9687 esac
9688
9689 else
9690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9691 /* end confdefs.h. */
9692
9693 #include <float.h>
9694 #include <math.h>
9695 #include <string.h>
9696 #if HAVE_DECL_ALARM
9697 # include <signal.h>
9698 # include <unistd.h>
9699 #endif
9700 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
9701 ICC 10.0 has a bug when optimizing the expression -zero.
9702 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
9703 to PowerPC on Mac OS X 10.5. */
9704 #if defined __hpux || defined __sgi || defined __ICC
9705 static double
9706 compute_minus_zero (void)
9707 {
9708 return -DBL_MIN * DBL_MIN;
9709 }
9710 # define minus_zero compute_minus_zero ()
9711 #else
9712 double minus_zero = -0.0;
9713 #endif
9714 int main()
9715 {
9716 int result = 0;
9717 int i;
9718 volatile double x;
9719 double zero = 0.0;
9720 #if HAVE_DECL_ALARM
9721 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
9722 number. Let the test fail in this case. */
9723 signal (SIGALRM, SIG_DFL);
9724 alarm (5);
9725 #endif
9726 /* Test on denormalized numbers. */
9727 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
9728 ;
9729 if (x > 0.0)
9730 {
9731 int exp;
9732 double y = frexp (x, &exp);
9733 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
9734 On NetBSD: y = 0.75. Correct: y = 0.5. */
9735 if (y != 0.5)
9736 result |= 1;
9737 }
9738 /* Test on infinite numbers. */
9739 x = 1.0 / zero;
9740 {
9741 int exp;
9742 double y = frexp (x, &exp);
9743 if (y != x)
9744 result |= 2;
9745 }
9746 /* Test on negative zero. */
9747 x = minus_zero;
9748 {
9749 int exp;
9750 double y = frexp (x, &exp);
9751 if (memcmp (&y, &x, sizeof x))
9752 result |= 4;
9753 }
9754 return result;
9755 }
9756 _ACEOF
9757 if ac_fn_c_try_run "$LINENO"; then :
9758 gl_cv_func_frexp_works=yes
9759 else
9760 gl_cv_func_frexp_works=no
9761 fi
9762 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9763 conftest.$ac_objext conftest.beam conftest.$ac_ext
9764 fi
9765
9766
9767 fi
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
9769 $as_echo "$gl_cv_func_frexp_works" >&6; }
9770
9771 LIBS="$save_LIBS"
9772 case "$gl_cv_func_frexp_works" in
9773 *yes) gl_func_frexp=yes ;;
9774 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
9775 esac
9776 else
9777 gl_func_frexp=no
9778 fi
9779 if test $gl_func_frexp = yes; then
9780
9781 $as_echo "#define HAVE_FREXP 1" >>confdefs.h
9782
9783 fi
9784
9785
9786
9787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
9788 $as_echo_n "checking whether long double and double are the same... " >&6; }
9789 if ${gl_cv_long_double_equals_double+:} false; then :
9790 $as_echo_n "(cached) " >&6
9791 else
9792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9793 /* end confdefs.h. */
9794 #include <float.h>
9795 int
9796 main ()
9797 {
9798 typedef int check[sizeof (long double) == sizeof (double)
9799 && LDBL_MANT_DIG == DBL_MANT_DIG
9800 && LDBL_MAX_EXP == DBL_MAX_EXP
9801 && LDBL_MIN_EXP == DBL_MIN_EXP
9802 ? 1 : -1];
9803
9804 ;
9805 return 0;
9806 }
9807 _ACEOF
9808 if ac_fn_c_try_compile "$LINENO"; then :
9809 gl_cv_long_double_equals_double=yes
9810 else
9811 gl_cv_long_double_equals_double=no
9812 fi
9813 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9814
9815 fi
9816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
9817 $as_echo "$gl_cv_long_double_equals_double" >&6; }
9818 if test $gl_cv_long_double_equals_double = yes; then
9819
9820 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
9821
9822 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
9823 else
9824 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
9825 fi
9826
9827
9828
9829
9830
9831
9832
9833
9834 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
9835 "
9836 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
9837
9838 else
9839 HAVE_DECL_FREXPL=0
9840 fi
9841
9842
9843 FREXPL_LIBM=
9844 if test $HAVE_DECL_FREXPL = 1; then
9845
9846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
9847 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
9848 if ${gl_cv_func_frexpl_no_libm+:} false; then :
9849 $as_echo_n "(cached) " >&6
9850 else
9851
9852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9853 /* end confdefs.h. */
9854 #include <math.h>
9855 long double x;
9856 int
9857 main ()
9858 {
9859 int e; return frexpl (x, &e) > 0;
9860 ;
9861 return 0;
9862 }
9863 _ACEOF
9864 if ac_fn_c_try_link "$LINENO"; then :
9865 gl_cv_func_frexpl_no_libm=yes
9866 else
9867 gl_cv_func_frexpl_no_libm=no
9868 fi
9869 rm -f core conftest.err conftest.$ac_objext \
9870 conftest$ac_exeext conftest.$ac_ext
9871
9872 fi
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
9874 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
9875
9876 if test $gl_cv_func_frexpl_no_libm = no; then
9877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
9878 $as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
9879 if ${gl_cv_func_frexpl_in_libm+:} false; then :
9880 $as_echo_n "(cached) " >&6
9881 else
9882
9883 save_LIBS="$LIBS"
9884 LIBS="$LIBS -lm"
9885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9886 /* end confdefs.h. */
9887 #include <math.h>
9888 long double x;
9889 int
9890 main ()
9891 {
9892 int e; return frexpl (x, &e) > 0;
9893 ;
9894 return 0;
9895 }
9896 _ACEOF
9897 if ac_fn_c_try_link "$LINENO"; then :
9898 gl_cv_func_frexpl_in_libm=yes
9899 else
9900 gl_cv_func_frexpl_in_libm=no
9901 fi
9902 rm -f core conftest.err conftest.$ac_objext \
9903 conftest$ac_exeext conftest.$ac_ext
9904 LIBS="$save_LIBS"
9905
9906 fi
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
9908 $as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
9909 if test $gl_cv_func_frexpl_in_libm = yes; then
9910 FREXPL_LIBM=-lm
9911 fi
9912 fi
9913 if test $gl_cv_func_frexpl_no_libm = yes \
9914 || test $gl_cv_func_frexpl_in_libm = yes; then
9915 save_LIBS="$LIBS"
9916 LIBS="$LIBS $FREXPL_LIBM"
9917
9918
9919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
9920 $as_echo_n "checking whether frexpl works... " >&6; }
9921 if ${gl_cv_func_frexpl_works+:} false; then :
9922 $as_echo_n "(cached) " >&6
9923 else
9924
9925 if test "$cross_compiling" = yes; then :
9926
9927 case "$host_os" in
9928 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
9929 gl_cv_func_frexpl_works="guessing no";;
9930 *) gl_cv_func_frexpl_works="guessing yes";;
9931 esac
9932
9933 else
9934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9935 /* end confdefs.h. */
9936
9937 #include <float.h>
9938 #include <math.h>
9939 /* Override the values of <float.h>, like done in float.in.h. */
9940 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
9941 # undef LDBL_MIN_EXP
9942 # define LDBL_MIN_EXP (-16381)
9943 #endif
9944 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
9945 # undef LDBL_MIN_EXP
9946 # define LDBL_MIN_EXP (-16381)
9947 #endif
9948 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
9949 # undef LDBL_MIN_EXP
9950 # define LDBL_MIN_EXP DBL_MIN_EXP
9951 #endif
9952 #if defined __sgi && (LDBL_MANT_DIG >= 106)
9953 # if defined __GNUC__
9954 # undef LDBL_MIN_EXP
9955 # define LDBL_MIN_EXP DBL_MIN_EXP
9956 # endif
9957 #endif
9958 extern
9959 #ifdef __cplusplus
9960 "C"
9961 #endif
9962 long double frexpl (long double, int *);
9963 long double zero = 0.0L;
9964 int main()
9965 {
9966 int result = 0;
9967 volatile long double x;
9968 /* Test on finite numbers that fails on AIX 5.1. */
9969 x = 16.0L;
9970 {
9971 int exp = -9999;
9972 frexpl (x, &exp);
9973 if (exp != 5)
9974 result |= 1;
9975 }
9976 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
9977 function returns an invalid (incorrectly normalized) value: it returns
9978 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
9979 but the correct result is
9980 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
9981 x = 1.01L;
9982 {
9983 int exp = -9999;
9984 long double y = frexpl (x, &exp);
9985 if (!(exp == 1 && y == 0.505L))
9986 result |= 2;
9987 }
9988 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
9989 LDBL_MAX_EXP = 16384.
9990 In the loop end test, we test x against Infinity, rather than comparing
9991 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
9992 {
9993 int i;
9994 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
9995 {
9996 int exp = -9999;
9997 frexpl (x, &exp);
9998 if (exp != i)
9999 {
10000 result |= 4;
10001 break;
10002 }
10003 }
10004 }
10005 /* Test on denormalized numbers. */
10006 {
10007 int i;
10008 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
10009 ;
10010 if (x > 0.0L)
10011 {
10012 int exp;
10013 long double y = frexpl (x, &exp);
10014 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
10015 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
10016 if (exp != LDBL_MIN_EXP - 1)
10017 result |= 8;
10018 }
10019 }
10020 /* Test on infinite numbers. */
10021 /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0. */
10022 x = 1.0L / zero;
10023 {
10024 int exp;
10025 long double y = frexpl (x, &exp);
10026 if (y != x)
10027 result |= 16;
10028 }
10029 return result;
10030 }
10031 _ACEOF
10032 if ac_fn_c_try_run "$LINENO"; then :
10033 gl_cv_func_frexpl_works=yes
10034 else
10035 gl_cv_func_frexpl_works=no
10036 fi
10037 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10038 conftest.$ac_objext conftest.beam conftest.$ac_ext
10039 fi
10040
10041
10042 fi
10043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
10044 $as_echo "$gl_cv_func_frexpl_works" >&6; }
10045
10046 LIBS="$save_LIBS"
10047 case "$gl_cv_func_frexpl_works" in
10048 *yes) gl_func_frexpl=yes ;;
10049 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
10050 esac
10051 else
10052 gl_func_frexpl=no
10053 fi
10054 if test $gl_func_frexpl = yes; then
10055
10056 $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
10057
10058 fi
10059 fi
10060 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
10061 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
10062
10063 FREXPL_LIBM="$FREXP_LIBM"
10064 else
10065 FREXPL_LIBM=
10066 fi
10067 fi
10068
10069
10070
10071 GNULIB_FCHMODAT=0;
10072 GNULIB_FSTAT=0;
10073 GNULIB_FSTATAT=0;
10074 GNULIB_FUTIMENS=0;
10075 GNULIB_GETUMASK=0;
10076 GNULIB_LCHMOD=0;
10077 GNULIB_LSTAT=0;
10078 GNULIB_MKDIR=0;
10079 GNULIB_MKDIRAT=0;
10080 GNULIB_MKFIFO=0;
10081 GNULIB_MKFIFOAT=0;
10082 GNULIB_MKNOD=0;
10083 GNULIB_MKNODAT=0;
10084 GNULIB_STAT=0;
10085 GNULIB_UTIMENSAT=0;
10086 GNULIB_OVERRIDES_STRUCT_STAT=0;
10087 GNULIB_MDA_CHMOD=1;
10088 GNULIB_MDA_MKDIR=1;
10089 GNULIB_MDA_UMASK=1;
10090 HAVE_FCHMODAT=1;
10091 HAVE_FSTATAT=1;
10092 HAVE_FUTIMENS=1;
10093 HAVE_GETUMASK=1;
10094 HAVE_LCHMOD=1;
10095 HAVE_LSTAT=1;
10096 HAVE_MKDIRAT=1;
10097 HAVE_MKFIFO=1;
10098 HAVE_MKFIFOAT=1;
10099 HAVE_MKNOD=1;
10100 HAVE_MKNODAT=1;
10101 HAVE_UTIMENSAT=1;
10102 REPLACE_FCHMODAT=0;
10103 REPLACE_FSTAT=0;
10104 REPLACE_FSTATAT=0;
10105 REPLACE_FUTIMENS=0;
10106 REPLACE_LSTAT=0;
10107 REPLACE_MKDIR=0;
10108 REPLACE_MKFIFO=0;
10109 REPLACE_MKFIFOAT=0;
10110 REPLACE_MKNOD=0;
10111 REPLACE_MKNODAT=0;
10112 REPLACE_STAT=0;
10113 REPLACE_UTIMENSAT=0;
10114
10115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
10116 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
10117 if ${ac_cv_header_stat_broken+:} false; then :
10118 $as_echo_n "(cached) " >&6
10119 else
10120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10121 /* end confdefs.h. */
10122 #include <sys/types.h>
10123 #include <sys/stat.h>
10124
10125 #if defined S_ISBLK && defined S_IFDIR
10126 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
10127 #endif
10128
10129 #if defined S_ISBLK && defined S_IFCHR
10130 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
10131 #endif
10132
10133 #if defined S_ISLNK && defined S_IFREG
10134 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
10135 #endif
10136
10137 #if defined S_ISSOCK && defined S_IFREG
10138 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
10139 #endif
10140
10141 _ACEOF
10142 if ac_fn_c_try_compile "$LINENO"; then :
10143 ac_cv_header_stat_broken=no
10144 else
10145 ac_cv_header_stat_broken=yes
10146 fi
10147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10148 fi
10149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
10150 $as_echo "$ac_cv_header_stat_broken" >&6; }
10151 if test $ac_cv_header_stat_broken = yes; then
10152
10153 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
10154
10155 fi
10156
10157
10158
10159
10160
10161 case "$host_os" in
10162 mingw*)
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10164 $as_echo_n "checking for 64-bit off_t... " >&6; }
10165 if ${gl_cv_type_off_t_64+:} false; then :
10166 $as_echo_n "(cached) " >&6
10167 else
10168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10169 /* end confdefs.h. */
10170 #include <sys/types.h>
10171 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10172
10173 int
10174 main ()
10175 {
10176
10177 ;
10178 return 0;
10179 }
10180 _ACEOF
10181 if ac_fn_c_try_compile "$LINENO"; then :
10182 gl_cv_type_off_t_64=yes
10183 else
10184 gl_cv_type_off_t_64=no
10185 fi
10186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10187
10188 fi
10189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10190 $as_echo "$gl_cv_type_off_t_64" >&6; }
10191 if test $gl_cv_type_off_t_64 = no; then
10192 WINDOWS_64_BIT_OFF_T=1
10193 else
10194 WINDOWS_64_BIT_OFF_T=0
10195 fi
10196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
10197 $as_echo_n "checking for 64-bit st_size... " >&6; }
10198 if ${gl_cv_member_st_size_64+:} false; then :
10199 $as_echo_n "(cached) " >&6
10200 else
10201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10202 /* end confdefs.h. */
10203 #include <sys/types.h>
10204 struct stat buf;
10205 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
10206
10207 int
10208 main ()
10209 {
10210
10211 ;
10212 return 0;
10213 }
10214 _ACEOF
10215 if ac_fn_c_try_compile "$LINENO"; then :
10216 gl_cv_member_st_size_64=yes
10217 else
10218 gl_cv_member_st_size_64=no
10219 fi
10220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10221
10222 fi
10223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
10224 $as_echo "$gl_cv_member_st_size_64" >&6; }
10225 if test $gl_cv_member_st_size_64 = no; then
10226 WINDOWS_64_BIT_ST_SIZE=1
10227 else
10228 WINDOWS_64_BIT_ST_SIZE=0
10229 fi
10230 ;;
10231 *)
10232 WINDOWS_64_BIT_OFF_T=0
10233 WINDOWS_64_BIT_ST_SIZE=0
10234 ;;
10235 esac
10236
10237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10238 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
10239 if ${ac_cv_c_restrict+:} false; then :
10240 $as_echo_n "(cached) " >&6
10241 else
10242 ac_cv_c_restrict=no
10243 # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
10244 # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
10245 # Put 'restrict' last, because C++ lacks it.
10246 for ac_kw in __restrict__ __restrict _Restrict restrict; do
10247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10248 /* end confdefs.h. */
10249 typedef int *int_ptr;
10250 int foo (int_ptr $ac_kw ip) { return ip[0]; }
10251 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
10252 int bar (int ip[$ac_kw]) { return ip[0]; }
10253
10254 int
10255 main ()
10256 {
10257 int s[1];
10258 int *$ac_kw t = s;
10259 t[0] = 0;
10260 return foo (t) + bar (t);
10261
10262 ;
10263 return 0;
10264 }
10265 _ACEOF
10266 if ac_fn_c_try_compile "$LINENO"; then :
10267 ac_cv_c_restrict=$ac_kw
10268 fi
10269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10270 test "$ac_cv_c_restrict" != no && break
10271 done
10272
10273 fi
10274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
10275 $as_echo "$ac_cv_c_restrict" >&6; }
10276
10277 case $ac_cv_c_restrict in
10278 restrict) ;;
10279 no) $as_echo "#define restrict /**/" >>confdefs.h
10280 ;;
10281 *) cat >>confdefs.h <<_ACEOF
10282 #define restrict $ac_cv_c_restrict
10283 _ACEOF
10284 ;;
10285 esac
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301 if test $gl_cv_have_include_next = yes; then
10302 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10303 else
10304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
10305 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
10306 if ${gl_cv_next_sys_stat_h+:} false; then :
10307 $as_echo_n "(cached) " >&6
10308 else
10309
10310 if test $ac_cv_header_sys_stat_h = yes; then
10311
10312
10313
10314
10315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10316 /* end confdefs.h. */
10317 #include <sys/stat.h>
10318 _ACEOF
10319 case "$host_os" in
10320 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10321 *) gl_absname_cpp="$ac_cpp" ;;
10322 esac
10323
10324 case "$host_os" in
10325 mingw*)
10326 gl_dirsep_regex='[/\\]'
10327 ;;
10328 *)
10329 gl_dirsep_regex='\/'
10330 ;;
10331 esac
10332 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10333 gl_header_literal_regex=`echo 'sys/stat.h' \
10334 | sed -e "$gl_make_literal_regex_sed"`
10335 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10336 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10337 s|^/[^/]|//&|
10338 p
10339 q
10340 }'
10341
10342 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10343 sed -n "$gl_absolute_header_sed"`
10344
10345 gl_header=$gl_cv_absolute_sys_stat_h
10346 gl_cv_next_sys_stat_h='"'$gl_header'"'
10347 else
10348 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10349 fi
10350
10351
10352 fi
10353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
10354 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
10355 fi
10356 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
10357
10358 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10359 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10360 gl_next_as_first_directive='<'sys/stat.h'>'
10361 else
10362 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10363 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
10364 fi
10365 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
10366
10367
10368
10369
10370
10371
10372
10373
10374 WINDOWS_STAT_TIMESPEC=0
10375
10376
10377
10378
10379
10380
10381
10382
10383 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
10384 #include <sys/stat.h>
10385 "
10386 if test "x$ac_cv_type_nlink_t" = xyes; then :
10387
10388 else
10389
10390 $as_echo "#define nlink_t int" >>confdefs.h
10391
10392 fi
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403 case "$host_os" in
10404 mingw*)
10405 for ac_header in sdkddkver.h
10406 do :
10407 ac_fn_c_check_header_mongrel "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
10408 if test "x$ac_cv_header_sdkddkver_h" = xyes; then :
10409 cat >>confdefs.h <<_ACEOF
10410 #define HAVE_SDKDDKVER_H 1
10411 _ACEOF
10412
10413 fi
10414
10415 done
10416
10417 ;;
10418 esac
10419
10420
10421
10422
10423
10424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
10425 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
10426 if ${gl_cv_func_getcwd_null+:} false; then :
10427 $as_echo_n "(cached) " >&6
10428 else
10429 if test "$cross_compiling" = yes; then :
10430 case "$host_os" in
10431 # Guess yes on glibc systems.
10432 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
10433 # Guess yes on musl systems.
10434 *-musl*) gl_cv_func_getcwd_null="guessing yes";;
10435 # Guess yes on Cygwin.
10436 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
10437 # If we don't know, obey --enable-cross-guesses.
10438 *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
10439 esac
10440
10441 else
10442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10443 /* end confdefs.h. */
10444
10445 # include <stdlib.h>
10446 # if HAVE_UNISTD_H
10447 # include <unistd.h>
10448 # else /* on Windows with MSVC */
10449 # include <direct.h>
10450 # endif
10451
10452
10453 $gl_mda_defines
10454
10455 # ifndef getcwd
10456 char *getcwd ();
10457 # endif
10458
10459 int
10460 main ()
10461 {
10462
10463 #if defined _WIN32 && ! defined __CYGWIN__
10464 /* mingw cwd does not start with '/', but _getcwd does allocate.
10465 However, mingw fails to honor non-zero size. */
10466 #else
10467 if (chdir ("/") != 0)
10468 return 1;
10469 else
10470 {
10471 char *f = getcwd (NULL, 0);
10472 if (! f)
10473 return 2;
10474 if (f[0] != '/')
10475 { free (f); return 3; }
10476 if (f[1] != '\0')
10477 { free (f); return 4; }
10478 free (f);
10479 return 0;
10480 }
10481 #endif
10482
10483 ;
10484 return 0;
10485 }
10486 _ACEOF
10487 if ac_fn_c_try_run "$LINENO"; then :
10488 gl_cv_func_getcwd_null=yes
10489 else
10490 gl_cv_func_getcwd_null=no
10491 fi
10492 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10493 conftest.$ac_objext conftest.beam conftest.$ac_ext
10494 fi
10495
10496 fi
10497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
10498 $as_echo "$gl_cv_func_getcwd_null" >&6; }
10499
10500
10501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
10502 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
10503 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
10504 $as_echo_n "(cached) " >&6
10505 else
10506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10507 /* end confdefs.h. */
10508 #include <unistd.h>
10509
10510
10511 $gl_mda_defines
10512
10513 int
10514 main ()
10515 {
10516 extern
10517 #ifdef __cplusplus
10518 "C"
10519 #endif
10520 char *getcwd (char *, size_t);
10521
10522 ;
10523 return 0;
10524 }
10525
10526 _ACEOF
10527 if ac_fn_c_try_compile "$LINENO"; then :
10528 gl_cv_func_getcwd_posix_signature=yes
10529 else
10530 gl_cv_func_getcwd_posix_signature=no
10531 fi
10532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10533
10534 fi
10535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
10536 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
10537
10538 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
10539 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
10540 ac_have_decl=1
10541 else
10542 ac_have_decl=0
10543 fi
10544
10545 cat >>confdefs.h <<_ACEOF
10546 #define HAVE_DECL_GETCWD $ac_have_decl
10547 _ACEOF
10548
10549
10550
10551 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
10552 if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
10553 ac_have_decl=1
10554 else
10555 ac_have_decl=0
10556 fi
10557
10558 cat >>confdefs.h <<_ACEOF
10559 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
10560 _ACEOF
10561
10562 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
10563 if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
10564 ac_have_decl=1
10565 else
10566 ac_have_decl=0
10567 fi
10568
10569 cat >>confdefs.h <<_ACEOF
10570 #define HAVE_DECL_GETLOGIN_R $ac_have_decl
10571 _ACEOF
10572
10573
10574
10575 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
10576 if test "x$ac_cv_have_decl_getlogin" = xyes; then :
10577 ac_have_decl=1
10578 else
10579 ac_have_decl=0
10580 fi
10581
10582 cat >>confdefs.h <<_ACEOF
10583 #define HAVE_DECL_GETLOGIN $ac_have_decl
10584 _ACEOF
10585
10586
10587
10588 case $host_os in
10589 mingw*)
10590 LIB_GETLOGIN='-ladvapi32' ;;
10591 *)
10592 LIB_GETLOGIN= ;;
10593 esac
10594
10595
10596
10597
10598
10599
10600
10601 GNULIB_GETRANDOM=0;
10602 HAVE_GETRANDOM=1;
10603 REPLACE_GETRANDOM=0;
10604
10605
10606
10607
10608 GNULIB_GETTIMEOFDAY=0;
10609 HAVE_GETTIMEOFDAY=1;
10610 HAVE_STRUCT_TIMEVAL=1;
10611 HAVE_SYS_TIME_H=1;
10612 REPLACE_GETTIMEOFDAY=0;
10613 REPLACE_STRUCT_TIMEVAL=0;
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630 if test $gl_cv_have_include_next = yes; then
10631 gl_cv_next_sys_time_h='<'sys/time.h'>'
10632 else
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
10634 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
10635 if ${gl_cv_next_sys_time_h+:} false; then :
10636 $as_echo_n "(cached) " >&6
10637 else
10638
10639 if test $ac_cv_header_sys_time_h = yes; then
10640
10641
10642
10643
10644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10645 /* end confdefs.h. */
10646 #include <sys/time.h>
10647 _ACEOF
10648 case "$host_os" in
10649 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10650 *) gl_absname_cpp="$ac_cpp" ;;
10651 esac
10652
10653 case "$host_os" in
10654 mingw*)
10655 gl_dirsep_regex='[/\\]'
10656 ;;
10657 *)
10658 gl_dirsep_regex='\/'
10659 ;;
10660 esac
10661 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10662 gl_header_literal_regex=`echo 'sys/time.h' \
10663 | sed -e "$gl_make_literal_regex_sed"`
10664 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10665 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10666 s|^/[^/]|//&|
10667 p
10668 q
10669 }'
10670
10671 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10672 sed -n "$gl_absolute_header_sed"`
10673
10674 gl_header=$gl_cv_absolute_sys_time_h
10675 gl_cv_next_sys_time_h='"'$gl_header'"'
10676 else
10677 gl_cv_next_sys_time_h='<'sys/time.h'>'
10678 fi
10679
10680
10681 fi
10682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
10683 $as_echo "$gl_cv_next_sys_time_h" >&6; }
10684 fi
10685 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
10686
10687 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10688 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10689 gl_next_as_first_directive='<'sys/time.h'>'
10690 else
10691 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10692 gl_next_as_first_directive=$gl_cv_next_sys_time_h
10693 fi
10694 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
10695
10696
10697
10698
10699
10700 if test $ac_cv_header_sys_time_h != yes; then
10701 HAVE_SYS_TIME_H=0
10702 fi
10703
10704
10705
10706
10707
10708 if test $ac_cv_header_sys_socket_h != yes; then
10709 for ac_header in winsock2.h
10710 do :
10711 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
10712 if test "x$ac_cv_header_winsock2_h" = xyes; then :
10713 cat >>confdefs.h <<_ACEOF
10714 #define HAVE_WINSOCK2_H 1
10715 _ACEOF
10716
10717 fi
10718
10719 done
10720
10721 fi
10722 if test "$ac_cv_header_winsock2_h" = yes; then
10723 HAVE_WINSOCK2_H=1
10724 UNISTD_H_HAVE_WINSOCK2_H=1
10725 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
10726 else
10727 HAVE_WINSOCK2_H=0
10728 fi
10729
10730
10731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
10732 $as_echo_n "checking for struct timeval... " >&6; }
10733 if ${gl_cv_sys_struct_timeval+:} false; then :
10734 $as_echo_n "(cached) " >&6
10735 else
10736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10737 /* end confdefs.h. */
10738 #if HAVE_SYS_TIME_H
10739 #include <sys/time.h>
10740 #endif
10741 #include <time.h>
10742 #if HAVE_WINSOCK2_H
10743 # include <winsock2.h>
10744 #endif
10745
10746 int
10747 main ()
10748 {
10749 static struct timeval x; x.tv_sec = x.tv_usec;
10750 ;
10751 return 0;
10752 }
10753 _ACEOF
10754 if ac_fn_c_try_compile "$LINENO"; then :
10755 gl_cv_sys_struct_timeval=yes
10756 else
10757 gl_cv_sys_struct_timeval=no
10758 fi
10759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10760
10761 fi
10762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
10763 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
10764 if test $gl_cv_sys_struct_timeval != yes; then
10765 HAVE_STRUCT_TIMEVAL=0
10766 else
10767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
10768 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
10769 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
10770 $as_echo_n "(cached) " >&6
10771 else
10772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10773 /* end confdefs.h. */
10774 #if HAVE_SYS_TIME_H
10775 #include <sys/time.h>
10776 #endif
10777 #include <time.h>
10778 #if HAVE_WINSOCK2_H
10779 # include <winsock2.h>
10780 #endif
10781
10782 int
10783 main ()
10784 {
10785 static struct timeval x;
10786 typedef int verify_tv_sec_type[
10787 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
10788 ];
10789
10790 ;
10791 return 0;
10792 }
10793 _ACEOF
10794 if ac_fn_c_try_compile "$LINENO"; then :
10795 gl_cv_sys_struct_timeval_tv_sec=yes
10796 else
10797 gl_cv_sys_struct_timeval_tv_sec=no
10798 fi
10799 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10800
10801 fi
10802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
10803 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
10804 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
10805 REPLACE_STRUCT_TIMEVAL=1
10806 fi
10807 fi
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819 GNULIB_GLOB=0;
10820 HAVE_GLOB=1;
10821 HAVE_GLOB_PATTERN_P=1;
10822 REPLACE_GLOB=0;
10823 REPLACE_GLOB_PATTERN_P=0;
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841 if test $gl_cv_have_include_next = yes; then
10842 gl_cv_next_glob_h='<'glob.h'>'
10843 else
10844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5
10845 $as_echo_n "checking absolute name of <glob.h>... " >&6; }
10846 if ${gl_cv_next_glob_h+:} false; then :
10847 $as_echo_n "(cached) " >&6
10848 else
10849
10850 if test $ac_cv_header_glob_h = yes; then
10851
10852
10853
10854
10855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10856 /* end confdefs.h. */
10857 #include <glob.h>
10858 _ACEOF
10859 case "$host_os" in
10860 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10861 *) gl_absname_cpp="$ac_cpp" ;;
10862 esac
10863
10864 case "$host_os" in
10865 mingw*)
10866 gl_dirsep_regex='[/\\]'
10867 ;;
10868 *)
10869 gl_dirsep_regex='\/'
10870 ;;
10871 esac
10872 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10873 gl_header_literal_regex=`echo 'glob.h' \
10874 | sed -e "$gl_make_literal_regex_sed"`
10875 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10876 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10877 s|^/[^/]|//&|
10878 p
10879 q
10880 }'
10881
10882 gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10883 sed -n "$gl_absolute_header_sed"`
10884
10885 gl_header=$gl_cv_absolute_glob_h
10886 gl_cv_next_glob_h='"'$gl_header'"'
10887 else
10888 gl_cv_next_glob_h='<'glob.h'>'
10889 fi
10890
10891
10892 fi
10893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5
10894 $as_echo "$gl_cv_next_glob_h" >&6; }
10895 fi
10896 NEXT_GLOB_H=$gl_cv_next_glob_h
10897
10898 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10899 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10900 gl_next_as_first_directive='<'glob.h'>'
10901 else
10902 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10903 gl_next_as_first_directive=$gl_cv_next_glob_h
10904 fi
10905 NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive
10906
10907
10908
10909
10910
10911 if test $ac_cv_header_glob_h = yes; then
10912 HAVE_GLOB_H=1
10913 else
10914 HAVE_GLOB_H=0
10915 fi
10916
10917
10918 GLOB_H=''
10919 if false; then
10920 GLOB_H=glob.h
10921 else
10922 if test $ac_cv_header_glob_h != yes; then
10923 GLOB_H=glob.h
10924 fi
10925 fi
10926
10927
10928 if test -n "$GLOB_H"; then
10929 GL_GENERATE_GLOB_H_TRUE=
10930 GL_GENERATE_GLOB_H_FALSE='#'
10931 else
10932 GL_GENERATE_GLOB_H_TRUE='#'
10933 GL_GENERATE_GLOB_H_FALSE=
10934 fi
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951 if test -z "$gl_pthreadlib_body_done"; then
10952 gl_pthread_api=no
10953 LIBPTHREAD=
10954 LIBPMULTITHREAD=
10955 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
10956 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
10957 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10958 if test "x$ac_cv_header_pthread_h" = xyes; then :
10959 gl_have_pthread_h=yes
10960 else
10961 gl_have_pthread_h=no
10962 fi
10963
10964
10965 if test "$gl_have_pthread_h" = yes; then
10966 # Other possible tests:
10967 # -lpthreads (FSU threads, PCthreads)
10968 # -lgthreads
10969 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
10970 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
10971 # the second one only in libpthread, and lock.c needs it.
10972 #
10973 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
10974 # needs -pthread for some reason. See:
10975 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
10976 save_LIBS=$LIBS
10977 for gl_pthread in '' '-pthread'; do
10978 LIBS="$LIBS $gl_pthread"
10979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10980 /* end confdefs.h. */
10981 #include <pthread.h>
10982 pthread_mutex_t m;
10983 pthread_mutexattr_t ma;
10984
10985 int
10986 main ()
10987 {
10988 pthread_mutex_lock (&m);
10989 pthread_mutexattr_init (&ma);
10990 ;
10991 return 0;
10992 }
10993 _ACEOF
10994 if ac_fn_c_try_link "$LINENO"; then :
10995 gl_pthread_api=yes
10996 LIBPTHREAD=$gl_pthread
10997 LIBPMULTITHREAD=$gl_pthread
10998 fi
10999 rm -f core conftest.err conftest.$ac_objext \
11000 conftest$ac_exeext conftest.$ac_ext
11001 LIBS=$save_LIBS
11002 test $gl_pthread_api = yes && break
11003 done
11004
11005 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
11006 # since it is defined as a macro on OSF/1.)
11007 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
11008 # The program links fine without libpthread. But it may actually
11009 # need to link with libpthread in order to create multiple threads.
11010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11011 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11012 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
11013 $as_echo_n "(cached) " >&6
11014 else
11015 ac_check_lib_save_LIBS=$LIBS
11016 LIBS="-lpthread $LIBS"
11017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11018 /* end confdefs.h. */
11019
11020 /* Override any GCC internal prototype to avoid an error.
11021 Use char because int might match the return type of a GCC
11022 builtin and then its argument prototype would still apply. */
11023 #ifdef __cplusplus
11024 extern "C"
11025 #endif
11026 char pthread_kill ();
11027 int
11028 main ()
11029 {
11030 return pthread_kill ();
11031 ;
11032 return 0;
11033 }
11034 _ACEOF
11035 if ac_fn_c_try_link "$LINENO"; then :
11036 ac_cv_lib_pthread_pthread_kill=yes
11037 else
11038 ac_cv_lib_pthread_pthread_kill=no
11039 fi
11040 rm -f core conftest.err conftest.$ac_objext \
11041 conftest$ac_exeext conftest.$ac_ext
11042 LIBS=$ac_check_lib_save_LIBS
11043 fi
11044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11045 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11046 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
11047 LIBPMULTITHREAD=-lpthread
11048 # On Solaris and HP-UX, most pthread functions exist also in libc.
11049 # Therefore pthread_in_use() needs to actually try to create a
11050 # thread: pthread_create from libc will fail, whereas
11051 # pthread_create will actually create a thread.
11052 # On Solaris 10 or newer, this test is no longer needed, because
11053 # libc contains the fully functional pthread functions.
11054 case "$host_os" in
11055 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
11056
11057 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
11058
11059 esac
11060
11061 fi
11062
11063 elif test $gl_pthread_api != yes; then
11064 # Some library is needed. Try libpthread and libc_r.
11065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11066 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11067 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
11068 $as_echo_n "(cached) " >&6
11069 else
11070 ac_check_lib_save_LIBS=$LIBS
11071 LIBS="-lpthread $LIBS"
11072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11073 /* end confdefs.h. */
11074
11075 /* Override any GCC internal prototype to avoid an error.
11076 Use char because int might match the return type of a GCC
11077 builtin and then its argument prototype would still apply. */
11078 #ifdef __cplusplus
11079 extern "C"
11080 #endif
11081 char pthread_kill ();
11082 int
11083 main ()
11084 {
11085 return pthread_kill ();
11086 ;
11087 return 0;
11088 }
11089 _ACEOF
11090 if ac_fn_c_try_link "$LINENO"; then :
11091 ac_cv_lib_pthread_pthread_kill=yes
11092 else
11093 ac_cv_lib_pthread_pthread_kill=no
11094 fi
11095 rm -f core conftest.err conftest.$ac_objext \
11096 conftest$ac_exeext conftest.$ac_ext
11097 LIBS=$ac_check_lib_save_LIBS
11098 fi
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11100 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11101 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
11102 gl_pthread_api=yes
11103 LIBPTHREAD=-lpthread
11104 LIBPMULTITHREAD=-lpthread
11105 fi
11106
11107 if test $gl_pthread_api != yes; then
11108 # For FreeBSD 4.
11109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
11110 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
11111 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
11112 $as_echo_n "(cached) " >&6
11113 else
11114 ac_check_lib_save_LIBS=$LIBS
11115 LIBS="-lc_r $LIBS"
11116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11117 /* end confdefs.h. */
11118
11119 /* Override any GCC internal prototype to avoid an error.
11120 Use char because int might match the return type of a GCC
11121 builtin and then its argument prototype would still apply. */
11122 #ifdef __cplusplus
11123 extern "C"
11124 #endif
11125 char pthread_kill ();
11126 int
11127 main ()
11128 {
11129 return pthread_kill ();
11130 ;
11131 return 0;
11132 }
11133 _ACEOF
11134 if ac_fn_c_try_link "$LINENO"; then :
11135 ac_cv_lib_c_r_pthread_kill=yes
11136 else
11137 ac_cv_lib_c_r_pthread_kill=no
11138 fi
11139 rm -f core conftest.err conftest.$ac_objext \
11140 conftest$ac_exeext conftest.$ac_ext
11141 LIBS=$ac_check_lib_save_LIBS
11142 fi
11143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
11144 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
11145 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
11146 gl_pthread_api=yes
11147 LIBPTHREAD=-lc_r
11148 LIBPMULTITHREAD=-lc_r
11149 fi
11150
11151 fi
11152 fi
11153 fi
11154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
11155 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
11156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
11157 $as_echo "$gl_pthread_api" >&6; }
11158
11159
11160 if test $gl_pthread_api = yes; then
11161
11162 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
11163
11164 fi
11165
11166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11167 /* end confdefs.h. */
11168 #include <sched.h>
11169 int
11170 main ()
11171 {
11172 sched_yield ();
11173 ;
11174 return 0;
11175 }
11176 _ACEOF
11177 if ac_fn_c_try_link "$LINENO"; then :
11178 LIB_SCHED_YIELD=
11179
11180 else
11181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
11182 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
11183 if ${ac_cv_lib_rt_sched_yield+:} false; then :
11184 $as_echo_n "(cached) " >&6
11185 else
11186 ac_check_lib_save_LIBS=$LIBS
11187 LIBS="-lrt $LIBS"
11188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11189 /* end confdefs.h. */
11190
11191 /* Override any GCC internal prototype to avoid an error.
11192 Use char because int might match the return type of a GCC
11193 builtin and then its argument prototype would still apply. */
11194 #ifdef __cplusplus
11195 extern "C"
11196 #endif
11197 char sched_yield ();
11198 int
11199 main ()
11200 {
11201 return sched_yield ();
11202 ;
11203 return 0;
11204 }
11205 _ACEOF
11206 if ac_fn_c_try_link "$LINENO"; then :
11207 ac_cv_lib_rt_sched_yield=yes
11208 else
11209 ac_cv_lib_rt_sched_yield=no
11210 fi
11211 rm -f core conftest.err conftest.$ac_objext \
11212 conftest$ac_exeext conftest.$ac_ext
11213 LIBS=$ac_check_lib_save_LIBS
11214 fi
11215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
11216 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
11217 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
11218 LIB_SCHED_YIELD=-lrt
11219 else
11220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
11221 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
11222 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
11223 $as_echo_n "(cached) " >&6
11224 else
11225 ac_check_lib_save_LIBS=$LIBS
11226 LIBS="-lposix4 $LIBS"
11227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11228 /* end confdefs.h. */
11229
11230 /* Override any GCC internal prototype to avoid an error.
11231 Use char because int might match the return type of a GCC
11232 builtin and then its argument prototype would still apply. */
11233 #ifdef __cplusplus
11234 extern "C"
11235 #endif
11236 char sched_yield ();
11237 int
11238 main ()
11239 {
11240 return sched_yield ();
11241 ;
11242 return 0;
11243 }
11244 _ACEOF
11245 if ac_fn_c_try_link "$LINENO"; then :
11246 ac_cv_lib_posix4_sched_yield=yes
11247 else
11248 ac_cv_lib_posix4_sched_yield=no
11249 fi
11250 rm -f core conftest.err conftest.$ac_objext \
11251 conftest$ac_exeext conftest.$ac_ext
11252 LIBS=$ac_check_lib_save_LIBS
11253 fi
11254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
11255 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
11256 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
11257 LIB_SCHED_YIELD=-lposix4
11258 fi
11259
11260 fi
11261
11262
11263 fi
11264 rm -f core conftest.err conftest.$ac_objext \
11265 conftest$ac_exeext conftest.$ac_ext
11266
11267
11268 gl_pthreadlib_body_done=done
11269 fi
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
11280 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
11281 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
11282 $as_echo_n "(cached) " >&6
11283 else
11284 case "$host_os" in
11285 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
11286 *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
11287 gl_cv_func_setlocale_null_all_mtsafe=no ;;
11288 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
11289 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
11290 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
11291 # If we don't know, obey --enable-cross-guesses.
11292 *)
11293 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
11294 esac
11295
11296 fi
11297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
11298 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
11299 case "$host_os" in
11300 mingw*) ;;
11301 *)
11302 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
11303 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
11304 fi
11305 ;;
11306 esac
11307 case "$gl_cv_func_setlocale_null_all_mtsafe" in
11308 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
11309 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
11310 esac
11311
11312 cat >>confdefs.h <<_ACEOF
11313 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
11314 _ACEOF
11315
11316
11317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
11318 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
11319 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
11320 $as_echo_n "(cached) " >&6
11321 else
11322 case "$host_os" in
11323 # Guess no on OpenBSD, AIX.
11324 openbsd* | aix*)
11325 gl_cv_func_setlocale_null_one_mtsafe=no ;;
11326 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
11327 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
11328 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
11329 # If we don't know, obey --enable-cross-guesses.
11330 *)
11331 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
11332 esac
11333
11334 fi
11335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
11336 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
11337 case "$host_os" in
11338 mingw*) ;;
11339 *)
11340 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
11341 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
11342 fi
11343 ;;
11344 esac
11345 case "$gl_cv_func_setlocale_null_one_mtsafe" in
11346 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
11347 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
11348 esac
11349
11350 cat >>confdefs.h <<_ACEOF
11351 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
11352 _ACEOF
11353
11354
11355 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
11356 case "$host_os" in
11357 mingw*) LIB_SETLOCALE_NULL= ;;
11358 *)
11359
11360
11361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
11362 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
11363 if ${gl_cv_have_weak+:} false; then :
11364 $as_echo_n "(cached) " >&6
11365 else
11366 gl_cv_have_weak=no
11367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11368 /* end confdefs.h. */
11369 extern void xyzzy ();
11370 #pragma weak xyzzy
11371 int
11372 main ()
11373 {
11374 xyzzy();
11375 ;
11376 return 0;
11377 }
11378 _ACEOF
11379 if ac_fn_c_try_link "$LINENO"; then :
11380 gl_cv_have_weak=maybe
11381 fi
11382 rm -f core conftest.err conftest.$ac_objext \
11383 conftest$ac_exeext conftest.$ac_ext
11384 if test $gl_cv_have_weak = maybe; then
11385 if test "$cross_compiling" = yes; then :
11386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11387 /* end confdefs.h. */
11388 #ifdef __ELF__
11389 Extensible Linking Format
11390 #endif
11391
11392 _ACEOF
11393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11394 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
11395 gl_cv_have_weak="guessing yes"
11396 else
11397 gl_cv_have_weak="guessing no"
11398 fi
11399 rm -f conftest*
11400
11401
11402 else
11403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11404 /* end confdefs.h. */
11405
11406 #include <stdio.h>
11407 #pragma weak fputs
11408 int main ()
11409 {
11410 return (fputs == NULL);
11411 }
11412 _ACEOF
11413 if ac_fn_c_try_run "$LINENO"; then :
11414 gl_cv_have_weak=yes
11415 else
11416 gl_cv_have_weak=no
11417 fi
11418 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11419 conftest.$ac_objext conftest.beam conftest.$ac_ext
11420 fi
11421
11422 fi
11423 case " $LDFLAGS " in
11424 *" -static "*) gl_cv_have_weak=no ;;
11425 esac
11426 case "$gl_cv_have_weak" in
11427 *yes)
11428 case "$host_os" in
11429 freebsd* | dragonfly*)
11430 : > conftest1.c
11431 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
11432 cat <<EOF > conftest2.c
11433 #include <pthread.h>
11434 #pragma weak pthread_mutexattr_gettype
11435 int main ()
11436 {
11437 return (pthread_mutexattr_gettype != NULL);
11438 }
11439 EOF
11440 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
11441 || gl_cv_have_weak=no
11442 rm -f conftest1.c libempty.so conftest2.c conftest
11443 ;;
11444 esac
11445 ;;
11446 esac
11447
11448 fi
11449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
11450 $as_echo "$gl_cv_have_weak" >&6; }
11451 case "$gl_cv_have_weak" in
11452 *yes)
11453
11454 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
11455
11456 ;;
11457 esac
11458
11459 case "$gl_cv_have_weak" in
11460 *yes) LIB_SETLOCALE_NULL= ;;
11461 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
11462 esac
11463 ;;
11464 esac
11465 else
11466 LIB_SETLOCALE_NULL=
11467 fi
11468
11469
11470
11471
11472
11473 GNULIB_SOCKET=0;
11474 GNULIB_CONNECT=0;
11475 GNULIB_ACCEPT=0;
11476 GNULIB_BIND=0;
11477 GNULIB_GETPEERNAME=0;
11478 GNULIB_GETSOCKNAME=0;
11479 GNULIB_GETSOCKOPT=0;
11480 GNULIB_LISTEN=0;
11481 GNULIB_RECV=0;
11482 GNULIB_SEND=0;
11483 GNULIB_RECVFROM=0;
11484 GNULIB_SENDTO=0;
11485 GNULIB_SETSOCKOPT=0;
11486 GNULIB_SHUTDOWN=0;
11487 GNULIB_ACCEPT4=0;
11488 HAVE_STRUCT_SOCKADDR_STORAGE=1;
11489 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
11490
11491 HAVE_SA_FAMILY_T=1;
11492 HAVE_ACCEPT4=1;
11493
11494
11495
11496
11497
11498 case "$host_os" in
11499 osf*)
11500
11501 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
11502
11503 ;;
11504 esac
11505
11506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
11507 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
11508 if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
11509 $as_echo_n "(cached) " >&6
11510 else
11511
11512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11513 /* end confdefs.h. */
11514 #include <sys/socket.h>
11515 int
11516 main ()
11517 {
11518
11519 ;
11520 return 0;
11521 }
11522 _ACEOF
11523 if ac_fn_c_try_compile "$LINENO"; then :
11524 gl_cv_header_sys_socket_h_selfcontained=yes
11525 else
11526 gl_cv_header_sys_socket_h_selfcontained=no
11527 fi
11528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11529
11530 fi
11531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
11532 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
11533 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
11534 for ac_func in shutdown
11535 do :
11536 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
11537 if test "x$ac_cv_func_shutdown" = xyes; then :
11538 cat >>confdefs.h <<_ACEOF
11539 #define HAVE_SHUTDOWN 1
11540 _ACEOF
11541
11542 fi
11543 done
11544
11545 if test $ac_cv_func_shutdown = yes; then
11546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
11547 $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
11548 if ${gl_cv_header_sys_socket_h_shut+:} false; then :
11549 $as_echo_n "(cached) " >&6
11550 else
11551
11552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11553 /* end confdefs.h. */
11554 #include <sys/socket.h>
11555 int
11556 main ()
11557 {
11558 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
11559 ;
11560 return 0;
11561 }
11562 _ACEOF
11563 if ac_fn_c_try_compile "$LINENO"; then :
11564 gl_cv_header_sys_socket_h_shut=yes
11565 else
11566 gl_cv_header_sys_socket_h_shut=no
11567 fi
11568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11569
11570 fi
11571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
11572 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
11573 if test $gl_cv_header_sys_socket_h_shut = no; then
11574 SYS_SOCKET_H='sys/socket.h'
11575 fi
11576 fi
11577 fi
11578 # We need to check for ws2tcpip.h now.
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590 if test $gl_cv_have_include_next = yes; then
11591 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
11592 else
11593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
11594 $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
11595 if ${gl_cv_next_sys_socket_h+:} false; then :
11596 $as_echo_n "(cached) " >&6
11597 else
11598
11599 if test $ac_cv_header_sys_socket_h = yes; then
11600
11601
11602
11603
11604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11605 /* end confdefs.h. */
11606 #include <sys/socket.h>
11607 _ACEOF
11608 case "$host_os" in
11609 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11610 *) gl_absname_cpp="$ac_cpp" ;;
11611 esac
11612
11613 case "$host_os" in
11614 mingw*)
11615 gl_dirsep_regex='[/\\]'
11616 ;;
11617 *)
11618 gl_dirsep_regex='\/'
11619 ;;
11620 esac
11621 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11622 gl_header_literal_regex=`echo 'sys/socket.h' \
11623 | sed -e "$gl_make_literal_regex_sed"`
11624 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11625 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11626 s|^/[^/]|//&|
11627 p
11628 q
11629 }'
11630
11631 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11632 sed -n "$gl_absolute_header_sed"`
11633
11634 gl_header=$gl_cv_absolute_sys_socket_h
11635 gl_cv_next_sys_socket_h='"'$gl_header'"'
11636 else
11637 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
11638 fi
11639
11640
11641 fi
11642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
11643 $as_echo "$gl_cv_next_sys_socket_h" >&6; }
11644 fi
11645 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
11646
11647 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11648 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11649 gl_next_as_first_directive='<'sys/socket.h'>'
11650 else
11651 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11652 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
11653 fi
11654 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
11655
11656
11657
11658
11659 if test $ac_cv_header_sys_socket_h = yes; then
11660 HAVE_SYS_SOCKET_H=1
11661 else
11662 HAVE_SYS_SOCKET_H=0
11663 fi
11664
11665
11666
11667 if test $ac_cv_header_sys_socket_h = yes; then
11668 HAVE_WS2TCPIP_H=0
11669 else
11670 if test $ac_cv_header_ws2tcpip_h = yes; then
11671 HAVE_WS2TCPIP_H=1
11672 else
11673 HAVE_WS2TCPIP_H=0
11674 fi
11675 fi
11676
11677
11678
11679 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
11680 /* sys/types.h is not needed according to POSIX, but the
11681 sys/socket.h in i386-unknown-freebsd4.10 and
11682 powerpc-apple-darwin5.5 required it. */
11683 #include <sys/types.h>
11684 #ifdef HAVE_SYS_SOCKET_H
11685 #include <sys/socket.h>
11686 #endif
11687 #ifdef HAVE_WS2TCPIP_H
11688 #include <ws2tcpip.h>
11689 #endif
11690
11691 "
11692 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
11693
11694 cat >>confdefs.h <<_ACEOF
11695 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
11696 _ACEOF
11697
11698
11699 fi
11700 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
11701 /* sys/types.h is not needed according to POSIX, but the
11702 sys/socket.h in i386-unknown-freebsd4.10 and
11703 powerpc-apple-darwin5.5 required it. */
11704 #include <sys/types.h>
11705 #ifdef HAVE_SYS_SOCKET_H
11706 #include <sys/socket.h>
11707 #endif
11708 #ifdef HAVE_WS2TCPIP_H
11709 #include <ws2tcpip.h>
11710 #endif
11711
11712 "
11713 if test "x$ac_cv_type_sa_family_t" = xyes; then :
11714
11715 cat >>confdefs.h <<_ACEOF
11716 #define HAVE_SA_FAMILY_T 1
11717 _ACEOF
11718
11719
11720 fi
11721
11722 if test $ac_cv_type_struct_sockaddr_storage = no; then
11723 HAVE_STRUCT_SOCKADDR_STORAGE=0
11724 fi
11725 if test $ac_cv_type_sa_family_t = no; then
11726 HAVE_SA_FAMILY_T=0
11727 fi
11728 if test $ac_cv_type_struct_sockaddr_storage != no; then
11729 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
11730 #ifdef HAVE_SYS_SOCKET_H
11731 #include <sys/socket.h>
11732 #endif
11733 #ifdef HAVE_WS2TCPIP_H
11734 #include <ws2tcpip.h>
11735 #endif
11736
11737 "
11738 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
11739
11740 cat >>confdefs.h <<_ACEOF
11741 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11742 _ACEOF
11743
11744
11745 else
11746 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
11747 fi
11748
11749 fi
11750 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
11751 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
11752 SYS_SOCKET_H='sys/socket.h'
11753 fi
11754
11755
11756
11757
11758 if test $ac_cv_header_sys_socket_h != yes; then
11759 for ac_header in winsock2.h
11760 do :
11761 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
11762 if test "x$ac_cv_header_winsock2_h" = xyes; then :
11763 cat >>confdefs.h <<_ACEOF
11764 #define HAVE_WINSOCK2_H 1
11765 _ACEOF
11766
11767 fi
11768
11769 done
11770
11771 fi
11772 if test "$ac_cv_header_winsock2_h" = yes; then
11773 HAVE_WINSOCK2_H=1
11774 UNISTD_H_HAVE_WINSOCK2_H=1
11775 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
11776 else
11777 HAVE_WINSOCK2_H=0
11778 fi
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
11795 $as_echo_n "checking for IPv4 sockets... " >&6; }
11796 if ${gl_cv_socket_ipv4+:} false; then :
11797 $as_echo_n "(cached) " >&6
11798 else
11799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11800 /* end confdefs.h. */
11801 #include <sys/types.h>
11802 #ifdef HAVE_SYS_SOCKET_H
11803 #include <sys/socket.h>
11804 #endif
11805 #ifdef HAVE_NETINET_IN_H
11806 #include <netinet/in.h>
11807 #endif
11808 #ifdef HAVE_WINSOCK2_H
11809 #include <winsock2.h>
11810 #endif
11811 int
11812 main ()
11813 {
11814 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
11815 if (&x && &y && &z) return 0;
11816 ;
11817 return 0;
11818 }
11819 _ACEOF
11820 if ac_fn_c_try_compile "$LINENO"; then :
11821 gl_cv_socket_ipv4=yes
11822 else
11823 gl_cv_socket_ipv4=no
11824 fi
11825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11826 fi
11827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
11828 $as_echo "$gl_cv_socket_ipv4" >&6; }
11829 if test $gl_cv_socket_ipv4 = yes; then
11830
11831 $as_echo "#define HAVE_IPV4 1" >>confdefs.h
11832
11833 fi
11834
11835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
11836 $as_echo_n "checking for IPv6 sockets... " >&6; }
11837 if ${gl_cv_socket_ipv6+:} false; then :
11838 $as_echo_n "(cached) " >&6
11839 else
11840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11841 /* end confdefs.h. */
11842 #include <sys/types.h>
11843 #ifdef HAVE_SYS_SOCKET_H
11844 #include <sys/socket.h>
11845 #endif
11846 #ifdef HAVE_NETINET_IN_H
11847 #include <netinet/in.h>
11848 #endif
11849 #ifdef HAVE_WINSOCK2_H
11850 #include <winsock2.h>
11851 #endif
11852 #ifdef HAVE_WS2TCPIP_H
11853 #include <ws2tcpip.h>
11854 #endif
11855 int
11856 main ()
11857 {
11858 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
11859 if (&x && &y && &z) return 0;
11860 ;
11861 return 0;
11862 }
11863 _ACEOF
11864 if ac_fn_c_try_compile "$LINENO"; then :
11865 gl_cv_socket_ipv6=yes
11866 else
11867 gl_cv_socket_ipv6=no
11868 fi
11869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11870 fi
11871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
11872 $as_echo "$gl_cv_socket_ipv6" >&6; }
11873 if test $gl_cv_socket_ipv6 = yes; then
11874
11875 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
11876
11877 fi
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891 if test $gl_cv_have_include_next = yes; then
11892 gl_cv_next_limits_h='<'limits.h'>'
11893 else
11894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
11895 $as_echo_n "checking absolute name of <limits.h>... " >&6; }
11896 if ${gl_cv_next_limits_h+:} false; then :
11897 $as_echo_n "(cached) " >&6
11898 else
11899
11900 if test $ac_cv_header_limits_h = yes; then
11901
11902
11903
11904
11905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11906 /* end confdefs.h. */
11907 #include <limits.h>
11908 _ACEOF
11909 case "$host_os" in
11910 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11911 *) gl_absname_cpp="$ac_cpp" ;;
11912 esac
11913
11914 case "$host_os" in
11915 mingw*)
11916 gl_dirsep_regex='[/\\]'
11917 ;;
11918 *)
11919 gl_dirsep_regex='\/'
11920 ;;
11921 esac
11922 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11923 gl_header_literal_regex=`echo 'limits.h' \
11924 | sed -e "$gl_make_literal_regex_sed"`
11925 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11926 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11927 s|^/[^/]|//&|
11928 p
11929 q
11930 }'
11931
11932 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11933 sed -n "$gl_absolute_header_sed"`
11934
11935 gl_header=$gl_cv_absolute_limits_h
11936 gl_cv_next_limits_h='"'$gl_header'"'
11937 else
11938 gl_cv_next_limits_h='<'limits.h'>'
11939 fi
11940
11941
11942 fi
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
11944 $as_echo "$gl_cv_next_limits_h" >&6; }
11945 fi
11946 NEXT_LIMITS_H=$gl_cv_next_limits_h
11947
11948 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11949 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11950 gl_next_as_first_directive='<'limits.h'>'
11951 else
11952 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11953 gl_next_as_first_directive=$gl_cv_next_limits_h
11954 fi
11955 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
11956
11957
11958
11959
11960
11961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
11962 $as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
11963 if ${gl_cv_header_limits_width+:} false; then :
11964 $as_echo_n "(cached) " >&6
11965 else
11966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11967 /* end confdefs.h. */
11968 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
11969 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
11970 #endif
11971 #include <limits.h>
11972 long long llm = LLONG_MAX;
11973 int wb = WORD_BIT;
11974 int ullw = ULLONG_WIDTH;
11975
11976 int
11977 main ()
11978 {
11979
11980 ;
11981 return 0;
11982 }
11983 _ACEOF
11984 if ac_fn_c_try_compile "$LINENO"; then :
11985 gl_cv_header_limits_width=yes
11986 else
11987 gl_cv_header_limits_width=no
11988 fi
11989 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11990 fi
11991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
11992 $as_echo "$gl_cv_header_limits_width" >&6; }
11993 if test "$gl_cv_header_limits_width" = yes; then
11994 LIMITS_H=
11995 else
11996 LIMITS_H=limits.h
11997 fi
11998
11999 if test -n "$LIMITS_H"; then
12000 GL_GENERATE_LIMITS_H_TRUE=
12001 GL_GENERATE_LIMITS_H_FALSE='#'
12002 else
12003 GL_GENERATE_LIMITS_H_TRUE='#'
12004 GL_GENERATE_LIMITS_H_FALSE=
12005 fi
12006
12007
12008
12009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
12010 $as_echo_n "checking for wint_t... " >&6; }
12011 if ${gt_cv_c_wint_t+:} false; then :
12012 $as_echo_n "(cached) " >&6
12013 else
12014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12015 /* end confdefs.h. */
12016 #include <wchar.h>
12017 wint_t foo = (wchar_t)'\0';
12018 int
12019 main ()
12020 {
12021
12022 ;
12023 return 0;
12024 }
12025 _ACEOF
12026 if ac_fn_c_try_compile "$LINENO"; then :
12027 gt_cv_c_wint_t=yes
12028 else
12029 gt_cv_c_wint_t=no
12030 fi
12031 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12032 fi
12033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
12034 $as_echo "$gt_cv_c_wint_t" >&6; }
12035 if test $gt_cv_c_wint_t = yes; then
12036
12037 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
12038
12039
12040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
12041 $as_echo_n "checking whether wint_t is large enough... " >&6; }
12042 if ${gl_cv_type_wint_t_large_enough+:} false; then :
12043 $as_echo_n "(cached) " >&6
12044 else
12045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12046 /* end confdefs.h. */
12047 #include <wchar.h>
12048 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
12049
12050 int
12051 main ()
12052 {
12053
12054 ;
12055 return 0;
12056 }
12057 _ACEOF
12058 if ac_fn_c_try_compile "$LINENO"; then :
12059 gl_cv_type_wint_t_large_enough=yes
12060 else
12061 gl_cv_type_wint_t_large_enough=no
12062 fi
12063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12064 fi
12065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
12066 $as_echo "$gl_cv_type_wint_t_large_enough" >&6; }
12067 if test $gl_cv_type_wint_t_large_enough = no; then
12068 GNULIB_OVERRIDES_WINT_T=1
12069 else
12070 GNULIB_OVERRIDES_WINT_T=0
12071 fi
12072 else
12073 GNULIB_OVERRIDES_WINT_T=0
12074 fi
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
12085 $as_echo_n "checking whether the compiler produces multi-arch binaries... " >&6; }
12086 if ${gl_cv_c_multiarch+:} false; then :
12087 $as_echo_n "(cached) " >&6
12088 else
12089 gl_cv_c_multiarch=no
12090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12091 /* end confdefs.h. */
12092 #ifndef __APPLE_CC__
12093 not a universal capable compiler
12094 #endif
12095 typedef int dummy;
12096
12097 _ACEOF
12098 if ac_fn_c_try_compile "$LINENO"; then :
12099
12100 arch=
12101 prev=
12102 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12103 if test -n "$prev"; then
12104 case $word in
12105 i?86 | x86_64 | ppc | ppc64 | arm | arm64)
12106 if test -z "$arch" || test "$arch" = "$word"; then
12107 arch="$word"
12108 else
12109 gl_cv_c_multiarch=yes
12110 fi
12111 ;;
12112 esac
12113 prev=
12114 else
12115 if test "x$word" = "x-arch"; then
12116 prev=arch
12117 fi
12118 fi
12119 done
12120
12121 fi
12122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12123
12124 fi
12125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
12126 $as_echo "$gl_cv_c_multiarch" >&6; }
12127 if test $gl_cv_c_multiarch = yes; then
12128 APPLE_UNIVERSAL_BUILD=1
12129 else
12130 APPLE_UNIVERSAL_BUILD=0
12131 fi
12132
12133
12134
12135
12136
12137
12138
12139
12140 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12141
12142
12143 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12144
12145
12146
12147 if test $ac_cv_header_wchar_h = yes; then
12148 HAVE_WCHAR_H=1
12149 else
12150 HAVE_WCHAR_H=0
12151 fi
12152
12153
12154
12155 if test $ac_cv_header_inttypes_h = yes; then
12156 HAVE_INTTYPES_H=1
12157 else
12158 HAVE_INTTYPES_H=0
12159 fi
12160
12161
12162
12163 if test $ac_cv_header_sys_types_h = yes; then
12164 HAVE_SYS_TYPES_H=1
12165 else
12166 HAVE_SYS_TYPES_H=0
12167 fi
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179 if test $gl_cv_have_include_next = yes; then
12180 gl_cv_next_stdint_h='<'stdint.h'>'
12181 else
12182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12183 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12184 if ${gl_cv_next_stdint_h+:} false; then :
12185 $as_echo_n "(cached) " >&6
12186 else
12187
12188 if test $ac_cv_header_stdint_h = yes; then
12189
12190
12191
12192
12193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12194 /* end confdefs.h. */
12195 #include <stdint.h>
12196 _ACEOF
12197 case "$host_os" in
12198 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12199 *) gl_absname_cpp="$ac_cpp" ;;
12200 esac
12201
12202 case "$host_os" in
12203 mingw*)
12204 gl_dirsep_regex='[/\\]'
12205 ;;
12206 *)
12207 gl_dirsep_regex='\/'
12208 ;;
12209 esac
12210 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12211 gl_header_literal_regex=`echo 'stdint.h' \
12212 | sed -e "$gl_make_literal_regex_sed"`
12213 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12214 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12215 s|^/[^/]|//&|
12216 p
12217 q
12218 }'
12219
12220 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12221 sed -n "$gl_absolute_header_sed"`
12222
12223 gl_header=$gl_cv_absolute_stdint_h
12224 gl_cv_next_stdint_h='"'$gl_header'"'
12225 else
12226 gl_cv_next_stdint_h='<'stdint.h'>'
12227 fi
12228
12229
12230 fi
12231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12232 $as_echo "$gl_cv_next_stdint_h" >&6; }
12233 fi
12234 NEXT_STDINT_H=$gl_cv_next_stdint_h
12235
12236 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12237 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12238 gl_next_as_first_directive='<'stdint.h'>'
12239 else
12240 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12241 gl_next_as_first_directive=$gl_cv_next_stdint_h
12242 fi
12243 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12244
12245
12246
12247
12248 if test $ac_cv_header_stdint_h = yes; then
12249 HAVE_STDINT_H=1
12250 else
12251 HAVE_STDINT_H=0
12252 fi
12253
12254
12255 if test $ac_cv_header_stdint_h = yes; then
12256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12257 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12258 if ${gl_cv_header_working_stdint_h+:} false; then :
12259 $as_echo_n "(cached) " >&6
12260 else
12261 gl_cv_header_working_stdint_h=no
12262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12263 /* end confdefs.h. */
12264
12265
12266 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12267 #define __STDC_CONSTANT_MACROS 1
12268 #define __STDC_LIMIT_MACROS 1
12269 #include <stdint.h>
12270 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
12271 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
12272 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12273 #endif
12274
12275
12276 #include <stddef.h>
12277 #include <signal.h>
12278 #if HAVE_WCHAR_H
12279 # include <wchar.h>
12280 #endif
12281
12282
12283 #ifdef INT8_MAX
12284 int8_t a1 = INT8_MAX;
12285 int8_t a1min = INT8_MIN;
12286 #endif
12287 #ifdef INT16_MAX
12288 int16_t a2 = INT16_MAX;
12289 int16_t a2min = INT16_MIN;
12290 #endif
12291 #ifdef INT32_MAX
12292 int32_t a3 = INT32_MAX;
12293 int32_t a3min = INT32_MIN;
12294 #endif
12295 #ifdef INT64_MAX
12296 int64_t a4 = INT64_MAX;
12297 int64_t a4min = INT64_MIN;
12298 #endif
12299 #ifdef UINT8_MAX
12300 uint8_t b1 = UINT8_MAX;
12301 #else
12302 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12303 #endif
12304 #ifdef UINT16_MAX
12305 uint16_t b2 = UINT16_MAX;
12306 #endif
12307 #ifdef UINT32_MAX
12308 uint32_t b3 = UINT32_MAX;
12309 #endif
12310 #ifdef UINT64_MAX
12311 uint64_t b4 = UINT64_MAX;
12312 #endif
12313 int_least8_t c1 = INT8_C (0x7f);
12314 int_least8_t c1max = INT_LEAST8_MAX;
12315 int_least8_t c1min = INT_LEAST8_MIN;
12316 int_least16_t c2 = INT16_C (0x7fff);
12317 int_least16_t c2max = INT_LEAST16_MAX;
12318 int_least16_t c2min = INT_LEAST16_MIN;
12319 int_least32_t c3 = INT32_C (0x7fffffff);
12320 int_least32_t c3max = INT_LEAST32_MAX;
12321 int_least32_t c3min = INT_LEAST32_MIN;
12322 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12323 int_least64_t c4max = INT_LEAST64_MAX;
12324 int_least64_t c4min = INT_LEAST64_MIN;
12325 uint_least8_t d1 = UINT8_C (0xff);
12326 uint_least8_t d1max = UINT_LEAST8_MAX;
12327 uint_least16_t d2 = UINT16_C (0xffff);
12328 uint_least16_t d2max = UINT_LEAST16_MAX;
12329 uint_least32_t d3 = UINT32_C (0xffffffff);
12330 uint_least32_t d3max = UINT_LEAST32_MAX;
12331 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12332 uint_least64_t d4max = UINT_LEAST64_MAX;
12333 int_fast8_t e1 = INT_FAST8_MAX;
12334 int_fast8_t e1min = INT_FAST8_MIN;
12335 int_fast16_t e2 = INT_FAST16_MAX;
12336 int_fast16_t e2min = INT_FAST16_MIN;
12337 int_fast32_t e3 = INT_FAST32_MAX;
12338 int_fast32_t e3min = INT_FAST32_MIN;
12339 int_fast64_t e4 = INT_FAST64_MAX;
12340 int_fast64_t e4min = INT_FAST64_MIN;
12341 uint_fast8_t f1 = UINT_FAST8_MAX;
12342 uint_fast16_t f2 = UINT_FAST16_MAX;
12343 uint_fast32_t f3 = UINT_FAST32_MAX;
12344 uint_fast64_t f4 = UINT_FAST64_MAX;
12345 #ifdef INTPTR_MAX
12346 intptr_t g = INTPTR_MAX;
12347 intptr_t gmin = INTPTR_MIN;
12348 #endif
12349 #ifdef UINTPTR_MAX
12350 uintptr_t h = UINTPTR_MAX;
12351 #endif
12352 intmax_t i = INTMAX_MAX;
12353 uintmax_t j = UINTMAX_MAX;
12354
12355 /* Check that SIZE_MAX has the correct type, if possible. */
12356 #if 201112 <= __STDC_VERSION__
12357 int k = _Generic (SIZE_MAX, size_t: 0);
12358 #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
12359 || (0x5110 <= __SUNPRO_C && !__STDC__))
12360 extern size_t k;
12361 extern __typeof__ (SIZE_MAX) k;
12362 #endif
12363
12364 #include <limits.h> /* for CHAR_BIT */
12365 #define TYPE_MINIMUM(t) \
12366 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12367 #define TYPE_MAXIMUM(t) \
12368 ((t) ((t) 0 < (t) -1 \
12369 ? (t) -1 \
12370 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12371 struct s {
12372 int check_PTRDIFF:
12373 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12374 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12375 ? 1 : -1;
12376 /* Detect bug in FreeBSD 6.0 / ia64. */
12377 int check_SIG_ATOMIC:
12378 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12379 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12380 ? 1 : -1;
12381 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12382 int check_WCHAR:
12383 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12384 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12385 ? 1 : -1;
12386 /* Detect bug in mingw. */
12387 int check_WINT:
12388 WINT_MIN == TYPE_MINIMUM (wint_t)
12389 && WINT_MAX == TYPE_MAXIMUM (wint_t)
12390 ? 1 : -1;
12391
12392 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
12393 int check_UINT8_C:
12394 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12395 int check_UINT16_C:
12396 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12397
12398 /* Detect bugs in OpenBSD 3.9 stdint.h. */
12399 #ifdef UINT8_MAX
12400 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12401 #endif
12402 #ifdef UINT16_MAX
12403 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12404 #endif
12405 #ifdef UINT32_MAX
12406 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12407 #endif
12408 #ifdef UINT64_MAX
12409 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12410 #endif
12411 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12412 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12413 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12414 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12415 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12416 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12417 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12418 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12419 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12420 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12421 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12422 };
12423
12424 int
12425 main ()
12426 {
12427
12428 ;
12429 return 0;
12430 }
12431 _ACEOF
12432 if ac_fn_c_try_compile "$LINENO"; then :
12433 if test "$cross_compiling" = yes; then :
12434 case "$host_os" in
12435 # Guess yes on native Windows.
12436 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
12437 # In general, assume it works.
12438 *) gl_cv_header_working_stdint_h="guessing yes" ;;
12439 esac
12440
12441 else
12442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12443 /* end confdefs.h. */
12444
12445
12446 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12447 #define __STDC_CONSTANT_MACROS 1
12448 #define __STDC_LIMIT_MACROS 1
12449 #include <stdint.h>
12450
12451
12452 #include <stddef.h>
12453 #include <signal.h>
12454 #if HAVE_WCHAR_H
12455 # include <wchar.h>
12456 #endif
12457
12458
12459 #include <stdio.h>
12460 #include <string.h>
12461 #define MVAL(macro) MVAL1(macro)
12462 #define MVAL1(expression) #expression
12463 static const char *macro_values[] =
12464 {
12465 #ifdef INT8_MAX
12466 MVAL (INT8_MAX),
12467 #endif
12468 #ifdef INT16_MAX
12469 MVAL (INT16_MAX),
12470 #endif
12471 #ifdef INT32_MAX
12472 MVAL (INT32_MAX),
12473 #endif
12474 #ifdef INT64_MAX
12475 MVAL (INT64_MAX),
12476 #endif
12477 #ifdef UINT8_MAX
12478 MVAL (UINT8_MAX),
12479 #endif
12480 #ifdef UINT16_MAX
12481 MVAL (UINT16_MAX),
12482 #endif
12483 #ifdef UINT32_MAX
12484 MVAL (UINT32_MAX),
12485 #endif
12486 #ifdef UINT64_MAX
12487 MVAL (UINT64_MAX),
12488 #endif
12489 NULL
12490 };
12491
12492 int
12493 main ()
12494 {
12495
12496 const char **mv;
12497 for (mv = macro_values; *mv != NULL; mv++)
12498 {
12499 const char *value = *mv;
12500 /* Test whether it looks like a cast expression. */
12501 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
12502 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
12503 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
12504 || strncmp (value, "((int)"/*)*/, 6) == 0
12505 || strncmp (value, "((signed short)"/*)*/, 15) == 0
12506 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
12507 return mv - macro_values + 1;
12508 }
12509 return 0;
12510
12511 ;
12512 return 0;
12513 }
12514 _ACEOF
12515 if ac_fn_c_try_run "$LINENO"; then :
12516 gl_cv_header_working_stdint_h=yes
12517 fi
12518 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12519 conftest.$ac_objext conftest.beam conftest.$ac_ext
12520 fi
12521
12522
12523 fi
12524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12525
12526 fi
12527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
12528 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
12529 fi
12530
12531 HAVE_C99_STDINT_H=0
12532 HAVE_SYS_BITYPES_H=0
12533 HAVE_SYS_INTTYPES_H=0
12534 STDINT_H=stdint.h
12535 case "$gl_cv_header_working_stdint_h" in
12536 *yes)
12537 HAVE_C99_STDINT_H=1
12538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
12539 $as_echo_n "checking whether stdint.h works without ISO C predefines... " >&6; }
12540 if ${gl_cv_header_stdint_without_STDC_macros+:} false; then :
12541 $as_echo_n "(cached) " >&6
12542 else
12543 gl_cv_header_stdint_without_STDC_macros=no
12544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12545 /* end confdefs.h. */
12546
12547
12548 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12549 #include <stdint.h>
12550
12551
12552 #include <stddef.h>
12553 #include <signal.h>
12554 #if HAVE_WCHAR_H
12555 # include <wchar.h>
12556 #endif
12557
12558
12559 intmax_t im = INTMAX_MAX;
12560 int32_t i32 = INT32_C (0x7fffffff);
12561
12562 int
12563 main ()
12564 {
12565
12566 ;
12567 return 0;
12568 }
12569 _ACEOF
12570 if ac_fn_c_try_compile "$LINENO"; then :
12571 gl_cv_header_stdint_without_STDC_macros=yes
12572 fi
12573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12574
12575 fi
12576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
12577 $as_echo "$gl_cv_header_stdint_without_STDC_macros" >&6; }
12578
12579 if test $gl_cv_header_stdint_without_STDC_macros = no; then
12580
12581 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
12582
12583
12584 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
12585
12586 fi
12587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
12588 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
12589 if ${gl_cv_header_stdint_width+:} false; then :
12590 $as_echo_n "(cached) " >&6
12591 else
12592 gl_cv_header_stdint_width=no
12593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12594 /* end confdefs.h. */
12595
12596 /* Work if build is not clean. */
12597 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
12598 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
12599 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
12600 #endif
12601 #include <stdint.h>
12602
12603 #include <stddef.h>
12604 #include <signal.h>
12605 #if HAVE_WCHAR_H
12606 # include <wchar.h>
12607 #endif
12608
12609 int iw = UINTMAX_WIDTH;
12610
12611 int
12612 main ()
12613 {
12614
12615 ;
12616 return 0;
12617 }
12618 _ACEOF
12619 if ac_fn_c_try_compile "$LINENO"; then :
12620 gl_cv_header_stdint_width=yes
12621 fi
12622 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12623 fi
12624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
12625 $as_echo "$gl_cv_header_stdint_width" >&6; }
12626 if test "$gl_cv_header_stdint_width" = yes; then
12627 STDINT_H=
12628 fi
12629 ;;
12630 *)
12631 for ac_header in sys/inttypes.h sys/bitypes.h
12632 do :
12633 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12634 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12635 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12636 cat >>confdefs.h <<_ACEOF
12637 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12638 _ACEOF
12639
12640 fi
12641
12642 done
12643
12644 if test $ac_cv_header_sys_inttypes_h = yes; then
12645 HAVE_SYS_INTTYPES_H=1
12646 fi
12647 if test $ac_cv_header_sys_bitypes_h = yes; then
12648 HAVE_SYS_BITYPES_H=1
12649 fi
12650
12651
12652 if test $APPLE_UNIVERSAL_BUILD = 0; then
12653
12654
12655 for gltype in ptrdiff_t size_t ; do
12656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12657 $as_echo_n "checking for bit size of $gltype... " >&6; }
12658 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12659 $as_echo_n "(cached) " >&6
12660 else
12661 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
12662 #include <stddef.h>
12663 #include <signal.h>
12664 #if HAVE_WCHAR_H
12665 # include <wchar.h>
12666 #endif
12667
12668 #include <limits.h>"; then :
12669
12670 else
12671 result=unknown
12672 fi
12673
12674 eval gl_cv_bitsizeof_${gltype}=\$result
12675
12676 fi
12677 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12679 $as_echo "$ac_res" >&6; }
12680 eval result=\$gl_cv_bitsizeof_${gltype}
12681 if test $result = unknown; then
12682 result=0
12683 fi
12684 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12685 cat >>confdefs.h <<_ACEOF
12686 #define BITSIZEOF_${GLTYPE} $result
12687 _ACEOF
12688
12689 eval BITSIZEOF_${GLTYPE}=\$result
12690 done
12691
12692
12693 fi
12694
12695
12696 for gltype in sig_atomic_t wchar_t wint_t ; do
12697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12698 $as_echo_n "checking for bit size of $gltype... " >&6; }
12699 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12700 $as_echo_n "(cached) " >&6
12701 else
12702 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
12703 #include <stddef.h>
12704 #include <signal.h>
12705 #if HAVE_WCHAR_H
12706 # include <wchar.h>
12707 #endif
12708
12709 #include <limits.h>"; then :
12710
12711 else
12712 result=unknown
12713 fi
12714
12715 eval gl_cv_bitsizeof_${gltype}=\$result
12716
12717 fi
12718 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12720 $as_echo "$ac_res" >&6; }
12721 eval result=\$gl_cv_bitsizeof_${gltype}
12722 if test $result = unknown; then
12723 result=0
12724 fi
12725 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12726 cat >>confdefs.h <<_ACEOF
12727 #define BITSIZEOF_${GLTYPE} $result
12728 _ACEOF
12729
12730 eval BITSIZEOF_${GLTYPE}=\$result
12731 done
12732
12733
12734
12735
12736 for gltype in sig_atomic_t wchar_t wint_t ; do
12737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
12738 $as_echo_n "checking whether $gltype is signed... " >&6; }
12739 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
12740 $as_echo_n "(cached) " >&6
12741 else
12742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12743 /* end confdefs.h. */
12744
12745 #include <stddef.h>
12746 #include <signal.h>
12747 #if HAVE_WCHAR_H
12748 # include <wchar.h>
12749 #endif
12750
12751 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
12752 int
12753 main ()
12754 {
12755
12756 ;
12757 return 0;
12758 }
12759 _ACEOF
12760 if ac_fn_c_try_compile "$LINENO"; then :
12761 result=yes
12762 else
12763 result=no
12764 fi
12765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12766 eval gl_cv_type_${gltype}_signed=\$result
12767
12768 fi
12769 eval ac_res=\$gl_cv_type_${gltype}_signed
12770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12771 $as_echo "$ac_res" >&6; }
12772 eval result=\$gl_cv_type_${gltype}_signed
12773 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12774 if test "$result" = yes; then
12775 cat >>confdefs.h <<_ACEOF
12776 #define HAVE_SIGNED_${GLTYPE} 1
12777 _ACEOF
12778
12779 eval HAVE_SIGNED_${GLTYPE}=1
12780 else
12781 eval HAVE_SIGNED_${GLTYPE}=0
12782 fi
12783 done
12784
12785
12786 gl_cv_type_ptrdiff_t_signed=yes
12787 gl_cv_type_size_t_signed=no
12788 if test $APPLE_UNIVERSAL_BUILD = 0; then
12789
12790
12791 for gltype in ptrdiff_t size_t ; do
12792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12793 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
12794 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
12795 $as_echo_n "(cached) " >&6
12796 else
12797 eval gl_cv_type_${gltype}_suffix=no
12798 eval result=\$gl_cv_type_${gltype}_signed
12799 if test "$result" = yes; then
12800 glsufu=
12801 else
12802 glsufu=u
12803 fi
12804 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12805 case $glsuf in
12806 '') gltype1='int';;
12807 l) gltype1='long int';;
12808 ll) gltype1='long long int';;
12809 i64) gltype1='__int64';;
12810 u) gltype1='unsigned int';;
12811 ul) gltype1='unsigned long int';;
12812 ull) gltype1='unsigned long long int';;
12813 ui64)gltype1='unsigned __int64';;
12814 esac
12815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12816 /* end confdefs.h. */
12817
12818 #include <stddef.h>
12819 #include <signal.h>
12820 #if HAVE_WCHAR_H
12821 # include <wchar.h>
12822 #endif
12823
12824 extern $gltype foo;
12825 extern $gltype1 foo;
12826 int
12827 main ()
12828 {
12829
12830 ;
12831 return 0;
12832 }
12833 _ACEOF
12834 if ac_fn_c_try_compile "$LINENO"; then :
12835 eval gl_cv_type_${gltype}_suffix=\$glsuf
12836 fi
12837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12838 eval result=\$gl_cv_type_${gltype}_suffix
12839 test "$result" != no && break
12840 done
12841 fi
12842 eval ac_res=\$gl_cv_type_${gltype}_suffix
12843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12844 $as_echo "$ac_res" >&6; }
12845 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12846 eval result=\$gl_cv_type_${gltype}_suffix
12847 test "$result" = no && result=
12848 eval ${GLTYPE}_SUFFIX=\$result
12849 cat >>confdefs.h <<_ACEOF
12850 #define ${GLTYPE}_SUFFIX $result
12851 _ACEOF
12852
12853 done
12854
12855
12856 fi
12857
12858
12859 for gltype in sig_atomic_t wchar_t wint_t ; do
12860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12861 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
12862 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
12863 $as_echo_n "(cached) " >&6
12864 else
12865 eval gl_cv_type_${gltype}_suffix=no
12866 eval result=\$gl_cv_type_${gltype}_signed
12867 if test "$result" = yes; then
12868 glsufu=
12869 else
12870 glsufu=u
12871 fi
12872 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12873 case $glsuf in
12874 '') gltype1='int';;
12875 l) gltype1='long int';;
12876 ll) gltype1='long long int';;
12877 i64) gltype1='__int64';;
12878 u) gltype1='unsigned int';;
12879 ul) gltype1='unsigned long int';;
12880 ull) gltype1='unsigned long long int';;
12881 ui64)gltype1='unsigned __int64';;
12882 esac
12883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12884 /* end confdefs.h. */
12885
12886 #include <stddef.h>
12887 #include <signal.h>
12888 #if HAVE_WCHAR_H
12889 # include <wchar.h>
12890 #endif
12891
12892 extern $gltype foo;
12893 extern $gltype1 foo;
12894 int
12895 main ()
12896 {
12897
12898 ;
12899 return 0;
12900 }
12901 _ACEOF
12902 if ac_fn_c_try_compile "$LINENO"; then :
12903 eval gl_cv_type_${gltype}_suffix=\$glsuf
12904 fi
12905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12906 eval result=\$gl_cv_type_${gltype}_suffix
12907 test "$result" != no && break
12908 done
12909 fi
12910 eval ac_res=\$gl_cv_type_${gltype}_suffix
12911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12912 $as_echo "$ac_res" >&6; }
12913 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12914 eval result=\$gl_cv_type_${gltype}_suffix
12915 test "$result" = no && result=
12916 eval ${GLTYPE}_SUFFIX=\$result
12917 cat >>confdefs.h <<_ACEOF
12918 #define ${GLTYPE}_SUFFIX $result
12919 _ACEOF
12920
12921 done
12922
12923
12924
12925 if test $GNULIB_OVERRIDES_WINT_T = 1; then
12926 BITSIZEOF_WINT_T=32
12927 fi
12928
12929 ;;
12930 esac
12931
12932
12933
12934 LIMITS_H='limits.h'
12935 if test -n "$LIMITS_H"; then
12936 GL_GENERATE_LIMITS_H_TRUE=
12937 GL_GENERATE_LIMITS_H_FALSE='#'
12938 else
12939 GL_GENERATE_LIMITS_H_TRUE='#'
12940 GL_GENERATE_LIMITS_H_FALSE=
12941 fi
12942
12943
12944
12945
12946
12947
12948
12949 if test -n "$STDINT_H"; then
12950 GL_GENERATE_STDINT_H_TRUE=
12951 GL_GENERATE_STDINT_H_FALSE='#'
12952 else
12953 GL_GENERATE_STDINT_H_TRUE='#'
12954 GL_GENERATE_STDINT_H_FALSE=
12955 fi
12956
12957
12958
12959 GNULIB_IMAXABS=0;
12960 GNULIB_IMAXDIV=0;
12961 GNULIB_STRTOIMAX=0;
12962 GNULIB_STRTOUMAX=0;
12963 HAVE_DECL_IMAXABS=1;
12964 HAVE_DECL_IMAXDIV=1;
12965 HAVE_DECL_STRTOIMAX=1;
12966 HAVE_DECL_STRTOUMAX=1;
12967 HAVE_IMAXDIV_T=1;
12968 REPLACE_STRTOIMAX=0;
12969 REPLACE_STRTOUMAX=0;
12970 INT32_MAX_LT_INTMAX_MAX=1;
12971 INT64_MAX_EQ_LONG_MAX='defined _LP64';
12972 PRIPTR_PREFIX=__PRIPTR_PREFIX;
12973 UINT32_MAX_LT_UINTMAX_MAX=1;
12974 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990 if test $gl_cv_have_include_next = yes; then
12991 gl_cv_next_inttypes_h='<'inttypes.h'>'
12992 else
12993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
12994 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
12995 if ${gl_cv_next_inttypes_h+:} false; then :
12996 $as_echo_n "(cached) " >&6
12997 else
12998
12999 if test $ac_cv_header_inttypes_h = yes; then
13000
13001
13002
13003
13004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13005 /* end confdefs.h. */
13006 #include <inttypes.h>
13007 _ACEOF
13008 case "$host_os" in
13009 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13010 *) gl_absname_cpp="$ac_cpp" ;;
13011 esac
13012
13013 case "$host_os" in
13014 mingw*)
13015 gl_dirsep_regex='[/\\]'
13016 ;;
13017 *)
13018 gl_dirsep_regex='\/'
13019 ;;
13020 esac
13021 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13022 gl_header_literal_regex=`echo 'inttypes.h' \
13023 | sed -e "$gl_make_literal_regex_sed"`
13024 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13025 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13026 s|^/[^/]|//&|
13027 p
13028 q
13029 }'
13030
13031 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13032 sed -n "$gl_absolute_header_sed"`
13033
13034 gl_header=$gl_cv_absolute_inttypes_h
13035 gl_cv_next_inttypes_h='"'$gl_header'"'
13036 else
13037 gl_cv_next_inttypes_h='<'inttypes.h'>'
13038 fi
13039
13040
13041 fi
13042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13043 $as_echo "$gl_cv_next_inttypes_h" >&6; }
13044 fi
13045 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
13046
13047 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13048 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13049 gl_next_as_first_directive='<'inttypes.h'>'
13050 else
13051 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13052 gl_next_as_first_directive=$gl_cv_next_inttypes_h
13053 fi
13054 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
13072 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
13073 if ${gl_cv_cc_double_expbit0+:} false; then :
13074 $as_echo_n "(cached) " >&6
13075 else
13076
13077 if test "$cross_compiling" = yes; then :
13078
13079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13080 /* end confdefs.h. */
13081
13082 #if defined arm || defined __arm || defined __arm__
13083 mixed_endianness
13084 #endif
13085
13086 _ACEOF
13087 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13088 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
13089 gl_cv_cc_double_expbit0="unknown"
13090 else
13091
13092 :
13093 if ${ac_cv_c_bigendian+:} false; then :
13094 $as_echo_n "(cached) " >&6
13095 else
13096 ac_cv_c_bigendian=unknown
13097 # See if we're dealing with a universal compiler.
13098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13099 /* end confdefs.h. */
13100 #ifndef __APPLE_CC__
13101 not a universal capable compiler
13102 #endif
13103 typedef int dummy;
13104
13105 _ACEOF
13106 if ac_fn_c_try_compile "$LINENO"; then :
13107
13108 # Check for potential -arch flags. It is not universal unless
13109 # there are at least two -arch flags with different values.
13110 ac_arch=
13111 ac_prev=
13112 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13113 if test -n "$ac_prev"; then
13114 case $ac_word in
13115 i?86 | x86_64 | ppc | ppc64)
13116 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13117 ac_arch=$ac_word
13118 else
13119 ac_cv_c_bigendian=universal
13120 break
13121 fi
13122 ;;
13123 esac
13124 ac_prev=
13125 elif test "x$ac_word" = "x-arch"; then
13126 ac_prev=arch
13127 fi
13128 done
13129 fi
13130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13131 if test $ac_cv_c_bigendian = unknown; then
13132 # See if sys/param.h defines the BYTE_ORDER macro.
13133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13134 /* end confdefs.h. */
13135 #include <sys/types.h>
13136 #include <sys/param.h>
13137
13138 int
13139 main ()
13140 {
13141 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13142 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13143 && LITTLE_ENDIAN)
13144 bogus endian macros
13145 #endif
13146
13147 ;
13148 return 0;
13149 }
13150 _ACEOF
13151 if ac_fn_c_try_compile "$LINENO"; then :
13152 # It does; now see whether it defined to BIG_ENDIAN or not.
13153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13154 /* end confdefs.h. */
13155 #include <sys/types.h>
13156 #include <sys/param.h>
13157
13158 int
13159 main ()
13160 {
13161 #if BYTE_ORDER != BIG_ENDIAN
13162 not big endian
13163 #endif
13164
13165 ;
13166 return 0;
13167 }
13168 _ACEOF
13169 if ac_fn_c_try_compile "$LINENO"; then :
13170 ac_cv_c_bigendian=yes
13171 else
13172 ac_cv_c_bigendian=no
13173 fi
13174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13175 fi
13176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13177 fi
13178 if test $ac_cv_c_bigendian = unknown; then
13179 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13181 /* end confdefs.h. */
13182 #include <limits.h>
13183
13184 int
13185 main ()
13186 {
13187 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13188 bogus endian macros
13189 #endif
13190
13191 ;
13192 return 0;
13193 }
13194 _ACEOF
13195 if ac_fn_c_try_compile "$LINENO"; then :
13196 # It does; now see whether it defined to _BIG_ENDIAN or not.
13197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13198 /* end confdefs.h. */
13199 #include <limits.h>
13200
13201 int
13202 main ()
13203 {
13204 #ifndef _BIG_ENDIAN
13205 not big endian
13206 #endif
13207
13208 ;
13209 return 0;
13210 }
13211 _ACEOF
13212 if ac_fn_c_try_compile "$LINENO"; then :
13213 ac_cv_c_bigendian=yes
13214 else
13215 ac_cv_c_bigendian=no
13216 fi
13217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13218 fi
13219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13220 fi
13221 if test $ac_cv_c_bigendian = unknown; then
13222 # Compile a test program.
13223 if test "$cross_compiling" = yes; then :
13224 # Try to guess by grepping values from an object file.
13225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13226 /* end confdefs.h. */
13227 short int ascii_mm[] =
13228 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13229 short int ascii_ii[] =
13230 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13231 int use_ascii (int i) {
13232 return ascii_mm[i] + ascii_ii[i];
13233 }
13234 short int ebcdic_ii[] =
13235 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13236 short int ebcdic_mm[] =
13237 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13238 int use_ebcdic (int i) {
13239 return ebcdic_mm[i] + ebcdic_ii[i];
13240 }
13241 extern int foo;
13242
13243 int
13244 main ()
13245 {
13246 return use_ascii (foo) == use_ebcdic (foo);
13247 ;
13248 return 0;
13249 }
13250 _ACEOF
13251 if ac_fn_c_try_compile "$LINENO"; then :
13252 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13253 ac_cv_c_bigendian=yes
13254 fi
13255 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13256 if test "$ac_cv_c_bigendian" = unknown; then
13257 ac_cv_c_bigendian=no
13258 else
13259 # finding both strings is unlikely to happen, but who knows?
13260 ac_cv_c_bigendian=unknown
13261 fi
13262 fi
13263 fi
13264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13265 else
13266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13267 /* end confdefs.h. */
13268 $ac_includes_default
13269 int
13270 main ()
13271 {
13272
13273 /* Are we little or big endian? From Harbison&Steele. */
13274 union
13275 {
13276 long int l;
13277 char c[sizeof (long int)];
13278 } u;
13279 u.l = 1;
13280 return u.c[sizeof (long int) - 1] == 1;
13281
13282 ;
13283 return 0;
13284 }
13285 _ACEOF
13286 if ac_fn_c_try_run "$LINENO"; then :
13287 ac_cv_c_bigendian=no
13288 else
13289 ac_cv_c_bigendian=yes
13290 fi
13291 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13292 conftest.$ac_objext conftest.beam conftest.$ac_ext
13293 fi
13294
13295 fi
13296 fi
13297 :
13298 case $ac_cv_c_bigendian in #(
13299 yes)
13300 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
13301 no)
13302 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
13303 universal)
13304
13305 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13306
13307 ;; #(
13308 *)
13309 gl_cv_cc_double_expbit0="unknown" ;;
13310 esac
13311
13312
13313 fi
13314 rm -f conftest*
13315
13316
13317 else
13318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13319 /* end confdefs.h. */
13320
13321 #include <float.h>
13322 #include <stddef.h>
13323 #include <stdio.h>
13324 #include <string.h>
13325 #define NWORDS \
13326 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13327 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
13328 static unsigned int ored_words[NWORDS];
13329 static unsigned int anded_words[NWORDS];
13330 static void add_to_ored_words (double x)
13331 {
13332 memory_double m;
13333 size_t i;
13334 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
13335 memset (&m, 0, sizeof (memory_double));
13336 m.value = x;
13337 for (i = 0; i < NWORDS; i++)
13338 {
13339 ored_words[i] |= m.word[i];
13340 anded_words[i] &= m.word[i];
13341 }
13342 }
13343 int main ()
13344 {
13345 size_t j;
13346 FILE *fp = fopen ("conftest.out", "w");
13347 if (fp == NULL)
13348 return 1;
13349 for (j = 0; j < NWORDS; j++)
13350 anded_words[j] = ~ (unsigned int) 0;
13351 add_to_ored_words (0.25);
13352 add_to_ored_words (0.5);
13353 add_to_ored_words (1.0);
13354 add_to_ored_words (2.0);
13355 add_to_ored_words (4.0);
13356 /* Remove bits that are common (e.g. if representation of the first mantissa
13357 bit is explicit). */
13358 for (j = 0; j < NWORDS; j++)
13359 ored_words[j] &= ~anded_words[j];
13360 /* Now find the nonzero word. */
13361 for (j = 0; j < NWORDS; j++)
13362 if (ored_words[j] != 0)
13363 break;
13364 if (j < NWORDS)
13365 {
13366 size_t i;
13367 for (i = j + 1; i < NWORDS; i++)
13368 if (ored_words[i] != 0)
13369 {
13370 fprintf (fp, "unknown");
13371 return (fclose (fp) != 0);
13372 }
13373 for (i = 0; ; i++)
13374 if ((ored_words[j] >> i) & 1)
13375 {
13376 fprintf (fp, "word %d bit %d", (int) j, (int) i);
13377 return (fclose (fp) != 0);
13378 }
13379 }
13380 fprintf (fp, "unknown");
13381 return (fclose (fp) != 0);
13382 }
13383
13384 _ACEOF
13385 if ac_fn_c_try_run "$LINENO"; then :
13386 gl_cv_cc_double_expbit0=`cat conftest.out`
13387 else
13388 gl_cv_cc_double_expbit0="unknown"
13389 fi
13390 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13391 conftest.$ac_objext conftest.beam conftest.$ac_ext
13392 fi
13393
13394 rm -f conftest.out
13395
13396 fi
13397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
13398 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
13399 case "$gl_cv_cc_double_expbit0" in
13400 word*bit*)
13401 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13402 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
13403
13404 cat >>confdefs.h <<_ACEOF
13405 #define DBL_EXPBIT0_WORD $word
13406 _ACEOF
13407
13408
13409 cat >>confdefs.h <<_ACEOF
13410 #define DBL_EXPBIT0_BIT $bit
13411 _ACEOF
13412
13413 ;;
13414 esac
13415
13416
13417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13418 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13419 if ${ac_cv_c_bigendian+:} false; then :
13420 $as_echo_n "(cached) " >&6
13421 else
13422 ac_cv_c_bigendian=unknown
13423 # See if we're dealing with a universal compiler.
13424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13425 /* end confdefs.h. */
13426 #ifndef __APPLE_CC__
13427 not a universal capable compiler
13428 #endif
13429 typedef int dummy;
13430
13431 _ACEOF
13432 if ac_fn_c_try_compile "$LINENO"; then :
13433
13434 # Check for potential -arch flags. It is not universal unless
13435 # there are at least two -arch flags with different values.
13436 ac_arch=
13437 ac_prev=
13438 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13439 if test -n "$ac_prev"; then
13440 case $ac_word in
13441 i?86 | x86_64 | ppc | ppc64)
13442 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13443 ac_arch=$ac_word
13444 else
13445 ac_cv_c_bigendian=universal
13446 break
13447 fi
13448 ;;
13449 esac
13450 ac_prev=
13451 elif test "x$ac_word" = "x-arch"; then
13452 ac_prev=arch
13453 fi
13454 done
13455 fi
13456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13457 if test $ac_cv_c_bigendian = unknown; then
13458 # See if sys/param.h defines the BYTE_ORDER macro.
13459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13460 /* end confdefs.h. */
13461 #include <sys/types.h>
13462 #include <sys/param.h>
13463
13464 int
13465 main ()
13466 {
13467 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13468 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13469 && LITTLE_ENDIAN)
13470 bogus endian macros
13471 #endif
13472
13473 ;
13474 return 0;
13475 }
13476 _ACEOF
13477 if ac_fn_c_try_compile "$LINENO"; then :
13478 # It does; now see whether it defined to BIG_ENDIAN or not.
13479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13480 /* end confdefs.h. */
13481 #include <sys/types.h>
13482 #include <sys/param.h>
13483
13484 int
13485 main ()
13486 {
13487 #if BYTE_ORDER != BIG_ENDIAN
13488 not big endian
13489 #endif
13490
13491 ;
13492 return 0;
13493 }
13494 _ACEOF
13495 if ac_fn_c_try_compile "$LINENO"; then :
13496 ac_cv_c_bigendian=yes
13497 else
13498 ac_cv_c_bigendian=no
13499 fi
13500 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13501 fi
13502 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13503 fi
13504 if test $ac_cv_c_bigendian = unknown; then
13505 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13507 /* end confdefs.h. */
13508 #include <limits.h>
13509
13510 int
13511 main ()
13512 {
13513 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13514 bogus endian macros
13515 #endif
13516
13517 ;
13518 return 0;
13519 }
13520 _ACEOF
13521 if ac_fn_c_try_compile "$LINENO"; then :
13522 # It does; now see whether it defined to _BIG_ENDIAN or not.
13523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13524 /* end confdefs.h. */
13525 #include <limits.h>
13526
13527 int
13528 main ()
13529 {
13530 #ifndef _BIG_ENDIAN
13531 not big endian
13532 #endif
13533
13534 ;
13535 return 0;
13536 }
13537 _ACEOF
13538 if ac_fn_c_try_compile "$LINENO"; then :
13539 ac_cv_c_bigendian=yes
13540 else
13541 ac_cv_c_bigendian=no
13542 fi
13543 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13544 fi
13545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13546 fi
13547 if test $ac_cv_c_bigendian = unknown; then
13548 # Compile a test program.
13549 if test "$cross_compiling" = yes; then :
13550 # Try to guess by grepping values from an object file.
13551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13552 /* end confdefs.h. */
13553 short int ascii_mm[] =
13554 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13555 short int ascii_ii[] =
13556 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13557 int use_ascii (int i) {
13558 return ascii_mm[i] + ascii_ii[i];
13559 }
13560 short int ebcdic_ii[] =
13561 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13562 short int ebcdic_mm[] =
13563 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13564 int use_ebcdic (int i) {
13565 return ebcdic_mm[i] + ebcdic_ii[i];
13566 }
13567 extern int foo;
13568
13569 int
13570 main ()
13571 {
13572 return use_ascii (foo) == use_ebcdic (foo);
13573 ;
13574 return 0;
13575 }
13576 _ACEOF
13577 if ac_fn_c_try_compile "$LINENO"; then :
13578 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13579 ac_cv_c_bigendian=yes
13580 fi
13581 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13582 if test "$ac_cv_c_bigendian" = unknown; then
13583 ac_cv_c_bigendian=no
13584 else
13585 # finding both strings is unlikely to happen, but who knows?
13586 ac_cv_c_bigendian=unknown
13587 fi
13588 fi
13589 fi
13590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13591 else
13592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13593 /* end confdefs.h. */
13594 $ac_includes_default
13595 int
13596 main ()
13597 {
13598
13599 /* Are we little or big endian? From Harbison&Steele. */
13600 union
13601 {
13602 long int l;
13603 char c[sizeof (long int)];
13604 } u;
13605 u.l = 1;
13606 return u.c[sizeof (long int) - 1] == 1;
13607
13608 ;
13609 return 0;
13610 }
13611 _ACEOF
13612 if ac_fn_c_try_run "$LINENO"; then :
13613 ac_cv_c_bigendian=no
13614 else
13615 ac_cv_c_bigendian=yes
13616 fi
13617 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13618 conftest.$ac_objext conftest.beam conftest.$ac_ext
13619 fi
13620
13621 fi
13622 fi
13623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13624 $as_echo "$ac_cv_c_bigendian" >&6; }
13625 case $ac_cv_c_bigendian in #(
13626 yes)
13627 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13628 ;; #(
13629 no)
13630 ;; #(
13631 universal)
13632
13633 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13634
13635 ;; #(
13636 *)
13637 as_fn_error $? "unknown endianness
13638 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13639 esac
13640
13641
13642
13643 GNULIB_LOCALECONV=0;
13644 GNULIB_SETLOCALE=0;
13645 GNULIB_SETLOCALE_NULL=0;
13646 GNULIB_DUPLOCALE=0;
13647 GNULIB_LOCALENAME=0;
13648 HAVE_NEWLOCALE=1;
13649 HAVE_DUPLOCALE=1;
13650 HAVE_FREELOCALE=1;
13651 REPLACE_LOCALECONV=0;
13652 REPLACE_SETLOCALE=0;
13653 REPLACE_NEWLOCALE=0;
13654 REPLACE_DUPLOCALE=0;
13655 REPLACE_FREELOCALE=0;
13656 REPLACE_STRUCT_LCONV=0;
13657
13658
13659 REPLACE_NULL=0;
13660 HAVE_MAX_ALIGN_T=1;
13661 HAVE_WCHAR_T=1;
13662
13663
13664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13665 $as_echo_n "checking for wchar_t... " >&6; }
13666 if ${gt_cv_c_wchar_t+:} false; then :
13667 $as_echo_n "(cached) " >&6
13668 else
13669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13670 /* end confdefs.h. */
13671 #include <stddef.h>
13672 wchar_t foo = (wchar_t)'\0';
13673 int
13674 main ()
13675 {
13676
13677 ;
13678 return 0;
13679 }
13680 _ACEOF
13681 if ac_fn_c_try_compile "$LINENO"; then :
13682 gt_cv_c_wchar_t=yes
13683 else
13684 gt_cv_c_wchar_t=no
13685 fi
13686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13687 fi
13688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13689 $as_echo "$gt_cv_c_wchar_t" >&6; }
13690 if test $gt_cv_c_wchar_t = yes; then
13691
13692 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13693
13694 fi
13695
13696
13697
13698
13699
13700
13701
13702 STDDEF_H=
13703
13704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
13705 $as_echo_n "checking for good max_align_t... " >&6; }
13706 if ${gl_cv_type_max_align_t+:} false; then :
13707 $as_echo_n "(cached) " >&6
13708 else
13709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13710 /* end confdefs.h. */
13711 #include <stddef.h>
13712 unsigned int s = sizeof (max_align_t);
13713 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
13714 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
13715 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
13716 #endif
13717 typedef struct { char a; max_align_t b; } max_helper;
13718 typedef struct { char a; long b; } long_helper;
13719 typedef struct { char a; double b; } double_helper;
13720 typedef struct { char a; long double b; } long_double_helper;
13721 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
13722 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
13723 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
13724
13725 int
13726 main ()
13727 {
13728
13729 ;
13730 return 0;
13731 }
13732 _ACEOF
13733 if ac_fn_c_try_compile "$LINENO"; then :
13734 gl_cv_type_max_align_t=yes
13735 else
13736 gl_cv_type_max_align_t=no
13737 fi
13738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13739
13740 fi
13741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
13742 $as_echo "$gl_cv_type_max_align_t" >&6; }
13743 if test $gl_cv_type_max_align_t = no; then
13744 HAVE_MAX_ALIGN_T=0
13745 STDDEF_H=stddef.h
13746 fi
13747
13748 if test $gt_cv_c_wchar_t = no; then
13749 HAVE_WCHAR_T=0
13750 STDDEF_H=stddef.h
13751 fi
13752
13753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
13754 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
13755 if ${gl_cv_decl_null_works+:} false; then :
13756 $as_echo_n "(cached) " >&6
13757 else
13758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13759 /* end confdefs.h. */
13760 #include <stddef.h>
13761 int test[2 * (sizeof NULL == sizeof (void *)) -1];
13762
13763 int
13764 main ()
13765 {
13766
13767 ;
13768 return 0;
13769 }
13770 _ACEOF
13771 if ac_fn_c_try_compile "$LINENO"; then :
13772 gl_cv_decl_null_works=yes
13773 else
13774 gl_cv_decl_null_works=no
13775 fi
13776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13777 fi
13778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
13779 $as_echo "$gl_cv_decl_null_works" >&6; }
13780 if test $gl_cv_decl_null_works = no; then
13781 REPLACE_NULL=1
13782 STDDEF_H=stddef.h
13783 fi
13784
13785
13786 if test -n "$STDDEF_H"; then
13787 GL_GENERATE_STDDEF_H_TRUE=
13788 GL_GENERATE_STDDEF_H_FALSE='#'
13789 else
13790 GL_GENERATE_STDDEF_H_TRUE='#'
13791 GL_GENERATE_STDDEF_H_FALSE=
13792 fi
13793
13794 if test -n "$STDDEF_H"; then
13795
13796
13797
13798
13799
13800
13801
13802
13803 if test $gl_cv_have_include_next = yes; then
13804 gl_cv_next_stddef_h='<'stddef.h'>'
13805 else
13806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
13807 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
13808 if ${gl_cv_next_stddef_h+:} false; then :
13809 $as_echo_n "(cached) " >&6
13810 else
13811
13812
13813
13814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13815 /* end confdefs.h. */
13816 #include <stddef.h>
13817 _ACEOF
13818 case "$host_os" in
13819 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13820 *) gl_absname_cpp="$ac_cpp" ;;
13821 esac
13822
13823 case "$host_os" in
13824 mingw*)
13825 gl_dirsep_regex='[/\\]'
13826 ;;
13827 *)
13828 gl_dirsep_regex='\/'
13829 ;;
13830 esac
13831 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13832 gl_header_literal_regex=`echo 'stddef.h' \
13833 | sed -e "$gl_make_literal_regex_sed"`
13834 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13835 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13836 s|^/[^/]|//&|
13837 p
13838 q
13839 }'
13840
13841 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13842 sed -n "$gl_absolute_header_sed"`
13843
13844 gl_header=$gl_cv_absolute_stddef_h
13845 gl_cv_next_stddef_h='"'$gl_header'"'
13846
13847
13848 fi
13849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
13850 $as_echo "$gl_cv_next_stddef_h" >&6; }
13851 fi
13852 NEXT_STDDEF_H=$gl_cv_next_stddef_h
13853
13854 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13855 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13856 gl_next_as_first_directive='<'stddef.h'>'
13857 else
13858 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13859 gl_next_as_first_directive=$gl_cv_next_stddef_h
13860 fi
13861 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
13862
13863
13864
13865
13866 fi
13867
13868
13869
13870
13871
13872
13873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
13874 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
13875 if ${gl_cv_header_locale_has_locale_t+:} false; then :
13876 $as_echo_n "(cached) " >&6
13877 else
13878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13879 /* end confdefs.h. */
13880 #include <locale.h>
13881 locale_t x;
13882 int
13883 main ()
13884 {
13885
13886 ;
13887 return 0;
13888 }
13889 _ACEOF
13890 if ac_fn_c_try_compile "$LINENO"; then :
13891 gl_cv_header_locale_has_locale_t=yes
13892 else
13893 gl_cv_header_locale_has_locale_t=no
13894 fi
13895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13896
13897 fi
13898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
13899 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
13900
13901
13902 if test $ac_cv_header_xlocale_h = yes; then
13903 HAVE_XLOCALE_H=1
13904 if test $gl_cv_header_locale_has_locale_t = yes; then
13905 gl_cv_header_locale_h_needs_xlocale_h=no
13906 else
13907 gl_cv_header_locale_h_needs_xlocale_h=yes
13908 fi
13909 HAVE_LOCALE_T=1
13910 else
13911 HAVE_XLOCALE_H=0
13912 gl_cv_header_locale_h_needs_xlocale_h=no
13913 if test $gl_cv_header_locale_has_locale_t = yes; then
13914 HAVE_LOCALE_T=1
13915 else
13916 HAVE_LOCALE_T=0
13917 fi
13918 fi
13919
13920
13921
13922
13923 gl_threads_api=none
13924 LIBTHREAD=
13925 LTLIBTHREAD=
13926 LIBMULTITHREAD=
13927 LTLIBMULTITHREAD=
13928 if test "$gl_use_threads" != no; then
13929
13930
13931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
13932 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
13933 if ${gl_cv_have_weak+:} false; then :
13934 $as_echo_n "(cached) " >&6
13935 else
13936 gl_cv_have_weak=no
13937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13938 /* end confdefs.h. */
13939 extern void xyzzy ();
13940 #pragma weak xyzzy
13941 int
13942 main ()
13943 {
13944 xyzzy();
13945 ;
13946 return 0;
13947 }
13948 _ACEOF
13949 if ac_fn_c_try_link "$LINENO"; then :
13950 gl_cv_have_weak=maybe
13951 fi
13952 rm -f core conftest.err conftest.$ac_objext \
13953 conftest$ac_exeext conftest.$ac_ext
13954 if test $gl_cv_have_weak = maybe; then
13955 if test "$cross_compiling" = yes; then :
13956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13957 /* end confdefs.h. */
13958 #ifdef __ELF__
13959 Extensible Linking Format
13960 #endif
13961
13962 _ACEOF
13963 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13964 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
13965 gl_cv_have_weak="guessing yes"
13966 else
13967 gl_cv_have_weak="guessing no"
13968 fi
13969 rm -f conftest*
13970
13971
13972 else
13973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13974 /* end confdefs.h. */
13975
13976 #include <stdio.h>
13977 #pragma weak fputs
13978 int main ()
13979 {
13980 return (fputs == NULL);
13981 }
13982 _ACEOF
13983 if ac_fn_c_try_run "$LINENO"; then :
13984 gl_cv_have_weak=yes
13985 else
13986 gl_cv_have_weak=no
13987 fi
13988 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13989 conftest.$ac_objext conftest.beam conftest.$ac_ext
13990 fi
13991
13992 fi
13993 case " $LDFLAGS " in
13994 *" -static "*) gl_cv_have_weak=no ;;
13995 esac
13996 case "$gl_cv_have_weak" in
13997 *yes)
13998 case "$host_os" in
13999 freebsd* | dragonfly*)
14000 : > conftest1.c
14001 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
14002 cat <<EOF > conftest2.c
14003 #include <pthread.h>
14004 #pragma weak pthread_mutexattr_gettype
14005 int main ()
14006 {
14007 return (pthread_mutexattr_gettype != NULL);
14008 }
14009 EOF
14010 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
14011 || gl_cv_have_weak=no
14012 rm -f conftest1.c libempty.so conftest2.c conftest
14013 ;;
14014 esac
14015 ;;
14016 esac
14017
14018 fi
14019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14020 $as_echo "$gl_cv_have_weak" >&6; }
14021 case "$gl_cv_have_weak" in
14022 *yes)
14023
14024 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
14025
14026 ;;
14027 esac
14028
14029 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14030
14031 :
14032 fi
14033 if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
14034
14035 gl_have_isoc_threads="$ac_cv_header_threads_h"
14036 fi
14037 if test "$gl_use_threads" = yes \
14038 || test "$gl_use_threads" = posix \
14039 || test "$gl_use_threads" = isoc+posix; then
14040
14041
14042 if test -z "$gl_pthreadlib_body_done"; then
14043 gl_pthread_api=no
14044 LIBPTHREAD=
14045 LIBPMULTITHREAD=
14046 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14047 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14048 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14049 if test "x$ac_cv_header_pthread_h" = xyes; then :
14050 gl_have_pthread_h=yes
14051 else
14052 gl_have_pthread_h=no
14053 fi
14054
14055
14056 if test "$gl_have_pthread_h" = yes; then
14057 # Other possible tests:
14058 # -lpthreads (FSU threads, PCthreads)
14059 # -lgthreads
14060 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14061 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14062 # the second one only in libpthread, and lock.c needs it.
14063 #
14064 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14065 # needs -pthread for some reason. See:
14066 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14067 save_LIBS=$LIBS
14068 for gl_pthread in '' '-pthread'; do
14069 LIBS="$LIBS $gl_pthread"
14070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14071 /* end confdefs.h. */
14072 #include <pthread.h>
14073 pthread_mutex_t m;
14074 pthread_mutexattr_t ma;
14075
14076 int
14077 main ()
14078 {
14079 pthread_mutex_lock (&m);
14080 pthread_mutexattr_init (&ma);
14081 ;
14082 return 0;
14083 }
14084 _ACEOF
14085 if ac_fn_c_try_link "$LINENO"; then :
14086 gl_pthread_api=yes
14087 LIBPTHREAD=$gl_pthread
14088 LIBPMULTITHREAD=$gl_pthread
14089 fi
14090 rm -f core conftest.err conftest.$ac_objext \
14091 conftest$ac_exeext conftest.$ac_ext
14092 LIBS=$save_LIBS
14093 test $gl_pthread_api = yes && break
14094 done
14095
14096 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14097 # since it is defined as a macro on OSF/1.)
14098 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14099 # The program links fine without libpthread. But it may actually
14100 # need to link with libpthread in order to create multiple threads.
14101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14102 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14103 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14104 $as_echo_n "(cached) " >&6
14105 else
14106 ac_check_lib_save_LIBS=$LIBS
14107 LIBS="-lpthread $LIBS"
14108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14109 /* end confdefs.h. */
14110
14111 /* Override any GCC internal prototype to avoid an error.
14112 Use char because int might match the return type of a GCC
14113 builtin and then its argument prototype would still apply. */
14114 #ifdef __cplusplus
14115 extern "C"
14116 #endif
14117 char pthread_kill ();
14118 int
14119 main ()
14120 {
14121 return pthread_kill ();
14122 ;
14123 return 0;
14124 }
14125 _ACEOF
14126 if ac_fn_c_try_link "$LINENO"; then :
14127 ac_cv_lib_pthread_pthread_kill=yes
14128 else
14129 ac_cv_lib_pthread_pthread_kill=no
14130 fi
14131 rm -f core conftest.err conftest.$ac_objext \
14132 conftest$ac_exeext conftest.$ac_ext
14133 LIBS=$ac_check_lib_save_LIBS
14134 fi
14135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14136 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14137 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14138 LIBPMULTITHREAD=-lpthread
14139 # On Solaris and HP-UX, most pthread functions exist also in libc.
14140 # Therefore pthread_in_use() needs to actually try to create a
14141 # thread: pthread_create from libc will fail, whereas
14142 # pthread_create will actually create a thread.
14143 # On Solaris 10 or newer, this test is no longer needed, because
14144 # libc contains the fully functional pthread functions.
14145 case "$host_os" in
14146 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
14147
14148 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14149
14150 esac
14151
14152 fi
14153
14154 elif test $gl_pthread_api != yes; then
14155 # Some library is needed. Try libpthread and libc_r.
14156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14157 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14158 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14159 $as_echo_n "(cached) " >&6
14160 else
14161 ac_check_lib_save_LIBS=$LIBS
14162 LIBS="-lpthread $LIBS"
14163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14164 /* end confdefs.h. */
14165
14166 /* Override any GCC internal prototype to avoid an error.
14167 Use char because int might match the return type of a GCC
14168 builtin and then its argument prototype would still apply. */
14169 #ifdef __cplusplus
14170 extern "C"
14171 #endif
14172 char pthread_kill ();
14173 int
14174 main ()
14175 {
14176 return pthread_kill ();
14177 ;
14178 return 0;
14179 }
14180 _ACEOF
14181 if ac_fn_c_try_link "$LINENO"; then :
14182 ac_cv_lib_pthread_pthread_kill=yes
14183 else
14184 ac_cv_lib_pthread_pthread_kill=no
14185 fi
14186 rm -f core conftest.err conftest.$ac_objext \
14187 conftest$ac_exeext conftest.$ac_ext
14188 LIBS=$ac_check_lib_save_LIBS
14189 fi
14190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14191 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14192 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14193 gl_pthread_api=yes
14194 LIBPTHREAD=-lpthread
14195 LIBPMULTITHREAD=-lpthread
14196 fi
14197
14198 if test $gl_pthread_api != yes; then
14199 # For FreeBSD 4.
14200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
14201 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
14202 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
14203 $as_echo_n "(cached) " >&6
14204 else
14205 ac_check_lib_save_LIBS=$LIBS
14206 LIBS="-lc_r $LIBS"
14207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14208 /* end confdefs.h. */
14209
14210 /* Override any GCC internal prototype to avoid an error.
14211 Use char because int might match the return type of a GCC
14212 builtin and then its argument prototype would still apply. */
14213 #ifdef __cplusplus
14214 extern "C"
14215 #endif
14216 char pthread_kill ();
14217 int
14218 main ()
14219 {
14220 return pthread_kill ();
14221 ;
14222 return 0;
14223 }
14224 _ACEOF
14225 if ac_fn_c_try_link "$LINENO"; then :
14226 ac_cv_lib_c_r_pthread_kill=yes
14227 else
14228 ac_cv_lib_c_r_pthread_kill=no
14229 fi
14230 rm -f core conftest.err conftest.$ac_objext \
14231 conftest$ac_exeext conftest.$ac_ext
14232 LIBS=$ac_check_lib_save_LIBS
14233 fi
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
14235 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
14236 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
14237 gl_pthread_api=yes
14238 LIBPTHREAD=-lc_r
14239 LIBPMULTITHREAD=-lc_r
14240 fi
14241
14242 fi
14243 fi
14244 fi
14245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
14246 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
14247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
14248 $as_echo "$gl_pthread_api" >&6; }
14249
14250
14251 if test $gl_pthread_api = yes; then
14252
14253 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
14254
14255 fi
14256
14257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14258 /* end confdefs.h. */
14259 #include <sched.h>
14260 int
14261 main ()
14262 {
14263 sched_yield ();
14264 ;
14265 return 0;
14266 }
14267 _ACEOF
14268 if ac_fn_c_try_link "$LINENO"; then :
14269 LIB_SCHED_YIELD=
14270
14271 else
14272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
14273 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
14274 if ${ac_cv_lib_rt_sched_yield+:} false; then :
14275 $as_echo_n "(cached) " >&6
14276 else
14277 ac_check_lib_save_LIBS=$LIBS
14278 LIBS="-lrt $LIBS"
14279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14280 /* end confdefs.h. */
14281
14282 /* Override any GCC internal prototype to avoid an error.
14283 Use char because int might match the return type of a GCC
14284 builtin and then its argument prototype would still apply. */
14285 #ifdef __cplusplus
14286 extern "C"
14287 #endif
14288 char sched_yield ();
14289 int
14290 main ()
14291 {
14292 return sched_yield ();
14293 ;
14294 return 0;
14295 }
14296 _ACEOF
14297 if ac_fn_c_try_link "$LINENO"; then :
14298 ac_cv_lib_rt_sched_yield=yes
14299 else
14300 ac_cv_lib_rt_sched_yield=no
14301 fi
14302 rm -f core conftest.err conftest.$ac_objext \
14303 conftest$ac_exeext conftest.$ac_ext
14304 LIBS=$ac_check_lib_save_LIBS
14305 fi
14306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
14307 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
14308 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
14309 LIB_SCHED_YIELD=-lrt
14310 else
14311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
14312 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
14313 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
14314 $as_echo_n "(cached) " >&6
14315 else
14316 ac_check_lib_save_LIBS=$LIBS
14317 LIBS="-lposix4 $LIBS"
14318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14319 /* end confdefs.h. */
14320
14321 /* Override any GCC internal prototype to avoid an error.
14322 Use char because int might match the return type of a GCC
14323 builtin and then its argument prototype would still apply. */
14324 #ifdef __cplusplus
14325 extern "C"
14326 #endif
14327 char sched_yield ();
14328 int
14329 main ()
14330 {
14331 return sched_yield ();
14332 ;
14333 return 0;
14334 }
14335 _ACEOF
14336 if ac_fn_c_try_link "$LINENO"; then :
14337 ac_cv_lib_posix4_sched_yield=yes
14338 else
14339 ac_cv_lib_posix4_sched_yield=no
14340 fi
14341 rm -f core conftest.err conftest.$ac_objext \
14342 conftest$ac_exeext conftest.$ac_ext
14343 LIBS=$ac_check_lib_save_LIBS
14344 fi
14345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
14346 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
14347 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
14348 LIB_SCHED_YIELD=-lposix4
14349 fi
14350
14351 fi
14352
14353
14354 fi
14355 rm -f core conftest.err conftest.$ac_objext \
14356 conftest$ac_exeext conftest.$ac_ext
14357
14358
14359 gl_pthreadlib_body_done=done
14360 fi
14361
14362 LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
14363 LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
14364 if test $gl_pthread_api = yes; then
14365 if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
14366 gl_threads_api='isoc+posix'
14367
14368 $as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
14369
14370 LIBTHREAD= LTLIBTHREAD=
14371 else
14372 gl_threads_api=posix
14373
14374 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
14375
14376 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14377 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14378
14379 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
14380
14381 LIBTHREAD= LTLIBTHREAD=
14382 else
14383 case "$host_os" in
14384 freebsd* | dragonfly*)
14385 if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
14386
14387 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14388
14389 fi
14390 ;;
14391 esac
14392 fi
14393 fi
14394 fi
14395 fi
14396 fi
14397 if test $gl_threads_api = none; then
14398 if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
14399
14400
14401
14402 if test -z "$gl_stdthreadlib_body_done"; then
14403
14404
14405 case "$host_os" in
14406 mingw*)
14407 LIBSTDTHREAD=
14408 ;;
14409 *)
14410
14411
14412 if test -z "$gl_pthreadlib_body_done"; then
14413 gl_pthread_api=no
14414 LIBPTHREAD=
14415 LIBPMULTITHREAD=
14416 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14417 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14418 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14419 if test "x$ac_cv_header_pthread_h" = xyes; then :
14420 gl_have_pthread_h=yes
14421 else
14422 gl_have_pthread_h=no
14423 fi
14424
14425
14426 if test "$gl_have_pthread_h" = yes; then
14427 # Other possible tests:
14428 # -lpthreads (FSU threads, PCthreads)
14429 # -lgthreads
14430 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14431 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14432 # the second one only in libpthread, and lock.c needs it.
14433 #
14434 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14435 # needs -pthread for some reason. See:
14436 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14437 save_LIBS=$LIBS
14438 for gl_pthread in '' '-pthread'; do
14439 LIBS="$LIBS $gl_pthread"
14440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14441 /* end confdefs.h. */
14442 #include <pthread.h>
14443 pthread_mutex_t m;
14444 pthread_mutexattr_t ma;
14445
14446 int
14447 main ()
14448 {
14449 pthread_mutex_lock (&m);
14450 pthread_mutexattr_init (&ma);
14451 ;
14452 return 0;
14453 }
14454 _ACEOF
14455 if ac_fn_c_try_link "$LINENO"; then :
14456 gl_pthread_api=yes
14457 LIBPTHREAD=$gl_pthread
14458 LIBPMULTITHREAD=$gl_pthread
14459 fi
14460 rm -f core conftest.err conftest.$ac_objext \
14461 conftest$ac_exeext conftest.$ac_ext
14462 LIBS=$save_LIBS
14463 test $gl_pthread_api = yes && break
14464 done
14465
14466 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14467 # since it is defined as a macro on OSF/1.)
14468 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14469 # The program links fine without libpthread. But it may actually
14470 # need to link with libpthread in order to create multiple threads.
14471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14472 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14473 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14474 $as_echo_n "(cached) " >&6
14475 else
14476 ac_check_lib_save_LIBS=$LIBS
14477 LIBS="-lpthread $LIBS"
14478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14479 /* end confdefs.h. */
14480
14481 /* Override any GCC internal prototype to avoid an error.
14482 Use char because int might match the return type of a GCC
14483 builtin and then its argument prototype would still apply. */
14484 #ifdef __cplusplus
14485 extern "C"
14486 #endif
14487 char pthread_kill ();
14488 int
14489 main ()
14490 {
14491 return pthread_kill ();
14492 ;
14493 return 0;
14494 }
14495 _ACEOF
14496 if ac_fn_c_try_link "$LINENO"; then :
14497 ac_cv_lib_pthread_pthread_kill=yes
14498 else
14499 ac_cv_lib_pthread_pthread_kill=no
14500 fi
14501 rm -f core conftest.err conftest.$ac_objext \
14502 conftest$ac_exeext conftest.$ac_ext
14503 LIBS=$ac_check_lib_save_LIBS
14504 fi
14505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14506 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14507 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14508 LIBPMULTITHREAD=-lpthread
14509 # On Solaris and HP-UX, most pthread functions exist also in libc.
14510 # Therefore pthread_in_use() needs to actually try to create a
14511 # thread: pthread_create from libc will fail, whereas
14512 # pthread_create will actually create a thread.
14513 # On Solaris 10 or newer, this test is no longer needed, because
14514 # libc contains the fully functional pthread functions.
14515 case "$host_os" in
14516 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
14517
14518 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14519
14520 esac
14521
14522 fi
14523
14524 elif test $gl_pthread_api != yes; then
14525 # Some library is needed. Try libpthread and libc_r.
14526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14527 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14528 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14529 $as_echo_n "(cached) " >&6
14530 else
14531 ac_check_lib_save_LIBS=$LIBS
14532 LIBS="-lpthread $LIBS"
14533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14534 /* end confdefs.h. */
14535
14536 /* Override any GCC internal prototype to avoid an error.
14537 Use char because int might match the return type of a GCC
14538 builtin and then its argument prototype would still apply. */
14539 #ifdef __cplusplus
14540 extern "C"
14541 #endif
14542 char pthread_kill ();
14543 int
14544 main ()
14545 {
14546 return pthread_kill ();
14547 ;
14548 return 0;
14549 }
14550 _ACEOF
14551 if ac_fn_c_try_link "$LINENO"; then :
14552 ac_cv_lib_pthread_pthread_kill=yes
14553 else
14554 ac_cv_lib_pthread_pthread_kill=no
14555 fi
14556 rm -f core conftest.err conftest.$ac_objext \
14557 conftest$ac_exeext conftest.$ac_ext
14558 LIBS=$ac_check_lib_save_LIBS
14559 fi
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14561 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14562 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14563 gl_pthread_api=yes
14564 LIBPTHREAD=-lpthread
14565 LIBPMULTITHREAD=-lpthread
14566 fi
14567
14568 if test $gl_pthread_api != yes; then
14569 # For FreeBSD 4.
14570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
14571 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
14572 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
14573 $as_echo_n "(cached) " >&6
14574 else
14575 ac_check_lib_save_LIBS=$LIBS
14576 LIBS="-lc_r $LIBS"
14577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14578 /* end confdefs.h. */
14579
14580 /* Override any GCC internal prototype to avoid an error.
14581 Use char because int might match the return type of a GCC
14582 builtin and then its argument prototype would still apply. */
14583 #ifdef __cplusplus
14584 extern "C"
14585 #endif
14586 char pthread_kill ();
14587 int
14588 main ()
14589 {
14590 return pthread_kill ();
14591 ;
14592 return 0;
14593 }
14594 _ACEOF
14595 if ac_fn_c_try_link "$LINENO"; then :
14596 ac_cv_lib_c_r_pthread_kill=yes
14597 else
14598 ac_cv_lib_c_r_pthread_kill=no
14599 fi
14600 rm -f core conftest.err conftest.$ac_objext \
14601 conftest$ac_exeext conftest.$ac_ext
14602 LIBS=$ac_check_lib_save_LIBS
14603 fi
14604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
14605 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
14606 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
14607 gl_pthread_api=yes
14608 LIBPTHREAD=-lc_r
14609 LIBPMULTITHREAD=-lc_r
14610 fi
14611
14612 fi
14613 fi
14614 fi
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
14616 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
14617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
14618 $as_echo "$gl_pthread_api" >&6; }
14619
14620
14621 if test $gl_pthread_api = yes; then
14622
14623 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
14624
14625 fi
14626
14627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14628 /* end confdefs.h. */
14629 #include <sched.h>
14630 int
14631 main ()
14632 {
14633 sched_yield ();
14634 ;
14635 return 0;
14636 }
14637 _ACEOF
14638 if ac_fn_c_try_link "$LINENO"; then :
14639 LIB_SCHED_YIELD=
14640
14641 else
14642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
14643 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
14644 if ${ac_cv_lib_rt_sched_yield+:} false; then :
14645 $as_echo_n "(cached) " >&6
14646 else
14647 ac_check_lib_save_LIBS=$LIBS
14648 LIBS="-lrt $LIBS"
14649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14650 /* end confdefs.h. */
14651
14652 /* Override any GCC internal prototype to avoid an error.
14653 Use char because int might match the return type of a GCC
14654 builtin and then its argument prototype would still apply. */
14655 #ifdef __cplusplus
14656 extern "C"
14657 #endif
14658 char sched_yield ();
14659 int
14660 main ()
14661 {
14662 return sched_yield ();
14663 ;
14664 return 0;
14665 }
14666 _ACEOF
14667 if ac_fn_c_try_link "$LINENO"; then :
14668 ac_cv_lib_rt_sched_yield=yes
14669 else
14670 ac_cv_lib_rt_sched_yield=no
14671 fi
14672 rm -f core conftest.err conftest.$ac_objext \
14673 conftest$ac_exeext conftest.$ac_ext
14674 LIBS=$ac_check_lib_save_LIBS
14675 fi
14676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
14677 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
14678 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
14679 LIB_SCHED_YIELD=-lrt
14680 else
14681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
14682 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
14683 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
14684 $as_echo_n "(cached) " >&6
14685 else
14686 ac_check_lib_save_LIBS=$LIBS
14687 LIBS="-lposix4 $LIBS"
14688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14689 /* end confdefs.h. */
14690
14691 /* Override any GCC internal prototype to avoid an error.
14692 Use char because int might match the return type of a GCC
14693 builtin and then its argument prototype would still apply. */
14694 #ifdef __cplusplus
14695 extern "C"
14696 #endif
14697 char sched_yield ();
14698 int
14699 main ()
14700 {
14701 return sched_yield ();
14702 ;
14703 return 0;
14704 }
14705 _ACEOF
14706 if ac_fn_c_try_link "$LINENO"; then :
14707 ac_cv_lib_posix4_sched_yield=yes
14708 else
14709 ac_cv_lib_posix4_sched_yield=no
14710 fi
14711 rm -f core conftest.err conftest.$ac_objext \
14712 conftest$ac_exeext conftest.$ac_ext
14713 LIBS=$ac_check_lib_save_LIBS
14714 fi
14715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
14716 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
14717 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
14718 LIB_SCHED_YIELD=-lposix4
14719 fi
14720
14721 fi
14722
14723
14724 fi
14725 rm -f core conftest.err conftest.$ac_objext \
14726 conftest$ac_exeext conftest.$ac_ext
14727
14728
14729 gl_pthreadlib_body_done=done
14730 fi
14731
14732 if test $ac_cv_header_threads_h = yes; then
14733 for ac_func in thrd_create
14734 do :
14735 ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
14736 if test "x$ac_cv_func_thrd_create" = xyes; then :
14737 cat >>confdefs.h <<_ACEOF
14738 #define HAVE_THRD_CREATE 1
14739 _ACEOF
14740
14741 fi
14742 done
14743
14744 if test $ac_cv_func_thrd_create = yes; then
14745 LIBSTDTHREAD=
14746 else
14747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
14748 $as_echo_n "checking for thrd_create in -lstdthreads... " >&6; }
14749 if ${ac_cv_lib_stdthreads_thrd_create+:} false; then :
14750 $as_echo_n "(cached) " >&6
14751 else
14752 ac_check_lib_save_LIBS=$LIBS
14753 LIBS="-lstdthreads $LIBS"
14754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14755 /* end confdefs.h. */
14756
14757 /* Override any GCC internal prototype to avoid an error.
14758 Use char because int might match the return type of a GCC
14759 builtin and then its argument prototype would still apply. */
14760 #ifdef __cplusplus
14761 extern "C"
14762 #endif
14763 char thrd_create ();
14764 int
14765 main ()
14766 {
14767 return thrd_create ();
14768 ;
14769 return 0;
14770 }
14771 _ACEOF
14772 if ac_fn_c_try_link "$LINENO"; then :
14773 ac_cv_lib_stdthreads_thrd_create=yes
14774 else
14775 ac_cv_lib_stdthreads_thrd_create=no
14776 fi
14777 rm -f core conftest.err conftest.$ac_objext \
14778 conftest$ac_exeext conftest.$ac_ext
14779 LIBS=$ac_check_lib_save_LIBS
14780 fi
14781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
14782 $as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; }
14783 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes; then :
14784
14785 LIBSTDTHREAD='-lstdthreads -lpthread'
14786
14787 else
14788
14789 LIBSTDTHREAD="$LIBPMULTITHREAD"
14790
14791 fi
14792
14793 fi
14794 else
14795 LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
14796 fi
14797 ;;
14798 esac
14799
14800
14801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
14802 $as_echo_n "checking whether ISO C threads API is available... " >&6; }
14803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
14804 $as_echo "$ac_cv_header_threads_h" >&6; }
14805 gl_stdthreadlib_body_done=done
14806 fi
14807
14808 LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
14809 LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
14810 gl_threads_api=isoc
14811
14812 $as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h
14813
14814 fi
14815 fi
14816 if test $gl_threads_api = none; then
14817 case "$gl_use_threads" in
14818 yes | windows | win32) # The 'win32' is for backward compatibility.
14819 if { case "$host_os" in
14820 mingw*) true;;
14821 *) false;;
14822 esac
14823 }; then
14824 gl_threads_api=windows
14825
14826 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
14827
14828 fi
14829 ;;
14830 esac
14831 fi
14832 fi
14833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
14834 $as_echo_n "checking for multithread API to use... " >&6; }
14835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
14836 $as_echo "$gl_threads_api" >&6; }
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
14850 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
14851 if ${gl_cv_func_malloc_posix+:} false; then :
14852 $as_echo_n "(cached) " >&6
14853 else
14854
14855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14856 /* end confdefs.h. */
14857
14858 int
14859 main ()
14860 {
14861 #if defined _WIN32 && ! defined __CYGWIN__
14862 choke me
14863 #endif
14864
14865 ;
14866 return 0;
14867 }
14868 _ACEOF
14869 if ac_fn_c_try_compile "$LINENO"; then :
14870 gl_cv_func_malloc_posix=yes
14871 else
14872 gl_cv_func_malloc_posix=no
14873 fi
14874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14875
14876 fi
14877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
14878 $as_echo "$gl_cv_func_malloc_posix" >&6; }
14879
14880
14881
14882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
14883 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
14884 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
14885 $as_echo_n "(cached) " >&6
14886 else
14887 if test "$cross_compiling" = yes; then :
14888 case "$host_os" in
14889 # Guess yes on platforms where we know the result.
14890 *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
14891 | hpux* | solaris* | cygwin* | mingw*)
14892 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
14893 # If we don't know, obey --enable-cross-guesses.
14894 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
14895 esac
14896
14897 else
14898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14899 /* end confdefs.h. */
14900 #include <stdlib.h>
14901
14902 int
14903 main ()
14904 {
14905 char *p = malloc (0);
14906 int result = !p;
14907 free (p);
14908 return result;
14909 ;
14910 return 0;
14911 }
14912
14913 _ACEOF
14914 if ac_fn_c_try_run "$LINENO"; then :
14915 ac_cv_func_malloc_0_nonnull=yes
14916 else
14917 ac_cv_func_malloc_0_nonnull=no
14918 fi
14919 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14920 conftest.$ac_objext conftest.beam conftest.$ac_ext
14921 fi
14922
14923
14924 fi
14925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
14926 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
14927 case "$ac_cv_func_malloc_0_nonnull" in
14928 *yes)
14929 gl_cv_func_malloc_0_nonnull=1
14930 ;;
14931 *)
14932 gl_cv_func_malloc_0_nonnull=0
14933 ;;
14934 esac
14935
14936
14937 cat >>confdefs.h <<_ACEOF
14938 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
14939 _ACEOF
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
14952 $as_echo_n "checking for a traditional japanese locale... " >&6; }
14953 if ${gt_cv_locale_ja+:} false; then :
14954 $as_echo_n "(cached) " >&6
14955 else
14956
14957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14958 /* end confdefs.h. */
14959
14960 #include <locale.h>
14961 #include <time.h>
14962 #if HAVE_LANGINFO_CODESET
14963 # include <langinfo.h>
14964 #endif
14965 #include <stdlib.h>
14966 #include <string.h>
14967 struct tm t;
14968 char buf[16];
14969 int main ()
14970 {
14971 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
14972 imitates locale dependent behaviour by looking at the environment
14973 variables, and all locales use the UTF-8 encoding. */
14974 #if defined __BEOS__ || defined __HAIKU__
14975 return 1;
14976 #else
14977 /* Check whether the given locale name is recognized by the system. */
14978 # if defined _WIN32 && !defined __CYGWIN__
14979 /* On native Windows, setlocale(category, "") looks at the system settings,
14980 not at the environment variables. Also, when an encoding suffix such
14981 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14982 category of the locale to "C". */
14983 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14984 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14985 return 1;
14986 # else
14987 if (setlocale (LC_ALL, "") == NULL) return 1;
14988 # endif
14989 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14990 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14991 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14992 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14993 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14994 some unit tests fail.
14995 On MirBSD 10, when an unsupported locale is specified, setlocale()
14996 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14997 # if HAVE_LANGINFO_CODESET
14998 {
14999 const char *cs = nl_langinfo (CODESET);
15000 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15001 || strcmp (cs, "UTF-8") == 0)
15002 return 1;
15003 }
15004 # endif
15005 # ifdef __CYGWIN__
15006 /* On Cygwin, avoid locale names without encoding suffix, because the
15007 locale_charset() function relies on the encoding suffix. Note that
15008 LC_ALL is set on the command line. */
15009 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15010 # endif
15011 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
15012 on Cygwin 1.5.x. */
15013 if (MB_CUR_MAX == 1)
15014 return 1;
15015 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15016 This excludes the UTF-8 encoding (except on MirBSD). */
15017 {
15018 const char *p;
15019 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15020 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15021 for (p = buf; *p != '\0'; p++)
15022 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15023 return 1;
15024 }
15025 return 0;
15026 #endif
15027 }
15028
15029 _ACEOF
15030 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15031 (eval $ac_link) 2>&5
15032 ac_status=$?
15033 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15034 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15035 case "$host_os" in
15036 # Handle native Windows specially, because there setlocale() interprets
15037 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15038 # "fr" or "fra" as "French" or "French_France.1252",
15039 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15040 # "ja" as "Japanese" or "Japanese_Japan.932",
15041 # and similar.
15042 mingw*)
15043 # Note that on native Windows, the Japanese locale is
15044 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
15045 # cannot use it here.
15046 gt_cv_locale_ja=none
15047 ;;
15048 *)
15049 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15050 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15051 # configure script would override the LC_ALL setting. Likewise for
15052 # LC_CTYPE, which is also set at the beginning of the configure script.
15053 # Test for the AIX locale name.
15054 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15055 gt_cv_locale_ja=ja_JP
15056 else
15057 # Test for the locale name with explicit encoding suffix.
15058 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15059 gt_cv_locale_ja=ja_JP.EUC-JP
15060 else
15061 # Test for the HP-UX, OSF/1, NetBSD locale name.
15062 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15063 gt_cv_locale_ja=ja_JP.eucJP
15064 else
15065 # Test for the IRIX, FreeBSD locale name.
15066 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15067 gt_cv_locale_ja=ja_JP.EUC
15068 else
15069 # Test for the Solaris 7 locale name.
15070 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15071 gt_cv_locale_ja=ja
15072 else
15073 # Special test for NetBSD 1.6.
15074 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
15075 gt_cv_locale_ja=ja_JP.eucJP
15076 else
15077 # None found.
15078 gt_cv_locale_ja=none
15079 fi
15080 fi
15081 fi
15082 fi
15083 fi
15084 fi
15085 ;;
15086 esac
15087 fi
15088 rm -fr conftest*
15089
15090 fi
15091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
15092 $as_echo "$gt_cv_locale_ja" >&6; }
15093 LOCALE_JA=$gt_cv_locale_ja
15094
15095
15096
15097
15098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
15099 $as_echo_n "checking for a french Unicode locale... " >&6; }
15100 if ${gt_cv_locale_fr_utf8+:} false; then :
15101 $as_echo_n "(cached) " >&6
15102 else
15103
15104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15105 /* end confdefs.h. */
15106
15107 #include <locale.h>
15108 #include <time.h>
15109 #if HAVE_LANGINFO_CODESET
15110 # include <langinfo.h>
15111 #endif
15112 #include <stdlib.h>
15113 #include <string.h>
15114 struct tm t;
15115 char buf[16];
15116 int main () {
15117 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15118 imitates locale dependent behaviour by looking at the environment
15119 variables, and all locales use the UTF-8 encoding. */
15120 #if !(defined __BEOS__ || defined __HAIKU__)
15121 /* Check whether the given locale name is recognized by the system. */
15122 # if defined _WIN32 && !defined __CYGWIN__
15123 /* On native Windows, setlocale(category, "") looks at the system settings,
15124 not at the environment variables. Also, when an encoding suffix such
15125 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15126 category of the locale to "C". */
15127 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15128 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15129 return 1;
15130 # else
15131 if (setlocale (LC_ALL, "") == NULL) return 1;
15132 # endif
15133 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15134 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15135 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15136 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15137 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15138 some unit tests fail. */
15139 # if HAVE_LANGINFO_CODESET
15140 {
15141 const char *cs = nl_langinfo (CODESET);
15142 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
15143 return 1;
15144 }
15145 # endif
15146 # ifdef __CYGWIN__
15147 /* On Cygwin, avoid locale names without encoding suffix, because the
15148 locale_charset() function relies on the encoding suffix. Note that
15149 LC_ALL is set on the command line. */
15150 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15151 # endif
15152 /* Check whether in the abbreviation of the second month, the second
15153 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
15154 two bytes long, with UTF-8 encoding. */
15155 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15156 if (strftime (buf, sizeof (buf), "%b", &t) < 4
15157 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
15158 return 1;
15159 #endif
15160 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
15161 /* Check whether the decimal separator is a comma.
15162 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15163 are nl_langinfo(RADIXCHAR) are both ".". */
15164 if (localeconv () ->decimal_point[0] != ',') return 1;
15165 #endif
15166 return 0;
15167 }
15168
15169 _ACEOF
15170 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15171 (eval $ac_link) 2>&5
15172 ac_status=$?
15173 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15174 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15175 case "$host_os" in
15176 # Handle native Windows specially, because there setlocale() interprets
15177 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15178 # "fr" or "fra" as "French" or "French_France.1252",
15179 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15180 # "ja" as "Japanese" or "Japanese_Japan.932",
15181 # and similar.
15182 mingw*)
15183 # Test for the hypothetical native Windows locale name.
15184 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15185 gt_cv_locale_fr_utf8=French_France.65001
15186 else
15187 # None found.
15188 gt_cv_locale_fr_utf8=none
15189 fi
15190 ;;
15191 *)
15192 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15193 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15194 # configure script would override the LC_ALL setting. Likewise for
15195 # LC_CTYPE, which is also set at the beginning of the configure script.
15196 # Test for the usual locale name.
15197 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15198 gt_cv_locale_fr_utf8=fr_FR
15199 else
15200 # Test for the locale name with explicit encoding suffix.
15201 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15202 gt_cv_locale_fr_utf8=fr_FR.UTF-8
15203 else
15204 # Test for the Solaris 7 locale name.
15205 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15206 gt_cv_locale_fr_utf8=fr.UTF-8
15207 else
15208 # None found.
15209 gt_cv_locale_fr_utf8=none
15210 fi
15211 fi
15212 fi
15213 ;;
15214 esac
15215 fi
15216 rm -fr conftest*
15217
15218 fi
15219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15220 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
15221 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15222
15223
15224
15225
15226
15227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
15228 $as_echo_n "checking for a transitional chinese locale... " >&6; }
15229 if ${gt_cv_locale_zh_CN+:} false; then :
15230 $as_echo_n "(cached) " >&6
15231 else
15232
15233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15234 /* end confdefs.h. */
15235
15236 #include <locale.h>
15237 #include <stdlib.h>
15238 #include <time.h>
15239 #if HAVE_LANGINFO_CODESET
15240 # include <langinfo.h>
15241 #endif
15242 #include <stdlib.h>
15243 #include <string.h>
15244 struct tm t;
15245 char buf[16];
15246 int main ()
15247 {
15248 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15249 imitates locale dependent behaviour by looking at the environment
15250 variables, and all locales use the UTF-8 encoding. */
15251 #if defined __BEOS__ || defined __HAIKU__
15252 return 1;
15253 #else
15254 /* Check whether the given locale name is recognized by the system. */
15255 # if defined _WIN32 && !defined __CYGWIN__
15256 /* On native Windows, setlocale(category, "") looks at the system settings,
15257 not at the environment variables. Also, when an encoding suffix such
15258 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15259 category of the locale to "C". */
15260 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15261 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15262 return 1;
15263 # else
15264 if (setlocale (LC_ALL, "") == NULL) return 1;
15265 # endif
15266 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15267 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15268 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15269 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15270 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15271 some unit tests fail.
15272 On MirBSD 10, when an unsupported locale is specified, setlocale()
15273 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15274 # if HAVE_LANGINFO_CODESET
15275 {
15276 const char *cs = nl_langinfo (CODESET);
15277 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15278 || strcmp (cs, "UTF-8") == 0)
15279 return 1;
15280 }
15281 # endif
15282 # ifdef __CYGWIN__
15283 /* On Cygwin, avoid locale names without encoding suffix, because the
15284 locale_charset() function relies on the encoding suffix. Note that
15285 LC_ALL is set on the command line. */
15286 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15287 # endif
15288 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15289 This excludes the UTF-8 encoding (except on MirBSD). */
15290 {
15291 const char *p;
15292 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15293 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15294 for (p = buf; *p != '\0'; p++)
15295 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15296 return 1;
15297 }
15298 /* Check whether a typical GB18030 multibyte sequence is recognized as a
15299 single wide character. This excludes the GB2312 and GBK encodings. */
15300 if (mblen ("\203\062\332\066", 5) != 4)
15301 return 1;
15302 return 0;
15303 #endif
15304 }
15305
15306 _ACEOF
15307 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15308 (eval $ac_link) 2>&5
15309 ac_status=$?
15310 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15311 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15312 case "$host_os" in
15313 # Handle native Windows specially, because there setlocale() interprets
15314 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15315 # "fr" or "fra" as "French" or "French_France.1252",
15316 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15317 # "ja" as "Japanese" or "Japanese_Japan.932",
15318 # and similar.
15319 mingw*)
15320 # Test for the hypothetical native Windows locale name.
15321 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15322 gt_cv_locale_zh_CN=Chinese_China.54936
15323 else
15324 # None found.
15325 gt_cv_locale_zh_CN=none
15326 fi
15327 ;;
15328 solaris2.8)
15329 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
15330 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
15331 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
15332 gt_cv_locale_zh_CN=none
15333 ;;
15334 *)
15335 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15336 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15337 # configure script would override the LC_ALL setting. Likewise for
15338 # LC_CTYPE, which is also set at the beginning of the configure script.
15339 # Test for the locale name without encoding suffix.
15340 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15341 gt_cv_locale_zh_CN=zh_CN
15342 else
15343 # Test for the locale name with explicit encoding suffix.
15344 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15345 gt_cv_locale_zh_CN=zh_CN.GB18030
15346 else
15347 # None found.
15348 gt_cv_locale_zh_CN=none
15349 fi
15350 fi
15351 ;;
15352 esac
15353 else
15354 # If there was a link error, due to mblen(), the system is so old that
15355 # it certainly doesn't have a chinese locale.
15356 gt_cv_locale_zh_CN=none
15357 fi
15358 rm -fr conftest*
15359
15360 fi
15361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
15362 $as_echo "$gt_cv_locale_zh_CN" >&6; }
15363 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
15364
15365
15366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
15367 $as_echo_n "checking for inline... " >&6; }
15368 if ${ac_cv_c_inline+:} false; then :
15369 $as_echo_n "(cached) " >&6
15370 else
15371 ac_cv_c_inline=no
15372 for ac_kw in inline __inline__ __inline; do
15373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15374 /* end confdefs.h. */
15375 #ifndef __cplusplus
15376 typedef int foo_t;
15377 static $ac_kw foo_t static_foo () {return 0; }
15378 $ac_kw foo_t foo () {return 0; }
15379 #endif
15380
15381 _ACEOF
15382 if ac_fn_c_try_compile "$LINENO"; then :
15383 ac_cv_c_inline=$ac_kw
15384 fi
15385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15386 test "$ac_cv_c_inline" != no && break
15387 done
15388
15389 fi
15390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
15391 $as_echo "$ac_cv_c_inline" >&6; }
15392
15393 case $ac_cv_c_inline in
15394 inline | yes) ;;
15395 *)
15396 case $ac_cv_c_inline in
15397 no) ac_val=;;
15398 *) ac_val=$ac_cv_c_inline;;
15399 esac
15400 cat >>confdefs.h <<_ACEOF
15401 #ifndef __cplusplus
15402 #define inline $ac_val
15403 #endif
15404 _ACEOF
15405 ;;
15406 esac
15407
15408
15409
15410
15411
15412
15413 GNULIB_EXPLICIT_BZERO=0;
15414 GNULIB_FFSL=0;
15415 GNULIB_FFSLL=0;
15416 GNULIB_MEMCHR=0;
15417 GNULIB_MEMMEM=0;
15418 GNULIB_MEMPCPY=0;
15419 GNULIB_MEMRCHR=0;
15420 GNULIB_RAWMEMCHR=0;
15421 GNULIB_STPCPY=0;
15422 GNULIB_STPNCPY=0;
15423 GNULIB_STRCHRNUL=0;
15424 GNULIB_STRDUP=0;
15425 GNULIB_STRNCAT=0;
15426 GNULIB_STRNDUP=0;
15427 GNULIB_STRNLEN=0;
15428 GNULIB_STRPBRK=0;
15429 GNULIB_STRSEP=0;
15430 GNULIB_STRSTR=0;
15431 GNULIB_STRCASESTR=0;
15432 GNULIB_STRTOK_R=0;
15433 GNULIB_MBSLEN=0;
15434 GNULIB_MBSNLEN=0;
15435 GNULIB_MBSCHR=0;
15436 GNULIB_MBSRCHR=0;
15437 GNULIB_MBSSTR=0;
15438 GNULIB_MBSCASECMP=0;
15439 GNULIB_MBSNCASECMP=0;
15440 GNULIB_MBSPCASECMP=0;
15441 GNULIB_MBSCASESTR=0;
15442 GNULIB_MBSCSPN=0;
15443 GNULIB_MBSPBRK=0;
15444 GNULIB_MBSSPN=0;
15445 GNULIB_MBSSEP=0;
15446 GNULIB_MBSTOK_R=0;
15447 GNULIB_STRERROR=0;
15448 GNULIB_STRERROR_R=0;
15449 GNULIB_STRERRORNAME_NP=0;
15450 GNULIB_SIGABBREV_NP=0;
15451 GNULIB_SIGDESCR_NP=0;
15452 GNULIB_STRSIGNAL=0;
15453 GNULIB_STRVERSCMP=0;
15454 HAVE_MBSLEN=0;
15455 GNULIB_MDA_MEMCCPY=1;
15456 GNULIB_MDA_STRDUP=1;
15457 HAVE_EXPLICIT_BZERO=1;
15458 HAVE_FFSL=1;
15459 HAVE_FFSLL=1;
15460 HAVE_DECL_MEMMEM=1;
15461 HAVE_MEMPCPY=1;
15462 HAVE_DECL_MEMRCHR=1;
15463 HAVE_RAWMEMCHR=1;
15464 HAVE_STPCPY=1;
15465 HAVE_STPNCPY=1;
15466 HAVE_STRCHRNUL=1;
15467 HAVE_DECL_STRDUP=1;
15468 HAVE_DECL_STRNDUP=1;
15469 HAVE_DECL_STRNLEN=1;
15470 HAVE_STRPBRK=1;
15471 HAVE_STRSEP=1;
15472 HAVE_STRCASESTR=1;
15473 HAVE_DECL_STRTOK_R=1;
15474 HAVE_DECL_STRERROR_R=1;
15475 HAVE_STRERRORNAME_NP=1;
15476 HAVE_SIGABBREV_NP=1;
15477 HAVE_SIGDESCR_NP=1;
15478 HAVE_DECL_STRSIGNAL=1;
15479 HAVE_STRVERSCMP=1;
15480 REPLACE_FFSLL=0;
15481 REPLACE_MEMCHR=0;
15482 REPLACE_MEMMEM=0;
15483 REPLACE_STPNCPY=0;
15484 REPLACE_STRCHRNUL=0;
15485 REPLACE_STRDUP=0;
15486 REPLACE_STRNCAT=0;
15487 REPLACE_STRNDUP=0;
15488 REPLACE_STRNLEN=0;
15489 REPLACE_STRSTR=0;
15490 REPLACE_STRCASESTR=0;
15491 REPLACE_STRTOK_R=0;
15492 REPLACE_STRERROR=0;
15493 REPLACE_STRERROR_R=0;
15494 REPLACE_STRERRORNAME_NP=0;
15495 REPLACE_STRSIGNAL=0;
15496 UNDEFINE_STRTOK_R=0;
15497
15498
15499
15500
15501
15502
15503 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
15504 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
15505 # irrelevant for anonymous mappings.
15506 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
15507 if test "x$ac_cv_func_mmap" = xyes; then :
15508 gl_have_mmap=yes
15509 else
15510 gl_have_mmap=no
15511 fi
15512
15513
15514 # Try to allow MAP_ANONYMOUS.
15515 gl_have_mmap_anonymous=no
15516 if test $gl_have_mmap = yes; then
15517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
15518 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
15519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15520 /* end confdefs.h. */
15521
15522 #include <sys/mman.h>
15523 #ifdef MAP_ANONYMOUS
15524 I cannot identify this map
15525 #endif
15526
15527 _ACEOF
15528 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15529 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15530 gl_have_mmap_anonymous=yes
15531 fi
15532 rm -f conftest*
15533
15534 if test $gl_have_mmap_anonymous != yes; then
15535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15536 /* end confdefs.h. */
15537
15538 #include <sys/mman.h>
15539 #ifdef MAP_ANON
15540 I cannot identify this map
15541 #endif
15542
15543 _ACEOF
15544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15545 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
15546
15547 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
15548
15549 gl_have_mmap_anonymous=yes
15550 fi
15551 rm -f conftest*
15552
15553 fi
15554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
15555 $as_echo "$gl_have_mmap_anonymous" >&6; }
15556 if test $gl_have_mmap_anonymous = yes; then
15557
15558 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
15559
15560 fi
15561 fi
15562
15563
15564
15565
15566
15567 # Detect platform-specific bugs in some versions of glibc:
15568 # memchr should not dereference anything with length 0
15569 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
15570 # memchr should not dereference overestimated length after a match
15571 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
15572 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
15573 # memchr should cast the second argument to 'unsigned char'.
15574 # This bug exists in Android 4.3.
15575 # Assume that memchr works on platforms that lack mprotect.
15576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
15577 $as_echo_n "checking whether memchr works... " >&6; }
15578 if ${gl_cv_func_memchr_works+:} false; then :
15579 $as_echo_n "(cached) " >&6
15580 else
15581 if test "$cross_compiling" = yes; then :
15582 case "$host_os" in
15583 # Guess no on Android.
15584 linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
15585 # Guess yes on native Windows.
15586 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
15587 # If we don't know, obey --enable-cross-guesses.
15588 *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
15589 esac
15590
15591 else
15592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15593 /* end confdefs.h. */
15594
15595 #include <string.h>
15596 #if HAVE_SYS_MMAN_H
15597 # include <fcntl.h>
15598 # include <unistd.h>
15599 # include <sys/types.h>
15600 # include <sys/mman.h>
15601 # ifndef MAP_FILE
15602 # define MAP_FILE 0
15603 # endif
15604 #endif
15605
15606 int
15607 main ()
15608 {
15609
15610 int result = 0;
15611 char *fence = NULL;
15612 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
15613 # if HAVE_MAP_ANONYMOUS
15614 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
15615 const int fd = -1;
15616 # else /* !HAVE_MAP_ANONYMOUS */
15617 const int flags = MAP_FILE | MAP_PRIVATE;
15618 int fd = open ("/dev/zero", O_RDONLY, 0666);
15619 if (fd >= 0)
15620 # endif
15621 {
15622 int pagesize = getpagesize ();
15623 char *two_pages =
15624 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
15625 flags, fd, 0);
15626 if (two_pages != (char *)(-1)
15627 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
15628 fence = two_pages + pagesize;
15629 }
15630 #endif
15631 if (fence)
15632 {
15633 /* Test against bugs on glibc systems. */
15634 if (memchr (fence, 0, 0))
15635 result |= 1;
15636 strcpy (fence - 9, "12345678");
15637 if (memchr (fence - 9, 0, 79) != fence - 1)
15638 result |= 2;
15639 if (memchr (fence - 1, 0, 3) != fence - 1)
15640 result |= 4;
15641 /* Test against bug on AIX 7.2. */
15642 if (memchr (fence - 4, '6', 16) != fence - 4)
15643 result |= 8;
15644 }
15645 /* Test against bug on Android 4.3. */
15646 {
15647 char input[3];
15648 input[0] = 'a';
15649 input[1] = 'b';
15650 input[2] = 'c';
15651 if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
15652 result |= 16;
15653 }
15654 return result;
15655
15656 ;
15657 return 0;
15658 }
15659 _ACEOF
15660 if ac_fn_c_try_run "$LINENO"; then :
15661 gl_cv_func_memchr_works=yes
15662 else
15663 gl_cv_func_memchr_works=no
15664 fi
15665 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15666 conftest.$ac_objext conftest.beam conftest.$ac_ext
15667 fi
15668
15669
15670 fi
15671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
15672 $as_echo "$gl_cv_func_memchr_works" >&6; }
15673 case "$gl_cv_func_memchr_works" in
15674 *yes) ;;
15675 *) REPLACE_MEMCHR=1 ;;
15676 esac
15677
15678 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
15679 if test "x$ac_cv_have_decl_memmem" = xyes; then :
15680 ac_have_decl=1
15681 else
15682 ac_have_decl=0
15683 fi
15684
15685 cat >>confdefs.h <<_ACEOF
15686 #define HAVE_DECL_MEMMEM $ac_have_decl
15687 _ACEOF
15688
15689
15690
15691
15692
15693 for ac_func in memmem
15694 do :
15695 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
15696 if test "x$ac_cv_func_memmem" = xyes; then :
15697 cat >>confdefs.h <<_ACEOF
15698 #define HAVE_MEMMEM 1
15699 _ACEOF
15700
15701 fi
15702 done
15703
15704 if test $ac_cv_func_memmem = yes; then
15705 HAVE_MEMMEM=1
15706 else
15707 HAVE_MEMMEM=0
15708 fi
15709
15710 if test $ac_cv_have_decl_memmem = no; then
15711 HAVE_DECL_MEMMEM=0
15712 else
15713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
15714 $as_echo_n "checking whether memmem works... " >&6; }
15715 if ${gl_cv_func_memmem_works_always+:} false; then :
15716 $as_echo_n "(cached) " >&6
15717 else
15718 if test "$cross_compiling" = yes; then :
15719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15720 /* end confdefs.h. */
15721
15722 #ifdef __GNU_LIBRARY__
15723 #include <features.h>
15724 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
15725 || __GLIBC_MINOR__ > 12)) \
15726 || (__GLIBC__ > 2)) \
15727 || defined __UCLIBC__
15728 Lucky user
15729 #endif
15730 #elif defined __CYGWIN__
15731 #include <cygwin/version.h>
15732 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
15733 Lucky user
15734 #endif
15735 #else
15736 Lucky user
15737 #endif
15738
15739 _ACEOF
15740 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15741 $EGREP "Lucky user" >/dev/null 2>&1; then :
15742 gl_cv_func_memmem_works_always="guessing yes"
15743 else
15744 gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
15745 fi
15746 rm -f conftest*
15747
15748
15749 else
15750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15751 /* end confdefs.h. */
15752
15753 #include <string.h> /* for memmem */
15754 #define P "_EF_BF_BD"
15755 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
15756 #define NEEDLE P P P P P
15757
15758 int
15759 main ()
15760 {
15761
15762 int result = 0;
15763 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
15764 result |= 1;
15765 /* Check for empty needle behavior. */
15766 {
15767 const char *haystack = "AAA";
15768 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
15769 result |= 2;
15770 }
15771 return result;
15772
15773 ;
15774 return 0;
15775 }
15776 _ACEOF
15777 if ac_fn_c_try_run "$LINENO"; then :
15778 gl_cv_func_memmem_works_always=yes
15779 else
15780 gl_cv_func_memmem_works_always=no
15781 fi
15782 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15783 conftest.$ac_objext conftest.beam conftest.$ac_ext
15784 fi
15785
15786
15787 fi
15788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
15789 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
15790 case "$gl_cv_func_memmem_works_always" in
15791 *yes) ;;
15792 *)
15793 REPLACE_MEMMEM=1
15794 ;;
15795 esac
15796 fi
15797 :
15798
15799 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
15800 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
15801 ac_have_decl=1
15802 else
15803 ac_have_decl=0
15804 fi
15805
15806 cat >>confdefs.h <<_ACEOF
15807 #define HAVE_DECL_MEMRCHR $ac_have_decl
15808 _ACEOF
15809
15810
15811
15812
15813
15814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
15815 $as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
15816 if ${gl_cv_minmax_in_limits_h+:} false; then :
15817 $as_echo_n "(cached) " >&6
15818 else
15819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15820 /* end confdefs.h. */
15821 #include <limits.h>
15822 int x = MIN (42, 17);
15823 int
15824 main ()
15825 {
15826
15827 ;
15828 return 0;
15829 }
15830 _ACEOF
15831 if ac_fn_c_try_compile "$LINENO"; then :
15832 gl_cv_minmax_in_limits_h=yes
15833 else
15834 gl_cv_minmax_in_limits_h=no
15835 fi
15836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15837 fi
15838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
15839 $as_echo "$gl_cv_minmax_in_limits_h" >&6; }
15840 if test $gl_cv_minmax_in_limits_h = yes; then
15841
15842 $as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
15843
15844 fi
15845
15846
15847
15848
15849
15850
15851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
15852 $as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
15853 if ${gl_cv_minmax_in_sys_param_h+:} false; then :
15854 $as_echo_n "(cached) " >&6
15855 else
15856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15857 /* end confdefs.h. */
15858 #include <sys/param.h>
15859 int x = MIN (42, 17);
15860 int
15861 main ()
15862 {
15863
15864 ;
15865 return 0;
15866 }
15867 _ACEOF
15868 if ac_fn_c_try_compile "$LINENO"; then :
15869 gl_cv_minmax_in_sys_param_h=yes
15870 else
15871 gl_cv_minmax_in_sys_param_h=no
15872 fi
15873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15874 fi
15875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
15876 $as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
15877 if test $gl_cv_minmax_in_sys_param_h = yes; then
15878
15879 $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
15880
15881 fi
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
15893 $as_echo_n "checking for O_CLOEXEC... " >&6; }
15894 if ${gl_cv_macro_O_CLOEXEC+:} false; then :
15895 $as_echo_n "(cached) " >&6
15896 else
15897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15898 /* end confdefs.h. */
15899 #include <fcntl.h>
15900 #ifndef O_CLOEXEC
15901 choke me;
15902 #endif
15903
15904 int
15905 main ()
15906 {
15907 return O_CLOEXEC;
15908 ;
15909 return 0;
15910 }
15911 _ACEOF
15912 if ac_fn_c_try_compile "$LINENO"; then :
15913 gl_cv_macro_O_CLOEXEC=yes
15914 else
15915 gl_cv_macro_O_CLOEXEC=no
15916 fi
15917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15918 fi
15919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
15920 $as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
15921
15922
15923
15924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
15925 $as_echo_n "checking for promoted mode_t type... " >&6; }
15926 if ${gl_cv_promoted_mode_t+:} false; then :
15927 $as_echo_n "(cached) " >&6
15928 else
15929
15930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15931 /* end confdefs.h. */
15932 #include <sys/types.h>
15933 int
15934 main ()
15935 {
15936 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
15937 ;
15938 return 0;
15939 }
15940 _ACEOF
15941 if ac_fn_c_try_compile "$LINENO"; then :
15942 gl_cv_promoted_mode_t='int'
15943 else
15944 gl_cv_promoted_mode_t='mode_t'
15945 fi
15946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15947
15948 fi
15949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
15950 $as_echo "$gl_cv_promoted_mode_t" >&6; }
15951
15952 cat >>confdefs.h <<_ACEOF
15953 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
15954 _ACEOF
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964 GNULIB_DPRINTF=0;
15965 GNULIB_FCLOSE=0;
15966 GNULIB_FDOPEN=0;
15967 GNULIB_FFLUSH=0;
15968 GNULIB_FGETC=0;
15969 GNULIB_FGETS=0;
15970 GNULIB_FOPEN=0;
15971 GNULIB_FPRINTF=0;
15972 GNULIB_FPRINTF_POSIX=0;
15973 GNULIB_FPURGE=0;
15974 GNULIB_FPUTC=0;
15975 GNULIB_FPUTS=0;
15976 GNULIB_FREAD=0;
15977 GNULIB_FREOPEN=0;
15978 GNULIB_FSCANF=0;
15979 GNULIB_FSEEK=0;
15980 GNULIB_FSEEKO=0;
15981 GNULIB_FTELL=0;
15982 GNULIB_FTELLO=0;
15983 GNULIB_FWRITE=0;
15984 GNULIB_GETC=0;
15985 GNULIB_GETCHAR=0;
15986 GNULIB_GETDELIM=0;
15987 GNULIB_GETLINE=0;
15988 GNULIB_OBSTACK_PRINTF=0;
15989 GNULIB_OBSTACK_PRINTF_POSIX=0;
15990 GNULIB_PCLOSE=0;
15991 GNULIB_PERROR=0;
15992 GNULIB_POPEN=0;
15993 GNULIB_PRINTF=0;
15994 GNULIB_PRINTF_POSIX=0;
15995 GNULIB_PUTC=0;
15996 GNULIB_PUTCHAR=0;
15997 GNULIB_PUTS=0;
15998 GNULIB_REMOVE=0;
15999 GNULIB_RENAME=0;
16000 GNULIB_RENAMEAT=0;
16001 GNULIB_SCANF=0;
16002 GNULIB_SNPRINTF=0;
16003 GNULIB_SPRINTF_POSIX=0;
16004 GNULIB_STDIO_H_NONBLOCKING=0;
16005 GNULIB_STDIO_H_SIGPIPE=0;
16006 GNULIB_TMPFILE=0;
16007 GNULIB_VASPRINTF=0;
16008 GNULIB_VFSCANF=0;
16009 GNULIB_VSCANF=0;
16010 GNULIB_VDPRINTF=0;
16011 GNULIB_VFPRINTF=0;
16012 GNULIB_VFPRINTF_POSIX=0;
16013 GNULIB_VPRINTF=0;
16014 GNULIB_VPRINTF_POSIX=0;
16015 GNULIB_VSNPRINTF=0;
16016 GNULIB_VSPRINTF_POSIX=0;
16017 GNULIB_MDA_FCLOSEALL=1;
16018 GNULIB_MDA_FDOPEN=1;
16019 GNULIB_MDA_FILENO=1;
16020 GNULIB_MDA_GETW=1;
16021 GNULIB_MDA_PUTW=1;
16022 GNULIB_MDA_TEMPNAM=1;
16023 HAVE_DECL_FCLOSEALL=1;
16024 HAVE_DECL_FPURGE=1;
16025 HAVE_DECL_FSEEKO=1;
16026 HAVE_DECL_FTELLO=1;
16027 HAVE_DECL_GETDELIM=1;
16028 HAVE_DECL_GETLINE=1;
16029 HAVE_DECL_OBSTACK_PRINTF=1;
16030 HAVE_DECL_SNPRINTF=1;
16031 HAVE_DECL_VSNPRINTF=1;
16032 HAVE_DPRINTF=1;
16033 HAVE_FSEEKO=1;
16034 HAVE_FTELLO=1;
16035 HAVE_PCLOSE=1;
16036 HAVE_POPEN=1;
16037 HAVE_RENAMEAT=1;
16038 HAVE_VASPRINTF=1;
16039 HAVE_VDPRINTF=1;
16040 REPLACE_DPRINTF=0;
16041 REPLACE_FCLOSE=0;
16042 REPLACE_FDOPEN=0;
16043 REPLACE_FFLUSH=0;
16044 REPLACE_FOPEN=0;
16045 REPLACE_FPRINTF=0;
16046 REPLACE_FPURGE=0;
16047 REPLACE_FREOPEN=0;
16048 REPLACE_FSEEK=0;
16049 REPLACE_FSEEKO=0;
16050 REPLACE_FTELL=0;
16051 REPLACE_FTELLO=0;
16052 REPLACE_GETDELIM=0;
16053 REPLACE_GETLINE=0;
16054 REPLACE_OBSTACK_PRINTF=0;
16055 REPLACE_PERROR=0;
16056 REPLACE_POPEN=0;
16057 REPLACE_PRINTF=0;
16058 REPLACE_REMOVE=0;
16059 REPLACE_RENAME=0;
16060 REPLACE_RENAMEAT=0;
16061 REPLACE_SNPRINTF=0;
16062 REPLACE_SPRINTF=0;
16063 REPLACE_STDIO_READ_FUNCS=0;
16064 REPLACE_STDIO_WRITE_FUNCS=0;
16065 REPLACE_TMPFILE=0;
16066 REPLACE_VASPRINTF=0;
16067 REPLACE_VDPRINTF=0;
16068 REPLACE_VFPRINTF=0;
16069 REPLACE_VPRINTF=0;
16070 REPLACE_VSNPRINTF=0;
16071 REPLACE_VSPRINTF=0;
16072
16073
16074
16075 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
16076 if test "x$ac_cv_have_decl_setenv" = xyes; then :
16077 ac_have_decl=1
16078 else
16079 ac_have_decl=0
16080 fi
16081
16082 cat >>confdefs.h <<_ACEOF
16083 #define HAVE_DECL_SETENV $ac_have_decl
16084 _ACEOF
16085
16086
16087
16088
16089
16090
16091 if test $ac_cv_have_decl_setenv = no; then
16092 HAVE_DECL_SETENV=0
16093 fi
16094
16095
16096
16097
16098
16099 for ac_header in search.h
16100 do :
16101 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
16102 if test "x$ac_cv_header_search_h" = xyes; then :
16103 cat >>confdefs.h <<_ACEOF
16104 #define HAVE_SEARCH_H 1
16105 _ACEOF
16106
16107 fi
16108
16109 done
16110
16111 for ac_func in tsearch
16112 do :
16113 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
16114 if test "x$ac_cv_func_tsearch" = xyes; then :
16115 cat >>confdefs.h <<_ACEOF
16116 #define HAVE_TSEARCH 1
16117 _ACEOF
16118
16119 fi
16120 done
16121
16122
16123
16124
16125 GNULIB_PTHREAD_SIGMASK=0;
16126 GNULIB_RAISE=0;
16127 GNULIB_SIGNAL_H_SIGPIPE=0;
16128 GNULIB_SIGPROCMASK=0;
16129 GNULIB_SIGACTION=0;
16130 HAVE_POSIX_SIGNALBLOCKING=1;
16131 HAVE_PTHREAD_SIGMASK=1;
16132 HAVE_RAISE=1;
16133 HAVE_SIGSET_T=1;
16134 HAVE_SIGINFO_T=1;
16135 HAVE_SIGACTION=1;
16136 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
16137
16138 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
16139
16140 HAVE_SIGHANDLER_T=1;
16141 REPLACE_PTHREAD_SIGMASK=0;
16142 REPLACE_RAISE=0;
16143
16144
16145 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
16146 #include <signal.h>
16147 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
16148 #include <sys/types.h>
16149
16150 "
16151 if test "x$ac_cv_type_sigset_t" = xyes; then :
16152
16153 cat >>confdefs.h <<_ACEOF
16154 #define HAVE_SIGSET_T 1
16155 _ACEOF
16156
16157 gl_cv_type_sigset_t=yes
16158 else
16159 gl_cv_type_sigset_t=no
16160 fi
16161
16162 if test $gl_cv_type_sigset_t != yes; then
16163 HAVE_SIGSET_T=0
16164 fi
16165
16166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
16167 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
16168 if ${ac_cv_type_uid_t+:} false; then :
16169 $as_echo_n "(cached) " >&6
16170 else
16171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16172 /* end confdefs.h. */
16173 #include <sys/types.h>
16174
16175 _ACEOF
16176 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16177 $EGREP "uid_t" >/dev/null 2>&1; then :
16178 ac_cv_type_uid_t=yes
16179 else
16180 ac_cv_type_uid_t=no
16181 fi
16182 rm -f conftest*
16183
16184 fi
16185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
16186 $as_echo "$ac_cv_type_uid_t" >&6; }
16187 if test $ac_cv_type_uid_t = no; then
16188
16189 $as_echo "#define uid_t int" >>confdefs.h
16190
16191
16192 $as_echo "#define gid_t int" >>confdefs.h
16193
16194 fi
16195
16196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16197 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
16198 if ${ac_cv_header_stdbool_h+:} false; then :
16199 $as_echo_n "(cached) " >&6
16200 else
16201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16202 /* end confdefs.h. */
16203
16204 #include <stdbool.h>
16205
16206 #ifdef __cplusplus
16207 typedef bool Bool;
16208 #else
16209 typedef _Bool Bool;
16210 #ifndef bool
16211 "error: bool is not defined"
16212 #endif
16213 #ifndef false
16214 "error: false is not defined"
16215 #endif
16216 #if false
16217 "error: false is not 0"
16218 #endif
16219 #ifndef true
16220 "error: true is not defined"
16221 #endif
16222 #if true != 1
16223 "error: true is not 1"
16224 #endif
16225 #endif
16226
16227 #ifndef __bool_true_false_are_defined
16228 "error: __bool_true_false_are_defined is not defined"
16229 #endif
16230
16231 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
16232
16233 char a[true == 1 ? 1 : -1];
16234 char b[false == 0 ? 1 : -1];
16235 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16236 char d[(bool) 0.5 == true ? 1 : -1];
16237 /* See body of main program for 'e'. */
16238 char f[(Bool) 0.0 == false ? 1 : -1];
16239 char g[true];
16240 char h[sizeof (Bool)];
16241 char i[sizeof s.t];
16242 enum { j = false, k = true, l = false * true, m = true * 256 };
16243 /* The following fails for
16244 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16245 Bool n[m];
16246 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16247 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16248 /* Catch a bug in an HP-UX C compiler. See
16249 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16250 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
16251 */
16252 Bool q = true;
16253 Bool *pq = &q;
16254 bool *qq = &q;
16255
16256 int
16257 main ()
16258 {
16259
16260 bool e = &s;
16261 *pq |= q; *pq |= ! q;
16262 *qq |= q; *qq |= ! q;
16263 /* Refer to every declared value, to avoid compiler optimizations. */
16264 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16265 + !m + !n + !o + !p + !q + !pq + !qq);
16266
16267 ;
16268 return 0;
16269 }
16270 _ACEOF
16271 if ac_fn_c_try_compile "$LINENO"; then :
16272 ac_cv_header_stdbool_h=yes
16273 else
16274 ac_cv_header_stdbool_h=no
16275 fi
16276 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16277 fi
16278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16279 $as_echo "$ac_cv_header_stdbool_h" >&6; }
16280 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16281 if test "x$ac_cv_type__Bool" = xyes; then :
16282
16283 cat >>confdefs.h <<_ACEOF
16284 #define HAVE__BOOL 1
16285 _ACEOF
16286
16287
16288 fi
16289
16290
16291 ac_fn_c_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default"
16292 if test "x$ac_cv_have_decl_fcloseall" = xyes; then :
16293 ac_have_decl=1
16294 else
16295 ac_have_decl=0
16296 fi
16297
16298 cat >>confdefs.h <<_ACEOF
16299 #define HAVE_DECL_FCLOSEALL $ac_have_decl
16300 _ACEOF
16301
16302 ac_fn_c_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default"
16303 if test "x$ac_cv_have_decl_ecvt" = xyes; then :
16304 ac_have_decl=1
16305 else
16306 ac_have_decl=0
16307 fi
16308
16309 cat >>confdefs.h <<_ACEOF
16310 #define HAVE_DECL_ECVT $ac_have_decl
16311 _ACEOF
16312
16313 ac_fn_c_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default"
16314 if test "x$ac_cv_have_decl_fcvt" = xyes; then :
16315 ac_have_decl=1
16316 else
16317 ac_have_decl=0
16318 fi
16319
16320 cat >>confdefs.h <<_ACEOF
16321 #define HAVE_DECL_FCVT $ac_have_decl
16322 _ACEOF
16323
16324 ac_fn_c_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default"
16325 if test "x$ac_cv_have_decl_gcvt" = xyes; then :
16326 ac_have_decl=1
16327 else
16328 ac_have_decl=0
16329 fi
16330
16331 cat >>confdefs.h <<_ACEOF
16332 #define HAVE_DECL_GCVT $ac_have_decl
16333 _ACEOF
16334
16335 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
16336 if test "x$ac_cv_have_decl_strdup" = xyes; then :
16337 ac_have_decl=1
16338 else
16339 ac_have_decl=0
16340 fi
16341
16342 cat >>confdefs.h <<_ACEOF
16343 #define HAVE_DECL_STRDUP $ac_have_decl
16344 _ACEOF
16345
16346
16347 REPLACE_STRERROR_0=0
16348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
16349 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
16350 if ${gl_cv_func_strerror_0_works+:} false; then :
16351 $as_echo_n "(cached) " >&6
16352 else
16353 if test "$cross_compiling" = yes; then :
16354 case "$host_os" in
16355 # Guess yes on glibc systems.
16356 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
16357 # Guess yes on musl systems.
16358 *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;;
16359 # Guess yes on native Windows.
16360 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
16361 # If we don't know, obey --enable-cross-guesses.
16362 *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
16363 esac
16364
16365 else
16366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16367 /* end confdefs.h. */
16368 #include <string.h>
16369 #include <errno.h>
16370
16371 int
16372 main ()
16373 {
16374 int result = 0;
16375 char *str;
16376 errno = 0;
16377 str = strerror (0);
16378 if (!*str) result |= 1;
16379 if (errno) result |= 2;
16380 if (strstr (str, "nknown") || strstr (str, "ndefined"))
16381 result |= 4;
16382 return result;
16383 ;
16384 return 0;
16385 }
16386 _ACEOF
16387 if ac_fn_c_try_run "$LINENO"; then :
16388 gl_cv_func_strerror_0_works=yes
16389 else
16390 gl_cv_func_strerror_0_works=no
16391 fi
16392 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16393 conftest.$ac_objext conftest.beam conftest.$ac_ext
16394 fi
16395
16396
16397 fi
16398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
16399 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
16400 case "$gl_cv_func_strerror_0_works" in
16401 *yes) ;;
16402 *)
16403 REPLACE_STRERROR_0=1
16404
16405 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
16406
16407 ;;
16408 esac
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419 if test $ac_cv_func_strerror_r = yes; then
16420 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
16421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
16422 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
16423 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
16424 $as_echo_n "(cached) " >&6
16425 else
16426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16427 /* end confdefs.h. */
16428 #include <string.h>
16429 int strerror_r (int, char *, size_t);
16430
16431 int
16432 main ()
16433 {
16434
16435 ;
16436 return 0;
16437 }
16438 _ACEOF
16439 if ac_fn_c_try_compile "$LINENO"; then :
16440 gl_cv_func_strerror_r_posix_signature=yes
16441 else
16442 gl_cv_func_strerror_r_posix_signature=no
16443 fi
16444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16445
16446 fi
16447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
16448 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
16449 if test $gl_cv_func_strerror_r_posix_signature = yes; then
16450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
16451 $as_echo_n "checking whether strerror_r works... " >&6; }
16452 if ${gl_cv_func_strerror_r_works+:} false; then :
16453 $as_echo_n "(cached) " >&6
16454 else
16455 if test "$cross_compiling" = yes; then :
16456
16457 case "$host_os" in
16458 # Guess no on AIX.
16459 aix*) gl_cv_func_strerror_r_works="guessing no";;
16460 # Guess no on HP-UX.
16461 hpux*) gl_cv_func_strerror_r_works="guessing no";;
16462 # Guess no on BSD variants.
16463 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
16464 # Guess yes otherwise.
16465 *) gl_cv_func_strerror_r_works="guessing yes";;
16466 esac
16467
16468 else
16469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16470 /* end confdefs.h. */
16471 #include <errno.h>
16472 #include <string.h>
16473
16474 int
16475 main ()
16476 {
16477 int result = 0;
16478 char buf[79];
16479 if (strerror_r (EACCES, buf, 0) < 0)
16480 result |= 1;
16481 errno = 0;
16482 if (strerror_r (EACCES, buf, sizeof buf) != 0)
16483 result |= 2;
16484 strcpy (buf, "Unknown");
16485 if (strerror_r (0, buf, sizeof buf) != 0)
16486 result |= 4;
16487 if (errno)
16488 result |= 8;
16489 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
16490 result |= 0x10;
16491 errno = 0;
16492 *buf = 0;
16493 if (strerror_r (-3, buf, sizeof buf) < 0)
16494 result |= 0x20;
16495 if (errno)
16496 result |= 0x40;
16497 if (!*buf)
16498 result |= 0x80;
16499 return result;
16500
16501 ;
16502 return 0;
16503 }
16504 _ACEOF
16505 if ac_fn_c_try_run "$LINENO"; then :
16506 gl_cv_func_strerror_r_works=yes
16507 else
16508 gl_cv_func_strerror_r_works=no
16509 fi
16510 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16511 conftest.$ac_objext conftest.beam conftest.$ac_ext
16512 fi
16513
16514
16515 fi
16516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16517 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
16518 else
16519
16520 if test $ac_cv_func___xpg_strerror_r = yes; then
16521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
16522 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
16523 if ${gl_cv_func_strerror_r_works+:} false; then :
16524 $as_echo_n "(cached) " >&6
16525 else
16526 if test "$cross_compiling" = yes; then :
16527 gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
16528
16529 else
16530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16531 /* end confdefs.h. */
16532 #include <errno.h>
16533 #include <string.h>
16534 extern
16535 #ifdef __cplusplus
16536 "C"
16537 #endif
16538 int __xpg_strerror_r(int, char *, size_t);
16539
16540 int
16541 main ()
16542 {
16543 int result = 0;
16544 char buf[256] = "^";
16545 char copy[256];
16546 char *str = strerror (-1);
16547 strcpy (copy, str);
16548 if (__xpg_strerror_r (-2, buf, 1) == 0)
16549 result |= 1;
16550 if (*buf)
16551 result |= 2;
16552 __xpg_strerror_r (-2, buf, 256);
16553 if (strcmp (str, copy))
16554 result |= 4;
16555 return result;
16556
16557 ;
16558 return 0;
16559 }
16560 _ACEOF
16561 if ac_fn_c_try_run "$LINENO"; then :
16562 gl_cv_func_strerror_r_works=yes
16563 else
16564 gl_cv_func_strerror_r_works=no
16565 fi
16566 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16567 conftest.$ac_objext conftest.beam conftest.$ac_ext
16568 fi
16569
16570
16571 fi
16572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16573 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
16574 fi
16575 fi
16576 fi
16577 fi
16578
16579 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
16580 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
16581 ac_have_decl=1
16582 else
16583 ac_have_decl=0
16584 fi
16585
16586 cat >>confdefs.h <<_ACEOF
16587 #define HAVE_DECL_STRERROR_R $ac_have_decl
16588 _ACEOF
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604 if test $gl_cv_have_include_next = yes; then
16605 gl_cv_next_string_h='<'string.h'>'
16606 else
16607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
16608 $as_echo_n "checking absolute name of <string.h>... " >&6; }
16609 if ${gl_cv_next_string_h+:} false; then :
16610 $as_echo_n "(cached) " >&6
16611 else
16612
16613
16614
16615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16616 /* end confdefs.h. */
16617 #include <string.h>
16618 _ACEOF
16619 case "$host_os" in
16620 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16621 *) gl_absname_cpp="$ac_cpp" ;;
16622 esac
16623
16624 case "$host_os" in
16625 mingw*)
16626 gl_dirsep_regex='[/\\]'
16627 ;;
16628 *)
16629 gl_dirsep_regex='\/'
16630 ;;
16631 esac
16632 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16633 gl_header_literal_regex=`echo 'string.h' \
16634 | sed -e "$gl_make_literal_regex_sed"`
16635 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16636 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16637 s|^/[^/]|//&|
16638 p
16639 q
16640 }'
16641
16642 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16643 sed -n "$gl_absolute_header_sed"`
16644
16645 gl_header=$gl_cv_absolute_string_h
16646 gl_cv_next_string_h='"'$gl_header'"'
16647
16648
16649 fi
16650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
16651 $as_echo "$gl_cv_next_string_h" >&6; }
16652 fi
16653 NEXT_STRING_H=$gl_cv_next_string_h
16654
16655 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16656 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16657 gl_next_as_first_directive='<'string.h'>'
16658 else
16659 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16660 gl_next_as_first_directive=$gl_cv_next_string_h
16661 fi
16662 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16675 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
16676 ac_have_decl=1
16677 else
16678 ac_have_decl=0
16679 fi
16680
16681 cat >>confdefs.h <<_ACEOF
16682 #define HAVE_DECL_STRNLEN $ac_have_decl
16683 _ACEOF
16684
16685
16686
16687
16688 if test $REPLACE_MEMCHR = 1; then
16689 REPLACE_STRSTR=1
16690 else
16691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
16692 $as_echo_n "checking whether strstr works... " >&6; }
16693 if ${gl_cv_func_strstr_works_always+:} false; then :
16694 $as_echo_n "(cached) " >&6
16695 else
16696 if test "$cross_compiling" = yes; then :
16697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16698 /* end confdefs.h. */
16699
16700 #ifdef __GNU_LIBRARY__
16701 #include <features.h>
16702 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
16703 || defined __UCLIBC__
16704 Lucky user
16705 #endif
16706 #elif defined __CYGWIN__
16707 #include <cygwin/version.h>
16708 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
16709 Lucky user
16710 #endif
16711 #else
16712 Lucky user
16713 #endif
16714
16715 _ACEOF
16716 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16717 $EGREP "Lucky user" >/dev/null 2>&1; then :
16718 gl_cv_func_strstr_works_always="guessing yes"
16719 else
16720 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
16721 fi
16722 rm -f conftest*
16723
16724
16725 else
16726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16727 /* end confdefs.h. */
16728
16729 #include <string.h> /* for strstr */
16730 #ifdef __GNU_LIBRARY__
16731 #include <features.h>
16732 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
16733 Unlucky user
16734 #endif
16735 #endif
16736 #define P "_EF_BF_BD"
16737 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
16738 #define NEEDLE P P P P P
16739
16740 int
16741 main ()
16742 {
16743 return !!strstr (HAYSTACK, NEEDLE);
16744
16745 ;
16746 return 0;
16747 }
16748 _ACEOF
16749 if ac_fn_c_try_run "$LINENO"; then :
16750 gl_cv_func_strstr_works_always=yes
16751 else
16752 gl_cv_func_strstr_works_always=no
16753 fi
16754 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16755 conftest.$ac_objext conftest.beam conftest.$ac_ext
16756 fi
16757
16758
16759 fi
16760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
16761 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
16762 case "$gl_cv_func_strstr_works_always" in
16763 *yes) ;;
16764 *)
16765 REPLACE_STRSTR=1
16766 ;;
16767 esac
16768 fi
16769
16770 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
16771 if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
16772 ac_have_decl=1
16773 else
16774 ac_have_decl=0
16775 fi
16776
16777 cat >>confdefs.h <<_ACEOF
16778 #define HAVE_DECL_STRTOK_R $ac_have_decl
16779 _ACEOF
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793 $as_echo "#define _USE_STD_STAT 1" >>confdefs.h
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805 if test $gl_cv_have_include_next = yes; then
16806 gl_cv_next_sys_types_h='<'sys/types.h'>'
16807 else
16808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
16809 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
16810 if ${gl_cv_next_sys_types_h+:} false; then :
16811 $as_echo_n "(cached) " >&6
16812 else
16813
16814
16815
16816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16817 /* end confdefs.h. */
16818 #include <sys/types.h>
16819 _ACEOF
16820 case "$host_os" in
16821 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16822 *) gl_absname_cpp="$ac_cpp" ;;
16823 esac
16824
16825 case "$host_os" in
16826 mingw*)
16827 gl_dirsep_regex='[/\\]'
16828 ;;
16829 *)
16830 gl_dirsep_regex='\/'
16831 ;;
16832 esac
16833 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16834 gl_header_literal_regex=`echo 'sys/types.h' \
16835 | sed -e "$gl_make_literal_regex_sed"`
16836 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16837 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16838 s|^/[^/]|//&|
16839 p
16840 q
16841 }'
16842
16843 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16844 sed -n "$gl_absolute_header_sed"`
16845
16846 gl_header=$gl_cv_absolute_sys_types_h
16847 gl_cv_next_sys_types_h='"'$gl_header'"'
16848
16849
16850 fi
16851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
16852 $as_echo "$gl_cv_next_sys_types_h" >&6; }
16853 fi
16854 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
16855
16856 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16857 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16858 gl_next_as_first_directive='<'sys/types.h'>'
16859 else
16860 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16861 gl_next_as_first_directive=$gl_cv_next_sys_types_h
16862 fi
16863 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876 WINDOWS_STAT_INODES=0
16877
16878
16879
16880
16881
16882
16883
16884
16885 GNULIB_CTIME=0;
16886 GNULIB_MKTIME=0;
16887 GNULIB_LOCALTIME=0;
16888 GNULIB_NANOSLEEP=0;
16889 GNULIB_STRFTIME=0;
16890 GNULIB_STRPTIME=0;
16891 GNULIB_TIMEGM=0;
16892 GNULIB_TIMESPEC_GET=0;
16893 GNULIB_TIME_R=0;
16894 GNULIB_TIME_RZ=0;
16895 GNULIB_TZSET=0;
16896 GNULIB_MDA_TZSET=1;
16897 HAVE_DECL_LOCALTIME_R=1;
16898 HAVE_NANOSLEEP=1;
16899 HAVE_STRPTIME=1;
16900 HAVE_TIMEGM=1;
16901 HAVE_TIMESPEC_GET=1;
16902 HAVE_TIMEZONE_T=0;
16903 REPLACE_CTIME=GNULIB_PORTCHECK;
16904 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
16905 REPLACE_MKTIME=GNULIB_PORTCHECK;
16906 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
16907 REPLACE_STRFTIME=GNULIB_PORTCHECK;
16908 REPLACE_TIMEGM=GNULIB_PORTCHECK;
16909 REPLACE_TZSET=GNULIB_PORTCHECK;
16910
16911 : ${GNULIB_GETTIMEOFDAY=0};
16912 REPLACE_GMTIME=0;
16913 REPLACE_LOCALTIME=0;
16914
16915
16916
16917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
16918 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
16919 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
16920 $as_echo_n "(cached) " >&6
16921 else
16922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16923 /* end confdefs.h. */
16924 #include <time.h>
16925
16926 int
16927 main ()
16928 {
16929 static struct timespec x; x.tv_sec = x.tv_nsec;
16930 ;
16931 return 0;
16932 }
16933 _ACEOF
16934 if ac_fn_c_try_compile "$LINENO"; then :
16935 gl_cv_sys_struct_timespec_in_time_h=yes
16936 else
16937 gl_cv_sys_struct_timespec_in_time_h=no
16938 fi
16939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16940 fi
16941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
16942 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
16943
16944 TIME_H_DEFINES_STRUCT_TIMESPEC=0
16945 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
16946 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
16947 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
16948 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
16949 TIME_H_DEFINES_STRUCT_TIMESPEC=1
16950 else
16951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
16952 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
16953 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
16954 $as_echo_n "(cached) " >&6
16955 else
16956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16957 /* end confdefs.h. */
16958 #include <sys/time.h>
16959
16960 int
16961 main ()
16962 {
16963 static struct timespec x; x.tv_sec = x.tv_nsec;
16964 ;
16965 return 0;
16966 }
16967 _ACEOF
16968 if ac_fn_c_try_compile "$LINENO"; then :
16969 gl_cv_sys_struct_timespec_in_sys_time_h=yes
16970 else
16971 gl_cv_sys_struct_timespec_in_sys_time_h=no
16972 fi
16973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16974 fi
16975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
16976 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
16977 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
16978 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
16979 else
16980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
16981 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
16982 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
16983 $as_echo_n "(cached) " >&6
16984 else
16985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16986 /* end confdefs.h. */
16987 #include <pthread.h>
16988
16989 int
16990 main ()
16991 {
16992 static struct timespec x; x.tv_sec = x.tv_nsec;
16993 ;
16994 return 0;
16995 }
16996 _ACEOF
16997 if ac_fn_c_try_compile "$LINENO"; then :
16998 gl_cv_sys_struct_timespec_in_pthread_h=yes
16999 else
17000 gl_cv_sys_struct_timespec_in_pthread_h=no
17001 fi
17002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17003 fi
17004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17005 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17006 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17007 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17008 else
17009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
17010 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
17011 if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
17012 $as_echo_n "(cached) " >&6
17013 else
17014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17015 /* end confdefs.h. */
17016 #include <unistd.h>
17017
17018 int
17019 main ()
17020 {
17021 static struct timespec x; x.tv_sec = x.tv_nsec;
17022 ;
17023 return 0;
17024 }
17025 _ACEOF
17026 if ac_fn_c_try_compile "$LINENO"; then :
17027 gl_cv_sys_struct_timespec_in_unistd_h=yes
17028 else
17029 gl_cv_sys_struct_timespec_in_unistd_h=no
17030 fi
17031 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17032 fi
17033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
17034 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
17035 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
17036 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
17037 fi
17038 fi
17039 fi
17040 fi
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057 if test $gl_cv_have_include_next = yes; then
17058 gl_cv_next_time_h='<'time.h'>'
17059 else
17060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17061 $as_echo_n "checking absolute name of <time.h>... " >&6; }
17062 if ${gl_cv_next_time_h+:} false; then :
17063 $as_echo_n "(cached) " >&6
17064 else
17065
17066
17067
17068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17069 /* end confdefs.h. */
17070 #include <time.h>
17071 _ACEOF
17072 case "$host_os" in
17073 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17074 *) gl_absname_cpp="$ac_cpp" ;;
17075 esac
17076
17077 case "$host_os" in
17078 mingw*)
17079 gl_dirsep_regex='[/\\]'
17080 ;;
17081 *)
17082 gl_dirsep_regex='\/'
17083 ;;
17084 esac
17085 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17086 gl_header_literal_regex=`echo 'time.h' \
17087 | sed -e "$gl_make_literal_regex_sed"`
17088 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17089 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17090 s|^/[^/]|//&|
17091 p
17092 q
17093 }'
17094
17095 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17096 sed -n "$gl_absolute_header_sed"`
17097
17098 gl_header=$gl_cv_absolute_time_h
17099 gl_cv_next_time_h='"'$gl_header'"'
17100
17101
17102 fi
17103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17104 $as_echo "$gl_cv_next_time_h" >&6; }
17105 fi
17106 NEXT_TIME_H=$gl_cv_next_time_h
17107
17108 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17109 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17110 gl_next_as_first_directive='<'time.h'>'
17111 else
17112 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17113 gl_next_as_first_directive=$gl_cv_next_time_h
17114 fi
17115 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
17116
17117
17118
17119
17120
17121
17122
17123
17124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
17125 $as_echo_n "checking for TIME_UTC in <time.h>... " >&6; }
17126 if ${gl_cv_time_h_has_TIME_UTC+:} false; then :
17127 $as_echo_n "(cached) " >&6
17128 else
17129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17130 /* end confdefs.h. */
17131 #include <time.h>
17132
17133 int
17134 main ()
17135 {
17136 static int x = TIME_UTC; x++;
17137 ;
17138 return 0;
17139 }
17140 _ACEOF
17141 if ac_fn_c_try_compile "$LINENO"; then :
17142 gl_cv_time_h_has_TIME_UTC=yes
17143 else
17144 gl_cv_time_h_has_TIME_UTC=no
17145 fi
17146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17147 fi
17148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
17149 $as_echo "$gl_cv_time_h_has_TIME_UTC" >&6; }
17150 if test $gl_cv_time_h_has_TIME_UTC = yes; then
17151 TIME_H_DEFINES_TIME_UTC=1
17152 else
17153 TIME_H_DEFINES_TIME_UTC=0
17154 fi
17155
17156
17157
17158
17159 ac_fn_c_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default"
17160 if test "x$ac_cv_have_decl_execvpe" = xyes; then :
17161 ac_have_decl=1
17162 else
17163 ac_have_decl=0
17164 fi
17165
17166 cat >>confdefs.h <<_ACEOF
17167 #define HAVE_DECL_EXECVPE $ac_have_decl
17168 _ACEOF
17169
17170 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
17171 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
17172 ac_have_decl=1
17173 else
17174 ac_have_decl=0
17175 fi
17176
17177 cat >>confdefs.h <<_ACEOF
17178 #define HAVE_DECL_UNSETENV $ac_have_decl
17179 _ACEOF
17180
17181
17182
17183
17184
17185 if test $ac_cv_header_crtdefs_h = yes; then
17186 HAVE_CRTDEFS_H=1
17187 else
17188 HAVE_CRTDEFS_H=0
17189 fi
17190
17191
17192
17193 GNULIB_ISWBLANK=0;
17194 GNULIB_ISWDIGIT=0;
17195 GNULIB_ISWXDIGIT=0;
17196 GNULIB_WCTYPE=0;
17197 GNULIB_ISWCTYPE=0;
17198 GNULIB_WCTRANS=0;
17199 GNULIB_TOWCTRANS=0;
17200 HAVE_ISWBLANK=1;
17201 HAVE_WCTYPE_T=1;
17202 HAVE_WCTRANS_T=1;
17203 REPLACE_ISWBLANK=0;
17204 REPLACE_ISWDIGIT=0;
17205 REPLACE_ISWXDIGIT=0;
17206
17207
17208
17209
17210
17211
17212
17213
17214 if false; then
17215 GL_COND_LIBTOOL_TRUE=
17216 GL_COND_LIBTOOL_FALSE='#'
17217 else
17218 GL_COND_LIBTOOL_TRUE='#'
17219 GL_COND_LIBTOOL_FALSE=
17220 fi
17221
17222 gl_cond_libtool=false
17223 gl_libdeps=
17224 gl_ltlibdeps=
17225 gl_m4_base='import/m4'
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236 gl_source_base='import'
17237
17238
17239 if test $ac_cv_func_alloca_works = no; then
17240 :
17241 fi
17242
17243 # Define an additional variable used in the Makefile substitution.
17244 if test $ac_cv_working_alloca_h = yes; then
17245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
17246 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
17247 if ${gl_cv_rpl_alloca+:} false; then :
17248 $as_echo_n "(cached) " >&6
17249 else
17250
17251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17252 /* end confdefs.h. */
17253
17254 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
17255 Need own alloca
17256 #endif
17257
17258 _ACEOF
17259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17260 $EGREP "Need own alloca" >/dev/null 2>&1; then :
17261 gl_cv_rpl_alloca=yes
17262 else
17263 gl_cv_rpl_alloca=no
17264 fi
17265 rm -f conftest*
17266
17267
17268 fi
17269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
17270 $as_echo "$gl_cv_rpl_alloca" >&6; }
17271 if test $gl_cv_rpl_alloca = yes; then
17272
17273 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17274
17275 ALLOCA_H=alloca.h
17276 else
17277 ALLOCA_H=
17278 fi
17279 else
17280 ALLOCA_H=alloca.h
17281 fi
17282
17283 if test -n "$ALLOCA_H"; then
17284 GL_GENERATE_ALLOCA_H_TRUE=
17285 GL_GENERATE_ALLOCA_H_FALSE='#'
17286 else
17287 GL_GENERATE_ALLOCA_H_TRUE='#'
17288 GL_GENERATE_ALLOCA_H_FALSE=
17289 fi
17290
17291
17292 if test $ac_cv_working_alloca_h = yes; then
17293 HAVE_ALLOCA_H=1
17294 else
17295 HAVE_ALLOCA_H=0
17296 fi
17297
17298
17299
17300
17301
17302
17303 if test $ac_cv_header_arpa_inet_h = yes; then
17304 HAVE_ARPA_INET_H=1
17305 else
17306 HAVE_ARPA_INET_H=0
17307 fi
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318 if test $gl_cv_have_include_next = yes; then
17319 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
17320 else
17321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
17322 $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
17323 if ${gl_cv_next_arpa_inet_h+:} false; then :
17324 $as_echo_n "(cached) " >&6
17325 else
17326
17327 if test $ac_cv_header_arpa_inet_h = yes; then
17328
17329
17330
17331
17332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17333 /* end confdefs.h. */
17334 #include <arpa/inet.h>
17335 _ACEOF
17336 case "$host_os" in
17337 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17338 *) gl_absname_cpp="$ac_cpp" ;;
17339 esac
17340
17341 case "$host_os" in
17342 mingw*)
17343 gl_dirsep_regex='[/\\]'
17344 ;;
17345 *)
17346 gl_dirsep_regex='\/'
17347 ;;
17348 esac
17349 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17350 gl_header_literal_regex=`echo 'arpa/inet.h' \
17351 | sed -e "$gl_make_literal_regex_sed"`
17352 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17353 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17354 s|^/[^/]|//&|
17355 p
17356 q
17357 }'
17358
17359 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17360 sed -n "$gl_absolute_header_sed"`
17361
17362 gl_header=$gl_cv_absolute_arpa_inet_h
17363 gl_cv_next_arpa_inet_h='"'$gl_header'"'
17364 else
17365 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
17366 fi
17367
17368
17369 fi
17370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
17371 $as_echo "$gl_cv_next_arpa_inet_h" >&6; }
17372 fi
17373 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
17374
17375 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17376 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17377 gl_next_as_first_directive='<'arpa/inet.h'>'
17378 else
17379 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17380 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
17381 fi
17382 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392 if test $ac_cv_header_sys_socket_h = yes; then
17393 HAVE_WS2TCPIP_H=0
17394 else
17395 if test $ac_cv_header_ws2tcpip_h = yes; then
17396 HAVE_WS2TCPIP_H=1
17397 else
17398 HAVE_WS2TCPIP_H=0
17399 fi
17400 fi
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416 if test $ac_cv_func_btowc = no; then
17417 HAVE_BTOWC=0
17418 else
17419
17420
17421
17422
17423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
17424 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
17425 if ${gl_cv_func_btowc_nul+:} false; then :
17426 $as_echo_n "(cached) " >&6
17427 else
17428
17429 if test "$cross_compiling" = yes; then :
17430
17431 case "$host_os" in
17432 # Guess no on Cygwin.
17433 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
17434 # Guess yes on native Windows.
17435 mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
17436 # Guess yes otherwise.
17437 *) gl_cv_func_btowc_nul="guessing yes" ;;
17438 esac
17439
17440 else
17441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17442 /* end confdefs.h. */
17443
17444 #include <wchar.h>
17445 int main ()
17446 {
17447 if (btowc ('\0') != 0)
17448 return 1;
17449 return 0;
17450 }
17451 _ACEOF
17452 if ac_fn_c_try_run "$LINENO"; then :
17453 gl_cv_func_btowc_nul=yes
17454 else
17455 gl_cv_func_btowc_nul=no
17456 fi
17457 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17458 conftest.$ac_objext conftest.beam conftest.$ac_ext
17459 fi
17460
17461
17462 fi
17463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
17464 $as_echo "$gl_cv_func_btowc_nul" >&6; }
17465
17466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
17467 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
17468 if ${gl_cv_func_btowc_eof+:} false; then :
17469 $as_echo_n "(cached) " >&6
17470 else
17471
17472 case "$host_os" in
17473 # Guess no on IRIX.
17474 irix*) gl_cv_func_btowc_eof="guessing no" ;;
17475 # Guess yes on native Windows.
17476 mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
17477 # Guess yes otherwise.
17478 *) gl_cv_func_btowc_eof="guessing yes" ;;
17479 esac
17480 if test $LOCALE_FR != none; then
17481 if test "$cross_compiling" = yes; then :
17482 :
17483 else
17484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17485 /* end confdefs.h. */
17486
17487 #include <locale.h>
17488 #include <stdio.h>
17489 #include <wchar.h>
17490 int main ()
17491 {
17492 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
17493 {
17494 if (btowc (EOF) != WEOF)
17495 return 1;
17496 }
17497 return 0;
17498 }
17499 _ACEOF
17500 if ac_fn_c_try_run "$LINENO"; then :
17501 gl_cv_func_btowc_eof=yes
17502 else
17503 gl_cv_func_btowc_eof=no
17504 fi
17505 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17506 conftest.$ac_objext conftest.beam conftest.$ac_ext
17507 fi
17508
17509 fi
17510
17511 fi
17512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
17513 $as_echo "$gl_cv_func_btowc_eof" >&6; }
17514
17515 case "$gl_cv_func_btowc_nul" in
17516 *yes) ;;
17517 *) REPLACE_BTOWC=1 ;;
17518 esac
17519 case "$gl_cv_func_btowc_eof" in
17520 *yes) ;;
17521 *) REPLACE_BTOWC=1 ;;
17522 esac
17523 fi
17524
17525 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
17526
17527
17528
17529
17530
17531
17532
17533
17534 gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
17535
17536
17537 :
17538
17539 fi
17540
17541
17542
17543
17544
17545 GNULIB_BTOWC=1
17546
17547
17548
17549
17550
17551 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
17552
17553
17554
17555
17556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
17557 $as_echo_n "checking for __builtin_expect... " >&6; }
17558 if ${gl_cv___builtin_expect+:} false; then :
17559 $as_echo_n "(cached) " >&6
17560 else
17561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17562 /* end confdefs.h. */
17563
17564 int
17565 main (int argc, char **argv)
17566 {
17567 argc = __builtin_expect (argc, 100);
17568 return argv[argc != 100][0];
17569 }
17570 _ACEOF
17571 if ac_fn_c_try_link "$LINENO"; then :
17572 gl_cv___builtin_expect=yes
17573 else
17574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17575 /* end confdefs.h. */
17576
17577 #include <builtins.h>
17578 int
17579 main (int argc, char **argv)
17580 {
17581 argc = __builtin_expect (argc, 100);
17582 return argv[argc != 100][0];
17583 }
17584 _ACEOF
17585 if ac_fn_c_try_link "$LINENO"; then :
17586 gl_cv___builtin_expect="in <builtins.h>"
17587 else
17588 gl_cv___builtin_expect=no
17589 fi
17590 rm -f core conftest.err conftest.$ac_objext \
17591 conftest$ac_exeext conftest.$ac_ext
17592 fi
17593 rm -f core conftest.err conftest.$ac_objext \
17594 conftest$ac_exeext conftest.$ac_ext
17595 fi
17596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
17597 $as_echo "$gl_cv___builtin_expect" >&6; }
17598 if test "$gl_cv___builtin_expect" = yes; then
17599 $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
17600
17601 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
17602 $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
17603
17604 fi
17605
17606
17607
17608
17609
17610 if test $ac_cv_func_canonicalize_file_name = no; then
17611 HAVE_CANONICALIZE_FILE_NAME=0
17612 if test $ac_cv_func_realpath = no; then
17613 HAVE_REALPATH=0
17614 else
17615 case "$gl_cv_func_realpath_works" in
17616 *yes) ;;
17617 *) REPLACE_REALPATH=1 ;;
17618 esac
17619 fi
17620 else
17621 case "$gl_cv_func_realpath_works" in
17622 *yes)
17623 ;;
17624 *)
17625 REPLACE_CANONICALIZE_FILE_NAME=1
17626 REPLACE_REALPATH=1
17627 ;;
17628 esac
17629 fi
17630
17631 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
17632
17633
17634
17635
17636
17637
17638
17639
17640 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
17641
17642 fi
17643
17644
17645 cat >>confdefs.h <<_ACEOF
17646 #define GNULIB_CANONICALIZE_LGPL 1
17647 _ACEOF
17648
17649
17650
17651
17652
17653
17654
17655 GNULIB_CANONICALIZE_FILE_NAME=1
17656
17657
17658
17659
17660
17661 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
17662
17663
17664
17665
17666
17667
17668
17669
17670 GNULIB_REALPATH=1
17671
17672
17673
17674
17675
17676 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
17677
17678
17679
17680
17681
17682
17683
17684
17685 GNULIB_CHDIR=1
17686
17687
17688
17689
17690
17691 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
17692
17693
17694
17695
17696
17697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
17698 $as_echo_n "checking whether this system supports file names of any length... " >&6; }
17699 if ${gl_cv_have_unlimited_file_name_length+:} false; then :
17700 $as_echo_n "(cached) " >&6
17701 else
17702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17703 /* end confdefs.h. */
17704
17705 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
17706 #if HAVE_UNISTD_H
17707 # include <unistd.h>
17708 #endif
17709 #include <limits.h>
17710 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17711 # include <sys/param.h>
17712 #endif
17713 #if !defined PATH_MAX && defined MAXPATHLEN
17714 # define PATH_MAX MAXPATHLEN
17715 #endif
17716 #ifdef __hpux
17717 # undef PATH_MAX
17718 # define PATH_MAX 1024
17719 #endif
17720 #if defined _WIN32 && ! defined __CYGWIN__
17721 # undef PATH_MAX
17722 # define PATH_MAX 260
17723 #endif
17724
17725 #ifdef PATH_MAX
17726 have_arbitrary_file_name_length_limit
17727 #endif
17728 _ACEOF
17729 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17730 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
17731 gl_cv_have_unlimited_file_name_length=no
17732 else
17733 gl_cv_have_unlimited_file_name_length=yes
17734 fi
17735 rm -f conftest*
17736
17737 fi
17738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
17739 $as_echo "$gl_cv_have_unlimited_file_name_length" >&6; }
17740
17741 if test $gl_cv_have_unlimited_file_name_length = no; then
17742
17743
17744
17745
17746
17747
17748
17749
17750 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
17751
17752 :
17753 fi
17754
17755
17756
17757 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
17758 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
17759
17760 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
17761 # programs in the package would end up linked with that potentially-shared
17762 # library, inducing unnecessary run-time overhead.
17763 LIB_CLOCK_GETTIME=
17764
17765 gl_saved_libs=$LIBS
17766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17767 $as_echo_n "checking for library containing clock_gettime... " >&6; }
17768 if ${ac_cv_search_clock_gettime+:} false; then :
17769 $as_echo_n "(cached) " >&6
17770 else
17771 ac_func_search_save_LIBS=$LIBS
17772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17773 /* end confdefs.h. */
17774
17775 /* Override any GCC internal prototype to avoid an error.
17776 Use char because int might match the return type of a GCC
17777 builtin and then its argument prototype would still apply. */
17778 #ifdef __cplusplus
17779 extern "C"
17780 #endif
17781 char clock_gettime ();
17782 int
17783 main ()
17784 {
17785 return clock_gettime ();
17786 ;
17787 return 0;
17788 }
17789 _ACEOF
17790 for ac_lib in '' rt posix4; do
17791 if test -z "$ac_lib"; then
17792 ac_res="none required"
17793 else
17794 ac_res=-l$ac_lib
17795 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17796 fi
17797 if ac_fn_c_try_link "$LINENO"; then :
17798 ac_cv_search_clock_gettime=$ac_res
17799 fi
17800 rm -f core conftest.err conftest.$ac_objext \
17801 conftest$ac_exeext
17802 if ${ac_cv_search_clock_gettime+:} false; then :
17803 break
17804 fi
17805 done
17806 if ${ac_cv_search_clock_gettime+:} false; then :
17807
17808 else
17809 ac_cv_search_clock_gettime=no
17810 fi
17811 rm conftest.$ac_ext
17812 LIBS=$ac_func_search_save_LIBS
17813 fi
17814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17815 $as_echo "$ac_cv_search_clock_gettime" >&6; }
17816 ac_res=$ac_cv_search_clock_gettime
17817 if test "$ac_res" != no; then :
17818 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17819 test "$ac_cv_search_clock_gettime" = "none required" ||
17820 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
17821 fi
17822
17823 for ac_func in clock_gettime clock_settime
17824 do :
17825 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17826 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17827 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17828 cat >>confdefs.h <<_ACEOF
17829 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17830 _ACEOF
17831
17832 fi
17833 done
17834
17835 LIBS=$gl_saved_libs
17836
17837
17838
17839 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
17840
17841
17842
17843
17844
17845
17846 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17847 REPLACE_CLOSE=1
17848 fi
17849
17850
17851
17852
17853
17854
17855 if test $ac_cv_header_sys_socket_h != yes; then
17856 for ac_header in winsock2.h
17857 do :
17858 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17859 if test "x$ac_cv_header_winsock2_h" = xyes; then :
17860 cat >>confdefs.h <<_ACEOF
17861 #define HAVE_WINSOCK2_H 1
17862 _ACEOF
17863
17864 fi
17865
17866 done
17867
17868 fi
17869 if test "$ac_cv_header_winsock2_h" = yes; then
17870 HAVE_WINSOCK2_H=1
17871 UNISTD_H_HAVE_WINSOCK2_H=1
17872 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17873 else
17874 HAVE_WINSOCK2_H=0
17875 fi
17876
17877
17878 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
17879 REPLACE_CLOSE=1
17880 fi
17881
17882
17883 if test $REPLACE_CLOSE = 0; then
17884
17885
17886
17887 if test $ac_cv_func_fchdir = no; then
17888 HAVE_FCHDIR=0
17889 fi
17890
17891 if test $HAVE_FCHDIR = 0; then
17892 REPLACE_CLOSE=1
17893 fi
17894 fi
17895
17896
17897 if test $REPLACE_CLOSE = 1; then
17898
17899
17900
17901
17902
17903
17904
17905
17906 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
17907
17908 fi
17909
17910
17911
17912
17913
17914 GNULIB_CLOSE=1
17915
17916
17917
17918
17919
17920 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
17921
17922
17923
17924
17925
17926
17927 for ac_func in closedir
17928 do :
17929 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
17930 if test "x$ac_cv_func_closedir" = xyes; then :
17931 cat >>confdefs.h <<_ACEOF
17932 #define HAVE_CLOSEDIR 1
17933 _ACEOF
17934
17935 fi
17936 done
17937
17938 if test $ac_cv_func_closedir = no; then
17939 HAVE_CLOSEDIR=0
17940 fi
17941
17942
17943
17944
17945 if test $ac_cv_func_fchdir = no; then
17946 HAVE_FCHDIR=0
17947 fi
17948
17949 if test $HAVE_FCHDIR = 0; then
17950 if test $HAVE_CLOSEDIR = 1; then
17951 REPLACE_CLOSEDIR=1
17952 fi
17953 fi
17954
17955 case $host_os,$HAVE_CLOSEDIR in
17956 os2*,1)
17957 REPLACE_CLOSEDIR=1;;
17958 esac
17959
17960 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
17961
17962
17963
17964
17965
17966
17967
17968
17969 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
17970
17971 fi
17972
17973
17974
17975
17976
17977 GNULIB_CLOSEDIR=1
17978
17979
17980
17981
17982
17983 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998 if test $gl_cv_have_include_next = yes; then
17999 gl_cv_next_ctype_h='<'ctype.h'>'
18000 else
18001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
18002 $as_echo_n "checking absolute name of <ctype.h>... " >&6; }
18003 if ${gl_cv_next_ctype_h+:} false; then :
18004 $as_echo_n "(cached) " >&6
18005 else
18006
18007
18008
18009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18010 /* end confdefs.h. */
18011 #include <ctype.h>
18012 _ACEOF
18013 case "$host_os" in
18014 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18015 *) gl_absname_cpp="$ac_cpp" ;;
18016 esac
18017
18018 case "$host_os" in
18019 mingw*)
18020 gl_dirsep_regex='[/\\]'
18021 ;;
18022 *)
18023 gl_dirsep_regex='\/'
18024 ;;
18025 esac
18026 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18027 gl_header_literal_regex=`echo 'ctype.h' \
18028 | sed -e "$gl_make_literal_regex_sed"`
18029 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18030 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18031 s|^/[^/]|//&|
18032 p
18033 q
18034 }'
18035
18036 gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18037 sed -n "$gl_absolute_header_sed"`
18038
18039 gl_header=$gl_cv_absolute_ctype_h
18040 gl_cv_next_ctype_h='"'$gl_header'"'
18041
18042
18043 fi
18044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
18045 $as_echo "$gl_cv_next_ctype_h" >&6; }
18046 fi
18047 NEXT_CTYPE_H=$gl_cv_next_ctype_h
18048
18049 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18050 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18051 gl_next_as_first_directive='<'ctype.h'>'
18052 else
18053 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18054 gl_next_as_first_directive=$gl_cv_next_ctype_h
18055 fi
18056 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
18067 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
18068 if ${gl_cv_struct_dirent_d_ino+:} false; then :
18069 $as_echo_n "(cached) " >&6
18070 else
18071 if test "$cross_compiling" = yes; then :
18072 case "$host_os" in
18073 # Guess yes on glibc systems with Linux kernel.
18074 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
18075 # Guess yes on musl systems with Linux kernel.
18076 linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
18077 # Guess no on native Windows.
18078 mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
18079 # If we don't know, obey --enable-cross-guesses.
18080 *) gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
18081 esac
18082
18083 else
18084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18085 /* end confdefs.h. */
18086 #include <sys/types.h>
18087 #include <sys/stat.h>
18088 #include <dirent.h>
18089
18090 int
18091 main ()
18092 {
18093 DIR *dp = opendir (".");
18094 struct dirent *e;
18095 struct stat st;
18096 if (! dp)
18097 return 1;
18098 e = readdir (dp);
18099 if (! e)
18100 { closedir (dp); return 2; }
18101 if (lstat (e->d_name, &st) != 0)
18102 { closedir (dp); return 3; }
18103 if (e->d_ino != st.st_ino)
18104 { closedir (dp); return 4; }
18105 closedir (dp);
18106 return 0;
18107
18108 ;
18109 return 0;
18110 }
18111 _ACEOF
18112 if ac_fn_c_try_run "$LINENO"; then :
18113 gl_cv_struct_dirent_d_ino=yes
18114 else
18115 gl_cv_struct_dirent_d_ino=no
18116 fi
18117 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18118 conftest.$ac_objext conftest.beam conftest.$ac_ext
18119 fi
18120
18121 fi
18122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
18123 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
18124 case "$gl_cv_struct_dirent_d_ino" in
18125 *yes)
18126
18127 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
18128
18129 ;;
18130 esac
18131
18132
18133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
18134 $as_echo_n "checking for d_type member in directory struct... " >&6; }
18135 if ${gl_cv_struct_dirent_d_type+:} false; then :
18136 $as_echo_n "(cached) " >&6
18137 else
18138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18139 /* end confdefs.h. */
18140
18141 #include <sys/types.h>
18142 #include <dirent.h>
18143
18144 int
18145 main ()
18146 {
18147 struct dirent dp; dp.d_type = 0;
18148 ;
18149 return 0;
18150 }
18151 _ACEOF
18152 if ac_fn_c_try_link "$LINENO"; then :
18153 gl_cv_struct_dirent_d_type=yes
18154 else
18155 gl_cv_struct_dirent_d_type=no
18156 fi
18157 rm -f core conftest.err conftest.$ac_objext \
18158 conftest$ac_exeext conftest.$ac_ext
18159
18160
18161 fi
18162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
18163 $as_echo "$gl_cv_struct_dirent_d_type" >&6; }
18164 if test $gl_cv_struct_dirent_d_type = yes; then
18165
18166 $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
18167
18168 fi
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183 if test $gl_cv_have_include_next = yes; then
18184 gl_cv_next_dirent_h='<'dirent.h'>'
18185 else
18186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
18187 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
18188 if ${gl_cv_next_dirent_h+:} false; then :
18189 $as_echo_n "(cached) " >&6
18190 else
18191
18192 if test $ac_cv_header_dirent_h = yes; then
18193
18194
18195
18196
18197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18198 /* end confdefs.h. */
18199 #include <dirent.h>
18200 _ACEOF
18201 case "$host_os" in
18202 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18203 *) gl_absname_cpp="$ac_cpp" ;;
18204 esac
18205
18206 case "$host_os" in
18207 mingw*)
18208 gl_dirsep_regex='[/\\]'
18209 ;;
18210 *)
18211 gl_dirsep_regex='\/'
18212 ;;
18213 esac
18214 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18215 gl_header_literal_regex=`echo 'dirent.h' \
18216 | sed -e "$gl_make_literal_regex_sed"`
18217 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18218 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18219 s|^/[^/]|//&|
18220 p
18221 q
18222 }'
18223
18224 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18225 sed -n "$gl_absolute_header_sed"`
18226
18227 gl_header=$gl_cv_absolute_dirent_h
18228 gl_cv_next_dirent_h='"'$gl_header'"'
18229 else
18230 gl_cv_next_dirent_h='<'dirent.h'>'
18231 fi
18232
18233
18234 fi
18235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
18236 $as_echo "$gl_cv_next_dirent_h" >&6; }
18237 fi
18238 NEXT_DIRENT_H=$gl_cv_next_dirent_h
18239
18240 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18241 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18242 gl_next_as_first_directive='<'dirent.h'>'
18243 else
18244 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18245 gl_next_as_first_directive=$gl_cv_next_dirent_h
18246 fi
18247 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
18248
18249
18250
18251
18252 if test $ac_cv_header_dirent_h = yes; then
18253 HAVE_DIRENT_H=1
18254 else
18255 HAVE_DIRENT_H=0
18256 fi
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268 for ac_func in dirfd
18269 do :
18270 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
18271 if test "x$ac_cv_func_dirfd" = xyes; then :
18272 cat >>confdefs.h <<_ACEOF
18273 #define HAVE_DIRFD 1
18274 _ACEOF
18275
18276 fi
18277 done
18278
18279 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
18280 #include <dirent.h>
18281 "
18282 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
18283 ac_have_decl=1
18284 else
18285 ac_have_decl=0
18286 fi
18287
18288 cat >>confdefs.h <<_ACEOF
18289 #define HAVE_DECL_DIRFD $ac_have_decl
18290 _ACEOF
18291
18292 if test $ac_cv_have_decl_dirfd = no; then
18293 HAVE_DECL_DIRFD=0
18294 fi
18295
18296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
18297 $as_echo_n "checking whether dirfd is a macro... " >&6; }
18298 if ${gl_cv_func_dirfd_macro+:} false; then :
18299 $as_echo_n "(cached) " >&6
18300 else
18301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18302 /* end confdefs.h. */
18303
18304 #include <sys/types.h>
18305 #include <dirent.h>
18306 #ifdef dirfd
18307 dirent_header_defines_dirfd
18308 #endif
18309 _ACEOF
18310 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18311 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
18312 gl_cv_func_dirfd_macro=yes
18313 else
18314 gl_cv_func_dirfd_macro=no
18315 fi
18316 rm -f conftest*
18317
18318 fi
18319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
18320 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
18321
18322 # Use the replacement if we have no function or macro with that name,
18323 # or if OS/2 kLIBC whose dirfd() does not work.
18324 # Replace only if the system declares dirfd already.
18325 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
18326 no,no,*,yes | *,*,os2*,yes)
18327 REPLACE_DIRFD=1
18328
18329 $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
18330 ;;
18331 esac
18332
18333 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
18334 || test $REPLACE_DIRFD = 1; then
18335
18336
18337
18338
18339
18340
18341
18342
18343 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
18344
18345
18346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
18347 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
18348 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
18349 $as_echo_n "(cached) " >&6
18350 else
18351
18352 dirfd_save_CFLAGS=$CFLAGS
18353 for ac_expr in d_fd dd_fd; do
18354
18355 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
18356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18357 /* end confdefs.h. */
18358
18359 #include <sys/types.h>
18360 #include <dirent.h>
18361 int
18362 main ()
18363 {
18364 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
18365 ;
18366 return 0;
18367 }
18368 _ACEOF
18369 if ac_fn_c_try_compile "$LINENO"; then :
18370 dir_fd_found=yes
18371
18372 fi
18373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18374 CFLAGS=$dirfd_save_CFLAGS
18375 test "$dir_fd_found" = yes && break
18376 done
18377 test "$dir_fd_found" = yes || ac_expr=no_such_member
18378
18379 gl_cv_sys_dir_fd_member_name=$ac_expr
18380
18381
18382 fi
18383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
18384 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
18385 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
18386
18387 cat >>confdefs.h <<_ACEOF
18388 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
18389 _ACEOF
18390
18391 fi
18392
18393
18394 fi
18395
18396
18397
18398
18399
18400 GNULIB_DIRFD=1
18401
18402
18403
18404
18405
18406 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
18407
18408
18409
18410
18411
18412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
18413 $as_echo_n "checking whether // is distinct from /... " >&6; }
18414 if ${gl_cv_double_slash_root+:} false; then :
18415 $as_echo_n "(cached) " >&6
18416 else
18417 if test x"$cross_compiling" = xyes ; then
18418 # When cross-compiling, there is no way to tell whether // is special
18419 # short of a list of hosts. However, the only known hosts to date
18420 # that have a distinct // are Apollo DomainOS (too old to port to),
18421 # Cygwin, and z/OS. If anyone knows of another system for which // has
18422 # special semantics and is distinct from /, please report it to
18423 # <bug-gnulib@gnu.org>.
18424 case $host in
18425 *-cygwin | i370-ibm-openedition)
18426 gl_cv_double_slash_root=yes ;;
18427 *)
18428 # Be optimistic and assume that / and // are the same when we
18429 # don't know.
18430 gl_cv_double_slash_root='unknown, assuming no' ;;
18431 esac
18432 else
18433 set x `ls -di / // 2>/dev/null`
18434 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
18435 gl_cv_double_slash_root=no
18436 else
18437 gl_cv_double_slash_root=yes
18438 fi
18439 fi
18440 fi
18441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
18442 $as_echo "$gl_cv_double_slash_root" >&6; }
18443 if test "$gl_cv_double_slash_root" = yes; then
18444
18445 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
18446
18447 fi
18448
18449
18450
18451
18452
18453 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18454 REPLACE_DUP=1
18455 fi
18456
18457
18458
18459
18460
18461 if test $ac_cv_func_fchdir = no; then
18462 HAVE_FCHDIR=0
18463 fi
18464
18465 if test $HAVE_FCHDIR = 0; then
18466 REPLACE_DUP=1
18467 fi
18468
18469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
18470 $as_echo_n "checking whether dup works... " >&6; }
18471 if ${gl_cv_func_dup_works+:} false; then :
18472 $as_echo_n "(cached) " >&6
18473 else
18474 if test "$cross_compiling" = yes; then :
18475 case "$host_os" in
18476 # Guess no on native Windows.
18477 mingw*) gl_cv_func_dup_works="guessing no" ;;
18478 *) gl_cv_func_dup_works="guessing yes" ;;
18479 esac
18480
18481 else
18482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18483 /* end confdefs.h. */
18484 #include <unistd.h>
18485 #include <fcntl.h>
18486 #include <errno.h>
18487
18488
18489 $gl_mda_defines
18490
18491 int
18492 main ()
18493 {
18494 /* On OS/2 kLIBC, dup does not work on a directory fd. */
18495 int fd = open (".", O_RDONLY);
18496 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
18497
18498 ;
18499 return 0;
18500 }
18501
18502 _ACEOF
18503 if ac_fn_c_try_run "$LINENO"; then :
18504 gl_cv_func_dup_works=yes
18505 else
18506 gl_cv_func_dup_works=no
18507 fi
18508 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18509 conftest.$ac_objext conftest.beam conftest.$ac_ext
18510 fi
18511
18512
18513 fi
18514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
18515 $as_echo "$gl_cv_func_dup_works" >&6; }
18516 case "$gl_cv_func_dup_works" in
18517 *yes) ;;
18518 *)
18519 REPLACE_DUP=1
18520 ;;
18521 esac
18522
18523 if test $REPLACE_DUP = 1; then
18524
18525
18526
18527
18528
18529
18530
18531
18532 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
18533
18534 :
18535 fi
18536
18537
18538
18539
18540
18541 GNULIB_DUP=1
18542
18543
18544
18545
18546
18547 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
18548
18549
18550
18551
18552
18553
18554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
18555 $as_echo_n "checking whether dup2 works... " >&6; }
18556 if ${gl_cv_func_dup2_works+:} false; then :
18557 $as_echo_n "(cached) " >&6
18558 else
18559 if test "$cross_compiling" = yes; then :
18560 case "$host_os" in
18561 mingw*) # on this platform, dup2 always returns 0 for success
18562 gl_cv_func_dup2_works="guessing no" ;;
18563 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
18564 gl_cv_func_dup2_works="guessing no" ;;
18565 aix* | freebsd*)
18566 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
18567 # not EBADF.
18568 gl_cv_func_dup2_works="guessing no" ;;
18569 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
18570 gl_cv_func_dup2_works="guessing no" ;;
18571 *-android*) # implemented using dup3(), which fails if oldfd == newfd
18572 gl_cv_func_dup2_works="guessing no" ;;
18573 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
18574 gl_cv_func_dup2_works="guessing no" ;;
18575 *) gl_cv_func_dup2_works="guessing yes" ;;
18576 esac
18577 else
18578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18579 /* end confdefs.h. */
18580
18581 #include <errno.h>
18582 #include <fcntl.h>
18583 #include <limits.h>
18584 #include <sys/resource.h>
18585 #include <unistd.h>
18586
18587
18588 $gl_mda_defines
18589
18590 #ifndef RLIM_SAVED_CUR
18591 # define RLIM_SAVED_CUR RLIM_INFINITY
18592 #endif
18593 #ifndef RLIM_SAVED_MAX
18594 # define RLIM_SAVED_MAX RLIM_INFINITY
18595 #endif
18596
18597 int
18598 main ()
18599 {
18600 int result = 0;
18601 int bad_fd = INT_MAX;
18602 struct rlimit rlim;
18603 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
18604 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
18605 && rlim.rlim_cur != RLIM_INFINITY
18606 && rlim.rlim_cur != RLIM_SAVED_MAX
18607 && rlim.rlim_cur != RLIM_SAVED_CUR)
18608 bad_fd = rlim.rlim_cur;
18609 #ifdef FD_CLOEXEC
18610 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
18611 result |= 1;
18612 #endif
18613 if (dup2 (1, 1) != 1)
18614 result |= 2;
18615 #ifdef FD_CLOEXEC
18616 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
18617 result |= 4;
18618 #endif
18619 close (0);
18620 if (dup2 (0, 0) != -1)
18621 result |= 8;
18622 /* Many gnulib modules require POSIX conformance of EBADF. */
18623 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
18624 result |= 16;
18625 /* Flush out some cygwin core dumps. */
18626 if (dup2 (2, -1) != -1 || errno != EBADF)
18627 result |= 32;
18628 dup2 (2, 255);
18629 dup2 (2, 256);
18630 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
18631 {
18632 int fd = open (".", O_RDONLY);
18633 if (fd == -1)
18634 result |= 64;
18635 else if (dup2 (fd, fd + 1) == -1)
18636 result |= 128;
18637 close (fd);
18638 }
18639 return result;
18640 ;
18641 return 0;
18642 }
18643
18644 _ACEOF
18645 if ac_fn_c_try_run "$LINENO"; then :
18646 gl_cv_func_dup2_works=yes
18647 else
18648 gl_cv_func_dup2_works=no
18649 fi
18650 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18651 conftest.$ac_objext conftest.beam conftest.$ac_ext
18652 fi
18653
18654
18655 fi
18656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
18657 $as_echo "$gl_cv_func_dup2_works" >&6; }
18658 case "$gl_cv_func_dup2_works" in
18659 *yes) ;;
18660 *)
18661 REPLACE_DUP2=1
18662 for ac_func in setdtablesize
18663 do :
18664 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
18665 if test "x$ac_cv_func_setdtablesize" = xyes; then :
18666 cat >>confdefs.h <<_ACEOF
18667 #define HAVE_SETDTABLESIZE 1
18668 _ACEOF
18669
18670 fi
18671 done
18672
18673 ;;
18674 esac
18675
18676
18677
18678
18679 if test $ac_cv_func_fchdir = no; then
18680 HAVE_FCHDIR=0
18681 fi
18682
18683 if test $HAVE_FCHDIR = 0; then
18684 REPLACE_DUP2=1
18685 fi
18686
18687
18688 if test $REPLACE_DUP2 = 1; then
18689
18690
18691
18692
18693
18694
18695
18696
18697 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
18698
18699
18700 fi
18701
18702
18703
18704
18705
18706 GNULIB_DUP2=1
18707
18708
18709
18710
18711
18712 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722 GNULIB_ENVIRON=1
18723
18724
18725
18726
18727
18728 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
18729
18730
18731
18732
18733
18734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
18735 $as_echo_n "checking for error_at_line... " >&6; }
18736 if ${ac_cv_lib_error_at_line+:} false; then :
18737 $as_echo_n "(cached) " >&6
18738 else
18739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18740 /* end confdefs.h. */
18741 #include <error.h>
18742 int
18743 main ()
18744 {
18745 error_at_line (0, 0, "", 0, "an error occurred");
18746 ;
18747 return 0;
18748 }
18749 _ACEOF
18750 if ac_fn_c_try_link "$LINENO"; then :
18751 ac_cv_lib_error_at_line=yes
18752 else
18753 ac_cv_lib_error_at_line=no
18754 fi
18755 rm -f core conftest.err conftest.$ac_objext \
18756 conftest$ac_exeext conftest.$ac_ext
18757 fi
18758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
18759 $as_echo "$ac_cv_lib_error_at_line" >&6; }
18760
18761 if test $ac_cv_lib_error_at_line = no; then
18762
18763
18764
18765
18766
18767
18768
18769
18770 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
18771
18772
18773
18774 :
18775
18776 fi
18777
18778
18779
18780
18781
18782
18783
18784 if test $ac_cv_have_decl_fchdir = no; then
18785 HAVE_DECL_FCHDIR=0
18786 fi
18787
18788
18789 if test $HAVE_FCHDIR = 0; then
18790
18791
18792
18793
18794
18795
18796
18797
18798 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
18799
18800 :
18801
18802 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
18803
18804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
18805 $as_echo_n "checking whether open can visit directories... " >&6; }
18806 if ${gl_cv_func_open_directory_works+:} false; then :
18807 $as_echo_n "(cached) " >&6
18808 else
18809 if test "$cross_compiling" = yes; then :
18810 case "$host_os" in
18811 # Guess yes on Linux systems.
18812 linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
18813 # Guess yes on glibc systems.
18814 *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
18815 # Guess no on native Windows.
18816 mingw*) gl_cv_func_open_directory_works="guessing no" ;;
18817 # If we don't know, obey --enable-cross-guesses.
18818 *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
18819 esac
18820
18821 else
18822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18823 /* end confdefs.h. */
18824 #include <fcntl.h>
18825
18826
18827 $gl_mda_defines
18828
18829 int
18830 main ()
18831 {
18832 return open(".", O_RDONLY) < 0;
18833 ;
18834 return 0;
18835 }
18836 _ACEOF
18837 if ac_fn_c_try_run "$LINENO"; then :
18838 gl_cv_func_open_directory_works=yes
18839 else
18840 gl_cv_func_open_directory_works=no
18841 fi
18842 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18843 conftest.$ac_objext conftest.beam conftest.$ac_ext
18844 fi
18845
18846 fi
18847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
18848 $as_echo "$gl_cv_func_open_directory_works" >&6; }
18849 case "$gl_cv_func_open_directory_works" in
18850 *yes) ;;
18851 *)
18852
18853 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
18854
18855 ;;
18856 esac
18857 fi
18858
18859
18860
18861
18862
18863
18864 GNULIB_FCHDIR=1
18865
18866
18867
18868
18869
18870 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
18871
18872
18873
18874
18875
18876
18877
18878
18879 if test $ac_cv_func_fcntl = no; then
18880
18881
18882
18883 if test $ac_cv_func_fcntl = no; then
18884 HAVE_FCNTL=0
18885 else
18886 REPLACE_FCNTL=1
18887 fi
18888
18889 else
18890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
18891 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
18892 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
18893 $as_echo_n "(cached) " >&6
18894 else
18895 if test "$cross_compiling" = yes; then :
18896 case $host_os in
18897 aix* | cygwin* | haiku*)
18898 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
18899 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
18900 esac
18901 else
18902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18903 /* end confdefs.h. */
18904 #include <errno.h>
18905 #include <fcntl.h>
18906 #include <limits.h>
18907 #include <sys/resource.h>
18908 #include <unistd.h>
18909
18910
18911 $gl_mda_defines
18912
18913 #ifndef RLIM_SAVED_CUR
18914 # define RLIM_SAVED_CUR RLIM_INFINITY
18915 #endif
18916 #ifndef RLIM_SAVED_MAX
18917 # define RLIM_SAVED_MAX RLIM_INFINITY
18918 #endif
18919
18920 int
18921 main ()
18922 {
18923 int result = 0;
18924 int bad_fd = INT_MAX;
18925 struct rlimit rlim;
18926 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
18927 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
18928 && rlim.rlim_cur != RLIM_INFINITY
18929 && rlim.rlim_cur != RLIM_SAVED_MAX
18930 && rlim.rlim_cur != RLIM_SAVED_CUR)
18931 bad_fd = rlim.rlim_cur;
18932 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
18933 if (errno != EINVAL) result |= 2;
18934 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
18935 if (errno != EINVAL) result |= 8;
18936 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
18937 {
18938 int fd;
18939 fd = open (".", O_RDONLY);
18940 if (fd == -1)
18941 result |= 16;
18942 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
18943 result |= 32;
18944
18945 close (fd);
18946 }
18947 return result;
18948 ;
18949 return 0;
18950 }
18951 _ACEOF
18952 if ac_fn_c_try_run "$LINENO"; then :
18953 gl_cv_func_fcntl_f_dupfd_works=yes
18954 else
18955 gl_cv_func_fcntl_f_dupfd_works=no
18956 fi
18957 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18958 conftest.$ac_objext conftest.beam conftest.$ac_ext
18959 fi
18960
18961 fi
18962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
18963 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
18964 case $gl_cv_func_fcntl_f_dupfd_works in
18965 *yes) ;;
18966 *)
18967
18968
18969 if test $ac_cv_func_fcntl = no; then
18970 HAVE_FCNTL=0
18971 else
18972 REPLACE_FCNTL=1
18973 fi
18974
18975
18976 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
18977 ;;
18978 esac
18979
18980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
18981 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
18982 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
18983 $as_echo_n "(cached) " >&6
18984 else
18985 if test "$cross_compiling" = yes; then :
18986 case "$host_os" in
18987 # Guess no on NetBSD.
18988 netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
18989 *) gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
18990 esac
18991
18992 else
18993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18994 /* end confdefs.h. */
18995 #include <fcntl.h>
18996 #include <unistd.h>
18997 int main (int argc, char *argv[])
18998 {
18999 if (argc == 1)
19000 /* parent process */
19001 {
19002 if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
19003 return 1;
19004 return execl ("./conftest", "./conftest", "child", NULL);
19005 }
19006 else
19007 /* child process */
19008 return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
19009 }
19010
19011
19012 _ACEOF
19013 if ac_fn_c_try_run "$LINENO"; then :
19014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19015 /* end confdefs.h. */
19016
19017 #ifdef __linux__
19018 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
19019 it to support the semantics on older kernels that failed with EINVAL. */
19020 choke me
19021 #endif
19022
19023 int
19024 main ()
19025 {
19026
19027 ;
19028 return 0;
19029 }
19030 _ACEOF
19031 if ac_fn_c_try_compile "$LINENO"; then :
19032 gl_cv_func_fcntl_f_dupfd_cloexec=yes
19033 else
19034 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
19035 fi
19036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19037
19038 else
19039 gl_cv_func_fcntl_f_dupfd_cloexec=no
19040 fi
19041 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19042 conftest.$ac_objext conftest.beam conftest.$ac_ext
19043 fi
19044
19045
19046 fi
19047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
19048 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
19049 case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
19050 *yes) ;;
19051 *)
19052
19053
19054 if test $ac_cv_func_fcntl = no; then
19055 HAVE_FCNTL=0
19056 else
19057 REPLACE_FCNTL=1
19058 fi
19059
19060 ;;
19061 esac
19062 fi
19063
19064
19065
19066
19067 if test $ac_cv_func_fchdir = no; then
19068 HAVE_FCHDIR=0
19069 fi
19070
19071 if test $HAVE_FCHDIR = 0; then
19072
19073
19074
19075 if test $ac_cv_func_fcntl = no; then
19076 HAVE_FCNTL=0
19077 else
19078 REPLACE_FCNTL=1
19079 fi
19080
19081 fi
19082
19083
19084 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
19085
19086
19087
19088
19089
19090
19091
19092
19093 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
19094
19095 fi
19096
19097
19098
19099
19100
19101 GNULIB_FCNTL=1
19102
19103
19104
19105
19106
19107 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122 if test $gl_cv_have_include_next = yes; then
19123 gl_cv_next_fcntl_h='<'fcntl.h'>'
19124 else
19125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
19126 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
19127 if ${gl_cv_next_fcntl_h+:} false; then :
19128 $as_echo_n "(cached) " >&6
19129 else
19130
19131
19132
19133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19134 /* end confdefs.h. */
19135 #include <fcntl.h>
19136 _ACEOF
19137 case "$host_os" in
19138 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19139 *) gl_absname_cpp="$ac_cpp" ;;
19140 esac
19141
19142 case "$host_os" in
19143 mingw*)
19144 gl_dirsep_regex='[/\\]'
19145 ;;
19146 *)
19147 gl_dirsep_regex='\/'
19148 ;;
19149 esac
19150 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19151 gl_header_literal_regex=`echo 'fcntl.h' \
19152 | sed -e "$gl_make_literal_regex_sed"`
19153 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19154 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19155 s|^/[^/]|//&|
19156 p
19157 q
19158 }'
19159
19160 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19161 sed -n "$gl_absolute_header_sed"`
19162
19163 gl_header=$gl_cv_absolute_fcntl_h
19164 gl_cv_next_fcntl_h='"'$gl_header'"'
19165
19166
19167 fi
19168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
19169 $as_echo "$gl_cv_next_fcntl_h" >&6; }
19170 fi
19171 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
19172
19173 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19174 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19175 gl_next_as_first_directive='<'fcntl.h'>'
19176 else
19177 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19178 gl_next_as_first_directive=$gl_cv_next_fcntl_h
19179 fi
19180 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196 cat >>confdefs.h <<_ACEOF
19197 #define GNULIB_FD_SAFER_FLAG 1
19198 _ACEOF
19199
19200
19201
19202
19203
19204
19205
19206 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
19207 #include <dirent.h>
19208
19209 "
19210 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
19211 ac_have_decl=1
19212 else
19213 ac_have_decl=0
19214 fi
19215
19216 cat >>confdefs.h <<_ACEOF
19217 #define HAVE_DECL_FDOPENDIR $ac_have_decl
19218 _ACEOF
19219 if test $ac_have_decl = 1; then :
19220
19221 else
19222 HAVE_DECL_FDOPENDIR=0
19223 fi
19224
19225
19226 if test $ac_cv_func_fdopendir = no; then
19227 HAVE_FDOPENDIR=0
19228 else
19229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
19230 $as_echo_n "checking whether fdopendir works... " >&6; }
19231 if ${gl_cv_func_fdopendir_works+:} false; then :
19232 $as_echo_n "(cached) " >&6
19233 else
19234 if test "$cross_compiling" = yes; then :
19235 case "$host_os" in
19236 # Guess yes on glibc systems.
19237 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
19238 # Guess yes on musl systems.
19239 *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
19240 # If we don't know, obey --enable-cross-guesses.
19241 *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
19242 esac
19243
19244 else
19245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19246 /* end confdefs.h. */
19247
19248 #include <dirent.h>
19249 #include <fcntl.h>
19250 #include <unistd.h>
19251
19252
19253 $gl_mda_defines
19254
19255 #if !HAVE_DECL_FDOPENDIR
19256 extern
19257 # ifdef __cplusplus
19258 "C"
19259 # endif
19260 DIR *fdopendir (int);
19261 #endif
19262
19263 int
19264 main ()
19265 {
19266 int result = 0;
19267 int fd = open ("conftest.c", O_RDONLY);
19268 if (fd < 0) result |= 1;
19269 if (fdopendir (fd)) result |= 2;
19270 if (close (fd)) result |= 4;
19271 return result;
19272
19273 ;
19274 return 0;
19275 }
19276 _ACEOF
19277 if ac_fn_c_try_run "$LINENO"; then :
19278 gl_cv_func_fdopendir_works=yes
19279 else
19280 gl_cv_func_fdopendir_works=no
19281 fi
19282 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19283 conftest.$ac_objext conftest.beam conftest.$ac_ext
19284 fi
19285
19286 fi
19287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
19288 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
19289 case "$gl_cv_func_fdopendir_works" in
19290 *yes) ;;
19291 *)
19292 REPLACE_FDOPENDIR=1
19293 ;;
19294 esac
19295 fi
19296
19297 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
19298
19299
19300
19301
19302
19303
19304
19305
19306 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
19307
19308 fi
19309
19310
19311
19312
19313
19314 GNULIB_FDOPENDIR=1
19315
19316
19317
19318
19319
19320 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
19321
19322
19323
19324
19325
19326 cat >>confdefs.h <<_ACEOF
19327 #define GNULIB_FDOPENDIR 1
19328 _ACEOF
19329
19330
19331
19332
19333
19334
19335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
19336 $as_echo_n "checking for flexible array member... " >&6; }
19337 if ${ac_cv_c_flexmember+:} false; then :
19338 $as_echo_n "(cached) " >&6
19339 else
19340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19341 /* end confdefs.h. */
19342 #include <stdlib.h>
19343 #include <stdio.h>
19344 #include <stddef.h>
19345 struct m { struct m *next, **list; char name[]; };
19346 struct s { struct s *p; struct m *m; int n; double d[]; };
19347 int
19348 main ()
19349 {
19350 int m = getchar ();
19351 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
19352 nbytes += sizeof (struct s) - 1;
19353 nbytes -= nbytes % sizeof (struct s);
19354 struct s *p = malloc (nbytes);
19355 p->p = p;
19356 p->m = NULL;
19357 p->d[0] = 0.0;
19358 return p->d != (double *) NULL;
19359 ;
19360 return 0;
19361 }
19362 _ACEOF
19363 if ac_fn_c_try_compile "$LINENO"; then :
19364 ac_cv_c_flexmember=yes
19365 else
19366 ac_cv_c_flexmember=no
19367 fi
19368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19369 fi
19370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
19371 $as_echo "$ac_cv_c_flexmember" >&6; }
19372 if test $ac_cv_c_flexmember = yes; then
19373
19374 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
19375
19376 else
19377 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
19378
19379 fi
19380
19381
19382
19383
19384 FLOAT_H=
19385 REPLACE_FLOAT_LDBL=0
19386 case "$host_os" in
19387 aix* | beos* | openbsd* | mirbsd* | irix*)
19388 FLOAT_H=float.h
19389 ;;
19390 freebsd* | dragonfly*)
19391 case "$host_cpu" in
19392 i[34567]86 )
19393 FLOAT_H=float.h
19394 ;;
19395 x86_64 )
19396 # On x86_64 systems, the C compiler may still be generating
19397 # 32-bit code.
19398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19399 /* end confdefs.h. */
19400 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
19401 int ok;
19402 #else
19403 error fail
19404 #endif
19405
19406 _ACEOF
19407 if ac_fn_c_try_compile "$LINENO"; then :
19408
19409 else
19410 FLOAT_H=float.h
19411 fi
19412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19413 ;;
19414 esac
19415 ;;
19416 linux*)
19417 case "$host_cpu" in
19418 powerpc*)
19419 FLOAT_H=float.h
19420 ;;
19421 esac
19422 ;;
19423 esac
19424 case "$host_os" in
19425 aix* | freebsd* | dragonfly* | linux*)
19426 if test -n "$FLOAT_H"; then
19427 REPLACE_FLOAT_LDBL=1
19428 fi
19429 ;;
19430 esac
19431
19432 REPLACE_ITOLD=0
19433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
19434 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
19435 if ${gl_cv_func_itold_works+:} false; then :
19436 $as_echo_n "(cached) " >&6
19437 else
19438
19439 if test "$cross_compiling" = yes; then :
19440 case "$host" in
19441 sparc*-*-linux*)
19442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19443 /* end confdefs.h. */
19444 #if defined __LP64__ || defined __arch64__
19445 int ok;
19446 #else
19447 error fail
19448 #endif
19449
19450 _ACEOF
19451 if ac_fn_c_try_compile "$LINENO"; then :
19452 gl_cv_func_itold_works="guessing no"
19453 else
19454 gl_cv_func_itold_works="guessing yes"
19455 fi
19456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19457 ;;
19458 # Guess yes on native Windows.
19459 mingw*) gl_cv_func_itold_works="guessing yes" ;;
19460 *) gl_cv_func_itold_works="guessing yes" ;;
19461 esac
19462
19463 else
19464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19465 /* end confdefs.h. */
19466
19467 int i = -1;
19468 volatile long double ld;
19469 int main ()
19470 {
19471 ld += i * 1.0L;
19472 if (ld > 0)
19473 return 1;
19474 return 0;
19475 }
19476 _ACEOF
19477 if ac_fn_c_try_run "$LINENO"; then :
19478 gl_cv_func_itold_works=yes
19479 else
19480 gl_cv_func_itold_works=no
19481 fi
19482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19483 conftest.$ac_objext conftest.beam conftest.$ac_ext
19484 fi
19485
19486
19487 fi
19488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
19489 $as_echo "$gl_cv_func_itold_works" >&6; }
19490 case "$gl_cv_func_itold_works" in
19491 *no)
19492 REPLACE_ITOLD=1
19493 FLOAT_H=float.h
19494 ;;
19495 esac
19496
19497 if test -n "$FLOAT_H"; then
19498
19499
19500
19501
19502
19503
19504
19505
19506 if test $gl_cv_have_include_next = yes; then
19507 gl_cv_next_float_h='<'float.h'>'
19508 else
19509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
19510 $as_echo_n "checking absolute name of <float.h>... " >&6; }
19511 if ${gl_cv_next_float_h+:} false; then :
19512 $as_echo_n "(cached) " >&6
19513 else
19514
19515
19516
19517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19518 /* end confdefs.h. */
19519 #include <float.h>
19520 _ACEOF
19521 case "$host_os" in
19522 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19523 *) gl_absname_cpp="$ac_cpp" ;;
19524 esac
19525
19526 case "$host_os" in
19527 mingw*)
19528 gl_dirsep_regex='[/\\]'
19529 ;;
19530 *)
19531 gl_dirsep_regex='\/'
19532 ;;
19533 esac
19534 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19535 gl_header_literal_regex=`echo 'float.h' \
19536 | sed -e "$gl_make_literal_regex_sed"`
19537 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19538 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19539 s|^/[^/]|//&|
19540 p
19541 q
19542 }'
19543
19544 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19545 sed -n "$gl_absolute_header_sed"`
19546
19547 gl_header=$gl_cv_absolute_float_h
19548 gl_cv_next_float_h='"'$gl_header'"'
19549
19550
19551 fi
19552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
19553 $as_echo "$gl_cv_next_float_h" >&6; }
19554 fi
19555 NEXT_FLOAT_H=$gl_cv_next_float_h
19556
19557 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19558 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19559 gl_next_as_first_directive='<'float.h'>'
19560 else
19561 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19562 gl_next_as_first_directive=$gl_cv_next_float_h
19563 fi
19564 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
19565
19566
19567
19568
19569 fi
19570
19571 if test -n "$FLOAT_H"; then
19572 GL_GENERATE_FLOAT_H_TRUE=
19573 GL_GENERATE_FLOAT_H_FALSE='#'
19574 else
19575 GL_GENERATE_FLOAT_H_TRUE='#'
19576 GL_GENERATE_FLOAT_H_FALSE=
19577 fi
19578
19579
19580
19581 if test $REPLACE_FLOAT_LDBL = 1; then
19582
19583
19584
19585
19586
19587
19588
19589
19590 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
19591
19592 fi
19593 if test $REPLACE_ITOLD = 1; then
19594
19595
19596
19597
19598
19599
19600
19601
19602 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
19603
19604 fi
19605
19606
19607
19608
19609 gl_fnmatch_required_lowercase=`
19610 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
19611 `
19612
19613 if test $ac_cv_func_fnmatch = no; then
19614 HAVE_FNMATCH=0
19615 else
19616 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
19617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
19618 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
19619 if eval \${$gl_fnmatch_cache_var+:} false; then :
19620 $as_echo_n "(cached) " >&6
19621 else
19622 if test $gl_fnmatch_required = GNU; then
19623 gl_fnmatch_gnu_start=
19624 gl_fnmatch_gnu_end=
19625 else
19626 gl_fnmatch_gnu_start='#if 0'
19627 gl_fnmatch_gnu_end='#endif'
19628 fi
19629 if test "$cross_compiling" = yes; then :
19630 case "$host_os" in
19631 # Guess yes on musl systems.
19632 *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
19633 # Guess no otherwise, even on glibc systems.
19634 *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
19635 esac
19636
19637 else
19638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19639 /* end confdefs.h. */
19640 #include <fnmatch.h>
19641 static int
19642 y (char const *pattern, char const *string, int flags)
19643 {
19644 return fnmatch (pattern, string, flags) == 0;
19645 }
19646 static int
19647 n (char const *pattern, char const *string, int flags)
19648 {
19649 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
19650 }
19651
19652 int
19653 main ()
19654 {
19655 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
19656 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
19657 static char const A_1[] = { 'A' - 1, 0 };
19658 static char const A01[] = { 'A' + 1, 0 };
19659 static char const a_1[] = { 'a' - 1, 0 };
19660 static char const a01[] = { 'a' + 1, 0 };
19661 static char const bs_1[] = { '\\\\' - 1, 0 };
19662 static char const bs01[] = { '\\\\' + 1, 0 };
19663 int result = 0;
19664 if (!n ("a*", "", 0))
19665 return 1;
19666 if (!y ("a*", "abc", 0))
19667 return 1;
19668 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
19669 return 1;
19670 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
19671 return 2;
19672 if (!y ("a\\\\bc", "abc", 0))
19673 return 3;
19674 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
19675 return 3;
19676 if (!y ("*x", ".x", 0))
19677 return 4;
19678 if (!n ("*x", ".x", FNM_PERIOD))
19679 return 4;
19680 if (!y (Apat, "\\\\", 0))
19681 return 5;
19682 if (!y (Apat, "A", 0))
19683 return 5;
19684 if (!y (apat, "\\\\", 0))
19685 return 5;
19686 if (!y (apat, "a", 0))
19687 return 5;
19688 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
19689 return 5;
19690 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
19691 return 5;
19692 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
19693 return 5;
19694 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
19695 return 5;
19696 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
19697 return 5;
19698 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
19699 return 5;
19700 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
19701 return 5;
19702 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
19703 return 5;
19704 $gl_fnmatch_gnu_start
19705 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
19706 result |= 8;
19707 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
19708 result |= 16;
19709 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
19710 result |= 32;
19711 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
19712 result |= 64;
19713 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
19714 result |= 64;
19715 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
19716 result |= 64;
19717 $gl_fnmatch_gnu_end
19718 return result;
19719
19720 ;
19721 return 0;
19722 }
19723 _ACEOF
19724 if ac_fn_c_try_run "$LINENO"; then :
19725 eval "$gl_fnmatch_cache_var=yes"
19726 else
19727 eval "$gl_fnmatch_cache_var=no"
19728 fi
19729 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19730 conftest.$ac_objext conftest.beam conftest.$ac_ext
19731 fi
19732
19733
19734 fi
19735 eval ac_res=\$$gl_fnmatch_cache_var
19736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19737 $as_echo "$ac_res" >&6; }
19738 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
19739 case "$gl_fnmatch_result" in
19740 *yes) ;;
19741 *) REPLACE_FNMATCH=1 ;;
19742 esac
19743 fi
19744 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
19745
19746
19747 FNMATCH_H='fnmatch.h'
19748 if test -n "$FNMATCH_H"; then
19749 GL_GENERATE_FNMATCH_H_TRUE=
19750 GL_GENERATE_FNMATCH_H_FALSE='#'
19751 else
19752 GL_GENERATE_FNMATCH_H_TRUE='#'
19753 GL_GENERATE_FNMATCH_H_FALSE=
19754 fi
19755
19756
19757 fi
19758
19759 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
19760
19761
19762
19763
19764
19765
19766
19767
19768 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19769
19770
19771
19772
19773
19774 fi
19775
19776
19777
19778
19779
19780 GNULIB_FNMATCH=1
19781
19782
19783
19784
19785
19786 $as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
19787
19788
19789
19790
19791
19792
19793
19794
19795 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
19796
19797
19798
19799
19800
19801
19802
19803
19804 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19805
19806
19807
19808
19809
19810 fi
19811
19812
19813 cat >>confdefs.h <<_ACEOF
19814 #define GNULIB_FNMATCH_GNU 1
19815 _ACEOF
19816
19817
19818
19819
19820
19821
19822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
19823 $as_echo_n "checking whether free is known to preserve errno... " >&6; }
19824 if ${gl_cv_func_free_preserves_errno+:} false; then :
19825 $as_echo_n "(cached) " >&6
19826 else
19827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19828 /* end confdefs.h. */
19829 #include <stdlib.h>
19830
19831 int
19832 main ()
19833 {
19834 #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
19835 #elif defined __OpenBSD__
19836 #elif defined __sun
19837 #else
19838 #error "'free' is not known to preserve errno"
19839 #endif
19840
19841 ;
19842 return 0;
19843 }
19844 _ACEOF
19845 if ac_fn_c_try_compile "$LINENO"; then :
19846 gl_cv_func_free_preserves_errno=yes
19847 else
19848 gl_cv_func_free_preserves_errno=no
19849 fi
19850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19851
19852 fi
19853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
19854 $as_echo "$gl_cv_func_free_preserves_errno" >&6; }
19855
19856 case $gl_cv_func_free_preserves_errno in
19857 *yes) ;;
19858 *) REPLACE_FREE=1 ;;
19859 esac
19860
19861 if test $REPLACE_FREE = 1; then
19862
19863
19864
19865
19866
19867
19868
19869
19870 gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
19871
19872 :
19873 fi
19874
19875
19876
19877
19878
19879 GNULIB_FREE_POSIX=1
19880
19881
19882
19883
19884
19885 $as_echo "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
19886
19887
19888
19889
19890 if test $gl_func_frexp != yes; then
19891
19892
19893
19894
19895
19896
19897
19898
19899 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
19900
19901 fi
19902
19903
19904
19905
19906
19907 GNULIB_FREXP=1
19908
19909
19910
19911
19912
19913 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
19914
19915
19916
19917
19918 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
19919
19920
19921
19922
19923
19924
19925
19926
19927 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
19928
19929 fi
19930
19931
19932
19933
19934
19935 GNULIB_FREXPL=1
19936
19937
19938
19939
19940
19941 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
19942
19943
19944
19945
19946
19947
19948
19949 case "$host_os" in
19950 mingw* | solaris*)
19951 REPLACE_FSTAT=1
19952 ;;
19953 esac
19954
19955
19956
19957
19958
19959 if test $ac_cv_func_fchdir = no; then
19960 HAVE_FCHDIR=0
19961 fi
19962
19963 if test $HAVE_FCHDIR = 0; then
19964 case "$gl_cv_func_open_directory_works" in
19965 *yes) ;;
19966 *)
19967 REPLACE_FSTAT=1
19968 ;;
19969 esac
19970 fi
19971
19972
19973 if test $REPLACE_FSTAT = 1; then
19974
19975
19976
19977
19978
19979
19980
19981
19982 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
19983
19984 case "$host_os" in
19985 mingw*)
19986
19987
19988
19989
19990
19991
19992
19993
19994 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
19995
19996 ;;
19997 esac
19998
19999
20000
20001 :
20002
20003 fi
20004
20005
20006
20007
20008
20009 GNULIB_FSTAT=1
20010
20011
20012
20013
20014
20015 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026 if test $ac_cv_func_fstatat = no; then
20027 HAVE_FSTATAT=0
20028 else
20029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
20030 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
20031 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
20032 $as_echo_n "(cached) " >&6
20033 else
20034 if test "$cross_compiling" = yes; then :
20035 case "$host_os" in
20036 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
20037 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
20038 esac
20039
20040 else
20041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20042 /* end confdefs.h. */
20043
20044 #include <fcntl.h>
20045 #include <sys/stat.h>
20046 int
20047 main (void)
20048 {
20049 struct stat a;
20050 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
20051 }
20052
20053 _ACEOF
20054 if ac_fn_c_try_run "$LINENO"; then :
20055 gl_cv_func_fstatat_zero_flag=yes
20056 else
20057 gl_cv_func_fstatat_zero_flag=no
20058 fi
20059 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20060 conftest.$ac_objext conftest.beam conftest.$ac_ext
20061 fi
20062
20063
20064 fi
20065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
20066 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
20067
20068 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
20069 *yes+*yes) ;;
20070 *) REPLACE_FSTATAT=1 ;;
20071 esac
20072
20073 case $host_os in
20074 solaris*)
20075 REPLACE_FSTATAT=1 ;;
20076 esac
20077
20078 case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
20079 1,*yes)
20080
20081 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
20082
20083 ;;
20084 esac
20085 fi
20086
20087 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
20088
20089
20090
20091
20092
20093
20094
20095
20096 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
20097
20098 fi
20099
20100
20101
20102
20103
20104 GNULIB_FSTATAT=1
20105
20106
20107
20108
20109
20110 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
20111
20112
20113
20114
20115
20116
20117
20118
20119 gl_abort_bug=no
20120 case "$host_os" in
20121 mingw*)
20122 gl_cv_func_getcwd_path_max=yes
20123 ;;
20124 *)
20125
20126
20127
20128
20129
20130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
20131 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
20132 if ${gl_cv_func_getcwd_path_max+:} false; then :
20133 $as_echo_n "(cached) " >&6
20134 else
20135 # Arrange for deletion of the temporary directory this test creates.
20136 ac_clean_files="$ac_clean_files confdir3"
20137 if test "$cross_compiling" = yes; then :
20138 # Cross-compilation guesses:
20139 case "$host_os" in
20140 aix*) # On AIX, it has the AIX bug.
20141 gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;;
20142 gnu*) # On Hurd, it is 'yes'.
20143 gl_cv_func_getcwd_path_max='guessing yes' ;;
20144 linux* | kfreebsd*)
20145 # On older Linux+glibc it's 'no, but it is partly working',
20146 # on newer Linux+glibc it's 'yes'.
20147 # On Linux+musl libc, it's 'no, but it is partly working'.
20148 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
20149 gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;;
20150 *) # If we don't know, obey --enable-cross-guesses.
20151 gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;;
20152 esac
20153
20154 else
20155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20156 /* end confdefs.h. */
20157
20158 #include <errno.h>
20159 #include <stdlib.h>
20160 #if HAVE_UNISTD_H
20161 # include <unistd.h>
20162 #else
20163 # include <direct.h>
20164 #endif
20165 #include <string.h>
20166 #include <limits.h>
20167 #include <sys/stat.h>
20168 #include <sys/types.h>
20169 #include <fcntl.h>
20170
20171
20172 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20173 #if HAVE_UNISTD_H
20174 # include <unistd.h>
20175 #endif
20176 #include <limits.h>
20177 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20178 # include <sys/param.h>
20179 #endif
20180 #if !defined PATH_MAX && defined MAXPATHLEN
20181 # define PATH_MAX MAXPATHLEN
20182 #endif
20183 #ifdef __hpux
20184 # undef PATH_MAX
20185 # define PATH_MAX 1024
20186 #endif
20187 #if defined _WIN32 && ! defined __CYGWIN__
20188 # undef PATH_MAX
20189 # define PATH_MAX 260
20190 #endif
20191
20192
20193 #ifndef AT_FDCWD
20194 # define AT_FDCWD 0
20195 #endif
20196 #ifdef ENAMETOOLONG
20197 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
20198 #else
20199 # define is_ENAMETOOLONG(x) 0
20200 #endif
20201
20202 /* Use the getcwd function, not any macro. */
20203 #undef getcwd
20204
20205
20206
20207 $gl_mda_defines
20208
20209
20210 #ifndef S_IRWXU
20211 # define S_IRWXU 0700
20212 #endif
20213
20214 /* The length of this name must be 8. */
20215 #define DIR_NAME "confdir3"
20216 #define DIR_NAME_LEN 8
20217 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
20218
20219 /* The length of "../". */
20220 #define DOTDOTSLASH_LEN 3
20221
20222 /* Leftover bytes in the buffer, to work around library or OS bugs. */
20223 #define BUF_SLOP 20
20224
20225 int
20226 main ()
20227 {
20228 #ifndef PATH_MAX
20229 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
20230 at least not on a local file system. And if we were to start worrying
20231 about remote file systems, we'd have to enable the wrapper function
20232 all of the time, just to be safe. That's not worth the cost. */
20233 exit (0);
20234 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
20235 - DIR_NAME_SIZE - BUF_SLOP) \
20236 <= PATH_MAX)
20237 /* FIXME: Assuming there's a system for which this is true,
20238 this should be done in a compile test. */
20239 exit (0);
20240 #else
20241 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
20242 + DIR_NAME_SIZE + BUF_SLOP];
20243 char *cwd = getcwd (buf, PATH_MAX);
20244 size_t initial_cwd_len;
20245 size_t cwd_len;
20246 int fail = 0;
20247 size_t n_chdirs = 0;
20248
20249 if (cwd == NULL)
20250 exit (10);
20251
20252 cwd_len = initial_cwd_len = strlen (cwd);
20253
20254 while (1)
20255 {
20256 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
20257 char *c = NULL;
20258
20259 cwd_len += DIR_NAME_SIZE;
20260 /* If mkdir or chdir fails, it could be that this system cannot create
20261 any file with an absolute name longer than PATH_MAX, such as cygwin.
20262 If so, leave fail as 0, because the current working directory can't
20263 be too long for getcwd if it can't even be created. On Linux with
20264 the 9p file system, mkdir fails with error EINVAL when cwd_len gets
20265 too long; ignore this failure because the getcwd() system call
20266 produces good results whereas the gnulib substitute calls getdents64
20267 which fails with error EPROTO.
20268 For other errors, be pessimistic and consider that as a failure,
20269 too. */
20270 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
20271 {
20272 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
20273 #ifdef __linux__
20274 if (! (errno == EINVAL))
20275 #endif
20276 fail = 20;
20277 break;
20278 }
20279
20280 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
20281 {
20282 struct stat sb;
20283
20284 c = getcwd (buf, PATH_MAX);
20285 if (!c && errno == ENOENT)
20286 {
20287 fail = 11;
20288 break;
20289 }
20290 if (c)
20291 {
20292 fail = 31;
20293 break;
20294 }
20295 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
20296 {
20297 fail = 21;
20298 break;
20299 }
20300
20301 /* Our replacement needs to be able to stat() long ../../paths,
20302 so generate a path larger than PATH_MAX to check,
20303 avoiding the replacement if we can't stat(). */
20304 c = getcwd (buf, cwd_len + 1);
20305 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
20306 {
20307 fail = 32;
20308 break;
20309 }
20310 }
20311
20312 if (dotdot_max <= cwd_len - initial_cwd_len)
20313 {
20314 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
20315 break;
20316 c = getcwd (buf, cwd_len + 1);
20317 if (!c)
20318 {
20319 if (! (errno == ERANGE || errno == ENOENT
20320 || is_ENAMETOOLONG (errno)))
20321 {
20322 fail = 22;
20323 break;
20324 }
20325 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
20326 {
20327 fail = 12;
20328 break;
20329 }
20330 }
20331 }
20332
20333 if (c && strlen (c) != cwd_len)
20334 {
20335 fail = 23;
20336 break;
20337 }
20338 ++n_chdirs;
20339 }
20340
20341 /* Leaving behind such a deep directory is not polite.
20342 So clean up here, right away, even though the driving
20343 shell script would also clean up. */
20344 {
20345 size_t i;
20346
20347 /* Try rmdir first, in case the chdir failed. */
20348 rmdir (DIR_NAME);
20349 for (i = 0; i <= n_chdirs; i++)
20350 {
20351 if (chdir ("..") < 0)
20352 break;
20353 if (rmdir (DIR_NAME) != 0)
20354 break;
20355 }
20356 }
20357
20358 exit (fail);
20359 #endif
20360 }
20361
20362 _ACEOF
20363 if ac_fn_c_try_run "$LINENO"; then :
20364 gl_cv_func_getcwd_path_max=yes
20365 else
20366 case $? in
20367 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
20368 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
20369 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
20370 *) gl_cv_func_getcwd_path_max=no;;
20371 esac
20372 fi
20373 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20374 conftest.$ac_objext conftest.beam conftest.$ac_ext
20375 fi
20376
20377
20378 fi
20379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
20380 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
20381
20382 case "$gl_cv_func_getcwd_null" in
20383 *yes)
20384
20385
20386
20387
20388
20389
20390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
20391 $as_echo_n "checking for getpagesize... " >&6; }
20392 if ${gl_cv_func_getpagesize+:} false; then :
20393 $as_echo_n "(cached) " >&6
20394 else
20395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20396 /* end confdefs.h. */
20397 #include <unistd.h>
20398 int
20399 main ()
20400 {
20401 return getpagesize();
20402 ;
20403 return 0;
20404 }
20405
20406 _ACEOF
20407 if ac_fn_c_try_link "$LINENO"; then :
20408 gl_cv_func_getpagesize=yes
20409 else
20410 gl_cv_func_getpagesize=no
20411 fi
20412 rm -f core conftest.err conftest.$ac_objext \
20413 conftest$ac_exeext conftest.$ac_ext
20414
20415 fi
20416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
20417 $as_echo "$gl_cv_func_getpagesize" >&6; }
20418
20419 if test $gl_cv_func_getpagesize = yes; then
20420
20421 cat >>confdefs.h <<_ACEOF
20422 #define HAVE_GETPAGESIZE 1
20423 _ACEOF
20424
20425 fi
20426
20427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5
20428 $as_echo_n "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; }
20429 if ${gl_cv_func_getcwd_succeeds_beyond_4k+:} false; then :
20430 $as_echo_n "(cached) " >&6
20431 else
20432 # Remove any remnants of a previous test.
20433 rm -rf confdir-14B---
20434 # Arrange for deletion of the temporary directory this test creates.
20435 ac_clean_files="$ac_clean_files confdir-14B---"
20436 if test "$cross_compiling" = yes; then :
20437 case "$host_os" in
20438 # Guess yes on musl systems.
20439 *-musl*) gl_cv_func_getcwd_succeeds_beyond_4k="guessing yes" ;;
20440 # Guess no otherwise, even on glibc systems.
20441 *) gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
20442 esac
20443
20444 else
20445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20446 /* end confdefs.h. */
20447
20448 #include <errno.h>
20449 #include <stdlib.h>
20450 #if HAVE_UNISTD_H
20451 # include <unistd.h>
20452 #else /* on Windows with MSVC */
20453 # include <direct.h>
20454 #endif
20455 #include <string.h>
20456 #include <sys/stat.h>
20457
20458
20459 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20460 #if HAVE_UNISTD_H
20461 # include <unistd.h>
20462 #endif
20463 #include <limits.h>
20464 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20465 # include <sys/param.h>
20466 #endif
20467 #if !defined PATH_MAX && defined MAXPATHLEN
20468 # define PATH_MAX MAXPATHLEN
20469 #endif
20470 #ifdef __hpux
20471 # undef PATH_MAX
20472 # define PATH_MAX 1024
20473 #endif
20474 #if defined _WIN32 && ! defined __CYGWIN__
20475 # undef PATH_MAX
20476 # define PATH_MAX 260
20477 #endif
20478
20479
20480
20481 $gl_mda_defines
20482
20483
20484 #ifndef S_IRWXU
20485 # define S_IRWXU 0700
20486 #endif
20487
20488 /* FIXME: skip the run-test altogether on systems without getpagesize. */
20489 #if ! HAVE_GETPAGESIZE
20490 # define getpagesize() 0
20491 #endif
20492
20493 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
20494 the 16kB pagesize on ia64 linux. Those conditions make the code below
20495 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
20496 #define TARGET_LEN (5 * 1024)
20497
20498 int
20499 main ()
20500 {
20501 char *cwd;
20502 size_t initial_cwd_len;
20503 int fail = 0;
20504
20505 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
20506 this relatively expensive and invasive test if that's not true. */
20507 #ifdef PATH_MAX
20508 int bug_possible = PATH_MAX < getpagesize ();
20509 #else
20510 int bug_possible = 0;
20511 #endif
20512 if (! bug_possible)
20513 return 0;
20514
20515 cwd = getcwd (NULL, 0);
20516 if (cwd == NULL)
20517 return 2;
20518
20519 initial_cwd_len = strlen (cwd);
20520 free (cwd);
20521
20522 if (1)
20523 {
20524 static char const dir_name[] = "confdir-14B---";
20525 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
20526 / sizeof dir_name);
20527 size_t d;
20528 for (d = 0; d < desired_depth; d++)
20529 {
20530 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
20531 {
20532 if (! (errno == ERANGE || errno == ENAMETOOLONG
20533 || errno == ENOENT))
20534 fail = 3; /* Unable to construct deep hierarchy. */
20535 break;
20536 }
20537 }
20538
20539 /* If libc has the bug in question, this invocation of getcwd
20540 results in a failed assertion. */
20541 cwd = getcwd (NULL, 0);
20542 if (cwd == NULL)
20543 fail = 4; /* getcwd didn't assert, but it failed for a long name
20544 where the answer could have been learned. */
20545 free (cwd);
20546
20547 /* Call rmdir first, in case the above chdir failed. */
20548 rmdir (dir_name);
20549 while (0 < d--)
20550 {
20551 if (chdir ("..") < 0)
20552 {
20553 fail = 5;
20554 break;
20555 }
20556 rmdir (dir_name);
20557 }
20558 }
20559
20560 return fail;
20561 }
20562
20563 _ACEOF
20564 if ac_fn_c_try_run "$LINENO"; then :
20565 gl_cv_func_getcwd_succeeds_beyond_4k=yes
20566 else
20567 ret=$?
20568 if test $ret -ge 128 || test $ret = 4; then
20569 gl_cv_func_getcwd_succeeds_beyond_4k=no
20570 else
20571 gl_cv_func_getcwd_succeeds_beyond_4k=yes
20572 fi
20573
20574 fi
20575 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20576 conftest.$ac_objext conftest.beam conftest.$ac_ext
20577 fi
20578
20579
20580 fi
20581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5
20582 $as_echo "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; }
20583 case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
20584 *no)
20585 gl_abort_bug=yes
20586 ;;
20587 *)
20588
20589 ;;
20590 esac
20591
20592 ;;
20593 esac
20594 ;;
20595 esac
20596 case "$gl_cv_func_getcwd_path_max" in
20597 *"no" | *"no, it has the AIX bug") ;;
20598 *)
20599
20600 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
20601
20602 ;;
20603 esac
20604 case "$gl_cv_func_getcwd_path_max" in
20605 *"no, but it is partly working")
20606
20607 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
20608
20609 ;;
20610 *"yes, but with shorter paths")
20611
20612 $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
20613
20614 ;;
20615 esac
20616
20617 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
20618 || test $gl_cv_func_getcwd_posix_signature != yes \
20619 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
20620 || test $gl_abort_bug = yes; then
20621 REPLACE_GETCWD=1
20622 fi
20623
20624 if test $REPLACE_GETCWD = 1; then
20625
20626
20627
20628
20629
20630
20631
20632
20633 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
20634
20635
20636
20637
20638 :
20639
20640 fi
20641
20642
20643 cat >>confdefs.h <<_ACEOF
20644 #define GNULIB_GETCWD 1
20645 _ACEOF
20646
20647
20648
20649
20650
20651
20652
20653 GNULIB_GETCWD=1
20654
20655
20656
20657
20658
20659 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20660
20661
20662
20663
20664
20665
20666
20667
20668 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
20669 *yes,yes) ;;
20670 *)
20671 REPLACE_GETCWD=1
20672 ;;
20673 esac
20674
20675 if test $REPLACE_GETCWD = 1; then
20676
20677
20678
20679
20680
20681
20682
20683
20684 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
20685
20686 fi
20687
20688
20689
20690
20691
20692 GNULIB_GETCWD=1
20693
20694
20695
20696
20697
20698 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20699
20700
20701
20702
20703
20704
20705
20706
20707 if test $ac_cv_func_getdtablesize = yes &&
20708 test $ac_cv_have_decl_getdtablesize = yes; then
20709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
20710 $as_echo_n "checking whether getdtablesize works... " >&6; }
20711 if ${gl_cv_func_getdtablesize_works+:} false; then :
20712 $as_echo_n "(cached) " >&6
20713 else
20714 case "$host_os" in
20715 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
20716 *)
20717 if test "$cross_compiling" = yes; then :
20718 case "$host_os" in
20719 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
20720 gl_cv_func_getdtablesize_works="guessing no" ;;
20721 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
20722 esac
20723
20724 else
20725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20726 /* end confdefs.h. */
20727
20728 #include <unistd.h>
20729
20730
20731 $gl_mda_defines
20732
20733
20734 int
20735 main ()
20736 {
20737 int size = getdtablesize();
20738 if (dup2 (0, getdtablesize()) != -1)
20739 return 1;
20740 if (size != getdtablesize())
20741 return 2;
20742
20743 ;
20744 return 0;
20745 }
20746 _ACEOF
20747 if ac_fn_c_try_run "$LINENO"; then :
20748 gl_cv_func_getdtablesize_works=yes
20749 else
20750 gl_cv_func_getdtablesize_works=no
20751 fi
20752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20753 conftest.$ac_objext conftest.beam conftest.$ac_ext
20754 fi
20755
20756 ;;
20757 esac
20758
20759 fi
20760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
20761 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
20762 case "$gl_cv_func_getdtablesize_works" in
20763 *yes | "no (limitation)") ;;
20764 *) REPLACE_GETDTABLESIZE=1 ;;
20765 esac
20766 else
20767 HAVE_GETDTABLESIZE=0
20768 fi
20769
20770 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
20771
20772
20773
20774
20775
20776
20777
20778
20779 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
20780
20781 :
20782 fi
20783
20784
20785
20786
20787
20788 GNULIB_GETDTABLESIZE=1
20789
20790
20791
20792
20793
20794 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804 if test $ac_cv_have_decl_getlogin_r = no; then
20805 HAVE_DECL_GETLOGIN_R=0
20806 fi
20807
20808
20809 if test $ac_cv_func_getlogin_r = no; then
20810 HAVE_GETLOGIN_R=0
20811 else
20812 HAVE_GETLOGIN_R=1
20813
20814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
20815 $as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
20816 if ${gl_cv_func_getlogin_r_works+:} false; then :
20817 $as_echo_n "(cached) " >&6
20818 else
20819
20820 case "$host_os" in
20821 # Guess no on Mac OS X, OSF/1.
20822 darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
20823 # Guess yes otherwise.
20824 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
20825 esac
20826 if test "$cross_compiling" = yes; then :
20827 :
20828 else
20829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20830 /* end confdefs.h. */
20831
20832 #include <stddef.h>
20833 #include <string.h>
20834 #include <unistd.h>
20835 #if !HAVE_DECL_GETLOGIN_R
20836 extern
20837 # ifdef __cplusplus
20838 "C"
20839 # endif
20840 int getlogin_r (char *, size_t);
20841 #endif
20842 int
20843 main (void)
20844 {
20845 int result = 0;
20846 char buf[100];
20847
20848 if (getlogin_r (buf, 0) == 0)
20849 result |= 1;
20850 if (getlogin_r (buf, 1) == 0)
20851 result |= 2;
20852 if (getlogin_r (buf, 100) == 0)
20853 {
20854 size_t n = strlen (buf);
20855 if (getlogin_r (buf, n) == 0)
20856 result |= 4;
20857 }
20858 return result;
20859 }
20860 _ACEOF
20861 if ac_fn_c_try_run "$LINENO"; then :
20862 gl_cv_func_getlogin_r_works=yes
20863 else
20864 gl_cv_func_getlogin_r_works=no
20865 fi
20866 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20867 conftest.$ac_objext conftest.beam conftest.$ac_ext
20868 fi
20869
20870
20871 fi
20872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
20873 $as_echo "$gl_cv_func_getlogin_r_works" >&6; }
20874 case "$gl_cv_func_getlogin_r_works" in
20875 *yes) ;;
20876 *) REPLACE_GETLOGIN_R=1 ;;
20877 esac
20878 fi
20879
20880 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
20881
20882
20883
20884
20885
20886
20887
20888
20889 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
20890
20891
20892
20893
20894 fi
20895
20896
20897
20898
20899
20900 GNULIB_GETLOGIN_R=1
20901
20902
20903
20904
20905
20906 $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
20907
20908
20909
20910
20911
20912
20913
20914 ac_found=0
20915 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
20916 "
20917 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
20918 ac_have_decl=1
20919 else
20920 ac_have_decl=0
20921 fi
20922
20923 cat >>confdefs.h <<_ACEOF
20924 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
20925 _ACEOF
20926 if test $ac_have_decl = 1; then :
20927 ac_found=1
20928 fi
20929
20930 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
20931 "
20932 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
20933 ac_have_decl=1
20934 else
20935 ac_have_decl=0
20936 fi
20937
20938 cat >>confdefs.h <<_ACEOF
20939 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
20940 _ACEOF
20941 if test $ac_have_decl = 1; then :
20942 ac_found=1
20943 fi
20944
20945 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
20946 "
20947 if test "x$ac_cv_have_decl___argv" = xyes; then :
20948 ac_have_decl=1
20949 else
20950 ac_have_decl=0
20951 fi
20952
20953 cat >>confdefs.h <<_ACEOF
20954 #define HAVE_DECL___ARGV $ac_have_decl
20955 _ACEOF
20956 if test $ac_have_decl = 1; then :
20957 ac_found=1
20958 fi
20959
20960
20961 # Incur the cost of this test only if none of the above worked.
20962 if test $ac_found = 0; then
20963 # On OpenBSD 5.1, using the global __progname variable appears to be
20964 # the only way to implement getprogname.
20965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
20966 $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
20967 if ${gl_cv_var___progname+:} false; then :
20968 $as_echo_n "(cached) " >&6
20969 else
20970
20971 gl_cv_var___progname=
20972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20973 /* end confdefs.h. */
20974 extern char *__progname;
20975 int
20976 main ()
20977 {
20978 return *__progname;
20979
20980 ;
20981 return 0;
20982 }
20983 _ACEOF
20984 if ac_fn_c_try_link "$LINENO"; then :
20985 gl_cv_var___progname=yes
20986
20987 fi
20988 rm -f core conftest.err conftest.$ac_objext \
20989 conftest$ac_exeext conftest.$ac_ext
20990
20991
20992 fi
20993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
20994 $as_echo "$gl_cv_var___progname" >&6; }
20995 if test "$gl_cv_var___progname" = yes; then
20996
20997 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
20998
20999 fi
21000 fi
21001
21002
21003
21004
21005
21006 if test "$ac_cv_func_getrandom" != yes; then
21007 HAVE_GETRANDOM=0
21008 else
21009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
21010 $as_echo_n "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
21011 if ${gl_cv_func_getrandom_ok+:} false; then :
21012 $as_echo_n "(cached) " >&6
21013 else
21014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21015 /* end confdefs.h. */
21016 /* Additional includes are needed before <sys/random.h> on uClibc
21017 and Mac OS X. */
21018 #include <sys/types.h>
21019 #include <stdlib.h>
21020 #include <sys/random.h>
21021 ssize_t getrandom (void *, size_t, unsigned int);
21022
21023 int
21024 main ()
21025 {
21026
21027 ;
21028 return 0;
21029 }
21030
21031 _ACEOF
21032 if ac_fn_c_try_compile "$LINENO"; then :
21033 gl_cv_func_getrandom_ok=yes
21034 else
21035 gl_cv_func_getrandom_ok=no
21036 fi
21037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21038
21039 fi
21040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
21041 $as_echo "$gl_cv_func_getrandom_ok" >&6; }
21042 if test $gl_cv_func_getrandom_ok = no; then
21043 REPLACE_GETRANDOM=1
21044 fi
21045 fi
21046
21047 case "$host_os" in
21048 mingw*)
21049 for ac_header in bcrypt.h
21050 do :
21051 ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
21052
21053 "
21054 if test "x$ac_cv_header_bcrypt_h" = xyes; then :
21055 cat >>confdefs.h <<_ACEOF
21056 #define HAVE_BCRYPT_H 1
21057 _ACEOF
21058
21059 fi
21060
21061 done
21062
21063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
21064 $as_echo_n "checking whether the bcrypt library is guaranteed to be present... " >&6; }
21065 if ${gl_cv_lib_assume_bcrypt+:} false; then :
21066 $as_echo_n "(cached) " >&6
21067 else
21068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21069 /* end confdefs.h. */
21070 #include <windows.h>
21071 int
21072 main ()
21073 {
21074 #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
21075 cannot assume it
21076 #endif
21077
21078 ;
21079 return 0;
21080 }
21081
21082 _ACEOF
21083 if ac_fn_c_try_compile "$LINENO"; then :
21084 gl_cv_lib_assume_bcrypt=yes
21085 else
21086 gl_cv_lib_assume_bcrypt=no
21087 fi
21088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21089
21090 fi
21091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
21092 $as_echo "$gl_cv_lib_assume_bcrypt" >&6; }
21093 if test $gl_cv_lib_assume_bcrypt = yes; then
21094
21095 $as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
21096
21097 LIB_GETRANDOM='-lbcrypt'
21098 else
21099 LIB_GETRANDOM='-ladvapi32'
21100 fi
21101 ;;
21102 *)
21103 LIB_GETRANDOM= ;;
21104 esac
21105
21106
21107 if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
21108
21109
21110
21111
21112
21113
21114
21115
21116 gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext"
21117
21118 fi
21119
21120
21121
21122
21123
21124 GNULIB_GETRANDOM=1
21125
21126
21127
21128
21129
21130 $as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143 gl_gettimeofday_timezone=void
21144 if test $ac_cv_func_gettimeofday != yes; then
21145 HAVE_GETTIMEOFDAY=0
21146 else
21147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
21148 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
21149 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
21150 $as_echo_n "(cached) " >&6
21151 else
21152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21153 /* end confdefs.h. */
21154 #include <sys/time.h>
21155 struct timeval c;
21156 int gettimeofday (struct timeval *restrict, void *restrict);
21157
21158 int
21159 main ()
21160 {
21161 /* glibc uses struct timezone * rather than the POSIX void *
21162 if _GNU_SOURCE is defined. However, since the only portable
21163 use of gettimeofday uses NULL as the second parameter, and
21164 since the glibc definition is actually more typesafe, it is
21165 not worth wrapping this to get a compliant signature. */
21166 int (*f) (struct timeval *restrict, void *restrict)
21167 = gettimeofday;
21168 int x = f (&c, 0);
21169 return !(x | c.tv_sec | c.tv_usec);
21170
21171 ;
21172 return 0;
21173 }
21174 _ACEOF
21175 if ac_fn_c_try_compile "$LINENO"; then :
21176 gl_cv_func_gettimeofday_posix_signature=yes
21177 else
21178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21179 /* end confdefs.h. */
21180 #include <sys/time.h>
21181 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
21182
21183 int
21184 main ()
21185 {
21186
21187 ;
21188 return 0;
21189 }
21190 _ACEOF
21191 if ac_fn_c_try_compile "$LINENO"; then :
21192 gl_cv_func_gettimeofday_posix_signature=almost
21193 else
21194 gl_cv_func_gettimeofday_posix_signature=no
21195 fi
21196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21197 fi
21198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21199 fi
21200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21201 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21202 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21203 gl_gettimeofday_timezone='struct timezone'
21204 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21205 REPLACE_GETTIMEOFDAY=1
21206 fi
21207 if test $REPLACE_STRUCT_TIMEVAL = 1; then
21208 REPLACE_GETTIMEOFDAY=1
21209 fi
21210 case "$host_os" in
21211 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
21212 esac
21213 fi
21214
21215 cat >>confdefs.h <<_ACEOF
21216 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
21217 _ACEOF
21218
21219
21220 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
21221
21222
21223
21224
21225
21226
21227
21228
21229 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
21230
21231 :
21232 fi
21233
21234
21235
21236
21237
21238 GNULIB_GETTIMEOFDAY=1
21239
21240
21241
21242
21243
21244 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
21245
21246
21247
21248
21249
21250
21251
21252 if test $ac_cv_func_glob = no; then
21253 HAVE_GLOB=0
21254 else
21255
21256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5
21257 $as_echo_n "checking for GNU glob interface version 1 or 2... " >&6; }
21258 if ${gl_cv_gnu_glob_interface_version_1_2+:} false; then :
21259 $as_echo_n "(cached) " >&6
21260 else
21261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21262 /* end confdefs.h. */
21263 #include <gnu-versions.h>
21264 char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1];
21265 _ACEOF
21266 if ac_fn_c_try_compile "$LINENO"; then :
21267 gl_cv_gnu_glob_interface_version_1_2=yes
21268 else
21269 gl_cv_gnu_glob_interface_version_1_2=no
21270 fi
21271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21272 fi
21273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5
21274 $as_echo "$gl_cv_gnu_glob_interface_version_1_2" >&6; }
21275 if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then
21276 REPLACE_GLOB=1
21277 fi
21278
21279 if test $REPLACE_GLOB = 0; then
21280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
21281 $as_echo_n "checking whether glob lists broken symlinks... " >&6; }
21282 if ${gl_cv_glob_lists_symlinks+:} false; then :
21283 $as_echo_n "(cached) " >&6
21284 else
21285 if test $cross_compiling != yes; then
21286 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
21287 gl_cv_glob_lists_symlinks=maybe
21288 else
21289 # If we can't make a symlink, then we cannot test this issue. Be
21290 # pessimistic about this.
21291 gl_cv_glob_lists_symlinks=no
21292 fi
21293 if test $gl_cv_glob_lists_symlinks = maybe; then
21294 if test "$cross_compiling" = yes; then :
21295 :
21296
21297 else
21298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21299 /* end confdefs.h. */
21300 #include <stddef.h>
21301 #include <glob.h>
21302 int
21303 main ()
21304 {
21305 glob_t found;
21306 if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH)
21307 return 1;
21308 globfree (&found);
21309
21310 ;
21311 return 0;
21312 }
21313 _ACEOF
21314 if ac_fn_c_try_run "$LINENO"; then :
21315 gl_cv_glob_lists_symlinks=yes
21316 else
21317 gl_cv_glob_lists_symlinks=no
21318 fi
21319 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21320 conftest.$ac_objext conftest.beam conftest.$ac_ext
21321 fi
21322
21323 fi
21324 rm -f conf$$-globtest
21325 else
21326 gl_cv_glob_lists_symlinks="$gl_cross_guess_normal"
21327 fi
21328
21329 fi
21330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
21331 $as_echo "$gl_cv_glob_lists_symlinks" >&6; }
21332 case "$gl_cv_glob_lists_symlinks" in
21333 *yes) ;;
21334 *) REPLACE_GLOB=1 ;;
21335 esac
21336 fi
21337
21338 fi
21339
21340 if test $ac_cv_func_glob_pattern_p = no; then
21341 HAVE_GLOB_PATTERN_P=0
21342 else
21343 if test $REPLACE_GLOB = 1; then
21344 REPLACE_GLOB_PATTERN_P=1
21345 fi
21346 fi
21347
21348 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
21349
21350
21351 GLOB_H='glob.h'
21352 if test -n "$GLOB_H"; then
21353 GL_GENERATE_GLOB_H_TRUE=
21354 GL_GENERATE_GLOB_H_FALSE='#'
21355 else
21356 GL_GENERATE_GLOB_H_TRUE='#'
21357 GL_GENERATE_GLOB_H_FALSE=
21358 fi
21359
21360
21361 fi
21362
21363 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
21364
21365
21366
21367
21368
21369
21370
21371
21372 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
21373
21374
21375
21376
21377
21378
21379
21380
21381
21382 gl_LIBOBJS="$gl_LIBOBJS globfree.$ac_objext"
21383
21384
21385
21386
21387
21388
21389 fi
21390 if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then
21391
21392
21393
21394
21395
21396
21397
21398
21399 gl_LIBOBJS="$gl_LIBOBJS glob_pattern_p.$ac_objext"
21400
21401 fi
21402
21403
21404
21405
21406
21407 GNULIB_GLOB=1
21408
21409
21410
21411
21412
21413 $as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h
21414
21415
21416
21417
21418
21419 LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
21420
21421
21422
21423
21424
21425
21426
21427
21428 HAVE_INET_NTOP=1
21429 INET_NTOP_LIB=
21430
21431
21432
21433
21434 if test $ac_cv_header_sys_socket_h != yes; then
21435 for ac_header in winsock2.h
21436 do :
21437 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21438 if test "x$ac_cv_header_winsock2_h" = xyes; then :
21439 cat >>confdefs.h <<_ACEOF
21440 #define HAVE_WINSOCK2_H 1
21441 _ACEOF
21442
21443 fi
21444
21445 done
21446
21447 fi
21448 if test "$ac_cv_header_winsock2_h" = yes; then
21449 HAVE_WINSOCK2_H=1
21450 UNISTD_H_HAVE_WINSOCK2_H=1
21451 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21452 else
21453 HAVE_WINSOCK2_H=0
21454 fi
21455
21456
21457 if test $HAVE_WINSOCK2_H = 1; then
21458 REPLACE_INET_NTOP=1
21459 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
21460 "
21461 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
21462 ac_have_decl=1
21463 else
21464 ac_have_decl=0
21465 fi
21466
21467 cat >>confdefs.h <<_ACEOF
21468 #define HAVE_DECL_INET_NTOP $ac_have_decl
21469 _ACEOF
21470
21471 if test $ac_cv_have_decl_inet_ntop = yes; then
21472 INET_NTOP_LIB="-lws2_32"
21473 else
21474 HAVE_DECL_INET_NTOP=0
21475 fi
21476 else
21477 gl_save_LIBS=$LIBS
21478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
21479 $as_echo_n "checking for library containing inet_ntop... " >&6; }
21480 if ${ac_cv_search_inet_ntop+:} false; then :
21481 $as_echo_n "(cached) " >&6
21482 else
21483 ac_func_search_save_LIBS=$LIBS
21484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21485 /* end confdefs.h. */
21486
21487 /* Override any GCC internal prototype to avoid an error.
21488 Use char because int might match the return type of a GCC
21489 builtin and then its argument prototype would still apply. */
21490 #ifdef __cplusplus
21491 extern "C"
21492 #endif
21493 char inet_ntop ();
21494 int
21495 main ()
21496 {
21497 return inet_ntop ();
21498 ;
21499 return 0;
21500 }
21501 _ACEOF
21502 for ac_lib in '' nsl resolv network; do
21503 if test -z "$ac_lib"; then
21504 ac_res="none required"
21505 else
21506 ac_res=-l$ac_lib
21507 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
21508 fi
21509 if ac_fn_c_try_link "$LINENO"; then :
21510 ac_cv_search_inet_ntop=$ac_res
21511 fi
21512 rm -f core conftest.err conftest.$ac_objext \
21513 conftest$ac_exeext
21514 if ${ac_cv_search_inet_ntop+:} false; then :
21515 break
21516 fi
21517 done
21518 if ${ac_cv_search_inet_ntop+:} false; then :
21519
21520 else
21521 ac_cv_search_inet_ntop=no
21522 fi
21523 rm conftest.$ac_ext
21524 LIBS=$ac_func_search_save_LIBS
21525 fi
21526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
21527 $as_echo "$ac_cv_search_inet_ntop" >&6; }
21528 ac_res=$ac_cv_search_inet_ntop
21529 if test "$ac_res" != no; then :
21530 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21531
21532 else
21533 for ac_func in inet_ntop
21534 do :
21535 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
21536 if test "x$ac_cv_func_inet_ntop" = xyes; then :
21537 cat >>confdefs.h <<_ACEOF
21538 #define HAVE_INET_NTOP 1
21539 _ACEOF
21540
21541 fi
21542 done
21543
21544 if test $ac_cv_func_inet_ntop = no; then
21545 HAVE_INET_NTOP=0
21546 fi
21547
21548 fi
21549
21550 LIBS=$gl_save_LIBS
21551
21552 if test "$ac_cv_search_inet_ntop" != "no" \
21553 && test "$ac_cv_search_inet_ntop" != "none required"; then
21554 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
21555 fi
21556
21557
21558 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
21559 #if HAVE_NETDB_H
21560 # include <netdb.h>
21561 #endif
21562
21563 "
21564 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
21565 ac_have_decl=1
21566 else
21567 ac_have_decl=0
21568 fi
21569
21570 cat >>confdefs.h <<_ACEOF
21571 #define HAVE_DECL_INET_NTOP $ac_have_decl
21572 _ACEOF
21573
21574 if test $ac_cv_have_decl_inet_ntop = no; then
21575 HAVE_DECL_INET_NTOP=0
21576 fi
21577 fi
21578
21579
21580 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
21581
21582
21583
21584
21585
21586
21587
21588
21589 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
21590
21591
21592
21593
21594 fi
21595
21596
21597
21598
21599
21600 GNULIB_INET_NTOP=1
21601
21602
21603
21604
21605
21606
21607
21608 PRIPTR_PREFIX=
21609 if test -n "$STDINT_H"; then
21610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21611 /* end confdefs.h. */
21612
21613 #ifdef _WIN64
21614 LLP64
21615 #endif
21616
21617 int
21618 main ()
21619 {
21620
21621 ;
21622 return 0;
21623 }
21624
21625 _ACEOF
21626 if ac_fn_c_try_compile "$LINENO"; then :
21627 PRIPTR_PREFIX='"l"'
21628 else
21629 PRIPTR_PREFIX='"ll"'
21630 fi
21631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21632 else
21633 for glpfx in '' l ll I64; do
21634 case $glpfx in
21635 '') gltype1='int';;
21636 l) gltype1='long int';;
21637 ll) gltype1='long long int';;
21638 I64) gltype1='__int64';;
21639 esac
21640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21641 /* end confdefs.h. */
21642 #include <stdint.h>
21643 extern intptr_t foo;
21644 extern $gltype1 foo;
21645 int
21646 main ()
21647 {
21648
21649 ;
21650 return 0;
21651 }
21652 _ACEOF
21653 if ac_fn_c_try_compile "$LINENO"; then :
21654 PRIPTR_PREFIX='"'$glpfx'"'
21655 fi
21656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21657 test -n "$PRIPTR_PREFIX" && break
21658 done
21659 fi
21660
21661
21662
21663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
21664 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
21665 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
21666 $as_echo_n "(cached) " >&6
21667 else
21668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21669 /* end confdefs.h. */
21670 /* Work also in C++ mode. */
21671 #define __STDC_LIMIT_MACROS 1
21672
21673 /* Work if build is not clean. */
21674 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21675
21676 #include <limits.h>
21677 #if HAVE_STDINT_H
21678 #include <stdint.h>
21679 #endif
21680
21681 #if defined INT32_MAX && defined INTMAX_MAX
21682 #define CONDITION (INT32_MAX < INTMAX_MAX)
21683 #else
21684 #define CONDITION (sizeof (int) < sizeof (long long int))
21685 #endif
21686 int test[CONDITION ? 1 : -1];
21687 int
21688 main ()
21689 {
21690
21691 ;
21692 return 0;
21693 }
21694 _ACEOF
21695 if ac_fn_c_try_compile "$LINENO"; then :
21696 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
21697 else
21698 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
21699 fi
21700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21701 fi
21702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
21703 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
21704 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
21705 INT32_MAX_LT_INTMAX_MAX=1;
21706 else
21707 INT32_MAX_LT_INTMAX_MAX=0;
21708 fi
21709
21710
21711 if test $APPLE_UNIVERSAL_BUILD = 0; then
21712
21713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
21714 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
21715 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
21716 $as_echo_n "(cached) " >&6
21717 else
21718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21719 /* end confdefs.h. */
21720 /* Work also in C++ mode. */
21721 #define __STDC_LIMIT_MACROS 1
21722
21723 /* Work if build is not clean. */
21724 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21725
21726 #include <limits.h>
21727 #if HAVE_STDINT_H
21728 #include <stdint.h>
21729 #endif
21730
21731 #if defined INT64_MAX
21732 #define CONDITION (INT64_MAX == LONG_MAX)
21733 #else
21734 #define CONDITION (sizeof (long long int) == sizeof (long int))
21735 #endif
21736 int test[CONDITION ? 1 : -1];
21737 int
21738 main ()
21739 {
21740
21741 ;
21742 return 0;
21743 }
21744 _ACEOF
21745 if ac_fn_c_try_compile "$LINENO"; then :
21746 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
21747 else
21748 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
21749 fi
21750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21751 fi
21752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
21753 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
21754 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
21755 INT64_MAX_EQ_LONG_MAX=1;
21756 else
21757 INT64_MAX_EQ_LONG_MAX=0;
21758 fi
21759
21760
21761 else
21762 INT64_MAX_EQ_LONG_MAX=-1
21763 fi
21764
21765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
21766 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
21767 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
21768 $as_echo_n "(cached) " >&6
21769 else
21770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21771 /* end confdefs.h. */
21772 /* Work also in C++ mode. */
21773 #define __STDC_LIMIT_MACROS 1
21774
21775 /* Work if build is not clean. */
21776 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21777
21778 #include <limits.h>
21779 #if HAVE_STDINT_H
21780 #include <stdint.h>
21781 #endif
21782
21783 #if defined UINT32_MAX && defined UINTMAX_MAX
21784 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
21785 #else
21786 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
21787 #endif
21788 int test[CONDITION ? 1 : -1];
21789 int
21790 main ()
21791 {
21792
21793 ;
21794 return 0;
21795 }
21796 _ACEOF
21797 if ac_fn_c_try_compile "$LINENO"; then :
21798 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
21799 else
21800 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
21801 fi
21802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21803 fi
21804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
21805 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
21806 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
21807 UINT32_MAX_LT_UINTMAX_MAX=1;
21808 else
21809 UINT32_MAX_LT_UINTMAX_MAX=0;
21810 fi
21811
21812
21813 if test $APPLE_UNIVERSAL_BUILD = 0; then
21814
21815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
21816 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
21817 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
21818 $as_echo_n "(cached) " >&6
21819 else
21820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21821 /* end confdefs.h. */
21822 /* Work also in C++ mode. */
21823 #define __STDC_LIMIT_MACROS 1
21824
21825 /* Work if build is not clean. */
21826 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21827
21828 #include <limits.h>
21829 #if HAVE_STDINT_H
21830 #include <stdint.h>
21831 #endif
21832
21833 #if defined UINT64_MAX
21834 #define CONDITION (UINT64_MAX == ULONG_MAX)
21835 #else
21836 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
21837 #endif
21838 int test[CONDITION ? 1 : -1];
21839 int
21840 main ()
21841 {
21842
21843 ;
21844 return 0;
21845 }
21846 _ACEOF
21847 if ac_fn_c_try_compile "$LINENO"; then :
21848 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
21849 else
21850 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
21851 fi
21852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21853 fi
21854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
21855 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
21856 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
21857 UINT64_MAX_EQ_ULONG_MAX=1;
21858 else
21859 UINT64_MAX_EQ_ULONG_MAX=0;
21860 fi
21861
21862
21863 else
21864 UINT64_MAX_EQ_ULONG_MAX=-1
21865 fi
21866
21867
21868
21869
21870
21871
21872
21873
21874 if test $ac_cv_func_isblank = no; then
21875 HAVE_ISBLANK=0
21876 fi
21877
21878 if test $HAVE_ISBLANK = 0; then
21879
21880
21881
21882
21883
21884
21885
21886
21887 gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
21888
21889 fi
21890
21891
21892 cat >>confdefs.h <<_ACEOF
21893 #define GNULIB_ISBLANK 1
21894 _ACEOF
21895
21896
21897
21898
21899
21900
21901
21902 GNULIB_ISBLANK=1
21903
21904
21905
21906
21907
21908
21909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
21910 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
21911 if ${gl_cv_func_isnand_no_libm+:} false; then :
21912 $as_echo_n "(cached) " >&6
21913 else
21914
21915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21916 /* end confdefs.h. */
21917 #include <math.h>
21918 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
21919 # undef isnand
21920 # define isnand(x) __builtin_isnan ((double)(x))
21921 #else
21922 # undef isnand
21923 # define isnand(x) isnan ((double)(x))
21924 #endif
21925 double x;
21926 int
21927 main ()
21928 {
21929 return isnand (x);
21930 ;
21931 return 0;
21932 }
21933 _ACEOF
21934 if ac_fn_c_try_link "$LINENO"; then :
21935 gl_cv_func_isnand_no_libm=yes
21936 else
21937 gl_cv_func_isnand_no_libm=no
21938 fi
21939 rm -f core conftest.err conftest.$ac_objext \
21940 conftest$ac_exeext conftest.$ac_ext
21941
21942 fi
21943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
21944 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
21945
21946 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
21947 if test $gl_cv_func_isnand_no_libm = yes; then
21948
21949 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
21950
21951 fi
21952
21953 if test $gl_func_isnand_no_libm != yes; then
21954
21955
21956
21957
21958
21959
21960
21961
21962 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
21963
21964
21965
21966
21967 fi
21968
21969
21970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
21971 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
21972 if ${gl_cv_func_isnanl_no_libm+:} false; then :
21973 $as_echo_n "(cached) " >&6
21974 else
21975
21976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21977 /* end confdefs.h. */
21978 #include <math.h>
21979 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
21980 # undef isnanl
21981 # define isnanl(x) __builtin_isnan ((long double)(x))
21982 #elif defined isnan
21983 # undef isnanl
21984 # define isnanl(x) isnan ((long double)(x))
21985 #endif
21986 long double x;
21987 int
21988 main ()
21989 {
21990 return isnanl (x);
21991 ;
21992 return 0;
21993 }
21994 _ACEOF
21995 if ac_fn_c_try_link "$LINENO"; then :
21996 gl_cv_func_isnanl_no_libm=yes
21997 else
21998 gl_cv_func_isnanl_no_libm=no
21999 fi
22000 rm -f core conftest.err conftest.$ac_objext \
22001 conftest$ac_exeext conftest.$ac_ext
22002
22003 fi
22004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
22005 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
22006
22007 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
22008 if test $gl_func_isnanl_no_libm = yes; then
22009
22010
22011
22012
22013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
22014 $as_echo_n "checking whether isnanl works... " >&6; }
22015 if ${gl_cv_func_isnanl_works+:} false; then :
22016 $as_echo_n "(cached) " >&6
22017 else
22018
22019 if test "$cross_compiling" = yes; then :
22020 case "$host_os" in
22021 mingw*) # Guess yes on mingw, no on MSVC.
22022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22023 /* end confdefs.h. */
22024
22025 #ifdef __MINGW32__
22026 Known
22027 #endif
22028
22029 _ACEOF
22030 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22031 $EGREP "Known" >/dev/null 2>&1; then :
22032 gl_cv_func_isnanl_works="guessing yes"
22033 else
22034 gl_cv_func_isnanl_works="guessing no"
22035 fi
22036 rm -f conftest*
22037
22038 ;;
22039 *) gl_cv_func_isnanl_works="guessing yes" ;;
22040 esac
22041
22042 else
22043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22044 /* end confdefs.h. */
22045
22046 #include <float.h>
22047 #include <limits.h>
22048 #include <math.h>
22049 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
22050 # undef isnanl
22051 # define isnanl(x) __builtin_isnan ((long double)(x))
22052 #elif defined isnan
22053 # undef isnanl
22054 # define isnanl(x) isnan ((long double)(x))
22055 #endif
22056 #define NWORDS \
22057 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22058 typedef union { unsigned int word[NWORDS]; long double value; }
22059 memory_long_double;
22060 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
22061 runtime type conversion. */
22062 #ifdef __sgi
22063 static long double NaNl ()
22064 {
22065 double zero = 0.0;
22066 return zero / zero;
22067 }
22068 #else
22069 # define NaNl() (0.0L / 0.0L)
22070 #endif
22071 int main ()
22072 {
22073 int result = 0;
22074
22075 if (!isnanl (NaNl ()))
22076 result |= 1;
22077
22078 {
22079 memory_long_double m;
22080 unsigned int i;
22081
22082 /* The isnanl function should be immune against changes in the sign bit and
22083 in the mantissa bits. The xor operation twiddles a bit that can only be
22084 a sign bit or a mantissa bit (since the exponent never extends to
22085 bit 31). */
22086 m.value = NaNl ();
22087 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
22088 for (i = 0; i < NWORDS; i++)
22089 m.word[i] |= 1;
22090 if (!isnanl (m.value))
22091 result |= 1;
22092 }
22093
22094 #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
22095 /* Representation of an 80-bit 'long double' as an initializer for a sequence
22096 of 'unsigned int' words. */
22097 # ifdef WORDS_BIGENDIAN
22098 # define LDBL80_WORDS(exponent,manthi,mantlo) \
22099 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
22100 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
22101 (unsigned int) (mantlo) << 16 \
22102 }
22103 # else
22104 # define LDBL80_WORDS(exponent,manthi,mantlo) \
22105 { mantlo, manthi, exponent }
22106 # endif
22107 { /* Quiet NaN. */
22108 static memory_long_double x =
22109 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
22110 if (!isnanl (x.value))
22111 result |= 2;
22112 }
22113 {
22114 /* Signalling NaN. */
22115 static memory_long_double x =
22116 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
22117 if (!isnanl (x.value))
22118 result |= 2;
22119 }
22120 /* isnanl should return something even for noncanonical values. */
22121 { /* Pseudo-NaN. */
22122 static memory_long_double x =
22123 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
22124 if (isnanl (x.value) && !isnanl (x.value))
22125 result |= 4;
22126 }
22127 { /* Pseudo-Infinity. */
22128 static memory_long_double x =
22129 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
22130 if (isnanl (x.value) && !isnanl (x.value))
22131 result |= 8;
22132 }
22133 { /* Pseudo-Zero. */
22134 static memory_long_double x =
22135 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
22136 if (isnanl (x.value) && !isnanl (x.value))
22137 result |= 16;
22138 }
22139 { /* Unnormalized number. */
22140 static memory_long_double x =
22141 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
22142 if (isnanl (x.value) && !isnanl (x.value))
22143 result |= 32;
22144 }
22145 { /* Pseudo-Denormal. */
22146 static memory_long_double x =
22147 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
22148 if (isnanl (x.value) && !isnanl (x.value))
22149 result |= 64;
22150 }
22151 #endif
22152
22153 return result;
22154 }
22155 _ACEOF
22156 if ac_fn_c_try_run "$LINENO"; then :
22157 gl_cv_func_isnanl_works=yes
22158 else
22159 gl_cv_func_isnanl_works=no
22160 fi
22161 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22162 conftest.$ac_objext conftest.beam conftest.$ac_ext
22163 fi
22164
22165
22166 fi
22167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
22168 $as_echo "$gl_cv_func_isnanl_works" >&6; }
22169
22170 case "$gl_cv_func_isnanl_works" in
22171 *yes) ;;
22172 *) gl_func_isnanl_no_libm=no ;;
22173 esac
22174 fi
22175 if test $gl_func_isnanl_no_libm = yes; then
22176
22177 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
22178
22179 fi
22180
22181 if test $gl_func_isnanl_no_libm != yes; then
22182
22183
22184
22185
22186
22187
22188
22189
22190 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
22191
22192
22193
22194
22195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
22196 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
22197 if ${gl_cv_cc_long_double_expbit0+:} false; then :
22198 $as_echo_n "(cached) " >&6
22199 else
22200
22201 if test "$cross_compiling" = yes; then :
22202
22203 gl_cv_cc_long_double_expbit0="unknown"
22204 case "$host_os" in
22205 mingw*) # On native Windows (little-endian), we know the result
22206 # in two cases: mingw, MSVC.
22207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22208 /* end confdefs.h. */
22209
22210 #ifdef __MINGW32__
22211 Known
22212 #endif
22213
22214 _ACEOF
22215 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22216 $EGREP "Known" >/dev/null 2>&1; then :
22217 gl_cv_cc_long_double_expbit0="word 2 bit 0"
22218 fi
22219 rm -f conftest*
22220
22221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22222 /* end confdefs.h. */
22223
22224 #ifdef _MSC_VER
22225 Known
22226 #endif
22227
22228 _ACEOF
22229 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22230 $EGREP "Known" >/dev/null 2>&1; then :
22231 gl_cv_cc_long_double_expbit0="word 1 bit 20"
22232 fi
22233 rm -f conftest*
22234
22235 ;;
22236 esac
22237
22238 else
22239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22240 /* end confdefs.h. */
22241
22242 #include <float.h>
22243 #include <stddef.h>
22244 #include <stdio.h>
22245 #include <string.h>
22246 #define NWORDS \
22247 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22248 typedef union { long double value; unsigned int word[NWORDS]; }
22249 memory_long_double;
22250 static unsigned int ored_words[NWORDS];
22251 static unsigned int anded_words[NWORDS];
22252 static void add_to_ored_words (long double *x)
22253 {
22254 memory_long_double m;
22255 size_t i;
22256 /* Clear it first, in case
22257 sizeof (long double) < sizeof (memory_long_double). */
22258 memset (&m, 0, sizeof (memory_long_double));
22259 m.value = *x;
22260 for (i = 0; i < NWORDS; i++)
22261 {
22262 ored_words[i] |= m.word[i];
22263 anded_words[i] &= m.word[i];
22264 }
22265 }
22266 int main ()
22267 {
22268 static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
22269 size_t j;
22270 FILE *fp = fopen ("conftest.out", "w");
22271 if (fp == NULL)
22272 return 1;
22273 for (j = 0; j < NWORDS; j++)
22274 anded_words[j] = ~ (unsigned int) 0;
22275 for (j = 0; j < 5; j++)
22276 add_to_ored_words (&samples[j]);
22277 /* Remove bits that are common (e.g. if representation of the first mantissa
22278 bit is explicit). */
22279 for (j = 0; j < NWORDS; j++)
22280 ored_words[j] &= ~anded_words[j];
22281 /* Now find the nonzero word. */
22282 for (j = 0; j < NWORDS; j++)
22283 if (ored_words[j] != 0)
22284 break;
22285 if (j < NWORDS)
22286 {
22287 size_t i;
22288 for (i = j + 1; i < NWORDS; i++)
22289 if (ored_words[i] != 0)
22290 {
22291 fprintf (fp, "unknown");
22292 return (fclose (fp) != 0);
22293 }
22294 for (i = 0; ; i++)
22295 if ((ored_words[j] >> i) & 1)
22296 {
22297 fprintf (fp, "word %d bit %d", (int) j, (int) i);
22298 return (fclose (fp) != 0);
22299 }
22300 }
22301 fprintf (fp, "unknown");
22302 return (fclose (fp) != 0);
22303 }
22304
22305 _ACEOF
22306 if ac_fn_c_try_run "$LINENO"; then :
22307 gl_cv_cc_long_double_expbit0=`cat conftest.out`
22308 else
22309 gl_cv_cc_long_double_expbit0="unknown"
22310 fi
22311 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22312 conftest.$ac_objext conftest.beam conftest.$ac_ext
22313 fi
22314
22315 rm -f conftest.out
22316
22317 fi
22318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
22319 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
22320 case "$gl_cv_cc_long_double_expbit0" in
22321 word*bit*)
22322 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
22323 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
22324
22325 cat >>confdefs.h <<_ACEOF
22326 #define LDBL_EXPBIT0_WORD $word
22327 _ACEOF
22328
22329
22330 cat >>confdefs.h <<_ACEOF
22331 #define LDBL_EXPBIT0_BIT $bit
22332 _ACEOF
22333
22334 ;;
22335 esac
22336
22337
22338
22339 fi
22340
22341
22342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
22343 $as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
22344 if ${gl_cv_c___inline+:} false; then :
22345 $as_echo_n "(cached) " >&6
22346 else
22347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22348 /* end confdefs.h. */
22349 typedef int foo_t;
22350 static __inline foo_t foo (void) { return 0; }
22351 int
22352 main ()
22353 {
22354 return foo ();
22355 ;
22356 return 0;
22357 }
22358 _ACEOF
22359 if ac_fn_c_try_compile "$LINENO"; then :
22360 gl_cv_c___inline=yes
22361 else
22362 gl_cv_c___inline=no
22363 fi
22364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22365 fi
22366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
22367 $as_echo "$gl_cv_c___inline" >&6; }
22368 if test $gl_cv_c___inline = yes; then
22369
22370 $as_echo "#define HAVE___INLINE 1" >>confdefs.h
22371
22372 fi
22373
22374
22375
22376
22377
22378 LOCALCHARSET_TESTS_ENVIRONMENT=
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390 case "$host_os" in
22391 solaris*)
22392
22393 $as_echo "#define _LCONV_C99 1" >>confdefs.h
22394
22395 ;;
22396 esac
22397
22398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
22399 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
22400 if ${gl_cv_header_locale_h_posix2001+:} false; then :
22401 $as_echo_n "(cached) " >&6
22402 else
22403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22404 /* end confdefs.h. */
22405 #include <locale.h>
22406 int x = LC_MESSAGES;
22407 int y = sizeof (((struct lconv *) 0)->decimal_point);
22408 int
22409 main ()
22410 {
22411
22412 ;
22413 return 0;
22414 }
22415 _ACEOF
22416 if ac_fn_c_try_compile "$LINENO"; then :
22417 gl_cv_header_locale_h_posix2001=yes
22418 else
22419 gl_cv_header_locale_h_posix2001=no
22420 fi
22421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22422 fi
22423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
22424 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
22425
22426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
22427 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
22428 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
22429 $as_echo_n "(cached) " >&6
22430 else
22431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22432 /* end confdefs.h. */
22433 #include <locale.h>
22434 struct lconv l;
22435 int x = sizeof (l.decimal_point);
22436 int y = sizeof (l.int_p_cs_precedes);
22437 int
22438 main ()
22439 {
22440
22441 ;
22442 return 0;
22443 }
22444 _ACEOF
22445 if ac_fn_c_try_compile "$LINENO"; then :
22446 gl_cv_sys_struct_lconv_ok=yes
22447 else
22448 gl_cv_sys_struct_lconv_ok=no
22449 fi
22450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22451
22452 fi
22453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
22454 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
22455 if test $gl_cv_sys_struct_lconv_ok = no; then
22456 case "$host_os" in
22457 mingw*)
22458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22459 /* end confdefs.h. */
22460
22461 #ifdef _MSC_VER
22462 Special
22463 #endif
22464
22465 _ACEOF
22466 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22467 $EGREP "Special" >/dev/null 2>&1; then :
22468
22469 else
22470 REPLACE_STRUCT_LCONV=1
22471 fi
22472 rm -f conftest*
22473
22474 ;;
22475 *) REPLACE_STRUCT_LCONV=1 ;;
22476 esac
22477 fi
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487 if test $gl_cv_have_include_next = yes; then
22488 gl_cv_next_locale_h='<'locale.h'>'
22489 else
22490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
22491 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
22492 if ${gl_cv_next_locale_h+:} false; then :
22493 $as_echo_n "(cached) " >&6
22494 else
22495
22496
22497
22498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22499 /* end confdefs.h. */
22500 #include <locale.h>
22501 _ACEOF
22502 case "$host_os" in
22503 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22504 *) gl_absname_cpp="$ac_cpp" ;;
22505 esac
22506
22507 case "$host_os" in
22508 mingw*)
22509 gl_dirsep_regex='[/\\]'
22510 ;;
22511 *)
22512 gl_dirsep_regex='\/'
22513 ;;
22514 esac
22515 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22516 gl_header_literal_regex=`echo 'locale.h' \
22517 | sed -e "$gl_make_literal_regex_sed"`
22518 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22519 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22520 s|^/[^/]|//&|
22521 p
22522 q
22523 }'
22524
22525 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22526 sed -n "$gl_absolute_header_sed"`
22527
22528 gl_header=$gl_cv_absolute_locale_h
22529 gl_cv_next_locale_h='"'$gl_header'"'
22530
22531
22532 fi
22533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
22534 $as_echo "$gl_cv_next_locale_h" >&6; }
22535 fi
22536 NEXT_LOCALE_H=$gl_cv_next_locale_h
22537
22538 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22539 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22540 gl_next_as_first_directive='<'locale.h'>'
22541 else
22542 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22543 gl_next_as_first_directive=$gl_cv_next_locale_h
22544 fi
22545 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557 if test "$gl_threads_api" = posix; then
22558 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
22559 # pthread_rwlock_* functions.
22560 has_rwlock=false
22561 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
22562 "
22563 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
22564 has_rwlock=true
22565
22566 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
22567
22568 fi
22569
22570 if $has_rwlock; then
22571
22572
22573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
22574 $as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
22575 if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
22576 $as_echo_n "(cached) " >&6
22577 else
22578 save_LIBS="$LIBS"
22579 LIBS="$LIBS $LIBMULTITHREAD"
22580 if test "$cross_compiling" = yes; then :
22581 case "$host_os" in
22582 # Guess no on glibc systems.
22583 *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
22584 # Guess no on musl systems.
22585 *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
22586 # Guess no on bionic systems.
22587 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
22588 # Guess yes on native Windows with the mingw-w64 winpthreads library.
22589 # Guess no on native Windows with the gnulib windows-rwlock module.
22590 mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
22591 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
22592 else
22593 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
22594 fi
22595 ;;
22596 # If we don't know, obey --enable-cross-guesses.
22597 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
22598 esac
22599
22600 else
22601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22602 /* end confdefs.h. */
22603
22604 #include <errno.h>
22605 #include <pthread.h>
22606 #include <stdlib.h>
22607 #include <unistd.h>
22608
22609 #define SUCCEED() exit (0)
22610 #define FAILURE() exit (1)
22611 #define UNEXPECTED(n) (exit (10 + (n)))
22612
22613 /* The main thread creates the waiting writer and the requesting reader threads
22614 in the default way; this guarantees that they have the same priority.
22615 We can reuse the main thread as first reader thread. */
22616
22617 static pthread_rwlock_t lock;
22618 static pthread_t reader1;
22619 static pthread_t writer;
22620 static pthread_t reader2;
22621 static pthread_t timer;
22622 /* Used to pass control from writer to reader2 and from reader2 to timer,
22623 as in a relay race.
22624 Passing control from one running thread to another running thread
22625 is most likely faster than to create the second thread. */
22626 static pthread_mutex_t baton;
22627
22628 static void *
22629 timer_func (void *ignored)
22630 {
22631 /* Step 13 (can be before or after step 12):
22632 The timer thread takes the baton, then waits a moment to make sure
22633 it can tell whether the second reader thread is blocked at step 12. */
22634 if (pthread_mutex_lock (&baton))
22635 UNEXPECTED (13);
22636 usleep (100000);
22637 /* By the time we get here, it's clear that the second reader thread is
22638 blocked at step 12. This is the desired behaviour. */
22639 SUCCEED ();
22640 }
22641
22642 static void *
22643 reader2_func (void *ignored)
22644 {
22645 int err;
22646
22647 /* Step 8 (can be before or after step 7):
22648 The second reader thread takes the baton, then waits a moment to make sure
22649 the writer thread has reached step 7. */
22650 if (pthread_mutex_lock (&baton))
22651 UNEXPECTED (8);
22652 usleep (100000);
22653 /* Step 9: The second reader thread requests the lock. */
22654 err = pthread_rwlock_tryrdlock (&lock);
22655 if (err == 0)
22656 FAILURE ();
22657 else if (err != EBUSY)
22658 UNEXPECTED (9);
22659 /* Step 10: Launch a timer, to test whether the next call blocks. */
22660 if (pthread_create (&timer, NULL, timer_func, NULL))
22661 UNEXPECTED (10);
22662 /* Step 11: Release the baton. */
22663 if (pthread_mutex_unlock (&baton))
22664 UNEXPECTED (11);
22665 /* Step 12: The second reader thread requests the lock. */
22666 err = pthread_rwlock_rdlock (&lock);
22667 if (err == 0)
22668 FAILURE ();
22669 else
22670 UNEXPECTED (12);
22671 }
22672
22673 static void *
22674 writer_func (void *ignored)
22675 {
22676 /* Step 4: Take the baton, so that the second reader thread does not go ahead
22677 too early. */
22678 if (pthread_mutex_lock (&baton))
22679 UNEXPECTED (4);
22680 /* Step 5: Create the second reader thread. */
22681 if (pthread_create (&reader2, NULL, reader2_func, NULL))
22682 UNEXPECTED (5);
22683 /* Step 6: Release the baton. */
22684 if (pthread_mutex_unlock (&baton))
22685 UNEXPECTED (6);
22686 /* Step 7: The writer thread requests the lock. */
22687 if (pthread_rwlock_wrlock (&lock))
22688 UNEXPECTED (7);
22689 return NULL;
22690 }
22691
22692 int
22693 main ()
22694 {
22695 reader1 = pthread_self ();
22696
22697 /* Step 1: The main thread initializes the lock and the baton. */
22698 if (pthread_rwlock_init (&lock, NULL))
22699 UNEXPECTED (1);
22700 if (pthread_mutex_init (&baton, NULL))
22701 UNEXPECTED (1);
22702 /* Step 2: The main thread acquires the lock as a reader. */
22703 if (pthread_rwlock_rdlock (&lock))
22704 UNEXPECTED (2);
22705 /* Step 3: Create the writer thread. */
22706 if (pthread_create (&writer, NULL, writer_func, NULL))
22707 UNEXPECTED (3);
22708 /* Job done. Go to sleep. */
22709 for (;;)
22710 {
22711 sleep (1);
22712 }
22713 }
22714
22715 _ACEOF
22716 if ac_fn_c_try_run "$LINENO"; then :
22717 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
22718 else
22719 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
22720 fi
22721 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22722 conftest.$ac_objext conftest.beam conftest.$ac_ext
22723 fi
22724
22725 LIBS="$save_LIBS"
22726
22727 fi
22728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
22729 $as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
22730 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
22731 *yes)
22732
22733 $as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
22734
22735 ;;
22736 esac
22737
22738 fi
22739 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
22740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22741 /* end confdefs.h. */
22742
22743 #include <pthread.h>
22744 int
22745 main ()
22746 {
22747
22748 #if __FreeBSD__ == 4
22749 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
22750 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
22751 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
22752 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
22753 #else
22754 int x = (int)PTHREAD_MUTEX_RECURSIVE;
22755 return !x;
22756 #endif
22757
22758 ;
22759 return 0;
22760 }
22761 _ACEOF
22762 if ac_fn_c_try_compile "$LINENO"; then :
22763
22764 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
22765
22766 fi
22767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22768 fi
22769 :
22770
22771
22772
22773 cat >>confdefs.h <<_ACEOF
22774 #define GNULIB_LOCK 1
22775 _ACEOF
22776
22777
22778
22779
22780
22781
22782 if test $ac_cv_func_lstat = yes; then
22783
22784 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
22785 solaris* | *no)
22786 REPLACE_LSTAT=1
22787 ;;
22788 esac
22789 else
22790 HAVE_LSTAT=0
22791 fi
22792
22793 if test $REPLACE_LSTAT = 1; then
22794
22795
22796
22797
22798
22799
22800
22801
22802 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
22803
22804 :
22805 fi
22806
22807
22808
22809
22810
22811 GNULIB_LSTAT=1
22812
22813
22814
22815
22816
22817 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
22818
22819
22820
22821
22822
22823
22824 if test $gl_cv_func_malloc_posix = yes; then
22825
22826 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
22827
22828 else
22829 REPLACE_MALLOC=1
22830 fi
22831
22832 if test $REPLACE_MALLOC = 1; then
22833
22834
22835
22836
22837
22838
22839
22840
22841 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22842
22843 fi
22844
22845
22846
22847
22848
22849 GNULIB_MALLOC_POSIX=1
22850
22851
22852
22853
22854
22855 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
22856
22857
22858
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873 if test $gl_cv_have_include_next = yes; then
22874 gl_cv_next_math_h='<'math.h'>'
22875 else
22876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
22877 $as_echo_n "checking absolute name of <math.h>... " >&6; }
22878 if ${gl_cv_next_math_h+:} false; then :
22879 $as_echo_n "(cached) " >&6
22880 else
22881
22882 if test $ac_cv_header_math_h = yes; then
22883
22884
22885
22886
22887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22888 /* end confdefs.h. */
22889 #include <math.h>
22890 _ACEOF
22891 case "$host_os" in
22892 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22893 *) gl_absname_cpp="$ac_cpp" ;;
22894 esac
22895
22896 case "$host_os" in
22897 mingw*)
22898 gl_dirsep_regex='[/\\]'
22899 ;;
22900 *)
22901 gl_dirsep_regex='\/'
22902 ;;
22903 esac
22904 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22905 gl_header_literal_regex=`echo 'math.h' \
22906 | sed -e "$gl_make_literal_regex_sed"`
22907 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22908 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22909 s|^/[^/]|//&|
22910 p
22911 q
22912 }'
22913
22914 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22915 sed -n "$gl_absolute_header_sed"`
22916
22917 gl_header=$gl_cv_absolute_math_h
22918 gl_cv_next_math_h='"'$gl_header'"'
22919 else
22920 gl_cv_next_math_h='<'math.h'>'
22921 fi
22922
22923
22924 fi
22925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
22926 $as_echo "$gl_cv_next_math_h" >&6; }
22927 fi
22928 NEXT_MATH_H=$gl_cv_next_math_h
22929
22930 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22931 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22932 gl_next_as_first_directive='<'math.h'>'
22933 else
22934 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22935 gl_next_as_first_directive=$gl_cv_next_math_h
22936 fi
22937 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
22938
22939
22940
22941
22942
22943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
22944 $as_echo_n "checking whether NAN macro works... " >&6; }
22945 if ${gl_cv_header_math_nan_works+:} false; then :
22946 $as_echo_n "(cached) " >&6
22947 else
22948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22949 /* end confdefs.h. */
22950 #include <math.h>
22951 int
22952 main ()
22953 {
22954 /* Solaris 10 has a broken definition of NAN. Other platforms
22955 fail to provide NAN, or provide it only in C99 mode; this
22956 test only needs to fail when NAN is provided but wrong. */
22957 float f = 1.0f;
22958 #ifdef NAN
22959 f = NAN;
22960 #endif
22961 return f == 0;
22962 ;
22963 return 0;
22964 }
22965 _ACEOF
22966 if ac_fn_c_try_compile "$LINENO"; then :
22967 gl_cv_header_math_nan_works=yes
22968 else
22969 gl_cv_header_math_nan_works=no
22970 fi
22971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22972 fi
22973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
22974 $as_echo "$gl_cv_header_math_nan_works" >&6; }
22975 if test $gl_cv_header_math_nan_works = no; then
22976 REPLACE_NAN=1
22977 fi
22978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
22979 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
22980 if ${gl_cv_header_math_huge_val_works+:} false; then :
22981 $as_echo_n "(cached) " >&6
22982 else
22983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22984 /* end confdefs.h. */
22985 #include <math.h>
22986 int
22987 main ()
22988 {
22989 /* Solaris 10 has a broken definition of HUGE_VAL. */
22990 double d = HUGE_VAL;
22991 return d == 0;
22992 ;
22993 return 0;
22994 }
22995 _ACEOF
22996 if ac_fn_c_try_compile "$LINENO"; then :
22997 gl_cv_header_math_huge_val_works=yes
22998 else
22999 gl_cv_header_math_huge_val_works=no
23000 fi
23001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23002 fi
23003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
23004 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
23005 if test $gl_cv_header_math_huge_val_works = no; then
23006 REPLACE_HUGE_VAL=1
23007 fi
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026 if case "$host_os" in
23027 mingw*) true ;;
23028 *) test $ac_cv_func_mbsinit = yes ;;
23029 esac \
23030 && test $ac_cv_func_mbrtowc = yes; then
23031
23032
23033
23034
23035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23036 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23037 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23038 $as_echo_n "(cached) " >&6
23039 else
23040
23041 case "$host_os" in
23042 # Guess no on AIX and OSF/1.
23043 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23044 # Guess yes otherwise.
23045 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23046 esac
23047 if test $LOCALE_JA != none; then
23048 if test "$cross_compiling" = yes; then :
23049 :
23050 else
23051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23052 /* end confdefs.h. */
23053
23054 #include <locale.h>
23055 #include <string.h>
23056 #include <wchar.h>
23057 int main ()
23058 {
23059 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23060 {
23061 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23062 mbstate_t state;
23063 wchar_t wc;
23064
23065 memset (&state, '\0', sizeof (mbstate_t));
23066 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23067 if (mbsinit (&state))
23068 return 2;
23069 }
23070 return 0;
23071 }
23072 _ACEOF
23073 if ac_fn_c_try_run "$LINENO"; then :
23074 gl_cv_func_mbrtowc_incomplete_state=yes
23075 else
23076 gl_cv_func_mbrtowc_incomplete_state=no
23077 fi
23078 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23079 conftest.$ac_objext conftest.beam conftest.$ac_ext
23080 fi
23081
23082 else
23083 if test $LOCALE_FR_UTF8 != none; then
23084 if test "$cross_compiling" = yes; then :
23085 :
23086 else
23087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23088 /* end confdefs.h. */
23089
23090 #include <locale.h>
23091 #include <string.h>
23092 #include <wchar.h>
23093 int main ()
23094 {
23095 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23096 {
23097 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
23098 mbstate_t state;
23099 wchar_t wc;
23100
23101 memset (&state, '\0', sizeof (mbstate_t));
23102 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23103 if (mbsinit (&state))
23104 return 2;
23105 }
23106 return 0;
23107 }
23108 _ACEOF
23109 if ac_fn_c_try_run "$LINENO"; then :
23110 gl_cv_func_mbrtowc_incomplete_state=yes
23111 else
23112 gl_cv_func_mbrtowc_incomplete_state=no
23113 fi
23114 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23115 conftest.$ac_objext conftest.beam conftest.$ac_ext
23116 fi
23117
23118 fi
23119 fi
23120
23121 fi
23122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23123 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23124
23125
23126
23127
23128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23129 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23130 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23131 $as_echo_n "(cached) " >&6
23132 else
23133
23134 case "$host_os" in
23135 # Guess no on Solaris 8.
23136 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23137 # Guess yes otherwise.
23138 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23139 esac
23140 if test $LOCALE_ZH_CN != none; then
23141 if test "$cross_compiling" = yes; then :
23142 :
23143 else
23144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23145 /* end confdefs.h. */
23146
23147 #include <locale.h>
23148 #include <stdlib.h>
23149 #include <string.h>
23150 #include <wchar.h>
23151 int main ()
23152 {
23153 /* This fails on Solaris 8:
23154 mbrtowc returns 2, and sets wc to 0x00F0.
23155 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
23156 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23157 {
23158 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23159 mbstate_t state;
23160 wchar_t wc;
23161
23162 memset (&state, '\0', sizeof (mbstate_t));
23163 if (mbrtowc (&wc, input + 3, 6, &state) != 4
23164 && mbtowc (&wc, input + 3, 6) == 4)
23165 return 2;
23166 }
23167 return 0;
23168 }
23169 _ACEOF
23170 if ac_fn_c_try_run "$LINENO"; then :
23171 gl_cv_func_mbrtowc_sanitycheck=yes
23172 else
23173 gl_cv_func_mbrtowc_sanitycheck=no
23174 fi
23175 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23176 conftest.$ac_objext conftest.beam conftest.$ac_ext
23177 fi
23178
23179 fi
23180
23181 fi
23182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23183 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23184
23185 REPLACE_MBSTATE_T=0
23186 case "$gl_cv_func_mbrtowc_incomplete_state" in
23187 *yes) ;;
23188 *) REPLACE_MBSTATE_T=1 ;;
23189 esac
23190 case "$gl_cv_func_mbrtowc_sanitycheck" in
23191 *yes) ;;
23192 *) REPLACE_MBSTATE_T=1 ;;
23193 esac
23194 else
23195 REPLACE_MBSTATE_T=1
23196 fi
23197
23198
23199
23200 if test $ac_cv_func_mbrtowc = no; then
23201 HAVE_MBRTOWC=0
23202 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
23203 #include <wchar.h>
23204
23205 "
23206 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
23207 ac_have_decl=1
23208 else
23209 ac_have_decl=0
23210 fi
23211
23212 cat >>confdefs.h <<_ACEOF
23213 #define HAVE_DECL_MBRTOWC $ac_have_decl
23214 _ACEOF
23215
23216 if test $ac_cv_have_decl_mbrtowc = yes; then
23217 REPLACE_MBRTOWC=1
23218 fi
23219 else
23220 if test $REPLACE_MBSTATE_T = 1; then
23221 REPLACE_MBRTOWC=1
23222 else
23223
23224
23225
23226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
23227 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
23228 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
23229 $as_echo_n "(cached) " >&6
23230 else
23231
23232 case "$host_os" in
23233 # Guess no on Solaris.
23234 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
23235 # Guess yes otherwise.
23236 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
23237 esac
23238 if test $LOCALE_FR_UTF8 != none; then
23239 if test "$cross_compiling" = yes; then :
23240 :
23241 else
23242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23243 /* end confdefs.h. */
23244
23245 #include <locale.h>
23246 #include <stdlib.h>
23247 #include <string.h>
23248 #include <wchar.h>
23249 int main ()
23250 {
23251 int result = 0;
23252
23253 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23254 {
23255 char input[] = "\303\237er";
23256 mbstate_t state;
23257 wchar_t wc;
23258 size_t ret;
23259
23260 memset (&state, '\0', sizeof (mbstate_t));
23261 wc = (wchar_t) 0xBADFACE;
23262 ret = mbrtowc (&wc, input, 5, &state);
23263 if (ret != 2)
23264 result |= 1;
23265 if (!mbsinit (&state))
23266 result |= 2;
23267
23268 memset (&state, '\0', sizeof (mbstate_t));
23269 ret = mbrtowc (NULL, input, 5, &state);
23270 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
23271 result |= 4;
23272 if (!mbsinit (&state))
23273 result |= 8;
23274 }
23275 return result;
23276 }
23277 _ACEOF
23278 if ac_fn_c_try_run "$LINENO"; then :
23279 gl_cv_func_mbrtowc_null_arg1=yes
23280 else
23281 gl_cv_func_mbrtowc_null_arg1=no
23282 fi
23283 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23284 conftest.$ac_objext conftest.beam conftest.$ac_ext
23285 fi
23286
23287 fi
23288
23289 fi
23290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
23291 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
23292
23293
23294
23295
23296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
23297 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
23298 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
23299 $as_echo_n "(cached) " >&6
23300 else
23301
23302 case "$host_os" in
23303 # Guess no on OSF/1.
23304 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
23305 # Guess yes otherwise.
23306 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
23307 esac
23308 if test $LOCALE_FR_UTF8 != none; then
23309 if test "$cross_compiling" = yes; then :
23310 :
23311 else
23312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23313 /* end confdefs.h. */
23314
23315 #include <locale.h>
23316 #include <string.h>
23317 #include <wchar.h>
23318 int main ()
23319 {
23320 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23321 {
23322 mbstate_t state;
23323 wchar_t wc;
23324 int ret;
23325
23326 memset (&state, '\0', sizeof (mbstate_t));
23327 wc = (wchar_t) 0xBADFACE;
23328 mbrtowc (&wc, NULL, 5, &state);
23329 /* Check that wc was not modified. */
23330 if (wc != (wchar_t) 0xBADFACE)
23331 return 2;
23332 }
23333 return 0;
23334 }
23335 _ACEOF
23336 if ac_fn_c_try_run "$LINENO"; then :
23337 gl_cv_func_mbrtowc_null_arg2=yes
23338 else
23339 gl_cv_func_mbrtowc_null_arg2=no
23340 fi
23341 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23342 conftest.$ac_objext conftest.beam conftest.$ac_ext
23343 fi
23344
23345 fi
23346
23347 fi
23348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
23349 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
23350
23351
23352
23353
23354
23355
23356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
23357 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
23358 if ${gl_cv_func_mbrtowc_retval+:} false; then :
23359 $as_echo_n "(cached) " >&6
23360 else
23361
23362 case "$host_os" in
23363 # Guess no on HP-UX, Solaris, native Windows.
23364 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
23365 # Guess yes otherwise.
23366 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
23367 esac
23368 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
23369 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
23370 if test "$cross_compiling" = yes; then :
23371 :
23372 else
23373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23374 /* end confdefs.h. */
23375
23376 #include <locale.h>
23377 #include <string.h>
23378 #include <wchar.h>
23379 int main ()
23380 {
23381 int result = 0;
23382 int found_some_locale = 0;
23383 /* This fails on Solaris. */
23384 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23385 {
23386 char input[] = "B\303\274\303\237er"; /* "Büßer" */
23387 mbstate_t state;
23388 wchar_t wc;
23389
23390 memset (&state, '\0', sizeof (mbstate_t));
23391 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23392 {
23393 input[1] = '\0';
23394 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
23395 result |= 1;
23396 }
23397 found_some_locale = 1;
23398 }
23399 /* This fails on HP-UX 11.11. */
23400 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23401 {
23402 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23403 mbstate_t state;
23404 wchar_t wc;
23405
23406 memset (&state, '\0', sizeof (mbstate_t));
23407 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23408 {
23409 input[1] = '\0';
23410 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
23411 result |= 2;
23412 }
23413 found_some_locale = 1;
23414 }
23415 /* This fails on native Windows. */
23416 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
23417 {
23418 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
23419 mbstate_t state;
23420 wchar_t wc;
23421
23422 memset (&state, '\0', sizeof (mbstate_t));
23423 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23424 {
23425 input[3] = '\0';
23426 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23427 result |= 4;
23428 }
23429 found_some_locale = 1;
23430 }
23431 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
23432 {
23433 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
23434 mbstate_t state;
23435 wchar_t wc;
23436
23437 memset (&state, '\0', sizeof (mbstate_t));
23438 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23439 {
23440 input[3] = '\0';
23441 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23442 result |= 8;
23443 }
23444 found_some_locale = 1;
23445 }
23446 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
23447 {
23448 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
23449 mbstate_t state;
23450 wchar_t wc;
23451
23452 memset (&state, '\0', sizeof (mbstate_t));
23453 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23454 {
23455 input[3] = '\0';
23456 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23457 result |= 16;
23458 }
23459 found_some_locale = 1;
23460 }
23461 return (found_some_locale ? result : 77);
23462 }
23463 _ACEOF
23464 if ac_fn_c_try_run "$LINENO"; then :
23465 gl_cv_func_mbrtowc_retval=yes
23466 else
23467 if test $? != 77; then
23468 gl_cv_func_mbrtowc_retval=no
23469 fi
23470
23471 fi
23472 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23473 conftest.$ac_objext conftest.beam conftest.$ac_ext
23474 fi
23475
23476 fi
23477
23478 fi
23479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
23480 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
23481
23482
23483
23484
23485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
23486 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
23487 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
23488 $as_echo_n "(cached) " >&6
23489 else
23490
23491 case "$host_os" in
23492 # Guess no on Solaris 8 and 9.
23493 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
23494 # Guess yes otherwise.
23495 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
23496 esac
23497 if test $LOCALE_ZH_CN != none; then
23498 if test "$cross_compiling" = yes; then :
23499 :
23500 else
23501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23502 /* end confdefs.h. */
23503
23504 #include <locale.h>
23505 #include <string.h>
23506 #include <wchar.h>
23507 int main ()
23508 {
23509 /* This fails on Solaris 8 and 9. */
23510 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23511 {
23512 mbstate_t state;
23513 wchar_t wc;
23514
23515 memset (&state, '\0', sizeof (mbstate_t));
23516 if (mbrtowc (&wc, "", 1, &state) != 0)
23517 return 2;
23518 }
23519 return 0;
23520 }
23521 _ACEOF
23522 if ac_fn_c_try_run "$LINENO"; then :
23523 gl_cv_func_mbrtowc_nul_retval=yes
23524 else
23525 gl_cv_func_mbrtowc_nul_retval=no
23526 fi
23527 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23528 conftest.$ac_objext conftest.beam conftest.$ac_ext
23529 fi
23530
23531 fi
23532
23533 fi
23534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
23535 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
23536
23537
23538
23539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
23540 $as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; }
23541 if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then :
23542 $as_echo_n "(cached) " >&6
23543 else
23544
23545 case "$host_os" in
23546 # Guess yes on native Windows.
23547 mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
23548 *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
23549 esac
23550 case "$host_os" in
23551 mingw*)
23552 if test "$cross_compiling" = yes; then :
23553 :
23554 else
23555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23556 /* end confdefs.h. */
23557
23558 #include <locale.h>
23559 #include <string.h>
23560 #include <wchar.h>
23561 int main ()
23562 {
23563 int result = 0;
23564 if (setlocale (LC_ALL, "French_France.65001") != NULL)
23565 {
23566 wchar_t wc = (wchar_t) 0xBADFACE;
23567 mbstate_t state;
23568
23569 memset (&state, '\0', sizeof (mbstate_t));
23570 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
23571 && wc != (wchar_t) 0xBADFACE)
23572 result |= 1;
23573 }
23574 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
23575 {
23576 wchar_t wc = (wchar_t) 0xBADFACE;
23577 mbstate_t state;
23578
23579 memset (&state, '\0', sizeof (mbstate_t));
23580 if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
23581 && wc != (wchar_t) 0xBADFACE)
23582 result |= 2;
23583 }
23584 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
23585 {
23586 wchar_t wc = (wchar_t) 0xBADFACE;
23587 mbstate_t state;
23588
23589 memset (&state, '\0', sizeof (mbstate_t));
23590 if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
23591 && wc != (wchar_t) 0xBADFACE)
23592 result |= 4;
23593 }
23594 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
23595 {
23596 wchar_t wc = (wchar_t) 0xBADFACE;
23597 mbstate_t state;
23598
23599 memset (&state, '\0', sizeof (mbstate_t));
23600 if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
23601 && wc != (wchar_t) 0xBADFACE)
23602 result |= 8;
23603 }
23604 return result;
23605 }
23606 _ACEOF
23607 if ac_fn_c_try_run "$LINENO"; then :
23608 gl_cv_func_mbrtowc_stores_incomplete=no
23609 else
23610 gl_cv_func_mbrtowc_stores_incomplete=yes
23611 fi
23612 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23613 conftest.$ac_objext conftest.beam conftest.$ac_ext
23614 fi
23615
23616 ;;
23617 *)
23618
23619 if test $LOCALE_FR_UTF8 != none; then
23620 if test "$cross_compiling" = yes; then :
23621 :
23622 else
23623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23624 /* end confdefs.h. */
23625
23626 #include <locale.h>
23627 #include <string.h>
23628 #include <wchar.h>
23629 int main ()
23630 {
23631 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23632 {
23633 wchar_t wc = (wchar_t) 0xBADFACE;
23634 mbstate_t state;
23635
23636 memset (&state, '\0', sizeof (mbstate_t));
23637 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
23638 && wc != (wchar_t) 0xBADFACE)
23639 return 1;
23640 }
23641 return 0;
23642 }
23643 _ACEOF
23644 if ac_fn_c_try_run "$LINENO"; then :
23645 gl_cv_func_mbrtowc_stores_incomplete=no
23646 else
23647 gl_cv_func_mbrtowc_stores_incomplete=yes
23648 fi
23649 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23650 conftest.$ac_objext conftest.beam conftest.$ac_ext
23651 fi
23652
23653 fi
23654 ;;
23655 esac
23656
23657 fi
23658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
23659 $as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
23660
23661
23662
23663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
23664 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
23665 if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
23666 $as_echo_n "(cached) " >&6
23667 else
23668
23669 case "$host_os" in
23670 # Guess no on AIX and glibc systems.
23671 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
23672 # Guess yes on native Windows.
23673 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
23674 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
23675 esac
23676 if test "$cross_compiling" = yes; then :
23677 :
23678 else
23679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23680 /* end confdefs.h. */
23681
23682 #include <wchar.h>
23683 static wchar_t wc;
23684 static mbstate_t mbs;
23685 int
23686 main (void)
23687 {
23688 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
23689 }
23690 _ACEOF
23691 if ac_fn_c_try_run "$LINENO"; then :
23692 gl_cv_func_mbrtowc_empty_input=yes
23693 else
23694 gl_cv_func_mbrtowc_empty_input=no
23695 fi
23696 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23697 conftest.$ac_objext conftest.beam conftest.$ac_ext
23698 fi
23699
23700
23701 fi
23702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
23703 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
23704
23705
23706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
23707 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
23708 if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then :
23709 $as_echo_n "(cached) " >&6
23710 else
23711
23712 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
23713
23714 if test "$cross_compiling" = yes; then :
23715 case "$host_os" in
23716 # Guess yes on native Windows.
23717 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
23718 esac
23719
23720 else
23721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23722 /* end confdefs.h. */
23723 #include <limits.h>
23724 #include <locale.h>
23725 #include <wchar.h>
23726
23727 int
23728 main ()
23729 {
23730
23731 int i;
23732 char *locale = setlocale (LC_ALL, "C");
23733 if (! locale)
23734 return 2;
23735 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
23736 {
23737 char c = i;
23738 wchar_t wc;
23739 mbstate_t mbs = { 0, };
23740 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
23741 if (1 < ss)
23742 return 3;
23743 }
23744 return 0;
23745
23746 ;
23747 return 0;
23748 }
23749 _ACEOF
23750 if ac_fn_c_try_run "$LINENO"; then :
23751 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
23752 else
23753 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
23754 fi
23755 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23756 conftest.$ac_objext conftest.beam conftest.$ac_ext
23757 fi
23758
23759
23760 fi
23761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
23762 $as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
23763
23764 case "$gl_cv_func_mbrtowc_null_arg1" in
23765 *yes) ;;
23766 *)
23767 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
23768
23769 REPLACE_MBRTOWC=1
23770 ;;
23771 esac
23772 case "$gl_cv_func_mbrtowc_null_arg2" in
23773 *yes) ;;
23774 *)
23775 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
23776
23777 REPLACE_MBRTOWC=1
23778 ;;
23779 esac
23780 case "$gl_cv_func_mbrtowc_retval" in
23781 *yes) ;;
23782 *)
23783 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
23784
23785 REPLACE_MBRTOWC=1
23786 ;;
23787 esac
23788 case "$gl_cv_func_mbrtowc_nul_retval" in
23789 *yes) ;;
23790 *)
23791 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
23792
23793 REPLACE_MBRTOWC=1
23794 ;;
23795 esac
23796 case "$gl_cv_func_mbrtowc_stores_incomplete" in
23797 *no) ;;
23798 *)
23799 $as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
23800
23801 REPLACE_MBRTOWC=1
23802 ;;
23803 esac
23804 case "$gl_cv_func_mbrtowc_empty_input" in
23805 *yes) ;;
23806 *)
23807 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
23808
23809 REPLACE_MBRTOWC=1
23810 ;;
23811 esac
23812 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
23813 *yes) ;;
23814 *)
23815 $as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
23816
23817 REPLACE_MBRTOWC=1
23818 ;;
23819 esac
23820 fi
23821 fi
23822 if test $REPLACE_MBSTATE_T = 1; then
23823 case "$host_os" in
23824 mingw*) LIB_MBRTOWC= ;;
23825 *)
23826
23827
23828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
23829 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
23830 if ${gl_cv_have_weak+:} false; then :
23831 $as_echo_n "(cached) " >&6
23832 else
23833 gl_cv_have_weak=no
23834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23835 /* end confdefs.h. */
23836 extern void xyzzy ();
23837 #pragma weak xyzzy
23838 int
23839 main ()
23840 {
23841 xyzzy();
23842 ;
23843 return 0;
23844 }
23845 _ACEOF
23846 if ac_fn_c_try_link "$LINENO"; then :
23847 gl_cv_have_weak=maybe
23848 fi
23849 rm -f core conftest.err conftest.$ac_objext \
23850 conftest$ac_exeext conftest.$ac_ext
23851 if test $gl_cv_have_weak = maybe; then
23852 if test "$cross_compiling" = yes; then :
23853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23854 /* end confdefs.h. */
23855 #ifdef __ELF__
23856 Extensible Linking Format
23857 #endif
23858
23859 _ACEOF
23860 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23861 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
23862 gl_cv_have_weak="guessing yes"
23863 else
23864 gl_cv_have_weak="guessing no"
23865 fi
23866 rm -f conftest*
23867
23868
23869 else
23870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23871 /* end confdefs.h. */
23872
23873 #include <stdio.h>
23874 #pragma weak fputs
23875 int main ()
23876 {
23877 return (fputs == NULL);
23878 }
23879 _ACEOF
23880 if ac_fn_c_try_run "$LINENO"; then :
23881 gl_cv_have_weak=yes
23882 else
23883 gl_cv_have_weak=no
23884 fi
23885 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23886 conftest.$ac_objext conftest.beam conftest.$ac_ext
23887 fi
23888
23889 fi
23890 case " $LDFLAGS " in
23891 *" -static "*) gl_cv_have_weak=no ;;
23892 esac
23893 case "$gl_cv_have_weak" in
23894 *yes)
23895 case "$host_os" in
23896 freebsd* | dragonfly*)
23897 : > conftest1.c
23898 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
23899 cat <<EOF > conftest2.c
23900 #include <pthread.h>
23901 #pragma weak pthread_mutexattr_gettype
23902 int main ()
23903 {
23904 return (pthread_mutexattr_gettype != NULL);
23905 }
23906 EOF
23907 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
23908 || gl_cv_have_weak=no
23909 rm -f conftest1.c libempty.so conftest2.c conftest
23910 ;;
23911 esac
23912 ;;
23913 esac
23914
23915 fi
23916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
23917 $as_echo "$gl_cv_have_weak" >&6; }
23918 case "$gl_cv_have_weak" in
23919 *yes)
23920
23921 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
23922
23923 ;;
23924 esac
23925
23926 case "$gl_cv_have_weak" in
23927 *yes) LIB_MBRTOWC= ;;
23928 *) LIB_MBRTOWC="$LIBPTHREAD" ;;
23929 esac
23930 ;;
23931 esac
23932 else
23933 LIB_MBRTOWC=
23934 fi
23935
23936
23937 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
23938
23939
23940
23941
23942
23943
23944
23945
23946 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
23947
23948 if test $REPLACE_MBSTATE_T = 1; then
23949
23950
23951
23952
23953
23954
23955
23956
23957 gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967 gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
23968
23969
23970
23971
23972 CFLAG_VISIBILITY=
23973 HAVE_VISIBILITY=0
23974 if test -n "$GCC"; then
23975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
23976 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
23977 if ${gl_cv_cc_vis_werror+:} false; then :
23978 $as_echo_n "(cached) " >&6
23979 else
23980 gl_save_CFLAGS="$CFLAGS"
23981 CFLAGS="$CFLAGS -Werror"
23982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23983 /* end confdefs.h. */
23984
23985 int
23986 main ()
23987 {
23988
23989 ;
23990 return 0;
23991 }
23992 _ACEOF
23993 if ac_fn_c_try_compile "$LINENO"; then :
23994 gl_cv_cc_vis_werror=yes
23995 else
23996 gl_cv_cc_vis_werror=no
23997 fi
23998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23999 CFLAGS="$gl_save_CFLAGS"
24000
24001 fi
24002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
24003 $as_echo "$gl_cv_cc_vis_werror" >&6; }
24004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
24005 $as_echo_n "checking for simple visibility declarations... " >&6; }
24006 if ${gl_cv_cc_visibility+:} false; then :
24007 $as_echo_n "(cached) " >&6
24008 else
24009 gl_save_CFLAGS="$CFLAGS"
24010 CFLAGS="$CFLAGS -fvisibility=hidden"
24011 if test $gl_cv_cc_vis_werror = yes; then
24012 CFLAGS="$CFLAGS -Werror"
24013 fi
24014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24015 /* end confdefs.h. */
24016 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
24017 extern __attribute__((__visibility__("default"))) int exportedvar;
24018 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
24019 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
24020 void dummyfunc (void) {}
24021
24022 int
24023 main ()
24024 {
24025
24026 ;
24027 return 0;
24028 }
24029 _ACEOF
24030 if ac_fn_c_try_compile "$LINENO"; then :
24031 gl_cv_cc_visibility=yes
24032 else
24033 gl_cv_cc_visibility=no
24034 fi
24035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24036 CFLAGS="$gl_save_CFLAGS"
24037
24038 fi
24039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
24040 $as_echo "$gl_cv_cc_visibility" >&6; }
24041 if test $gl_cv_cc_visibility = yes; then
24042 CFLAG_VISIBILITY="-fvisibility=hidden"
24043 HAVE_VISIBILITY=1
24044 fi
24045 fi
24046
24047
24048
24049 cat >>confdefs.h <<_ACEOF
24050 #define HAVE_VISIBILITY $HAVE_VISIBILITY
24051 _ACEOF
24052
24053
24054
24055 fi
24056
24057
24058 :
24059
24060 fi
24061
24062
24063
24064
24065
24066 GNULIB_MBRTOWC=1
24067
24068
24069
24070
24071
24072 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088 if case "$host_os" in
24089 mingw*) true ;;
24090 *) test $ac_cv_func_mbsinit = yes ;;
24091 esac \
24092 && test $ac_cv_func_mbrtowc = yes; then
24093
24094
24095
24096
24097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24098 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24099 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24100 $as_echo_n "(cached) " >&6
24101 else
24102
24103 case "$host_os" in
24104 # Guess no on AIX and OSF/1.
24105 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24106 # Guess yes otherwise.
24107 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24108 esac
24109 if test $LOCALE_JA != none; then
24110 if test "$cross_compiling" = yes; then :
24111 :
24112 else
24113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24114 /* end confdefs.h. */
24115
24116 #include <locale.h>
24117 #include <string.h>
24118 #include <wchar.h>
24119 int main ()
24120 {
24121 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24122 {
24123 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24124 mbstate_t state;
24125 wchar_t wc;
24126
24127 memset (&state, '\0', sizeof (mbstate_t));
24128 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24129 if (mbsinit (&state))
24130 return 2;
24131 }
24132 return 0;
24133 }
24134 _ACEOF
24135 if ac_fn_c_try_run "$LINENO"; then :
24136 gl_cv_func_mbrtowc_incomplete_state=yes
24137 else
24138 gl_cv_func_mbrtowc_incomplete_state=no
24139 fi
24140 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24141 conftest.$ac_objext conftest.beam conftest.$ac_ext
24142 fi
24143
24144 else
24145 if test $LOCALE_FR_UTF8 != none; then
24146 if test "$cross_compiling" = yes; then :
24147 :
24148 else
24149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24150 /* end confdefs.h. */
24151
24152 #include <locale.h>
24153 #include <string.h>
24154 #include <wchar.h>
24155 int main ()
24156 {
24157 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24158 {
24159 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
24160 mbstate_t state;
24161 wchar_t wc;
24162
24163 memset (&state, '\0', sizeof (mbstate_t));
24164 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24165 if (mbsinit (&state))
24166 return 2;
24167 }
24168 return 0;
24169 }
24170 _ACEOF
24171 if ac_fn_c_try_run "$LINENO"; then :
24172 gl_cv_func_mbrtowc_incomplete_state=yes
24173 else
24174 gl_cv_func_mbrtowc_incomplete_state=no
24175 fi
24176 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24177 conftest.$ac_objext conftest.beam conftest.$ac_ext
24178 fi
24179
24180 fi
24181 fi
24182
24183 fi
24184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24185 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24186
24187
24188
24189
24190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24191 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
24192 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
24193 $as_echo_n "(cached) " >&6
24194 else
24195
24196 case "$host_os" in
24197 # Guess no on Solaris 8.
24198 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24199 # Guess yes otherwise.
24200 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24201 esac
24202 if test $LOCALE_ZH_CN != none; then
24203 if test "$cross_compiling" = yes; then :
24204 :
24205 else
24206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24207 /* end confdefs.h. */
24208
24209 #include <locale.h>
24210 #include <stdlib.h>
24211 #include <string.h>
24212 #include <wchar.h>
24213 int main ()
24214 {
24215 /* This fails on Solaris 8:
24216 mbrtowc returns 2, and sets wc to 0x00F0.
24217 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
24218 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24219 {
24220 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24221 mbstate_t state;
24222 wchar_t wc;
24223
24224 memset (&state, '\0', sizeof (mbstate_t));
24225 if (mbrtowc (&wc, input + 3, 6, &state) != 4
24226 && mbtowc (&wc, input + 3, 6) == 4)
24227 return 2;
24228 }
24229 return 0;
24230 }
24231 _ACEOF
24232 if ac_fn_c_try_run "$LINENO"; then :
24233 gl_cv_func_mbrtowc_sanitycheck=yes
24234 else
24235 gl_cv_func_mbrtowc_sanitycheck=no
24236 fi
24237 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24238 conftest.$ac_objext conftest.beam conftest.$ac_ext
24239 fi
24240
24241 fi
24242
24243 fi
24244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24245 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24246
24247 REPLACE_MBSTATE_T=0
24248 case "$gl_cv_func_mbrtowc_incomplete_state" in
24249 *yes) ;;
24250 *) REPLACE_MBSTATE_T=1 ;;
24251 esac
24252 case "$gl_cv_func_mbrtowc_sanitycheck" in
24253 *yes) ;;
24254 *) REPLACE_MBSTATE_T=1 ;;
24255 esac
24256 else
24257 REPLACE_MBSTATE_T=1
24258 fi
24259
24260
24261
24262 if test $ac_cv_func_mbsinit = no; then
24263 HAVE_MBSINIT=0
24264 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
24265 #include <wchar.h>
24266
24267 "
24268 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
24269 ac_have_decl=1
24270 else
24271 ac_have_decl=0
24272 fi
24273
24274 cat >>confdefs.h <<_ACEOF
24275 #define HAVE_DECL_MBSINIT $ac_have_decl
24276 _ACEOF
24277
24278 if test $ac_cv_have_decl_mbsinit = yes; then
24279 REPLACE_MBSINIT=1
24280 fi
24281 else
24282 if test $REPLACE_MBSTATE_T = 1; then
24283 REPLACE_MBSINIT=1
24284 else
24285 case "$host_os" in
24286 mingw*) REPLACE_MBSINIT=1 ;;
24287 esac
24288 fi
24289 fi
24290
24291 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
24292
24293
24294
24295
24296
24297
24298
24299
24300 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
24301
24302
24303 :
24304
24305 fi
24306
24307
24308
24309
24310
24311 GNULIB_MBSINIT=1
24312
24313
24314
24315
24316
24317 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332 if case "$host_os" in
24333 mingw*) true ;;
24334 *) test $ac_cv_func_mbsinit = yes ;;
24335 esac \
24336 && test $ac_cv_func_mbrtowc = yes; then
24337
24338
24339
24340
24341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24342 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24343 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24344 $as_echo_n "(cached) " >&6
24345 else
24346
24347 case "$host_os" in
24348 # Guess no on AIX and OSF/1.
24349 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24350 # Guess yes otherwise.
24351 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24352 esac
24353 if test $LOCALE_JA != none; then
24354 if test "$cross_compiling" = yes; then :
24355 :
24356 else
24357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24358 /* end confdefs.h. */
24359
24360 #include <locale.h>
24361 #include <string.h>
24362 #include <wchar.h>
24363 int main ()
24364 {
24365 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24366 {
24367 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24368 mbstate_t state;
24369 wchar_t wc;
24370
24371 memset (&state, '\0', sizeof (mbstate_t));
24372 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24373 if (mbsinit (&state))
24374 return 2;
24375 }
24376 return 0;
24377 }
24378 _ACEOF
24379 if ac_fn_c_try_run "$LINENO"; then :
24380 gl_cv_func_mbrtowc_incomplete_state=yes
24381 else
24382 gl_cv_func_mbrtowc_incomplete_state=no
24383 fi
24384 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24385 conftest.$ac_objext conftest.beam conftest.$ac_ext
24386 fi
24387
24388 else
24389 if test $LOCALE_FR_UTF8 != none; then
24390 if test "$cross_compiling" = yes; then :
24391 :
24392 else
24393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24394 /* end confdefs.h. */
24395
24396 #include <locale.h>
24397 #include <string.h>
24398 #include <wchar.h>
24399 int main ()
24400 {
24401 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24402 {
24403 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
24404 mbstate_t state;
24405 wchar_t wc;
24406
24407 memset (&state, '\0', sizeof (mbstate_t));
24408 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24409 if (mbsinit (&state))
24410 return 2;
24411 }
24412 return 0;
24413 }
24414 _ACEOF
24415 if ac_fn_c_try_run "$LINENO"; then :
24416 gl_cv_func_mbrtowc_incomplete_state=yes
24417 else
24418 gl_cv_func_mbrtowc_incomplete_state=no
24419 fi
24420 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24421 conftest.$ac_objext conftest.beam conftest.$ac_ext
24422 fi
24423
24424 fi
24425 fi
24426
24427 fi
24428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24429 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24430
24431
24432
24433
24434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24435 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
24436 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
24437 $as_echo_n "(cached) " >&6
24438 else
24439
24440 case "$host_os" in
24441 # Guess no on Solaris 8.
24442 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24443 # Guess yes otherwise.
24444 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24445 esac
24446 if test $LOCALE_ZH_CN != none; then
24447 if test "$cross_compiling" = yes; then :
24448 :
24449 else
24450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24451 /* end confdefs.h. */
24452
24453 #include <locale.h>
24454 #include <stdlib.h>
24455 #include <string.h>
24456 #include <wchar.h>
24457 int main ()
24458 {
24459 /* This fails on Solaris 8:
24460 mbrtowc returns 2, and sets wc to 0x00F0.
24461 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
24462 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24463 {
24464 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24465 mbstate_t state;
24466 wchar_t wc;
24467
24468 memset (&state, '\0', sizeof (mbstate_t));
24469 if (mbrtowc (&wc, input + 3, 6, &state) != 4
24470 && mbtowc (&wc, input + 3, 6) == 4)
24471 return 2;
24472 }
24473 return 0;
24474 }
24475 _ACEOF
24476 if ac_fn_c_try_run "$LINENO"; then :
24477 gl_cv_func_mbrtowc_sanitycheck=yes
24478 else
24479 gl_cv_func_mbrtowc_sanitycheck=no
24480 fi
24481 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24482 conftest.$ac_objext conftest.beam conftest.$ac_ext
24483 fi
24484
24485 fi
24486
24487 fi
24488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24489 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24490
24491 REPLACE_MBSTATE_T=0
24492 case "$gl_cv_func_mbrtowc_incomplete_state" in
24493 *yes) ;;
24494 *) REPLACE_MBSTATE_T=1 ;;
24495 esac
24496 case "$gl_cv_func_mbrtowc_sanitycheck" in
24497 *yes) ;;
24498 *) REPLACE_MBSTATE_T=1 ;;
24499 esac
24500 else
24501 REPLACE_MBSTATE_T=1
24502 fi
24503
24504
24505
24506 if test $ac_cv_func_mbsrtowcs = no; then
24507 HAVE_MBSRTOWCS=0
24508 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
24509 #include <wchar.h>
24510
24511 "
24512 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
24513 ac_have_decl=1
24514 else
24515 ac_have_decl=0
24516 fi
24517
24518 cat >>confdefs.h <<_ACEOF
24519 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
24520 _ACEOF
24521
24522 if test $ac_cv_have_decl_mbsrtowcs = yes; then
24523 REPLACE_MBSRTOWCS=1
24524 fi
24525 else
24526 if test $REPLACE_MBSTATE_T = 1; then
24527 REPLACE_MBSRTOWCS=1
24528 else
24529
24530
24531
24532
24533
24534
24535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
24536 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
24537 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
24538 $as_echo_n "(cached) " >&6
24539 else
24540
24541 case "$host_os" in
24542 # Guess no on HP-UX, Solaris, mingw.
24543 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
24544 # Guess yes otherwise.
24545 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
24546 esac
24547 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || 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 <string.h>
24556 #include <wchar.h>
24557 int main ()
24558 {
24559 int result = 0;
24560 /* Test whether the function supports a NULL destination argument.
24561 This fails on native Windows. */
24562 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
24563 {
24564 const char input[] = "\337er";
24565 const char *src = input;
24566 mbstate_t state;
24567
24568 memset (&state, '\0', sizeof (mbstate_t));
24569 if (mbsrtowcs (NULL, &src, 1, &state) != 3
24570 || src != input)
24571 result |= 1;
24572 }
24573 /* Test whether the function works when started with a conversion state
24574 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
24575 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24576 {
24577 const char input[] = "B\303\274\303\237er";
24578 mbstate_t state;
24579
24580 memset (&state, '\0', sizeof (mbstate_t));
24581 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
24582 if (!mbsinit (&state))
24583 {
24584 const char *src = input + 2;
24585 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
24586 result |= 2;
24587 }
24588 }
24589 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24590 {
24591 const char input[] = "<\306\374\313\334\270\354>";
24592 mbstate_t state;
24593
24594 memset (&state, '\0', sizeof (mbstate_t));
24595 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
24596 if (!mbsinit (&state))
24597 {
24598 const char *src = input + 4;
24599 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
24600 result |= 4;
24601 }
24602 }
24603 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24604 {
24605 const char input[] = "B\250\271\201\060\211\070er";
24606 mbstate_t state;
24607
24608 memset (&state, '\0', sizeof (mbstate_t));
24609 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
24610 if (!mbsinit (&state))
24611 {
24612 const char *src = input + 2;
24613 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
24614 result |= 8;
24615 }
24616 }
24617 return result;
24618 }
24619 _ACEOF
24620 if ac_fn_c_try_run "$LINENO"; then :
24621 gl_cv_func_mbsrtowcs_works=yes
24622 else
24623 gl_cv_func_mbsrtowcs_works=no
24624 fi
24625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24626 conftest.$ac_objext conftest.beam conftest.$ac_ext
24627 fi
24628
24629 fi
24630
24631 fi
24632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
24633 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
24634
24635 case "$gl_cv_func_mbsrtowcs_works" in
24636 *yes) ;;
24637 *) REPLACE_MBSRTOWCS=1 ;;
24638 esac
24639 fi
24640 fi
24641
24642 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
24643
24644
24645
24646
24647
24648
24649
24650
24651 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
24662
24663
24664 :
24665
24666 fi
24667
24668
24669
24670
24671
24672 GNULIB_MBSRTOWCS=1
24673
24674
24675
24676
24677
24678 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
24679
24680
24681
24682
24683
24684
24685 for ac_func in mbtowc
24686 do :
24687 ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
24688 if test "x$ac_cv_func_mbtowc" = xyes; then :
24689 cat >>confdefs.h <<_ACEOF
24690 #define HAVE_MBTOWC 1
24691 _ACEOF
24692
24693 fi
24694 done
24695
24696 if test $ac_cv_func_mbtowc = no; then
24697 HAVE_MBTOWC=0
24698 else
24699 if false; then
24700 REPLACE_MBTOWC=1
24701 fi
24702 fi
24703
24704 if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
24705
24706
24707
24708
24709
24710
24711
24712
24713 gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
24714
24715
24716 :
24717
24718 fi
24719
24720
24721
24722
24723
24724 GNULIB_MBTOWC=1
24725
24726
24727
24728
24729
24730 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
24731
24732
24733
24734
24735 if test $REPLACE_MEMCHR = 1; then
24736
24737
24738
24739
24740
24741
24742
24743
24744 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
24745
24746
24747 for ac_header in bp-sym.h
24748 do :
24749 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
24750 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
24751 cat >>confdefs.h <<_ACEOF
24752 #define HAVE_BP_SYM_H 1
24753 _ACEOF
24754
24755 fi
24756
24757 done
24758
24759
24760 fi
24761
24762
24763
24764
24765
24766 GNULIB_MEMCHR=1
24767
24768
24769
24770
24771
24772 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
24773
24774
24775
24776
24777
24778 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
24779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
24780 $as_echo_n "checking whether memmem works in linear time... " >&6; }
24781 if ${gl_cv_func_memmem_works_fast+:} false; then :
24782 $as_echo_n "(cached) " >&6
24783 else
24784 if test "$cross_compiling" = yes; then :
24785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24786 /* end confdefs.h. */
24787
24788 #include <features.h>
24789 #ifdef __GNU_LIBRARY__
24790 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
24791 && !defined __UCLIBC__
24792 Lucky user
24793 #endif
24794 #endif
24795 #ifdef __CYGWIN__
24796 #include <cygwin/version.h>
24797 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
24798 Lucky user
24799 #endif
24800 #endif
24801
24802 _ACEOF
24803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24804 $EGREP "Lucky user" >/dev/null 2>&1; then :
24805 gl_cv_func_memmem_works_fast="guessing yes"
24806 else
24807 gl_cv_func_memmem_works_fast="$gl_cross_guess_normal"
24808 fi
24809 rm -f conftest*
24810
24811
24812 else
24813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24814 /* end confdefs.h. */
24815
24816 #include <signal.h> /* for signal */
24817 #include <string.h> /* for memmem */
24818 #include <stdlib.h> /* for malloc */
24819 #include <unistd.h> /* for alarm */
24820 static void quit (int sig) { _exit (sig + 128); }
24821
24822 int
24823 main ()
24824 {
24825
24826 int result = 0;
24827 size_t m = 1000000;
24828 char *haystack = (char *) malloc (2 * m + 1);
24829 char *needle = (char *) malloc (m + 1);
24830 /* Failure to compile this test due to missing alarm is okay,
24831 since all such platforms (mingw) also lack memmem. */
24832 signal (SIGALRM, quit);
24833 alarm (5);
24834 /* Check for quadratic performance. */
24835 if (haystack && needle)
24836 {
24837 memset (haystack, 'A', 2 * m);
24838 haystack[2 * m] = 'B';
24839 memset (needle, 'A', m);
24840 needle[m] = 'B';
24841 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
24842 result |= 1;
24843 }
24844 /* Free allocated memory, in case some sanitizer is watching. */
24845 free (haystack);
24846 free (needle);
24847 return result;
24848
24849 ;
24850 return 0;
24851 }
24852 _ACEOF
24853 if ac_fn_c_try_run "$LINENO"; then :
24854 gl_cv_func_memmem_works_fast=yes
24855 else
24856 gl_cv_func_memmem_works_fast=no
24857 fi
24858 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24859 conftest.$ac_objext conftest.beam conftest.$ac_ext
24860 fi
24861
24862
24863 fi
24864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
24865 $as_echo "$gl_cv_func_memmem_works_fast" >&6; }
24866 case "$gl_cv_func_memmem_works_fast" in
24867 *yes) ;;
24868 *)
24869 REPLACE_MEMMEM=1
24870 ;;
24871 esac
24872 fi
24873
24874 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
24875
24876
24877
24878
24879
24880
24881
24882
24883 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
24884
24885 fi
24886
24887
24888
24889
24890 for ac_func in memmem
24891 do :
24892 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
24893 if test "x$ac_cv_func_memmem" = xyes; then :
24894 cat >>confdefs.h <<_ACEOF
24895 #define HAVE_MEMMEM 1
24896 _ACEOF
24897
24898 fi
24899 done
24900
24901 if test $ac_cv_func_memmem = yes; then
24902 HAVE_MEMMEM=1
24903 else
24904 HAVE_MEMMEM=0
24905 fi
24906
24907 if test $ac_cv_have_decl_memmem = no; then
24908 HAVE_DECL_MEMMEM=0
24909 else
24910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
24911 $as_echo_n "checking whether memmem works... " >&6; }
24912 if ${gl_cv_func_memmem_works_always+:} false; then :
24913 $as_echo_n "(cached) " >&6
24914 else
24915 if test "$cross_compiling" = yes; then :
24916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24917 /* end confdefs.h. */
24918
24919 #ifdef __GNU_LIBRARY__
24920 #include <features.h>
24921 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
24922 || __GLIBC_MINOR__ > 12)) \
24923 || (__GLIBC__ > 2)) \
24924 || defined __UCLIBC__
24925 Lucky user
24926 #endif
24927 #elif defined __CYGWIN__
24928 #include <cygwin/version.h>
24929 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
24930 Lucky user
24931 #endif
24932 #else
24933 Lucky user
24934 #endif
24935
24936 _ACEOF
24937 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24938 $EGREP "Lucky user" >/dev/null 2>&1; then :
24939 gl_cv_func_memmem_works_always="guessing yes"
24940 else
24941 gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
24942 fi
24943 rm -f conftest*
24944
24945
24946 else
24947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24948 /* end confdefs.h. */
24949
24950 #include <string.h> /* for memmem */
24951 #define P "_EF_BF_BD"
24952 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
24953 #define NEEDLE P P P P P
24954
24955 int
24956 main ()
24957 {
24958
24959 int result = 0;
24960 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
24961 result |= 1;
24962 /* Check for empty needle behavior. */
24963 {
24964 const char *haystack = "AAA";
24965 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
24966 result |= 2;
24967 }
24968 return result;
24969
24970 ;
24971 return 0;
24972 }
24973 _ACEOF
24974 if ac_fn_c_try_run "$LINENO"; then :
24975 gl_cv_func_memmem_works_always=yes
24976 else
24977 gl_cv_func_memmem_works_always=no
24978 fi
24979 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24980 conftest.$ac_objext conftest.beam conftest.$ac_ext
24981 fi
24982
24983
24984 fi
24985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
24986 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
24987 case "$gl_cv_func_memmem_works_always" in
24988 *yes) ;;
24989 *)
24990 REPLACE_MEMMEM=1
24991 ;;
24992 esac
24993 fi
24994 :
24995
24996 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
24997
24998
24999
25000
25001
25002
25003
25004
25005 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
25006
25007 fi
25008
25009
25010
25011
25012
25013 GNULIB_MEMMEM=1
25014
25015
25016
25017
25018
25019 $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029 for ac_func in mempcpy
25030 do :
25031 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
25032 if test "x$ac_cv_func_mempcpy" = xyes; then :
25033 cat >>confdefs.h <<_ACEOF
25034 #define HAVE_MEMPCPY 1
25035 _ACEOF
25036
25037 fi
25038 done
25039
25040 if test $ac_cv_func_mempcpy = no; then
25041 HAVE_MEMPCPY=0
25042 fi
25043
25044 if test $HAVE_MEMPCPY = 0; then
25045
25046
25047
25048
25049
25050
25051
25052
25053 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
25054
25055
25056 :
25057
25058 fi
25059
25060
25061
25062
25063
25064 GNULIB_MEMPCPY=1
25065
25066
25067
25068
25069
25070 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
25071
25072
25073
25074
25075
25076
25077
25078
25079 if test $ac_cv_have_decl_memrchr = no; then
25080 HAVE_DECL_MEMRCHR=0
25081 fi
25082
25083 for ac_func in memrchr
25084 do :
25085 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
25086 if test "x$ac_cv_func_memrchr" = xyes; then :
25087 cat >>confdefs.h <<_ACEOF
25088 #define HAVE_MEMRCHR 1
25089 _ACEOF
25090
25091 fi
25092 done
25093
25094
25095 if test $ac_cv_func_memrchr = no; then
25096
25097
25098
25099
25100
25101
25102
25103
25104 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
25105
25106 :
25107 fi
25108
25109
25110
25111
25112
25113 GNULIB_MEMRCHR=1
25114
25115
25116
25117
25118
25119 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
25120
25121
25122
25123
25124
25125
25126
25127
25128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
25129 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
25130 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
25131 $as_echo_n "(cached) " >&6
25132 else
25133 rm -rf conftest.dir
25134 if test "$cross_compiling" = yes; then :
25135 case "$host_os" in
25136 # Guess yes on Linux systems.
25137 linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
25138 # Guess yes on glibc systems.
25139 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
25140 # Guess yes on MSVC, no on mingw.
25141 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25142 /* end confdefs.h. */
25143
25144 #ifdef _MSC_VER
25145 Known
25146 #endif
25147
25148 _ACEOF
25149 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25150 $EGREP "Known" >/dev/null 2>&1; then :
25151 gl_cv_func_mkdir_trailing_slash_works="guessing yes"
25152 else
25153 gl_cv_func_mkdir_trailing_slash_works="guessing no"
25154 fi
25155 rm -f conftest*
25156
25157 ;;
25158 # If we don't know, obey --enable-cross-guesses.
25159 *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
25160 esac
25161
25162 else
25163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25164 /* end confdefs.h. */
25165
25166 #include <sys/types.h>
25167 #include <sys/stat.h>
25168
25169
25170 $gl_mda_defines
25171
25172 int
25173 main ()
25174 {
25175 return mkdir ("conftest.dir/", 0700);
25176 ;
25177 return 0;
25178 }
25179 _ACEOF
25180 if ac_fn_c_try_run "$LINENO"; then :
25181 gl_cv_func_mkdir_trailing_slash_works=yes
25182 else
25183 gl_cv_func_mkdir_trailing_slash_works=no
25184 fi
25185 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25186 conftest.$ac_objext conftest.beam conftest.$ac_ext
25187 fi
25188
25189 rm -rf conftest.dir
25190
25191 fi
25192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
25193 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
25194 case "$gl_cv_func_mkdir_trailing_slash_works" in
25195 *yes) ;;
25196 *)
25197 REPLACE_MKDIR=1
25198 ;;
25199 esac
25200
25201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
25202 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
25203 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
25204 $as_echo_n "(cached) " >&6
25205 else
25206 rm -rf conftest.dir
25207 if test "$cross_compiling" = yes; then :
25208 case "$host_os" in
25209 # Guess yes on glibc systems.
25210 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
25211 # Guess yes on musl systems.
25212 *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
25213 # Guess no on native Windows.
25214 mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
25215 # If we don't know, obey --enable-cross-guesses.
25216 *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
25217 esac
25218
25219 else
25220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25221 /* end confdefs.h. */
25222
25223 #include <sys/types.h>
25224 #include <sys/stat.h>
25225
25226
25227 $gl_mda_defines
25228
25229 int
25230 main ()
25231 {
25232 return !mkdir ("conftest.dir/./", 0700);
25233 ;
25234 return 0;
25235 }
25236 _ACEOF
25237 if ac_fn_c_try_run "$LINENO"; then :
25238 gl_cv_func_mkdir_trailing_dot_works=yes
25239 else
25240 gl_cv_func_mkdir_trailing_dot_works=no
25241 fi
25242 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25243 conftest.$ac_objext conftest.beam conftest.$ac_ext
25244 fi
25245
25246 rm -rf conftest.dir
25247
25248
25249 fi
25250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
25251 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
25252 case "$gl_cv_func_mkdir_trailing_dot_works" in
25253 *yes) ;;
25254 *)
25255 REPLACE_MKDIR=1
25256
25257 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
25258
25259 ;;
25260 esac
25261
25262 if test $REPLACE_MKDIR = 1; then
25263
25264
25265
25266
25267
25268
25269
25270
25271 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
25272
25273 fi
25274
25275
25276
25277
25278
25279 GNULIB_MKDIR=1
25280
25281
25282
25283
25284
25285 $as_echo "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
25286
25287
25288
25289
25290
25291 for ac_func in mkdtemp
25292 do :
25293 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
25294 if test "x$ac_cv_func_mkdtemp" = xyes; then :
25295 cat >>confdefs.h <<_ACEOF
25296 #define HAVE_MKDTEMP 1
25297 _ACEOF
25298
25299 fi
25300 done
25301
25302 if test $ac_cv_func_mkdtemp = no; then
25303 HAVE_MKDTEMP=0
25304 fi
25305
25306 if test $HAVE_MKDTEMP = 0; then
25307
25308
25309
25310
25311
25312
25313
25314
25315 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
25316
25317 :
25318
25319 fi
25320
25321
25322
25323
25324
25325 GNULIB_MKDTEMP=1
25326
25327
25328
25329
25330
25331 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341 if test $ac_cv_func_mkostemp != yes; then
25342 HAVE_MKOSTEMP=0
25343 fi
25344
25345 if test $HAVE_MKOSTEMP = 0; then
25346
25347
25348
25349
25350
25351
25352
25353
25354 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
25355
25356
25357
25358 fi
25359
25360
25361 cat >>confdefs.h <<_ACEOF
25362 #define GNULIB_MKOSTEMP 1
25363 _ACEOF
25364
25365
25366
25367
25368
25369
25370
25371 GNULIB_MKOSTEMP=1
25372
25373
25374
25375
25376
25377 $as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
25378
25379
25380
25381
25382 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25383
25384
25385
25386
25387
25388
25389
25390
25391 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
25392
25393 fi
25394
25395 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25396
25397
25398
25399
25400
25401
25402
25403
25404 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
25405
25406 fi
25407
25408
25409 cat >>confdefs.h <<_ACEOF
25410 #define GNULIB_MSVC_NOTHROW 1
25411 _ACEOF
25412
25413
25414
25415
25416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
25417 $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
25418 if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
25419 $as_echo_n "(cached) " >&6
25420 else
25421
25422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25423 /* end confdefs.h. */
25424 #include <netinet/in.h>
25425 int
25426 main ()
25427 {
25428
25429 ;
25430 return 0;
25431 }
25432 _ACEOF
25433 if ac_fn_c_try_compile "$LINENO"; then :
25434 gl_cv_header_netinet_in_h_selfcontained=yes
25435 else
25436 gl_cv_header_netinet_in_h_selfcontained=no
25437 fi
25438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25439
25440 fi
25441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
25442 $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
25443 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
25444 NETINET_IN_H=''
25445 else
25446 NETINET_IN_H='netinet/in.h'
25447 for ac_header in netinet/in.h
25448 do :
25449 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
25450 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
25451 cat >>confdefs.h <<_ACEOF
25452 #define HAVE_NETINET_IN_H 1
25453 _ACEOF
25454
25455 fi
25456
25457 done
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468 if test $gl_cv_have_include_next = yes; then
25469 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
25470 else
25471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
25472 $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
25473 if ${gl_cv_next_netinet_in_h+:} false; then :
25474 $as_echo_n "(cached) " >&6
25475 else
25476
25477 if test $ac_cv_header_netinet_in_h = yes; then
25478
25479
25480
25481
25482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25483 /* end confdefs.h. */
25484 #include <netinet/in.h>
25485 _ACEOF
25486 case "$host_os" in
25487 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25488 *) gl_absname_cpp="$ac_cpp" ;;
25489 esac
25490
25491 case "$host_os" in
25492 mingw*)
25493 gl_dirsep_regex='[/\\]'
25494 ;;
25495 *)
25496 gl_dirsep_regex='\/'
25497 ;;
25498 esac
25499 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25500 gl_header_literal_regex=`echo 'netinet/in.h' \
25501 | sed -e "$gl_make_literal_regex_sed"`
25502 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25503 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25504 s|^/[^/]|//&|
25505 p
25506 q
25507 }'
25508
25509 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25510 sed -n "$gl_absolute_header_sed"`
25511
25512 gl_header=$gl_cv_absolute_netinet_in_h
25513 gl_cv_next_netinet_in_h='"'$gl_header'"'
25514 else
25515 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
25516 fi
25517
25518
25519 fi
25520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
25521 $as_echo "$gl_cv_next_netinet_in_h" >&6; }
25522 fi
25523 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
25524
25525 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25526 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25527 gl_next_as_first_directive='<'netinet/in.h'>'
25528 else
25529 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25530 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
25531 fi
25532 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
25533
25534
25535
25536
25537 if test $ac_cv_header_netinet_in_h = yes; then
25538 HAVE_NETINET_IN_H=1
25539 else
25540 HAVE_NETINET_IN_H=0
25541 fi
25542
25543 fi
25544
25545 if test -n "$NETINET_IN_H"; then
25546 GL_GENERATE_NETINET_IN_H_TRUE=
25547 GL_GENERATE_NETINET_IN_H_FALSE='#'
25548 else
25549 GL_GENERATE_NETINET_IN_H_TRUE='#'
25550 GL_GENERATE_NETINET_IN_H_FALSE=
25551 fi
25552
25553
25554
25555
25556
25557
25558 case "$host_os" in
25559 mingw* | pw*)
25560 REPLACE_OPEN=1
25561 ;;
25562 *)
25563
25564 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
25565 REPLACE_OPEN=1
25566 fi
25567
25568
25569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
25570 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
25571 if ${gl_cv_func_open_slash+:} false; then :
25572 $as_echo_n "(cached) " >&6
25573 else
25574 # Assume that if we have lstat, we can also check symlinks.
25575 if test $ac_cv_func_lstat = yes; then
25576 touch conftest.tmp
25577 ln -s conftest.tmp conftest.lnk
25578 fi
25579 if test "$cross_compiling" = yes; then :
25580
25581 case "$host_os" in
25582 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
25583 gl_cv_func_open_slash="guessing no" ;;
25584 *)
25585 gl_cv_func_open_slash="guessing yes" ;;
25586 esac
25587
25588 else
25589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25590 /* end confdefs.h. */
25591
25592 #include <fcntl.h>
25593 #if HAVE_UNISTD_H
25594 # include <unistd.h>
25595 #endif
25596
25597
25598 $gl_mda_defines
25599
25600 int main ()
25601 {
25602 int result = 0;
25603 #if HAVE_LSTAT
25604 if (open ("conftest.lnk/", O_RDONLY) != -1)
25605 result |= 1;
25606 #endif
25607 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
25608 result |= 2;
25609 return result;
25610 }
25611 _ACEOF
25612 if ac_fn_c_try_run "$LINENO"; then :
25613 gl_cv_func_open_slash=yes
25614 else
25615 gl_cv_func_open_slash=no
25616 fi
25617 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25618 conftest.$ac_objext conftest.beam conftest.$ac_ext
25619 fi
25620
25621 rm -f conftest.sl conftest.tmp conftest.lnk
25622
25623 fi
25624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
25625 $as_echo "$gl_cv_func_open_slash" >&6; }
25626 case "$gl_cv_func_open_slash" in
25627 *no)
25628
25629 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
25630
25631 ;;
25632 esac
25633
25634 case "$gl_cv_func_open_slash" in
25635 *no)
25636 REPLACE_OPEN=1
25637 ;;
25638 esac
25639 ;;
25640 esac
25641
25642 if test $REPLACE_OPEN = 0; then
25643
25644
25645
25646 if test $ac_cv_func_fchdir = no; then
25647 HAVE_FCHDIR=0
25648 fi
25649
25650 if test $HAVE_FCHDIR = 0; then
25651 REPLACE_OPEN=1
25652 fi
25653 fi
25654
25655
25656
25657 if test $REPLACE_OPEN = 1; then
25658
25659
25660
25661
25662
25663
25664
25665
25666 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
25667
25668
25669
25670 :
25671
25672 fi
25673
25674
25675
25676
25677
25678 GNULIB_OPEN=1
25679
25680
25681
25682
25683
25684 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
25695 yes+*yes+yes)
25696 ;;
25697 yes+*)
25698 # Solaris 10 lacks O_CLOEXEC.
25699 # Solaris 9 has *at functions, but uniformly mishandles trailing
25700 # slash in all of them.
25701 REPLACE_OPENAT=1
25702 ;;
25703 *)
25704 HAVE_OPENAT=0
25705 ;;
25706 esac
25707
25708 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
25709
25710
25711
25712
25713
25714
25715
25716
25717 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
25718
25719
25720
25721 :
25722
25723 fi
25724
25725
25726 cat >>confdefs.h <<_ACEOF
25727 #define GNULIB_OPENAT 1
25728 _ACEOF
25729
25730
25731
25732
25733
25734
25735 GNULIB_OPENAT=1
25736
25737
25738
25739
25740
25741 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
25742
25743
25744
25745
25746
25747
25748 for ac_func in opendir
25749 do :
25750 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
25751 if test "x$ac_cv_func_opendir" = xyes; then :
25752 cat >>confdefs.h <<_ACEOF
25753 #define HAVE_OPENDIR 1
25754 _ACEOF
25755
25756 fi
25757 done
25758
25759 if test $ac_cv_func_opendir = no; then
25760 HAVE_OPENDIR=0
25761 fi
25762
25763
25764
25765
25766 if test $ac_cv_func_fchdir = no; then
25767 HAVE_FCHDIR=0
25768 fi
25769
25770 if test $HAVE_FCHDIR = 0; then
25771 if test $HAVE_OPENDIR = 1; then
25772 REPLACE_OPENDIR=1
25773 fi
25774 fi
25775
25776 case $host_os,$HAVE_OPENDIR in
25777 os2*,1)
25778 REPLACE_OPENDIR=1;;
25779 esac
25780
25781 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
25782
25783
25784
25785
25786
25787
25788
25789
25790 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
25791
25792 fi
25793
25794
25795
25796
25797
25798 GNULIB_OPENDIR=1
25799
25800
25801
25802
25803
25804 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815 if test $ac_cv_func_pipe != yes; then
25816 HAVE_PIPE=0
25817 fi
25818
25819 if test $HAVE_PIPE = 0; then
25820
25821
25822
25823
25824
25825
25826
25827
25828 gl_LIBOBJS="$gl_LIBOBJS pipe.$ac_objext"
25829
25830 fi
25831
25832
25833
25834
25835
25836 GNULIB_PIPE=1
25837
25838
25839
25840
25841
25842 $as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h
25843
25844
25845
25846
25847
25848
25849
25850 for ac_func in rawmemchr
25851 do :
25852 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
25853 if test "x$ac_cv_func_rawmemchr" = xyes; then :
25854 cat >>confdefs.h <<_ACEOF
25855 #define HAVE_RAWMEMCHR 1
25856 _ACEOF
25857
25858 fi
25859 done
25860
25861 if test $ac_cv_func_rawmemchr = no; then
25862 HAVE_RAWMEMCHR=0
25863 fi
25864
25865 if test $HAVE_RAWMEMCHR = 0; then
25866
25867
25868
25869
25870
25871
25872
25873
25874 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
25875
25876 :
25877 fi
25878
25879
25880
25881
25882
25883 GNULIB_RAWMEMCHR=1
25884
25885
25886
25887
25888
25889 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
25890
25891
25892
25893
25894
25895
25896 for ac_func in readdir
25897 do :
25898 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
25899 if test "x$ac_cv_func_readdir" = xyes; then :
25900 cat >>confdefs.h <<_ACEOF
25901 #define HAVE_READDIR 1
25902 _ACEOF
25903
25904 fi
25905 done
25906
25907 if test $ac_cv_func_readdir = no; then
25908 HAVE_READDIR=0
25909 fi
25910
25911 if test $HAVE_READDIR = 0; then
25912
25913
25914
25915
25916
25917
25918
25919
25920 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
25921
25922 fi
25923
25924
25925
25926
25927
25928 GNULIB_READDIR=1
25929
25930
25931
25932
25933
25934 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
25935
25936
25937
25938
25939
25940
25941 if test $ac_cv_func_readlink = no; then
25942 HAVE_READLINK=0
25943 else
25944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25945 $as_echo_n "checking whether readlink signature is correct... " >&6; }
25946 if ${gl_cv_decl_readlink_works+:} false; then :
25947 $as_echo_n "(cached) " >&6
25948 else
25949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25950 /* end confdefs.h. */
25951 #include <unistd.h>
25952 /* Cause compilation failure if original declaration has wrong type. */
25953 ssize_t readlink (const char *, char *, size_t);
25954 int
25955 main ()
25956 {
25957
25958 ;
25959 return 0;
25960 }
25961 _ACEOF
25962 if ac_fn_c_try_compile "$LINENO"; then :
25963 gl_cv_decl_readlink_works=yes
25964 else
25965 gl_cv_decl_readlink_works=no
25966 fi
25967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25968 fi
25969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25970 $as_echo "$gl_cv_decl_readlink_works" >&6; }
25971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25972 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
25973 if ${gl_cv_func_readlink_trailing_slash+:} false; then :
25974 $as_echo_n "(cached) " >&6
25975 else
25976 # We have readlink, so assume ln -s works.
25977 ln -s conftest.no-such conftest.link
25978 ln -s conftest.link conftest.lnk2
25979 if test "$cross_compiling" = yes; then :
25980 case "$host_os" in
25981 # Guess yes on Linux or glibc systems.
25982 linux-* | linux | *-gnu* | gnu*)
25983 gl_cv_func_readlink_trailing_slash="guessing yes" ;;
25984 # Guess no on AIX or HP-UX.
25985 aix* | hpux*)
25986 gl_cv_func_readlink_trailing_slash="guessing no" ;;
25987 # If we don't know, obey --enable-cross-guesses.
25988 *)
25989 gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
25990 esac
25991
25992 else
25993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25994 /* end confdefs.h. */
25995 #include <unistd.h>
25996
25997 int
25998 main ()
25999 {
26000 char buf[20];
26001 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
26002 ;
26003 return 0;
26004 }
26005 _ACEOF
26006 if ac_fn_c_try_run "$LINENO"; then :
26007 gl_cv_func_readlink_trailing_slash=yes
26008 else
26009 gl_cv_func_readlink_trailing_slash=no
26010 fi
26011 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26012 conftest.$ac_objext conftest.beam conftest.$ac_ext
26013 fi
26014
26015 rm -f conftest.link conftest.lnk2
26016 fi
26017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
26018 $as_echo "$gl_cv_func_readlink_trailing_slash" >&6; }
26019 case "$gl_cv_func_readlink_trailing_slash" in
26020 *yes)
26021 if test "$gl_cv_decl_readlink_works" != yes; then
26022 REPLACE_READLINK=1
26023 fi
26024 ;;
26025 *)
26026
26027 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
26028
26029 REPLACE_READLINK=1
26030 ;;
26031 esac
26032
26033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
26034 $as_echo_n "checking whether readlink truncates results correctly... " >&6; }
26035 if ${gl_cv_func_readlink_truncate+:} false; then :
26036 $as_echo_n "(cached) " >&6
26037 else
26038 # We have readlink, so assume ln -s works.
26039 ln -s ab conftest.link
26040 if test "$cross_compiling" = yes; then :
26041 case "$host_os" in
26042 # Guess yes on Linux or glibc systems.
26043 linux-* | linux | *-gnu* | gnu*)
26044 gl_cv_func_readlink_truncate="guessing yes" ;;
26045 # Guess no on AIX or HP-UX.
26046 aix* | hpux*)
26047 gl_cv_func_readlink_truncate="guessing no" ;;
26048 # If we don't know, obey --enable-cross-guesses.
26049 *)
26050 gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
26051 esac
26052
26053 else
26054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26055 /* end confdefs.h. */
26056 #include <unistd.h>
26057
26058 int
26059 main ()
26060 {
26061 char c;
26062 return readlink ("conftest.link", &c, 1) != 1;
26063 ;
26064 return 0;
26065 }
26066 _ACEOF
26067 if ac_fn_c_try_run "$LINENO"; then :
26068 gl_cv_func_readlink_truncate=yes
26069 else
26070 gl_cv_func_readlink_truncate=no
26071 fi
26072 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26073 conftest.$ac_objext conftest.beam conftest.$ac_ext
26074 fi
26075
26076 rm -f conftest.link conftest.lnk2
26077 fi
26078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
26079 $as_echo "$gl_cv_func_readlink_truncate" >&6; }
26080 case $gl_cv_func_readlink_truncate in
26081 *yes)
26082 if test "$gl_cv_decl_readlink_works" != yes; then
26083 REPLACE_READLINK=1
26084 fi
26085 ;;
26086 *)
26087
26088 $as_echo "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
26089
26090 REPLACE_READLINK=1
26091 ;;
26092 esac
26093 fi
26094
26095 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
26096
26097
26098
26099
26100
26101
26102
26103
26104 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
26105
26106
26107 :
26108
26109 fi
26110
26111
26112
26113
26114
26115 GNULIB_READLINK=1
26116
26117
26118
26119
26120
26121 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
26122
26123
26124
26125
26126
26127
26128 if test $gl_cv_func_malloc_posix = yes; then
26129
26130 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
26131
26132 else
26133 REPLACE_REALLOC=1
26134 fi
26135
26136 if test $REPLACE_REALLOC = 1; then
26137
26138
26139
26140
26141
26142
26143
26144
26145 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
26146
26147 fi
26148
26149
26150
26151
26152
26153 GNULIB_REALLOC_POSIX=1
26154
26155
26156
26157
26158
26159 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
26160
26161
26162
26163
26164
26165
26166
26167
26168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
26169 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
26170 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
26171 $as_echo_n "(cached) " >&6
26172 else
26173 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
26174 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
26175 as_fn_error $? "cannot create temporary files" "$LINENO" 5
26176 # Assume that if we have lstat, we can also check symlinks.
26177 if test $ac_cv_func_lstat = yes; then
26178 ln -s conftest.f conftest.lnk
26179 fi
26180 if test "$cross_compiling" = yes; then :
26181 case "$host_os" in
26182 # Guess yes on Linux systems.
26183 linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
26184 # Guess yes on glibc systems.
26185 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
26186 # Guess no on native Windows.
26187 mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
26188 # If we don't know, obey --enable-cross-guesses.
26189 *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
26190 esac
26191
26192 else
26193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26194 /* end confdefs.h. */
26195
26196 # include <stdio.h>
26197 # include <stdlib.h>
26198
26199 int
26200 main ()
26201 {
26202 int result = 0;
26203 if (rename ("conftest.f1", "conftest.f2/") == 0)
26204 result |= 1;
26205 if (rename ("conftest.d1", "conftest.d2/") != 0)
26206 result |= 2;
26207 #if HAVE_LSTAT
26208 if (rename ("conftest.f", "conftest.lnk/") == 0)
26209 result |= 4;
26210 #endif
26211 return result;
26212
26213 ;
26214 return 0;
26215 }
26216 _ACEOF
26217 if ac_fn_c_try_run "$LINENO"; then :
26218 gl_cv_func_rename_slash_dst_works=yes
26219 else
26220 gl_cv_func_rename_slash_dst_works=no
26221 fi
26222 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26223 conftest.$ac_objext conftest.beam conftest.$ac_ext
26224 fi
26225
26226 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
26227
26228 fi
26229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
26230 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
26231 case "$gl_cv_func_rename_slash_dst_works" in
26232 *yes) ;;
26233 *)
26234 REPLACE_RENAME=1
26235
26236 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
26237
26238 ;;
26239 esac
26240
26241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
26242 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
26243 if ${gl_cv_func_rename_slash_src_works+:} false; then :
26244 $as_echo_n "(cached) " >&6
26245 else
26246 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
26247 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
26248 as_fn_error $? "cannot create temporary files" "$LINENO" 5
26249 # Assume that if we have lstat, we can also check symlinks.
26250 if test $ac_cv_func_lstat = yes; then
26251 ln -s conftest.f conftest.lnk
26252 fi
26253 if test "$cross_compiling" = yes; then :
26254 case "$host_os" in
26255 # Guess yes on Linux systems.
26256 linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
26257 # Guess yes on glibc systems.
26258 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
26259 # Guess yes on native Windows.
26260 mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
26261 # If we don't know, obey --enable-cross-guesses.
26262 *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
26263 esac
26264
26265 else
26266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26267 /* end confdefs.h. */
26268
26269 # include <stdio.h>
26270 # include <stdlib.h>
26271
26272 int
26273 main ()
26274 {
26275 int result = 0;
26276 if (rename ("conftest.f1/", "conftest.d3") == 0)
26277 result |= 1;
26278 if (rename ("conftest.d1/", "conftest.d2") != 0)
26279 result |= 2;
26280 #if HAVE_LSTAT
26281 if (rename ("conftest.lnk/", "conftest.f") == 0)
26282 result |= 4;
26283 #endif
26284 return result;
26285
26286 ;
26287 return 0;
26288 }
26289 _ACEOF
26290 if ac_fn_c_try_run "$LINENO"; then :
26291 gl_cv_func_rename_slash_src_works=yes
26292 else
26293 gl_cv_func_rename_slash_src_works=no
26294 fi
26295 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26296 conftest.$ac_objext conftest.beam conftest.$ac_ext
26297 fi
26298
26299 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
26300
26301 fi
26302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
26303 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
26304 case "$gl_cv_func_rename_slash_src_works" in
26305 *yes) ;;
26306 *)
26307 REPLACE_RENAME=1
26308
26309 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
26310
26311 ;;
26312 esac
26313
26314
26315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
26316 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
26317 if ${gl_cv_func_rename_link_works+:} false; then :
26318 $as_echo_n "(cached) " >&6
26319 else
26320 if test $ac_cv_func_link = yes; then
26321 if test $cross_compiling != yes; then
26322 rm -rf conftest.f conftest.f1 conftest.f2
26323 if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
26324 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
26325 if test "$cross_compiling" = yes; then :
26326 :
26327
26328 else
26329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26330 /* end confdefs.h. */
26331
26332 # include <errno.h>
26333 # include <stdio.h>
26334 # include <stdlib.h>
26335 # include <unistd.h>
26336
26337
26338 $gl_mda_defines
26339
26340 int
26341 main ()
26342 {
26343 int result = 0;
26344 if (rename ("conftest.f", "conftest.f1"))
26345 result |= 1;
26346 if (unlink ("conftest.f1"))
26347 result |= 2;
26348
26349 /* Allow either the POSIX-required behavior, where the
26350 previous rename kept conftest.f, or the (better) NetBSD
26351 behavior, where it removed conftest.f. */
26352 if (rename ("conftest.f", "conftest.f") != 0
26353 && errno != ENOENT)
26354 result |= 4;
26355
26356 if (rename ("conftest.f1", "conftest.f1") == 0)
26357 result |= 8;
26358 if (rename ("conftest.f2", "conftest.f2") != 0)
26359 result |= 16;
26360 return result;
26361
26362 ;
26363 return 0;
26364 }
26365 _ACEOF
26366 if ac_fn_c_try_run "$LINENO"; then :
26367 gl_cv_func_rename_link_works=yes
26368 else
26369 gl_cv_func_rename_link_works=no
26370 fi
26371 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26372 conftest.$ac_objext conftest.beam conftest.$ac_ext
26373 fi
26374
26375 else
26376 gl_cv_func_rename_link_works="guessing no"
26377 fi
26378 rm -rf conftest.f conftest.f1 conftest.f2
26379 else
26380 case "$host_os" in
26381 # Guess yes on Linux systems.
26382 linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
26383 # Guess yes on glibc systems.
26384 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
26385 # Guess yes on native Windows.
26386 mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
26387 # If we don't know, obey --enable-cross-guesses.
26388 *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
26389 esac
26390 fi
26391 else
26392 gl_cv_func_rename_link_works=yes
26393 fi
26394
26395 fi
26396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
26397 $as_echo "$gl_cv_func_rename_link_works" >&6; }
26398 case "$gl_cv_func_rename_link_works" in
26399 *yes) ;;
26400 *)
26401 REPLACE_RENAME=1
26402
26403 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
26404
26405 ;;
26406 esac
26407
26408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
26409 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
26410 if ${gl_cv_func_rename_dest_works+:} false; then :
26411 $as_echo_n "(cached) " >&6
26412 else
26413 rm -rf conftest.f conftest.d1 conftest.d2
26414 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
26415 as_fn_error $? "cannot create temporary files" "$LINENO" 5
26416 if test "$cross_compiling" = yes; then :
26417 case "$host_os" in
26418 # Guess yes on Linux systems.
26419 linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
26420 # Guess yes on glibc systems.
26421 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
26422 # Guess no on native Windows.
26423 mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
26424 # If we don't know, obey --enable-cross-guesses.
26425 *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
26426 esac
26427
26428 else
26429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26430 /* end confdefs.h. */
26431
26432 # include <stdio.h>
26433 # include <stdlib.h>
26434
26435 int
26436 main ()
26437 {
26438 int result = 0;
26439 if (rename ("conftest.d1", "conftest.d2") != 0)
26440 result |= 1;
26441 if (rename ("conftest.d2", "conftest.f") == 0)
26442 result |= 2;
26443 return result;
26444
26445 ;
26446 return 0;
26447 }
26448 _ACEOF
26449 if ac_fn_c_try_run "$LINENO"; then :
26450 gl_cv_func_rename_dest_works=yes
26451 else
26452 gl_cv_func_rename_dest_works=no
26453 fi
26454 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26455 conftest.$ac_objext conftest.beam conftest.$ac_ext
26456 fi
26457
26458 rm -rf conftest.f conftest.d1 conftest.d2
26459
26460 fi
26461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
26462 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
26463 case "$gl_cv_func_rename_dest_works" in
26464 *yes) ;;
26465 *)
26466 REPLACE_RENAME=1
26467
26468 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
26469
26470 ;;
26471 esac
26472
26473 if test $REPLACE_RENAME = 1; then
26474
26475
26476
26477
26478
26479
26480
26481
26482 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
26483
26484 fi
26485
26486
26487
26488
26489
26490 GNULIB_RENAME=1
26491
26492
26493
26494
26495
26496 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
26497
26498
26499
26500
26501
26502
26503 for ac_func in rewinddir
26504 do :
26505 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
26506 if test "x$ac_cv_func_rewinddir" = xyes; then :
26507 cat >>confdefs.h <<_ACEOF
26508 #define HAVE_REWINDDIR 1
26509 _ACEOF
26510
26511 fi
26512 done
26513
26514 if test $ac_cv_func_rewinddir = no; then
26515 HAVE_REWINDDIR=0
26516 fi
26517
26518 if test $HAVE_REWINDDIR = 0; then
26519
26520
26521
26522
26523
26524
26525
26526
26527 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
26528
26529 fi
26530
26531
26532
26533
26534
26535 GNULIB_REWINDDIR=1
26536
26537
26538
26539
26540
26541 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
26542
26543
26544
26545
26546
26547
26548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
26549 $as_echo_n "checking whether rmdir works... " >&6; }
26550 if ${gl_cv_func_rmdir_works+:} false; then :
26551 $as_echo_n "(cached) " >&6
26552 else
26553 mkdir conftest.dir
26554 touch conftest.file
26555 if test "$cross_compiling" = yes; then :
26556 case "$host_os" in
26557 # Guess yes on Linux systems.
26558 linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
26559 # Guess yes on glibc systems.
26560 *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
26561 # Guess no on native Windows.
26562 mingw*) gl_cv_func_rmdir_works="guessing no" ;;
26563 # If we don't know, obey --enable-cross-guesses.
26564 *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
26565 esac
26566
26567 else
26568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26569 /* end confdefs.h. */
26570 #include <stdio.h>
26571 #include <errno.h>
26572 #if HAVE_UNISTD_H
26573 # include <unistd.h>
26574 #else /* on Windows with MSVC */
26575 # include <direct.h>
26576 #endif
26577
26578
26579 $gl_mda_defines
26580
26581 int
26582 main ()
26583 {
26584 int result = 0;
26585 if (!rmdir ("conftest.file/"))
26586 result |= 1;
26587 else if (errno != ENOTDIR)
26588 result |= 2;
26589 if (!rmdir ("conftest.dir/./"))
26590 result |= 4;
26591 return result;
26592
26593 ;
26594 return 0;
26595 }
26596 _ACEOF
26597 if ac_fn_c_try_run "$LINENO"; then :
26598 gl_cv_func_rmdir_works=yes
26599 else
26600 gl_cv_func_rmdir_works=no
26601 fi
26602 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26603 conftest.$ac_objext conftest.beam conftest.$ac_ext
26604 fi
26605
26606 rm -rf conftest.dir conftest.file
26607 fi
26608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
26609 $as_echo "$gl_cv_func_rmdir_works" >&6; }
26610 case "$gl_cv_func_rmdir_works" in
26611 *yes) ;;
26612 *)
26613 REPLACE_RMDIR=1
26614 ;;
26615 esac
26616
26617 if test $REPLACE_RMDIR = 1; then
26618
26619
26620
26621
26622
26623
26624
26625
26626 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
26627
26628 fi
26629
26630
26631
26632
26633
26634 GNULIB_RMDIR=1
26635
26636
26637
26638
26639
26640 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
26641
26642
26643
26644
26645
26646
26647
26648
26649 if test $ac_cv_func_setenv = no; then
26650 HAVE_SETENV=0
26651 else
26652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
26653 $as_echo_n "checking whether setenv validates arguments... " >&6; }
26654 if ${gl_cv_func_setenv_works+:} false; then :
26655 $as_echo_n "(cached) " >&6
26656 else
26657 if test "$cross_compiling" = yes; then :
26658 case "$host_os" in
26659 # Guess yes on glibc systems.
26660 *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
26661 # Guess yes on musl systems.
26662 *-musl*) gl_cv_func_setenv_works="guessing yes" ;;
26663 # If we don't know, obey --enable-cross-guesses.
26664 *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
26665 esac
26666
26667 else
26668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26669 /* end confdefs.h. */
26670
26671 #include <stdlib.h>
26672 #include <errno.h>
26673 #include <string.h>
26674
26675 int
26676 main ()
26677 {
26678
26679 int result = 0;
26680 {
26681 if (setenv ("", "", 0) != -1)
26682 result |= 1;
26683 else if (errno != EINVAL)
26684 result |= 2;
26685 }
26686 {
26687 if (setenv ("a", "=", 1) != 0)
26688 result |= 4;
26689 else if (strcmp (getenv ("a"), "=") != 0)
26690 result |= 8;
26691 }
26692 return result;
26693
26694 ;
26695 return 0;
26696 }
26697 _ACEOF
26698 if ac_fn_c_try_run "$LINENO"; then :
26699 gl_cv_func_setenv_works=yes
26700 else
26701 gl_cv_func_setenv_works=no
26702 fi
26703 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26704 conftest.$ac_objext conftest.beam conftest.$ac_ext
26705 fi
26706
26707 fi
26708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
26709 $as_echo "$gl_cv_func_setenv_works" >&6; }
26710 case "$gl_cv_func_setenv_works" in
26711 *yes) ;;
26712 *)
26713 REPLACE_SETENV=1
26714 ;;
26715 esac
26716 fi
26717
26718 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
26719
26720
26721
26722
26723
26724
26725
26726
26727 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
26728
26729 fi
26730
26731
26732
26733
26734
26735 GNULIB_SETENV=1
26736
26737
26738
26739
26740
26741 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
26742
26743
26744
26745
26746
26747
26748
26749
26750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
26751 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
26752 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
26753 $as_echo_n "(cached) " >&6
26754 else
26755 case "$host_os" in
26756 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
26757 *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
26758 gl_cv_func_setlocale_null_all_mtsafe=no ;;
26759 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
26760 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
26761 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
26762 # If we don't know, obey --enable-cross-guesses.
26763 *)
26764 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
26765 esac
26766
26767 fi
26768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
26769 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
26770 case "$host_os" in
26771 mingw*) ;;
26772 *)
26773 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
26774 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
26775 fi
26776 ;;
26777 esac
26778 case "$gl_cv_func_setlocale_null_all_mtsafe" in
26779 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
26780 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
26781 esac
26782
26783 cat >>confdefs.h <<_ACEOF
26784 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
26785 _ACEOF
26786
26787
26788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
26789 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
26790 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
26791 $as_echo_n "(cached) " >&6
26792 else
26793 case "$host_os" in
26794 # Guess no on OpenBSD, AIX.
26795 openbsd* | aix*)
26796 gl_cv_func_setlocale_null_one_mtsafe=no ;;
26797 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
26798 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
26799 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
26800 # If we don't know, obey --enable-cross-guesses.
26801 *)
26802 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
26803 esac
26804
26805 fi
26806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
26807 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
26808 case "$host_os" in
26809 mingw*) ;;
26810 *)
26811 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
26812 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
26813 fi
26814 ;;
26815 esac
26816 case "$gl_cv_func_setlocale_null_one_mtsafe" in
26817 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
26818 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
26819 esac
26820
26821 cat >>confdefs.h <<_ACEOF
26822 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
26823 _ACEOF
26824
26825
26826 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
26827 case "$host_os" in
26828 mingw*) LIB_SETLOCALE_NULL= ;;
26829 *)
26830
26831
26832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
26833 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
26834 if ${gl_cv_have_weak+:} false; then :
26835 $as_echo_n "(cached) " >&6
26836 else
26837 gl_cv_have_weak=no
26838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26839 /* end confdefs.h. */
26840 extern void xyzzy ();
26841 #pragma weak xyzzy
26842 int
26843 main ()
26844 {
26845 xyzzy();
26846 ;
26847 return 0;
26848 }
26849 _ACEOF
26850 if ac_fn_c_try_link "$LINENO"; then :
26851 gl_cv_have_weak=maybe
26852 fi
26853 rm -f core conftest.err conftest.$ac_objext \
26854 conftest$ac_exeext conftest.$ac_ext
26855 if test $gl_cv_have_weak = maybe; then
26856 if test "$cross_compiling" = yes; then :
26857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26858 /* end confdefs.h. */
26859 #ifdef __ELF__
26860 Extensible Linking Format
26861 #endif
26862
26863 _ACEOF
26864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26865 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
26866 gl_cv_have_weak="guessing yes"
26867 else
26868 gl_cv_have_weak="guessing no"
26869 fi
26870 rm -f conftest*
26871
26872
26873 else
26874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26875 /* end confdefs.h. */
26876
26877 #include <stdio.h>
26878 #pragma weak fputs
26879 int main ()
26880 {
26881 return (fputs == NULL);
26882 }
26883 _ACEOF
26884 if ac_fn_c_try_run "$LINENO"; then :
26885 gl_cv_have_weak=yes
26886 else
26887 gl_cv_have_weak=no
26888 fi
26889 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26890 conftest.$ac_objext conftest.beam conftest.$ac_ext
26891 fi
26892
26893 fi
26894 case " $LDFLAGS " in
26895 *" -static "*) gl_cv_have_weak=no ;;
26896 esac
26897 case "$gl_cv_have_weak" in
26898 *yes)
26899 case "$host_os" in
26900 freebsd* | dragonfly*)
26901 : > conftest1.c
26902 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
26903 cat <<EOF > conftest2.c
26904 #include <pthread.h>
26905 #pragma weak pthread_mutexattr_gettype
26906 int main ()
26907 {
26908 return (pthread_mutexattr_gettype != NULL);
26909 }
26910 EOF
26911 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
26912 || gl_cv_have_weak=no
26913 rm -f conftest1.c libempty.so conftest2.c conftest
26914 ;;
26915 esac
26916 ;;
26917 esac
26918
26919 fi
26920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
26921 $as_echo "$gl_cv_have_weak" >&6; }
26922 case "$gl_cv_have_weak" in
26923 *yes)
26924
26925 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
26926
26927 ;;
26928 esac
26929
26930 case "$gl_cv_have_weak" in
26931 *yes) LIB_SETLOCALE_NULL= ;;
26932 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
26933 esac
26934 ;;
26935 esac
26936 else
26937 LIB_SETLOCALE_NULL=
26938 fi
26939
26940
26941 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
26942
26943
26944
26945
26946
26947
26948
26949
26950 gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
26951
26952
26953
26954
26955 CFLAG_VISIBILITY=
26956 HAVE_VISIBILITY=0
26957 if test -n "$GCC"; then
26958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
26959 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
26960 if ${gl_cv_cc_vis_werror+:} false; then :
26961 $as_echo_n "(cached) " >&6
26962 else
26963 gl_save_CFLAGS="$CFLAGS"
26964 CFLAGS="$CFLAGS -Werror"
26965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26966 /* end confdefs.h. */
26967
26968 int
26969 main ()
26970 {
26971
26972 ;
26973 return 0;
26974 }
26975 _ACEOF
26976 if ac_fn_c_try_compile "$LINENO"; then :
26977 gl_cv_cc_vis_werror=yes
26978 else
26979 gl_cv_cc_vis_werror=no
26980 fi
26981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26982 CFLAGS="$gl_save_CFLAGS"
26983
26984 fi
26985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
26986 $as_echo "$gl_cv_cc_vis_werror" >&6; }
26987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
26988 $as_echo_n "checking for simple visibility declarations... " >&6; }
26989 if ${gl_cv_cc_visibility+:} false; then :
26990 $as_echo_n "(cached) " >&6
26991 else
26992 gl_save_CFLAGS="$CFLAGS"
26993 CFLAGS="$CFLAGS -fvisibility=hidden"
26994 if test $gl_cv_cc_vis_werror = yes; then
26995 CFLAGS="$CFLAGS -Werror"
26996 fi
26997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26998 /* end confdefs.h. */
26999 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
27000 extern __attribute__((__visibility__("default"))) int exportedvar;
27001 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
27002 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
27003 void dummyfunc (void) {}
27004
27005 int
27006 main ()
27007 {
27008
27009 ;
27010 return 0;
27011 }
27012 _ACEOF
27013 if ac_fn_c_try_compile "$LINENO"; then :
27014 gl_cv_cc_visibility=yes
27015 else
27016 gl_cv_cc_visibility=no
27017 fi
27018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27019 CFLAGS="$gl_save_CFLAGS"
27020
27021 fi
27022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
27023 $as_echo "$gl_cv_cc_visibility" >&6; }
27024 if test $gl_cv_cc_visibility = yes; then
27025 CFLAG_VISIBILITY="-fvisibility=hidden"
27026 HAVE_VISIBILITY=1
27027 fi
27028 fi
27029
27030
27031
27032 cat >>confdefs.h <<_ACEOF
27033 #define HAVE_VISIBILITY $HAVE_VISIBILITY
27034 _ACEOF
27035
27036
27037
27038 fi
27039
27040
27041
27042
27043
27044 GNULIB_SETLOCALE_NULL=1
27045
27046
27047
27048
27049
27050 $as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065 if test $gl_cv_have_include_next = yes; then
27066 gl_cv_next_signal_h='<'signal.h'>'
27067 else
27068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
27069 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
27070 if ${gl_cv_next_signal_h+:} false; then :
27071 $as_echo_n "(cached) " >&6
27072 else
27073
27074
27075
27076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27077 /* end confdefs.h. */
27078 #include <signal.h>
27079 _ACEOF
27080 case "$host_os" in
27081 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27082 *) gl_absname_cpp="$ac_cpp" ;;
27083 esac
27084
27085 case "$host_os" in
27086 mingw*)
27087 gl_dirsep_regex='[/\\]'
27088 ;;
27089 *)
27090 gl_dirsep_regex='\/'
27091 ;;
27092 esac
27093 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27094 gl_header_literal_regex=`echo 'signal.h' \
27095 | sed -e "$gl_make_literal_regex_sed"`
27096 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27097 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27098 s|^/[^/]|//&|
27099 p
27100 q
27101 }'
27102
27103 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27104 sed -n "$gl_absolute_header_sed"`
27105
27106 gl_header=$gl_cv_absolute_signal_h
27107 gl_cv_next_signal_h='"'$gl_header'"'
27108
27109
27110 fi
27111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
27112 $as_echo "$gl_cv_next_signal_h" >&6; }
27113 fi
27114 NEXT_SIGNAL_H=$gl_cv_next_signal_h
27115
27116 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27117 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27118 gl_next_as_first_directive='<'signal.h'>'
27119 else
27120 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27121 gl_next_as_first_directive=$gl_cv_next_signal_h
27122 fi
27123 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
27124
27125
27126
27127
27128
27129 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
27130 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
27131 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
27132 #include <signal.h>
27133
27134 "
27135 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
27136
27137 else
27138 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
27139 fi
27140
27141
27142
27143
27144
27145
27146
27147 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
27148 #include <signal.h>
27149
27150 "
27151 if test "x$ac_cv_type_sighandler_t" = xyes; then :
27152
27153 else
27154 HAVE_SIGHANDLER_T=0
27155 fi
27156
27157
27158
27159
27160
27161
27162
27163
27164 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
27165 /* <sys/types.h> is not needed according to POSIX, but the
27166 <sys/socket.h> in i386-unknown-freebsd4.10 and
27167 powerpc-apple-darwin5.5 required it. */
27168 #include <sys/types.h>
27169 #if HAVE_SYS_SOCKET_H
27170 # include <sys/socket.h>
27171 #elif HAVE_WS2TCPIP_H
27172 # include <ws2tcpip.h>
27173 #endif
27174
27175 "
27176 if test "x$ac_cv_type_socklen_t" = xyes; then :
27177
27178 else
27179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
27180 $as_echo_n "checking for socklen_t equivalent... " >&6; }
27181 if ${gl_cv_socklen_t_equiv+:} false; then :
27182 $as_echo_n "(cached) " >&6
27183 else
27184 # Systems have either "struct sockaddr *" or
27185 # "void *" as the second argument to getpeername
27186 gl_cv_socklen_t_equiv=
27187 for arg2 in "struct sockaddr" void; do
27188 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
27189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27190 /* end confdefs.h. */
27191 #include <sys/types.h>
27192 #include <sys/socket.h>
27193
27194 int getpeername (int, $arg2 *, $t *);
27195 int
27196 main ()
27197 {
27198 $t len;
27199 getpeername (0, 0, &len);
27200 ;
27201 return 0;
27202 }
27203 _ACEOF
27204 if ac_fn_c_try_compile "$LINENO"; then :
27205 gl_cv_socklen_t_equiv="$t"
27206 fi
27207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27208 test "$gl_cv_socklen_t_equiv" != "" && break
27209 done
27210 test "$gl_cv_socklen_t_equiv" != "" && break
27211 done
27212 if test "$gl_cv_socklen_t_equiv" = ""; then
27213 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
27214 fi
27215
27216 fi
27217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
27218 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
27219
27220 cat >>confdefs.h <<_ACEOF
27221 #define socklen_t $gl_cv_socklen_t_equiv
27222 _ACEOF
27223
27224 fi
27225
27226
27227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
27228 $as_echo_n "checking for ssize_t... " >&6; }
27229 if ${gt_cv_ssize_t+:} false; then :
27230 $as_echo_n "(cached) " >&6
27231 else
27232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27233 /* end confdefs.h. */
27234 #include <sys/types.h>
27235 int
27236 main ()
27237 {
27238 int x = sizeof (ssize_t *) + sizeof (ssize_t);
27239 return !x;
27240 ;
27241 return 0;
27242 }
27243 _ACEOF
27244 if ac_fn_c_try_compile "$LINENO"; then :
27245 gt_cv_ssize_t=yes
27246 else
27247 gt_cv_ssize_t=no
27248 fi
27249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27250 fi
27251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
27252 $as_echo "$gt_cv_ssize_t" >&6; }
27253 if test $gt_cv_ssize_t = no; then
27254
27255 $as_echo "#define ssize_t int" >>confdefs.h
27256
27257 fi
27258
27259
27260
27261
27262
27263 case "$host_os" in
27264 mingw*)
27265 ;;
27266 *)
27267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
27268 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
27269 if ${gl_cv_func_stat_file_slash+:} false; then :
27270 $as_echo_n "(cached) " >&6
27271 else
27272 touch conftest.tmp
27273 # Assume that if we have lstat, we can also check symlinks.
27274 if test $ac_cv_func_lstat = yes; then
27275 ln -s conftest.tmp conftest.lnk
27276 fi
27277 if test "$cross_compiling" = yes; then :
27278 case "$host_os" in
27279 # Guess yes on Linux systems.
27280 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
27281 # Guess yes on glibc systems.
27282 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
27283 # If we don't know, obey --enable-cross-guesses.
27284 *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
27285 esac
27286
27287 else
27288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27289 /* end confdefs.h. */
27290 #include <sys/stat.h>
27291
27292 int
27293 main ()
27294 {
27295 int result = 0;
27296 struct stat st;
27297 if (!stat ("conftest.tmp/", &st))
27298 result |= 1;
27299 #if HAVE_LSTAT
27300 if (!stat ("conftest.lnk/", &st))
27301 result |= 2;
27302 #endif
27303 return result;
27304
27305 ;
27306 return 0;
27307 }
27308 _ACEOF
27309 if ac_fn_c_try_run "$LINENO"; then :
27310 gl_cv_func_stat_file_slash=yes
27311 else
27312 gl_cv_func_stat_file_slash=no
27313 fi
27314 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27315 conftest.$ac_objext conftest.beam conftest.$ac_ext
27316 fi
27317
27318 rm -f conftest.tmp conftest.lnk
27319 fi
27320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
27321 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
27322 case $gl_cv_func_stat_file_slash in
27323 *no)
27324 REPLACE_STAT=1
27325
27326 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
27327 ;;
27328 esac
27329 case $host_os in
27330 solaris*)
27331 REPLACE_FSTAT=1 ;;
27332 esac
27333 ;;
27334 esac
27335
27336 if test $REPLACE_STAT = 1; then
27337
27338
27339
27340
27341
27342
27343
27344
27345 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
27346
27347 case "$host_os" in
27348 mingw*)
27349
27350
27351
27352
27353
27354
27355
27356
27357 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
27358
27359 ;;
27360 esac
27361
27362
27363
27364 :
27365
27366 fi
27367
27368
27369
27370
27371
27372 GNULIB_STAT=1
27373
27374
27375
27376
27377
27378 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
27379
27380
27381
27382
27383
27384
27385
27386 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>
27387 #include <sys/stat.h>
27388 "
27389 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
27390
27391 cat >>confdefs.h <<_ACEOF
27392 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
27393 _ACEOF
27394
27395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
27396 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
27397 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
27398 $as_echo_n "(cached) " >&6
27399 else
27400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27401 /* end confdefs.h. */
27402
27403 #include <sys/types.h>
27404 #include <sys/stat.h>
27405 #if HAVE_SYS_TIME_H
27406 # include <sys/time.h>
27407 #endif
27408 #include <time.h>
27409 struct timespec ts;
27410 struct stat st;
27411
27412 int
27413 main ()
27414 {
27415
27416 st.st_atim = ts;
27417
27418 ;
27419 return 0;
27420 }
27421 _ACEOF
27422 if ac_fn_c_try_compile "$LINENO"; then :
27423 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
27424 else
27425 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
27426 fi
27427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27428 fi
27429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
27430 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
27431 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
27432
27433 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
27434
27435 fi
27436 else
27437 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>
27438 #include <sys/stat.h>
27439 "
27440 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
27441
27442 cat >>confdefs.h <<_ACEOF
27443 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
27444 _ACEOF
27445
27446
27447 else
27448 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
27449 #include <sys/stat.h>
27450 "
27451 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
27452
27453 cat >>confdefs.h <<_ACEOF
27454 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
27455 _ACEOF
27456
27457
27458 else
27459 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>
27460 #include <sys/stat.h>
27461 "
27462 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
27463
27464 cat >>confdefs.h <<_ACEOF
27465 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
27466 _ACEOF
27467
27468
27469 fi
27470
27471 fi
27472
27473 fi
27474
27475 fi
27476
27477
27478
27479
27480
27481 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>
27482 #include <sys/stat.h>
27483 "
27484 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
27485
27486 cat >>confdefs.h <<_ACEOF
27487 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
27488 _ACEOF
27489
27490
27491 else
27492 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
27493 #include <sys/stat.h>
27494 "
27495 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
27496
27497 cat >>confdefs.h <<_ACEOF
27498 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
27499 _ACEOF
27500
27501
27502 else
27503 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>
27504 #include <sys/stat.h>
27505 "
27506 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
27507
27508 cat >>confdefs.h <<_ACEOF
27509 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
27510 _ACEOF
27511
27512
27513 fi
27514
27515 fi
27516
27517 fi
27518
27519
27520
27521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
27522 $as_echo_n "checking for working stdalign.h... " >&6; }
27523 if ${gl_cv_header_working_stdalign_h+:} false; then :
27524 $as_echo_n "(cached) " >&6
27525 else
27526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27527 /* end confdefs.h. */
27528 #include <stdalign.h>
27529 #include <stddef.h>
27530
27531 /* Test that alignof yields a result consistent with offsetof.
27532 This catches GCC bug 52023
27533 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
27534 #ifdef __cplusplus
27535 template <class t> struct alignof_helper { char a; t b; };
27536 # define ao(type) offsetof (alignof_helper<type>, b)
27537 #else
27538 # define ao(type) offsetof (struct { char a; type b; }, b)
27539 #endif
27540 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
27541 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
27542 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
27543
27544 /* Test _Alignas only on platforms where gnulib can help. */
27545 #if \
27546 ((defined __cplusplus && 201103 <= __cplusplus) \
27547 || (defined __APPLE__ && defined __MACH__ \
27548 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
27549 : __GNUC__) \
27550 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
27551 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
27552 || 1300 <= _MSC_VER)
27553 struct alignas_test { char c; char alignas (8) alignas_8; };
27554 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
27555 ? 1 : -1];
27556 #endif
27557
27558 int
27559 main ()
27560 {
27561
27562 ;
27563 return 0;
27564 }
27565 _ACEOF
27566 if ac_fn_c_try_compile "$LINENO"; then :
27567 gl_cv_header_working_stdalign_h=yes
27568 else
27569 gl_cv_header_working_stdalign_h=no
27570 fi
27571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27572 fi
27573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
27574 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
27575
27576 if test $gl_cv_header_working_stdalign_h = yes; then
27577 STDALIGN_H=''
27578 else
27579 STDALIGN_H='stdalign.h'
27580 fi
27581
27582
27583 if test -n "$STDALIGN_H"; then
27584 GL_GENERATE_STDALIGN_H_TRUE=
27585 GL_GENERATE_STDALIGN_H_FALSE='#'
27586 else
27587 GL_GENERATE_STDALIGN_H_TRUE='#'
27588 GL_GENERATE_STDALIGN_H_FALSE=
27589 fi
27590
27591
27592
27593
27594
27595
27596 if test "$ac_cv_header_stdbool_h" = yes; then
27597 case "$host_os" in
27598 solaris*)
27599 if test -z "$GCC"; then
27600 STDBOOL_H='stdbool.h'
27601 else
27602 STDBOOL_H=''
27603 fi
27604 ;;
27605 *)
27606 STDBOOL_H=''
27607 ;;
27608 esac
27609 else
27610 STDBOOL_H='stdbool.h'
27611 fi
27612
27613 if test -n "$STDBOOL_H"; then
27614 GL_GENERATE_STDBOOL_H_TRUE=
27615 GL_GENERATE_STDBOOL_H_FALSE='#'
27616 else
27617 GL_GENERATE_STDBOOL_H_TRUE='#'
27618 GL_GENERATE_STDBOOL_H_FALSE=
27619 fi
27620
27621
27622 if test "$ac_cv_type__Bool" = yes; then
27623 HAVE__BOOL=1
27624 else
27625 HAVE__BOOL=0
27626 fi
27627
27628
27629
27630
27631
27632
27633
27634
27635 STDDEF_H=
27636
27637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
27638 $as_echo_n "checking for good max_align_t... " >&6; }
27639 if ${gl_cv_type_max_align_t+:} false; then :
27640 $as_echo_n "(cached) " >&6
27641 else
27642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27643 /* end confdefs.h. */
27644 #include <stddef.h>
27645 unsigned int s = sizeof (max_align_t);
27646 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
27647 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
27648 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
27649 #endif
27650 typedef struct { char a; max_align_t b; } max_helper;
27651 typedef struct { char a; long b; } long_helper;
27652 typedef struct { char a; double b; } double_helper;
27653 typedef struct { char a; long double b; } long_double_helper;
27654 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
27655 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
27656 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
27657
27658 int
27659 main ()
27660 {
27661
27662 ;
27663 return 0;
27664 }
27665 _ACEOF
27666 if ac_fn_c_try_compile "$LINENO"; then :
27667 gl_cv_type_max_align_t=yes
27668 else
27669 gl_cv_type_max_align_t=no
27670 fi
27671 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27672
27673 fi
27674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
27675 $as_echo "$gl_cv_type_max_align_t" >&6; }
27676 if test $gl_cv_type_max_align_t = no; then
27677 HAVE_MAX_ALIGN_T=0
27678 STDDEF_H=stddef.h
27679 fi
27680
27681 if test $gt_cv_c_wchar_t = no; then
27682 HAVE_WCHAR_T=0
27683 STDDEF_H=stddef.h
27684 fi
27685
27686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
27687 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
27688 if ${gl_cv_decl_null_works+:} false; then :
27689 $as_echo_n "(cached) " >&6
27690 else
27691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27692 /* end confdefs.h. */
27693 #include <stddef.h>
27694 int test[2 * (sizeof NULL == sizeof (void *)) -1];
27695
27696 int
27697 main ()
27698 {
27699
27700 ;
27701 return 0;
27702 }
27703 _ACEOF
27704 if ac_fn_c_try_compile "$LINENO"; then :
27705 gl_cv_decl_null_works=yes
27706 else
27707 gl_cv_decl_null_works=no
27708 fi
27709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27710 fi
27711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
27712 $as_echo "$gl_cv_decl_null_works" >&6; }
27713 if test $gl_cv_decl_null_works = no; then
27714 REPLACE_NULL=1
27715 STDDEF_H=stddef.h
27716 fi
27717
27718
27719 if test -n "$STDDEF_H"; then
27720 GL_GENERATE_STDDEF_H_TRUE=
27721 GL_GENERATE_STDDEF_H_FALSE='#'
27722 else
27723 GL_GENERATE_STDDEF_H_TRUE='#'
27724 GL_GENERATE_STDDEF_H_FALSE=
27725 fi
27726
27727 if test -n "$STDDEF_H"; then
27728
27729
27730
27731
27732
27733
27734
27735
27736 if test $gl_cv_have_include_next = yes; then
27737 gl_cv_next_stddef_h='<'stddef.h'>'
27738 else
27739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
27740 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
27741 if ${gl_cv_next_stddef_h+:} false; then :
27742 $as_echo_n "(cached) " >&6
27743 else
27744
27745
27746
27747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27748 /* end confdefs.h. */
27749 #include <stddef.h>
27750 _ACEOF
27751 case "$host_os" in
27752 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27753 *) gl_absname_cpp="$ac_cpp" ;;
27754 esac
27755
27756 case "$host_os" in
27757 mingw*)
27758 gl_dirsep_regex='[/\\]'
27759 ;;
27760 *)
27761 gl_dirsep_regex='\/'
27762 ;;
27763 esac
27764 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27765 gl_header_literal_regex=`echo 'stddef.h' \
27766 | sed -e "$gl_make_literal_regex_sed"`
27767 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27768 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27769 s|^/[^/]|//&|
27770 p
27771 q
27772 }'
27773
27774 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27775 sed -n "$gl_absolute_header_sed"`
27776
27777 gl_header=$gl_cv_absolute_stddef_h
27778 gl_cv_next_stddef_h='"'$gl_header'"'
27779
27780
27781 fi
27782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
27783 $as_echo "$gl_cv_next_stddef_h" >&6; }
27784 fi
27785 NEXT_STDDEF_H=$gl_cv_next_stddef_h
27786
27787 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27788 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27789 gl_next_as_first_directive='<'stddef.h'>'
27790 else
27791 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27792 gl_next_as_first_directive=$gl_cv_next_stddef_h
27793 fi
27794 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
27795
27796
27797
27798
27799 fi
27800
27801
27802
27803
27804 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815 if test $gl_cv_have_include_next = yes; then
27816 gl_cv_next_stdio_h='<'stdio.h'>'
27817 else
27818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
27819 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
27820 if ${gl_cv_next_stdio_h+:} false; then :
27821 $as_echo_n "(cached) " >&6
27822 else
27823
27824
27825
27826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27827 /* end confdefs.h. */
27828 #include <stdio.h>
27829 _ACEOF
27830 case "$host_os" in
27831 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27832 *) gl_absname_cpp="$ac_cpp" ;;
27833 esac
27834
27835 case "$host_os" in
27836 mingw*)
27837 gl_dirsep_regex='[/\\]'
27838 ;;
27839 *)
27840 gl_dirsep_regex='\/'
27841 ;;
27842 esac
27843 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27844 gl_header_literal_regex=`echo 'stdio.h' \
27845 | sed -e "$gl_make_literal_regex_sed"`
27846 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27847 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27848 s|^/[^/]|//&|
27849 p
27850 q
27851 }'
27852
27853 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27854 sed -n "$gl_absolute_header_sed"`
27855
27856 gl_header=$gl_cv_absolute_stdio_h
27857 gl_cv_next_stdio_h='"'$gl_header'"'
27858
27859
27860 fi
27861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
27862 $as_echo "$gl_cv_next_stdio_h" >&6; }
27863 fi
27864 NEXT_STDIO_H=$gl_cv_next_stdio_h
27865
27866 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27867 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27868 gl_next_as_first_directive='<'stdio.h'>'
27869 else
27870 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27871 gl_next_as_first_directive=$gl_cv_next_stdio_h
27872 fi
27873 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
27874
27875
27876
27877
27878
27879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
27880 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
27881 if ${gl_cv_func_printf_attribute_flavor+:} false; then :
27882 $as_echo_n "(cached) " >&6
27883 else
27884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27885 /* end confdefs.h. */
27886
27887 #define __STDC_FORMAT_MACROS 1
27888 #include <stdio.h>
27889 #include <inttypes.h>
27890 /* For non-mingw systems, compilation will trivially succeed.
27891 For mingw, compilation will succeed for older mingw (system
27892 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
27893 #if (defined _WIN32 && ! defined __CYGWIN__) && \
27894 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
27895 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
27896 #endif
27897
27898 int
27899 main ()
27900 {
27901
27902 ;
27903 return 0;
27904 }
27905 _ACEOF
27906 if ac_fn_c_try_compile "$LINENO"; then :
27907 gl_cv_func_printf_attribute_flavor=system
27908 else
27909 gl_cv_func_printf_attribute_flavor=gnu
27910 fi
27911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27912 fi
27913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
27914 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
27915 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
27916
27917 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
27918
27919 fi
27920
27921 GNULIB_FSCANF=1
27922
27923
27924 cat >>confdefs.h <<_ACEOF
27925 #define GNULIB_FSCANF 1
27926 _ACEOF
27927
27928
27929 GNULIB_SCANF=1
27930
27931
27932 cat >>confdefs.h <<_ACEOF
27933 #define GNULIB_SCANF 1
27934 _ACEOF
27935
27936
27937 GNULIB_FGETC=1
27938 GNULIB_GETC=1
27939 GNULIB_GETCHAR=1
27940 GNULIB_FGETS=1
27941 GNULIB_FREAD=1
27942
27943
27944 GNULIB_FPRINTF=1
27945 GNULIB_PRINTF=1
27946 GNULIB_VFPRINTF=1
27947 GNULIB_VPRINTF=1
27948 GNULIB_FPUTC=1
27949 GNULIB_PUTC=1
27950 GNULIB_PUTCHAR=1
27951 GNULIB_FPUTS=1
27952 GNULIB_PUTS=1
27953 GNULIB_FWRITE=1
27954
27955
27956
27957
27958
27959
27960
27961
27962
27963
27964 if test $ac_cv_have_decl_fcloseall = no; then
27965 HAVE_DECL_FCLOSEALL=0
27966 fi
27967
27968
27969
27970
27971
27972
27973
27974
27975
27976
27977
27978 if test $gl_cv_have_include_next = yes; then
27979 gl_cv_next_stdlib_h='<'stdlib.h'>'
27980 else
27981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
27982 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
27983 if ${gl_cv_next_stdlib_h+:} false; then :
27984 $as_echo_n "(cached) " >&6
27985 else
27986
27987
27988
27989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27990 /* end confdefs.h. */
27991 #include <stdlib.h>
27992 _ACEOF
27993 case "$host_os" in
27994 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27995 *) gl_absname_cpp="$ac_cpp" ;;
27996 esac
27997
27998 case "$host_os" in
27999 mingw*)
28000 gl_dirsep_regex='[/\\]'
28001 ;;
28002 *)
28003 gl_dirsep_regex='\/'
28004 ;;
28005 esac
28006 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28007 gl_header_literal_regex=`echo 'stdlib.h' \
28008 | sed -e "$gl_make_literal_regex_sed"`
28009 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28010 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28011 s|^/[^/]|//&|
28012 p
28013 q
28014 }'
28015
28016 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28017 sed -n "$gl_absolute_header_sed"`
28018
28019 gl_header=$gl_cv_absolute_stdlib_h
28020 gl_cv_next_stdlib_h='"'$gl_header'"'
28021
28022
28023 fi
28024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
28025 $as_echo "$gl_cv_next_stdlib_h" >&6; }
28026 fi
28027 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
28028
28029 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28030 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28031 gl_next_as_first_directive='<'stdlib.h'>'
28032 else
28033 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28034 gl_next_as_first_directive=$gl_cv_next_stdlib_h
28035 fi
28036 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049 if test $ac_cv_have_decl_ecvt = no; then
28050 HAVE_DECL_ECVT=0
28051 fi
28052
28053 if test $ac_cv_have_decl_fcvt = no; then
28054 HAVE_DECL_FCVT=0
28055 fi
28056
28057 if test $ac_cv_have_decl_gcvt = no; then
28058 HAVE_DECL_GCVT=0
28059 fi
28060
28061
28062
28063
28064
28065 for ac_func in strchrnul
28066 do :
28067 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
28068 if test "x$ac_cv_func_strchrnul" = xyes; then :
28069 cat >>confdefs.h <<_ACEOF
28070 #define HAVE_STRCHRNUL 1
28071 _ACEOF
28072
28073 fi
28074 done
28075
28076 if test $ac_cv_func_strchrnul = no; then
28077 HAVE_STRCHRNUL=0
28078 else
28079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
28080 $as_echo_n "checking whether strchrnul works... " >&6; }
28081 if ${gl_cv_func_strchrnul_works+:} false; then :
28082 $as_echo_n "(cached) " >&6
28083 else
28084 if test "$cross_compiling" = yes; then :
28085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28086 /* end confdefs.h. */
28087
28088 #if defined __CYGWIN__
28089 #include <cygwin/version.h>
28090 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
28091 Lucky user
28092 #endif
28093 #else
28094 Lucky user
28095 #endif
28096
28097 _ACEOF
28098 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28099 $EGREP "Lucky user" >/dev/null 2>&1; then :
28100 gl_cv_func_strchrnul_works="guessing yes"
28101 else
28102 gl_cv_func_strchrnul_works="guessing no"
28103 fi
28104 rm -f conftest*
28105
28106
28107 else
28108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28109 /* end confdefs.h. */
28110
28111 #include <string.h> /* for strchrnul */
28112
28113 int
28114 main ()
28115 {
28116 const char *buf = "a";
28117 return strchrnul (buf, 'b') != buf + 1;
28118
28119 ;
28120 return 0;
28121 }
28122 _ACEOF
28123 if ac_fn_c_try_run "$LINENO"; then :
28124 gl_cv_func_strchrnul_works=yes
28125 else
28126 gl_cv_func_strchrnul_works=no
28127 fi
28128 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28129 conftest.$ac_objext conftest.beam conftest.$ac_ext
28130 fi
28131
28132
28133 fi
28134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
28135 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
28136 case "$gl_cv_func_strchrnul_works" in
28137 *yes) ;;
28138 *) REPLACE_STRCHRNUL=1 ;;
28139 esac
28140 fi
28141
28142 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
28143
28144
28145
28146
28147
28148
28149
28150
28151 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
28152
28153 :
28154 fi
28155
28156
28157
28158
28159
28160 GNULIB_STRCHRNUL=1
28161
28162
28163
28164
28165
28166 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
28167
28168
28169
28170
28171
28172
28173 if test $gl_cv_func_malloc_posix != yes; then
28174 REPLACE_STRDUP=1
28175 fi
28176
28177 if test $ac_cv_have_decl_strdup = no; then
28178 HAVE_DECL_STRDUP=0
28179 fi
28180
28181 if test $REPLACE_STRDUP = 1; then
28182
28183
28184
28185
28186
28187
28188
28189
28190 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
28191
28192 :
28193 fi
28194
28195
28196
28197
28198
28199 GNULIB_STRDUP=1
28200
28201
28202
28203
28204
28205 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
28206
28207
28208
28209
28210
28211
28212
28213
28214
28215
28216 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
28217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
28218 $as_echo_n "checking for working strerror function... " >&6; }
28219 if ${gl_cv_func_working_strerror+:} false; then :
28220 $as_echo_n "(cached) " >&6
28221 else
28222 if test "$cross_compiling" = yes; then :
28223 case "$host_os" in
28224 # Guess yes on glibc systems.
28225 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
28226 # Guess yes on musl systems.
28227 *-musl*) gl_cv_func_working_strerror="guessing yes" ;;
28228 # If we don't know, obey --enable-cross-guesses.
28229 *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
28230 esac
28231
28232 else
28233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28234 /* end confdefs.h. */
28235 #include <string.h>
28236
28237 int
28238 main ()
28239 {
28240 if (!*strerror (-2)) return 1;
28241 ;
28242 return 0;
28243 }
28244 _ACEOF
28245 if ac_fn_c_try_run "$LINENO"; then :
28246 gl_cv_func_working_strerror=yes
28247 else
28248 gl_cv_func_working_strerror=no
28249 fi
28250 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28251 conftest.$ac_objext conftest.beam conftest.$ac_ext
28252 fi
28253
28254
28255 fi
28256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
28257 $as_echo "$gl_cv_func_working_strerror" >&6; }
28258 case "$gl_cv_func_working_strerror" in
28259 *yes) ;;
28260 *)
28261 REPLACE_STRERROR=1
28262 ;;
28263 esac
28264
28265 case "$gl_cv_func_strerror_r_works" in
28266 *no) REPLACE_STRERROR=1 ;;
28267 esac
28268
28269 else
28270 REPLACE_STRERROR=1
28271 fi
28272
28273 if test $REPLACE_STRERROR = 1; then
28274
28275
28276
28277
28278
28279
28280
28281
28282 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
28283
28284 fi
28285
28286
28287 cat >>confdefs.h <<_ACEOF
28288 #define GNULIB_STRERROR 1
28289 _ACEOF
28290
28291
28292
28293
28294
28295
28296
28297 GNULIB_STRERROR=1
28298
28299
28300
28301
28302
28303 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
28304
28305
28306
28307
28308
28309 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
28310
28311
28312
28313
28314
28315
28316
28317
28318 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
28319
28320
28321
28322
28323
28324 if test $ac_cv_header_sys_socket_h != yes; then
28325 for ac_header in winsock2.h
28326 do :
28327 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
28328 if test "x$ac_cv_header_winsock2_h" = xyes; then :
28329 cat >>confdefs.h <<_ACEOF
28330 #define HAVE_WINSOCK2_H 1
28331 _ACEOF
28332
28333 fi
28334
28335 done
28336
28337 fi
28338 if test "$ac_cv_header_winsock2_h" = yes; then
28339 HAVE_WINSOCK2_H=1
28340 UNISTD_H_HAVE_WINSOCK2_H=1
28341 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
28342 else
28343 HAVE_WINSOCK2_H=0
28344 fi
28345
28346
28347 fi
28348
28349
28350
28351
28352
28353
28354
28355 if test $ac_cv_have_decl_strerror_r = no; then
28356 HAVE_DECL_STRERROR_R=0
28357 fi
28358
28359 if test $ac_cv_func_strerror_r = yes; then
28360 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
28361 if test $gl_cv_func_strerror_r_posix_signature = yes; then
28362 case "$gl_cv_func_strerror_r_works" in
28363 *no) REPLACE_STRERROR_R=1 ;;
28364 esac
28365 else
28366 REPLACE_STRERROR_R=1
28367 fi
28368 else
28369 REPLACE_STRERROR_R=1
28370 fi
28371 fi
28372
28373 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
28374
28375
28376
28377
28378
28379
28380
28381
28382 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
28383
28384
28385
28386
28387
28388
28389 fi
28390
28391
28392
28393
28394
28395 GNULIB_STRERROR_R=1
28396
28397
28398
28399
28400
28401 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
28402
28403
28404
28405
28406
28407 cat >>confdefs.h <<_ACEOF
28408 #define GNULIB_STRERROR_R_POSIX 1
28409 _ACEOF
28410
28411
28412
28413
28414
28415
28416
28417
28418
28419
28420
28421 if test $ac_cv_have_decl_strnlen = no; then
28422 HAVE_DECL_STRNLEN=0
28423 else
28424
28425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
28426 $as_echo_n "checking for working strnlen... " >&6; }
28427 if ${ac_cv_func_strnlen_working+:} false; then :
28428 $as_echo_n "(cached) " >&6
28429 else
28430 if test "$cross_compiling" = yes; then :
28431 # Guess no on AIX systems, yes otherwise.
28432 case "$host_os" in
28433 aix*) ac_cv_func_strnlen_working=no;;
28434 *) ac_cv_func_strnlen_working=yes;;
28435 esac
28436 else
28437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28438 /* end confdefs.h. */
28439 $ac_includes_default
28440 int
28441 main ()
28442 {
28443
28444 #define S "foobar"
28445 #define S_LEN (sizeof S - 1)
28446
28447 /* At least one implementation is buggy: that of AIX 4.3 would
28448 give strnlen (S, 1) == 3. */
28449
28450 int i;
28451 for (i = 0; i < S_LEN + 1; ++i)
28452 {
28453 int expected = i <= S_LEN ? i : S_LEN;
28454 if (strnlen (S, i) != expected)
28455 return 1;
28456 }
28457 return 0;
28458
28459 ;
28460 return 0;
28461 }
28462 _ACEOF
28463 if ac_fn_c_try_run "$LINENO"; then :
28464 ac_cv_func_strnlen_working=yes
28465 else
28466 ac_cv_func_strnlen_working=no
28467 fi
28468 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28469 conftest.$ac_objext conftest.beam conftest.$ac_ext
28470 fi
28471
28472 fi
28473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
28474 $as_echo "$ac_cv_func_strnlen_working" >&6; }
28475 test $ac_cv_func_strnlen_working = no && :
28476
28477
28478 if test $ac_cv_func_strnlen_working = no; then
28479 REPLACE_STRNLEN=1
28480 fi
28481 fi
28482
28483 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
28484
28485
28486
28487
28488
28489
28490
28491
28492 gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
28493
28494 :
28495 fi
28496
28497
28498
28499
28500
28501 GNULIB_STRNLEN=1
28502
28503
28504
28505
28506
28507 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
28508
28509
28510
28511
28512
28513 if test $REPLACE_STRSTR = 0; then
28514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
28515 $as_echo_n "checking whether strstr works in linear time... " >&6; }
28516 if ${gl_cv_func_strstr_linear+:} false; then :
28517 $as_echo_n "(cached) " >&6
28518 else
28519 if test "$cross_compiling" = yes; then :
28520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28521 /* end confdefs.h. */
28522
28523 #include <features.h>
28524 #ifdef __GNU_LIBRARY__
28525 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
28526 && !(defined __i386__ || defined __x86_64__) \
28527 && !defined __UCLIBC__
28528 Lucky user
28529 #endif
28530 #endif
28531 #ifdef __CYGWIN__
28532 #include <cygwin/version.h>
28533 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
28534 Lucky user
28535 #endif
28536 #endif
28537
28538 _ACEOF
28539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28540 $EGREP "Lucky user" >/dev/null 2>&1; then :
28541 gl_cv_func_strstr_linear="guessing yes"
28542 else
28543 gl_cv_func_strstr_linear="$gl_cross_guess_normal"
28544 fi
28545 rm -f conftest*
28546
28547
28548 else
28549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28550 /* end confdefs.h. */
28551
28552 #ifdef __MVS__
28553 /* z/OS does not deliver signals while strstr() is running (thanks to
28554 restrictions on its LE runtime), which prevents us from limiting the
28555 running time of this test. */
28556 # error "This test does not work properly on z/OS"
28557 #endif
28558 #include <signal.h> /* for signal */
28559 #include <string.h> /* for strstr */
28560 #include <stdlib.h> /* for malloc */
28561 #include <unistd.h> /* for alarm */
28562 static void quit (int sig) { _exit (sig + 128); }
28563
28564 int
28565 main ()
28566 {
28567
28568 int result = 0;
28569 size_t m = 1000000;
28570 char *haystack = (char *) malloc (2 * m + 2);
28571 char *needle = (char *) malloc (m + 2);
28572 /* Failure to compile this test due to missing alarm is okay,
28573 since all such platforms (mingw) also have quadratic strstr. */
28574 signal (SIGALRM, quit);
28575 alarm (5);
28576 /* Check for quadratic performance. */
28577 if (haystack && needle)
28578 {
28579 memset (haystack, 'A', 2 * m);
28580 haystack[2 * m] = 'B';
28581 haystack[2 * m + 1] = 0;
28582 memset (needle, 'A', m);
28583 needle[m] = 'B';
28584 needle[m + 1] = 0;
28585 if (!strstr (haystack, needle))
28586 result |= 1;
28587 }
28588 /* Free allocated memory, in case some sanitizer is watching. */
28589 free (haystack);
28590 free (needle);
28591 return result;
28592
28593 ;
28594 return 0;
28595 }
28596 _ACEOF
28597 if ac_fn_c_try_run "$LINENO"; then :
28598 gl_cv_func_strstr_linear=yes
28599 else
28600 gl_cv_func_strstr_linear=no
28601 fi
28602 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28603 conftest.$ac_objext conftest.beam conftest.$ac_ext
28604 fi
28605
28606
28607 fi
28608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
28609 $as_echo "$gl_cv_func_strstr_linear" >&6; }
28610 case "$gl_cv_func_strstr_linear" in
28611 *yes) ;;
28612 *)
28613 REPLACE_STRSTR=1
28614 ;;
28615 esac
28616 fi
28617
28618 if test $REPLACE_STRSTR = 1; then
28619
28620
28621
28622
28623
28624
28625
28626
28627 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
28628
28629 fi
28630
28631
28632
28633 if test $REPLACE_MEMCHR = 1; then
28634 REPLACE_STRSTR=1
28635 else
28636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
28637 $as_echo_n "checking whether strstr works... " >&6; }
28638 if ${gl_cv_func_strstr_works_always+:} false; then :
28639 $as_echo_n "(cached) " >&6
28640 else
28641 if test "$cross_compiling" = yes; then :
28642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28643 /* end confdefs.h. */
28644
28645 #ifdef __GNU_LIBRARY__
28646 #include <features.h>
28647 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
28648 || defined __UCLIBC__
28649 Lucky user
28650 #endif
28651 #elif defined __CYGWIN__
28652 #include <cygwin/version.h>
28653 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
28654 Lucky user
28655 #endif
28656 #else
28657 Lucky user
28658 #endif
28659
28660 _ACEOF
28661 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28662 $EGREP "Lucky user" >/dev/null 2>&1; then :
28663 gl_cv_func_strstr_works_always="guessing yes"
28664 else
28665 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
28666 fi
28667 rm -f conftest*
28668
28669
28670 else
28671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28672 /* end confdefs.h. */
28673
28674 #include <string.h> /* for strstr */
28675 #ifdef __GNU_LIBRARY__
28676 #include <features.h>
28677 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
28678 Unlucky user
28679 #endif
28680 #endif
28681 #define P "_EF_BF_BD"
28682 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
28683 #define NEEDLE P P P P P
28684
28685 int
28686 main ()
28687 {
28688 return !!strstr (HAYSTACK, NEEDLE);
28689
28690 ;
28691 return 0;
28692 }
28693 _ACEOF
28694 if ac_fn_c_try_run "$LINENO"; then :
28695 gl_cv_func_strstr_works_always=yes
28696 else
28697 gl_cv_func_strstr_works_always=no
28698 fi
28699 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28700 conftest.$ac_objext conftest.beam conftest.$ac_ext
28701 fi
28702
28703
28704 fi
28705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
28706 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
28707 case "$gl_cv_func_strstr_works_always" in
28708 *yes) ;;
28709 *)
28710 REPLACE_STRSTR=1
28711 ;;
28712 esac
28713 fi
28714
28715 if test $REPLACE_STRSTR = 1; then
28716
28717
28718
28719
28720
28721
28722
28723
28724 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
28725
28726 fi
28727
28728
28729
28730
28731
28732 GNULIB_STRSTR=1
28733
28734
28735
28736
28737
28738 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
28739
28740
28741
28742
28743
28744
28745
28746 for ac_func in strtok_r
28747 do :
28748 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
28749 if test "x$ac_cv_func_strtok_r" = xyes; then :
28750 cat >>confdefs.h <<_ACEOF
28751 #define HAVE_STRTOK_R 1
28752 _ACEOF
28753
28754 fi
28755 done
28756
28757 if test $ac_cv_func_strtok_r = yes; then
28758 HAVE_STRTOK_R=1
28759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
28760 $as_echo_n "checking whether strtok_r works... " >&6; }
28761 if ${gl_cv_func_strtok_r_works+:} false; then :
28762 $as_echo_n "(cached) " >&6
28763 else
28764 if test "$cross_compiling" = yes; then :
28765 case "$host_os" in
28766 # Guess no on glibc systems.
28767 *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;;
28768 # Guess yes on native Windows.
28769 mingw*) gl_cv_func_strtok_r_works="guessing yes" ;;
28770 *) gl_cv_func_strtok_r_works="guessing yes" ;;
28771 esac
28772
28773 else
28774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28775 /* end confdefs.h. */
28776
28777 #ifndef __OPTIMIZE__
28778 # define __OPTIMIZE__ 1
28779 #endif
28780 #undef __OPTIMIZE_SIZE__
28781 #undef __NO_INLINE__
28782 #include <stdlib.h>
28783 #include <string.h>
28784
28785 int
28786 main ()
28787 {
28788 static const char dummy[] = "\177\01a";
28789 char delimiters[] = "xxxxxxxx";
28790 char *save_ptr = (char *) dummy;
28791 strtok_r (delimiters, "x", &save_ptr);
28792 strtok_r (NULL, "x", &save_ptr);
28793 return 0;
28794
28795 ;
28796 return 0;
28797 }
28798
28799 _ACEOF
28800 if ac_fn_c_try_run "$LINENO"; then :
28801 gl_cv_func_strtok_r_works=yes
28802 else
28803 gl_cv_func_strtok_r_works=no
28804 fi
28805 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28806 conftest.$ac_objext conftest.beam conftest.$ac_ext
28807 fi
28808
28809
28810 fi
28811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
28812 $as_echo "$gl_cv_func_strtok_r_works" >&6; }
28813 case "$gl_cv_func_strtok_r_works" in
28814 *no)
28815 UNDEFINE_STRTOK_R=1
28816 ;;
28817 esac
28818 else
28819 HAVE_STRTOK_R=0
28820 fi
28821
28822 if test $ac_cv_have_decl_strtok_r = no; then
28823 HAVE_DECL_STRTOK_R=0
28824 fi
28825
28826 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
28827
28828
28829
28830
28831
28832
28833
28834
28835 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
28836
28837
28838 :
28839
28840 fi
28841
28842
28843
28844
28845
28846 GNULIB_STRTOK_R=1
28847
28848
28849
28850
28851
28852 $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867 if test $gl_cv_have_include_next = yes; then
28868 gl_cv_next_sys_random_h='<'sys/random.h'>'
28869 else
28870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
28871 $as_echo_n "checking absolute name of <sys/random.h>... " >&6; }
28872 if ${gl_cv_next_sys_random_h+:} false; then :
28873 $as_echo_n "(cached) " >&6
28874 else
28875
28876 if test $ac_cv_header_sys_random_h = yes; then
28877
28878
28879
28880
28881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28882 /* end confdefs.h. */
28883 #include <sys/random.h>
28884 _ACEOF
28885 case "$host_os" in
28886 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28887 *) gl_absname_cpp="$ac_cpp" ;;
28888 esac
28889
28890 case "$host_os" in
28891 mingw*)
28892 gl_dirsep_regex='[/\\]'
28893 ;;
28894 *)
28895 gl_dirsep_regex='\/'
28896 ;;
28897 esac
28898 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28899 gl_header_literal_regex=`echo 'sys/random.h' \
28900 | sed -e "$gl_make_literal_regex_sed"`
28901 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28902 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28903 s|^/[^/]|//&|
28904 p
28905 q
28906 }'
28907
28908 gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28909 sed -n "$gl_absolute_header_sed"`
28910
28911 gl_header=$gl_cv_absolute_sys_random_h
28912 gl_cv_next_sys_random_h='"'$gl_header'"'
28913 else
28914 gl_cv_next_sys_random_h='<'sys/random.h'>'
28915 fi
28916
28917
28918 fi
28919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
28920 $as_echo "$gl_cv_next_sys_random_h" >&6; }
28921 fi
28922 NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
28923
28924 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28925 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28926 gl_next_as_first_directive='<'sys/random.h'>'
28927 else
28928 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28929 gl_next_as_first_directive=$gl_cv_next_sys_random_h
28930 fi
28931 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
28932
28933
28934
28935
28936 if test $ac_cv_header_sys_random_h = yes; then
28937 HAVE_SYS_RANDOM_H=1
28938 else
28939 HAVE_SYS_RANDOM_H=0
28940 fi
28941
28942
28943
28944 if test $ac_cv_header_sys_random_h = yes; then
28945 UNISTD_H_HAVE_SYS_RANDOM_H=1
28946 fi
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969 if test $gl_cv_have_include_next = yes; then
28970 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
28971 else
28972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
28973 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
28974 if ${gl_cv_next_sys_stat_h+:} false; then :
28975 $as_echo_n "(cached) " >&6
28976 else
28977
28978 if test $ac_cv_header_sys_stat_h = yes; then
28979
28980
28981
28982
28983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28984 /* end confdefs.h. */
28985 #include <sys/stat.h>
28986 _ACEOF
28987 case "$host_os" in
28988 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28989 *) gl_absname_cpp="$ac_cpp" ;;
28990 esac
28991
28992 case "$host_os" in
28993 mingw*)
28994 gl_dirsep_regex='[/\\]'
28995 ;;
28996 *)
28997 gl_dirsep_regex='\/'
28998 ;;
28999 esac
29000 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29001 gl_header_literal_regex=`echo 'sys/stat.h' \
29002 | sed -e "$gl_make_literal_regex_sed"`
29003 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29004 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29005 s|^/[^/]|//&|
29006 p
29007 q
29008 }'
29009
29010 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29011 sed -n "$gl_absolute_header_sed"`
29012
29013 gl_header=$gl_cv_absolute_sys_stat_h
29014 gl_cv_next_sys_stat_h='"'$gl_header'"'
29015 else
29016 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
29017 fi
29018
29019
29020 fi
29021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
29022 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
29023 fi
29024 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
29025
29026 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29027 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29028 gl_next_as_first_directive='<'sys/stat.h'>'
29029 else
29030 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29031 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
29032 fi
29033 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
29034
29035
29036
29037
29038
29039
29040
29041
29042 WINDOWS_STAT_TIMESPEC=0
29043
29044
29045
29046
29047
29048
29049
29050
29051 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
29052 #include <sys/stat.h>
29053 "
29054 if test "x$ac_cv_type_nlink_t" = xyes; then :
29055
29056 else
29057
29058 $as_echo "#define nlink_t int" >>confdefs.h
29059
29060 fi
29061
29062
29063
29064
29065
29066
29067
29068
29069
29070
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085
29086
29087 if test $gl_cv_have_include_next = yes; then
29088 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
29089 else
29090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
29091 $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
29092 if ${gl_cv_next_sys_uio_h+:} false; then :
29093 $as_echo_n "(cached) " >&6
29094 else
29095
29096 if test $ac_cv_header_sys_uio_h = yes; then
29097
29098
29099
29100
29101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29102 /* end confdefs.h. */
29103 #include <sys/uio.h>
29104 _ACEOF
29105 case "$host_os" in
29106 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29107 *) gl_absname_cpp="$ac_cpp" ;;
29108 esac
29109
29110 case "$host_os" in
29111 mingw*)
29112 gl_dirsep_regex='[/\\]'
29113 ;;
29114 *)
29115 gl_dirsep_regex='\/'
29116 ;;
29117 esac
29118 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29119 gl_header_literal_regex=`echo 'sys/uio.h' \
29120 | sed -e "$gl_make_literal_regex_sed"`
29121 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29122 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29123 s|^/[^/]|//&|
29124 p
29125 q
29126 }'
29127
29128 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29129 sed -n "$gl_absolute_header_sed"`
29130
29131 gl_header=$gl_cv_absolute_sys_uio_h
29132 gl_cv_next_sys_uio_h='"'$gl_header'"'
29133 else
29134 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
29135 fi
29136
29137
29138 fi
29139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
29140 $as_echo "$gl_cv_next_sys_uio_h" >&6; }
29141 fi
29142 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
29143
29144 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29145 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29146 gl_next_as_first_directive='<'sys/uio.h'>'
29147 else
29148 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29149 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
29150 fi
29151 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
29152
29153
29154
29155
29156 if test $ac_cv_header_sys_uio_h = yes; then
29157 HAVE_SYS_UIO_H=1
29158 else
29159 HAVE_SYS_UIO_H=0
29160 fi
29161
29162
29163
29164
29165
29166 :
29167
29168
29169
29170
29171 cat >>confdefs.h <<_ACEOF
29172 #define GNULIB_TEMPNAME 1
29173 _ACEOF
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186 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,
29187 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
29188 been included before. */
29189 #if defined __MINGW32__
29190 # include <unistd.h>
29191 #endif
29192 #include <time.h>
29193
29194 "
29195 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
29196 ac_have_decl=1
29197 else
29198 ac_have_decl=0
29199 fi
29200
29201 cat >>confdefs.h <<_ACEOF
29202 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
29203 _ACEOF
29204
29205 if test $ac_cv_have_decl_localtime_r = no; then
29206 HAVE_DECL_LOCALTIME_R=0
29207 fi
29208
29209
29210 if test $ac_cv_func_localtime_r = yes; then
29211 HAVE_LOCALTIME_R=1
29212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
29213 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
29214 if ${gl_cv_time_r_posix+:} false; then :
29215 $as_echo_n "(cached) " >&6
29216 else
29217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29218 /* end confdefs.h. */
29219 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
29220 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
29221 been included before. */
29222 #if defined __MINGW32__
29223 # include <unistd.h>
29224 #endif
29225 #include <time.h>
29226
29227 int
29228 main ()
29229 {
29230 /* We don't need to append 'restrict's to the argument types,
29231 even though the POSIX signature has the 'restrict's,
29232 since C99 says they can't affect type compatibility. */
29233 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
29234 if (ptr) return 0;
29235 /* Check the return type is a pointer.
29236 On HP-UX 10 it is 'int'. */
29237 *localtime_r (0, 0);
29238 ;
29239 return 0;
29240 }
29241
29242 _ACEOF
29243 if ac_fn_c_try_compile "$LINENO"; then :
29244 gl_cv_time_r_posix=yes
29245 else
29246 gl_cv_time_r_posix=no
29247 fi
29248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29249
29250 fi
29251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
29252 $as_echo "$gl_cv_time_r_posix" >&6; }
29253 if test $gl_cv_time_r_posix = yes; then
29254 REPLACE_LOCALTIME_R=0
29255 else
29256 REPLACE_LOCALTIME_R=1
29257 fi
29258 else
29259 HAVE_LOCALTIME_R=0
29260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
29261 $as_echo_n "checking whether localtime_r exists as an inline function... " >&6; }
29262 if ${gl_cv_func_localtime_r_inline+:} false; then :
29263 $as_echo_n "(cached) " >&6
29264 else
29265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29266 /* end confdefs.h. */
29267 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
29268 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
29269 been included before. */
29270 #if defined __MINGW32__
29271 # include <unistd.h>
29272 #endif
29273 #include <time.h>
29274
29275 int
29276 main ()
29277 {
29278 time_t a;
29279 struct tm r;
29280 localtime_r (&a, &r);
29281
29282 ;
29283 return 0;
29284 }
29285
29286 _ACEOF
29287 if ac_fn_c_try_link "$LINENO"; then :
29288 gl_cv_func_localtime_r_inline=yes
29289 else
29290 gl_cv_func_localtime_r_inline=no
29291 fi
29292 rm -f core conftest.err conftest.$ac_objext \
29293 conftest$ac_exeext conftest.$ac_ext
29294
29295 fi
29296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
29297 $as_echo "$gl_cv_func_localtime_r_inline" >&6; }
29298 if test $gl_cv_func_localtime_r_inline = yes; then
29299 REPLACE_LOCALTIME_R=1
29300 fi
29301 fi
29302
29303 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
29304
29305
29306
29307
29308
29309
29310
29311
29312 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
29313
29314
29315 :
29316
29317 fi
29318
29319
29320
29321
29322
29323 GNULIB_TIME_R=1
29324
29325
29326
29327
29328
29329 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345 if test $gl_cv_have_include_next = yes; then
29346 gl_cv_next_unistd_h='<'unistd.h'>'
29347 else
29348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
29349 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
29350 if ${gl_cv_next_unistd_h+:} false; then :
29351 $as_echo_n "(cached) " >&6
29352 else
29353
29354 if test $ac_cv_header_unistd_h = yes; then
29355
29356
29357
29358
29359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29360 /* end confdefs.h. */
29361 #include <unistd.h>
29362 _ACEOF
29363 case "$host_os" in
29364 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29365 *) gl_absname_cpp="$ac_cpp" ;;
29366 esac
29367
29368 case "$host_os" in
29369 mingw*)
29370 gl_dirsep_regex='[/\\]'
29371 ;;
29372 *)
29373 gl_dirsep_regex='\/'
29374 ;;
29375 esac
29376 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29377 gl_header_literal_regex=`echo 'unistd.h' \
29378 | sed -e "$gl_make_literal_regex_sed"`
29379 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29380 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29381 s|^/[^/]|//&|
29382 p
29383 q
29384 }'
29385
29386 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29387 sed -n "$gl_absolute_header_sed"`
29388
29389 gl_header=$gl_cv_absolute_unistd_h
29390 gl_cv_next_unistd_h='"'$gl_header'"'
29391 else
29392 gl_cv_next_unistd_h='<'unistd.h'>'
29393 fi
29394
29395
29396 fi
29397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
29398 $as_echo "$gl_cv_next_unistd_h" >&6; }
29399 fi
29400 NEXT_UNISTD_H=$gl_cv_next_unistd_h
29401
29402 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29403 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29404 gl_next_as_first_directive='<'unistd.h'>'
29405 else
29406 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29407 gl_next_as_first_directive=$gl_cv_next_unistd_h
29408 fi
29409 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
29410
29411
29412
29413
29414 if test $ac_cv_header_unistd_h = yes; then
29415 HAVE_UNISTD_H=1
29416 else
29417 HAVE_UNISTD_H=0
29418 fi
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432 if test $ac_cv_have_decl_execvpe = no; then
29433 HAVE_DECL_EXECVPE=0
29434 fi
29435
29436
29437
29438
29439
29440
29441
29442 if test $ac_cv_have_decl_unsetenv = no; then
29443 HAVE_DECL_UNSETENV=0
29444 fi
29445 for ac_func in unsetenv
29446 do :
29447 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
29448 if test "x$ac_cv_func_unsetenv" = xyes; then :
29449 cat >>confdefs.h <<_ACEOF
29450 #define HAVE_UNSETENV 1
29451 _ACEOF
29452
29453 fi
29454 done
29455
29456 if test $ac_cv_func_unsetenv = no; then
29457 HAVE_UNSETENV=0
29458 else
29459 HAVE_UNSETENV=1
29460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
29461 $as_echo_n "checking for unsetenv() return type... " >&6; }
29462 if ${gt_cv_func_unsetenv_ret+:} false; then :
29463 $as_echo_n "(cached) " >&6
29464 else
29465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29466 /* end confdefs.h. */
29467
29468 #undef _BSD
29469 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
29470 #include <stdlib.h>
29471 extern
29472 #ifdef __cplusplus
29473 "C"
29474 #endif
29475 int unsetenv (const char *name);
29476
29477 int
29478 main ()
29479 {
29480
29481 ;
29482 return 0;
29483 }
29484 _ACEOF
29485 if ac_fn_c_try_compile "$LINENO"; then :
29486 gt_cv_func_unsetenv_ret='int'
29487 else
29488 gt_cv_func_unsetenv_ret='void'
29489 fi
29490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29491 fi
29492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
29493 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
29494 if test $gt_cv_func_unsetenv_ret = 'void'; then
29495
29496 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
29497
29498 REPLACE_UNSETENV=1
29499 fi
29500
29501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
29502 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
29503 if ${gl_cv_func_unsetenv_works+:} false; then :
29504 $as_echo_n "(cached) " >&6
29505 else
29506 if test "$cross_compiling" = yes; then :
29507 case "$host_os" in
29508 # Guess yes on glibc systems.
29509 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
29510 # If we don't know, obey --enable-cross-guesses.
29511 *) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
29512 esac
29513
29514 else
29515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29516 /* end confdefs.h. */
29517
29518 #include <stdlib.h>
29519 #include <errno.h>
29520 extern char **environ;
29521
29522
29523 $gl_mda_defines
29524
29525 int
29526 main ()
29527 {
29528
29529 char entry1[] = "a=1";
29530 char entry2[] = "b=2";
29531 char *env[] = { entry1, entry2, NULL };
29532 if (putenv ((char *) "a=1")) return 1;
29533 if (putenv (entry2)) return 2;
29534 entry2[0] = 'a';
29535 unsetenv ("a");
29536 if (getenv ("a")) return 3;
29537 if (!unsetenv ("") || errno != EINVAL) return 4;
29538 entry2[0] = 'b';
29539 environ = env;
29540 if (!getenv ("a")) return 5;
29541 entry2[0] = 'a';
29542 unsetenv ("a");
29543 if (getenv ("a")) return 6;
29544
29545 ;
29546 return 0;
29547 }
29548 _ACEOF
29549 if ac_fn_c_try_run "$LINENO"; then :
29550 gl_cv_func_unsetenv_works=yes
29551 else
29552 gl_cv_func_unsetenv_works=no
29553 fi
29554 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29555 conftest.$ac_objext conftest.beam conftest.$ac_ext
29556 fi
29557
29558
29559 fi
29560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
29561 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
29562 case "$gl_cv_func_unsetenv_works" in
29563 *yes) ;;
29564 *)
29565 REPLACE_UNSETENV=1
29566 ;;
29567 esac
29568 fi
29569
29570 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
29571
29572
29573
29574
29575
29576
29577
29578
29579 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
29580
29581
29582
29583
29584
29585 fi
29586
29587
29588
29589
29590
29591 GNULIB_UNSETENV=1
29592
29593
29594
29595
29596
29597 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613 if test $gl_cv_have_include_next = yes; then
29614 gl_cv_next_wchar_h='<'wchar.h'>'
29615 else
29616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
29617 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
29618 if ${gl_cv_next_wchar_h+:} false; then :
29619 $as_echo_n "(cached) " >&6
29620 else
29621
29622 if test $ac_cv_header_wchar_h = yes; then
29623
29624
29625
29626
29627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29628 /* end confdefs.h. */
29629 #include <wchar.h>
29630 _ACEOF
29631 case "$host_os" in
29632 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29633 *) gl_absname_cpp="$ac_cpp" ;;
29634 esac
29635
29636 case "$host_os" in
29637 mingw*)
29638 gl_dirsep_regex='[/\\]'
29639 ;;
29640 *)
29641 gl_dirsep_regex='\/'
29642 ;;
29643 esac
29644 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29645 gl_header_literal_regex=`echo 'wchar.h' \
29646 | sed -e "$gl_make_literal_regex_sed"`
29647 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29648 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29649 s|^/[^/]|//&|
29650 p
29651 q
29652 }'
29653
29654 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29655 sed -n "$gl_absolute_header_sed"`
29656
29657 gl_header=$gl_cv_absolute_wchar_h
29658 gl_cv_next_wchar_h='"'$gl_header'"'
29659 else
29660 gl_cv_next_wchar_h='<'wchar.h'>'
29661 fi
29662
29663
29664 fi
29665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
29666 $as_echo "$gl_cv_next_wchar_h" >&6; }
29667 fi
29668 NEXT_WCHAR_H=$gl_cv_next_wchar_h
29669
29670 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29671 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29672 gl_next_as_first_directive='<'wchar.h'>'
29673 else
29674 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29675 gl_next_as_first_directive=$gl_cv_next_wchar_h
29676 fi
29677 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
29678
29679
29680
29681
29682 if test $ac_cv_header_wchar_h = yes; then
29683 HAVE_WCHAR_H=1
29684 else
29685 HAVE_WCHAR_H=0
29686 fi
29687
29688
29689
29690
29691
29692 if test $gt_cv_c_wint_t = yes; then
29693 HAVE_WINT_T=1
29694 else
29695 HAVE_WINT_T=0
29696 fi
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707 ac_fn_c_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
29708 #include <wchar.h>
29709
29710 "
29711 if test "x$ac_cv_have_decl_wcsdup" = xyes; then :
29712 ac_have_decl=1
29713 else
29714 ac_have_decl=0
29715 fi
29716
29717 cat >>confdefs.h <<_ACEOF
29718 #define HAVE_DECL_WCSDUP $ac_have_decl
29719 _ACEOF
29720
29721 if test $ac_cv_have_decl_wcsdup = no; then
29722 HAVE_DECL_WCSDUP=0
29723 fi
29724
29725
29726
29727
29728
29729
29730 if test $ac_cv_func_iswcntrl = yes; then
29731 HAVE_ISWCNTRL=1
29732 else
29733 HAVE_ISWCNTRL=0
29734 fi
29735
29736
29737
29738 if test $gt_cv_c_wint_t = yes; then
29739 HAVE_WINT_T=1
29740 else
29741 HAVE_WINT_T=0
29742 fi
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756 if test $gl_cv_have_include_next = yes; then
29757 gl_cv_next_wctype_h='<'wctype.h'>'
29758 else
29759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
29760 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
29761 if ${gl_cv_next_wctype_h+:} false; then :
29762 $as_echo_n "(cached) " >&6
29763 else
29764
29765 if test $ac_cv_header_wctype_h = yes; then
29766
29767
29768
29769
29770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29771 /* end confdefs.h. */
29772 #include <wctype.h>
29773 _ACEOF
29774 case "$host_os" in
29775 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29776 *) gl_absname_cpp="$ac_cpp" ;;
29777 esac
29778
29779 case "$host_os" in
29780 mingw*)
29781 gl_dirsep_regex='[/\\]'
29782 ;;
29783 *)
29784 gl_dirsep_regex='\/'
29785 ;;
29786 esac
29787 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29788 gl_header_literal_regex=`echo 'wctype.h' \
29789 | sed -e "$gl_make_literal_regex_sed"`
29790 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29791 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29792 s|^/[^/]|//&|
29793 p
29794 q
29795 }'
29796
29797 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29798 sed -n "$gl_absolute_header_sed"`
29799
29800 gl_header=$gl_cv_absolute_wctype_h
29801 gl_cv_next_wctype_h='"'$gl_header'"'
29802 else
29803 gl_cv_next_wctype_h='<'wctype.h'>'
29804 fi
29805
29806
29807 fi
29808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
29809 $as_echo "$gl_cv_next_wctype_h" >&6; }
29810 fi
29811 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
29812
29813 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29814 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29815 gl_next_as_first_directive='<'wctype.h'>'
29816 else
29817 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29818 gl_next_as_first_directive=$gl_cv_next_wctype_h
29819 fi
29820 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
29821
29822
29823
29824
29825 if test $ac_cv_header_wctype_h = yes; then
29826 if test $ac_cv_func_iswcntrl = yes; then
29827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
29828 $as_echo_n "checking whether iswcntrl works... " >&6; }
29829 if ${gl_cv_func_iswcntrl_works+:} false; then :
29830 $as_echo_n "(cached) " >&6
29831 else
29832
29833 if test "$cross_compiling" = yes; then :
29834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29835 /* end confdefs.h. */
29836 #include <stdlib.h>
29837 #if __GNU_LIBRARY__ == 1
29838 Linux libc5 i18n is broken.
29839 #endif
29840 int
29841 main ()
29842 {
29843
29844 ;
29845 return 0;
29846 }
29847 _ACEOF
29848 if ac_fn_c_try_compile "$LINENO"; then :
29849 gl_cv_func_iswcntrl_works="guessing yes"
29850 else
29851 gl_cv_func_iswcntrl_works="guessing no"
29852 fi
29853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29854
29855 else
29856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29857 /* end confdefs.h. */
29858
29859 #include <wchar.h>
29860 #include <wctype.h>
29861 int main () { return iswprint ('x') == 0; }
29862
29863 _ACEOF
29864 if ac_fn_c_try_run "$LINENO"; then :
29865 gl_cv_func_iswcntrl_works=yes
29866 else
29867 gl_cv_func_iswcntrl_works=no
29868 fi
29869 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29870 conftest.$ac_objext conftest.beam conftest.$ac_ext
29871 fi
29872
29873
29874 fi
29875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
29876 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
29877 fi
29878 HAVE_WCTYPE_H=1
29879 else
29880 HAVE_WCTYPE_H=0
29881 fi
29882
29883
29884 if test $GNULIB_OVERRIDES_WINT_T = 1; then
29885 REPLACE_ISWCNTRL=1
29886 else
29887 case "$gl_cv_func_iswcntrl_works" in
29888 *yes) REPLACE_ISWCNTRL=0 ;;
29889 *) REPLACE_ISWCNTRL=1 ;;
29890 esac
29891 fi
29892
29893
29894 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
29895 :
29896 fi
29897
29898 if test $REPLACE_ISWCNTRL = 1; then
29899 REPLACE_TOWLOWER=1
29900 else
29901 for ac_func in towlower
29902 do :
29903 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
29904 if test "x$ac_cv_func_towlower" = xyes; then :
29905 cat >>confdefs.h <<_ACEOF
29906 #define HAVE_TOWLOWER 1
29907 _ACEOF
29908
29909 fi
29910 done
29911
29912 if test $ac_cv_func_towlower = yes; then
29913 REPLACE_TOWLOWER=0
29914 else
29915 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
29916 #if HAVE_WCTYPE_H
29917 # include <wctype.h>
29918 #endif
29919
29920 "
29921 if test "x$ac_cv_have_decl_towlower" = xyes; then :
29922 ac_have_decl=1
29923 else
29924 ac_have_decl=0
29925 fi
29926
29927 cat >>confdefs.h <<_ACEOF
29928 #define HAVE_DECL_TOWLOWER $ac_have_decl
29929 _ACEOF
29930
29931 if test $ac_cv_have_decl_towlower = yes; then
29932 REPLACE_TOWLOWER=1
29933 else
29934 REPLACE_TOWLOWER=0
29935 fi
29936 fi
29937 fi
29938
29939
29940 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
29941 :
29942 fi
29943
29944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
29945 $as_echo_n "checking for wctype_t... " >&6; }
29946 if ${gl_cv_type_wctype_t+:} false; then :
29947 $as_echo_n "(cached) " >&6
29948 else
29949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29950 /* end confdefs.h. */
29951 #include <wchar.h>
29952 #if HAVE_WCTYPE_H
29953 # include <wctype.h>
29954 #endif
29955 wctype_t a;
29956
29957 int
29958 main ()
29959 {
29960
29961 ;
29962 return 0;
29963 }
29964 _ACEOF
29965 if ac_fn_c_try_compile "$LINENO"; then :
29966 gl_cv_type_wctype_t=yes
29967 else
29968 gl_cv_type_wctype_t=no
29969 fi
29970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29971
29972 fi
29973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
29974 $as_echo "$gl_cv_type_wctype_t" >&6; }
29975 if test $gl_cv_type_wctype_t = no; then
29976 HAVE_WCTYPE_T=0
29977 fi
29978
29979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
29980 $as_echo_n "checking for wctrans_t... " >&6; }
29981 if ${gl_cv_type_wctrans_t+:} false; then :
29982 $as_echo_n "(cached) " >&6
29983 else
29984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29985 /* end confdefs.h. */
29986 #include <wchar.h>
29987 #include <wctype.h>
29988 wctrans_t a;
29989
29990 int
29991 main ()
29992 {
29993
29994 ;
29995 return 0;
29996 }
29997 _ACEOF
29998 if ac_fn_c_try_compile "$LINENO"; then :
29999 gl_cv_type_wctrans_t=yes
30000 else
30001 gl_cv_type_wctrans_t=no
30002 fi
30003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30004
30005 fi
30006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
30007 $as_echo "$gl_cv_type_wctrans_t" >&6; }
30008 if test $gl_cv_type_wctrans_t = no; then
30009 HAVE_WCTRANS_T=0
30010 fi
30011
30012
30013
30014
30015
30016
30017 case "$host_os" in
30018 mingw*)
30019
30020
30021
30022
30023
30024
30025
30026
30027 gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext"
30028
30029 ;;
30030 esac
30031
30032 case "$host_os" in
30033 mingw*)
30034
30035
30036
30037
30038
30039
30040
30041
30042 gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext"
30043
30044 ;;
30045 esac
30046
30047 case "$host_os" in
30048 mingw*)
30049
30050
30051
30052
30053
30054
30055
30056
30057 gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext"
30058
30059 ;;
30060 esac
30061
30062 case "$host_os" in
30063 mingw*)
30064
30065
30066
30067
30068
30069
30070
30071
30072 gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext"
30073
30074 ;;
30075 esac
30076
30077
30078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
30079 $as_echo_n "checking for wmemchr... " >&6; }
30080 if ${gl_cv_func_wmemchr+:} false; then :
30081 $as_echo_n "(cached) " >&6
30082 else
30083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30084 /* end confdefs.h. */
30085 #include <wchar.h>
30086
30087 int
30088 main ()
30089 {
30090 return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
30091 ;
30092 return 0;
30093 }
30094
30095 _ACEOF
30096 if ac_fn_c_try_link "$LINENO"; then :
30097 gl_cv_func_wmemchr=yes
30098 else
30099 gl_cv_func_wmemchr=no
30100 fi
30101 rm -f core conftest.err conftest.$ac_objext \
30102 conftest$ac_exeext conftest.$ac_ext
30103
30104 fi
30105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
30106 $as_echo "$gl_cv_func_wmemchr" >&6; }
30107 if test $gl_cv_func_wmemchr = no; then
30108 HAVE_WMEMCHR=0
30109 fi
30110
30111 if test $HAVE_WMEMCHR = 0; then
30112
30113
30114
30115
30116
30117
30118
30119
30120 gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext"
30121
30122 fi
30123
30124
30125
30126
30127
30128 GNULIB_WMEMCHR=1
30129
30130
30131
30132
30133
30134 $as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
30135
30136
30137
30138
30139
30140
30141
30142
30143
30144
30145
30146 if test $ac_cv_func_wmempcpy = no; then
30147 HAVE_WMEMPCPY=0
30148 fi
30149
30150 if test $HAVE_WMEMPCPY = 0; then
30151
30152
30153
30154
30155
30156
30157
30158
30159 gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext"
30160
30161 fi
30162
30163
30164
30165
30166
30167 GNULIB_WMEMPCPY=1
30168
30169
30170
30171
30172
30173 $as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
30174
30175
30176
30177 # End of code from modules
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187 gltests_libdeps=
30188 gltests_ltlibdeps=
30189
30190
30191
30192
30193
30194
30195
30196
30197
30198
30199 gl_source_base='tests'
30200 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
30201
30202 gl_module_indicator_condition=$gltests_WITNESS
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212 LIBGNU_LIBDEPS="$gl_libdeps"
30213
30214 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
30215
30216
30217
30218 am__api_version='1.15'
30219
30220 # Find a good install program. We prefer a C program (faster),
30221 # so one script is as good as another. But avoid the broken or
30222 # incompatible versions:
30223 # SysV /etc/install, /usr/sbin/install
30224 # SunOS /usr/etc/install
30225 # IRIX /sbin/install
30226 # AIX /bin/install
30227 # AmigaOS /C/install, which installs bootblocks on floppy discs
30228 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
30229 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
30230 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
30231 # OS/2's system install, which has a completely different semantic
30232 # ./install, which can be erroneously created by make from ./install.sh.
30233 # Reject install programs that cannot install multiple files.
30234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
30235 $as_echo_n "checking for a BSD-compatible install... " >&6; }
30236 if test -z "$INSTALL"; then
30237 if ${ac_cv_path_install+:} false; then :
30238 $as_echo_n "(cached) " >&6
30239 else
30240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30241 for as_dir in $PATH
30242 do
30243 IFS=$as_save_IFS
30244 test -z "$as_dir" && as_dir=.
30245 # Account for people who put trailing slashes in PATH elements.
30246 case $as_dir/ in #((
30247 ./ | .// | /[cC]/* | \
30248 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
30249 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
30250 /usr/ucb/* ) ;;
30251 *)
30252 # OSF1 and SCO ODT 3.0 have their own names for install.
30253 # Don't use installbsd from OSF since it installs stuff as root
30254 # by default.
30255 for ac_prog in ginstall scoinst install; do
30256 for ac_exec_ext in '' $ac_executable_extensions; do
30257 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
30258 if test $ac_prog = install &&
30259 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
30260 # AIX install. It has an incompatible calling convention.
30261 :
30262 elif test $ac_prog = install &&
30263 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
30264 # program-specific install script used by HP pwplus--don't use.
30265 :
30266 else
30267 rm -rf conftest.one conftest.two conftest.dir
30268 echo one > conftest.one
30269 echo two > conftest.two
30270 mkdir conftest.dir
30271 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
30272 test -s conftest.one && test -s conftest.two &&
30273 test -s conftest.dir/conftest.one &&
30274 test -s conftest.dir/conftest.two
30275 then
30276 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
30277 break 3
30278 fi
30279 fi
30280 fi
30281 done
30282 done
30283 ;;
30284 esac
30285
30286 done
30287 IFS=$as_save_IFS
30288
30289 rm -rf conftest.one conftest.two conftest.dir
30290
30291 fi
30292 if test "${ac_cv_path_install+set}" = set; then
30293 INSTALL=$ac_cv_path_install
30294 else
30295 # As a last resort, use the slow shell script. Don't cache a
30296 # value for INSTALL within a source directory, because that will
30297 # break other packages using the cache if that directory is
30298 # removed, or if the value is a relative name.
30299 INSTALL=$ac_install_sh
30300 fi
30301 fi
30302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
30303 $as_echo "$INSTALL" >&6; }
30304
30305 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
30306 # It thinks the first close brace ends the variable substitution.
30307 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
30308
30309 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
30310
30311 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
30312
30313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
30314 $as_echo_n "checking whether build environment is sane... " >&6; }
30315 # Reject unsafe characters in $srcdir or the absolute working directory
30316 # name. Accept space and tab only in the latter.
30317 am_lf='
30318 '
30319 case `pwd` in
30320 *[\\\"\#\$\&\'\`$am_lf]*)
30321 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
30322 esac
30323 case $srcdir in
30324 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
30325 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
30326 esac
30327
30328 # Do 'set' in a subshell so we don't clobber the current shell's
30329 # arguments. Must try -L first in case configure is actually a
30330 # symlink; some systems play weird games with the mod time of symlinks
30331 # (eg FreeBSD returns the mod time of the symlink's containing
30332 # directory).
30333 if (
30334 am_has_slept=no
30335 for am_try in 1 2; do
30336 echo "timestamp, slept: $am_has_slept" > conftest.file
30337 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
30338 if test "$*" = "X"; then
30339 # -L didn't work.
30340 set X `ls -t "$srcdir/configure" conftest.file`
30341 fi
30342 if test "$*" != "X $srcdir/configure conftest.file" \
30343 && test "$*" != "X conftest.file $srcdir/configure"; then
30344
30345 # If neither matched, then we have a broken ls. This can happen
30346 # if, for instance, CONFIG_SHELL is bash and it inherits a
30347 # broken ls alias from the environment. This has actually
30348 # happened. Such a system could not be considered "sane".
30349 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
30350 alias in your environment" "$LINENO" 5
30351 fi
30352 if test "$2" = conftest.file || test $am_try -eq 2; then
30353 break
30354 fi
30355 # Just in case.
30356 sleep 1
30357 am_has_slept=yes
30358 done
30359 test "$2" = conftest.file
30360 )
30361 then
30362 # Ok.
30363 :
30364 else
30365 as_fn_error $? "newly created file is older than distributed files!
30366 Check your system clock" "$LINENO" 5
30367 fi
30368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30369 $as_echo "yes" >&6; }
30370 # If we didn't sleep, we still need to ensure time stamps of config.status and
30371 # generated files are strictly newer.
30372 am_sleep_pid=
30373 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
30374 ( sleep 1 ) &
30375 am_sleep_pid=$!
30376 fi
30377
30378 rm -f conftest.file
30379
30380 test "$program_prefix" != NONE &&
30381 program_transform_name="s&^&$program_prefix&;$program_transform_name"
30382 # Use a double $ so make ignores it.
30383 test "$program_suffix" != NONE &&
30384 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
30385 # Double any \ or $.
30386 # By default was `s,x,x', remove it if useless.
30387 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
30388 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
30389
30390 # Expand $ac_aux_dir to an absolute path.
30391 am_aux_dir=`cd "$ac_aux_dir" && pwd`
30392
30393 if test x"${MISSING+set}" != xset; then
30394 case $am_aux_dir in
30395 *\ * | *\ *)
30396 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
30397 *)
30398 MISSING="\${SHELL} $am_aux_dir/missing" ;;
30399 esac
30400 fi
30401 # Use eval to expand $SHELL
30402 if eval "$MISSING --is-lightweight"; then
30403 am_missing_run="$MISSING "
30404 else
30405 am_missing_run=
30406 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
30407 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
30408 fi
30409
30410 if test x"${install_sh+set}" != xset; then
30411 case $am_aux_dir in
30412 *\ * | *\ *)
30413 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
30414 *)
30415 install_sh="\${SHELL} $am_aux_dir/install-sh"
30416 esac
30417 fi
30418
30419 # Installed binaries are usually stripped using 'strip' when the user
30420 # run "make install-strip". However 'strip' might not be the right
30421 # tool to use in cross-compilation environments, therefore Automake
30422 # will honor the 'STRIP' environment variable to overrule this program.
30423 if test "$cross_compiling" != no; then
30424 if test -n "$ac_tool_prefix"; then
30425 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
30426 set dummy ${ac_tool_prefix}strip; ac_word=$2
30427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30428 $as_echo_n "checking for $ac_word... " >&6; }
30429 if ${ac_cv_prog_STRIP+:} false; then :
30430 $as_echo_n "(cached) " >&6
30431 else
30432 if test -n "$STRIP"; then
30433 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
30434 else
30435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30436 for as_dir in $PATH
30437 do
30438 IFS=$as_save_IFS
30439 test -z "$as_dir" && as_dir=.
30440 for ac_exec_ext in '' $ac_executable_extensions; do
30441 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30442 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
30443 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30444 break 2
30445 fi
30446 done
30447 done
30448 IFS=$as_save_IFS
30449
30450 fi
30451 fi
30452 STRIP=$ac_cv_prog_STRIP
30453 if test -n "$STRIP"; then
30454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
30455 $as_echo "$STRIP" >&6; }
30456 else
30457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30458 $as_echo "no" >&6; }
30459 fi
30460
30461
30462 fi
30463 if test -z "$ac_cv_prog_STRIP"; then
30464 ac_ct_STRIP=$STRIP
30465 # Extract the first word of "strip", so it can be a program name with args.
30466 set dummy strip; ac_word=$2
30467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30468 $as_echo_n "checking for $ac_word... " >&6; }
30469 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
30470 $as_echo_n "(cached) " >&6
30471 else
30472 if test -n "$ac_ct_STRIP"; then
30473 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
30474 else
30475 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30476 for as_dir in $PATH
30477 do
30478 IFS=$as_save_IFS
30479 test -z "$as_dir" && as_dir=.
30480 for ac_exec_ext in '' $ac_executable_extensions; do
30481 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30482 ac_cv_prog_ac_ct_STRIP="strip"
30483 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30484 break 2
30485 fi
30486 done
30487 done
30488 IFS=$as_save_IFS
30489
30490 fi
30491 fi
30492 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
30493 if test -n "$ac_ct_STRIP"; then
30494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
30495 $as_echo "$ac_ct_STRIP" >&6; }
30496 else
30497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30498 $as_echo "no" >&6; }
30499 fi
30500
30501 if test "x$ac_ct_STRIP" = x; then
30502 STRIP=":"
30503 else
30504 case $cross_compiling:$ac_tool_warned in
30505 yes:)
30506 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30507 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30508 ac_tool_warned=yes ;;
30509 esac
30510 STRIP=$ac_ct_STRIP
30511 fi
30512 else
30513 STRIP="$ac_cv_prog_STRIP"
30514 fi
30515
30516 fi
30517 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
30518
30519 for ac_prog in gawk mawk nawk awk
30520 do
30521 # Extract the first word of "$ac_prog", so it can be a program name with args.
30522 set dummy $ac_prog; ac_word=$2
30523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30524 $as_echo_n "checking for $ac_word... " >&6; }
30525 if ${ac_cv_prog_AWK+:} false; then :
30526 $as_echo_n "(cached) " >&6
30527 else
30528 if test -n "$AWK"; then
30529 ac_cv_prog_AWK="$AWK" # Let the user override the test.
30530 else
30531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30532 for as_dir in $PATH
30533 do
30534 IFS=$as_save_IFS
30535 test -z "$as_dir" && as_dir=.
30536 for ac_exec_ext in '' $ac_executable_extensions; do
30537 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30538 ac_cv_prog_AWK="$ac_prog"
30539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30540 break 2
30541 fi
30542 done
30543 done
30544 IFS=$as_save_IFS
30545
30546 fi
30547 fi
30548 AWK=$ac_cv_prog_AWK
30549 if test -n "$AWK"; then
30550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
30551 $as_echo "$AWK" >&6; }
30552 else
30553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30554 $as_echo "no" >&6; }
30555 fi
30556
30557
30558 test -n "$AWK" && break
30559 done
30560
30561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
30562 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
30563 set x ${MAKE-make}
30564 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
30565 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
30566 $as_echo_n "(cached) " >&6
30567 else
30568 cat >conftest.make <<\_ACEOF
30569 SHELL = /bin/sh
30570 all:
30571 @echo '@@@%%%=$(MAKE)=@@@%%%'
30572 _ACEOF
30573 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30574 case `${MAKE-make} -f conftest.make 2>/dev/null` in
30575 *@@@%%%=?*=@@@%%%*)
30576 eval ac_cv_prog_make_${ac_make}_set=yes;;
30577 *)
30578 eval ac_cv_prog_make_${ac_make}_set=no;;
30579 esac
30580 rm -f conftest.make
30581 fi
30582 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
30583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30584 $as_echo "yes" >&6; }
30585 SET_MAKE=
30586 else
30587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30588 $as_echo "no" >&6; }
30589 SET_MAKE="MAKE=${MAKE-make}"
30590 fi
30591
30592 rm -rf .tst 2>/dev/null
30593 mkdir .tst 2>/dev/null
30594 if test -d .tst; then
30595 am__leading_dot=.
30596 else
30597 am__leading_dot=_
30598 fi
30599 rmdir .tst 2>/dev/null
30600
30601 DEPDIR="${am__leading_dot}deps"
30602
30603 ac_config_commands="$ac_config_commands depfiles"
30604
30605
30606 am_make=${MAKE-make}
30607 cat > confinc << 'END'
30608 am__doit:
30609 @echo this is the am__doit target
30610 .PHONY: am__doit
30611 END
30612 # If we don't find an include directive, just comment out the code.
30613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
30614 $as_echo_n "checking for style of include used by $am_make... " >&6; }
30615 am__include="#"
30616 am__quote=
30617 _am_result=none
30618 # First try GNU make style include.
30619 echo "include confinc" > confmf
30620 # Ignore all kinds of additional output from 'make'.
30621 case `$am_make -s -f confmf 2> /dev/null` in #(
30622 *the\ am__doit\ target*)
30623 am__include=include
30624 am__quote=
30625 _am_result=GNU
30626 ;;
30627 esac
30628 # Now try BSD make style include.
30629 if test "$am__include" = "#"; then
30630 echo '.include "confinc"' > confmf
30631 case `$am_make -s -f confmf 2> /dev/null` in #(
30632 *the\ am__doit\ target*)
30633 am__include=.include
30634 am__quote="\""
30635 _am_result=BSD
30636 ;;
30637 esac
30638 fi
30639
30640
30641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
30642 $as_echo "$_am_result" >&6; }
30643 rm -f confinc confmf
30644
30645 # Check whether --enable-dependency-tracking was given.
30646 if test "${enable_dependency_tracking+set}" = set; then :
30647 enableval=$enable_dependency_tracking;
30648 fi
30649
30650 if test "x$enable_dependency_tracking" != xno; then
30651 am_depcomp="$ac_aux_dir/depcomp"
30652 AMDEPBACKSLASH='\'
30653 am__nodep='_no'
30654 fi
30655 if test "x$enable_dependency_tracking" != xno; then
30656 AMDEP_TRUE=
30657 AMDEP_FALSE='#'
30658 else
30659 AMDEP_TRUE='#'
30660 AMDEP_FALSE=
30661 fi
30662
30663
30664 # Check whether --enable-silent-rules was given.
30665 if test "${enable_silent_rules+set}" = set; then :
30666 enableval=$enable_silent_rules;
30667 fi
30668
30669 case $enable_silent_rules in # (((
30670 yes) AM_DEFAULT_VERBOSITY=0;;
30671 no) AM_DEFAULT_VERBOSITY=1;;
30672 *) AM_DEFAULT_VERBOSITY=1;;
30673 esac
30674 am_make=${MAKE-make}
30675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
30676 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
30677 if ${am_cv_make_support_nested_variables+:} false; then :
30678 $as_echo_n "(cached) " >&6
30679 else
30680 if $as_echo 'TRUE=$(BAR$(V))
30681 BAR0=false
30682 BAR1=true
30683 V=1
30684 am__doit:
30685 @$(TRUE)
30686 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
30687 am_cv_make_support_nested_variables=yes
30688 else
30689 am_cv_make_support_nested_variables=no
30690 fi
30691 fi
30692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
30693 $as_echo "$am_cv_make_support_nested_variables" >&6; }
30694 if test $am_cv_make_support_nested_variables = yes; then
30695 AM_V='$(V)'
30696 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
30697 else
30698 AM_V=$AM_DEFAULT_VERBOSITY
30699 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
30700 fi
30701 AM_BACKSLASH='\'
30702
30703 if test "`cd $srcdir && pwd`" != "`pwd`"; then
30704 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
30705 # is not polluted with repeated "-I."
30706 am__isrc=' -I$(srcdir)'
30707 # test to see if srcdir already configured
30708 if test -f $srcdir/config.status; then
30709 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
30710 fi
30711 fi
30712
30713 # test whether we have cygpath
30714 if test -z "$CYGPATH_W"; then
30715 if (cygpath --version) >/dev/null 2>/dev/null; then
30716 CYGPATH_W='cygpath -w'
30717 else
30718 CYGPATH_W=echo
30719 fi
30720 fi
30721
30722
30723 # Define the identity of the package.
30724 PACKAGE='libgnu'
30725 VERSION='UNUSED-VERSION'
30726
30727
30728 # Some tools Automake needs.
30729
30730 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
30731
30732
30733 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
30734
30735
30736 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
30737
30738
30739 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
30740
30741
30742 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
30743
30744 # For better backward compatibility. To be removed once Automake 1.9.x
30745 # dies out for good. For more background, see:
30746 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
30747 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
30748 mkdir_p='$(MKDIR_P)'
30749
30750 # We need awk for the "check" target (and possibly the TAP driver). The
30751 # system "awk" is bad on some platforms.
30752 # Always define AMTAR for backward compatibility. Yes, it's still used
30753 # in the wild :-( We should find a proper way to deprecate it ...
30754 AMTAR='$${TAR-tar}'
30755
30756
30757 # We'll loop over all known methods to create a tar archive until one works.
30758 _am_tools='gnutar pax cpio none'
30759
30760 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
30761
30762
30763
30764
30765
30766 depcc="$CC" am_compiler_list=
30767
30768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
30769 $as_echo_n "checking dependency style of $depcc... " >&6; }
30770 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
30771 $as_echo_n "(cached) " >&6
30772 else
30773 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
30774 # We make a subdir and do the tests there. Otherwise we can end up
30775 # making bogus files that we don't know about and never remove. For
30776 # instance it was reported that on HP-UX the gcc test will end up
30777 # making a dummy file named 'D' -- because '-MD' means "put the output
30778 # in D".
30779 rm -rf conftest.dir
30780 mkdir conftest.dir
30781 # Copy depcomp to subdir because otherwise we won't find it if we're
30782 # using a relative directory.
30783 cp "$am_depcomp" conftest.dir
30784 cd conftest.dir
30785 # We will build objects and dependencies in a subdirectory because
30786 # it helps to detect inapplicable dependency modes. For instance
30787 # both Tru64's cc and ICC support -MD to output dependencies as a
30788 # side effect of compilation, but ICC will put the dependencies in
30789 # the current directory while Tru64 will put them in the object
30790 # directory.
30791 mkdir sub
30792
30793 am_cv_CC_dependencies_compiler_type=none
30794 if test "$am_compiler_list" = ""; then
30795 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
30796 fi
30797 am__universal=false
30798 case " $depcc " in #(
30799 *\ -arch\ *\ -arch\ *) am__universal=true ;;
30800 esac
30801
30802 for depmode in $am_compiler_list; do
30803 # Setup a source with many dependencies, because some compilers
30804 # like to wrap large dependency lists on column 80 (with \), and
30805 # we should not choose a depcomp mode which is confused by this.
30806 #
30807 # We need to recreate these files for each test, as the compiler may
30808 # overwrite some of them when testing with obscure command lines.
30809 # This happens at least with the AIX C compiler.
30810 : > sub/conftest.c
30811 for i in 1 2 3 4 5 6; do
30812 echo '#include "conftst'$i'.h"' >> sub/conftest.c
30813 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
30814 # Solaris 10 /bin/sh.
30815 echo '/* dummy */' > sub/conftst$i.h
30816 done
30817 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
30818
30819 # We check with '-c' and '-o' for the sake of the "dashmstdout"
30820 # mode. It turns out that the SunPro C++ compiler does not properly
30821 # handle '-M -o', and we need to detect this. Also, some Intel
30822 # versions had trouble with output in subdirs.
30823 am__obj=sub/conftest.${OBJEXT-o}
30824 am__minus_obj="-o $am__obj"
30825 case $depmode in
30826 gcc)
30827 # This depmode causes a compiler race in universal mode.
30828 test "$am__universal" = false || continue
30829 ;;
30830 nosideeffect)
30831 # After this tag, mechanisms are not by side-effect, so they'll
30832 # only be used when explicitly requested.
30833 if test "x$enable_dependency_tracking" = xyes; then
30834 continue
30835 else
30836 break
30837 fi
30838 ;;
30839 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
30840 # This compiler won't grok '-c -o', but also, the minuso test has
30841 # not run yet. These depmodes are late enough in the game, and
30842 # so weak that their functioning should not be impacted.
30843 am__obj=conftest.${OBJEXT-o}
30844 am__minus_obj=
30845 ;;
30846 none) break ;;
30847 esac
30848 if depmode=$depmode \
30849 source=sub/conftest.c object=$am__obj \
30850 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
30851 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
30852 >/dev/null 2>conftest.err &&
30853 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
30854 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
30855 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
30856 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
30857 # icc doesn't choke on unknown options, it will just issue warnings
30858 # or remarks (even with -Werror). So we grep stderr for any message
30859 # that says an option was ignored or not supported.
30860 # When given -MP, icc 7.0 and 7.1 complain thusly:
30861 # icc: Command line warning: ignoring option '-M'; no argument required
30862 # The diagnosis changed in icc 8.0:
30863 # icc: Command line remark: option '-MP' not supported
30864 if (grep 'ignoring option' conftest.err ||
30865 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
30866 am_cv_CC_dependencies_compiler_type=$depmode
30867 break
30868 fi
30869 fi
30870 done
30871
30872 cd ..
30873 rm -rf conftest.dir
30874 else
30875 am_cv_CC_dependencies_compiler_type=none
30876 fi
30877
30878 fi
30879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
30880 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
30881 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
30882
30883 if
30884 test "x$enable_dependency_tracking" != xno \
30885 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
30886 am__fastdepCC_TRUE=
30887 am__fastdepCC_FALSE='#'
30888 else
30889 am__fastdepCC_TRUE='#'
30890 am__fastdepCC_FALSE=
30891 fi
30892
30893
30894
30895 # POSIX will say in a future version that running "rm -f" with no argument
30896 # is OK; and we want to be able to make that assumption in our Makefile
30897 # recipes. So use an aggressive probe to check that the usage we want is
30898 # actually supported "in the wild" to an acceptable degree.
30899 # See automake bug#10828.
30900 # To make any issue more visible, cause the running configure to be aborted
30901 # by default if the 'rm' program in use doesn't match our expectations; the
30902 # user can still override this though.
30903 if rm -f && rm -fr && rm -rf; then : OK; else
30904 cat >&2 <<'END'
30905 Oops!
30906
30907 Your 'rm' program seems unable to run without file operands specified
30908 on the command line, even when the '-f' option is present. This is contrary
30909 to the behaviour of most rm programs out there, and not conforming with
30910 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
30911
30912 Please tell bug-automake@gnu.org about your system, including the value
30913 of your $PATH and any error possibly output before this message. This
30914 can help us improve future automake versions.
30915
30916 END
30917 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
30918 echo 'Configuration will proceed anyway, since you have set the' >&2
30919 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
30920 echo >&2
30921 else
30922 cat >&2 <<'END'
30923 Aborting the configuration process, to ensure you take notice of the issue.
30924
30925 You can download and install GNU coreutils to get an 'rm' implementation
30926 that behaves properly: <http://www.gnu.org/software/coreutils/>.
30927
30928 If you want to complete the configuration process using your problematic
30929 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
30930 to "yes", and re-run configure.
30931
30932 END
30933 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
30934 fi
30935 fi
30936
30937
30938 # Check whether --enable-silent-rules was given.
30939 if test "${enable_silent_rules+set}" = set; then :
30940 enableval=$enable_silent_rules;
30941 fi
30942
30943 case $enable_silent_rules in # (((
30944 yes) AM_DEFAULT_VERBOSITY=0;;
30945 no) AM_DEFAULT_VERBOSITY=1;;
30946 *) AM_DEFAULT_VERBOSITY=0;;
30947 esac
30948 am_make=${MAKE-make}
30949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
30950 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
30951 if ${am_cv_make_support_nested_variables+:} false; then :
30952 $as_echo_n "(cached) " >&6
30953 else
30954 if $as_echo 'TRUE=$(BAR$(V))
30955 BAR0=false
30956 BAR1=true
30957 V=1
30958 am__doit:
30959 @$(TRUE)
30960 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
30961 am_cv_make_support_nested_variables=yes
30962 else
30963 am_cv_make_support_nested_variables=no
30964 fi
30965 fi
30966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
30967 $as_echo "$am_cv_make_support_nested_variables" >&6; }
30968 if test $am_cv_make_support_nested_variables = yes; then
30969 AM_V='$(V)'
30970 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
30971 else
30972 AM_V=$AM_DEFAULT_VERBOSITY
30973 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
30974 fi
30975 AM_BACKSLASH='\'
30976
30977
30978 # --------------------- #
30979 # Checks for programs. #
30980 # --------------------- #
30981
30982
30983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
30984 $as_echo_n "checking whether ln -s works... " >&6; }
30985 LN_S=$as_ln_s
30986 if test "$LN_S" = "ln -s"; then
30987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30988 $as_echo "yes" >&6; }
30989 else
30990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
30991 $as_echo "no, using $LN_S" >&6; }
30992 fi
30993
30994 if test -n "$ac_tool_prefix"; then
30995 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
30996 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
30997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30998 $as_echo_n "checking for $ac_word... " >&6; }
30999 if ${ac_cv_prog_RANLIB+:} false; then :
31000 $as_echo_n "(cached) " >&6
31001 else
31002 if test -n "$RANLIB"; then
31003 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
31004 else
31005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31006 for as_dir in $PATH
31007 do
31008 IFS=$as_save_IFS
31009 test -z "$as_dir" && as_dir=.
31010 for ac_exec_ext in '' $ac_executable_extensions; do
31011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31012 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
31013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31014 break 2
31015 fi
31016 done
31017 done
31018 IFS=$as_save_IFS
31019
31020 fi
31021 fi
31022 RANLIB=$ac_cv_prog_RANLIB
31023 if test -n "$RANLIB"; then
31024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
31025 $as_echo "$RANLIB" >&6; }
31026 else
31027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31028 $as_echo "no" >&6; }
31029 fi
31030
31031
31032 fi
31033 if test -z "$ac_cv_prog_RANLIB"; then
31034 ac_ct_RANLIB=$RANLIB
31035 # Extract the first word of "ranlib", so it can be a program name with args.
31036 set dummy ranlib; ac_word=$2
31037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31038 $as_echo_n "checking for $ac_word... " >&6; }
31039 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
31040 $as_echo_n "(cached) " >&6
31041 else
31042 if test -n "$ac_ct_RANLIB"; then
31043 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
31044 else
31045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31046 for as_dir in $PATH
31047 do
31048 IFS=$as_save_IFS
31049 test -z "$as_dir" && as_dir=.
31050 for ac_exec_ext in '' $ac_executable_extensions; do
31051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31052 ac_cv_prog_ac_ct_RANLIB="ranlib"
31053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31054 break 2
31055 fi
31056 done
31057 done
31058 IFS=$as_save_IFS
31059
31060 fi
31061 fi
31062 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
31063 if test -n "$ac_ct_RANLIB"; then
31064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
31065 $as_echo "$ac_ct_RANLIB" >&6; }
31066 else
31067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31068 $as_echo "no" >&6; }
31069 fi
31070
31071 if test "x$ac_ct_RANLIB" = x; then
31072 RANLIB=":"
31073 else
31074 case $cross_compiling:$ac_tool_warned in
31075 yes:)
31076 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31077 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31078 ac_tool_warned=yes ;;
31079 esac
31080 RANLIB=$ac_ct_RANLIB
31081 fi
31082 else
31083 RANLIB="$ac_cv_prog_RANLIB"
31084 fi
31085
31086
31087 if test -n "$ac_tool_prefix"; then
31088 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
31089 set dummy ${ac_tool_prefix}ar; ac_word=$2
31090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31091 $as_echo_n "checking for $ac_word... " >&6; }
31092 if ${ac_cv_prog_AR+:} false; then :
31093 $as_echo_n "(cached) " >&6
31094 else
31095 if test -n "$AR"; then
31096 ac_cv_prog_AR="$AR" # Let the user override the test.
31097 else
31098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31099 for as_dir in $PATH
31100 do
31101 IFS=$as_save_IFS
31102 test -z "$as_dir" && as_dir=.
31103 for ac_exec_ext in '' $ac_executable_extensions; do
31104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31105 ac_cv_prog_AR="${ac_tool_prefix}ar"
31106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31107 break 2
31108 fi
31109 done
31110 done
31111 IFS=$as_save_IFS
31112
31113 fi
31114 fi
31115 AR=$ac_cv_prog_AR
31116 if test -n "$AR"; then
31117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
31118 $as_echo "$AR" >&6; }
31119 else
31120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31121 $as_echo "no" >&6; }
31122 fi
31123
31124
31125 fi
31126 if test -z "$ac_cv_prog_AR"; then
31127 ac_ct_AR=$AR
31128 # Extract the first word of "ar", so it can be a program name with args.
31129 set dummy ar; ac_word=$2
31130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31131 $as_echo_n "checking for $ac_word... " >&6; }
31132 if ${ac_cv_prog_ac_ct_AR+:} false; then :
31133 $as_echo_n "(cached) " >&6
31134 else
31135 if test -n "$ac_ct_AR"; then
31136 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
31137 else
31138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31139 for as_dir in $PATH
31140 do
31141 IFS=$as_save_IFS
31142 test -z "$as_dir" && as_dir=.
31143 for ac_exec_ext in '' $ac_executable_extensions; do
31144 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31145 ac_cv_prog_ac_ct_AR="ar"
31146 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31147 break 2
31148 fi
31149 done
31150 done
31151 IFS=$as_save_IFS
31152
31153 fi
31154 fi
31155 ac_ct_AR=$ac_cv_prog_ac_ct_AR
31156 if test -n "$ac_ct_AR"; then
31157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
31158 $as_echo "$ac_ct_AR" >&6; }
31159 else
31160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31161 $as_echo "no" >&6; }
31162 fi
31163
31164 if test "x$ac_ct_AR" = x; then
31165 AR=""
31166 else
31167 case $cross_compiling:$ac_tool_warned in
31168 yes:)
31169 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31170 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31171 ac_tool_warned=yes ;;
31172 esac
31173 AR=$ac_ct_AR
31174 fi
31175 else
31176 AR="$ac_cv_prog_AR"
31177 fi
31178
31179
31180 # ---------------------- #
31181 # Checks for libraries. #
31182 # ---------------------- #
31183
31184 ac_config_files="$ac_config_files Makefile.gnulib.inc"
31185
31186
31187 ac_config_files="$ac_config_files Makefile import/Makefile"
31188
31189 ac_config_commands="$ac_config_commands default"
31190
31191 cat >confcache <<\_ACEOF
31192 # This file is a shell script that caches the results of configure
31193 # tests run on this system so they can be shared between configure
31194 # scripts and configure runs, see configure's option --config-cache.
31195 # It is not useful on other systems. If it contains results you don't
31196 # want to keep, you may remove or edit it.
31197 #
31198 # config.status only pays attention to the cache file if you give it
31199 # the --recheck option to rerun configure.
31200 #
31201 # `ac_cv_env_foo' variables (set or unset) will be overridden when
31202 # loading this file, other *unset* `ac_cv_foo' will be assigned the
31203 # following values.
31204
31205 _ACEOF
31206
31207 # The following way of writing the cache mishandles newlines in values,
31208 # but we know of no workaround that is simple, portable, and efficient.
31209 # So, we kill variables containing newlines.
31210 # Ultrix sh set writes to stderr and can't be redirected directly,
31211 # and sets the high bit in the cache file unless we assign to the vars.
31212 (
31213 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31214 eval ac_val=\$$ac_var
31215 case $ac_val in #(
31216 *${as_nl}*)
31217 case $ac_var in #(
31218 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31219 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31220 esac
31221 case $ac_var in #(
31222 _ | IFS | as_nl) ;; #(
31223 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31224 *) { eval $ac_var=; unset $ac_var;} ;;
31225 esac ;;
31226 esac
31227 done
31228
31229 (set) 2>&1 |
31230 case $as_nl`(ac_space=' '; set) 2>&1` in #(
31231 *${as_nl}ac_space=\ *)
31232 # `set' does not quote correctly, so add quotes: double-quote
31233 # substitution turns \\\\ into \\, and sed turns \\ into \.
31234 sed -n \
31235 "s/'/'\\\\''/g;
31236 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31237 ;; #(
31238 *)
31239 # `set' quotes correctly as required by POSIX, so do not add quotes.
31240 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31241 ;;
31242 esac |
31243 sort
31244 ) |
31245 sed '
31246 /^ac_cv_env_/b end
31247 t clear
31248 :clear
31249 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31250 t end
31251 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31252 :end' >>confcache
31253 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31254 if test -w "$cache_file"; then
31255 if test "x$cache_file" != "x/dev/null"; then
31256 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31257 $as_echo "$as_me: updating cache $cache_file" >&6;}
31258 if test ! -f "$cache_file" || test -h "$cache_file"; then
31259 cat confcache >"$cache_file"
31260 else
31261 case $cache_file in #(
31262 */* | ?:*)
31263 mv -f confcache "$cache_file"$$ &&
31264 mv -f "$cache_file"$$ "$cache_file" ;; #(
31265 *)
31266 mv -f confcache "$cache_file" ;;
31267 esac
31268 fi
31269 fi
31270 else
31271 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31272 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31273 fi
31274 fi
31275 rm -f confcache
31276
31277 test "x$prefix" = xNONE && prefix=$ac_default_prefix
31278 # Let make expand exec_prefix.
31279 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31280
31281 DEFS=-DHAVE_CONFIG_H
31282
31283 ac_libobjs=
31284 ac_ltlibobjs=
31285 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31286 # 1. Remove the extension, and $U if already installed.
31287 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31288 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31289 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
31290 # will be set to the directory where LIBOBJS objects are built.
31291 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31292 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31293 done
31294 LIBOBJS=$ac_libobjs
31295
31296 LTLIBOBJS=$ac_ltlibobjs
31297
31298
31299 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
31300 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
31301 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31302 fi
31303 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
31304 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
31305 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31306 fi
31307 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
31308 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
31309 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31310 fi
31311 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
31312 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
31313 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31314 fi
31315 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
31316 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
31317 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31318 fi
31319 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
31320 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
31321 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31322 fi
31323 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
31324 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
31325 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31326 fi
31327 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
31328 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
31329 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31330 fi
31331 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
31332 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
31333 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31334 fi
31335 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
31336 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
31337 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31338 fi
31339 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
31340 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
31341 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31342 fi
31343 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
31344 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
31345 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31346 fi
31347
31348
31349 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
31350 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
31351 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31352 fi
31353 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
31354 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
31355 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31356 fi
31357 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
31358 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
31359 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31360 fi
31361 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
31362 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
31363 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31364 fi
31365 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
31366 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
31367 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31368 fi
31369
31370 gl_libobjs=
31371 gl_ltlibobjs=
31372 if test -n "$gl_LIBOBJS"; then
31373 # Remove the extension.
31374 sed_drop_objext='s/\.o$//;s/\.obj$//'
31375 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
31376 gl_libobjs="$gl_libobjs $i.$ac_objext"
31377 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
31378 done
31379 fi
31380 gl_LIBOBJS=$gl_libobjs
31381
31382 gl_LTLIBOBJS=$gl_ltlibobjs
31383
31384
31385
31386 gltests_libobjs=
31387 gltests_ltlibobjs=
31388 if test -n "$gltests_LIBOBJS"; then
31389 # Remove the extension.
31390 sed_drop_objext='s/\.o$//;s/\.obj$//'
31391 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
31392 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
31393 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
31394 done
31395 fi
31396 gltests_LIBOBJS=$gltests_libobjs
31397
31398 gltests_LTLIBOBJS=$gltests_ltlibobjs
31399
31400
31401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
31402 $as_echo_n "checking that generated files are newer than configure... " >&6; }
31403 if test -n "$am_sleep_pid"; then
31404 # Hide warnings about reused PIDs.
31405 wait $am_sleep_pid 2>/dev/null
31406 fi
31407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
31408 $as_echo "done" >&6; }
31409 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
31410 as_fn_error $? "conditional \"AMDEP\" was never defined.
31411 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31412 fi
31413 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
31414 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
31415 Usually this means the macro was only invoked conditionally." "$LINENO" 5
31416 fi
31417 if test -n "$EXEEXT"; then
31418 am__EXEEXT_TRUE=
31419 am__EXEEXT_FALSE='#'
31420 else
31421 am__EXEEXT_TRUE='#'
31422 am__EXEEXT_FALSE=
31423 fi
31424
31425
31426 : "${CONFIG_STATUS=./config.status}"
31427 ac_write_fail=0
31428 ac_clean_files_save=$ac_clean_files
31429 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31430 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31431 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31432 as_write_fail=0
31433 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31434 #! $SHELL
31435 # Generated by $as_me.
31436 # Run this file to recreate the current configuration.
31437 # Compiler output produced by configure, useful for debugging
31438 # configure, is in config.log if it exists.
31439
31440 debug=false
31441 ac_cs_recheck=false
31442 ac_cs_silent=false
31443
31444 SHELL=\${CONFIG_SHELL-$SHELL}
31445 export SHELL
31446 _ASEOF
31447 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31448 ## -------------------- ##
31449 ## M4sh Initialization. ##
31450 ## -------------------- ##
31451
31452 # Be more Bourne compatible
31453 DUALCASE=1; export DUALCASE # for MKS sh
31454 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31455 emulate sh
31456 NULLCMD=:
31457 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31458 # is contrary to our usage. Disable this feature.
31459 alias -g '${1+"$@"}'='"$@"'
31460 setopt NO_GLOB_SUBST
31461 else
31462 case `(set -o) 2>/dev/null` in #(
31463 *posix*) :
31464 set -o posix ;; #(
31465 *) :
31466 ;;
31467 esac
31468 fi
31469
31470
31471 as_nl='
31472 '
31473 export as_nl
31474 # Printing a long string crashes Solaris 7 /usr/bin/printf.
31475 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31476 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31477 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31478 # Prefer a ksh shell builtin over an external printf program on Solaris,
31479 # but without wasting forks for bash or zsh.
31480 if test -z "$BASH_VERSION$ZSH_VERSION" \
31481 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31482 as_echo='print -r --'
31483 as_echo_n='print -rn --'
31484 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31485 as_echo='printf %s\n'
31486 as_echo_n='printf %s'
31487 else
31488 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31489 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31490 as_echo_n='/usr/ucb/echo -n'
31491 else
31492 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31493 as_echo_n_body='eval
31494 arg=$1;
31495 case $arg in #(
31496 *"$as_nl"*)
31497 expr "X$arg" : "X\\(.*\\)$as_nl";
31498 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31499 esac;
31500 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31501 '
31502 export as_echo_n_body
31503 as_echo_n='sh -c $as_echo_n_body as_echo'
31504 fi
31505 export as_echo_body
31506 as_echo='sh -c $as_echo_body as_echo'
31507 fi
31508
31509 # The user is always right.
31510 if test "${PATH_SEPARATOR+set}" != set; then
31511 PATH_SEPARATOR=:
31512 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31513 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31514 PATH_SEPARATOR=';'
31515 }
31516 fi
31517
31518
31519 # IFS
31520 # We need space, tab and new line, in precisely that order. Quoting is
31521 # there to prevent editors from complaining about space-tab.
31522 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
31523 # splitting by setting IFS to empty value.)
31524 IFS=" "" $as_nl"
31525
31526 # Find who we are. Look in the path if we contain no directory separator.
31527 as_myself=
31528 case $0 in #((
31529 *[\\/]* ) as_myself=$0 ;;
31530 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31531 for as_dir in $PATH
31532 do
31533 IFS=$as_save_IFS
31534 test -z "$as_dir" && as_dir=.
31535 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31536 done
31537 IFS=$as_save_IFS
31538
31539 ;;
31540 esac
31541 # We did not find ourselves, most probably we were run as `sh COMMAND'
31542 # in which case we are not to be found in the path.
31543 if test "x$as_myself" = x; then
31544 as_myself=$0
31545 fi
31546 if test ! -f "$as_myself"; then
31547 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31548 exit 1
31549 fi
31550
31551 # Unset variables that we do not need and which cause bugs (e.g. in
31552 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
31553 # suppresses any "Segmentation fault" message there. '((' could
31554 # trigger a bug in pdksh 5.2.14.
31555 for as_var in BASH_ENV ENV MAIL MAILPATH
31556 do eval test x\${$as_var+set} = xset \
31557 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
31558 done
31559 PS1='$ '
31560 PS2='> '
31561 PS4='+ '
31562
31563 # NLS nuisances.
31564 LC_ALL=C
31565 export LC_ALL
31566 LANGUAGE=C
31567 export LANGUAGE
31568
31569 # CDPATH.
31570 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31571
31572
31573 # as_fn_error STATUS ERROR [LINENO LOG_FD]
31574 # ----------------------------------------
31575 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
31576 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
31577 # script with STATUS, using 1 if that was 0.
31578 as_fn_error ()
31579 {
31580 as_status=$1; test $as_status -eq 0 && as_status=1
31581 if test "$4"; then
31582 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
31583 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
31584 fi
31585 $as_echo "$as_me: error: $2" >&2
31586 as_fn_exit $as_status
31587 } # as_fn_error
31588
31589
31590 # as_fn_set_status STATUS
31591 # -----------------------
31592 # Set $? to STATUS, without forking.
31593 as_fn_set_status ()
31594 {
31595 return $1
31596 } # as_fn_set_status
31597
31598 # as_fn_exit STATUS
31599 # -----------------
31600 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
31601 as_fn_exit ()
31602 {
31603 set +e
31604 as_fn_set_status $1
31605 exit $1
31606 } # as_fn_exit
31607
31608 # as_fn_unset VAR
31609 # ---------------
31610 # Portably unset VAR.
31611 as_fn_unset ()
31612 {
31613 { eval $1=; unset $1;}
31614 }
31615 as_unset=as_fn_unset
31616 # as_fn_append VAR VALUE
31617 # ----------------------
31618 # Append the text in VALUE to the end of the definition contained in VAR. Take
31619 # advantage of any shell optimizations that allow amortized linear growth over
31620 # repeated appends, instead of the typical quadratic growth present in naive
31621 # implementations.
31622 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
31623 eval 'as_fn_append ()
31624 {
31625 eval $1+=\$2
31626 }'
31627 else
31628 as_fn_append ()
31629 {
31630 eval $1=\$$1\$2
31631 }
31632 fi # as_fn_append
31633
31634 # as_fn_arith ARG...
31635 # ------------------
31636 # Perform arithmetic evaluation on the ARGs, and store the result in the
31637 # global $as_val. Take advantage of shells that can avoid forks. The arguments
31638 # must be portable across $(()) and expr.
31639 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
31640 eval 'as_fn_arith ()
31641 {
31642 as_val=$(( $* ))
31643 }'
31644 else
31645 as_fn_arith ()
31646 {
31647 as_val=`expr "$@" || test $? -eq 1`
31648 }
31649 fi # as_fn_arith
31650
31651
31652 if expr a : '\(a\)' >/dev/null 2>&1 &&
31653 test "X`expr 00001 : '.*\(...\)'`" = X001; then
31654 as_expr=expr
31655 else
31656 as_expr=false
31657 fi
31658
31659 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
31660 as_basename=basename
31661 else
31662 as_basename=false
31663 fi
31664
31665 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31666 as_dirname=dirname
31667 else
31668 as_dirname=false
31669 fi
31670
31671 as_me=`$as_basename -- "$0" ||
31672 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31673 X"$0" : 'X\(//\)$' \| \
31674 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31675 $as_echo X/"$0" |
31676 sed '/^.*\/\([^/][^/]*\)\/*$/{
31677 s//\1/
31678 q
31679 }
31680 /^X\/\(\/\/\)$/{
31681 s//\1/
31682 q
31683 }
31684 /^X\/\(\/\).*/{
31685 s//\1/
31686 q
31687 }
31688 s/.*/./; q'`
31689
31690 # Avoid depending upon Character Ranges.
31691 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31692 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
31693 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31694 as_cr_digits='0123456789'
31695 as_cr_alnum=$as_cr_Letters$as_cr_digits
31696
31697 ECHO_C= ECHO_N= ECHO_T=
31698 case `echo -n x` in #(((((
31699 -n*)
31700 case `echo 'xy\c'` in
31701 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
31702 xy) ECHO_C='\c';;
31703 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
31704 ECHO_T=' ';;
31705 esac;;
31706 *)
31707 ECHO_N='-n';;
31708 esac
31709
31710 rm -f conf$$ conf$$.exe conf$$.file
31711 if test -d conf$$.dir; then
31712 rm -f conf$$.dir/conf$$.file
31713 else
31714 rm -f conf$$.dir
31715 mkdir conf$$.dir 2>/dev/null
31716 fi
31717 if (echo >conf$$.file) 2>/dev/null; then
31718 if ln -s conf$$.file conf$$ 2>/dev/null; then
31719 as_ln_s='ln -s'
31720 # ... but there are two gotchas:
31721 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31722 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31723 # In both cases, we have to default to `cp -pR'.
31724 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
31725 as_ln_s='cp -pR'
31726 elif ln conf$$.file conf$$ 2>/dev/null; then
31727 as_ln_s=ln
31728 else
31729 as_ln_s='cp -pR'
31730 fi
31731 else
31732 as_ln_s='cp -pR'
31733 fi
31734 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
31735 rmdir conf$$.dir 2>/dev/null
31736
31737
31738 # as_fn_mkdir_p
31739 # -------------
31740 # Create "$as_dir" as a directory, including parents if necessary.
31741 as_fn_mkdir_p ()
31742 {
31743
31744 case $as_dir in #(
31745 -*) as_dir=./$as_dir;;
31746 esac
31747 test -d "$as_dir" || eval $as_mkdir_p || {
31748 as_dirs=
31749 while :; do
31750 case $as_dir in #(
31751 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31752 *) as_qdir=$as_dir;;
31753 esac
31754 as_dirs="'$as_qdir' $as_dirs"
31755 as_dir=`$as_dirname -- "$as_dir" ||
31756 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31757 X"$as_dir" : 'X\(//\)[^/]' \| \
31758 X"$as_dir" : 'X\(//\)$' \| \
31759 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31760 $as_echo X"$as_dir" |
31761 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31762 s//\1/
31763 q
31764 }
31765 /^X\(\/\/\)[^/].*/{
31766 s//\1/
31767 q
31768 }
31769 /^X\(\/\/\)$/{
31770 s//\1/
31771 q
31772 }
31773 /^X\(\/\).*/{
31774 s//\1/
31775 q
31776 }
31777 s/.*/./; q'`
31778 test -d "$as_dir" && break
31779 done
31780 test -z "$as_dirs" || eval "mkdir $as_dirs"
31781 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
31782
31783
31784 } # as_fn_mkdir_p
31785 if mkdir -p . 2>/dev/null; then
31786 as_mkdir_p='mkdir -p "$as_dir"'
31787 else
31788 test -d ./-p && rmdir ./-p
31789 as_mkdir_p=false
31790 fi
31791
31792
31793 # as_fn_executable_p FILE
31794 # -----------------------
31795 # Test if FILE is an executable regular file.
31796 as_fn_executable_p ()
31797 {
31798 test -f "$1" && test -x "$1"
31799 } # as_fn_executable_p
31800 as_test_x='test -x'
31801 as_executable_p=as_fn_executable_p
31802
31803 # Sed expression to map a string onto a valid CPP name.
31804 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
31805
31806 # Sed expression to map a string onto a valid variable name.
31807 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
31808
31809
31810 exec 6>&1
31811 ## ----------------------------------- ##
31812 ## Main body of $CONFIG_STATUS script. ##
31813 ## ----------------------------------- ##
31814 _ASEOF
31815 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
31816
31817 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31818 # Save the log message, to keep $0 and so on meaningful, and to
31819 # report actual input values of CONFIG_FILES etc. instead of their
31820 # values after options handling.
31821 ac_log="
31822 This file was extended by libgnu $as_me UNUSED-VERSION, which was
31823 generated by GNU Autoconf 2.69. Invocation command line was
31824
31825 CONFIG_FILES = $CONFIG_FILES
31826 CONFIG_HEADERS = $CONFIG_HEADERS
31827 CONFIG_LINKS = $CONFIG_LINKS
31828 CONFIG_COMMANDS = $CONFIG_COMMANDS
31829 $ $0 $@
31830
31831 on `(hostname || uname -n) 2>/dev/null | sed 1q`
31832 "
31833
31834 _ACEOF
31835
31836 case $ac_config_files in *"
31837 "*) set x $ac_config_files; shift; ac_config_files=$*;;
31838 esac
31839
31840 case $ac_config_headers in *"
31841 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
31842 esac
31843
31844
31845 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31846 # Files that config.status was made for.
31847 config_files="$ac_config_files"
31848 config_headers="$ac_config_headers"
31849 config_commands="$ac_config_commands"
31850
31851 _ACEOF
31852
31853 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31854 ac_cs_usage="\
31855 \`$as_me' instantiates files and other configuration actions
31856 from templates according to the current configuration. Unless the files
31857 and actions are specified as TAGs, all are instantiated by default.
31858
31859 Usage: $0 [OPTION]... [TAG]...
31860
31861 -h, --help print this help, then exit
31862 -V, --version print version number and configuration settings, then exit
31863 --config print configuration, then exit
31864 -q, --quiet, --silent
31865 do not print progress messages
31866 -d, --debug don't remove temporary files
31867 --recheck update $as_me by reconfiguring in the same conditions
31868 --file=FILE[:TEMPLATE]
31869 instantiate the configuration file FILE
31870 --header=FILE[:TEMPLATE]
31871 instantiate the configuration header FILE
31872
31873 Configuration files:
31874 $config_files
31875
31876 Configuration headers:
31877 $config_headers
31878
31879 Configuration commands:
31880 $config_commands
31881
31882 Report bugs to the package provider."
31883
31884 _ACEOF
31885 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31886 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31887 ac_cs_version="\\
31888 libgnu config.status UNUSED-VERSION
31889 configured by $0, generated by GNU Autoconf 2.69,
31890 with options \\"\$ac_cs_config\\"
31891
31892 Copyright (C) 2012 Free Software Foundation, Inc.
31893 This config.status script is free software; the Free Software Foundation
31894 gives unlimited permission to copy, distribute and modify it."
31895
31896 ac_pwd='$ac_pwd'
31897 srcdir='$srcdir'
31898 INSTALL='$INSTALL'
31899 MKDIR_P='$MKDIR_P'
31900 AWK='$AWK'
31901 test -n "\$AWK" || AWK=awk
31902 _ACEOF
31903
31904 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31905 # The default lists apply if the user does not specify any file.
31906 ac_need_defaults=:
31907 while test $# != 0
31908 do
31909 case $1 in
31910 --*=?*)
31911 ac_option=`expr "X$1" : 'X\([^=]*\)='`
31912 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31913 ac_shift=:
31914 ;;
31915 --*=)
31916 ac_option=`expr "X$1" : 'X\([^=]*\)='`
31917 ac_optarg=
31918 ac_shift=:
31919 ;;
31920 *)
31921 ac_option=$1
31922 ac_optarg=$2
31923 ac_shift=shift
31924 ;;
31925 esac
31926
31927 case $ac_option in
31928 # Handling of the options.
31929 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31930 ac_cs_recheck=: ;;
31931 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31932 $as_echo "$ac_cs_version"; exit ;;
31933 --config | --confi | --conf | --con | --co | --c )
31934 $as_echo "$ac_cs_config"; exit ;;
31935 --debug | --debu | --deb | --de | --d | -d )
31936 debug=: ;;
31937 --file | --fil | --fi | --f )
31938 $ac_shift
31939 case $ac_optarg in
31940 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31941 '') as_fn_error $? "missing file argument" ;;
31942 esac
31943 as_fn_append CONFIG_FILES " '$ac_optarg'"
31944 ac_need_defaults=false;;
31945 --header | --heade | --head | --hea )
31946 $ac_shift
31947 case $ac_optarg in
31948 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31949 esac
31950 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31951 ac_need_defaults=false;;
31952 --he | --h)
31953 # Conflict between --help and --header
31954 as_fn_error $? "ambiguous option: \`$1'
31955 Try \`$0 --help' for more information.";;
31956 --help | --hel | -h )
31957 $as_echo "$ac_cs_usage"; exit ;;
31958 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31959 | -silent | --silent | --silen | --sile | --sil | --si | --s)
31960 ac_cs_silent=: ;;
31961
31962 # This is an error.
31963 -*) as_fn_error $? "unrecognized option: \`$1'
31964 Try \`$0 --help' for more information." ;;
31965
31966 *) as_fn_append ac_config_targets " $1"
31967 ac_need_defaults=false ;;
31968
31969 esac
31970 shift
31971 done
31972
31973 ac_configure_extra_args=
31974
31975 if $ac_cs_silent; then
31976 exec 6>/dev/null
31977 ac_configure_extra_args="$ac_configure_extra_args --silent"
31978 fi
31979
31980 _ACEOF
31981 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31982 if \$ac_cs_recheck; then
31983 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31984 shift
31985 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31986 CONFIG_SHELL='$SHELL'
31987 export CONFIG_SHELL
31988 exec "\$@"
31989 fi
31990
31991 _ACEOF
31992 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31993 exec 5>>config.log
31994 {
31995 echo
31996 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31997 ## Running $as_me. ##
31998 _ASBOX
31999 $as_echo "$ac_log"
32000 } >&5
32001
32002 _ACEOF
32003 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32004 #
32005 # INIT-COMMANDS
32006 #
32007 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
32008
32009 _ACEOF
32010
32011 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32012
32013 # Handling of arguments.
32014 for ac_config_target in $ac_config_targets
32015 do
32016 case $ac_config_target in
32017 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
32018 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
32019 "Makefile.gnulib.inc") CONFIG_FILES="$CONFIG_FILES Makefile.gnulib.inc" ;;
32020 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
32021 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
32022 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
32023
32024 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
32025 esac
32026 done
32027
32028
32029 # If the user did not use the arguments to specify the items to instantiate,
32030 # then the envvar interface is used. Set only those that are not.
32031 # We use the long form for the default assignment because of an extremely
32032 # bizarre bug on SunOS 4.1.3.
32033 if $ac_need_defaults; then
32034 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32035 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32036 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
32037 fi
32038
32039 # Have a temporary directory for convenience. Make it in the build tree
32040 # simply because there is no reason against having it here, and in addition,
32041 # creating and moving files from /tmp can sometimes cause problems.
32042 # Hook for its removal unless debugging.
32043 # Note that there is a small window in which the directory will not be cleaned:
32044 # after its creation but before its name has been assigned to `$tmp'.
32045 $debug ||
32046 {
32047 tmp= ac_tmp=
32048 trap 'exit_status=$?
32049 : "${ac_tmp:=$tmp}"
32050 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
32051 ' 0
32052 trap 'as_fn_exit 1' 1 2 13 15
32053 }
32054 # Create a (secure) tmp directory for tmp files.
32055
32056 {
32057 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32058 test -d "$tmp"
32059 } ||
32060 {
32061 tmp=./conf$$-$RANDOM
32062 (umask 077 && mkdir "$tmp")
32063 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32064 ac_tmp=$tmp
32065
32066 # Set up the scripts for CONFIG_FILES section.
32067 # No need to generate them if there are no CONFIG_FILES.
32068 # This happens for instance with `./config.status config.h'.
32069 if test -n "$CONFIG_FILES"; then
32070
32071
32072 ac_cr=`echo X | tr X '\015'`
32073 # On cygwin, bash can eat \r inside `` if the user requested igncr.
32074 # But we know of no other shell where ac_cr would be empty at this
32075 # point, so we can use a bashism as a fallback.
32076 if test "x$ac_cr" = x; then
32077 eval ac_cr=\$\'\\r\'
32078 fi
32079 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32080 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32081 ac_cs_awk_cr='\\r'
32082 else
32083 ac_cs_awk_cr=$ac_cr
32084 fi
32085
32086 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
32087 _ACEOF
32088
32089
32090 {
32091 echo "cat >conf$$subs.awk <<_ACEOF" &&
32092 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32093 echo "_ACEOF"
32094 } >conf$$subs.sh ||
32095 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32096 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32097 ac_delim='%!_!# '
32098 for ac_last_try in false false false false false :; do
32099 . ./conf$$subs.sh ||
32100 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32101
32102 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32103 if test $ac_delim_n = $ac_delim_num; then
32104 break
32105 elif $ac_last_try; then
32106 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32107 else
32108 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32109 fi
32110 done
32111 rm -f conf$$subs.sh
32112
32113 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32114 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
32115 _ACEOF
32116 sed -n '
32117 h
32118 s/^/S["/; s/!.*/"]=/
32119 p
32120 g
32121 s/^[^!]*!//
32122 :repl
32123 t repl
32124 s/'"$ac_delim"'$//
32125 t delim
32126 :nl
32127 h
32128 s/\(.\{148\}\)..*/\1/
32129 t more1
32130 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32131 p
32132 n
32133 b repl
32134 :more1
32135 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32136 p
32137 g
32138 s/.\{148\}//
32139 t nl
32140 :delim
32141 h
32142 s/\(.\{148\}\)..*/\1/
32143 t more2
32144 s/["\\]/\\&/g; s/^/"/; s/$/"/
32145 p
32146 b
32147 :more2
32148 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32149 p
32150 g
32151 s/.\{148\}//
32152 t delim
32153 ' <conf$$subs.awk | sed '
32154 /^[^""]/{
32155 N
32156 s/\n//
32157 }
32158 ' >>$CONFIG_STATUS || ac_write_fail=1
32159 rm -f conf$$subs.awk
32160 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32161 _ACAWK
32162 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
32163 for (key in S) S_is_set[key] = 1
32164 FS = "\a"
32165
32166 }
32167 {
32168 line = $ 0
32169 nfields = split(line, field, "@")
32170 substed = 0
32171 len = length(field[1])
32172 for (i = 2; i < nfields; i++) {
32173 key = field[i]
32174 keylen = length(key)
32175 if (S_is_set[key]) {
32176 value = S[key]
32177 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32178 len += length(value) + length(field[++i])
32179 substed = 1
32180 } else
32181 len += 1 + keylen
32182 }
32183
32184 print line
32185 }
32186
32187 _ACAWK
32188 _ACEOF
32189 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32190 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32191 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32192 else
32193 cat
32194 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
32195 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32196 _ACEOF
32197
32198 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32199 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32200 # trailing colons and then remove the whole line if VPATH becomes empty
32201 # (actually we leave an empty line to preserve line numbers).
32202 if test "x$srcdir" = x.; then
32203 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
32204 h
32205 s///
32206 s/^/:/
32207 s/[ ]*$/:/
32208 s/:\$(srcdir):/:/g
32209 s/:\${srcdir}:/:/g
32210 s/:@srcdir@:/:/g
32211 s/^:*//
32212 s/:*$//
32213 x
32214 s/\(=[ ]*\).*/\1/
32215 G
32216 s/\n//
32217 s/^[^=]*=[ ]*$//
32218 }'
32219 fi
32220
32221 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32222 fi # test -n "$CONFIG_FILES"
32223
32224 # Set up the scripts for CONFIG_HEADERS section.
32225 # No need to generate them if there are no CONFIG_HEADERS.
32226 # This happens for instance with `./config.status Makefile'.
32227 if test -n "$CONFIG_HEADERS"; then
32228 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
32229 BEGIN {
32230 _ACEOF
32231
32232 # Transform confdefs.h into an awk script `defines.awk', embedded as
32233 # here-document in config.status, that substitutes the proper values into
32234 # config.h.in to produce config.h.
32235
32236 # Create a delimiter string that does not exist in confdefs.h, to ease
32237 # handling of long lines.
32238 ac_delim='%!_!# '
32239 for ac_last_try in false false :; do
32240 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
32241 if test -z "$ac_tt"; then
32242 break
32243 elif $ac_last_try; then
32244 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32245 else
32246 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32247 fi
32248 done
32249
32250 # For the awk script, D is an array of macro values keyed by name,
32251 # likewise P contains macro parameters if any. Preserve backslash
32252 # newline sequences.
32253
32254 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32255 sed -n '
32256 s/.\{148\}/&'"$ac_delim"'/g
32257 t rset
32258 :rset
32259 s/^[ ]*#[ ]*define[ ][ ]*/ /
32260 t def
32261 d
32262 :def
32263 s/\\$//
32264 t bsnl
32265 s/["\\]/\\&/g
32266 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
32267 D["\1"]=" \3"/p
32268 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
32269 d
32270 :bsnl
32271 s/["\\]/\\&/g
32272 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
32273 D["\1"]=" \3\\\\\\n"\\/p
32274 t cont
32275 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32276 t cont
32277 d
32278 :cont
32279 n
32280 s/.\{148\}/&'"$ac_delim"'/g
32281 t clear
32282 :clear
32283 s/\\$//
32284 t bsnlc
32285 s/["\\]/\\&/g; s/^/"/; s/$/"/p
32286 d
32287 :bsnlc
32288 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32289 b cont
32290 ' <confdefs.h | sed '
32291 s/'"$ac_delim"'/"\\\
32292 "/g' >>$CONFIG_STATUS || ac_write_fail=1
32293
32294 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32295 for (key in D) D_is_set[key] = 1
32296 FS = "\a"
32297 }
32298 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32299 line = \$ 0
32300 split(line, arg, " ")
32301 if (arg[1] == "#") {
32302 defundef = arg[2]
32303 mac1 = arg[3]
32304 } else {
32305 defundef = substr(arg[1], 2)
32306 mac1 = arg[2]
32307 }
32308 split(mac1, mac2, "(") #)
32309 macro = mac2[1]
32310 prefix = substr(line, 1, index(line, defundef) - 1)
32311 if (D_is_set[macro]) {
32312 # Preserve the white space surrounding the "#".
32313 print prefix "define", macro P[macro] D[macro]
32314 next
32315 } else {
32316 # Replace #undef with comments. This is necessary, for example,
32317 # in the case of _POSIX_SOURCE, which is predefined and required
32318 # on some systems where configure will not decide to define it.
32319 if (defundef == "undef") {
32320 print "/*", prefix defundef, macro, "*/"
32321 next
32322 }
32323 }
32324 }
32325 { print }
32326 _ACAWK
32327 _ACEOF
32328 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32329 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32330 fi # test -n "$CONFIG_HEADERS"
32331
32332
32333 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
32334 shift
32335 for ac_tag
32336 do
32337 case $ac_tag in
32338 :[FHLC]) ac_mode=$ac_tag; continue;;
32339 esac
32340 case $ac_mode$ac_tag in
32341 :[FHL]*:*);;
32342 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
32343 :[FH]-) ac_tag=-:-;;
32344 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32345 esac
32346 ac_save_IFS=$IFS
32347 IFS=:
32348 set x $ac_tag
32349 IFS=$ac_save_IFS
32350 shift
32351 ac_file=$1
32352 shift
32353
32354 case $ac_mode in
32355 :L) ac_source=$1;;
32356 :[FH])
32357 ac_file_inputs=
32358 for ac_f
32359 do
32360 case $ac_f in
32361 -) ac_f="$ac_tmp/stdin";;
32362 *) # Look for the file first in the build tree, then in the source tree
32363 # (if the path is not absolute). The absolute path cannot be DOS-style,
32364 # because $ac_f cannot contain `:'.
32365 test -f "$ac_f" ||
32366 case $ac_f in
32367 [\\/$]*) false;;
32368 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32369 esac ||
32370 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
32371 esac
32372 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32373 as_fn_append ac_file_inputs " '$ac_f'"
32374 done
32375
32376 # Let's still pretend it is `configure' which instantiates (i.e., don't
32377 # use $as_me), people would be surprised to read:
32378 # /* config.h. Generated by config.status. */
32379 configure_input='Generated from '`
32380 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32381 `' by configure.'
32382 if test x"$ac_file" != x-; then
32383 configure_input="$ac_file. $configure_input"
32384 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32385 $as_echo "$as_me: creating $ac_file" >&6;}
32386 fi
32387 # Neutralize special characters interpreted by sed in replacement strings.
32388 case $configure_input in #(
32389 *\&* | *\|* | *\\* )
32390 ac_sed_conf_input=`$as_echo "$configure_input" |
32391 sed 's/[\\\\&|]/\\\\&/g'`;; #(
32392 *) ac_sed_conf_input=$configure_input;;
32393 esac
32394
32395 case $ac_tag in
32396 *:-:* | *:-) cat >"$ac_tmp/stdin" \
32397 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
32398 esac
32399 ;;
32400 esac
32401
32402 ac_dir=`$as_dirname -- "$ac_file" ||
32403 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32404 X"$ac_file" : 'X\(//\)[^/]' \| \
32405 X"$ac_file" : 'X\(//\)$' \| \
32406 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32407 $as_echo X"$ac_file" |
32408 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32409 s//\1/
32410 q
32411 }
32412 /^X\(\/\/\)[^/].*/{
32413 s//\1/
32414 q
32415 }
32416 /^X\(\/\/\)$/{
32417 s//\1/
32418 q
32419 }
32420 /^X\(\/\).*/{
32421 s//\1/
32422 q
32423 }
32424 s/.*/./; q'`
32425 as_dir="$ac_dir"; as_fn_mkdir_p
32426 ac_builddir=.
32427
32428 case "$ac_dir" in
32429 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32430 *)
32431 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32432 # A ".." for each directory in $ac_dir_suffix.
32433 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32434 case $ac_top_builddir_sub in
32435 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32436 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32437 esac ;;
32438 esac
32439 ac_abs_top_builddir=$ac_pwd
32440 ac_abs_builddir=$ac_pwd$ac_dir_suffix
32441 # for backward compatibility:
32442 ac_top_builddir=$ac_top_build_prefix
32443
32444 case $srcdir in
32445 .) # We are building in place.
32446 ac_srcdir=.
32447 ac_top_srcdir=$ac_top_builddir_sub
32448 ac_abs_top_srcdir=$ac_pwd ;;
32449 [\\/]* | ?:[\\/]* ) # Absolute name.
32450 ac_srcdir=$srcdir$ac_dir_suffix;
32451 ac_top_srcdir=$srcdir
32452 ac_abs_top_srcdir=$srcdir ;;
32453 *) # Relative name.
32454 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32455 ac_top_srcdir=$ac_top_build_prefix$srcdir
32456 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32457 esac
32458 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32459
32460
32461 case $ac_mode in
32462 :F)
32463 #
32464 # CONFIG_FILE
32465 #
32466
32467 case $INSTALL in
32468 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
32469 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
32470 esac
32471 ac_MKDIR_P=$MKDIR_P
32472 case $MKDIR_P in
32473 [\\/$]* | ?:[\\/]* ) ;;
32474 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
32475 esac
32476 _ACEOF
32477
32478 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32479 # If the template does not know about datarootdir, expand it.
32480 # FIXME: This hack should be removed a few years after 2.60.
32481 ac_datarootdir_hack=; ac_datarootdir_seen=
32482 ac_sed_dataroot='
32483 /datarootdir/ {
32484 p
32485 q
32486 }
32487 /@datadir@/p
32488 /@docdir@/p
32489 /@infodir@/p
32490 /@localedir@/p
32491 /@mandir@/p'
32492 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32493 *datarootdir*) ac_datarootdir_seen=yes;;
32494 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32495 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32496 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32497 _ACEOF
32498 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32499 ac_datarootdir_hack='
32500 s&@datadir@&$datadir&g
32501 s&@docdir@&$docdir&g
32502 s&@infodir@&$infodir&g
32503 s&@localedir@&$localedir&g
32504 s&@mandir@&$mandir&g
32505 s&\\\${datarootdir}&$datarootdir&g' ;;
32506 esac
32507 _ACEOF
32508
32509 # Neutralize VPATH when `$srcdir' = `.'.
32510 # Shell code in configure.ac might set extrasub.
32511 # FIXME: do we really want to maintain this feature?
32512 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32513 ac_sed_extra="$ac_vpsub
32514 $extrasub
32515 _ACEOF
32516 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32517 :t
32518 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32519 s|@configure_input@|$ac_sed_conf_input|;t t
32520 s&@top_builddir@&$ac_top_builddir_sub&;t t
32521 s&@top_build_prefix@&$ac_top_build_prefix&;t t
32522 s&@srcdir@&$ac_srcdir&;t t
32523 s&@abs_srcdir@&$ac_abs_srcdir&;t t
32524 s&@top_srcdir@&$ac_top_srcdir&;t t
32525 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32526 s&@builddir@&$ac_builddir&;t t
32527 s&@abs_builddir@&$ac_abs_builddir&;t t
32528 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32529 s&@INSTALL@&$ac_INSTALL&;t t
32530 s&@MKDIR_P@&$ac_MKDIR_P&;t t
32531 $ac_datarootdir_hack
32532 "
32533 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
32534 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32535
32536 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32537 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
32538 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
32539 "$ac_tmp/out"`; test -z "$ac_out"; } &&
32540 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32541 which seems to be undefined. Please make sure it is defined" >&5
32542 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32543 which seems to be undefined. Please make sure it is defined" >&2;}
32544
32545 rm -f "$ac_tmp/stdin"
32546 case $ac_file in
32547 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
32548 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
32549 esac \
32550 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32551 ;;
32552 :H)
32553 #
32554 # CONFIG_HEADER
32555 #
32556 if test x"$ac_file" != x-; then
32557 {
32558 $as_echo "/* $configure_input */" \
32559 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
32560 } >"$ac_tmp/config.h" \
32561 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32562 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
32563 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32564 $as_echo "$as_me: $ac_file is unchanged" >&6;}
32565 else
32566 rm -f "$ac_file"
32567 mv "$ac_tmp/config.h" "$ac_file" \
32568 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32569 fi
32570 else
32571 $as_echo "/* $configure_input */" \
32572 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
32573 || as_fn_error $? "could not create -" "$LINENO" 5
32574 fi
32575 # Compute "$ac_file"'s index in $config_headers.
32576 _am_arg="$ac_file"
32577 _am_stamp_count=1
32578 for _am_header in $config_headers :; do
32579 case $_am_header in
32580 $_am_arg | $_am_arg:* )
32581 break ;;
32582 * )
32583 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
32584 esac
32585 done
32586 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
32587 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32588 X"$_am_arg" : 'X\(//\)[^/]' \| \
32589 X"$_am_arg" : 'X\(//\)$' \| \
32590 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
32591 $as_echo X"$_am_arg" |
32592 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32593 s//\1/
32594 q
32595 }
32596 /^X\(\/\/\)[^/].*/{
32597 s//\1/
32598 q
32599 }
32600 /^X\(\/\/\)$/{
32601 s//\1/
32602 q
32603 }
32604 /^X\(\/\).*/{
32605 s//\1/
32606 q
32607 }
32608 s/.*/./; q'`/stamp-h$_am_stamp_count
32609 ;;
32610
32611 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
32612 $as_echo "$as_me: executing $ac_file commands" >&6;}
32613 ;;
32614 esac
32615
32616
32617 case $ac_file$ac_mode in
32618 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
32619 # Older Autoconf quotes --file arguments for eval, but not when files
32620 # are listed without --file. Let's play safe and only enable the eval
32621 # if we detect the quoting.
32622 case $CONFIG_FILES in
32623 *\'*) eval set x "$CONFIG_FILES" ;;
32624 *) set x $CONFIG_FILES ;;
32625 esac
32626 shift
32627 for mf
32628 do
32629 # Strip MF so we end up with the name of the file.
32630 mf=`echo "$mf" | sed -e 's/:.*$//'`
32631 # Check whether this is an Automake generated Makefile or not.
32632 # We used to match only the files named 'Makefile.in', but
32633 # some people rename them; so instead we look at the file content.
32634 # Grep'ing the first line is not enough: some people post-process
32635 # each Makefile.in and add a new line on top of each file to say so.
32636 # Grep'ing the whole file is not good either: AIX grep has a line
32637 # limit of 2048, but all sed's we know have understand at least 4000.
32638 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
32639 dirpart=`$as_dirname -- "$mf" ||
32640 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32641 X"$mf" : 'X\(//\)[^/]' \| \
32642 X"$mf" : 'X\(//\)$' \| \
32643 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
32644 $as_echo X"$mf" |
32645 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32646 s//\1/
32647 q
32648 }
32649 /^X\(\/\/\)[^/].*/{
32650 s//\1/
32651 q
32652 }
32653 /^X\(\/\/\)$/{
32654 s//\1/
32655 q
32656 }
32657 /^X\(\/\).*/{
32658 s//\1/
32659 q
32660 }
32661 s/.*/./; q'`
32662 else
32663 continue
32664 fi
32665 # Extract the definition of DEPDIR, am__include, and am__quote
32666 # from the Makefile without running 'make'.
32667 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
32668 test -z "$DEPDIR" && continue
32669 am__include=`sed -n 's/^am__include = //p' < "$mf"`
32670 test -z "$am__include" && continue
32671 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
32672 # Find all dependency output files, they are included files with
32673 # $(DEPDIR) in their names. We invoke sed twice because it is the
32674 # simplest approach to changing $(DEPDIR) to its actual value in the
32675 # expansion.
32676 for file in `sed -n "
32677 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
32678 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
32679 # Make sure the directory exists.
32680 test -f "$dirpart/$file" && continue
32681 fdir=`$as_dirname -- "$file" ||
32682 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32683 X"$file" : 'X\(//\)[^/]' \| \
32684 X"$file" : 'X\(//\)$' \| \
32685 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
32686 $as_echo X"$file" |
32687 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32688 s//\1/
32689 q
32690 }
32691 /^X\(\/\/\)[^/].*/{
32692 s//\1/
32693 q
32694 }
32695 /^X\(\/\/\)$/{
32696 s//\1/
32697 q
32698 }
32699 /^X\(\/\).*/{
32700 s//\1/
32701 q
32702 }
32703 s/.*/./; q'`
32704 as_dir=$dirpart/$fdir; as_fn_mkdir_p
32705 # echo "creating $dirpart/$file"
32706 echo '# dummy' > "$dirpart/$file"
32707 done
32708 done
32709 }
32710 ;;
32711 "default":C)
32712 case x$CONFIG_HEADERS in
32713 xconfig.h:config.in)
32714 echo > stamp-h ;;
32715 esac
32716 ;;
32717
32718 esac
32719 done # for ac_tag
32720
32721
32722 as_fn_exit 0
32723 _ACEOF
32724 ac_clean_files=$ac_clean_files_save
32725
32726 test $ac_write_fail = 0 ||
32727 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
32728
32729
32730 # configure is writing to config.log, and then calls config.status.
32731 # config.status does its own redirection, appending to config.log.
32732 # Unfortunately, on DOS this fails, as config.log is still kept open
32733 # by configure, so config.status won't be able to write to it; its
32734 # output is simply discarded. So we exec the FD to /dev/null,
32735 # effectively closing config.log, so it can be properly (re)opened and
32736 # appended to by config.status. When coming back to configure, we
32737 # need to make the FD available again.
32738 if test "$no_create" != yes; then
32739 ac_cs_success=:
32740 ac_config_status_args=
32741 test "$silent" = yes &&
32742 ac_config_status_args="$ac_config_status_args --quiet"
32743 exec 5>/dev/null
32744 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
32745 exec 5>>config.log
32746 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
32747 # would make configure fail if this is the last instruction.
32748 $ac_cs_success || as_fn_exit 1
32749 fi
32750 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
32751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
32752 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
32753 fi
32754
32755
32756 exit 0
This page took 0.750926 seconds and 4 git commands to generate.