Automatic date update in version.in
[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 HAVE_STRINGS_H
746 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
747 NEXT_STRINGS_H
748 NEXT_AS_FIRST_DIRECTIVE_STRING_H
749 NEXT_STRING_H
750 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
751 NEXT_STDLIB_H
752 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
753 NEXT_STDIO_H
754 HAVE__BOOL
755 GL_GENERATE_STDBOOL_H_FALSE
756 GL_GENERATE_STDBOOL_H_TRUE
757 STDBOOL_H
758 GL_GENERATE_STDALIGN_H_FALSE
759 GL_GENERATE_STDALIGN_H_TRUE
760 STDALIGN_H
761 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
762 NEXT_SIGNAL_H
763 REPLACE_RAISE
764 REPLACE_PTHREAD_SIGMASK
765 HAVE_SIGHANDLER_T
766 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
767 HAVE_STRUCT_SIGACTION_SA_SIGACTION
768 HAVE_SIGACTION
769 HAVE_SIGINFO_T
770 HAVE_SIGSET_T
771 HAVE_RAISE
772 HAVE_PTHREAD_SIGMASK
773 HAVE_POSIX_SIGNALBLOCKING
774 GNULIB_SIGACTION
775 GNULIB_SIGPROCMASK
776 GNULIB_SIGNAL_H_SIGPIPE
777 GNULIB_RAISE
778 GNULIB_PTHREAD_SIGMASK
779 LIB_SELECT
780 LIBSOCKET
781 HAVE_SYS_SELECT_H
782 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
783 NEXT_SYS_SELECT_H
784 REPLACE_SELECT
785 REPLACE_PSELECT
786 HAVE_PSELECT
787 GNULIB_SELECT
788 GNULIB_PSELECT
789 GL_GENERATE_NETINET_IN_H_FALSE
790 GL_GENERATE_NETINET_IN_H_TRUE
791 NETINET_IN_H
792 HAVE_NETINET_IN_H
793 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
794 NEXT_NETINET_IN_H
795 HAVE_NETDB_H
796 NEXT_AS_FIRST_DIRECTIVE_NETDB_H
797 NEXT_NETDB_H
798 REPLACE_GETADDRINFO
799 REPLACE_GAI_STRERROR
800 HAVE_DECL_GETNAMEINFO
801 HAVE_DECL_GETADDRINFO
802 HAVE_DECL_GAI_STRERROR
803 HAVE_DECL_FREEADDRINFO
804 HAVE_STRUCT_ADDRINFO
805 GNULIB_GETADDRINFO
806 UNDEFINE_STRTOK_R
807 REPLACE_STRSIGNAL
808 REPLACE_STRERRORNAME_NP
809 REPLACE_STRERROR_R
810 REPLACE_STRERROR
811 REPLACE_STRTOK_R
812 REPLACE_STRCASESTR
813 REPLACE_STRSTR
814 REPLACE_STRNLEN
815 REPLACE_STRNDUP
816 REPLACE_STRNCAT
817 REPLACE_STRDUP
818 REPLACE_STRCHRNUL
819 REPLACE_STPNCPY
820 REPLACE_MEMMEM
821 REPLACE_MEMCHR
822 REPLACE_FFSLL
823 HAVE_STRVERSCMP
824 HAVE_DECL_STRSIGNAL
825 HAVE_SIGDESCR_NP
826 HAVE_SIGABBREV_NP
827 HAVE_STRERRORNAME_NP
828 HAVE_DECL_STRERROR_R
829 HAVE_DECL_STRTOK_R
830 HAVE_STRCASESTR
831 HAVE_STRSEP
832 HAVE_STRPBRK
833 HAVE_DECL_STRNLEN
834 HAVE_DECL_STRNDUP
835 HAVE_DECL_STRDUP
836 HAVE_STRCHRNUL
837 HAVE_STPNCPY
838 HAVE_STPCPY
839 HAVE_RAWMEMCHR
840 HAVE_DECL_MEMRCHR
841 HAVE_MEMPCPY
842 HAVE_DECL_MEMMEM
843 HAVE_FFSLL
844 HAVE_FFSL
845 HAVE_EXPLICIT_BZERO
846 GNULIB_MDA_STRDUP
847 GNULIB_MDA_MEMCCPY
848 HAVE_MBSLEN
849 GNULIB_STRVERSCMP
850 GNULIB_STRSIGNAL
851 GNULIB_SIGDESCR_NP
852 GNULIB_SIGABBREV_NP
853 GNULIB_STRERRORNAME_NP
854 GNULIB_STRERROR_R
855 GNULIB_STRERROR
856 GNULIB_MBSTOK_R
857 GNULIB_MBSSEP
858 GNULIB_MBSSPN
859 GNULIB_MBSPBRK
860 GNULIB_MBSCSPN
861 GNULIB_MBSCASESTR
862 GNULIB_MBSPCASECMP
863 GNULIB_MBSNCASECMP
864 GNULIB_MBSCASECMP
865 GNULIB_MBSSTR
866 GNULIB_MBSRCHR
867 GNULIB_MBSCHR
868 GNULIB_MBSNLEN
869 GNULIB_MBSLEN
870 GNULIB_STRTOK_R
871 GNULIB_STRCASESTR
872 GNULIB_STRSTR
873 GNULIB_STRSEP
874 GNULIB_STRPBRK
875 GNULIB_STRNLEN
876 GNULIB_STRNDUP
877 GNULIB_STRNCAT
878 GNULIB_STRDUP
879 GNULIB_STRCHRNUL
880 GNULIB_STPNCPY
881 GNULIB_STPCPY
882 GNULIB_RAWMEMCHR
883 GNULIB_MEMRCHR
884 GNULIB_MEMPCPY
885 GNULIB_MEMMEM
886 GNULIB_MEMCHR
887 GNULIB_FFSLL
888 GNULIB_FFSL
889 GNULIB_EXPLICIT_BZERO
890 HAVE_VISIBILITY
891 CFLAG_VISIBILITY
892 LIB_MBRTOWC
893 LOCALE_ZH_CN
894 LOCALE_FR_UTF8
895 LOCALE_JA
896 NEXT_AS_FIRST_DIRECTIVE_MATH_H
897 NEXT_MATH_H
898 LTLIBMULTITHREAD
899 LIBMULTITHREAD
900 LTLIBTHREAD
901 LIBTHREAD
902 LIBSTDTHREAD
903 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
904 NEXT_LOCALE_H
905 HAVE_XLOCALE_H
906 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
907 NEXT_STDDEF_H
908 GL_GENERATE_STDDEF_H_FALSE
909 GL_GENERATE_STDDEF_H_TRUE
910 STDDEF_H
911 HAVE_WCHAR_T
912 HAVE_MAX_ALIGN_T
913 REPLACE_NULL
914 REPLACE_STRUCT_LCONV
915 REPLACE_FREELOCALE
916 REPLACE_DUPLOCALE
917 REPLACE_NEWLOCALE
918 REPLACE_SETLOCALE
919 REPLACE_LOCALECONV
920 HAVE_FREELOCALE
921 HAVE_DUPLOCALE
922 HAVE_NEWLOCALE
923 GNULIB_LOCALENAME
924 GNULIB_DUPLOCALE
925 GNULIB_SETLOCALE_NULL
926 GNULIB_SETLOCALE
927 GNULIB_LOCALECONV
928 LOCALCHARSET_TESTS_ENVIRONMENT
929 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
930 NEXT_INTTYPES_H
931 UINT64_MAX_EQ_ULONG_MAX
932 UINT32_MAX_LT_UINTMAX_MAX
933 PRIPTR_PREFIX
934 INT64_MAX_EQ_LONG_MAX
935 INT32_MAX_LT_INTMAX_MAX
936 REPLACE_STRTOUMAX
937 REPLACE_STRTOIMAX
938 HAVE_IMAXDIV_T
939 HAVE_DECL_STRTOUMAX
940 HAVE_DECL_STRTOIMAX
941 HAVE_DECL_IMAXDIV
942 HAVE_DECL_IMAXABS
943 GNULIB_STRTOUMAX
944 GNULIB_STRTOIMAX
945 GNULIB_IMAXDIV
946 GNULIB_IMAXABS
947 GL_GENERATE_STDINT_H_FALSE
948 GL_GENERATE_STDINT_H_TRUE
949 STDINT_H
950 HAVE_SYS_INTTYPES_H
951 HAVE_SYS_BITYPES_H
952 HAVE_C99_STDINT_H
953 WINT_T_SUFFIX
954 WCHAR_T_SUFFIX
955 SIG_ATOMIC_T_SUFFIX
956 SIZE_T_SUFFIX
957 PTRDIFF_T_SUFFIX
958 HAVE_SIGNED_WINT_T
959 HAVE_SIGNED_WCHAR_T
960 HAVE_SIGNED_SIG_ATOMIC_T
961 BITSIZEOF_WINT_T
962 BITSIZEOF_WCHAR_T
963 BITSIZEOF_SIG_ATOMIC_T
964 BITSIZEOF_SIZE_T
965 BITSIZEOF_PTRDIFF_T
966 APPLE_UNIVERSAL_BUILD
967 HAVE_STDINT_H
968 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
969 NEXT_STDINT_H
970 HAVE_SYS_TYPES_H
971 HAVE_INTTYPES_H
972 HAVE_WCHAR_H
973 GNULIB_OVERRIDES_WINT_T
974 GL_GENERATE_LIMITS_H_FALSE
975 GL_GENERATE_LIMITS_H_TRUE
976 LIMITS_H
977 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
978 NEXT_LIMITS_H
979 HAVE_SYS_SOCKET_H
980 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
981 NEXT_SYS_SOCKET_H
982 HAVE_ACCEPT4
983 HAVE_SA_FAMILY_T
984 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
985 HAVE_STRUCT_SOCKADDR_STORAGE
986 GNULIB_ACCEPT4
987 GNULIB_SHUTDOWN
988 GNULIB_SETSOCKOPT
989 GNULIB_SENDTO
990 GNULIB_RECVFROM
991 GNULIB_SEND
992 GNULIB_RECV
993 GNULIB_LISTEN
994 GNULIB_GETSOCKOPT
995 GNULIB_GETSOCKNAME
996 GNULIB_GETPEERNAME
997 GNULIB_BIND
998 GNULIB_ACCEPT
999 GNULIB_CONNECT
1000 GNULIB_SOCKET
1001 INET_NTOP_LIB
1002 LIB_HARD_LOCALE
1003 LIB_SETLOCALE_NULL
1004 LIB_SCHED_YIELD
1005 LIBPMULTITHREAD
1006 LIBPTHREAD
1007 GL_GENERATE_GLOB_H_FALSE
1008 GL_GENERATE_GLOB_H_TRUE
1009 GLOB_H
1010 HAVE_GLOB_H
1011 NEXT_AS_FIRST_DIRECTIVE_GLOB_H
1012 NEXT_GLOB_H
1013 REPLACE_GLOB_PATTERN_P
1014 REPLACE_GLOB
1015 HAVE_GLOB_PATTERN_P
1016 HAVE_GLOB
1017 GNULIB_GLOB
1018 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1019 NEXT_SYS_TIME_H
1020 REPLACE_STRUCT_TIMEVAL
1021 REPLACE_GETTIMEOFDAY
1022 HAVE_SYS_TIME_H
1023 HAVE_STRUCT_TIMEVAL
1024 HAVE_GETTIMEOFDAY
1025 GNULIB_GETTIMEOFDAY
1026 LTLIBINTL
1027 LIBINTL
1028 LIB_GETRANDOM
1029 REPLACE_GETRANDOM
1030 HAVE_GETRANDOM
1031 GNULIB_GETRANDOM
1032 LIB_GETLOGIN
1033 REPLACE_VSPRINTF
1034 REPLACE_VSNPRINTF
1035 REPLACE_VPRINTF
1036 REPLACE_VFPRINTF
1037 REPLACE_VDPRINTF
1038 REPLACE_VASPRINTF
1039 REPLACE_TMPFILE
1040 REPLACE_STDIO_WRITE_FUNCS
1041 REPLACE_STDIO_READ_FUNCS
1042 REPLACE_SPRINTF
1043 REPLACE_SNPRINTF
1044 REPLACE_RENAMEAT
1045 REPLACE_RENAME
1046 REPLACE_REMOVE
1047 REPLACE_PRINTF
1048 REPLACE_POPEN
1049 REPLACE_PERROR
1050 REPLACE_OBSTACK_PRINTF
1051 REPLACE_GETLINE
1052 REPLACE_GETDELIM
1053 REPLACE_FTELLO
1054 REPLACE_FTELL
1055 REPLACE_FSEEKO
1056 REPLACE_FSEEK
1057 REPLACE_FREOPEN
1058 REPLACE_FPURGE
1059 REPLACE_FPRINTF
1060 REPLACE_FOPEN
1061 REPLACE_FFLUSH
1062 REPLACE_FDOPEN
1063 REPLACE_FCLOSE
1064 REPLACE_DPRINTF
1065 HAVE_VDPRINTF
1066 HAVE_VASPRINTF
1067 HAVE_RENAMEAT
1068 HAVE_POPEN
1069 HAVE_PCLOSE
1070 HAVE_FTELLO
1071 HAVE_FSEEKO
1072 HAVE_DPRINTF
1073 HAVE_DECL_VSNPRINTF
1074 HAVE_DECL_SNPRINTF
1075 HAVE_DECL_OBSTACK_PRINTF
1076 HAVE_DECL_GETLINE
1077 HAVE_DECL_GETDELIM
1078 HAVE_DECL_FTELLO
1079 HAVE_DECL_FSEEKO
1080 HAVE_DECL_FPURGE
1081 HAVE_DECL_FCLOSEALL
1082 GNULIB_MDA_TEMPNAM
1083 GNULIB_MDA_PUTW
1084 GNULIB_MDA_GETW
1085 GNULIB_MDA_FILENO
1086 GNULIB_MDA_FDOPEN
1087 GNULIB_MDA_FCLOSEALL
1088 GNULIB_VSPRINTF_POSIX
1089 GNULIB_VSNPRINTF
1090 GNULIB_VPRINTF_POSIX
1091 GNULIB_VPRINTF
1092 GNULIB_VFPRINTF_POSIX
1093 GNULIB_VFPRINTF
1094 GNULIB_VDPRINTF
1095 GNULIB_VSCANF
1096 GNULIB_VFSCANF
1097 GNULIB_VASPRINTF
1098 GNULIB_TMPFILE
1099 GNULIB_STDIO_H_SIGPIPE
1100 GNULIB_STDIO_H_NONBLOCKING
1101 GNULIB_SPRINTF_POSIX
1102 GNULIB_SNPRINTF
1103 GNULIB_SCANF
1104 GNULIB_RENAMEAT
1105 GNULIB_RENAME
1106 GNULIB_REMOVE
1107 GNULIB_PUTS
1108 GNULIB_PUTCHAR
1109 GNULIB_PUTC
1110 GNULIB_PRINTF_POSIX
1111 GNULIB_PRINTF
1112 GNULIB_POPEN
1113 GNULIB_PERROR
1114 GNULIB_PCLOSE
1115 GNULIB_OBSTACK_PRINTF_POSIX
1116 GNULIB_OBSTACK_PRINTF
1117 GNULIB_GETLINE
1118 GNULIB_GETDELIM
1119 GNULIB_GETCHAR
1120 GNULIB_GETC
1121 GNULIB_FWRITE
1122 GNULIB_FTELLO
1123 GNULIB_FTELL
1124 GNULIB_FSEEKO
1125 GNULIB_FSEEK
1126 GNULIB_FSCANF
1127 GNULIB_FREOPEN
1128 GNULIB_FREAD
1129 GNULIB_FPUTS
1130 GNULIB_FPUTC
1131 GNULIB_FPURGE
1132 GNULIB_FPRINTF_POSIX
1133 GNULIB_FPRINTF
1134 GNULIB_FOPEN
1135 GNULIB_FGETS
1136 GNULIB_FGETC
1137 GNULIB_FFLUSH
1138 GNULIB_FDOPEN
1139 GNULIB_FCLOSE
1140 GNULIB_DPRINTF
1141 WINDOWS_64_BIT_ST_SIZE
1142 WINDOWS_STAT_TIMESPEC
1143 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1144 NEXT_SYS_STAT_H
1145 REPLACE_UTIMENSAT
1146 REPLACE_STAT
1147 REPLACE_MKNODAT
1148 REPLACE_MKNOD
1149 REPLACE_MKFIFOAT
1150 REPLACE_MKFIFO
1151 REPLACE_MKDIR
1152 REPLACE_LSTAT
1153 REPLACE_FUTIMENS
1154 REPLACE_FSTATAT
1155 REPLACE_FSTAT
1156 REPLACE_FCHMODAT
1157 HAVE_UTIMENSAT
1158 HAVE_MKNODAT
1159 HAVE_MKNOD
1160 HAVE_MKFIFOAT
1161 HAVE_MKFIFO
1162 HAVE_MKDIRAT
1163 HAVE_LSTAT
1164 HAVE_LCHMOD
1165 HAVE_GETUMASK
1166 HAVE_FUTIMENS
1167 HAVE_FSTATAT
1168 HAVE_FCHMODAT
1169 GNULIB_MDA_UMASK
1170 GNULIB_MDA_MKDIR
1171 GNULIB_MDA_CHMOD
1172 GNULIB_OVERRIDES_STRUCT_STAT
1173 GNULIB_UTIMENSAT
1174 GNULIB_STAT
1175 GNULIB_MKNODAT
1176 GNULIB_MKNOD
1177 GNULIB_MKFIFOAT
1178 GNULIB_MKFIFO
1179 GNULIB_MKDIRAT
1180 GNULIB_MKDIR
1181 GNULIB_LSTAT
1182 GNULIB_LCHMOD
1183 GNULIB_GETUMASK
1184 GNULIB_FUTIMENS
1185 GNULIB_FSTATAT
1186 GNULIB_FSTAT
1187 GNULIB_FCHMODAT
1188 FREXPL_LIBM
1189 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1190 FREXP_LIBM
1191 REPLACE_TRUNCL
1192 REPLACE_TRUNCF
1193 REPLACE_TRUNC
1194 REPLACE_TANHF
1195 REPLACE_TANF
1196 REPLACE_SQRTL
1197 REPLACE_SQRTF
1198 REPLACE_SINHF
1199 REPLACE_SINF
1200 REPLACE_SIGNBIT_USING_BUILTINS
1201 REPLACE_SIGNBIT
1202 REPLACE_ROUNDL
1203 REPLACE_ROUNDF
1204 REPLACE_ROUND
1205 REPLACE_RINTL
1206 REPLACE_REMAINDERL
1207 REPLACE_REMAINDERF
1208 REPLACE_REMAINDER
1209 REPLACE_NAN
1210 REPLACE_MODFL
1211 REPLACE_MODFF
1212 REPLACE_MODF
1213 REPLACE_LOGBL
1214 REPLACE_LOGBF
1215 REPLACE_LOGB
1216 REPLACE_LOG2L
1217 REPLACE_LOG2F
1218 REPLACE_LOG2
1219 REPLACE_LOG1PL
1220 REPLACE_LOG1PF
1221 REPLACE_LOG1P
1222 REPLACE_LOG10L
1223 REPLACE_LOG10F
1224 REPLACE_LOG10
1225 REPLACE_LOGL
1226 REPLACE_LOGF
1227 REPLACE_LOG
1228 REPLACE_LDEXPL
1229 REPLACE_ISNAN
1230 REPLACE_ISINF
1231 REPLACE_ISFINITE
1232 REPLACE_ILOGBL
1233 REPLACE_ILOGBF
1234 REPLACE_ILOGB
1235 REPLACE_HYPOTL
1236 REPLACE_HYPOTF
1237 REPLACE_HYPOT
1238 REPLACE_HUGE_VAL
1239 REPLACE_FREXPL
1240 REPLACE_FREXP
1241 REPLACE_FREXPF
1242 REPLACE_FMODL
1243 REPLACE_FMODF
1244 REPLACE_FMOD
1245 REPLACE_FMAL
1246 REPLACE_FMAF
1247 REPLACE_FMA
1248 REPLACE_FLOORL
1249 REPLACE_FLOORF
1250 REPLACE_FLOOR
1251 REPLACE_FABSL
1252 REPLACE_EXP2L
1253 REPLACE_EXP2
1254 REPLACE_EXPM1L
1255 REPLACE_EXPM1F
1256 REPLACE_EXPM1
1257 REPLACE_EXPL
1258 REPLACE_EXPF
1259 REPLACE_COSHF
1260 REPLACE_COSF
1261 REPLACE_CEILL
1262 REPLACE_CEILF
1263 REPLACE_CEIL
1264 REPLACE_CBRTL
1265 REPLACE_CBRTF
1266 REPLACE_ATAN2F
1267 REPLACE_ATANF
1268 REPLACE_ASINF
1269 REPLACE_ACOSF
1270 HAVE_DECL_TRUNCL
1271 HAVE_DECL_TRUNCF
1272 HAVE_DECL_TRUNC
1273 HAVE_DECL_TANL
1274 HAVE_DECL_SQRTL
1275 HAVE_DECL_SINL
1276 HAVE_DECL_ROUNDL
1277 HAVE_DECL_ROUNDF
1278 HAVE_DECL_ROUND
1279 HAVE_DECL_RINTF
1280 HAVE_DECL_REMAINDERL
1281 HAVE_DECL_REMAINDER
1282 HAVE_DECL_LOGB
1283 HAVE_DECL_LOG2L
1284 HAVE_DECL_LOG2F
1285 HAVE_DECL_LOG2
1286 HAVE_DECL_LOG10L
1287 HAVE_DECL_LOGL
1288 HAVE_DECL_LDEXPL
1289 HAVE_DECL_FREXPL
1290 HAVE_DECL_FLOORL
1291 HAVE_DECL_FLOORF
1292 HAVE_DECL_EXPM1L
1293 HAVE_DECL_EXP2L
1294 HAVE_DECL_EXP2F
1295 HAVE_DECL_EXP2
1296 HAVE_DECL_EXPL
1297 HAVE_DECL_COSL
1298 HAVE_DECL_COPYSIGNF
1299 HAVE_DECL_CEILL
1300 HAVE_DECL_CEILF
1301 HAVE_DECL_CBRTL
1302 HAVE_DECL_CBRTF
1303 HAVE_DECL_ATANL
1304 HAVE_DECL_ASINL
1305 HAVE_DECL_ACOSL
1306 HAVE_TANHF
1307 HAVE_TANL
1308 HAVE_TANF
1309 HAVE_SQRTL
1310 HAVE_SQRTF
1311 HAVE_SINHF
1312 HAVE_SINL
1313 HAVE_SINF
1314 HAVE_RINTL
1315 HAVE_RINT
1316 HAVE_REMAINDERF
1317 HAVE_REMAINDER
1318 HAVE_POWF
1319 HAVE_MODFL
1320 HAVE_MODFF
1321 HAVE_LOGBL
1322 HAVE_LOGBF
1323 HAVE_LOG1PL
1324 HAVE_LOG1PF
1325 HAVE_LOG1P
1326 HAVE_LOG10L
1327 HAVE_LOG10F
1328 HAVE_LOGL
1329 HAVE_LOGF
1330 HAVE_LDEXPF
1331 HAVE_ISNANL
1332 HAVE_ISNAND
1333 HAVE_ISNANF
1334 HAVE_ILOGBL
1335 HAVE_ILOGBF
1336 HAVE_ILOGB
1337 HAVE_HYPOTL
1338 HAVE_HYPOTF
1339 HAVE_FREXPF
1340 HAVE_FMODL
1341 HAVE_FMODF
1342 HAVE_FMAL
1343 HAVE_FMAF
1344 HAVE_FMA
1345 HAVE_FABSL
1346 HAVE_FABSF
1347 HAVE_EXPM1F
1348 HAVE_EXPM1
1349 HAVE_EXPL
1350 HAVE_EXPF
1351 HAVE_COSHF
1352 HAVE_COSL
1353 HAVE_COSF
1354 HAVE_COPYSIGNL
1355 HAVE_COPYSIGN
1356 HAVE_CBRTL
1357 HAVE_CBRTF
1358 HAVE_CBRT
1359 HAVE_ATAN2F
1360 HAVE_ATANL
1361 HAVE_ATANF
1362 HAVE_ASINL
1363 HAVE_ASINF
1364 HAVE_ACOSL
1365 HAVE_ACOSF
1366 GNULIB_MDA_YN
1367 GNULIB_MDA_Y1
1368 GNULIB_MDA_Y0
1369 GNULIB_MDA_JN
1370 GNULIB_MDA_J1
1371 GNULIB_MDA_J0
1372 GNULIB_TRUNCL
1373 GNULIB_TRUNCF
1374 GNULIB_TRUNC
1375 GNULIB_TANHF
1376 GNULIB_TANL
1377 GNULIB_TANF
1378 GNULIB_SQRTL
1379 GNULIB_SQRTF
1380 GNULIB_SINHF
1381 GNULIB_SINL
1382 GNULIB_SINF
1383 GNULIB_SIGNBIT
1384 GNULIB_ROUNDL
1385 GNULIB_ROUNDF
1386 GNULIB_ROUND
1387 GNULIB_RINTL
1388 GNULIB_RINTF
1389 GNULIB_RINT
1390 GNULIB_REMAINDERL
1391 GNULIB_REMAINDERF
1392 GNULIB_REMAINDER
1393 GNULIB_POWF
1394 GNULIB_MODFL
1395 GNULIB_MODFF
1396 GNULIB_MODF
1397 GNULIB_LOGBL
1398 GNULIB_LOGBF
1399 GNULIB_LOGB
1400 GNULIB_LOG2L
1401 GNULIB_LOG2F
1402 GNULIB_LOG2
1403 GNULIB_LOG1PL
1404 GNULIB_LOG1PF
1405 GNULIB_LOG1P
1406 GNULIB_LOG10L
1407 GNULIB_LOG10F
1408 GNULIB_LOG10
1409 GNULIB_LOGL
1410 GNULIB_LOGF
1411 GNULIB_LOG
1412 GNULIB_LDEXPL
1413 GNULIB_LDEXPF
1414 GNULIB_ISNANL
1415 GNULIB_ISNAND
1416 GNULIB_ISNANF
1417 GNULIB_ISNAN
1418 GNULIB_ISINF
1419 GNULIB_ISFINITE
1420 GNULIB_ILOGBL
1421 GNULIB_ILOGBF
1422 GNULIB_ILOGB
1423 GNULIB_HYPOTL
1424 GNULIB_HYPOTF
1425 GNULIB_HYPOT
1426 GNULIB_FREXPL
1427 GNULIB_FREXP
1428 GNULIB_FREXPF
1429 GNULIB_FMODL
1430 GNULIB_FMODF
1431 GNULIB_FMOD
1432 GNULIB_FMAL
1433 GNULIB_FMAF
1434 GNULIB_FMA
1435 GNULIB_FLOORL
1436 GNULIB_FLOORF
1437 GNULIB_FLOOR
1438 GNULIB_FABSL
1439 GNULIB_FABSF
1440 GNULIB_EXPM1L
1441 GNULIB_EXPM1F
1442 GNULIB_EXPM1
1443 GNULIB_EXP2L
1444 GNULIB_EXP2F
1445 GNULIB_EXP2
1446 GNULIB_EXPL
1447 GNULIB_EXPF
1448 GNULIB_COSHF
1449 GNULIB_COSL
1450 GNULIB_COSF
1451 GNULIB_COPYSIGNL
1452 GNULIB_COPYSIGNF
1453 GNULIB_COPYSIGN
1454 GNULIB_CEILL
1455 GNULIB_CEILF
1456 GNULIB_CEIL
1457 GNULIB_CBRTL
1458 GNULIB_CBRTF
1459 GNULIB_CBRT
1460 GNULIB_ATAN2F
1461 GNULIB_ATANL
1462 GNULIB_ATANF
1463 GNULIB_ASINL
1464 GNULIB_ASINF
1465 GNULIB_ACOSL
1466 GNULIB_ACOSF
1467 GL_GENERATE_FNMATCH_H_FALSE
1468 GL_GENERATE_FNMATCH_H_TRUE
1469 FNMATCH_H
1470 HAVE_FNMATCH_H
1471 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1472 NEXT_FNMATCH_H
1473 REPLACE_FNMATCH
1474 HAVE_FNMATCH
1475 GNULIB_FNMATCH
1476 REPLACE_ITOLD
1477 GL_GENERATE_FLOAT_H_FALSE
1478 GL_GENERATE_FLOAT_H_TRUE
1479 FLOAT_H
1480 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1481 NEXT_FLOAT_H
1482 HAVE_DECL_STRNCASECMP
1483 HAVE_STRCASECMP
1484 HAVE_FFS
1485 GNULIB_FFS
1486 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1487 NEXT_FCNTL_H
1488 REPLACE_OPENAT
1489 REPLACE_OPEN
1490 REPLACE_FCNTL
1491 REPLACE_CREAT
1492 HAVE_OPENAT
1493 HAVE_FCNTL
1494 GNULIB_MDA_OPEN
1495 GNULIB_MDA_CREAT
1496 GNULIB_OPENAT
1497 GNULIB_OPEN
1498 GNULIB_NONBLOCKING
1499 GNULIB_FCNTL
1500 GNULIB_CREAT
1501 EOVERFLOW_VALUE
1502 EOVERFLOW_HIDDEN
1503 ENOLINK_VALUE
1504 ENOLINK_HIDDEN
1505 EMULTIHOP_VALUE
1506 EMULTIHOP_HIDDEN
1507 GL_GENERATE_ERRNO_H_FALSE
1508 GL_GENERATE_ERRNO_H_TRUE
1509 ERRNO_H
1510 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1511 NEXT_ERRNO_H
1512 HAVE_DIRENT_H
1513 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1514 NEXT_DIRENT_H
1515 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1516 NEXT_CTYPE_H
1517 HAVE_ISBLANK
1518 GNULIB_ISBLANK
1519 REPLACE_FDOPENDIR
1520 REPLACE_DIRFD
1521 REPLACE_CLOSEDIR
1522 REPLACE_OPENDIR
1523 HAVE_ALPHASORT
1524 HAVE_SCANDIR
1525 HAVE_FDOPENDIR
1526 HAVE_DECL_FDOPENDIR
1527 HAVE_DECL_DIRFD
1528 HAVE_CLOSEDIR
1529 HAVE_REWINDDIR
1530 HAVE_READDIR
1531 HAVE_OPENDIR
1532 GNULIB_ALPHASORT
1533 GNULIB_SCANDIR
1534 GNULIB_FDOPENDIR
1535 GNULIB_DIRFD
1536 GNULIB_CLOSEDIR
1537 GNULIB_REWINDDIR
1538 GNULIB_READDIR
1539 GNULIB_OPENDIR
1540 HAVE_WINSOCK2_H
1541 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1542 LIB_CLOCK_GETTIME
1543 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1544 UNISTD_H_HAVE_WINSOCK2_H
1545 UNISTD_H_HAVE_SYS_RANDOM_H
1546 REPLACE_WRITE
1547 REPLACE_USLEEP
1548 REPLACE_UNLINKAT
1549 REPLACE_UNLINK
1550 REPLACE_TTYNAME_R
1551 REPLACE_TRUNCATE
1552 REPLACE_SYMLINKAT
1553 REPLACE_SYMLINK
1554 REPLACE_SLEEP
1555 REPLACE_RMDIR
1556 REPLACE_READLINKAT
1557 REPLACE_READLINK
1558 REPLACE_READ
1559 REPLACE_PWRITE
1560 REPLACE_PREAD
1561 REPLACE_LSEEK
1562 REPLACE_LINKAT
1563 REPLACE_LINK
1564 REPLACE_LCHOWN
1565 REPLACE_ISATTY
1566 REPLACE_GETPASS
1567 REPLACE_GETPAGESIZE
1568 REPLACE_GETGROUPS
1569 REPLACE_GETLOGIN_R
1570 REPLACE_GETDTABLESIZE
1571 REPLACE_GETDOMAINNAME
1572 REPLACE_GETCWD
1573 REPLACE_FTRUNCATE
1574 REPLACE_FCHOWNAT
1575 REPLACE_FACCESSAT
1576 REPLACE_EXECVPE
1577 REPLACE_EXECVP
1578 REPLACE_EXECVE
1579 REPLACE_EXECV
1580 REPLACE_EXECLP
1581 REPLACE_EXECLE
1582 REPLACE_EXECL
1583 REPLACE_DUP2
1584 REPLACE_DUP
1585 REPLACE_CLOSE
1586 REPLACE_CHOWN
1587 REPLACE_ACCESS
1588 HAVE_SYS_PARAM_H
1589 HAVE_OS_H
1590 HAVE_DECL_TTYNAME_R
1591 HAVE_DECL_TRUNCATE
1592 HAVE_DECL_SETHOSTNAME
1593 HAVE_DECL_GETUSERSHELL
1594 HAVE_DECL_GETPAGESIZE
1595 HAVE_DECL_GETLOGIN_R
1596 HAVE_DECL_GETLOGIN
1597 HAVE_DECL_GETDOMAINNAME
1598 HAVE_DECL_FDATASYNC
1599 HAVE_DECL_FCHDIR
1600 HAVE_DECL_EXECVPE
1601 HAVE_DECL_ENVIRON
1602 HAVE_USLEEP
1603 HAVE_UNLINKAT
1604 HAVE_SYMLINKAT
1605 HAVE_SYMLINK
1606 HAVE_SLEEP
1607 HAVE_SETHOSTNAME
1608 HAVE_READLINKAT
1609 HAVE_READLINK
1610 HAVE_PWRITE
1611 HAVE_PREAD
1612 HAVE_PIPE2
1613 HAVE_PIPE
1614 HAVE_LINKAT
1615 HAVE_LINK
1616 HAVE_LCHOWN
1617 HAVE_GROUP_MEMBER
1618 HAVE_GETPASS
1619 HAVE_GETPAGESIZE
1620 HAVE_GETLOGIN
1621 HAVE_GETHOSTNAME
1622 HAVE_GETGROUPS
1623 HAVE_GETENTROPY
1624 HAVE_GETDTABLESIZE
1625 HAVE_FTRUNCATE
1626 HAVE_FSYNC
1627 HAVE_FDATASYNC
1628 HAVE_FCHOWNAT
1629 HAVE_FCHDIR
1630 HAVE_FACCESSAT
1631 HAVE_EXECVPE
1632 HAVE_EUIDACCESS
1633 HAVE_DUP3
1634 HAVE_COPY_FILE_RANGE
1635 HAVE_CHOWN
1636 GNULIB_MDA_WRITE
1637 GNULIB_MDA_UNLINK
1638 GNULIB_MDA_SWAB
1639 GNULIB_MDA_RMDIR
1640 GNULIB_MDA_READ
1641 GNULIB_MDA_LSEEK
1642 GNULIB_MDA_ISATTY
1643 GNULIB_MDA_GETPID
1644 GNULIB_MDA_GETCWD
1645 GNULIB_MDA_EXECVPE
1646 GNULIB_MDA_EXECVP
1647 GNULIB_MDA_EXECVE
1648 GNULIB_MDA_EXECV
1649 GNULIB_MDA_EXECLP
1650 GNULIB_MDA_EXECLE
1651 GNULIB_MDA_EXECL
1652 GNULIB_MDA_DUP2
1653 GNULIB_MDA_DUP
1654 GNULIB_MDA_CLOSE
1655 GNULIB_MDA_CHDIR
1656 GNULIB_MDA_ACCESS
1657 GNULIB_WRITE
1658 GNULIB_USLEEP
1659 GNULIB_UNLINKAT
1660 GNULIB_UNLINK
1661 GNULIB_UNISTD_H_SIGPIPE
1662 GNULIB_UNISTD_H_NONBLOCKING
1663 GNULIB_TTYNAME_R
1664 GNULIB_TRUNCATE
1665 GNULIB_SYMLINKAT
1666 GNULIB_SYMLINK
1667 GNULIB_SLEEP
1668 GNULIB_SETHOSTNAME
1669 GNULIB_RMDIR
1670 GNULIB_READLINKAT
1671 GNULIB_READLINK
1672 GNULIB_READ
1673 GNULIB_PWRITE
1674 GNULIB_PREAD
1675 GNULIB_PIPE2
1676 GNULIB_PIPE
1677 GNULIB_LSEEK
1678 GNULIB_LINKAT
1679 GNULIB_LINK
1680 GNULIB_LCHOWN
1681 GNULIB_ISATTY
1682 GNULIB_GROUP_MEMBER
1683 GNULIB_GETUSERSHELL
1684 GNULIB_GETPASS
1685 GNULIB_GETPAGESIZE
1686 GNULIB_GETOPT_POSIX
1687 GNULIB_GETLOGIN_R
1688 GNULIB_GETLOGIN
1689 GNULIB_GETHOSTNAME
1690 GNULIB_GETGROUPS
1691 GNULIB_GETENTROPY
1692 GNULIB_GETDTABLESIZE
1693 GNULIB_GETDOMAINNAME
1694 GNULIB_GETCWD
1695 GNULIB_FTRUNCATE
1696 GNULIB_FSYNC
1697 GNULIB_FDATASYNC
1698 GNULIB_FCHOWNAT
1699 GNULIB_FCHDIR
1700 GNULIB_FACCESSAT
1701 GNULIB_EXECVPE
1702 GNULIB_EXECVP
1703 GNULIB_EXECVE
1704 GNULIB_EXECV
1705 GNULIB_EXECLP
1706 GNULIB_EXECLE
1707 GNULIB_EXECL
1708 GNULIB_EUIDACCESS
1709 GNULIB_ENVIRON
1710 GNULIB_DUP3
1711 GNULIB_DUP2
1712 GNULIB_DUP
1713 GNULIB_COPY_FILE_RANGE
1714 GNULIB_CLOSE
1715 GNULIB_CHOWN
1716 GNULIB_CHDIR
1717 GNULIB_ACCESS
1718 REPLACE_WCTOMB
1719 REPLACE_UNSETENV
1720 REPLACE_STRTOLD
1721 REPLACE_STRTOD
1722 REPLACE_SETSTATE
1723 REPLACE_SETENV
1724 REPLACE_REALPATH
1725 REPLACE_REALLOC
1726 REPLACE_RANDOM_R
1727 REPLACE_RANDOM
1728 REPLACE_QSORT_R
1729 REPLACE_PUTENV
1730 REPLACE_PTSNAME_R
1731 REPLACE_PTSNAME
1732 REPLACE_POSIX_MEMALIGN
1733 REPLACE_MKSTEMP
1734 REPLACE_MBTOWC
1735 REPLACE_MALLOC
1736 REPLACE_INITSTATE
1737 REPLACE_FREE
1738 REPLACE_CANONICALIZE_FILE_NAME
1739 REPLACE_CALLOC
1740 REPLACE_ALIGNED_ALLOC
1741 HAVE_DECL_UNSETENV
1742 HAVE_UNLOCKPT
1743 HAVE_SYS_LOADAVG_H
1744 HAVE_STRUCT_RANDOM_DATA
1745 HAVE_STRTOULL
1746 HAVE_STRTOLL
1747 HAVE_STRTOLD
1748 HAVE_STRTOD
1749 HAVE_DECL_SETSTATE
1750 HAVE_SETSTATE
1751 HAVE_DECL_SETENV
1752 HAVE_SETENV
1753 HAVE_SECURE_GETENV
1754 HAVE_RPMATCH
1755 HAVE_REALPATH
1756 HAVE_REALLOCARRAY
1757 HAVE_RANDOM_R
1758 HAVE_RANDOM_H
1759 HAVE_RANDOM
1760 HAVE_QSORT_R
1761 HAVE_PTSNAME_R
1762 HAVE_PTSNAME
1763 HAVE_POSIX_OPENPT
1764 HAVE_POSIX_MEMALIGN
1765 HAVE_MKSTEMPS
1766 HAVE_MKSTEMP
1767 HAVE_MKOSTEMPS
1768 HAVE_MKOSTEMP
1769 HAVE_MKDTEMP
1770 HAVE_MBTOWC
1771 HAVE_DECL_INITSTATE
1772 HAVE_INITSTATE
1773 HAVE_GRANTPT
1774 HAVE_GETSUBOPT
1775 HAVE_DECL_GETLOADAVG
1776 HAVE_DECL_GCVT
1777 HAVE_DECL_FCVT
1778 HAVE_DECL_ECVT
1779 HAVE_CANONICALIZE_FILE_NAME
1780 HAVE_ATOLL
1781 HAVE_ALIGNED_ALLOC
1782 HAVE__EXIT
1783 GNULIB_MDA_PUTENV
1784 GNULIB_MDA_MKTEMP
1785 GNULIB_MDA_GCVT
1786 GNULIB_MDA_FCVT
1787 GNULIB_MDA_ECVT
1788 GNULIB_WCTOMB
1789 GNULIB_UNSETENV
1790 GNULIB_UNLOCKPT
1791 GNULIB_SYSTEM_POSIX
1792 GNULIB_STRTOULL
1793 GNULIB_STRTOLL
1794 GNULIB_STRTOLD
1795 GNULIB_STRTOD
1796 GNULIB_SETENV
1797 GNULIB_SECURE_GETENV
1798 GNULIB_RPMATCH
1799 GNULIB_REALPATH
1800 GNULIB_REALLOC_POSIX
1801 GNULIB_REALLOCARRAY
1802 GNULIB_RANDOM_R
1803 GNULIB_RANDOM
1804 GNULIB_QSORT_R
1805 GNULIB_PUTENV
1806 GNULIB_PTSNAME_R
1807 GNULIB_PTSNAME
1808 GNULIB_POSIX_OPENPT
1809 GNULIB_POSIX_MEMALIGN
1810 GNULIB_MKSTEMPS
1811 GNULIB_MKSTEMP
1812 GNULIB_MKOSTEMPS
1813 GNULIB_MKOSTEMP
1814 GNULIB_MKDTEMP
1815 GNULIB_MBTOWC
1816 GNULIB_MALLOC_POSIX
1817 GNULIB_GRANTPT
1818 GNULIB_GETSUBOPT
1819 GNULIB_GETLOADAVG
1820 GNULIB_FREE_POSIX
1821 GNULIB_CANONICALIZE_FILE_NAME
1822 GNULIB_CALLOC_POSIX
1823 GNULIB_ATOLL
1824 GNULIB_ALIGNED_ALLOC
1825 GNULIB__EXIT
1826 LOCALE_FR
1827 REPLACE_WCSTOK
1828 REPLACE_WCSFTIME
1829 REPLACE_WCSWIDTH
1830 REPLACE_WCWIDTH
1831 REPLACE_WCSNRTOMBS
1832 REPLACE_WCSRTOMBS
1833 REPLACE_WCRTOMB
1834 REPLACE_MBSNRTOWCS
1835 REPLACE_MBSRTOWCS
1836 REPLACE_MBRLEN
1837 REPLACE_MBRTOWC
1838 REPLACE_MBSINIT
1839 REPLACE_WCTOB
1840 REPLACE_BTOWC
1841 REPLACE_MBSTATE_T
1842 HAVE_DECL_WCWIDTH
1843 HAVE_DECL_WCSDUP
1844 HAVE_DECL_WCTOB
1845 HAVE_WCSFTIME
1846 HAVE_WCSWIDTH
1847 HAVE_WCSTOK
1848 HAVE_WCSSTR
1849 HAVE_WCSPBRK
1850 HAVE_WCSSPN
1851 HAVE_WCSCSPN
1852 HAVE_WCSRCHR
1853 HAVE_WCSCHR
1854 HAVE_WCSDUP
1855 HAVE_WCSXFRM
1856 HAVE_WCSCOLL
1857 HAVE_WCSNCASECMP
1858 HAVE_WCSCASECMP
1859 HAVE_WCSNCMP
1860 HAVE_WCSCMP
1861 HAVE_WCSNCAT
1862 HAVE_WCSCAT
1863 HAVE_WCPNCPY
1864 HAVE_WCSNCPY
1865 HAVE_WCPCPY
1866 HAVE_WCSCPY
1867 HAVE_WCSNLEN
1868 HAVE_WCSLEN
1869 HAVE_WMEMSET
1870 HAVE_WMEMPCPY
1871 HAVE_WMEMMOVE
1872 HAVE_WMEMCPY
1873 HAVE_WMEMCMP
1874 HAVE_WMEMCHR
1875 HAVE_WCSNRTOMBS
1876 HAVE_WCSRTOMBS
1877 HAVE_WCRTOMB
1878 HAVE_MBSNRTOWCS
1879 HAVE_MBSRTOWCS
1880 HAVE_MBRLEN
1881 HAVE_MBRTOWC
1882 HAVE_MBSINIT
1883 HAVE_BTOWC
1884 GNULIB_MDA_WCSDUP
1885 GNULIB_WCSFTIME
1886 GNULIB_WCSWIDTH
1887 GNULIB_WCSTOK
1888 GNULIB_WCSSTR
1889 GNULIB_WCSPBRK
1890 GNULIB_WCSSPN
1891 GNULIB_WCSCSPN
1892 GNULIB_WCSRCHR
1893 GNULIB_WCSCHR
1894 GNULIB_WCSDUP
1895 GNULIB_WCSXFRM
1896 GNULIB_WCSCOLL
1897 GNULIB_WCSNCASECMP
1898 GNULIB_WCSCASECMP
1899 GNULIB_WCSNCMP
1900 GNULIB_WCSCMP
1901 GNULIB_WCSNCAT
1902 GNULIB_WCSCAT
1903 GNULIB_WCPNCPY
1904 GNULIB_WCSNCPY
1905 GNULIB_WCPCPY
1906 GNULIB_WCSCPY
1907 GNULIB_WCSNLEN
1908 GNULIB_WCSLEN
1909 GNULIB_WMEMSET
1910 GNULIB_WMEMPCPY
1911 GNULIB_WMEMMOVE
1912 GNULIB_WMEMCPY
1913 GNULIB_WMEMCMP
1914 GNULIB_WMEMCHR
1915 GNULIB_WCWIDTH
1916 GNULIB_WCSNRTOMBS
1917 GNULIB_WCSRTOMBS
1918 GNULIB_WCRTOMB
1919 GNULIB_MBSNRTOWCS
1920 GNULIB_MBSRTOWCS
1921 GNULIB_MBRLEN
1922 GNULIB_MBRTOWC
1923 GNULIB_MBSINIT
1924 GNULIB_WCTOB
1925 GNULIB_BTOWC
1926 MKDIR_P
1927 HAVE_WS2TCPIP_H
1928 HAVE_FEATURES_H
1929 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
1930 NEXT_ARPA_INET_H
1931 PRAGMA_COLUMNS
1932 PRAGMA_SYSTEM_HEADER
1933 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1934 INCLUDE_NEXT
1935 HAVE_ARPA_INET_H
1936 REPLACE_INET_PTON
1937 REPLACE_INET_NTOP
1938 HAVE_DECL_INET_PTON
1939 HAVE_DECL_INET_NTOP
1940 GNULIB_INET_PTON
1941 GNULIB_INET_NTOP
1942 HAVE_ALLOCA_H
1943 GL_GENERATE_ALLOCA_H_FALSE
1944 GL_GENERATE_ALLOCA_H_TRUE
1945 ALLOCA_H
1946 ALLOCA
1947 GL_COND_LIBTOOL_FALSE
1948 GL_COND_LIBTOOL_TRUE
1949 RANLIB
1950 ARFLAGS
1951 AR
1952 LARGEFILE_CPPFLAGS
1953 target_os
1954 target_vendor
1955 target_cpu
1956 target
1957 host_os
1958 host_vendor
1959 host_cpu
1960 host
1961 build_os
1962 build_vendor
1963 build_cpu
1964 build
1965 EGREP
1966 GREP
1967 CPP
1968 OBJEXT
1969 EXEEXT
1970 ac_ct_CC
1971 CPPFLAGS
1972 LDFLAGS
1973 CFLAGS
1974 CC
1975 MAINT
1976 MAINTAINER_MODE_FALSE
1977 MAINTAINER_MODE_TRUE
1978 target_alias
1979 host_alias
1980 build_alias
1981 LIBS
1982 ECHO_T
1983 ECHO_N
1984 ECHO_C
1985 DEFS
1986 mandir
1987 localedir
1988 libdir
1989 psdir
1990 pdfdir
1991 dvidir
1992 htmldir
1993 infodir
1994 docdir
1995 oldincludedir
1996 includedir
1997 localstatedir
1998 sharedstatedir
1999 sysconfdir
2000 datadir
2001 datarootdir
2002 libexecdir
2003 sbindir
2004 bindir
2005 program_transform_name
2006 prefix
2007 exec_prefix
2008 PACKAGE_URL
2009 PACKAGE_BUGREPORT
2010 PACKAGE_STRING
2011 PACKAGE_VERSION
2012 PACKAGE_TARNAME
2013 PACKAGE_NAME
2014 PATH_SEPARATOR
2015 SHELL'
2016 ac_subst_files=''
2017 ac_user_opts='
2018 enable_option_checking
2019 enable_maintainer_mode
2020 enable_plugins
2021 enable_largefile
2022 enable_threads
2023 enable_cross_guesses
2024 enable_dependency_tracking
2025 enable_silent_rules
2026 '
2027 ac_precious_vars='build_alias
2028 host_alias
2029 target_alias
2030 CC
2031 CFLAGS
2032 LDFLAGS
2033 LIBS
2034 CPPFLAGS
2035 CPP'
2036
2037
2038 # Initialize some variables set by options.
2039 ac_init_help=
2040 ac_init_version=false
2041 ac_unrecognized_opts=
2042 ac_unrecognized_sep=
2043 # The variables have the same names as the options, with
2044 # dashes changed to underlines.
2045 cache_file=/dev/null
2046 exec_prefix=NONE
2047 no_create=
2048 no_recursion=
2049 prefix=NONE
2050 program_prefix=NONE
2051 program_suffix=NONE
2052 program_transform_name=s,x,x,
2053 silent=
2054 site=
2055 srcdir=
2056 verbose=
2057 x_includes=NONE
2058 x_libraries=NONE
2059
2060 # Installation directory options.
2061 # These are left unexpanded so users can "make install exec_prefix=/foo"
2062 # and all the variables that are supposed to be based on exec_prefix
2063 # by default will actually change.
2064 # Use braces instead of parens because sh, perl, etc. also accept them.
2065 # (The list follows the same order as the GNU Coding Standards.)
2066 bindir='${exec_prefix}/bin'
2067 sbindir='${exec_prefix}/sbin'
2068 libexecdir='${exec_prefix}/libexec'
2069 datarootdir='${prefix}/share'
2070 datadir='${datarootdir}'
2071 sysconfdir='${prefix}/etc'
2072 sharedstatedir='${prefix}/com'
2073 localstatedir='${prefix}/var'
2074 includedir='${prefix}/include'
2075 oldincludedir='/usr/include'
2076 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2077 infodir='${datarootdir}/info'
2078 htmldir='${docdir}'
2079 dvidir='${docdir}'
2080 pdfdir='${docdir}'
2081 psdir='${docdir}'
2082 libdir='${exec_prefix}/lib'
2083 localedir='${datarootdir}/locale'
2084 mandir='${datarootdir}/man'
2085
2086 ac_prev=
2087 ac_dashdash=
2088 for ac_option
2089 do
2090 # If the previous option needs an argument, assign it.
2091 if test -n "$ac_prev"; then
2092 eval $ac_prev=\$ac_option
2093 ac_prev=
2094 continue
2095 fi
2096
2097 case $ac_option in
2098 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2099 *=) ac_optarg= ;;
2100 *) ac_optarg=yes ;;
2101 esac
2102
2103 # Accept the important Cygnus configure options, so we can diagnose typos.
2104
2105 case $ac_dashdash$ac_option in
2106 --)
2107 ac_dashdash=yes ;;
2108
2109 -bindir | --bindir | --bindi | --bind | --bin | --bi)
2110 ac_prev=bindir ;;
2111 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2112 bindir=$ac_optarg ;;
2113
2114 -build | --build | --buil | --bui | --bu)
2115 ac_prev=build_alias ;;
2116 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2117 build_alias=$ac_optarg ;;
2118
2119 -cache-file | --cache-file | --cache-fil | --cache-fi \
2120 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2121 ac_prev=cache_file ;;
2122 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2123 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2124 cache_file=$ac_optarg ;;
2125
2126 --config-cache | -C)
2127 cache_file=config.cache ;;
2128
2129 -datadir | --datadir | --datadi | --datad)
2130 ac_prev=datadir ;;
2131 -datadir=* | --datadir=* | --datadi=* | --datad=*)
2132 datadir=$ac_optarg ;;
2133
2134 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2135 | --dataroo | --dataro | --datar)
2136 ac_prev=datarootdir ;;
2137 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2138 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2139 datarootdir=$ac_optarg ;;
2140
2141 -disable-* | --disable-*)
2142 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2143 # Reject names that are not valid shell variable names.
2144 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2145 as_fn_error $? "invalid feature name: $ac_useropt"
2146 ac_useropt_orig=$ac_useropt
2147 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2148 case $ac_user_opts in
2149 *"
2150 "enable_$ac_useropt"
2151 "*) ;;
2152 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2153 ac_unrecognized_sep=', ';;
2154 esac
2155 eval enable_$ac_useropt=no ;;
2156
2157 -docdir | --docdir | --docdi | --doc | --do)
2158 ac_prev=docdir ;;
2159 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2160 docdir=$ac_optarg ;;
2161
2162 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2163 ac_prev=dvidir ;;
2164 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2165 dvidir=$ac_optarg ;;
2166
2167 -enable-* | --enable-*)
2168 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2169 # Reject names that are not valid shell variable names.
2170 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2171 as_fn_error $? "invalid feature name: $ac_useropt"
2172 ac_useropt_orig=$ac_useropt
2173 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2174 case $ac_user_opts in
2175 *"
2176 "enable_$ac_useropt"
2177 "*) ;;
2178 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2179 ac_unrecognized_sep=', ';;
2180 esac
2181 eval enable_$ac_useropt=\$ac_optarg ;;
2182
2183 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2184 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2185 | --exec | --exe | --ex)
2186 ac_prev=exec_prefix ;;
2187 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2188 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2189 | --exec=* | --exe=* | --ex=*)
2190 exec_prefix=$ac_optarg ;;
2191
2192 -gas | --gas | --ga | --g)
2193 # Obsolete; use --with-gas.
2194 with_gas=yes ;;
2195
2196 -help | --help | --hel | --he | -h)
2197 ac_init_help=long ;;
2198 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2199 ac_init_help=recursive ;;
2200 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2201 ac_init_help=short ;;
2202
2203 -host | --host | --hos | --ho)
2204 ac_prev=host_alias ;;
2205 -host=* | --host=* | --hos=* | --ho=*)
2206 host_alias=$ac_optarg ;;
2207
2208 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2209 ac_prev=htmldir ;;
2210 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2211 | --ht=*)
2212 htmldir=$ac_optarg ;;
2213
2214 -includedir | --includedir | --includedi | --included | --include \
2215 | --includ | --inclu | --incl | --inc)
2216 ac_prev=includedir ;;
2217 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2218 | --includ=* | --inclu=* | --incl=* | --inc=*)
2219 includedir=$ac_optarg ;;
2220
2221 -infodir | --infodir | --infodi | --infod | --info | --inf)
2222 ac_prev=infodir ;;
2223 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2224 infodir=$ac_optarg ;;
2225
2226 -libdir | --libdir | --libdi | --libd)
2227 ac_prev=libdir ;;
2228 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2229 libdir=$ac_optarg ;;
2230
2231 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2232 | --libexe | --libex | --libe)
2233 ac_prev=libexecdir ;;
2234 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2235 | --libexe=* | --libex=* | --libe=*)
2236 libexecdir=$ac_optarg ;;
2237
2238 -localedir | --localedir | --localedi | --localed | --locale)
2239 ac_prev=localedir ;;
2240 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2241 localedir=$ac_optarg ;;
2242
2243 -localstatedir | --localstatedir | --localstatedi | --localstated \
2244 | --localstate | --localstat | --localsta | --localst | --locals)
2245 ac_prev=localstatedir ;;
2246 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2247 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2248 localstatedir=$ac_optarg ;;
2249
2250 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2251 ac_prev=mandir ;;
2252 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2253 mandir=$ac_optarg ;;
2254
2255 -nfp | --nfp | --nf)
2256 # Obsolete; use --without-fp.
2257 with_fp=no ;;
2258
2259 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2260 | --no-cr | --no-c | -n)
2261 no_create=yes ;;
2262
2263 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2264 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2265 no_recursion=yes ;;
2266
2267 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2268 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2269 | --oldin | --oldi | --old | --ol | --o)
2270 ac_prev=oldincludedir ;;
2271 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2272 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2273 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2274 oldincludedir=$ac_optarg ;;
2275
2276 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2277 ac_prev=prefix ;;
2278 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2279 prefix=$ac_optarg ;;
2280
2281 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2282 | --program-pre | --program-pr | --program-p)
2283 ac_prev=program_prefix ;;
2284 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2285 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2286 program_prefix=$ac_optarg ;;
2287
2288 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2289 | --program-suf | --program-su | --program-s)
2290 ac_prev=program_suffix ;;
2291 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2292 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2293 program_suffix=$ac_optarg ;;
2294
2295 -program-transform-name | --program-transform-name \
2296 | --program-transform-nam | --program-transform-na \
2297 | --program-transform-n | --program-transform- \
2298 | --program-transform | --program-transfor \
2299 | --program-transfo | --program-transf \
2300 | --program-trans | --program-tran \
2301 | --progr-tra | --program-tr | --program-t)
2302 ac_prev=program_transform_name ;;
2303 -program-transform-name=* | --program-transform-name=* \
2304 | --program-transform-nam=* | --program-transform-na=* \
2305 | --program-transform-n=* | --program-transform-=* \
2306 | --program-transform=* | --program-transfor=* \
2307 | --program-transfo=* | --program-transf=* \
2308 | --program-trans=* | --program-tran=* \
2309 | --progr-tra=* | --program-tr=* | --program-t=*)
2310 program_transform_name=$ac_optarg ;;
2311
2312 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2313 ac_prev=pdfdir ;;
2314 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2315 pdfdir=$ac_optarg ;;
2316
2317 -psdir | --psdir | --psdi | --psd | --ps)
2318 ac_prev=psdir ;;
2319 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2320 psdir=$ac_optarg ;;
2321
2322 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2323 | -silent | --silent | --silen | --sile | --sil)
2324 silent=yes ;;
2325
2326 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2327 ac_prev=sbindir ;;
2328 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2329 | --sbi=* | --sb=*)
2330 sbindir=$ac_optarg ;;
2331
2332 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2333 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2334 | --sharedst | --shareds | --shared | --share | --shar \
2335 | --sha | --sh)
2336 ac_prev=sharedstatedir ;;
2337 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2338 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2339 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2340 | --sha=* | --sh=*)
2341 sharedstatedir=$ac_optarg ;;
2342
2343 -site | --site | --sit)
2344 ac_prev=site ;;
2345 -site=* | --site=* | --sit=*)
2346 site=$ac_optarg ;;
2347
2348 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2349 ac_prev=srcdir ;;
2350 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2351 srcdir=$ac_optarg ;;
2352
2353 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2354 | --syscon | --sysco | --sysc | --sys | --sy)
2355 ac_prev=sysconfdir ;;
2356 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2357 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2358 sysconfdir=$ac_optarg ;;
2359
2360 -target | --target | --targe | --targ | --tar | --ta | --t)
2361 ac_prev=target_alias ;;
2362 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2363 target_alias=$ac_optarg ;;
2364
2365 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2366 verbose=yes ;;
2367
2368 -version | --version | --versio | --versi | --vers | -V)
2369 ac_init_version=: ;;
2370
2371 -with-* | --with-*)
2372 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2373 # Reject names that are not valid shell variable names.
2374 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2375 as_fn_error $? "invalid package name: $ac_useropt"
2376 ac_useropt_orig=$ac_useropt
2377 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2378 case $ac_user_opts in
2379 *"
2380 "with_$ac_useropt"
2381 "*) ;;
2382 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2383 ac_unrecognized_sep=', ';;
2384 esac
2385 eval with_$ac_useropt=\$ac_optarg ;;
2386
2387 -without-* | --without-*)
2388 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2389 # Reject names that are not valid shell variable names.
2390 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2391 as_fn_error $? "invalid package name: $ac_useropt"
2392 ac_useropt_orig=$ac_useropt
2393 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2394 case $ac_user_opts in
2395 *"
2396 "with_$ac_useropt"
2397 "*) ;;
2398 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2399 ac_unrecognized_sep=', ';;
2400 esac
2401 eval with_$ac_useropt=no ;;
2402
2403 --x)
2404 # Obsolete; use --with-x.
2405 with_x=yes ;;
2406
2407 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2408 | --x-incl | --x-inc | --x-in | --x-i)
2409 ac_prev=x_includes ;;
2410 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2411 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2412 x_includes=$ac_optarg ;;
2413
2414 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2415 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2416 ac_prev=x_libraries ;;
2417 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2418 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2419 x_libraries=$ac_optarg ;;
2420
2421 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2422 Try \`$0 --help' for more information"
2423 ;;
2424
2425 *=*)
2426 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2427 # Reject names that are not valid shell variable names.
2428 case $ac_envvar in #(
2429 '' | [0-9]* | *[!_$as_cr_alnum]* )
2430 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2431 esac
2432 eval $ac_envvar=\$ac_optarg
2433 export $ac_envvar ;;
2434
2435 *)
2436 # FIXME: should be removed in autoconf 3.0.
2437 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2438 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2439 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2440 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2441 ;;
2442
2443 esac
2444 done
2445
2446 if test -n "$ac_prev"; then
2447 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2448 as_fn_error $? "missing argument to $ac_option"
2449 fi
2450
2451 if test -n "$ac_unrecognized_opts"; then
2452 case $enable_option_checking in
2453 no) ;;
2454 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2455 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2456 esac
2457 fi
2458
2459 # Check all directory arguments for consistency.
2460 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2461 datadir sysconfdir sharedstatedir localstatedir includedir \
2462 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2463 libdir localedir mandir
2464 do
2465 eval ac_val=\$$ac_var
2466 # Remove trailing slashes.
2467 case $ac_val in
2468 */ )
2469 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2470 eval $ac_var=\$ac_val;;
2471 esac
2472 # Be sure to have absolute directory names.
2473 case $ac_val in
2474 [\\/$]* | ?:[\\/]* ) continue;;
2475 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2476 esac
2477 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2478 done
2479
2480 # There might be people who depend on the old broken behavior: `$host'
2481 # used to hold the argument of --host etc.
2482 # FIXME: To remove some day.
2483 build=$build_alias
2484 host=$host_alias
2485 target=$target_alias
2486
2487 # FIXME: To remove some day.
2488 if test "x$host_alias" != x; then
2489 if test "x$build_alias" = x; then
2490 cross_compiling=maybe
2491 elif test "x$build_alias" != "x$host_alias"; then
2492 cross_compiling=yes
2493 fi
2494 fi
2495
2496 ac_tool_prefix=
2497 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2498
2499 test "$silent" = yes && exec 6>/dev/null
2500
2501
2502 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2503 ac_ls_di=`ls -di .` &&
2504 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2505 as_fn_error $? "working directory cannot be determined"
2506 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2507 as_fn_error $? "pwd does not report name of working directory"
2508
2509
2510 # Find the source files, if location was not specified.
2511 if test -z "$srcdir"; then
2512 ac_srcdir_defaulted=yes
2513 # Try the directory containing this script, then the parent directory.
2514 ac_confdir=`$as_dirname -- "$as_myself" ||
2515 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2516 X"$as_myself" : 'X\(//\)[^/]' \| \
2517 X"$as_myself" : 'X\(//\)$' \| \
2518 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2519 $as_echo X"$as_myself" |
2520 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2521 s//\1/
2522 q
2523 }
2524 /^X\(\/\/\)[^/].*/{
2525 s//\1/
2526 q
2527 }
2528 /^X\(\/\/\)$/{
2529 s//\1/
2530 q
2531 }
2532 /^X\(\/\).*/{
2533 s//\1/
2534 q
2535 }
2536 s/.*/./; q'`
2537 srcdir=$ac_confdir
2538 if test ! -r "$srcdir/$ac_unique_file"; then
2539 srcdir=..
2540 fi
2541 else
2542 ac_srcdir_defaulted=no
2543 fi
2544 if test ! -r "$srcdir/$ac_unique_file"; then
2545 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2546 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2547 fi
2548 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2549 ac_abs_confdir=`(
2550 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2551 pwd)`
2552 # When building in place, set srcdir=.
2553 if test "$ac_abs_confdir" = "$ac_pwd"; then
2554 srcdir=.
2555 fi
2556 # Remove unnecessary trailing slashes from srcdir.
2557 # Double slashes in file names in object file debugging info
2558 # mess up M-x gdb in Emacs.
2559 case $srcdir in
2560 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2561 esac
2562 for ac_var in $ac_precious_vars; do
2563 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2564 eval ac_env_${ac_var}_value=\$${ac_var}
2565 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2566 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2567 done
2568
2569 #
2570 # Report the --help message.
2571 #
2572 if test "$ac_init_help" = "long"; then
2573 # Omit some internal or obsolete options to make the list less imposing.
2574 # This message is too long to be a string in the A/UX 3.1 sh.
2575 cat <<_ACEOF
2576 \`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
2577
2578 Usage: $0 [OPTION]... [VAR=VALUE]...
2579
2580 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2581 VAR=VALUE. See below for descriptions of some of the useful variables.
2582
2583 Defaults for the options are specified in brackets.
2584
2585 Configuration:
2586 -h, --help display this help and exit
2587 --help=short display options specific to this package
2588 --help=recursive display the short help of all the included packages
2589 -V, --version display version information and exit
2590 -q, --quiet, --silent do not print \`checking ...' messages
2591 --cache-file=FILE cache test results in FILE [disabled]
2592 -C, --config-cache alias for \`--cache-file=config.cache'
2593 -n, --no-create do not create output files
2594 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2595
2596 Installation directories:
2597 --prefix=PREFIX install architecture-independent files in PREFIX
2598 [$ac_default_prefix]
2599 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2600 [PREFIX]
2601
2602 By default, \`make install' will install all the files in
2603 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2604 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2605 for instance \`--prefix=\$HOME'.
2606
2607 For better control, use the options below.
2608
2609 Fine tuning of the installation directories:
2610 --bindir=DIR user executables [EPREFIX/bin]
2611 --sbindir=DIR system admin executables [EPREFIX/sbin]
2612 --libexecdir=DIR program executables [EPREFIX/libexec]
2613 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2614 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2615 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2616 --libdir=DIR object code libraries [EPREFIX/lib]
2617 --includedir=DIR C header files [PREFIX/include]
2618 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2619 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2620 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2621 --infodir=DIR info documentation [DATAROOTDIR/info]
2622 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2623 --mandir=DIR man documentation [DATAROOTDIR/man]
2624 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
2625 --htmldir=DIR html documentation [DOCDIR]
2626 --dvidir=DIR dvi documentation [DOCDIR]
2627 --pdfdir=DIR pdf documentation [DOCDIR]
2628 --psdir=DIR ps documentation [DOCDIR]
2629 _ACEOF
2630
2631 cat <<\_ACEOF
2632
2633 Program names:
2634 --program-prefix=PREFIX prepend PREFIX to installed program names
2635 --program-suffix=SUFFIX append SUFFIX to installed program names
2636 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2637
2638 System types:
2639 --build=BUILD configure for building on BUILD [guessed]
2640 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2641 --target=TARGET configure for building compilers for TARGET [HOST]
2642 _ACEOF
2643 fi
2644
2645 if test -n "$ac_init_help"; then
2646 case $ac_init_help in
2647 short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";;
2648 esac
2649 cat <<\_ACEOF
2650
2651 Optional Features:
2652 --disable-option-checking ignore unrecognized --enable/--with options
2653 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2654 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2655 --enable-maintainer-mode
2656 enable make rules and dependencies not useful (and
2657 sometimes confusing) to the casual installer
2658 --enable-plugins Enable support for plugins
2659 --disable-largefile omit support for large files
2660 --enable-threads={isoc|posix|isoc+posix|windows}
2661 specify multithreading API
2662 --disable-threads build without multithread safety
2663 --enable-cross-guesses={conservative|risky}
2664 specify policy for cross-compilation guesses
2665 --enable-dependency-tracking
2666 do not reject slow dependency extractors
2667 --disable-dependency-tracking
2668 speeds up one-time build
2669 --enable-silent-rules less verbose build output (undo: "make V=1")
2670 --disable-silent-rules verbose build output (undo: "make V=0")
2671
2672 Some influential environment variables:
2673 CC C compiler command
2674 CFLAGS C compiler flags
2675 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2676 nonstandard directory <lib dir>
2677 LIBS libraries to pass to the linker, e.g. -l<library>
2678 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2679 you have headers in a nonstandard directory <include dir>
2680 CPP C preprocessor
2681
2682 Use these variables to override the choices made by `configure' or to help
2683 it to find libraries and programs with nonstandard names/locations.
2684
2685 Report bugs to the package provider.
2686 _ACEOF
2687 ac_status=$?
2688 fi
2689
2690 if test "$ac_init_help" = "recursive"; then
2691 # If there are subdirs, report their specific --help.
2692 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2693 test -d "$ac_dir" ||
2694 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2695 continue
2696 ac_builddir=.
2697
2698 case "$ac_dir" in
2699 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2700 *)
2701 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2702 # A ".." for each directory in $ac_dir_suffix.
2703 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2704 case $ac_top_builddir_sub in
2705 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2706 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2707 esac ;;
2708 esac
2709 ac_abs_top_builddir=$ac_pwd
2710 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2711 # for backward compatibility:
2712 ac_top_builddir=$ac_top_build_prefix
2713
2714 case $srcdir in
2715 .) # We are building in place.
2716 ac_srcdir=.
2717 ac_top_srcdir=$ac_top_builddir_sub
2718 ac_abs_top_srcdir=$ac_pwd ;;
2719 [\\/]* | ?:[\\/]* ) # Absolute name.
2720 ac_srcdir=$srcdir$ac_dir_suffix;
2721 ac_top_srcdir=$srcdir
2722 ac_abs_top_srcdir=$srcdir ;;
2723 *) # Relative name.
2724 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2725 ac_top_srcdir=$ac_top_build_prefix$srcdir
2726 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2727 esac
2728 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2729
2730 cd "$ac_dir" || { ac_status=$?; continue; }
2731 # Check for guested configure.
2732 if test -f "$ac_srcdir/configure.gnu"; then
2733 echo &&
2734 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2735 elif test -f "$ac_srcdir/configure"; then
2736 echo &&
2737 $SHELL "$ac_srcdir/configure" --help=recursive
2738 else
2739 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2740 fi || ac_status=$?
2741 cd "$ac_pwd" || { ac_status=$?; break; }
2742 done
2743 fi
2744
2745 test -n "$ac_init_help" && exit $ac_status
2746 if $ac_init_version; then
2747 cat <<\_ACEOF
2748 libgnu configure UNUSED-VERSION
2749 generated by GNU Autoconf 2.69
2750
2751 Copyright (C) 2012 Free Software Foundation, Inc.
2752 This configure script is free software; the Free Software Foundation
2753 gives unlimited permission to copy, distribute and modify it.
2754 _ACEOF
2755 exit
2756 fi
2757
2758 ## ------------------------ ##
2759 ## Autoconf initialization. ##
2760 ## ------------------------ ##
2761
2762 # ac_fn_c_try_compile LINENO
2763 # --------------------------
2764 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2765 ac_fn_c_try_compile ()
2766 {
2767 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2768 rm -f conftest.$ac_objext
2769 if { { ac_try="$ac_compile"
2770 case "(($ac_try" in
2771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2772 *) ac_try_echo=$ac_try;;
2773 esac
2774 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2775 $as_echo "$ac_try_echo"; } >&5
2776 (eval "$ac_compile") 2>conftest.err
2777 ac_status=$?
2778 if test -s conftest.err; then
2779 grep -v '^ *+' conftest.err >conftest.er1
2780 cat conftest.er1 >&5
2781 mv -f conftest.er1 conftest.err
2782 fi
2783 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2784 test $ac_status = 0; } && {
2785 test -z "$ac_c_werror_flag" ||
2786 test ! -s conftest.err
2787 } && test -s conftest.$ac_objext; then :
2788 ac_retval=0
2789 else
2790 $as_echo "$as_me: failed program was:" >&5
2791 sed 's/^/| /' conftest.$ac_ext >&5
2792
2793 ac_retval=1
2794 fi
2795 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2796 as_fn_set_status $ac_retval
2797
2798 } # ac_fn_c_try_compile
2799
2800 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2801 # -------------------------------------------------------
2802 # Tests whether HEADER exists and can be compiled using the include files in
2803 # INCLUDES, setting the cache variable VAR accordingly.
2804 ac_fn_c_check_header_compile ()
2805 {
2806 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2808 $as_echo_n "checking for $2... " >&6; }
2809 if eval \${$3+:} false; then :
2810 $as_echo_n "(cached) " >&6
2811 else
2812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2813 /* end confdefs.h. */
2814 $4
2815 #include <$2>
2816 _ACEOF
2817 if ac_fn_c_try_compile "$LINENO"; then :
2818 eval "$3=yes"
2819 else
2820 eval "$3=no"
2821 fi
2822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2823 fi
2824 eval ac_res=\$$3
2825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2826 $as_echo "$ac_res" >&6; }
2827 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2828
2829 } # ac_fn_c_check_header_compile
2830
2831 # ac_fn_c_try_cpp LINENO
2832 # ----------------------
2833 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2834 ac_fn_c_try_cpp ()
2835 {
2836 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2837 if { { ac_try="$ac_cpp conftest.$ac_ext"
2838 case "(($ac_try" in
2839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2840 *) ac_try_echo=$ac_try;;
2841 esac
2842 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2843 $as_echo "$ac_try_echo"; } >&5
2844 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2845 ac_status=$?
2846 if test -s conftest.err; then
2847 grep -v '^ *+' conftest.err >conftest.er1
2848 cat conftest.er1 >&5
2849 mv -f conftest.er1 conftest.err
2850 fi
2851 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2852 test $ac_status = 0; } > conftest.i && {
2853 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2854 test ! -s conftest.err
2855 }; then :
2856 ac_retval=0
2857 else
2858 $as_echo "$as_me: failed program was:" >&5
2859 sed 's/^/| /' conftest.$ac_ext >&5
2860
2861 ac_retval=1
2862 fi
2863 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2864 as_fn_set_status $ac_retval
2865
2866 } # ac_fn_c_try_cpp
2867
2868 # ac_fn_c_try_run LINENO
2869 # ----------------------
2870 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2871 # that executables *can* be run.
2872 ac_fn_c_try_run ()
2873 {
2874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2875 if { { ac_try="$ac_link"
2876 case "(($ac_try" in
2877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2878 *) ac_try_echo=$ac_try;;
2879 esac
2880 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2881 $as_echo "$ac_try_echo"; } >&5
2882 (eval "$ac_link") 2>&5
2883 ac_status=$?
2884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2885 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2886 { { case "(($ac_try" in
2887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2888 *) ac_try_echo=$ac_try;;
2889 esac
2890 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2891 $as_echo "$ac_try_echo"; } >&5
2892 (eval "$ac_try") 2>&5
2893 ac_status=$?
2894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2895 test $ac_status = 0; }; }; then :
2896 ac_retval=0
2897 else
2898 $as_echo "$as_me: program exited with status $ac_status" >&5
2899 $as_echo "$as_me: failed program was:" >&5
2900 sed 's/^/| /' conftest.$ac_ext >&5
2901
2902 ac_retval=$ac_status
2903 fi
2904 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2905 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2906 as_fn_set_status $ac_retval
2907
2908 } # ac_fn_c_try_run
2909
2910 # ac_fn_c_try_link LINENO
2911 # -----------------------
2912 # Try to link conftest.$ac_ext, and return whether this succeeded.
2913 ac_fn_c_try_link ()
2914 {
2915 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2916 rm -f conftest.$ac_objext conftest$ac_exeext
2917 if { { ac_try="$ac_link"
2918 case "(($ac_try" in
2919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2920 *) ac_try_echo=$ac_try;;
2921 esac
2922 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2923 $as_echo "$ac_try_echo"; } >&5
2924 (eval "$ac_link") 2>conftest.err
2925 ac_status=$?
2926 if test -s conftest.err; then
2927 grep -v '^ *+' conftest.err >conftest.er1
2928 cat conftest.er1 >&5
2929 mv -f conftest.er1 conftest.err
2930 fi
2931 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2932 test $ac_status = 0; } && {
2933 test -z "$ac_c_werror_flag" ||
2934 test ! -s conftest.err
2935 } && test -s conftest$ac_exeext && {
2936 test "$cross_compiling" = yes ||
2937 test -x conftest$ac_exeext
2938 }; then :
2939 ac_retval=0
2940 else
2941 $as_echo "$as_me: failed program was:" >&5
2942 sed 's/^/| /' conftest.$ac_ext >&5
2943
2944 ac_retval=1
2945 fi
2946 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2947 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2948 # interfere with the next link command; also delete a directory that is
2949 # left behind by Apple's compiler. We do this before executing the actions.
2950 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2951 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2952 as_fn_set_status $ac_retval
2953
2954 } # ac_fn_c_try_link
2955
2956 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2957 # -------------------------------------------
2958 # Tests whether TYPE exists after having included INCLUDES, setting cache
2959 # variable VAR accordingly.
2960 ac_fn_c_check_type ()
2961 {
2962 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2964 $as_echo_n "checking for $2... " >&6; }
2965 if eval \${$3+:} false; then :
2966 $as_echo_n "(cached) " >&6
2967 else
2968 eval "$3=no"
2969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2970 /* end confdefs.h. */
2971 $4
2972 int
2973 main ()
2974 {
2975 if (sizeof ($2))
2976 return 0;
2977 ;
2978 return 0;
2979 }
2980 _ACEOF
2981 if ac_fn_c_try_compile "$LINENO"; then :
2982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2983 /* end confdefs.h. */
2984 $4
2985 int
2986 main ()
2987 {
2988 if (sizeof (($2)))
2989 return 0;
2990 ;
2991 return 0;
2992 }
2993 _ACEOF
2994 if ac_fn_c_try_compile "$LINENO"; then :
2995
2996 else
2997 eval "$3=yes"
2998 fi
2999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3000 fi
3001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3002 fi
3003 eval ac_res=\$$3
3004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3005 $as_echo "$ac_res" >&6; }
3006 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3007
3008 } # ac_fn_c_check_type
3009
3010 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
3011 # -------------------------------------------------------
3012 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
3013 # the include files in INCLUDES and setting the cache variable VAR
3014 # accordingly.
3015 ac_fn_c_check_header_mongrel ()
3016 {
3017 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3018 if eval \${$3+:} false; then :
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3020 $as_echo_n "checking for $2... " >&6; }
3021 if eval \${$3+:} false; then :
3022 $as_echo_n "(cached) " >&6
3023 fi
3024 eval ac_res=\$$3
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3026 $as_echo "$ac_res" >&6; }
3027 else
3028 # Is the header compilable?
3029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
3030 $as_echo_n "checking $2 usability... " >&6; }
3031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3032 /* end confdefs.h. */
3033 $4
3034 #include <$2>
3035 _ACEOF
3036 if ac_fn_c_try_compile "$LINENO"; then :
3037 ac_header_compiler=yes
3038 else
3039 ac_header_compiler=no
3040 fi
3041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
3043 $as_echo "$ac_header_compiler" >&6; }
3044
3045 # Is the header present?
3046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
3047 $as_echo_n "checking $2 presence... " >&6; }
3048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3049 /* end confdefs.h. */
3050 #include <$2>
3051 _ACEOF
3052 if ac_fn_c_try_cpp "$LINENO"; then :
3053 ac_header_preproc=yes
3054 else
3055 ac_header_preproc=no
3056 fi
3057 rm -f conftest.err conftest.i conftest.$ac_ext
3058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
3059 $as_echo "$ac_header_preproc" >&6; }
3060
3061 # So? What about this header?
3062 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
3063 yes:no: )
3064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
3065 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
3066 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3067 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3068 ;;
3069 no:yes:* )
3070 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
3071 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
3072 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
3073 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
3075 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
3077 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
3078 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3079 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3080 ;;
3081 esac
3082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3083 $as_echo_n "checking for $2... " >&6; }
3084 if eval \${$3+:} false; then :
3085 $as_echo_n "(cached) " >&6
3086 else
3087 eval "$3=\$ac_header_compiler"
3088 fi
3089 eval ac_res=\$$3
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3091 $as_echo "$ac_res" >&6; }
3092 fi
3093 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3094
3095 } # ac_fn_c_check_header_mongrel
3096
3097 # ac_fn_c_check_func LINENO FUNC VAR
3098 # ----------------------------------
3099 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3100 ac_fn_c_check_func ()
3101 {
3102 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3104 $as_echo_n "checking for $2... " >&6; }
3105 if eval \${$3+:} false; then :
3106 $as_echo_n "(cached) " >&6
3107 else
3108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3109 /* end confdefs.h. */
3110 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3111 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3112 #define $2 innocuous_$2
3113
3114 /* System header to define __stub macros and hopefully few prototypes,
3115 which can conflict with char $2 (); below.
3116 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3117 <limits.h> exists even on freestanding compilers. */
3118
3119 #ifdef __STDC__
3120 # include <limits.h>
3121 #else
3122 # include <assert.h>
3123 #endif
3124
3125 #undef $2
3126
3127 /* Override any GCC internal prototype to avoid an error.
3128 Use char because int might match the return type of a GCC
3129 builtin and then its argument prototype would still apply. */
3130 #ifdef __cplusplus
3131 extern "C"
3132 #endif
3133 char $2 ();
3134 /* The GNU C library defines this for functions which it implements
3135 to always fail with ENOSYS. Some functions are actually named
3136 something starting with __ and the normal name is an alias. */
3137 #if defined __stub_$2 || defined __stub___$2
3138 choke me
3139 #endif
3140
3141 int
3142 main ()
3143 {
3144 return $2 ();
3145 ;
3146 return 0;
3147 }
3148 _ACEOF
3149 if ac_fn_c_try_link "$LINENO"; then :
3150 eval "$3=yes"
3151 else
3152 eval "$3=no"
3153 fi
3154 rm -f core conftest.err conftest.$ac_objext \
3155 conftest$ac_exeext conftest.$ac_ext
3156 fi
3157 eval ac_res=\$$3
3158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3159 $as_echo "$ac_res" >&6; }
3160 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3161
3162 } # ac_fn_c_check_func
3163
3164 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3165 # ---------------------------------------------
3166 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3167 # accordingly.
3168 ac_fn_c_check_decl ()
3169 {
3170 ac_save_ac_compile="$ac_compile"
3171 if test -n "$ac_compile_for_check_decl"; then
3172 ac_compile="$ac_compile_for_check_decl"
3173 fi
3174 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3175 as_decl_name=`echo $2|sed 's/ *(.*//'`
3176 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3178 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3179 if eval \${$3+:} false; then :
3180 $as_echo_n "(cached) " >&6
3181 else
3182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3183 /* end confdefs.h. */
3184 $4
3185 int
3186 main ()
3187 {
3188 #ifndef $as_decl_name
3189 #ifdef __cplusplus
3190 (void) $as_decl_use;
3191 #else
3192 (void) $as_decl_name;
3193 #endif
3194 #endif
3195
3196 ;
3197 return 0;
3198 }
3199 _ACEOF
3200 if ac_fn_c_try_compile "$LINENO"; then :
3201 eval "$3=yes"
3202 else
3203 eval "$3=no"
3204 fi
3205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3206 fi
3207 eval ac_res=\$$3
3208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3209 $as_echo "$ac_res" >&6; }
3210 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3211 ac_compile="$ac_save_ac_compile"
3212
3213 } # ac_fn_c_check_decl
3214
3215 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3216 # --------------------------------------------
3217 # Tries to find the compile-time value of EXPR in a program that includes
3218 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3219 # computed
3220 ac_fn_c_compute_int ()
3221 {
3222 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3223 if test "$cross_compiling" = yes; then
3224 # Depending upon the size, compute the lo and hi bounds.
3225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3226 /* end confdefs.h. */
3227 $4
3228 int
3229 main ()
3230 {
3231 static int test_array [1 - 2 * !(($2) >= 0)];
3232 test_array [0] = 0;
3233 return test_array [0];
3234
3235 ;
3236 return 0;
3237 }
3238 _ACEOF
3239 if ac_fn_c_try_compile "$LINENO"; then :
3240 ac_lo=0 ac_mid=0
3241 while :; do
3242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3243 /* end confdefs.h. */
3244 $4
3245 int
3246 main ()
3247 {
3248 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3249 test_array [0] = 0;
3250 return test_array [0];
3251
3252 ;
3253 return 0;
3254 }
3255 _ACEOF
3256 if ac_fn_c_try_compile "$LINENO"; then :
3257 ac_hi=$ac_mid; break
3258 else
3259 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3260 if test $ac_lo -le $ac_mid; then
3261 ac_lo= ac_hi=
3262 break
3263 fi
3264 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3265 fi
3266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3267 done
3268 else
3269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3270 /* end confdefs.h. */
3271 $4
3272 int
3273 main ()
3274 {
3275 static int test_array [1 - 2 * !(($2) < 0)];
3276 test_array [0] = 0;
3277 return test_array [0];
3278
3279 ;
3280 return 0;
3281 }
3282 _ACEOF
3283 if ac_fn_c_try_compile "$LINENO"; then :
3284 ac_hi=-1 ac_mid=-1
3285 while :; do
3286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3287 /* end confdefs.h. */
3288 $4
3289 int
3290 main ()
3291 {
3292 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3293 test_array [0] = 0;
3294 return test_array [0];
3295
3296 ;
3297 return 0;
3298 }
3299 _ACEOF
3300 if ac_fn_c_try_compile "$LINENO"; then :
3301 ac_lo=$ac_mid; break
3302 else
3303 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3304 if test $ac_mid -le $ac_hi; then
3305 ac_lo= ac_hi=
3306 break
3307 fi
3308 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3309 fi
3310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3311 done
3312 else
3313 ac_lo= ac_hi=
3314 fi
3315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3316 fi
3317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3318 # Binary search between lo and hi bounds.
3319 while test "x$ac_lo" != "x$ac_hi"; do
3320 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3322 /* end confdefs.h. */
3323 $4
3324 int
3325 main ()
3326 {
3327 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3328 test_array [0] = 0;
3329 return test_array [0];
3330
3331 ;
3332 return 0;
3333 }
3334 _ACEOF
3335 if ac_fn_c_try_compile "$LINENO"; then :
3336 ac_hi=$ac_mid
3337 else
3338 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3339 fi
3340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3341 done
3342 case $ac_lo in #((
3343 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3344 '') ac_retval=1 ;;
3345 esac
3346 else
3347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3348 /* end confdefs.h. */
3349 $4
3350 static long int longval () { return $2; }
3351 static unsigned long int ulongval () { return $2; }
3352 #include <stdio.h>
3353 #include <stdlib.h>
3354 int
3355 main ()
3356 {
3357
3358 FILE *f = fopen ("conftest.val", "w");
3359 if (! f)
3360 return 1;
3361 if (($2) < 0)
3362 {
3363 long int i = longval ();
3364 if (i != ($2))
3365 return 1;
3366 fprintf (f, "%ld", i);
3367 }
3368 else
3369 {
3370 unsigned long int i = ulongval ();
3371 if (i != ($2))
3372 return 1;
3373 fprintf (f, "%lu", i);
3374 }
3375 /* Do not output a trailing newline, as this causes \r\n confusion
3376 on some platforms. */
3377 return ferror (f) || fclose (f) != 0;
3378
3379 ;
3380 return 0;
3381 }
3382 _ACEOF
3383 if ac_fn_c_try_run "$LINENO"; then :
3384 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3385 else
3386 ac_retval=1
3387 fi
3388 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3389 conftest.$ac_objext conftest.beam conftest.$ac_ext
3390 rm -f conftest.val
3391
3392 fi
3393 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3394 as_fn_set_status $ac_retval
3395
3396 } # ac_fn_c_compute_int
3397
3398 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3399 # ----------------------------------------------------
3400 # Tries to find if the field MEMBER exists in type AGGR, after including
3401 # INCLUDES, setting cache variable VAR accordingly.
3402 ac_fn_c_check_member ()
3403 {
3404 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3406 $as_echo_n "checking for $2.$3... " >&6; }
3407 if eval \${$4+:} false; then :
3408 $as_echo_n "(cached) " >&6
3409 else
3410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3411 /* end confdefs.h. */
3412 $5
3413 int
3414 main ()
3415 {
3416 static $2 ac_aggr;
3417 if (ac_aggr.$3)
3418 return 0;
3419 ;
3420 return 0;
3421 }
3422 _ACEOF
3423 if ac_fn_c_try_compile "$LINENO"; then :
3424 eval "$4=yes"
3425 else
3426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3427 /* end confdefs.h. */
3428 $5
3429 int
3430 main ()
3431 {
3432 static $2 ac_aggr;
3433 if (sizeof ac_aggr.$3)
3434 return 0;
3435 ;
3436 return 0;
3437 }
3438 _ACEOF
3439 if ac_fn_c_try_compile "$LINENO"; then :
3440 eval "$4=yes"
3441 else
3442 eval "$4=no"
3443 fi
3444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3445 fi
3446 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3447 fi
3448 eval ac_res=\$$4
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3450 $as_echo "$ac_res" >&6; }
3451 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3452
3453 } # ac_fn_c_check_member
3454 cat >config.log <<_ACEOF
3455 This file contains any messages produced by compilers while
3456 running configure, to aid debugging if configure makes a mistake.
3457
3458 It was created by libgnu $as_me UNUSED-VERSION, which was
3459 generated by GNU Autoconf 2.69. Invocation command line was
3460
3461 $ $0 $@
3462
3463 _ACEOF
3464 exec 5>>config.log
3465 {
3466 cat <<_ASUNAME
3467 ## --------- ##
3468 ## Platform. ##
3469 ## --------- ##
3470
3471 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3472 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3473 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3474 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3475 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3476
3477 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3478 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3479
3480 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3481 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3482 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3483 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3484 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3485 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3486 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3487
3488 _ASUNAME
3489
3490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3491 for as_dir in $PATH
3492 do
3493 IFS=$as_save_IFS
3494 test -z "$as_dir" && as_dir=.
3495 $as_echo "PATH: $as_dir"
3496 done
3497 IFS=$as_save_IFS
3498
3499 } >&5
3500
3501 cat >&5 <<_ACEOF
3502
3503
3504 ## ----------- ##
3505 ## Core tests. ##
3506 ## ----------- ##
3507
3508 _ACEOF
3509
3510
3511 # Keep a trace of the command line.
3512 # Strip out --no-create and --no-recursion so they do not pile up.
3513 # Strip out --silent because we don't want to record it for future runs.
3514 # Also quote any args containing shell meta-characters.
3515 # Make two passes to allow for proper duplicate-argument suppression.
3516 ac_configure_args=
3517 ac_configure_args0=
3518 ac_configure_args1=
3519 ac_must_keep_next=false
3520 for ac_pass in 1 2
3521 do
3522 for ac_arg
3523 do
3524 case $ac_arg in
3525 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3526 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3527 | -silent | --silent | --silen | --sile | --sil)
3528 continue ;;
3529 *\'*)
3530 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3531 esac
3532 case $ac_pass in
3533 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3534 2)
3535 as_fn_append ac_configure_args1 " '$ac_arg'"
3536 if test $ac_must_keep_next = true; then
3537 ac_must_keep_next=false # Got value, back to normal.
3538 else
3539 case $ac_arg in
3540 *=* | --config-cache | -C | -disable-* | --disable-* \
3541 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3542 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3543 | -with-* | --with-* | -without-* | --without-* | --x)
3544 case "$ac_configure_args0 " in
3545 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3546 esac
3547 ;;
3548 -* ) ac_must_keep_next=true ;;
3549 esac
3550 fi
3551 as_fn_append ac_configure_args " '$ac_arg'"
3552 ;;
3553 esac
3554 done
3555 done
3556 { ac_configure_args0=; unset ac_configure_args0;}
3557 { ac_configure_args1=; unset ac_configure_args1;}
3558
3559 # When interrupted or exit'd, cleanup temporary files, and complete
3560 # config.log. We remove comments because anyway the quotes in there
3561 # would cause problems or look ugly.
3562 # WARNING: Use '\'' to represent an apostrophe within the trap.
3563 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3564 trap 'exit_status=$?
3565 # Save into config.log some information that might help in debugging.
3566 {
3567 echo
3568
3569 $as_echo "## ---------------- ##
3570 ## Cache variables. ##
3571 ## ---------------- ##"
3572 echo
3573 # The following way of writing the cache mishandles newlines in values,
3574 (
3575 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3576 eval ac_val=\$$ac_var
3577 case $ac_val in #(
3578 *${as_nl}*)
3579 case $ac_var in #(
3580 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3581 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3582 esac
3583 case $ac_var in #(
3584 _ | IFS | as_nl) ;; #(
3585 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3586 *) { eval $ac_var=; unset $ac_var;} ;;
3587 esac ;;
3588 esac
3589 done
3590 (set) 2>&1 |
3591 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3592 *${as_nl}ac_space=\ *)
3593 sed -n \
3594 "s/'\''/'\''\\\\'\'''\''/g;
3595 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3596 ;; #(
3597 *)
3598 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3599 ;;
3600 esac |
3601 sort
3602 )
3603 echo
3604
3605 $as_echo "## ----------------- ##
3606 ## Output variables. ##
3607 ## ----------------- ##"
3608 echo
3609 for ac_var in $ac_subst_vars
3610 do
3611 eval ac_val=\$$ac_var
3612 case $ac_val in
3613 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3614 esac
3615 $as_echo "$ac_var='\''$ac_val'\''"
3616 done | sort
3617 echo
3618
3619 if test -n "$ac_subst_files"; then
3620 $as_echo "## ------------------- ##
3621 ## File substitutions. ##
3622 ## ------------------- ##"
3623 echo
3624 for ac_var in $ac_subst_files
3625 do
3626 eval ac_val=\$$ac_var
3627 case $ac_val in
3628 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3629 esac
3630 $as_echo "$ac_var='\''$ac_val'\''"
3631 done | sort
3632 echo
3633 fi
3634
3635 if test -s confdefs.h; then
3636 $as_echo "## ----------- ##
3637 ## confdefs.h. ##
3638 ## ----------- ##"
3639 echo
3640 cat confdefs.h
3641 echo
3642 fi
3643 test "$ac_signal" != 0 &&
3644 $as_echo "$as_me: caught signal $ac_signal"
3645 $as_echo "$as_me: exit $exit_status"
3646 } >&5
3647 rm -f core *.core core.conftest.* &&
3648 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3649 exit $exit_status
3650 ' 0
3651 for ac_signal in 1 2 13 15; do
3652 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3653 done
3654 ac_signal=0
3655
3656 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3657 rm -f -r conftest* confdefs.h
3658
3659 $as_echo "/* confdefs.h */" > confdefs.h
3660
3661 # Predefined preprocessor variables.
3662
3663 cat >>confdefs.h <<_ACEOF
3664 #define PACKAGE_NAME "$PACKAGE_NAME"
3665 _ACEOF
3666
3667 cat >>confdefs.h <<_ACEOF
3668 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3669 _ACEOF
3670
3671 cat >>confdefs.h <<_ACEOF
3672 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3673 _ACEOF
3674
3675 cat >>confdefs.h <<_ACEOF
3676 #define PACKAGE_STRING "$PACKAGE_STRING"
3677 _ACEOF
3678
3679 cat >>confdefs.h <<_ACEOF
3680 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3681 _ACEOF
3682
3683 cat >>confdefs.h <<_ACEOF
3684 #define PACKAGE_URL "$PACKAGE_URL"
3685 _ACEOF
3686
3687
3688 # Let the site file select an alternate cache file if it wants to.
3689 # Prefer an explicitly selected file to automatically selected ones.
3690 ac_site_file1=NONE
3691 ac_site_file2=NONE
3692 if test -n "$CONFIG_SITE"; then
3693 # We do not want a PATH search for config.site.
3694 case $CONFIG_SITE in #((
3695 -*) ac_site_file1=./$CONFIG_SITE;;
3696 */*) ac_site_file1=$CONFIG_SITE;;
3697 *) ac_site_file1=./$CONFIG_SITE;;
3698 esac
3699 elif test "x$prefix" != xNONE; then
3700 ac_site_file1=$prefix/share/config.site
3701 ac_site_file2=$prefix/etc/config.site
3702 else
3703 ac_site_file1=$ac_default_prefix/share/config.site
3704 ac_site_file2=$ac_default_prefix/etc/config.site
3705 fi
3706 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3707 do
3708 test "x$ac_site_file" = xNONE && continue
3709 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3710 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3711 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3712 sed 's/^/| /' "$ac_site_file" >&5
3713 . "$ac_site_file" \
3714 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3715 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3716 as_fn_error $? "failed to load site script $ac_site_file
3717 See \`config.log' for more details" "$LINENO" 5; }
3718 fi
3719 done
3720
3721 if test -r "$cache_file"; then
3722 # Some versions of bash will fail to source /dev/null (special files
3723 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3724 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3725 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3726 $as_echo "$as_me: loading cache $cache_file" >&6;}
3727 case $cache_file in
3728 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3729 *) . "./$cache_file";;
3730 esac
3731 fi
3732 else
3733 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3734 $as_echo "$as_me: creating cache $cache_file" >&6;}
3735 >$cache_file
3736 fi
3737
3738 as_fn_append ac_header_list " wchar.h"
3739 as_fn_append ac_header_list " minix/config.h"
3740 as_fn_append ac_header_list " arpa/inet.h"
3741 as_fn_append ac_header_list " features.h"
3742 as_fn_append ac_header_list " sys/socket.h"
3743 as_fn_append ac_func_list " btowc"
3744 as_fn_append ac_func_list " canonicalize_file_name"
3745 as_fn_append ac_func_list " faccessat"
3746 as_fn_append ac_func_list " realpath"
3747 as_fn_append ac_header_list " sys/param.h"
3748 as_fn_append ac_header_list " unistd.h"
3749 as_fn_append ac_func_list " chown"
3750 as_fn_append ac_func_list " fchown"
3751 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3752 as_fn_append ac_func_list " fchdir"
3753 as_fn_append ac_header_list " dirent.h"
3754 as_fn_append ac_func_list " fcntl"
3755 as_fn_append ac_func_list " symlink"
3756 as_fn_append ac_func_list " fdopendir"
3757 as_fn_append ac_func_list " mempcpy"
3758 as_fn_append ac_header_list " fnmatch.h"
3759 as_fn_append ac_func_list " fnmatch"
3760 as_fn_append ac_func_list " mbsrtowcs"
3761 gl_fnmatch_required=GNU
3762 as_fn_append ac_header_list " sys/stat.h"
3763 as_fn_append ac_func_list " fstatat"
3764 as_fn_append ac_func_list " getdelim"
3765 as_fn_append ac_func_list " getdtablesize"
3766 as_fn_append ac_func_list " getlogin_r"
3767 as_fn_append ac_func_list " getprogname"
3768 as_fn_append ac_func_list " getexecname"
3769 as_fn_append ac_func_list " getrandom"
3770 as_fn_append ac_header_list " sys/time.h"
3771 as_fn_append ac_func_list " gettimeofday"
3772 as_fn_append ac_header_list " glob.h"
3773 as_fn_append ac_func_list " glob"
3774 as_fn_append ac_func_list " glob_pattern_p"
3775 as_fn_append ac_func_list " getpwnam_r"
3776 as_fn_append ac_header_list " threads.h"
3777 as_fn_append ac_header_list " netdb.h"
3778 as_fn_append ac_header_list " netinet/in.h"
3779 as_fn_append ac_header_list " limits.h"
3780 as_fn_append ac_header_list " inttypes.h"
3781 as_fn_append ac_header_list " sys/types.h"
3782 as_fn_append ac_header_list " stdint.h"
3783 as_fn_append ac_func_list " isblank"
3784 as_fn_append ac_header_list " xlocale.h"
3785 as_fn_append ac_func_list " lstat"
3786 as_fn_append ac_header_list " math.h"
3787 as_fn_append ac_func_list " mbsinit"
3788 as_fn_append ac_func_list " mbrtowc"
3789 as_fn_append ac_header_list " sys/mman.h"
3790 as_fn_append ac_func_list " mprotect"
3791 as_fn_append ac_func_list " mkostemp"
3792 as_fn_append ac_func_list " openat"
3793 as_fn_append ac_func_list " pipe"
3794 as_fn_append ac_func_list " readlink"
3795 as_fn_append ac_func_list " link"
3796 as_fn_append ac_header_list " sys/select.h"
3797 as_fn_append ac_func_list " setenv"
3798 as_fn_append ac_func_list " strerror_r"
3799 as_fn_append ac_func_list " __xpg_strerror_r"
3800 as_fn_append ac_func_list " catgets"
3801 as_fn_append ac_func_list " snprintf"
3802 as_fn_append ac_header_list " strings.h"
3803 as_fn_append ac_header_list " sys/random.h"
3804 as_fn_append ac_header_list " sys/uio.h"
3805 as_fn_append ac_func_list " localtime_r"
3806 as_fn_append ac_header_list " crtdefs.h"
3807 as_fn_append ac_func_list " iswcntrl"
3808 as_fn_append ac_header_list " wctype.h"
3809 as_fn_append ac_func_list " wmempcpy"
3810 # Check that the precious variables saved in the cache have kept the same
3811 # value.
3812 ac_cache_corrupted=false
3813 for ac_var in $ac_precious_vars; do
3814 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3815 eval ac_new_set=\$ac_env_${ac_var}_set
3816 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3817 eval ac_new_val=\$ac_env_${ac_var}_value
3818 case $ac_old_set,$ac_new_set in
3819 set,)
3820 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3821 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3822 ac_cache_corrupted=: ;;
3823 ,set)
3824 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3825 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3826 ac_cache_corrupted=: ;;
3827 ,);;
3828 *)
3829 if test "x$ac_old_val" != "x$ac_new_val"; then
3830 # differences in whitespace do not lead to failure.
3831 ac_old_val_w=`echo x $ac_old_val`
3832 ac_new_val_w=`echo x $ac_new_val`
3833 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3834 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3835 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3836 ac_cache_corrupted=:
3837 else
3838 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3839 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3840 eval $ac_var=\$ac_old_val
3841 fi
3842 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3843 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3844 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3845 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3846 fi;;
3847 esac
3848 # Pass precious variables to config.status.
3849 if test "$ac_new_set" = set; then
3850 case $ac_new_val in
3851 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3852 *) ac_arg=$ac_var=$ac_new_val ;;
3853 esac
3854 case " $ac_configure_args " in
3855 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3856 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3857 esac
3858 fi
3859 done
3860 if $ac_cache_corrupted; then
3861 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3862 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3864 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3865 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3866 fi
3867 ## -------------------- ##
3868 ## Main body of script. ##
3869 ## -------------------- ##
3870
3871 ac_ext=c
3872 ac_cpp='$CPP $CPPFLAGS'
3873 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3874 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3875 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3876
3877
3878
3879
3880
3881
3882 ac_config_headers="$ac_config_headers config.h:config.in"
3883
3884
3885
3886
3887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3888 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3889 # Check whether --enable-maintainer-mode was given.
3890 if test "${enable_maintainer_mode+set}" = set; then :
3891 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3892 else
3893 USE_MAINTAINER_MODE=no
3894 fi
3895
3896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3897 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3898 if test $USE_MAINTAINER_MODE = yes; then
3899 MAINTAINER_MODE_TRUE=
3900 MAINTAINER_MODE_FALSE='#'
3901 else
3902 MAINTAINER_MODE_TRUE='#'
3903 MAINTAINER_MODE_FALSE=
3904 fi
3905
3906 MAINT=$MAINTAINER_MODE_TRUE
3907
3908
3909
3910 ac_ext=c
3911 ac_cpp='$CPP $CPPFLAGS'
3912 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3913 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3914 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3915 if test -n "$ac_tool_prefix"; then
3916 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3917 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3919 $as_echo_n "checking for $ac_word... " >&6; }
3920 if ${ac_cv_prog_CC+:} false; then :
3921 $as_echo_n "(cached) " >&6
3922 else
3923 if test -n "$CC"; then
3924 ac_cv_prog_CC="$CC" # Let the user override the test.
3925 else
3926 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3927 for as_dir in $PATH
3928 do
3929 IFS=$as_save_IFS
3930 test -z "$as_dir" && as_dir=.
3931 for ac_exec_ext in '' $ac_executable_extensions; do
3932 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3933 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3934 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3935 break 2
3936 fi
3937 done
3938 done
3939 IFS=$as_save_IFS
3940
3941 fi
3942 fi
3943 CC=$ac_cv_prog_CC
3944 if test -n "$CC"; then
3945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3946 $as_echo "$CC" >&6; }
3947 else
3948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3949 $as_echo "no" >&6; }
3950 fi
3951
3952
3953 fi
3954 if test -z "$ac_cv_prog_CC"; then
3955 ac_ct_CC=$CC
3956 # Extract the first word of "gcc", so it can be a program name with args.
3957 set dummy gcc; ac_word=$2
3958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3959 $as_echo_n "checking for $ac_word... " >&6; }
3960 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3961 $as_echo_n "(cached) " >&6
3962 else
3963 if test -n "$ac_ct_CC"; then
3964 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3965 else
3966 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3967 for as_dir in $PATH
3968 do
3969 IFS=$as_save_IFS
3970 test -z "$as_dir" && as_dir=.
3971 for ac_exec_ext in '' $ac_executable_extensions; do
3972 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3973 ac_cv_prog_ac_ct_CC="gcc"
3974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3975 break 2
3976 fi
3977 done
3978 done
3979 IFS=$as_save_IFS
3980
3981 fi
3982 fi
3983 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3984 if test -n "$ac_ct_CC"; then
3985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3986 $as_echo "$ac_ct_CC" >&6; }
3987 else
3988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3989 $as_echo "no" >&6; }
3990 fi
3991
3992 if test "x$ac_ct_CC" = x; then
3993 CC=""
3994 else
3995 case $cross_compiling:$ac_tool_warned in
3996 yes:)
3997 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3998 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3999 ac_tool_warned=yes ;;
4000 esac
4001 CC=$ac_ct_CC
4002 fi
4003 else
4004 CC="$ac_cv_prog_CC"
4005 fi
4006
4007 if test -z "$CC"; then
4008 if test -n "$ac_tool_prefix"; then
4009 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4010 set dummy ${ac_tool_prefix}cc; ac_word=$2
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4012 $as_echo_n "checking for $ac_word... " >&6; }
4013 if ${ac_cv_prog_CC+:} false; then :
4014 $as_echo_n "(cached) " >&6
4015 else
4016 if test -n "$CC"; then
4017 ac_cv_prog_CC="$CC" # Let the user override the test.
4018 else
4019 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4020 for as_dir in $PATH
4021 do
4022 IFS=$as_save_IFS
4023 test -z "$as_dir" && as_dir=.
4024 for ac_exec_ext in '' $ac_executable_extensions; do
4025 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4026 ac_cv_prog_CC="${ac_tool_prefix}cc"
4027 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4028 break 2
4029 fi
4030 done
4031 done
4032 IFS=$as_save_IFS
4033
4034 fi
4035 fi
4036 CC=$ac_cv_prog_CC
4037 if test -n "$CC"; then
4038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4039 $as_echo "$CC" >&6; }
4040 else
4041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4042 $as_echo "no" >&6; }
4043 fi
4044
4045
4046 fi
4047 fi
4048 if test -z "$CC"; then
4049 # Extract the first word of "cc", so it can be a program name with args.
4050 set dummy cc; ac_word=$2
4051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4052 $as_echo_n "checking for $ac_word... " >&6; }
4053 if ${ac_cv_prog_CC+:} false; then :
4054 $as_echo_n "(cached) " >&6
4055 else
4056 if test -n "$CC"; then
4057 ac_cv_prog_CC="$CC" # Let the user override the test.
4058 else
4059 ac_prog_rejected=no
4060 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4061 for as_dir in $PATH
4062 do
4063 IFS=$as_save_IFS
4064 test -z "$as_dir" && as_dir=.
4065 for ac_exec_ext in '' $ac_executable_extensions; do
4066 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4067 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4068 ac_prog_rejected=yes
4069 continue
4070 fi
4071 ac_cv_prog_CC="cc"
4072 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4073 break 2
4074 fi
4075 done
4076 done
4077 IFS=$as_save_IFS
4078
4079 if test $ac_prog_rejected = yes; then
4080 # We found a bogon in the path, so make sure we never use it.
4081 set dummy $ac_cv_prog_CC
4082 shift
4083 if test $# != 0; then
4084 # We chose a different compiler from the bogus one.
4085 # However, it has the same basename, so the bogon will be chosen
4086 # first if we set CC to just the basename; use the full file name.
4087 shift
4088 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4089 fi
4090 fi
4091 fi
4092 fi
4093 CC=$ac_cv_prog_CC
4094 if test -n "$CC"; then
4095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4096 $as_echo "$CC" >&6; }
4097 else
4098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4099 $as_echo "no" >&6; }
4100 fi
4101
4102
4103 fi
4104 if test -z "$CC"; then
4105 if test -n "$ac_tool_prefix"; then
4106 for ac_prog in cl.exe
4107 do
4108 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4109 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4111 $as_echo_n "checking for $ac_word... " >&6; }
4112 if ${ac_cv_prog_CC+:} false; then :
4113 $as_echo_n "(cached) " >&6
4114 else
4115 if test -n "$CC"; then
4116 ac_cv_prog_CC="$CC" # Let the user override the test.
4117 else
4118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4119 for as_dir in $PATH
4120 do
4121 IFS=$as_save_IFS
4122 test -z "$as_dir" && as_dir=.
4123 for ac_exec_ext in '' $ac_executable_extensions; do
4124 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4125 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4127 break 2
4128 fi
4129 done
4130 done
4131 IFS=$as_save_IFS
4132
4133 fi
4134 fi
4135 CC=$ac_cv_prog_CC
4136 if test -n "$CC"; then
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4138 $as_echo "$CC" >&6; }
4139 else
4140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4141 $as_echo "no" >&6; }
4142 fi
4143
4144
4145 test -n "$CC" && break
4146 done
4147 fi
4148 if test -z "$CC"; then
4149 ac_ct_CC=$CC
4150 for ac_prog in cl.exe
4151 do
4152 # Extract the first word of "$ac_prog", so it can be a program name with args.
4153 set dummy $ac_prog; ac_word=$2
4154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4155 $as_echo_n "checking for $ac_word... " >&6; }
4156 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4157 $as_echo_n "(cached) " >&6
4158 else
4159 if test -n "$ac_ct_CC"; then
4160 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4161 else
4162 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163 for as_dir in $PATH
4164 do
4165 IFS=$as_save_IFS
4166 test -z "$as_dir" && as_dir=.
4167 for ac_exec_ext in '' $ac_executable_extensions; do
4168 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4169 ac_cv_prog_ac_ct_CC="$ac_prog"
4170 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4171 break 2
4172 fi
4173 done
4174 done
4175 IFS=$as_save_IFS
4176
4177 fi
4178 fi
4179 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4180 if test -n "$ac_ct_CC"; then
4181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4182 $as_echo "$ac_ct_CC" >&6; }
4183 else
4184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4185 $as_echo "no" >&6; }
4186 fi
4187
4188
4189 test -n "$ac_ct_CC" && break
4190 done
4191
4192 if test "x$ac_ct_CC" = x; then
4193 CC=""
4194 else
4195 case $cross_compiling:$ac_tool_warned in
4196 yes:)
4197 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4198 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4199 ac_tool_warned=yes ;;
4200 esac
4201 CC=$ac_ct_CC
4202 fi
4203 fi
4204
4205 fi
4206 if test -z "$CC"; then
4207 if test -n "$ac_tool_prefix"; then
4208 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4209 set dummy ${ac_tool_prefix}clang; ac_word=$2
4210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4211 $as_echo_n "checking for $ac_word... " >&6; }
4212 if ${ac_cv_prog_CC+:} false; then :
4213 $as_echo_n "(cached) " >&6
4214 else
4215 if test -n "$CC"; then
4216 ac_cv_prog_CC="$CC" # Let the user override the test.
4217 else
4218 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4219 for as_dir in $PATH
4220 do
4221 IFS=$as_save_IFS
4222 test -z "$as_dir" && as_dir=.
4223 for ac_exec_ext in '' $ac_executable_extensions; do
4224 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4225 ac_cv_prog_CC="${ac_tool_prefix}clang"
4226 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4227 break 2
4228 fi
4229 done
4230 done
4231 IFS=$as_save_IFS
4232
4233 fi
4234 fi
4235 CC=$ac_cv_prog_CC
4236 if test -n "$CC"; then
4237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4238 $as_echo "$CC" >&6; }
4239 else
4240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4241 $as_echo "no" >&6; }
4242 fi
4243
4244
4245 fi
4246 if test -z "$ac_cv_prog_CC"; then
4247 ac_ct_CC=$CC
4248 # Extract the first word of "clang", so it can be a program name with args.
4249 set dummy clang; ac_word=$2
4250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4251 $as_echo_n "checking for $ac_word... " >&6; }
4252 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4253 $as_echo_n "(cached) " >&6
4254 else
4255 if test -n "$ac_ct_CC"; then
4256 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4257 else
4258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4259 for as_dir in $PATH
4260 do
4261 IFS=$as_save_IFS
4262 test -z "$as_dir" && as_dir=.
4263 for ac_exec_ext in '' $ac_executable_extensions; do
4264 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4265 ac_cv_prog_ac_ct_CC="clang"
4266 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4267 break 2
4268 fi
4269 done
4270 done
4271 IFS=$as_save_IFS
4272
4273 fi
4274 fi
4275 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4276 if test -n "$ac_ct_CC"; then
4277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4278 $as_echo "$ac_ct_CC" >&6; }
4279 else
4280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4281 $as_echo "no" >&6; }
4282 fi
4283
4284 if test "x$ac_ct_CC" = x; then
4285 CC=""
4286 else
4287 case $cross_compiling:$ac_tool_warned in
4288 yes:)
4289 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4290 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4291 ac_tool_warned=yes ;;
4292 esac
4293 CC=$ac_ct_CC
4294 fi
4295 else
4296 CC="$ac_cv_prog_CC"
4297 fi
4298
4299 fi
4300
4301
4302 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4303 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4304 as_fn_error $? "no acceptable C compiler found in \$PATH
4305 See \`config.log' for more details" "$LINENO" 5; }
4306
4307 # Provide some information about the compiler.
4308 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4309 set X $ac_compile
4310 ac_compiler=$2
4311 for ac_option in --version -v -V -qversion -version; do
4312 { { ac_try="$ac_compiler $ac_option >&5"
4313 case "(($ac_try" in
4314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4315 *) ac_try_echo=$ac_try;;
4316 esac
4317 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4318 $as_echo "$ac_try_echo"; } >&5
4319 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4320 ac_status=$?
4321 if test -s conftest.err; then
4322 sed '10a\
4323 ... rest of stderr output deleted ...
4324 10q' conftest.err >conftest.er1
4325 cat conftest.er1 >&5
4326 fi
4327 rm -f conftest.er1 conftest.err
4328 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4329 test $ac_status = 0; }
4330 done
4331
4332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4333 /* end confdefs.h. */
4334
4335 int
4336 main ()
4337 {
4338
4339 ;
4340 return 0;
4341 }
4342 _ACEOF
4343 ac_clean_files_save=$ac_clean_files
4344 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4345 # Try to create an executable without -o first, disregard a.out.
4346 # It will help us diagnose broken compilers, and finding out an intuition
4347 # of exeext.
4348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4349 $as_echo_n "checking whether the C compiler works... " >&6; }
4350 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4351
4352 # The possible output files:
4353 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4354
4355 ac_rmfiles=
4356 for ac_file in $ac_files
4357 do
4358 case $ac_file in
4359 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4360 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4361 esac
4362 done
4363 rm -f $ac_rmfiles
4364
4365 if { { ac_try="$ac_link_default"
4366 case "(($ac_try" in
4367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4368 *) ac_try_echo=$ac_try;;
4369 esac
4370 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4371 $as_echo "$ac_try_echo"; } >&5
4372 (eval "$ac_link_default") 2>&5
4373 ac_status=$?
4374 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4375 test $ac_status = 0; }; then :
4376 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4377 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4378 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4379 # so that the user can short-circuit this test for compilers unknown to
4380 # Autoconf.
4381 for ac_file in $ac_files ''
4382 do
4383 test -f "$ac_file" || continue
4384 case $ac_file in
4385 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4386 ;;
4387 [ab].out )
4388 # We found the default executable, but exeext='' is most
4389 # certainly right.
4390 break;;
4391 *.* )
4392 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4393 then :; else
4394 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4395 fi
4396 # We set ac_cv_exeext here because the later test for it is not
4397 # safe: cross compilers may not add the suffix if given an `-o'
4398 # argument, so we may need to know it at that point already.
4399 # Even if this section looks crufty: it has the advantage of
4400 # actually working.
4401 break;;
4402 * )
4403 break;;
4404 esac
4405 done
4406 test "$ac_cv_exeext" = no && ac_cv_exeext=
4407
4408 else
4409 ac_file=''
4410 fi
4411 if test -z "$ac_file"; then :
4412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4413 $as_echo "no" >&6; }
4414 $as_echo "$as_me: failed program was:" >&5
4415 sed 's/^/| /' conftest.$ac_ext >&5
4416
4417 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4418 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4419 as_fn_error 77 "C compiler cannot create executables
4420 See \`config.log' for more details" "$LINENO" 5; }
4421 else
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4423 $as_echo "yes" >&6; }
4424 fi
4425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4426 $as_echo_n "checking for C compiler default output file name... " >&6; }
4427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4428 $as_echo "$ac_file" >&6; }
4429 ac_exeext=$ac_cv_exeext
4430
4431 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4432 ac_clean_files=$ac_clean_files_save
4433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4434 $as_echo_n "checking for suffix of executables... " >&6; }
4435 if { { ac_try="$ac_link"
4436 case "(($ac_try" in
4437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4438 *) ac_try_echo=$ac_try;;
4439 esac
4440 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4441 $as_echo "$ac_try_echo"; } >&5
4442 (eval "$ac_link") 2>&5
4443 ac_status=$?
4444 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4445 test $ac_status = 0; }; then :
4446 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4447 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4448 # work properly (i.e., refer to `conftest.exe'), while it won't with
4449 # `rm'.
4450 for ac_file in conftest.exe conftest conftest.*; do
4451 test -f "$ac_file" || continue
4452 case $ac_file in
4453 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4454 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4455 break;;
4456 * ) break;;
4457 esac
4458 done
4459 else
4460 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4461 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4462 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4463 See \`config.log' for more details" "$LINENO" 5; }
4464 fi
4465 rm -f conftest conftest$ac_cv_exeext
4466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4467 $as_echo "$ac_cv_exeext" >&6; }
4468
4469 rm -f conftest.$ac_ext
4470 EXEEXT=$ac_cv_exeext
4471 ac_exeext=$EXEEXT
4472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4473 /* end confdefs.h. */
4474 #include <stdio.h>
4475 int
4476 main ()
4477 {
4478 FILE *f = fopen ("conftest.out", "w");
4479 return ferror (f) || fclose (f) != 0;
4480
4481 ;
4482 return 0;
4483 }
4484 _ACEOF
4485 ac_clean_files="$ac_clean_files conftest.out"
4486 # Check that the compiler produces executables we can run. If not, either
4487 # the compiler is broken, or we cross compile.
4488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4489 $as_echo_n "checking whether we are cross compiling... " >&6; }
4490 if test "$cross_compiling" != yes; then
4491 { { ac_try="$ac_link"
4492 case "(($ac_try" in
4493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4494 *) ac_try_echo=$ac_try;;
4495 esac
4496 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4497 $as_echo "$ac_try_echo"; } >&5
4498 (eval "$ac_link") 2>&5
4499 ac_status=$?
4500 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4501 test $ac_status = 0; }
4502 if { ac_try='./conftest$ac_cv_exeext'
4503 { { case "(($ac_try" in
4504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4505 *) ac_try_echo=$ac_try;;
4506 esac
4507 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4508 $as_echo "$ac_try_echo"; } >&5
4509 (eval "$ac_try") 2>&5
4510 ac_status=$?
4511 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4512 test $ac_status = 0; }; }; then
4513 cross_compiling=no
4514 else
4515 if test "$cross_compiling" = maybe; then
4516 cross_compiling=yes
4517 else
4518 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4519 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4520 as_fn_error $? "cannot run C compiled programs.
4521 If you meant to cross compile, use \`--host'.
4522 See \`config.log' for more details" "$LINENO" 5; }
4523 fi
4524 fi
4525 fi
4526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4527 $as_echo "$cross_compiling" >&6; }
4528
4529 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4530 ac_clean_files=$ac_clean_files_save
4531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4532 $as_echo_n "checking for suffix of object files... " >&6; }
4533 if ${ac_cv_objext+:} false; then :
4534 $as_echo_n "(cached) " >&6
4535 else
4536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4537 /* end confdefs.h. */
4538
4539 int
4540 main ()
4541 {
4542
4543 ;
4544 return 0;
4545 }
4546 _ACEOF
4547 rm -f conftest.o conftest.obj
4548 if { { ac_try="$ac_compile"
4549 case "(($ac_try" in
4550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4551 *) ac_try_echo=$ac_try;;
4552 esac
4553 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4554 $as_echo "$ac_try_echo"; } >&5
4555 (eval "$ac_compile") 2>&5
4556 ac_status=$?
4557 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4558 test $ac_status = 0; }; then :
4559 for ac_file in conftest.o conftest.obj conftest.*; do
4560 test -f "$ac_file" || continue;
4561 case $ac_file in
4562 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4563 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4564 break;;
4565 esac
4566 done
4567 else
4568 $as_echo "$as_me: failed program was:" >&5
4569 sed 's/^/| /' conftest.$ac_ext >&5
4570
4571 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4572 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4573 as_fn_error $? "cannot compute suffix of object files: cannot compile
4574 See \`config.log' for more details" "$LINENO" 5; }
4575 fi
4576 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4577 fi
4578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4579 $as_echo "$ac_cv_objext" >&6; }
4580 OBJEXT=$ac_cv_objext
4581 ac_objext=$OBJEXT
4582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4583 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4584 if ${ac_cv_c_compiler_gnu+:} false; then :
4585 $as_echo_n "(cached) " >&6
4586 else
4587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4588 /* end confdefs.h. */
4589
4590 int
4591 main ()
4592 {
4593 #ifndef __GNUC__
4594 choke me
4595 #endif
4596
4597 ;
4598 return 0;
4599 }
4600 _ACEOF
4601 if ac_fn_c_try_compile "$LINENO"; then :
4602 ac_compiler_gnu=yes
4603 else
4604 ac_compiler_gnu=no
4605 fi
4606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4607 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4608
4609 fi
4610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4611 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4612 if test $ac_compiler_gnu = yes; then
4613 GCC=yes
4614 else
4615 GCC=
4616 fi
4617 ac_test_CFLAGS=${CFLAGS+set}
4618 ac_save_CFLAGS=$CFLAGS
4619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4620 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4621 if ${ac_cv_prog_cc_g+:} false; then :
4622 $as_echo_n "(cached) " >&6
4623 else
4624 ac_save_c_werror_flag=$ac_c_werror_flag
4625 ac_c_werror_flag=yes
4626 ac_cv_prog_cc_g=no
4627 CFLAGS="-g"
4628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4629 /* end confdefs.h. */
4630
4631 int
4632 main ()
4633 {
4634
4635 ;
4636 return 0;
4637 }
4638 _ACEOF
4639 if ac_fn_c_try_compile "$LINENO"; then :
4640 ac_cv_prog_cc_g=yes
4641 else
4642 CFLAGS=""
4643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4644 /* end confdefs.h. */
4645
4646 int
4647 main ()
4648 {
4649
4650 ;
4651 return 0;
4652 }
4653 _ACEOF
4654 if ac_fn_c_try_compile "$LINENO"; then :
4655
4656 else
4657 ac_c_werror_flag=$ac_save_c_werror_flag
4658 CFLAGS="-g"
4659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4660 /* end confdefs.h. */
4661
4662 int
4663 main ()
4664 {
4665
4666 ;
4667 return 0;
4668 }
4669 _ACEOF
4670 if ac_fn_c_try_compile "$LINENO"; then :
4671 ac_cv_prog_cc_g=yes
4672 fi
4673 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4674 fi
4675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4676 fi
4677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4678 ac_c_werror_flag=$ac_save_c_werror_flag
4679 fi
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4681 $as_echo "$ac_cv_prog_cc_g" >&6; }
4682 if test "$ac_test_CFLAGS" = set; then
4683 CFLAGS=$ac_save_CFLAGS
4684 elif test $ac_cv_prog_cc_g = yes; then
4685 if test "$GCC" = yes; then
4686 CFLAGS="-g -O2"
4687 else
4688 CFLAGS="-g"
4689 fi
4690 else
4691 if test "$GCC" = yes; then
4692 CFLAGS="-O2"
4693 else
4694 CFLAGS=
4695 fi
4696 fi
4697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4698 $as_echo_n "checking for $CC option to enable C11 features... " >&6; }
4699 if ${ac_cv_prog_cc_c11+:} false; then :
4700 $as_echo_n "(cached) " >&6
4701 else
4702 ac_cv_prog_cc_c11=no
4703 ac_save_CC=$CC
4704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4705 /* end confdefs.h. */
4706 #include <stdarg.h>
4707 #include <stdbool.h>
4708 #include <stddef.h>
4709 #include <stdlib.h>
4710 #include <wchar.h>
4711 #include <stdio.h>
4712
4713 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4714 #define debug(...) fprintf (stderr, __VA_ARGS__)
4715 #define showlist(...) puts (#__VA_ARGS__)
4716 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4717 static void
4718 test_varargs_macros (void)
4719 {
4720 int x = 1234;
4721 int y = 5678;
4722 debug ("Flag");
4723 debug ("X = %d\n", x);
4724 showlist (The first, second, and third items.);
4725 report (x>y, "x is %d but y is %d", x, y);
4726 }
4727
4728 // Check long long types.
4729 #define BIG64 18446744073709551615ull
4730 #define BIG32 4294967295ul
4731 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4732 #if !BIG_OK
4733 your preprocessor is broken;
4734 #endif
4735 #if BIG_OK
4736 #else
4737 your preprocessor is broken;
4738 #endif
4739 static long long int bignum = -9223372036854775807LL;
4740 static unsigned long long int ubignum = BIG64;
4741
4742 struct incomplete_array
4743 {
4744 int datasize;
4745 double data[];
4746 };
4747
4748 struct named_init {
4749 int number;
4750 const wchar_t *name;
4751 double average;
4752 };
4753
4754 typedef const char *ccp;
4755
4756 static inline int
4757 test_restrict (ccp restrict text)
4758 {
4759 // See if C++-style comments work.
4760 // Iterate through items via the restricted pointer.
4761 // Also check for declarations in for loops.
4762 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4763 continue;
4764 return 0;
4765 }
4766
4767 // Check varargs and va_copy.
4768 static bool
4769 test_varargs (const char *format, ...)
4770 {
4771 va_list args;
4772 va_start (args, format);
4773 va_list args_copy;
4774 va_copy (args_copy, args);
4775
4776 const char *str = "";
4777 int number = 0;
4778 float fnumber = 0;
4779
4780 while (*format)
4781 {
4782 switch (*format++)
4783 {
4784 case 's': // string
4785 str = va_arg (args_copy, const char *);
4786 break;
4787 case 'd': // int
4788 number = va_arg (args_copy, int);
4789 break;
4790 case 'f': // float
4791 fnumber = va_arg (args_copy, double);
4792 break;
4793 default:
4794 break;
4795 }
4796 }
4797 va_end (args_copy);
4798 va_end (args);
4799
4800 return *str && number && fnumber;
4801 }
4802 // Check _Alignas.
4803 char _Alignas (double) aligned_as_double;
4804 char _Alignas (0) no_special_alignment;
4805 extern char aligned_as_int;
4806 char _Alignas (0) _Alignas (int) aligned_as_int;
4807
4808 // Check _Alignof.
4809 enum
4810 {
4811 int_alignment = _Alignof (int),
4812 int_array_alignment = _Alignof (int[100]),
4813 char_alignment = _Alignof (char)
4814 };
4815 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4816
4817 // Check _Noreturn.
4818 int _Noreturn does_not_return (void) { for (;;) continue; }
4819
4820 // Check _Static_assert.
4821 struct test_static_assert
4822 {
4823 int x;
4824 _Static_assert (sizeof (int) <= sizeof (long int),
4825 "_Static_assert does not work in struct");
4826 long int y;
4827 };
4828
4829 // Check UTF-8 literals.
4830 #define u8 syntax error!
4831 char const utf8_literal[] = u8"happens to be ASCII" "another string";
4832
4833 // Check duplicate typedefs.
4834 typedef long *long_ptr;
4835 typedef long int *long_ptr;
4836 typedef long_ptr long_ptr;
4837
4838 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4839 struct anonymous
4840 {
4841 union {
4842 struct { int i; int j; };
4843 struct { int k; long int l; } w;
4844 };
4845 int m;
4846 } v1;
4847
4848 int
4849 main ()
4850 {
4851
4852 // Check bool.
4853 _Bool success = false;
4854
4855 // Check restrict.
4856 if (test_restrict ("String literal") == 0)
4857 success = true;
4858 char *restrict newvar = "Another string";
4859
4860 // Check varargs.
4861 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
4862 test_varargs_macros ();
4863
4864 // Check flexible array members.
4865 struct incomplete_array *ia =
4866 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4867 ia->datasize = 10;
4868 for (int i = 0; i < ia->datasize; ++i)
4869 ia->data[i] = i * 1.234;
4870
4871 // Check named initializers.
4872 struct named_init ni = {
4873 .number = 34,
4874 .name = L"Test wide string",
4875 .average = 543.34343,
4876 };
4877
4878 ni.number = 58;
4879
4880 int dynamic_array[ni.number];
4881 dynamic_array[ni.number - 1] = 543;
4882
4883 // work around unused variable warnings
4884 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4885 || dynamic_array[ni.number - 1] != 543);
4886
4887 v1.i = 2;
4888 v1.w.k = 5;
4889 _Static_assert ((offsetof (struct anonymous, i)
4890 == offsetof (struct anonymous, w.k)),
4891 "Anonymous union alignment botch");
4892
4893 ;
4894 return 0;
4895 }
4896 _ACEOF
4897 for ac_arg in '' -std=gnu11
4898 do
4899 CC="$ac_save_CC $ac_arg"
4900 if ac_fn_c_try_compile "$LINENO"; then :
4901 ac_cv_prog_cc_c11=$ac_arg
4902 fi
4903 rm -f core conftest.err conftest.$ac_objext
4904 test "x$ac_cv_prog_cc_c11" != "xno" && break
4905 done
4906 rm -f conftest.$ac_ext
4907 CC=$ac_save_CC
4908
4909 fi
4910 # AC_CACHE_VAL
4911 ac_prog_cc_stdc_options=
4912 case "x$ac_cv_prog_cc_c11" in
4913 x)
4914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4915 $as_echo "none needed" >&6; } ;;
4916 xno)
4917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4918 $as_echo "unsupported" >&6; } ;;
4919 *)
4920 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
4921 CC=$CC$ac_prog_cc_stdc_options
4922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4923 $as_echo "$ac_cv_prog_cc_c11" >&6; } ;;
4924 esac
4925 if test "x$ac_cv_prog_cc_c11" != xno; then :
4926 ac_prog_cc_stdc=c11
4927 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4928 else
4929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4930 $as_echo_n "checking for $CC option to enable C99 features... " >&6; }
4931 if ${ac_cv_prog_cc_c99+:} false; then :
4932 $as_echo_n "(cached) " >&6
4933 else
4934 ac_cv_prog_cc_c99=no
4935 ac_save_CC=$CC
4936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4937 /* end confdefs.h. */
4938 #include <stdarg.h>
4939 #include <stdbool.h>
4940 #include <stddef.h>
4941 #include <stdlib.h>
4942 #include <wchar.h>
4943 #include <stdio.h>
4944
4945 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4946 #define debug(...) fprintf (stderr, __VA_ARGS__)
4947 #define showlist(...) puts (#__VA_ARGS__)
4948 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4949 static void
4950 test_varargs_macros (void)
4951 {
4952 int x = 1234;
4953 int y = 5678;
4954 debug ("Flag");
4955 debug ("X = %d\n", x);
4956 showlist (The first, second, and third items.);
4957 report (x>y, "x is %d but y is %d", x, y);
4958 }
4959
4960 // Check long long types.
4961 #define BIG64 18446744073709551615ull
4962 #define BIG32 4294967295ul
4963 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4964 #if !BIG_OK
4965 your preprocessor is broken;
4966 #endif
4967 #if BIG_OK
4968 #else
4969 your preprocessor is broken;
4970 #endif
4971 static long long int bignum = -9223372036854775807LL;
4972 static unsigned long long int ubignum = BIG64;
4973
4974 struct incomplete_array
4975 {
4976 int datasize;
4977 double data[];
4978 };
4979
4980 struct named_init {
4981 int number;
4982 const wchar_t *name;
4983 double average;
4984 };
4985
4986 typedef const char *ccp;
4987
4988 static inline int
4989 test_restrict (ccp restrict text)
4990 {
4991 // See if C++-style comments work.
4992 // Iterate through items via the restricted pointer.
4993 // Also check for declarations in for loops.
4994 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4995 continue;
4996 return 0;
4997 }
4998
4999 // Check varargs and va_copy.
5000 static bool
5001 test_varargs (const char *format, ...)
5002 {
5003 va_list args;
5004 va_start (args, format);
5005 va_list args_copy;
5006 va_copy (args_copy, args);
5007
5008 const char *str = "";
5009 int number = 0;
5010 float fnumber = 0;
5011
5012 while (*format)
5013 {
5014 switch (*format++)
5015 {
5016 case 's': // string
5017 str = va_arg (args_copy, const char *);
5018 break;
5019 case 'd': // int
5020 number = va_arg (args_copy, int);
5021 break;
5022 case 'f': // float
5023 fnumber = va_arg (args_copy, double);
5024 break;
5025 default:
5026 break;
5027 }
5028 }
5029 va_end (args_copy);
5030 va_end (args);
5031
5032 return *str && number && fnumber;
5033 }
5034 int
5035 main ()
5036 {
5037
5038 // Check bool.
5039 _Bool success = false;
5040
5041 // Check restrict.
5042 if (test_restrict ("String literal") == 0)
5043 success = true;
5044 char *restrict newvar = "Another string";
5045
5046 // Check varargs.
5047 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5048 test_varargs_macros ();
5049
5050 // Check flexible array members.
5051 struct incomplete_array *ia =
5052 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5053 ia->datasize = 10;
5054 for (int i = 0; i < ia->datasize; ++i)
5055 ia->data[i] = i * 1.234;
5056
5057 // Check named initializers.
5058 struct named_init ni = {
5059 .number = 34,
5060 .name = L"Test wide string",
5061 .average = 543.34343,
5062 };
5063
5064 ni.number = 58;
5065
5066 int dynamic_array[ni.number];
5067 dynamic_array[ni.number - 1] = 543;
5068
5069 // work around unused variable warnings
5070 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5071 || dynamic_array[ni.number - 1] != 543);
5072
5073 ;
5074 return 0;
5075 }
5076 _ACEOF
5077 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5078 do
5079 CC="$ac_save_CC $ac_arg"
5080 if ac_fn_c_try_compile "$LINENO"; then :
5081 ac_cv_prog_cc_c99=$ac_arg
5082 fi
5083 rm -f core conftest.err conftest.$ac_objext
5084 test "x$ac_cv_prog_cc_c99" != "xno" && break
5085 done
5086 rm -f conftest.$ac_ext
5087 CC=$ac_save_CC
5088
5089 fi
5090 # AC_CACHE_VAL
5091 ac_prog_cc_stdc_options=
5092 case "x$ac_cv_prog_cc_c99" in
5093 x)
5094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5095 $as_echo "none needed" >&6; } ;;
5096 xno)
5097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5098 $as_echo "unsupported" >&6; } ;;
5099 *)
5100 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5101 CC=$CC$ac_prog_cc_stdc_options
5102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5103 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5104 esac
5105 if test "x$ac_cv_prog_cc_c99" != xno; then :
5106 ac_prog_cc_stdc=c99
5107 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5108 else
5109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5110 $as_echo_n "checking for $CC option to enable C89 features... " >&6; }
5111 if ${ac_cv_prog_cc_c89+:} false; then :
5112 $as_echo_n "(cached) " >&6
5113 else
5114 ac_cv_prog_cc_c89=no
5115 ac_save_CC=$CC
5116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5117 /* end confdefs.h. */
5118 #include <stdarg.h>
5119 #include <stdio.h>
5120 struct stat;
5121 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5122 struct buf { int x; };
5123 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5124 static char *e (p, i)
5125 char **p;
5126 int i;
5127 {
5128 return p[i];
5129 }
5130 static char *f (char * (*g) (char **, int), char **p, ...)
5131 {
5132 char *s;
5133 va_list v;
5134 va_start (v,p);
5135 s = g (p, va_arg (v,int));
5136 va_end (v);
5137 return s;
5138 }
5139
5140 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5141 function prototypes and stuff, but not '\xHH' hex character constants.
5142 These don't provoke an error unfortunately, instead are silently treated
5143 as 'x'. The following induces an error, until -std is added to get
5144 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5145 array size at least. It's necessary to write '\x00'==0 to get something
5146 that's true only with -std. */
5147 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5148
5149 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5150 inside strings and character constants. */
5151 #define FOO(x) 'x'
5152 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5153
5154 int test (int i, double x);
5155 struct s1 {int (*f) (int a);};
5156 struct s2 {int (*f) (double a);};
5157 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5158 int argc;
5159 char **argv;
5160 int
5161 main ()
5162 {
5163 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5164 ;
5165 return 0;
5166 }
5167 _ACEOF
5168 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5169 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5170 do
5171 CC="$ac_save_CC $ac_arg"
5172 if ac_fn_c_try_compile "$LINENO"; then :
5173 ac_cv_prog_cc_c89=$ac_arg
5174 fi
5175 rm -f core conftest.err conftest.$ac_objext
5176 test "x$ac_cv_prog_cc_c89" != "xno" && break
5177 done
5178 rm -f conftest.$ac_ext
5179 CC=$ac_save_CC
5180
5181 fi
5182 # AC_CACHE_VAL
5183 ac_prog_cc_stdc_options=
5184 case "x$ac_cv_prog_cc_c89" in
5185 x)
5186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5187 $as_echo "none needed" >&6; } ;;
5188 xno)
5189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5190 $as_echo "unsupported" >&6; } ;;
5191 *)
5192 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5193 CC=$CC$ac_prog_cc_stdc_options
5194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5195 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5196 esac
5197 if test "x$ac_cv_prog_cc_c89" != xno; then :
5198 ac_prog_cc_stdc=c89
5199 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5200 else
5201 ac_prog_cc_stdc=no
5202 ac_cv_prog_cc_stdc=no
5203 fi
5204
5205 fi
5206
5207 fi
5208
5209 ac_ext=c
5210 ac_cpp='$CPP $CPPFLAGS'
5211 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5212 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5213 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5214
5215
5216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
5217 $as_echo_n "checking whether the compiler is clang... " >&6; }
5218 if ${gl_cv_compiler_clang+:} false; then :
5219 $as_echo_n "(cached) " >&6
5220 else
5221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5222 /* end confdefs.h. */
5223
5224 #ifdef __clang__
5225 barfbarf
5226 #endif
5227
5228 int
5229 main ()
5230 {
5231
5232 ;
5233 return 0;
5234 }
5235
5236 _ACEOF
5237 if ac_fn_c_try_compile "$LINENO"; then :
5238 gl_cv_compiler_clang=no
5239 else
5240 gl_cv_compiler_clang=yes
5241 fi
5242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5243
5244 fi
5245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
5246 $as_echo "$gl_cv_compiler_clang" >&6; }
5247
5248
5249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
5250 $as_echo_n "checking for compiler option needed when checking for declarations... " >&6; }
5251 if ${gl_cv_compiler_check_decl_option+:} false; then :
5252 $as_echo_n "(cached) " >&6
5253 else
5254 if test $gl_cv_compiler_clang = yes; then
5255 save_ac_compile="$ac_compile"
5256 ac_compile="$ac_compile -Werror=implicit-function-declaration"
5257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5258 /* end confdefs.h. */
5259
5260 int
5261 main ()
5262 {
5263
5264 ;
5265 return 0;
5266 }
5267 _ACEOF
5268 if ac_fn_c_try_compile "$LINENO"; then :
5269 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
5270 else
5271 gl_cv_compiler_check_decl_option=none
5272 fi
5273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5274 ac_compile="$save_ac_compile"
5275 else
5276 gl_cv_compiler_check_decl_option=none
5277 fi
5278
5279 fi
5280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
5281 $as_echo "$gl_cv_compiler_check_decl_option" >&6; }
5282 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
5283 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
5284 else
5285 ac_compile_for_check_decl="$ac_compile"
5286 fi
5287
5288
5289
5290
5291 ac_ext=c
5292 ac_cpp='$CPP $CPPFLAGS'
5293 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5294 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5295 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5297 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5298 # On Suns, sometimes $CPP names a directory.
5299 if test -n "$CPP" && test -d "$CPP"; then
5300 CPP=
5301 fi
5302 if test -z "$CPP"; then
5303 if ${ac_cv_prog_CPP+:} false; then :
5304 $as_echo_n "(cached) " >&6
5305 else
5306 # Double quotes because CPP needs to be expanded
5307 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5308 do
5309 ac_preproc_ok=false
5310 for ac_c_preproc_warn_flag in '' yes
5311 do
5312 # Use a header file that comes with gcc, so configuring glibc
5313 # with a fresh cross-compiler works.
5314 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5315 # <limits.h> exists even on freestanding compilers.
5316 # On the NeXT, cc -E runs the code through the compiler's parser,
5317 # not just through cpp. "Syntax error" is here to catch this case.
5318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5319 /* end confdefs.h. */
5320 #ifdef __STDC__
5321 # include <limits.h>
5322 #else
5323 # include <assert.h>
5324 #endif
5325 Syntax error
5326 _ACEOF
5327 if ac_fn_c_try_cpp "$LINENO"; then :
5328
5329 else
5330 # Broken: fails on valid input.
5331 continue
5332 fi
5333 rm -f conftest.err conftest.i conftest.$ac_ext
5334
5335 # OK, works on sane cases. Now check whether nonexistent headers
5336 # can be detected and how.
5337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5338 /* end confdefs.h. */
5339 #include <ac_nonexistent.h>
5340 _ACEOF
5341 if ac_fn_c_try_cpp "$LINENO"; then :
5342 # Broken: success on invalid input.
5343 continue
5344 else
5345 # Passes both tests.
5346 ac_preproc_ok=:
5347 break
5348 fi
5349 rm -f conftest.err conftest.i conftest.$ac_ext
5350
5351 done
5352 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5353 rm -f conftest.i conftest.err conftest.$ac_ext
5354 if $ac_preproc_ok; then :
5355 break
5356 fi
5357
5358 done
5359 ac_cv_prog_CPP=$CPP
5360
5361 fi
5362 CPP=$ac_cv_prog_CPP
5363 else
5364 ac_cv_prog_CPP=$CPP
5365 fi
5366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5367 $as_echo "$CPP" >&6; }
5368 ac_preproc_ok=false
5369 for ac_c_preproc_warn_flag in '' yes
5370 do
5371 # Use a header file that comes with gcc, so configuring glibc
5372 # with a fresh cross-compiler works.
5373 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5374 # <limits.h> exists even on freestanding compilers.
5375 # On the NeXT, cc -E runs the code through the compiler's parser,
5376 # not just through cpp. "Syntax error" is here to catch this case.
5377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5378 /* end confdefs.h. */
5379 #ifdef __STDC__
5380 # include <limits.h>
5381 #else
5382 # include <assert.h>
5383 #endif
5384 Syntax error
5385 _ACEOF
5386 if ac_fn_c_try_cpp "$LINENO"; then :
5387
5388 else
5389 # Broken: fails on valid input.
5390 continue
5391 fi
5392 rm -f conftest.err conftest.i conftest.$ac_ext
5393
5394 # OK, works on sane cases. Now check whether nonexistent headers
5395 # can be detected and how.
5396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5397 /* end confdefs.h. */
5398 #include <ac_nonexistent.h>
5399 _ACEOF
5400 if ac_fn_c_try_cpp "$LINENO"; then :
5401 # Broken: success on invalid input.
5402 continue
5403 else
5404 # Passes both tests.
5405 ac_preproc_ok=:
5406 break
5407 fi
5408 rm -f conftest.err conftest.i conftest.$ac_ext
5409
5410 done
5411 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5412 rm -f conftest.i conftest.err conftest.$ac_ext
5413 if $ac_preproc_ok; then :
5414
5415 else
5416 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5417 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5418 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5419 See \`config.log' for more details" "$LINENO" 5; }
5420 fi
5421
5422 ac_ext=c
5423 ac_cpp='$CPP $CPPFLAGS'
5424 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5425 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5426 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5427
5428
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5430 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5431 if ${ac_cv_path_GREP+:} false; then :
5432 $as_echo_n "(cached) " >&6
5433 else
5434 if test -z "$GREP"; then
5435 ac_path_GREP_found=false
5436 # Loop through the user's path and test for each of PROGNAME-LIST
5437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5438 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5439 do
5440 IFS=$as_save_IFS
5441 test -z "$as_dir" && as_dir=.
5442 for ac_prog in grep ggrep; do
5443 for ac_exec_ext in '' $ac_executable_extensions; do
5444 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5445 as_fn_executable_p "$ac_path_GREP" || continue
5446 # Check for GNU ac_path_GREP and select it if it is found.
5447 # Check for GNU $ac_path_GREP
5448 case `"$ac_path_GREP" --version 2>&1` in
5449 *GNU*)
5450 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5451 *)
5452 ac_count=0
5453 $as_echo_n 0123456789 >"conftest.in"
5454 while :
5455 do
5456 cat "conftest.in" "conftest.in" >"conftest.tmp"
5457 mv "conftest.tmp" "conftest.in"
5458 cp "conftest.in" "conftest.nl"
5459 $as_echo 'GREP' >> "conftest.nl"
5460 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5461 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5462 as_fn_arith $ac_count + 1 && ac_count=$as_val
5463 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5464 # Best one so far, save it but keep looking for a better one
5465 ac_cv_path_GREP="$ac_path_GREP"
5466 ac_path_GREP_max=$ac_count
5467 fi
5468 # 10*(2^10) chars as input seems more than enough
5469 test $ac_count -gt 10 && break
5470 done
5471 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5472 esac
5473
5474 $ac_path_GREP_found && break 3
5475 done
5476 done
5477 done
5478 IFS=$as_save_IFS
5479 if test -z "$ac_cv_path_GREP"; then
5480 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5481 fi
5482 else
5483 ac_cv_path_GREP=$GREP
5484 fi
5485
5486 fi
5487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5488 $as_echo "$ac_cv_path_GREP" >&6; }
5489 GREP="$ac_cv_path_GREP"
5490
5491
5492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5493 $as_echo_n "checking for egrep... " >&6; }
5494 if ${ac_cv_path_EGREP+:} false; then :
5495 $as_echo_n "(cached) " >&6
5496 else
5497 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5498 then ac_cv_path_EGREP="$GREP -E"
5499 else
5500 if test -z "$EGREP"; then
5501 ac_path_EGREP_found=false
5502 # Loop through the user's path and test for each of PROGNAME-LIST
5503 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5504 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5505 do
5506 IFS=$as_save_IFS
5507 test -z "$as_dir" && as_dir=.
5508 for ac_prog in egrep; do
5509 for ac_exec_ext in '' $ac_executable_extensions; do
5510 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5511 as_fn_executable_p "$ac_path_EGREP" || continue
5512 # Check for GNU ac_path_EGREP and select it if it is found.
5513 # Check for GNU $ac_path_EGREP
5514 case `"$ac_path_EGREP" --version 2>&1` in
5515 *GNU*)
5516 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5517 *)
5518 ac_count=0
5519 $as_echo_n 0123456789 >"conftest.in"
5520 while :
5521 do
5522 cat "conftest.in" "conftest.in" >"conftest.tmp"
5523 mv "conftest.tmp" "conftest.in"
5524 cp "conftest.in" "conftest.nl"
5525 $as_echo 'EGREP' >> "conftest.nl"
5526 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5527 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5528 as_fn_arith $ac_count + 1 && ac_count=$as_val
5529 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5530 # Best one so far, save it but keep looking for a better one
5531 ac_cv_path_EGREP="$ac_path_EGREP"
5532 ac_path_EGREP_max=$ac_count
5533 fi
5534 # 10*(2^10) chars as input seems more than enough
5535 test $ac_count -gt 10 && break
5536 done
5537 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5538 esac
5539
5540 $ac_path_EGREP_found && break 3
5541 done
5542 done
5543 done
5544 IFS=$as_save_IFS
5545 if test -z "$ac_cv_path_EGREP"; then
5546 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5547 fi
5548 else
5549 ac_cv_path_EGREP=$EGREP
5550 fi
5551
5552 fi
5553 fi
5554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5555 $as_echo "$ac_cv_path_EGREP" >&6; }
5556 EGREP="$ac_cv_path_EGREP"
5557
5558
5559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5560 $as_echo_n "checking for ANSI C header files... " >&6; }
5561 if ${ac_cv_header_stdc+:} false; then :
5562 $as_echo_n "(cached) " >&6
5563 else
5564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5565 /* end confdefs.h. */
5566 #include <stdlib.h>
5567 #include <stdarg.h>
5568 #include <string.h>
5569 #include <float.h>
5570
5571 int
5572 main ()
5573 {
5574
5575 ;
5576 return 0;
5577 }
5578 _ACEOF
5579 if ac_fn_c_try_compile "$LINENO"; then :
5580 ac_cv_header_stdc=yes
5581 else
5582 ac_cv_header_stdc=no
5583 fi
5584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5585
5586 if test $ac_cv_header_stdc = yes; then
5587 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5589 /* end confdefs.h. */
5590 #include <string.h>
5591
5592 _ACEOF
5593 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5594 $EGREP "memchr" >/dev/null 2>&1; then :
5595
5596 else
5597 ac_cv_header_stdc=no
5598 fi
5599 rm -f conftest*
5600
5601 fi
5602
5603 if test $ac_cv_header_stdc = yes; then
5604 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5606 /* end confdefs.h. */
5607 #include <stdlib.h>
5608
5609 _ACEOF
5610 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5611 $EGREP "free" >/dev/null 2>&1; then :
5612
5613 else
5614 ac_cv_header_stdc=no
5615 fi
5616 rm -f conftest*
5617
5618 fi
5619
5620 if test $ac_cv_header_stdc = yes; then
5621 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5622 if test "$cross_compiling" = yes; then :
5623 :
5624 else
5625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5626 /* end confdefs.h. */
5627 #include <ctype.h>
5628 #include <stdlib.h>
5629 #if ((' ' & 0x0FF) == 0x020)
5630 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5631 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5632 #else
5633 # define ISLOWER(c) \
5634 (('a' <= (c) && (c) <= 'i') \
5635 || ('j' <= (c) && (c) <= 'r') \
5636 || ('s' <= (c) && (c) <= 'z'))
5637 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5638 #endif
5639
5640 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5641 int
5642 main ()
5643 {
5644 int i;
5645 for (i = 0; i < 256; i++)
5646 if (XOR (islower (i), ISLOWER (i))
5647 || toupper (i) != TOUPPER (i))
5648 return 2;
5649 return 0;
5650 }
5651 _ACEOF
5652 if ac_fn_c_try_run "$LINENO"; then :
5653
5654 else
5655 ac_cv_header_stdc=no
5656 fi
5657 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5658 conftest.$ac_objext conftest.beam conftest.$ac_ext
5659 fi
5660
5661 fi
5662 fi
5663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5664 $as_echo "$ac_cv_header_stdc" >&6; }
5665 if test $ac_cv_header_stdc = yes; then
5666
5667 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5668
5669 fi
5670
5671 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5672 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5673 inttypes.h stdint.h unistd.h
5674 do :
5675 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5676 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5677 "
5678 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5679 cat >>confdefs.h <<_ACEOF
5680 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5681 _ACEOF
5682
5683 fi
5684
5685 done
5686
5687
5688
5689
5690
5691 for ac_header in $ac_header_list
5692 do :
5693 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5694 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5695 "
5696 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5697 cat >>confdefs.h <<_ACEOF
5698 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5699 _ACEOF
5700
5701 fi
5702
5703 done
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5714 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5715 if ${ac_cv_safe_to_define___extensions__+:} false; then :
5716 $as_echo_n "(cached) " >&6
5717 else
5718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5719 /* end confdefs.h. */
5720
5721 # define __EXTENSIONS__ 1
5722 $ac_includes_default
5723 int
5724 main ()
5725 {
5726
5727 ;
5728 return 0;
5729 }
5730 _ACEOF
5731 if ac_fn_c_try_compile "$LINENO"; then :
5732 ac_cv_safe_to_define___extensions__=yes
5733 else
5734 ac_cv_safe_to_define___extensions__=no
5735 fi
5736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5737 fi
5738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5739 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5740
5741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5742 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5743 if ${ac_cv_should_define__xopen_source+:} false; then :
5744 $as_echo_n "(cached) " >&6
5745 else
5746 ac_cv_should_define__xopen_source=no
5747 if test $ac_cv_header_wchar_h = yes; then :
5748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5749 /* end confdefs.h. */
5750
5751 #include <wchar.h>
5752 mbstate_t x;
5753 int
5754 main ()
5755 {
5756
5757 ;
5758 return 0;
5759 }
5760 _ACEOF
5761 if ac_fn_c_try_compile "$LINENO"; then :
5762
5763 else
5764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5765 /* end confdefs.h. */
5766
5767 #define _XOPEN_SOURCE 500
5768 #include <wchar.h>
5769 mbstate_t x;
5770 int
5771 main ()
5772 {
5773
5774 ;
5775 return 0;
5776 }
5777 _ACEOF
5778 if ac_fn_c_try_compile "$LINENO"; then :
5779 ac_cv_should_define__xopen_source=yes
5780 fi
5781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5782 fi
5783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5784 fi
5785 fi
5786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5787 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
5788
5789 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5790
5791 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5792
5793 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5794
5795 $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
5796
5797 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
5798
5799 $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
5800
5801 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5802
5803 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5804
5805 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5806
5807 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5808
5809 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5810
5811 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5812
5813 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5814
5815 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5816
5817 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5818
5819 if test $ac_cv_header_minix_config_h = yes; then :
5820 MINIX=yes
5821 $as_echo "#define _MINIX 1" >>confdefs.h
5822
5823 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5824
5825 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5826
5827 else
5828 MINIX=
5829 fi
5830 if test $ac_cv_safe_to_define___extensions__ = yes; then :
5831 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5832
5833 fi
5834 if test $ac_cv_should_define__xopen_source = yes; then :
5835 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5836
5837 fi
5838
5839 # Needs to run before gl_EARLY so it can override AC_SYS_LARGEFILE included
5840 # there.
5841 ac_aux_dir=
5842 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
5843 if test -f "$ac_dir/install-sh"; then
5844 ac_aux_dir=$ac_dir
5845 ac_install_sh="$ac_aux_dir/install-sh -c"
5846 break
5847 elif test -f "$ac_dir/install.sh"; then
5848 ac_aux_dir=$ac_dir
5849 ac_install_sh="$ac_aux_dir/install.sh -c"
5850 break
5851 elif test -f "$ac_dir/shtool"; then
5852 ac_aux_dir=$ac_dir
5853 ac_install_sh="$ac_aux_dir/shtool install -c"
5854 break
5855 fi
5856 done
5857 if test -z "$ac_aux_dir"; then
5858 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5859 fi
5860
5861 # These three variables are undocumented and unsupported,
5862 # and are intended to be withdrawn in a future Autoconf release.
5863 # They can cause serious problems if a builder's source tree is in a directory
5864 # whose full name contains unusual characters.
5865 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5866 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5867 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5868
5869
5870 # Make sure we can run config.sub.
5871 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5872 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5873
5874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5875 $as_echo_n "checking build system type... " >&6; }
5876 if ${ac_cv_build+:} false; then :
5877 $as_echo_n "(cached) " >&6
5878 else
5879 ac_build_alias=$build_alias
5880 test "x$ac_build_alias" = x &&
5881 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5882 test "x$ac_build_alias" = x &&
5883 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5884 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5885 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5886
5887 fi
5888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5889 $as_echo "$ac_cv_build" >&6; }
5890 case $ac_cv_build in
5891 *-*-*) ;;
5892 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5893 esac
5894 build=$ac_cv_build
5895 ac_save_IFS=$IFS; IFS='-'
5896 set x $ac_cv_build
5897 shift
5898 build_cpu=$1
5899 build_vendor=$2
5900 shift; shift
5901 # Remember, the first character of IFS is used to create $*,
5902 # except with old shells:
5903 build_os=$*
5904 IFS=$ac_save_IFS
5905 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5906
5907
5908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5909 $as_echo_n "checking host system type... " >&6; }
5910 if ${ac_cv_host+:} false; then :
5911 $as_echo_n "(cached) " >&6
5912 else
5913 if test "x$host_alias" = x; then
5914 ac_cv_host=$ac_cv_build
5915 else
5916 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5917 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5918 fi
5919
5920 fi
5921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5922 $as_echo "$ac_cv_host" >&6; }
5923 case $ac_cv_host in
5924 *-*-*) ;;
5925 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5926 esac
5927 host=$ac_cv_host
5928 ac_save_IFS=$IFS; IFS='-'
5929 set x $ac_cv_host
5930 shift
5931 host_cpu=$1
5932 host_vendor=$2
5933 shift; shift
5934 # Remember, the first character of IFS is used to create $*,
5935 # except with old shells:
5936 host_os=$*
5937 IFS=$ac_save_IFS
5938 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5939
5940
5941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
5942 $as_echo_n "checking target system type... " >&6; }
5943 if ${ac_cv_target+:} false; then :
5944 $as_echo_n "(cached) " >&6
5945 else
5946 if test "x$target_alias" = x; then
5947 ac_cv_target=$ac_cv_host
5948 else
5949 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
5950 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
5951 fi
5952
5953 fi
5954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
5955 $as_echo "$ac_cv_target" >&6; }
5956 case $ac_cv_target in
5957 *-*-*) ;;
5958 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
5959 esac
5960 target=$ac_cv_target
5961 ac_save_IFS=$IFS; IFS='-'
5962 set x $ac_cv_target
5963 shift
5964 target_cpu=$1
5965 target_vendor=$2
5966 shift; shift
5967 # Remember, the first character of IFS is used to create $*,
5968 # except with old shells:
5969 target_os=$*
5970 IFS=$ac_save_IFS
5971 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
5972
5973
5974 # The aliases save the names the user supplied, while $host etc.
5975 # will get canonicalized.
5976 test -n "$target_alias" &&
5977 test "$program_prefix$program_suffix$program_transform_name" = \
5978 NONENONEs,x,x, &&
5979 program_prefix=${target_alias}-
5980
5981 # The tests for host and target for $enable_largefile require
5982 # canonical names.
5983
5984
5985
5986 # As the $enable_largefile decision depends on --enable-plugins we must set it
5987 # even in directories otherwise not depending on the $plugins option.
5988
5989
5990 maybe_plugins=no
5991 for ac_header in dlfcn.h
5992 do :
5993 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
5994 "
5995 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
5996 cat >>confdefs.h <<_ACEOF
5997 #define HAVE_DLFCN_H 1
5998 _ACEOF
5999 maybe_plugins=yes
6000 fi
6001
6002 done
6003
6004 for ac_header in windows.h
6005 do :
6006 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
6007 "
6008 if test "x$ac_cv_header_windows_h" = xyes; then :
6009 cat >>confdefs.h <<_ACEOF
6010 #define HAVE_WINDOWS_H 1
6011 _ACEOF
6012 maybe_plugins=yes
6013 fi
6014
6015 done
6016
6017
6018 # Check whether --enable-plugins was given.
6019 if test "${enable_plugins+set}" = set; then :
6020 enableval=$enable_plugins; case "${enableval}" in
6021 no) plugins=no ;;
6022 *) plugins=yes
6023 if test "$maybe_plugins" != "yes" ; then
6024 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
6025 fi ;;
6026 esac
6027 else
6028 plugins=$maybe_plugins
6029
6030 fi
6031
6032 if test "$plugins" = "yes"; then
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
6034 $as_echo_n "checking for library containing dlsym... " >&6; }
6035 if ${ac_cv_search_dlsym+:} false; then :
6036 $as_echo_n "(cached) " >&6
6037 else
6038 ac_func_search_save_LIBS=$LIBS
6039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6040 /* end confdefs.h. */
6041
6042 /* Override any GCC internal prototype to avoid an error.
6043 Use char because int might match the return type of a GCC
6044 builtin and then its argument prototype would still apply. */
6045 #ifdef __cplusplus
6046 extern "C"
6047 #endif
6048 char dlsym ();
6049 int
6050 main ()
6051 {
6052 return dlsym ();
6053 ;
6054 return 0;
6055 }
6056 _ACEOF
6057 for ac_lib in '' dl; do
6058 if test -z "$ac_lib"; then
6059 ac_res="none required"
6060 else
6061 ac_res=-l$ac_lib
6062 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
6063 fi
6064 if ac_fn_c_try_link "$LINENO"; then :
6065 ac_cv_search_dlsym=$ac_res
6066 fi
6067 rm -f core conftest.err conftest.$ac_objext \
6068 conftest$ac_exeext
6069 if ${ac_cv_search_dlsym+:} false; then :
6070 break
6071 fi
6072 done
6073 if ${ac_cv_search_dlsym+:} false; then :
6074
6075 else
6076 ac_cv_search_dlsym=no
6077 fi
6078 rm conftest.$ac_ext
6079 LIBS=$ac_func_search_save_LIBS
6080 fi
6081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
6082 $as_echo "$ac_cv_search_dlsym" >&6; }
6083 ac_res=$ac_cv_search_dlsym
6084 if test "$ac_res" != no; then :
6085 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6086
6087 fi
6088
6089 fi
6090
6091
6092 case "${host}" in
6093 sparc-*-solaris*|i?86-*-solaris*)
6094 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
6095 # were mutually exclusive until Solaris 11.3. Without procfs support,
6096 # the bfd/ elf module cannot provide certain routines such as
6097 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
6098 # explicitly requested large-file support through the
6099 # --enable-largefile switch, disable large-file support in favor of
6100 # procfs support.
6101 #
6102 # Check if <sys/procfs.h> is incompatible with large-file support.
6103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6104 /* end confdefs.h. */
6105 #define _FILE_OFFSET_BITS 64
6106 #define _STRUCTURED_PROC 1
6107 #include <sys/procfs.h>
6108 int
6109 main ()
6110 {
6111
6112 ;
6113 return 0;
6114 }
6115 _ACEOF
6116 if ac_fn_c_try_compile "$LINENO"; then :
6117 acx_cv_procfs_lfs=yes
6118 else
6119 acx_cv_procfs_lfs=no
6120 fi
6121 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6122 #
6123 # Forcefully disable large-file support only if necessary, gdb is in
6124 # tree and enabled.
6125 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
6126 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
6127 : ${enable_largefile="no"}
6128 if test "$plugins" = yes; then
6129 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
6130 plugin support disabled; require large-file support which is incompatible with GDB." >&5
6131 $as_echo "$as_me: WARNING:
6132 plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
6133 plugins=no
6134 fi
6135 fi
6136 #
6137 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
6138 # benefit of g++ 9+ which predefines it on Solaris.
6139 if test "$enable_largefile" = no; then
6140 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
6141
6142 fi
6143 ;;
6144 esac
6145
6146 # Check whether --enable-largefile was given.
6147 if test "${enable_largefile+set}" = set; then :
6148 enableval=$enable_largefile;
6149 fi
6150
6151 if test "$enable_largefile" != no; then
6152
6153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6154 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6155 if ${ac_cv_sys_largefile_CC+:} false; then :
6156 $as_echo_n "(cached) " >&6
6157 else
6158 ac_cv_sys_largefile_CC=no
6159 if test "$GCC" != yes; then
6160 ac_save_CC=$CC
6161 while :; do
6162 # IRIX 6.2 and later do not support large files by default,
6163 # so use the C compiler's -n32 option if that helps.
6164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6165 /* end confdefs.h. */
6166 #include <sys/types.h>
6167 /* Check that off_t can represent 2**63 - 1 correctly.
6168 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6169 since some C++ compilers masquerading as C compilers
6170 incorrectly reject 9223372036854775807. */
6171 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6172 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6173 && LARGE_OFF_T % 2147483647 == 1)
6174 ? 1 : -1];
6175 int
6176 main ()
6177 {
6178
6179 ;
6180 return 0;
6181 }
6182 _ACEOF
6183 if ac_fn_c_try_compile "$LINENO"; then :
6184 break
6185 fi
6186 rm -f core conftest.err conftest.$ac_objext
6187 CC="$CC -n32"
6188 if ac_fn_c_try_compile "$LINENO"; then :
6189 ac_cv_sys_largefile_CC=' -n32'; break
6190 fi
6191 rm -f core conftest.err conftest.$ac_objext
6192 break
6193 done
6194 CC=$ac_save_CC
6195 rm -f conftest.$ac_ext
6196 fi
6197 fi
6198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6199 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6200 if test "$ac_cv_sys_largefile_CC" != no; then
6201 CC=$CC$ac_cv_sys_largefile_CC
6202 fi
6203
6204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6205 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6206 if ${ac_cv_sys_file_offset_bits+:} false; then :
6207 $as_echo_n "(cached) " >&6
6208 else
6209 while :; do
6210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6211 /* end confdefs.h. */
6212 #include <sys/types.h>
6213 /* Check that off_t can represent 2**63 - 1 correctly.
6214 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6215 since some C++ compilers masquerading as C compilers
6216 incorrectly reject 9223372036854775807. */
6217 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6218 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6219 && LARGE_OFF_T % 2147483647 == 1)
6220 ? 1 : -1];
6221 int
6222 main ()
6223 {
6224
6225 ;
6226 return 0;
6227 }
6228 _ACEOF
6229 if ac_fn_c_try_compile "$LINENO"; then :
6230 ac_cv_sys_file_offset_bits=no; break
6231 fi
6232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6234 /* end confdefs.h. */
6235 #define _FILE_OFFSET_BITS 64
6236 #include <sys/types.h>
6237 /* Check that off_t can represent 2**63 - 1 correctly.
6238 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6239 since some C++ compilers masquerading as C compilers
6240 incorrectly reject 9223372036854775807. */
6241 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6242 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6243 && LARGE_OFF_T % 2147483647 == 1)
6244 ? 1 : -1];
6245 int
6246 main ()
6247 {
6248
6249 ;
6250 return 0;
6251 }
6252 _ACEOF
6253 if ac_fn_c_try_compile "$LINENO"; then :
6254 ac_cv_sys_file_offset_bits=64; break
6255 fi
6256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6257 ac_cv_sys_file_offset_bits=unknown
6258 break
6259 done
6260 fi
6261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6262 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6263 case $ac_cv_sys_file_offset_bits in #(
6264 no | unknown) ;;
6265 *)
6266 cat >>confdefs.h <<_ACEOF
6267 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6268 _ACEOF
6269 ;;
6270 esac
6271 rm -rf conftest*
6272 if test $ac_cv_sys_file_offset_bits = unknown; then
6273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6274 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6275 if ${ac_cv_sys_large_files+:} false; then :
6276 $as_echo_n "(cached) " >&6
6277 else
6278 while :; do
6279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6280 /* end confdefs.h. */
6281 #include <sys/types.h>
6282 /* Check that off_t can represent 2**63 - 1 correctly.
6283 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6284 since some C++ compilers masquerading as C compilers
6285 incorrectly reject 9223372036854775807. */
6286 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6287 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6288 && LARGE_OFF_T % 2147483647 == 1)
6289 ? 1 : -1];
6290 int
6291 main ()
6292 {
6293
6294 ;
6295 return 0;
6296 }
6297 _ACEOF
6298 if ac_fn_c_try_compile "$LINENO"; then :
6299 ac_cv_sys_large_files=no; break
6300 fi
6301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6303 /* end confdefs.h. */
6304 #define _LARGE_FILES 1
6305 #include <sys/types.h>
6306 /* Check that off_t can represent 2**63 - 1 correctly.
6307 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6308 since some C++ compilers masquerading as C compilers
6309 incorrectly reject 9223372036854775807. */
6310 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6311 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6312 && LARGE_OFF_T % 2147483647 == 1)
6313 ? 1 : -1];
6314 int
6315 main ()
6316 {
6317
6318 ;
6319 return 0;
6320 }
6321 _ACEOF
6322 if ac_fn_c_try_compile "$LINENO"; then :
6323 ac_cv_sys_large_files=1; break
6324 fi
6325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6326 ac_cv_sys_large_files=unknown
6327 break
6328 done
6329 fi
6330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6331 $as_echo "$ac_cv_sys_large_files" >&6; }
6332 case $ac_cv_sys_large_files in #(
6333 no | unknown) ;;
6334 *)
6335 cat >>confdefs.h <<_ACEOF
6336 #define _LARGE_FILES $ac_cv_sys_large_files
6337 _ACEOF
6338 ;;
6339 esac
6340 rm -rf conftest*
6341 fi
6342 fi
6343
6344
6345
6346
6347
6348
6349 case "$host_os" in
6350 openbsd*)
6351
6352 $as_echo "#define _ISOC11_SOURCE 1" >>confdefs.h
6353
6354 ;;
6355 esac
6356
6357
6358
6359
6360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6361 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6362 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6363 $as_echo_n "(cached) " >&6
6364 else
6365
6366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6367 /* end confdefs.h. */
6368
6369 #ifdef __ACK__
6370 Amsterdam
6371 #endif
6372
6373 _ACEOF
6374 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6375 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6376 gl_cv_c_amsterdam_compiler=yes
6377 else
6378 gl_cv_c_amsterdam_compiler=no
6379 fi
6380 rm -f conftest*
6381
6382
6383 fi
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6385 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6386
6387 if test $gl_cv_c_amsterdam_compiler = yes; then
6388 if test -z "$AR"; then
6389 AR='cc -c.a'
6390 fi
6391 if test -z "$ARFLAGS"; then
6392 ARFLAGS='-o'
6393 fi
6394 else
6395 :
6396 fi
6397
6398 if test -n "$ac_tool_prefix"; then
6399 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6400 set dummy ${ac_tool_prefix}ar; ac_word=$2
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6402 $as_echo_n "checking for $ac_word... " >&6; }
6403 if ${ac_cv_prog_AR+:} false; then :
6404 $as_echo_n "(cached) " >&6
6405 else
6406 if test -n "$AR"; then
6407 ac_cv_prog_AR="$AR" # Let the user override the test.
6408 else
6409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6410 for as_dir in $PATH
6411 do
6412 IFS=$as_save_IFS
6413 test -z "$as_dir" && as_dir=.
6414 for ac_exec_ext in '' $ac_executable_extensions; do
6415 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6416 ac_cv_prog_AR="${ac_tool_prefix}ar"
6417 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6418 break 2
6419 fi
6420 done
6421 done
6422 IFS=$as_save_IFS
6423
6424 fi
6425 fi
6426 AR=$ac_cv_prog_AR
6427 if test -n "$AR"; then
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6429 $as_echo "$AR" >&6; }
6430 else
6431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6432 $as_echo "no" >&6; }
6433 fi
6434
6435
6436 fi
6437 if test -z "$ac_cv_prog_AR"; then
6438 ac_ct_AR=$AR
6439 # Extract the first word of "ar", so it can be a program name with args.
6440 set dummy ar; ac_word=$2
6441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6442 $as_echo_n "checking for $ac_word... " >&6; }
6443 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6444 $as_echo_n "(cached) " >&6
6445 else
6446 if test -n "$ac_ct_AR"; then
6447 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6448 else
6449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450 for as_dir in $PATH
6451 do
6452 IFS=$as_save_IFS
6453 test -z "$as_dir" && as_dir=.
6454 for ac_exec_ext in '' $ac_executable_extensions; do
6455 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6456 ac_cv_prog_ac_ct_AR="ar"
6457 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6458 break 2
6459 fi
6460 done
6461 done
6462 IFS=$as_save_IFS
6463
6464 fi
6465 fi
6466 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6467 if test -n "$ac_ct_AR"; then
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6469 $as_echo "$ac_ct_AR" >&6; }
6470 else
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472 $as_echo "no" >&6; }
6473 fi
6474
6475 if test "x$ac_ct_AR" = x; then
6476 AR="ar"
6477 else
6478 case $cross_compiling:$ac_tool_warned in
6479 yes:)
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6481 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6482 ac_tool_warned=yes ;;
6483 esac
6484 AR=$ac_ct_AR
6485 fi
6486 else
6487 AR="$ac_cv_prog_AR"
6488 fi
6489
6490 if test -z "$ARFLAGS"; then
6491 ARFLAGS='cr'
6492 fi
6493
6494
6495
6496 if test -z "$RANLIB"; then
6497 if test $gl_cv_c_amsterdam_compiler = yes; then
6498 RANLIB=':'
6499 else
6500 if test -n "$ac_tool_prefix"; then
6501 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6502 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6504 $as_echo_n "checking for $ac_word... " >&6; }
6505 if ${ac_cv_prog_RANLIB+:} false; then :
6506 $as_echo_n "(cached) " >&6
6507 else
6508 if test -n "$RANLIB"; then
6509 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6510 else
6511 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6512 for as_dir in $PATH
6513 do
6514 IFS=$as_save_IFS
6515 test -z "$as_dir" && as_dir=.
6516 for ac_exec_ext in '' $ac_executable_extensions; do
6517 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6518 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6519 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6520 break 2
6521 fi
6522 done
6523 done
6524 IFS=$as_save_IFS
6525
6526 fi
6527 fi
6528 RANLIB=$ac_cv_prog_RANLIB
6529 if test -n "$RANLIB"; then
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6531 $as_echo "$RANLIB" >&6; }
6532 else
6533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6534 $as_echo "no" >&6; }
6535 fi
6536
6537
6538 fi
6539 if test -z "$ac_cv_prog_RANLIB"; then
6540 ac_ct_RANLIB=$RANLIB
6541 # Extract the first word of "ranlib", so it can be a program name with args.
6542 set dummy ranlib; ac_word=$2
6543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6544 $as_echo_n "checking for $ac_word... " >&6; }
6545 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6546 $as_echo_n "(cached) " >&6
6547 else
6548 if test -n "$ac_ct_RANLIB"; then
6549 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6550 else
6551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6552 for as_dir in $PATH
6553 do
6554 IFS=$as_save_IFS
6555 test -z "$as_dir" && as_dir=.
6556 for ac_exec_ext in '' $ac_executable_extensions; do
6557 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6558 ac_cv_prog_ac_ct_RANLIB="ranlib"
6559 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6560 break 2
6561 fi
6562 done
6563 done
6564 IFS=$as_save_IFS
6565
6566 fi
6567 fi
6568 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6569 if test -n "$ac_ct_RANLIB"; then
6570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6571 $as_echo "$ac_ct_RANLIB" >&6; }
6572 else
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6574 $as_echo "no" >&6; }
6575 fi
6576
6577 if test "x$ac_ct_RANLIB" = x; then
6578 RANLIB=":"
6579 else
6580 case $cross_compiling:$ac_tool_warned in
6581 yes:)
6582 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6583 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6584 ac_tool_warned=yes ;;
6585 esac
6586 RANLIB=$ac_ct_RANLIB
6587 fi
6588 else
6589 RANLIB="$ac_cv_prog_RANLIB"
6590 fi
6591
6592 fi
6593 fi
6594
6595
6596
6597
6598
6599
6600 # IEEE behaviour is the default on all CPUs except Alpha and SH
6601 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6602 # and the GCC 4.1.2 manual).
6603 case "$host_cpu" in
6604 alpha*)
6605 # On Alpha systems, a compiler option provides the behaviour.
6606 # See the ieee(3) manual page, also available at
6607 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
6608 if test -n "$GCC"; then
6609 # GCC has the option -mieee.
6610 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6611 CPPFLAGS="$CPPFLAGS -mieee"
6612 else
6613 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6614 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6615 CPPFLAGS="$CPPFLAGS -ieee"
6616 fi
6617 ;;
6618 sh*)
6619 if test -n "$GCC"; then
6620 # GCC has the option -mieee.
6621 CPPFLAGS="$CPPFLAGS -mieee"
6622 fi
6623 ;;
6624 esac
6625
6626
6627
6628
6629
6630
6631
6632 # Check whether --enable-threads was given.
6633 if test "${enable_threads+set}" = set; then :
6634 enableval=$enable_threads; gl_use_threads=$enableval
6635 else
6636 if test -n "$gl_use_threads_default"; then
6637 gl_use_threads="$gl_use_threads_default"
6638 else
6639 case "$host_os" in
6640 osf*) gl_use_threads=no ;;
6641 cygwin*)
6642 case `uname -r` in
6643 1.[0-5].*) gl_use_threads=no ;;
6644 *) gl_use_threads=yes ;;
6645 esac
6646 ;;
6647 mingw*)
6648 case "$gl_use_winpthreads_default" in
6649 yes) gl_use_threads=posix ;;
6650 no) gl_use_threads=windows ;;
6651 *) gl_use_threads=yes ;;
6652 esac
6653 ;;
6654 *) gl_use_threads=yes ;;
6655 esac
6656 fi
6657
6658 fi
6659
6660 if test "$gl_use_threads" = yes \
6661 || test "$gl_use_threads" = isoc \
6662 || test "$gl_use_threads" = posix \
6663 || test "$gl_use_threads" = isoc+posix; then
6664 # For using <threads.h> or <pthread.h>:
6665
6666
6667 if test -z "$gl_anythreadlib_early_done"; then
6668 case "$host_os" in
6669 osf*)
6670 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6671 # groks <pthread.h>. cc also understands the flag -pthread, but
6672 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6673 # 2. putting a flag into CPPFLAGS that has an effect on the linker
6674 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
6675 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6676 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
6677 ;;
6678 esac
6679 # Some systems optimize for single-threaded programs by default, and
6680 # need special flags to disable these optimizations. For example, the
6681 # definition of 'errno' in <errno.h>.
6682 case "$host_os" in
6683 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
6684 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
6685 esac
6686 gl_anythreadlib_early_done=done
6687 fi
6688
6689 fi
6690
6691
6692
6693 # Pre-early section.
6694
6695
6696
6697
6698 # Code from module absolute-header:
6699 # Code from module alloca:
6700 # Code from module alloca-opt:
6701 # Code from module arpa_inet:
6702 # Code from module assure:
6703 # Code from module at-internal:
6704 # Code from module attribute:
6705 # Code from module basename-lgpl:
6706 # Code from module btowc:
6707 # Code from module builtin-expect:
6708 # Code from module c99:
6709 # Code from module canonicalize-lgpl:
6710 # Code from module chdir:
6711 # Code from module chdir-long:
6712 # Code from module chown:
6713 # Code from module clock-time:
6714 # Code from module cloexec:
6715 # Code from module close:
6716 # Code from module closedir:
6717 # Code from module count-one-bits:
6718 # Code from module ctype:
6719 # Code from module d-ino:
6720 # Code from module d-type:
6721 # Code from module dirent:
6722 # Code from module dirfd:
6723 # Code from module dirname-lgpl:
6724 # Code from module double-slash-root:
6725 # Code from module dup:
6726 # Code from module dup2:
6727 # Code from module eloop-threshold:
6728 # Code from module environ:
6729 # Code from module errno:
6730 # Code from module error:
6731 # Code from module exitfail:
6732 # Code from module extensions:
6733 # Code from module extern-inline:
6734 # Code from module fchdir:
6735 # Code from module fcntl:
6736 # Code from module fcntl-h:
6737 # Code from module fd-hook:
6738 # Code from module fd-safer-flag:
6739 # Code from module fdopendir:
6740 # Code from module ffs:
6741 # Code from module filename:
6742 # Code from module filenamecat-lgpl:
6743 # Code from module flexmember:
6744 # Code from module float:
6745 # Code from module fnmatch:
6746 # Code from module fnmatch-gnu:
6747 # Code from module fnmatch-h:
6748 # Code from module fpieee:
6749
6750 # Code from module fpucw:
6751 # Code from module free-posix:
6752 # Code from module frexp:
6753 # Code from module frexpl:
6754 # Code from module fstat:
6755 # Code from module fstatat:
6756 # Code from module gendocs:
6757 # Code from module getcwd:
6758 # Code from module getcwd-lgpl:
6759 # Code from module getdelim:
6760 # Code from module getdtablesize:
6761 # Code from module getline:
6762 # Code from module getlogin_r:
6763 # Code from module getprogname:
6764 # Code from module getrandom:
6765 # Code from module gettext-h:
6766 # Code from module gettimeofday:
6767 # Code from module gitlog-to-changelog:
6768 # Code from module glob:
6769 # Code from module glob-h:
6770 # Code from module hard-locale:
6771 # Code from module idx:
6772 # Code from module include_next:
6773 # Code from module inet_ntop:
6774 # Code from module intprops:
6775 # Code from module inttypes:
6776 # Code from module inttypes-incomplete:
6777 # Code from module isblank:
6778 # Code from module isnand-nolibm:
6779 # Code from module isnanl-nolibm:
6780 # Code from module largefile:
6781
6782 # Code from module libc-config:
6783 # Code from module limits-h:
6784 # Code from module localcharset:
6785 # Code from module locale:
6786 # Code from module lock:
6787 # Code from module lstat:
6788 # Code from module malloc-posix:
6789 # Code from module malloca:
6790 # Code from module math:
6791 # Code from module mbrtowc:
6792 # Code from module mbsinit:
6793 # Code from module mbsrtowcs:
6794 # Code from module mbtowc:
6795 # Code from module memchr:
6796 # Code from module memmem:
6797 # Code from module memmem-simple:
6798 # Code from module mempcpy:
6799 # Code from module memrchr:
6800 # Code from module minmax:
6801 # Code from module mkdir:
6802 # Code from module mkdtemp:
6803 # Code from module mkostemp:
6804 # Code from module msvc-inval:
6805 # Code from module msvc-nothrow:
6806 # Code from module multiarch:
6807 # Code from module netdb:
6808 # Code from module netinet_in:
6809 # Code from module nocrash:
6810 # Code from module open:
6811 # Code from module openat:
6812 # Code from module openat-die:
6813 # Code from module openat-h:
6814 # Code from module opendir:
6815 # Code from module pathmax:
6816 # Code from module pipe-posix:
6817 # Code from module rawmemchr:
6818 # Code from module readdir:
6819 # Code from module readlink:
6820 # Code from module realloc-posix:
6821 # Code from module rename:
6822 # Code from module rewinddir:
6823 # Code from module rmdir:
6824 # Code from module same-inode:
6825 # Code from module save-cwd:
6826 # Code from module scratch_buffer:
6827 # Code from module select:
6828 # Code from module setenv:
6829 # Code from module setlocale-null:
6830 # Code from module signal-h:
6831 # Code from module snippet/_Noreturn:
6832 # Code from module snippet/arg-nonnull:
6833 # Code from module snippet/c++defs:
6834 # Code from module snippet/warn-on-use:
6835 # Code from module socketlib:
6836 # Code from module sockets:
6837 # Code from module socklen:
6838 # Code from module ssize_t:
6839 # Code from module stat:
6840 # Code from module stat-time:
6841 # Code from module std-gnu11:
6842 # Code from module stdalign:
6843 # Code from module stdbool:
6844 # Code from module stddef:
6845 # Code from module stdint:
6846 # Code from module stdio:
6847 # Code from module stdlib:
6848 # Code from module strchrnul:
6849 # Code from module strdup-posix:
6850 # Code from module streq:
6851 # Code from module strerror:
6852 # Code from module strerror-override:
6853 # Code from module strerror_r-posix:
6854 # Code from module string:
6855 # Code from module strings:
6856 # Code from module strnlen:
6857 # Code from module strnlen1:
6858 # Code from module strstr:
6859 # Code from module strstr-simple:
6860 # Code from module strtok_r:
6861 # Code from module sys_random:
6862 # Code from module sys_select:
6863 # Code from module sys_socket:
6864 # Code from module sys_stat:
6865 # Code from module sys_time:
6866 # Code from module sys_types:
6867 # Code from module sys_uio:
6868 # Code from module tempname:
6869 # Code from module threadlib:
6870
6871
6872
6873 # Code from module time:
6874 # Code from module time_r:
6875 # Code from module unistd:
6876 # Code from module unistd-safer:
6877 # Code from module unsetenv:
6878 # Code from module update-copyright:
6879 # Code from module verify:
6880 # Code from module wchar:
6881 # Code from module wctype-h:
6882 # Code from module windows-mutex:
6883 # Code from module windows-once:
6884 # Code from module windows-recmutex:
6885 # Code from module windows-rwlock:
6886 # Code from module wmemchr:
6887 # Code from module wmempcpy:
6888 # Code from module xalloc-oversized:
6889
6890
6891 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
6892
6893
6894 ac_aux_dir=
6895 for ac_dir in .. "$srcdir"/..; do
6896 if test -f "$ac_dir/install-sh"; then
6897 ac_aux_dir=$ac_dir
6898 ac_install_sh="$ac_aux_dir/install-sh -c"
6899 break
6900 elif test -f "$ac_dir/install.sh"; then
6901 ac_aux_dir=$ac_dir
6902 ac_install_sh="$ac_aux_dir/install.sh -c"
6903 break
6904 elif test -f "$ac_dir/shtool"; then
6905 ac_aux_dir=$ac_dir
6906 ac_install_sh="$ac_aux_dir/shtool install -c"
6907 break
6908 fi
6909 done
6910 if test -z "$ac_aux_dir"; then
6911 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
6912 fi
6913
6914 # These three variables are undocumented and unsupported,
6915 # and are intended to be withdrawn in a future Autoconf release.
6916 # They can cause serious problems if a builder's source tree is in a directory
6917 # whose full name contains unusual characters.
6918 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6919 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6920 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933 # Check whether --enable-cross-guesses was given.
6934 if test "${enable_cross_guesses+set}" = set; then :
6935 enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
6936 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
6937 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
6938 enableval=conservative
6939 fi
6940 gl_cross_guesses="$enableval"
6941 else
6942 gl_cross_guesses=conservative
6943 fi
6944
6945 if test $gl_cross_guesses = risky; then
6946 gl_cross_guess_normal="guessing yes"
6947 gl_cross_guess_inverted="guessing no"
6948 else
6949 gl_cross_guess_normal="guessing no"
6950 gl_cross_guess_inverted="guessing yes"
6951 fi
6952 LIBC_FATAL_STDERR_=1
6953 export LIBC_FATAL_STDERR_
6954
6955
6956 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6957 if test "x$ac_cv_type_size_t" = xyes; then :
6958
6959 else
6960
6961 cat >>confdefs.h <<_ACEOF
6962 #define size_t unsigned int
6963 _ACEOF
6964
6965 fi
6966
6967 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6968 # for constant arguments. Useless!
6969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6970 $as_echo_n "checking for working alloca.h... " >&6; }
6971 if ${ac_cv_working_alloca_h+:} false; then :
6972 $as_echo_n "(cached) " >&6
6973 else
6974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6975 /* end confdefs.h. */
6976 #include <alloca.h>
6977 int
6978 main ()
6979 {
6980 char *p = (char *) alloca (2 * sizeof (int));
6981 if (p) return 0;
6982 ;
6983 return 0;
6984 }
6985 _ACEOF
6986 if ac_fn_c_try_link "$LINENO"; then :
6987 ac_cv_working_alloca_h=yes
6988 else
6989 ac_cv_working_alloca_h=no
6990 fi
6991 rm -f core conftest.err conftest.$ac_objext \
6992 conftest$ac_exeext conftest.$ac_ext
6993 fi
6994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6995 $as_echo "$ac_cv_working_alloca_h" >&6; }
6996 if test $ac_cv_working_alloca_h = yes; then
6997
6998 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6999
7000 fi
7001
7002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7003 $as_echo_n "checking for alloca... " >&6; }
7004 if ${ac_cv_func_alloca_works+:} false; then :
7005 $as_echo_n "(cached) " >&6
7006 else
7007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7008 /* end confdefs.h. */
7009 #ifdef __GNUC__
7010 # define alloca __builtin_alloca
7011 #else
7012 # ifdef _MSC_VER
7013 # include <malloc.h>
7014 # define alloca _alloca
7015 # else
7016 # ifdef HAVE_ALLOCA_H
7017 # include <alloca.h>
7018 # else
7019 # ifdef _AIX
7020 #pragma alloca
7021 # else
7022 # ifndef alloca /* predefined by HP cc +Olibcalls */
7023 void *alloca (size_t);
7024 # endif
7025 # endif
7026 # endif
7027 # endif
7028 #endif
7029
7030 int
7031 main ()
7032 {
7033 char *p = (char *) alloca (1);
7034 if (p) return 0;
7035 ;
7036 return 0;
7037 }
7038 _ACEOF
7039 if ac_fn_c_try_link "$LINENO"; then :
7040 ac_cv_func_alloca_works=yes
7041 else
7042 ac_cv_func_alloca_works=no
7043 fi
7044 rm -f core conftest.err conftest.$ac_objext \
7045 conftest$ac_exeext conftest.$ac_ext
7046 fi
7047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7048 $as_echo "$ac_cv_func_alloca_works" >&6; }
7049
7050 if test $ac_cv_func_alloca_works = yes; then
7051
7052 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7053
7054 else
7055 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7056 # that cause trouble. Some versions do not even contain alloca or
7057 # contain a buggy version. If you still want to use their alloca,
7058 # use ar to extract alloca.o from them instead of compiling alloca.c.
7059
7060
7061
7062
7063
7064 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7065
7066 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7067
7068
7069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7070 $as_echo_n "checking stack direction for C alloca... " >&6; }
7071 if ${ac_cv_c_stack_direction+:} false; then :
7072 $as_echo_n "(cached) " >&6
7073 else
7074 if test "$cross_compiling" = yes; then :
7075 ac_cv_c_stack_direction=0
7076 else
7077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7078 /* end confdefs.h. */
7079 $ac_includes_default
7080 int
7081 find_stack_direction (int *addr, int depth)
7082 {
7083 int dir, dummy = 0;
7084 if (! addr)
7085 addr = &dummy;
7086 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7087 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7088 return dir + dummy;
7089 }
7090
7091 int
7092 main (int argc, char **argv)
7093 {
7094 return find_stack_direction (0, argc + !argv + 20) < 0;
7095 }
7096 _ACEOF
7097 if ac_fn_c_try_run "$LINENO"; then :
7098 ac_cv_c_stack_direction=1
7099 else
7100 ac_cv_c_stack_direction=-1
7101 fi
7102 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7103 conftest.$ac_objext conftest.beam conftest.$ac_ext
7104 fi
7105
7106 fi
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7108 $as_echo "$ac_cv_c_stack_direction" >&6; }
7109 cat >>confdefs.h <<_ACEOF
7110 #define STACK_DIRECTION $ac_cv_c_stack_direction
7111 _ACEOF
7112
7113
7114 fi
7115
7116
7117 GNULIB_INET_NTOP=0;
7118 GNULIB_INET_PTON=0;
7119 HAVE_DECL_INET_NTOP=1;
7120 HAVE_DECL_INET_PTON=1;
7121 REPLACE_INET_NTOP=0;
7122 REPLACE_INET_PTON=0;
7123
7124
7125
7126
7127
7128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7129 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7130 if ${gl_cv_have_include_next+:} false; then :
7131 $as_echo_n "(cached) " >&6
7132 else
7133 rm -rf conftestd1a conftestd1b conftestd2
7134 mkdir conftestd1a conftestd1b conftestd2
7135 cat <<EOF > conftestd1a/conftest.h
7136 #define DEFINED_IN_CONFTESTD1
7137 #include_next <conftest.h>
7138 #ifdef DEFINED_IN_CONFTESTD2
7139 int foo;
7140 #else
7141 #error "include_next doesn't work"
7142 #endif
7143 EOF
7144 cat <<EOF > conftestd1b/conftest.h
7145 #define DEFINED_IN_CONFTESTD1
7146 #include <stdio.h>
7147 #include_next <conftest.h>
7148 #ifdef DEFINED_IN_CONFTESTD2
7149 int foo;
7150 #else
7151 #error "include_next doesn't work"
7152 #endif
7153 EOF
7154 cat <<EOF > conftestd2/conftest.h
7155 #ifndef DEFINED_IN_CONFTESTD1
7156 #error "include_next test doesn't work"
7157 #endif
7158 #define DEFINED_IN_CONFTESTD2
7159 EOF
7160 gl_save_CPPFLAGS="$CPPFLAGS"
7161 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7163 /* end confdefs.h. */
7164 #include <conftest.h>
7165 _ACEOF
7166 if ac_fn_c_try_compile "$LINENO"; then :
7167 gl_cv_have_include_next=yes
7168 else
7169 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7171 /* end confdefs.h. */
7172 #include <conftest.h>
7173 _ACEOF
7174 if ac_fn_c_try_compile "$LINENO"; then :
7175 gl_cv_have_include_next=buggy
7176 else
7177 gl_cv_have_include_next=no
7178 fi
7179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7180
7181 fi
7182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7183 CPPFLAGS="$gl_save_CPPFLAGS"
7184 rm -rf conftestd1a conftestd1b conftestd2
7185
7186 fi
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7188 $as_echo "$gl_cv_have_include_next" >&6; }
7189 PRAGMA_SYSTEM_HEADER=
7190 if test $gl_cv_have_include_next = yes; then
7191 INCLUDE_NEXT=include_next
7192 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7193 if test -n "$GCC"; then
7194 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7195 fi
7196 else
7197 if test $gl_cv_have_include_next = buggy; then
7198 INCLUDE_NEXT=include
7199 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7200 else
7201 INCLUDE_NEXT=include
7202 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7203 fi
7204 fi
7205
7206
7207
7208
7209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
7210 $as_echo_n "checking whether source code line length is unlimited... " >&6; }
7211 if ${gl_cv_source_line_length_unlimited+:} false; then :
7212 $as_echo_n "(cached) " >&6
7213 else
7214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7215 /* end confdefs.h. */
7216
7217 #ifdef __TANDEM
7218 choke me
7219 #endif
7220
7221 _ACEOF
7222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7223 $EGREP "choke me" >/dev/null 2>&1; then :
7224 gl_cv_source_line_length_unlimited=no
7225 else
7226 gl_cv_source_line_length_unlimited=yes
7227 fi
7228 rm -f conftest*
7229
7230
7231 fi
7232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
7233 $as_echo "$gl_cv_source_line_length_unlimited" >&6; }
7234 if test $gl_cv_source_line_length_unlimited = no; then
7235 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7236 else
7237 PRAGMA_COLUMNS=
7238 fi
7239
7240
7241
7242
7243
7244
7245 if test $ac_cv_header_features_h = yes; then
7246 HAVE_FEATURES_H=1
7247 else
7248 HAVE_FEATURES_H=0
7249 fi
7250
7251
7252
7253
7254
7255 if test $ac_cv_header_sys_socket_h = no; then
7256 for ac_header in ws2tcpip.h
7257 do :
7258 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
7259 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
7260 cat >>confdefs.h <<_ACEOF
7261 #define HAVE_WS2TCPIP_H 1
7262 _ACEOF
7263
7264 fi
7265
7266 done
7267
7268 fi
7269
7270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7271 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7272 if test -z "$MKDIR_P"; then
7273 if ${ac_cv_path_mkdir+:} false; then :
7274 $as_echo_n "(cached) " >&6
7275 else
7276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7277 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7278 do
7279 IFS=$as_save_IFS
7280 test -z "$as_dir" && as_dir=.
7281 for ac_prog in mkdir gmkdir; do
7282 for ac_exec_ext in '' $ac_executable_extensions; do
7283 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7284 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7285 'mkdir (GNU coreutils) '* | \
7286 'mkdir (coreutils) '* | \
7287 'mkdir (fileutils) '4.1*)
7288 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7289 break 3;;
7290 esac
7291 done
7292 done
7293 done
7294 IFS=$as_save_IFS
7295
7296 fi
7297
7298 test -d ./--version && rmdir ./--version
7299 if test "${ac_cv_path_mkdir+set}" = set; then
7300 MKDIR_P="$ac_cv_path_mkdir -p"
7301 else
7302 # As a last resort, use the slow shell script. Don't cache a
7303 # value for MKDIR_P within a source directory, because that will
7304 # break other packages using the cache if that directory is
7305 # removed, or if the value is a relative name.
7306 MKDIR_P="$ac_install_sh -d"
7307 fi
7308 fi
7309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7310 $as_echo "$MKDIR_P" >&6; }
7311
7312
7313 GNULIB_BTOWC=0;
7314 GNULIB_WCTOB=0;
7315 GNULIB_MBSINIT=0;
7316 GNULIB_MBRTOWC=0;
7317 GNULIB_MBRLEN=0;
7318 GNULIB_MBSRTOWCS=0;
7319 GNULIB_MBSNRTOWCS=0;
7320 GNULIB_WCRTOMB=0;
7321 GNULIB_WCSRTOMBS=0;
7322 GNULIB_WCSNRTOMBS=0;
7323 GNULIB_WCWIDTH=0;
7324 GNULIB_WMEMCHR=0;
7325 GNULIB_WMEMCMP=0;
7326 GNULIB_WMEMCPY=0;
7327 GNULIB_WMEMMOVE=0;
7328 GNULIB_WMEMPCPY=0;
7329 GNULIB_WMEMSET=0;
7330 GNULIB_WCSLEN=0;
7331 GNULIB_WCSNLEN=0;
7332 GNULIB_WCSCPY=0;
7333 GNULIB_WCPCPY=0;
7334 GNULIB_WCSNCPY=0;
7335 GNULIB_WCPNCPY=0;
7336 GNULIB_WCSCAT=0;
7337 GNULIB_WCSNCAT=0;
7338 GNULIB_WCSCMP=0;
7339 GNULIB_WCSNCMP=0;
7340 GNULIB_WCSCASECMP=0;
7341 GNULIB_WCSNCASECMP=0;
7342 GNULIB_WCSCOLL=0;
7343 GNULIB_WCSXFRM=0;
7344 GNULIB_WCSDUP=0;
7345 GNULIB_WCSCHR=0;
7346 GNULIB_WCSRCHR=0;
7347 GNULIB_WCSCSPN=0;
7348 GNULIB_WCSSPN=0;
7349 GNULIB_WCSPBRK=0;
7350 GNULIB_WCSSTR=0;
7351 GNULIB_WCSTOK=0;
7352 GNULIB_WCSWIDTH=0;
7353 GNULIB_WCSFTIME=0;
7354 GNULIB_MDA_WCSDUP=1;
7355 HAVE_BTOWC=1;
7356 HAVE_MBSINIT=1;
7357 HAVE_MBRTOWC=1;
7358 HAVE_MBRLEN=1;
7359 HAVE_MBSRTOWCS=1;
7360 HAVE_MBSNRTOWCS=1;
7361 HAVE_WCRTOMB=1;
7362 HAVE_WCSRTOMBS=1;
7363 HAVE_WCSNRTOMBS=1;
7364 HAVE_WMEMCHR=1;
7365 HAVE_WMEMCMP=1;
7366 HAVE_WMEMCPY=1;
7367 HAVE_WMEMMOVE=1;
7368 HAVE_WMEMPCPY=1;
7369 HAVE_WMEMSET=1;
7370 HAVE_WCSLEN=1;
7371 HAVE_WCSNLEN=1;
7372 HAVE_WCSCPY=1;
7373 HAVE_WCPCPY=1;
7374 HAVE_WCSNCPY=1;
7375 HAVE_WCPNCPY=1;
7376 HAVE_WCSCAT=1;
7377 HAVE_WCSNCAT=1;
7378 HAVE_WCSCMP=1;
7379 HAVE_WCSNCMP=1;
7380 HAVE_WCSCASECMP=1;
7381 HAVE_WCSNCASECMP=1;
7382 HAVE_WCSCOLL=1;
7383 HAVE_WCSXFRM=1;
7384 HAVE_WCSDUP=1;
7385 HAVE_WCSCHR=1;
7386 HAVE_WCSRCHR=1;
7387 HAVE_WCSCSPN=1;
7388 HAVE_WCSSPN=1;
7389 HAVE_WCSPBRK=1;
7390 HAVE_WCSSTR=1;
7391 HAVE_WCSTOK=1;
7392 HAVE_WCSWIDTH=1;
7393 HAVE_WCSFTIME=1;
7394 HAVE_DECL_WCTOB=1;
7395 HAVE_DECL_WCSDUP=1;
7396 HAVE_DECL_WCWIDTH=1;
7397 REPLACE_MBSTATE_T=0;
7398 REPLACE_BTOWC=0;
7399 REPLACE_WCTOB=0;
7400 REPLACE_MBSINIT=0;
7401 REPLACE_MBRTOWC=0;
7402 REPLACE_MBRLEN=0;
7403 REPLACE_MBSRTOWCS=0;
7404 REPLACE_MBSNRTOWCS=0;
7405 REPLACE_WCRTOMB=0;
7406 REPLACE_WCSRTOMBS=0;
7407 REPLACE_WCSNRTOMBS=0;
7408 REPLACE_WCWIDTH=0;
7409 REPLACE_WCSWIDTH=0;
7410 REPLACE_WCSFTIME=0;
7411 REPLACE_WCSTOK=0;
7412
7413
7414
7415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
7416 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
7417 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
7418 $as_echo_n "(cached) " >&6
7419 else
7420 gl_cv_header_wchar_h_correct_inline=yes
7421 case "$host_os" in
7422 *-gnu* | gnu*)
7423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7424 /* end confdefs.h. */
7425
7426
7427 #define wcstod renamed_wcstod
7428 #include <wchar.h>
7429 extern int zero (void);
7430 int main () { return zero(); }
7431
7432 _ACEOF
7433 save_ac_compile="$ac_compile"
7434 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
7435 if echo '#include "conftest.c"' >conftest1.c \
7436 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7437 (eval $ac_compile) 2>&5
7438 ac_status=$?
7439 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7440 test $ac_status = 0; }; then
7441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7442 /* end confdefs.h. */
7443
7444
7445 #define wcstod renamed_wcstod
7446 #include <wchar.h>
7447 int zero (void) { return 0; }
7448
7449 _ACEOF
7450 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
7451 if echo '#include "conftest.c"' >conftest2.c \
7452 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7453 (eval $ac_compile) 2>&5
7454 ac_status=$?
7455 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7456 test $ac_status = 0; }; then
7457 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
7458 :
7459 else
7460 gl_cv_header_wchar_h_correct_inline=no
7461 fi
7462 fi
7463 fi
7464 ac_compile="$save_ac_compile"
7465 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
7466 ;;
7467 esac
7468
7469 fi
7470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
7471 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
7472 if test $gl_cv_header_wchar_h_correct_inline = no; then
7473 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
7474 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
7475 C99 mode. You have four options:
7476 - Add the flag -fgnu89-inline to CC and reconfigure, or
7477 - Fix your include files, using parts of
7478 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
7479 - Use a gcc version older than 4.3, or
7480 - Don't use the flags -std=c99 or -std=gnu99.
7481 Configuration aborted." "$LINENO" 5
7482 fi
7483
7484
7485
7486
7487 for ac_func in $ac_func_list
7488 do :
7489 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7490 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7491 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7492 cat >>confdefs.h <<_ACEOF
7493 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7494 _ACEOF
7495
7496 fi
7497 done
7498
7499
7500
7501
7502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
7503 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
7504 if ${am_cv_langinfo_codeset+:} false; then :
7505 $as_echo_n "(cached) " >&6
7506 else
7507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7508 /* end confdefs.h. */
7509 #include <langinfo.h>
7510 int
7511 main ()
7512 {
7513 char* cs = nl_langinfo(CODESET); return !cs;
7514 ;
7515 return 0;
7516 }
7517 _ACEOF
7518 if ac_fn_c_try_link "$LINENO"; then :
7519 am_cv_langinfo_codeset=yes
7520 else
7521 am_cv_langinfo_codeset=no
7522 fi
7523 rm -f core conftest.err conftest.$ac_objext \
7524 conftest$ac_exeext conftest.$ac_ext
7525
7526 fi
7527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
7528 $as_echo "$am_cv_langinfo_codeset" >&6; }
7529 if test $am_cv_langinfo_codeset = yes; then
7530
7531 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
7532
7533 fi
7534
7535
7536
7537
7538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
7539 $as_echo_n "checking for a traditional french locale... " >&6; }
7540 if ${gt_cv_locale_fr+:} false; then :
7541 $as_echo_n "(cached) " >&6
7542 else
7543
7544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7545 /* end confdefs.h. */
7546
7547 #include <locale.h>
7548 #include <time.h>
7549 #if HAVE_LANGINFO_CODESET
7550 # include <langinfo.h>
7551 #endif
7552 #include <stdlib.h>
7553 #include <string.h>
7554 struct tm t;
7555 char buf[16];
7556 int main () {
7557 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
7558 imitates locale dependent behaviour by looking at the environment
7559 variables, and all locales use the UTF-8 encoding. */
7560 #if defined __BEOS__ || defined __HAIKU__
7561 return 1;
7562 #else
7563 /* Check whether the given locale name is recognized by the system. */
7564 # if defined _WIN32 && !defined __CYGWIN__
7565 /* On native Windows, setlocale(category, "") looks at the system settings,
7566 not at the environment variables. Also, when an encoding suffix such
7567 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
7568 category of the locale to "C". */
7569 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
7570 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
7571 return 1;
7572 # else
7573 if (setlocale (LC_ALL, "") == NULL) return 1;
7574 # endif
7575 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
7576 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
7577 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
7578 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
7579 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
7580 some unit tests fail.
7581 On MirBSD 10, when an unsupported locale is specified, setlocale()
7582 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
7583 # if HAVE_LANGINFO_CODESET
7584 {
7585 const char *cs = nl_langinfo (CODESET);
7586 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
7587 || strcmp (cs, "UTF-8") == 0)
7588 return 1;
7589 }
7590 # endif
7591 # ifdef __CYGWIN__
7592 /* On Cygwin, avoid locale names without encoding suffix, because the
7593 locale_charset() function relies on the encoding suffix. Note that
7594 LC_ALL is set on the command line. */
7595 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
7596 # endif
7597 /* Check whether in the abbreviation of the second month, the second
7598 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
7599 one byte long. This excludes the UTF-8 encoding. */
7600 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
7601 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
7602 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
7603 /* Check whether the decimal separator is a comma.
7604 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
7605 are nl_langinfo(RADIXCHAR) are both ".". */
7606 if (localeconv () ->decimal_point[0] != ',') return 1;
7607 # endif
7608 return 0;
7609 #endif
7610 }
7611
7612 _ACEOF
7613 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7614 (eval $ac_link) 2>&5
7615 ac_status=$?
7616 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7617 test $ac_status = 0; } && test -s conftest$ac_exeext; then
7618 case "$host_os" in
7619 # Handle native Windows specially, because there setlocale() interprets
7620 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
7621 # "fr" or "fra" as "French" or "French_France.1252",
7622 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
7623 # "ja" as "Japanese" or "Japanese_Japan.932",
7624 # and similar.
7625 mingw*)
7626 # Test for the native Windows locale name.
7627 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7628 gt_cv_locale_fr=French_France.1252
7629 else
7630 # None found.
7631 gt_cv_locale_fr=none
7632 fi
7633 ;;
7634 *)
7635 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
7636 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
7637 # configure script would override the LC_ALL setting. Likewise for
7638 # LC_CTYPE, which is also set at the beginning of the configure script.
7639 # Test for the usual locale name.
7640 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7641 gt_cv_locale_fr=fr_FR
7642 else
7643 # Test for the locale name with explicit encoding suffix.
7644 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7645 gt_cv_locale_fr=fr_FR.ISO-8859-1
7646 else
7647 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
7648 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7649 gt_cv_locale_fr=fr_FR.ISO8859-1
7650 else
7651 # Test for the HP-UX locale name.
7652 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7653 gt_cv_locale_fr=fr_FR.iso88591
7654 else
7655 # Test for the Solaris 7 locale name.
7656 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7657 gt_cv_locale_fr=fr
7658 else
7659 # None found.
7660 gt_cv_locale_fr=none
7661 fi
7662 fi
7663 fi
7664 fi
7665 fi
7666 ;;
7667 esac
7668 fi
7669 rm -fr conftest*
7670
7671 fi
7672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
7673 $as_echo "$gt_cv_locale_fr" >&6; }
7674 LOCALE_FR=$gt_cv_locale_fr
7675
7676
7677
7678 GNULIB__EXIT=0;
7679 GNULIB_ALIGNED_ALLOC=0;
7680 GNULIB_ATOLL=0;
7681 GNULIB_CALLOC_POSIX=0;
7682 GNULIB_CANONICALIZE_FILE_NAME=0;
7683 GNULIB_FREE_POSIX=0;
7684 GNULIB_GETLOADAVG=0;
7685 GNULIB_GETSUBOPT=0;
7686 GNULIB_GRANTPT=0;
7687 GNULIB_MALLOC_POSIX=0;
7688 GNULIB_MBTOWC=0;
7689 GNULIB_MKDTEMP=0;
7690 GNULIB_MKOSTEMP=0;
7691 GNULIB_MKOSTEMPS=0;
7692 GNULIB_MKSTEMP=0;
7693 GNULIB_MKSTEMPS=0;
7694 GNULIB_POSIX_MEMALIGN=0;
7695 GNULIB_POSIX_OPENPT=0;
7696 GNULIB_PTSNAME=0;
7697 GNULIB_PTSNAME_R=0;
7698 GNULIB_PUTENV=0;
7699 GNULIB_QSORT_R=0;
7700 GNULIB_RANDOM=0;
7701 GNULIB_RANDOM_R=0;
7702 GNULIB_REALLOCARRAY=0;
7703 GNULIB_REALLOC_POSIX=0;
7704 GNULIB_REALPATH=0;
7705 GNULIB_RPMATCH=0;
7706 GNULIB_SECURE_GETENV=0;
7707 GNULIB_SETENV=0;
7708 GNULIB_STRTOD=0;
7709 GNULIB_STRTOLD=0;
7710 GNULIB_STRTOLL=0;
7711 GNULIB_STRTOULL=0;
7712 GNULIB_SYSTEM_POSIX=0;
7713 GNULIB_UNLOCKPT=0;
7714 GNULIB_UNSETENV=0;
7715 GNULIB_WCTOMB=0;
7716 GNULIB_MDA_ECVT=1;
7717 GNULIB_MDA_FCVT=1;
7718 GNULIB_MDA_GCVT=1;
7719 GNULIB_MDA_MKTEMP=1;
7720 GNULIB_MDA_PUTENV=1;
7721 HAVE__EXIT=1;
7722 HAVE_ALIGNED_ALLOC=1;
7723 HAVE_ATOLL=1;
7724 HAVE_CANONICALIZE_FILE_NAME=1;
7725 HAVE_DECL_ECVT=1;
7726 HAVE_DECL_FCVT=1;
7727 HAVE_DECL_GCVT=1;
7728 HAVE_DECL_GETLOADAVG=1;
7729 HAVE_GETSUBOPT=1;
7730 HAVE_GRANTPT=1;
7731 HAVE_INITSTATE=1;
7732 HAVE_DECL_INITSTATE=1;
7733 HAVE_MBTOWC=1;
7734 HAVE_MKDTEMP=1;
7735 HAVE_MKOSTEMP=1;
7736 HAVE_MKOSTEMPS=1;
7737 HAVE_MKSTEMP=1;
7738 HAVE_MKSTEMPS=1;
7739 HAVE_POSIX_MEMALIGN=1;
7740 HAVE_POSIX_OPENPT=1;
7741 HAVE_PTSNAME=1;
7742 HAVE_PTSNAME_R=1;
7743 HAVE_QSORT_R=1;
7744 HAVE_RANDOM=1;
7745 HAVE_RANDOM_H=1;
7746 HAVE_RANDOM_R=1;
7747 HAVE_REALLOCARRAY=1;
7748 HAVE_REALPATH=1;
7749 HAVE_RPMATCH=1;
7750 HAVE_SECURE_GETENV=1;
7751 HAVE_SETENV=1;
7752 HAVE_DECL_SETENV=1;
7753 HAVE_SETSTATE=1;
7754 HAVE_DECL_SETSTATE=1;
7755 HAVE_STRTOD=1;
7756 HAVE_STRTOLD=1;
7757 HAVE_STRTOLL=1;
7758 HAVE_STRTOULL=1;
7759 HAVE_STRUCT_RANDOM_DATA=1;
7760 HAVE_SYS_LOADAVG_H=0;
7761 HAVE_UNLOCKPT=1;
7762 HAVE_DECL_UNSETENV=1;
7763 REPLACE_ALIGNED_ALLOC=0;
7764 REPLACE_CALLOC=0;
7765 REPLACE_CANONICALIZE_FILE_NAME=0;
7766 REPLACE_FREE=0;
7767 REPLACE_INITSTATE=0;
7768 REPLACE_MALLOC=0;
7769 REPLACE_MBTOWC=0;
7770 REPLACE_MKSTEMP=0;
7771 REPLACE_POSIX_MEMALIGN=0;
7772 REPLACE_PTSNAME=0;
7773 REPLACE_PTSNAME_R=0;
7774 REPLACE_PUTENV=0;
7775 REPLACE_QSORT_R=0;
7776 REPLACE_RANDOM=0;
7777 REPLACE_RANDOM_R=0;
7778 REPLACE_REALLOC=0;
7779 REPLACE_REALPATH=0;
7780 REPLACE_SETENV=0;
7781 REPLACE_SETSTATE=0;
7782 REPLACE_STRTOD=0;
7783 REPLACE_STRTOLD=0;
7784 REPLACE_UNSETENV=0;
7785 REPLACE_WCTOMB=0;
7786
7787
7788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
7789 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
7790 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
7791 $as_echo_n "(cached) " >&6
7792 else
7793 rm -f conftest.sym conftest.file
7794 echo >conftest.file
7795 if test "$cross_compiling" = yes; then :
7796 case "$host_os" in
7797 linux-* | linux)
7798 # Guess yes on Linux systems.
7799 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
7800 *-gnu* | gnu*)
7801 # Guess yes on glibc systems.
7802 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
7803 mingw*)
7804 # Guess no on native Windows.
7805 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
7806 *)
7807 # If we don't know, obey --enable-cross-guesses.
7808 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
7809 esac
7810
7811 else
7812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7813 /* end confdefs.h. */
7814 $ac_includes_default
7815 int
7816 main ()
7817 {
7818 struct stat sbuf;
7819 if (symlink ("conftest.file", "conftest.sym") != 0)
7820 return 1;
7821 /* Linux will dereference the symlink and fail, as required by
7822 POSIX. That is better in the sense that it means we will not
7823 have to compile and use the lstat wrapper. */
7824 return lstat ("conftest.sym/", &sbuf) == 0;
7825
7826 ;
7827 return 0;
7828 }
7829 _ACEOF
7830 if ac_fn_c_try_run "$LINENO"; then :
7831 gl_cv_func_lstat_dereferences_slashed_symlink=yes
7832 else
7833 gl_cv_func_lstat_dereferences_slashed_symlink=no
7834 fi
7835 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7836 conftest.$ac_objext conftest.beam conftest.$ac_ext
7837 fi
7838
7839 rm -f conftest.sym conftest.file
7840
7841 fi
7842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
7843 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
7844 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
7845 *yes)
7846
7847 cat >>confdefs.h <<_ACEOF
7848 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
7849 _ACEOF
7850
7851 ;;
7852 esac
7853
7854
7855
7856
7857
7858
7859
7860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7861 $as_echo_n "checking whether // is distinct from /... " >&6; }
7862 if ${gl_cv_double_slash_root+:} false; then :
7863 $as_echo_n "(cached) " >&6
7864 else
7865 if test x"$cross_compiling" = xyes ; then
7866 # When cross-compiling, there is no way to tell whether // is special
7867 # short of a list of hosts. However, the only known hosts to date
7868 # that have a distinct // are Apollo DomainOS (too old to port to),
7869 # Cygwin, and z/OS. If anyone knows of another system for which // has
7870 # special semantics and is distinct from /, please report it to
7871 # <bug-gnulib@gnu.org>.
7872 case $host in
7873 *-cygwin | i370-ibm-openedition)
7874 gl_cv_double_slash_root=yes ;;
7875 *)
7876 # Be optimistic and assume that / and // are the same when we
7877 # don't know.
7878 gl_cv_double_slash_root='unknown, assuming no' ;;
7879 esac
7880 else
7881 set x `ls -di / // 2>/dev/null`
7882 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
7883 gl_cv_double_slash_root=no
7884 else
7885 gl_cv_double_slash_root=yes
7886 fi
7887 fi
7888 fi
7889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7890 $as_echo "$gl_cv_double_slash_root" >&6; }
7891 if test "$gl_cv_double_slash_root" = yes; then
7892
7893 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7894
7895 fi
7896
7897
7898
7899
7900
7901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
7902 $as_echo_n "checking whether realpath works... " >&6; }
7903 if ${gl_cv_func_realpath_works+:} false; then :
7904 $as_echo_n "(cached) " >&6
7905 else
7906
7907 rm -rf conftest.a conftest.d
7908 touch conftest.a
7909 mkdir conftest.d
7910 if test "$cross_compiling" = yes; then :
7911 case "$host_os" in
7912 # Guess yes on glibc systems.
7913 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
7914 # Guess yes on musl systems.
7915 *-musl*) gl_cv_func_realpath_works="guessing yes" ;;
7916 # Guess no on native Windows.
7917 mingw*) gl_cv_func_realpath_works="guessing no" ;;
7918 # If we don't know, obey --enable-cross-guesses.
7919 *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
7920 esac
7921
7922 else
7923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7924 /* end confdefs.h. */
7925
7926
7927
7928 #include <stdlib.h>
7929 #if defined __MACH__ && defined __APPLE__
7930 /* Avoid a crash on Mac OS X. */
7931 #include <mach/mach.h>
7932 #include <mach/mach_error.h>
7933 #include <mach/thread_status.h>
7934 #include <mach/exception.h>
7935 #include <mach/task.h>
7936 #include <pthread.h>
7937 /* The exception port on which our thread listens. */
7938 static mach_port_t our_exception_port;
7939 /* The main function of the thread listening for exceptions of type
7940 EXC_BAD_ACCESS. */
7941 static void *
7942 mach_exception_thread (void *arg)
7943 {
7944 /* Buffer for a message to be received. */
7945 struct {
7946 mach_msg_header_t head;
7947 mach_msg_body_t msgh_body;
7948 char data[1024];
7949 } msg;
7950 mach_msg_return_t retval;
7951 /* Wait for a message on the exception port. */
7952 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
7953 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
7954 if (retval != MACH_MSG_SUCCESS)
7955 abort ();
7956 exit (1);
7957 }
7958 static void
7959 nocrash_init (void)
7960 {
7961 mach_port_t self = mach_task_self ();
7962 /* Allocate a port on which the thread shall listen for exceptions. */
7963 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
7964 == KERN_SUCCESS) {
7965 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
7966 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
7967 MACH_MSG_TYPE_MAKE_SEND)
7968 == KERN_SUCCESS) {
7969 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
7970 for us. */
7971 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
7972 /* Create the thread listening on the exception port. */
7973 pthread_attr_t attr;
7974 pthread_t thread;
7975 if (pthread_attr_init (&attr) == 0
7976 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
7977 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
7978 pthread_attr_destroy (&attr);
7979 /* Replace the exception port info for these exceptions with our own.
7980 Note that we replace the exception port for the entire task, not only
7981 for a particular thread. This has the effect that when our exception
7982 port gets the message, the thread specific exception port has already
7983 been asked, and we don't need to bother about it.
7984 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
7985 task_set_exception_ports (self, mask, our_exception_port,
7986 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
7987 }
7988 }
7989 }
7990 }
7991 #elif defined _WIN32 && ! defined __CYGWIN__
7992 /* Avoid a crash on native Windows. */
7993 #define WIN32_LEAN_AND_MEAN
7994 #include <windows.h>
7995 #include <winerror.h>
7996 static LONG WINAPI
7997 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
7998 {
7999 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
8000 {
8001 case EXCEPTION_ACCESS_VIOLATION:
8002 case EXCEPTION_IN_PAGE_ERROR:
8003 case EXCEPTION_STACK_OVERFLOW:
8004 case EXCEPTION_GUARD_PAGE:
8005 case EXCEPTION_PRIV_INSTRUCTION:
8006 case EXCEPTION_ILLEGAL_INSTRUCTION:
8007 case EXCEPTION_DATATYPE_MISALIGNMENT:
8008 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
8009 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
8010 exit (1);
8011 }
8012 return EXCEPTION_CONTINUE_SEARCH;
8013 }
8014 static void
8015 nocrash_init (void)
8016 {
8017 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
8018 }
8019 #else
8020 /* Avoid a crash on POSIX systems. */
8021 #include <signal.h>
8022 #include <unistd.h>
8023 /* A POSIX signal handler. */
8024 static void
8025 exception_handler (int sig)
8026 {
8027 _exit (1);
8028 }
8029 static void
8030 nocrash_init (void)
8031 {
8032 #ifdef SIGSEGV
8033 signal (SIGSEGV, exception_handler);
8034 #endif
8035 #ifdef SIGBUS
8036 signal (SIGBUS, exception_handler);
8037 #endif
8038 }
8039 #endif
8040
8041 #include <stdlib.h>
8042 #include <string.h>
8043
8044 int
8045 main ()
8046 {
8047
8048 int result = 0;
8049 {
8050 char *name = realpath ("conftest.a", NULL);
8051 if (!(name && *name == '/'))
8052 result |= 1;
8053 free (name);
8054 }
8055 {
8056 char *name = realpath ("conftest.b/../conftest.a", NULL);
8057 if (name != NULL)
8058 result |= 2;
8059 free (name);
8060 }
8061 {
8062 char *name = realpath ("conftest.a/", NULL);
8063 if (name != NULL)
8064 result |= 4;
8065 free (name);
8066 }
8067 {
8068 char *name1 = realpath (".", NULL);
8069 char *name2 = realpath ("conftest.d//./..", NULL);
8070 if (! name1 || ! name2 || strcmp (name1, name2))
8071 result |= 8;
8072 free (name1);
8073 free (name2);
8074 }
8075 return result;
8076
8077 ;
8078 return 0;
8079 }
8080
8081 _ACEOF
8082 if ac_fn_c_try_run "$LINENO"; then :
8083 gl_cv_func_realpath_works=yes
8084 else
8085 gl_cv_func_realpath_works=no
8086 fi
8087 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8088 conftest.$ac_objext conftest.beam conftest.$ac_ext
8089 fi
8090
8091 rm -rf conftest.a conftest.d
8092
8093 fi
8094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
8095 $as_echo "$gl_cv_func_realpath_works" >&6; }
8096 case "$gl_cv_func_realpath_works" in
8097 *yes)
8098
8099 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
8100
8101 ;;
8102 esac
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112 case "$host_os" in
8113 mingw*) ;;
8114 *) for ac_func in getcwd
8115 do :
8116 ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
8117 if test "x$ac_cv_func_getcwd" = xyes; then :
8118 cat >>confdefs.h <<_ACEOF
8119 #define HAVE_GETCWD 1
8120 _ACEOF
8121
8122 fi
8123 done
8124 ;;
8125 esac
8126
8127
8128
8129
8130
8131
8132 GNULIB_ACCESS=0;
8133 GNULIB_CHDIR=0;
8134 GNULIB_CHOWN=0;
8135 GNULIB_CLOSE=0;
8136 GNULIB_COPY_FILE_RANGE=0;
8137 GNULIB_DUP=0;
8138 GNULIB_DUP2=0;
8139 GNULIB_DUP3=0;
8140 GNULIB_ENVIRON=0;
8141 GNULIB_EUIDACCESS=0;
8142 GNULIB_EXECL=0;
8143 GNULIB_EXECLE=0;
8144 GNULIB_EXECLP=0;
8145 GNULIB_EXECV=0;
8146 GNULIB_EXECVE=0;
8147 GNULIB_EXECVP=0;
8148 GNULIB_EXECVPE=0;
8149 GNULIB_FACCESSAT=0;
8150 GNULIB_FCHDIR=0;
8151 GNULIB_FCHOWNAT=0;
8152 GNULIB_FDATASYNC=0;
8153 GNULIB_FSYNC=0;
8154 GNULIB_FTRUNCATE=0;
8155 GNULIB_GETCWD=0;
8156 GNULIB_GETDOMAINNAME=0;
8157 GNULIB_GETDTABLESIZE=0;
8158 GNULIB_GETENTROPY=0;
8159 GNULIB_GETGROUPS=0;
8160 GNULIB_GETHOSTNAME=0;
8161 GNULIB_GETLOGIN=0;
8162 GNULIB_GETLOGIN_R=0;
8163 GNULIB_GETOPT_POSIX=0;
8164 GNULIB_GETPAGESIZE=0;
8165 GNULIB_GETPASS=0;
8166 GNULIB_GETUSERSHELL=0;
8167 GNULIB_GROUP_MEMBER=0;
8168 GNULIB_ISATTY=0;
8169 GNULIB_LCHOWN=0;
8170 GNULIB_LINK=0;
8171 GNULIB_LINKAT=0;
8172 GNULIB_LSEEK=0;
8173 GNULIB_PIPE=0;
8174 GNULIB_PIPE2=0;
8175 GNULIB_PREAD=0;
8176 GNULIB_PWRITE=0;
8177 GNULIB_READ=0;
8178 GNULIB_READLINK=0;
8179 GNULIB_READLINKAT=0;
8180 GNULIB_RMDIR=0;
8181 GNULIB_SETHOSTNAME=0;
8182 GNULIB_SLEEP=0;
8183 GNULIB_SYMLINK=0;
8184 GNULIB_SYMLINKAT=0;
8185 GNULIB_TRUNCATE=0;
8186 GNULIB_TTYNAME_R=0;
8187 GNULIB_UNISTD_H_NONBLOCKING=0;
8188 GNULIB_UNISTD_H_SIGPIPE=0;
8189 GNULIB_UNLINK=0;
8190 GNULIB_UNLINKAT=0;
8191 GNULIB_USLEEP=0;
8192 GNULIB_WRITE=0;
8193 GNULIB_MDA_ACCESS=1;
8194 GNULIB_MDA_CHDIR=1;
8195 GNULIB_MDA_CLOSE=1;
8196 GNULIB_MDA_DUP=1;
8197 GNULIB_MDA_DUP2=1;
8198 GNULIB_MDA_EXECL=1;
8199 GNULIB_MDA_EXECLE=1;
8200 GNULIB_MDA_EXECLP=1;
8201 GNULIB_MDA_EXECV=1;
8202 GNULIB_MDA_EXECVE=1;
8203 GNULIB_MDA_EXECVP=1;
8204 GNULIB_MDA_EXECVPE=1;
8205 GNULIB_MDA_GETCWD=1;
8206 GNULIB_MDA_GETPID=1;
8207 GNULIB_MDA_ISATTY=1;
8208 GNULIB_MDA_LSEEK=1;
8209 GNULIB_MDA_READ=1;
8210 GNULIB_MDA_RMDIR=1;
8211 GNULIB_MDA_SWAB=1;
8212 GNULIB_MDA_UNLINK=1;
8213 GNULIB_MDA_WRITE=1;
8214 HAVE_CHOWN=1;
8215 HAVE_COPY_FILE_RANGE=1;
8216 HAVE_DUP3=1;
8217 HAVE_EUIDACCESS=1;
8218 HAVE_EXECVPE=1;
8219 HAVE_FACCESSAT=1;
8220 HAVE_FCHDIR=1;
8221 HAVE_FCHOWNAT=1;
8222 HAVE_FDATASYNC=1;
8223 HAVE_FSYNC=1;
8224 HAVE_FTRUNCATE=1;
8225 HAVE_GETDTABLESIZE=1;
8226 HAVE_GETENTROPY=1;
8227 HAVE_GETGROUPS=1;
8228 HAVE_GETHOSTNAME=1;
8229 HAVE_GETLOGIN=1;
8230 HAVE_GETPAGESIZE=1;
8231 HAVE_GETPASS=1;
8232 HAVE_GROUP_MEMBER=1;
8233 HAVE_LCHOWN=1;
8234 HAVE_LINK=1;
8235 HAVE_LINKAT=1;
8236 HAVE_PIPE=1;
8237 HAVE_PIPE2=1;
8238 HAVE_PREAD=1;
8239 HAVE_PWRITE=1;
8240 HAVE_READLINK=1;
8241 HAVE_READLINKAT=1;
8242 HAVE_SETHOSTNAME=1;
8243 HAVE_SLEEP=1;
8244 HAVE_SYMLINK=1;
8245 HAVE_SYMLINKAT=1;
8246 HAVE_UNLINKAT=1;
8247 HAVE_USLEEP=1;
8248 HAVE_DECL_ENVIRON=1;
8249 HAVE_DECL_EXECVPE=1;
8250 HAVE_DECL_FCHDIR=1;
8251 HAVE_DECL_FDATASYNC=1;
8252 HAVE_DECL_GETDOMAINNAME=1;
8253 HAVE_DECL_GETLOGIN=1;
8254 HAVE_DECL_GETLOGIN_R=1;
8255 HAVE_DECL_GETPAGESIZE=1;
8256 HAVE_DECL_GETUSERSHELL=1;
8257 HAVE_DECL_SETHOSTNAME=1;
8258 HAVE_DECL_TRUNCATE=1;
8259 HAVE_DECL_TTYNAME_R=1;
8260 HAVE_OS_H=0;
8261 HAVE_SYS_PARAM_H=0;
8262 REPLACE_ACCESS=0;
8263 REPLACE_CHOWN=0;
8264 REPLACE_CLOSE=0;
8265 REPLACE_DUP=0;
8266 REPLACE_DUP2=0;
8267 REPLACE_EXECL=0;
8268 REPLACE_EXECLE=0;
8269 REPLACE_EXECLP=0;
8270 REPLACE_EXECV=0;
8271 REPLACE_EXECVE=0;
8272 REPLACE_EXECVP=0;
8273 REPLACE_EXECVPE=0;
8274 REPLACE_FACCESSAT=0;
8275 REPLACE_FCHOWNAT=0;
8276 REPLACE_FTRUNCATE=0;
8277 REPLACE_GETCWD=0;
8278 REPLACE_GETDOMAINNAME=0;
8279 REPLACE_GETDTABLESIZE=0;
8280 REPLACE_GETLOGIN_R=0;
8281 REPLACE_GETGROUPS=0;
8282 REPLACE_GETPAGESIZE=0;
8283 REPLACE_GETPASS=0;
8284 REPLACE_ISATTY=0;
8285 REPLACE_LCHOWN=0;
8286 REPLACE_LINK=0;
8287 REPLACE_LINKAT=0;
8288 REPLACE_LSEEK=0;
8289 REPLACE_PREAD=0;
8290 REPLACE_PWRITE=0;
8291 REPLACE_READ=0;
8292 REPLACE_READLINK=0;
8293 REPLACE_READLINKAT=0;
8294 REPLACE_RMDIR=0;
8295 REPLACE_SLEEP=0;
8296 REPLACE_SYMLINK=0;
8297 REPLACE_SYMLINKAT=0;
8298 REPLACE_TRUNCATE=0;
8299 REPLACE_TTYNAME_R=0;
8300 REPLACE_UNLINK=0;
8301 REPLACE_UNLINKAT=0;
8302 REPLACE_USLEEP=0;
8303 REPLACE_WRITE=0;
8304 UNISTD_H_HAVE_SYS_RANDOM_H=0;
8305 UNISTD_H_HAVE_WINSOCK2_H=0;
8306 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
8307
8308
8309
8310
8311
8312
8313
8314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8315 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
8316 if ${ac_cv_type_uid_t+:} false; then :
8317 $as_echo_n "(cached) " >&6
8318 else
8319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8320 /* end confdefs.h. */
8321 #include <sys/types.h>
8322
8323 _ACEOF
8324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8325 $EGREP "uid_t" >/dev/null 2>&1; then :
8326 ac_cv_type_uid_t=yes
8327 else
8328 ac_cv_type_uid_t=no
8329 fi
8330 rm -f conftest*
8331
8332 fi
8333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8334 $as_echo "$ac_cv_type_uid_t" >&6; }
8335 if test $ac_cv_type_uid_t = no; then
8336
8337 $as_echo "#define uid_t int" >>confdefs.h
8338
8339
8340 $as_echo "#define gid_t int" >>confdefs.h
8341
8342 fi
8343
8344 gl_mda_defines='
8345 #if defined _WIN32 && !defined __CYGWIN__
8346 #define access _access
8347 #define chdir _chdir
8348 #define chmod _chmod
8349 #define close _close
8350 #define creat _creat
8351 #define dup _dup
8352 #define dup2 _dup2
8353 #define ecvt _ecvt
8354 #define execl _execl
8355 #define execle _execle
8356 #define execlp _execlp
8357 #define execv _execv
8358 #define execve _execve
8359 #define execvp _execvp
8360 #define execvpe _execvpe
8361 #define fcloseall _fcloseall
8362 #define fcvt _fcvt
8363 #define fdopen _fdopen
8364 #define fileno _fileno
8365 #define gcvt _gcvt
8366 #define getcwd _getcwd
8367 #define getpid _getpid
8368 #define getw _getw
8369 #define isatty _isatty
8370 #define j0 _j0
8371 #define j1 _j1
8372 #define jn _jn
8373 #define lfind _lfind
8374 #define lsearch _lsearch
8375 #define lseek _lseek
8376 #define memccpy _memccpy
8377 #define mkdir _mkdir
8378 #define mktemp _mktemp
8379 #define open _open
8380 #define putenv _putenv
8381 #define putw _putw
8382 #define read _read
8383 #define rmdir _rmdir
8384 #define strdup _strdup
8385 #define swab _swab
8386 #define tempnam _tempnam
8387 #define tzset _tzset
8388 #define umask _umask
8389 #define unlink _unlink
8390 #define utime _utime
8391 #define wcsdup _wcsdup
8392 #define write _write
8393 #define y0 _y0
8394 #define y1 _y1
8395 #define yn _yn
8396 #endif
8397 '
8398
8399
8400 for ac_header in unistd.h
8401 do :
8402 ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
8403 if test "x$ac_cv_header_unistd_h" = xyes; then :
8404 cat >>confdefs.h <<_ACEOF
8405 #define HAVE_UNISTD_H 1
8406 _ACEOF
8407
8408 fi
8409
8410 done
8411
8412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
8413 $as_echo_n "checking for working chown... " >&6; }
8414 if ${ac_cv_func_chown_works+:} false; then :
8415 $as_echo_n "(cached) " >&6
8416 else
8417 if test "$cross_compiling" = yes; then :
8418 case "$host_os" in # ((
8419 # Guess yes on Linux systems.
8420 linux-* | linux) ac_cv_func_chown_works="guessing yes" ;;
8421 # Guess yes on glibc systems.
8422 *-gnu* | gnu*) ac_cv_func_chown_works="guessing yes" ;;
8423 # Guess no on native Windows.
8424 mingw*) ac_cv_func_chown_works="guessing no" ;;
8425 # If we don't know, obey --enable-cross-guesses.
8426 *) ac_cv_func_chown_works="$gl_cross_guess_normal" ;;
8427 esac
8428
8429 else
8430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8431 /* end confdefs.h. */
8432 $ac_includes_default
8433 #include <fcntl.h>
8434
8435
8436 $gl_mda_defines
8437
8438 int
8439 main ()
8440 {
8441
8442 char *f = "conftest.chown";
8443 struct stat before, after;
8444
8445 if (creat (f, 0600) < 0)
8446 return 1;
8447 if (stat (f, &before) < 0)
8448 return 1;
8449 if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
8450 return 1;
8451 if (stat (f, &after) < 0)
8452 return 1;
8453 return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
8454
8455 ;
8456 return 0;
8457 }
8458
8459 _ACEOF
8460 if ac_fn_c_try_run "$LINENO"; then :
8461 ac_cv_func_chown_works=yes
8462 else
8463 ac_cv_func_chown_works=no
8464 fi
8465 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8466 conftest.$ac_objext conftest.beam conftest.$ac_ext
8467 fi
8468
8469 rm -f conftest.chown
8470
8471 fi
8472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
8473 $as_echo "$ac_cv_func_chown_works" >&6; }
8474 case "$ac_cv_func_chown_works" in
8475 *yes)
8476
8477 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
8478
8479 ;;
8480 esac
8481
8482
8483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
8484 $as_echo_n "checking whether chown dereferences symlinks... " >&6; }
8485 if ${gl_cv_func_chown_follows_symlink+:} false; then :
8486 $as_echo_n "(cached) " >&6
8487 else
8488
8489 if test "$cross_compiling" = yes; then :
8490 gl_cv_func_chown_follows_symlink="guessing yes"
8491
8492 else
8493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8494 /* end confdefs.h. */
8495
8496 #include <unistd.h>
8497 #include <stdlib.h>
8498 #include <errno.h>
8499
8500
8501 $gl_mda_defines
8502
8503 int
8504 main ()
8505 {
8506 int result = 0;
8507 char const *dangling_symlink = "conftest.dangle";
8508
8509 unlink (dangling_symlink);
8510 if (symlink ("conftest.no-such", dangling_symlink))
8511 abort ();
8512
8513 /* Exit successfully on a conforming system,
8514 i.e., where chown must fail with ENOENT. */
8515 if (chown (dangling_symlink, getuid (), getgid ()) == 0)
8516 result |= 1;
8517 if (errno != ENOENT)
8518 result |= 2;
8519 return result;
8520 }
8521
8522 _ACEOF
8523 if ac_fn_c_try_run "$LINENO"; then :
8524 gl_cv_func_chown_follows_symlink=yes
8525 else
8526 gl_cv_func_chown_follows_symlink=no
8527 fi
8528 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8529 conftest.$ac_objext conftest.beam conftest.$ac_ext
8530 fi
8531
8532
8533
8534 fi
8535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
8536 $as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
8537
8538 case "$gl_cv_func_chown_follows_symlink" in
8539 *yes) ;;
8540 *)
8541
8542 $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
8543
8544 ;;
8545 esac
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558 if test $ac_cv_func_chown = no; then
8559 HAVE_CHOWN=0
8560 else
8561 case "$gl_cv_func_chown_follows_symlink" in
8562 *yes) ;;
8563 *) REPLACE_CHOWN=1 ;;
8564 esac
8565
8566 case "$ac_cv_func_chown_works" in
8567 *no)
8568
8569 $as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
8570
8571 REPLACE_CHOWN=1
8572 ;;
8573 esac
8574
8575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
8576 $as_echo_n "checking whether chown honors trailing slash... " >&6; }
8577 if ${gl_cv_func_chown_slash_works+:} false; then :
8578 $as_echo_n "(cached) " >&6
8579 else
8580 touch conftest.file && rm -f conftest.link
8581 if test "$cross_compiling" = yes; then :
8582 case "$host_os" in
8583 # Guess yes on glibc systems.
8584 *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;;
8585 # Guess yes on musl systems.
8586 *-musl*) gl_cv_func_chown_slash_works="guessing yes" ;;
8587 # If we don't know, obey --enable-cross-guesses.
8588 *) gl_cv_func_chown_slash_works="$gl_cross_guess_normal" ;;
8589 esac
8590
8591 else
8592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8593 /* end confdefs.h. */
8594
8595 #include <unistd.h>
8596 #include <stdlib.h>
8597 #include <errno.h>
8598
8599
8600 $gl_mda_defines
8601
8602 int
8603 main ()
8604 {
8605 if (symlink ("conftest.file", "conftest.link")) return 1;
8606 if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
8607
8608 ;
8609 return 0;
8610 }
8611 _ACEOF
8612 if ac_fn_c_try_run "$LINENO"; then :
8613 gl_cv_func_chown_slash_works=yes
8614 else
8615 gl_cv_func_chown_slash_works=no
8616 fi
8617 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8618 conftest.$ac_objext conftest.beam conftest.$ac_ext
8619 fi
8620
8621 rm -f conftest.link conftest.file
8622 fi
8623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
8624 $as_echo "$gl_cv_func_chown_slash_works" >&6; }
8625 case "$gl_cv_func_chown_slash_works" in
8626 *yes) ;;
8627 *)
8628
8629 $as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
8630
8631 REPLACE_CHOWN=1
8632 ;;
8633 esac
8634
8635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
8636 $as_echo_n "checking whether chown always updates ctime... " >&6; }
8637 if ${gl_cv_func_chown_ctime_works+:} false; then :
8638 $as_echo_n "(cached) " >&6
8639 else
8640 if test "$cross_compiling" = yes; then :
8641 case "$host_os" in
8642 # Guess yes on glibc systems.
8643 *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;;
8644 # Guess yes on musl systems.
8645 *-musl*) gl_cv_func_chown_ctime_works="guessing yes" ;;
8646 # If we don't know, obey --enable-cross-guesses.
8647 *) gl_cv_func_chown_ctime_works="$gl_cross_guess_normal" ;;
8648 esac
8649
8650 else
8651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8652 /* end confdefs.h. */
8653
8654 #include <unistd.h>
8655 #include <stdlib.h>
8656 #include <errno.h>
8657 #include <fcntl.h>
8658 #include <sys/stat.h>
8659
8660
8661 $gl_mda_defines
8662
8663 int
8664 main ()
8665 {
8666 struct stat st1, st2;
8667 if (close (creat ("conftest.file", 0600))) return 1;
8668 if (stat ("conftest.file", &st1)) return 2;
8669 sleep (1);
8670 if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
8671 if (stat ("conftest.file", &st2)) return 4;
8672 if (st2.st_ctime <= st1.st_ctime) return 5;
8673
8674 ;
8675 return 0;
8676 }
8677 _ACEOF
8678 if ac_fn_c_try_run "$LINENO"; then :
8679 gl_cv_func_chown_ctime_works=yes
8680 else
8681 gl_cv_func_chown_ctime_works=no
8682 fi
8683 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8684 conftest.$ac_objext conftest.beam conftest.$ac_ext
8685 fi
8686
8687 rm -f conftest.file
8688 fi
8689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
8690 $as_echo "$gl_cv_func_chown_ctime_works" >&6; }
8691 case "$gl_cv_func_chown_ctime_works" in
8692 *yes) ;;
8693 *)
8694
8695 $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
8696
8697 REPLACE_CHOWN=1
8698 ;;
8699 esac
8700 fi
8701
8702
8703
8704
8705
8706 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
8707 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
8708
8709 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
8710
8711 else
8712 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
8713 fi
8714
8715
8716
8717
8718
8719 GNULIB_OPENDIR=0;
8720 GNULIB_READDIR=0;
8721 GNULIB_REWINDDIR=0;
8722 GNULIB_CLOSEDIR=0;
8723 GNULIB_DIRFD=0;
8724 GNULIB_FDOPENDIR=0;
8725 GNULIB_SCANDIR=0;
8726 GNULIB_ALPHASORT=0;
8727 HAVE_OPENDIR=1;
8728 HAVE_READDIR=1;
8729 HAVE_REWINDDIR=1;
8730 HAVE_CLOSEDIR=1;
8731 HAVE_DECL_DIRFD=1;
8732 HAVE_DECL_FDOPENDIR=1;
8733 HAVE_FDOPENDIR=1;
8734 HAVE_SCANDIR=1;
8735 HAVE_ALPHASORT=1;
8736 REPLACE_OPENDIR=0;
8737 REPLACE_CLOSEDIR=0;
8738 REPLACE_DIRFD=0;
8739 REPLACE_FDOPENDIR=0;
8740
8741
8742 GNULIB_ISBLANK=0;
8743 HAVE_ISBLANK=1;
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
8755 $as_echo_n "checking if environ is properly declared... " >&6; }
8756 if ${gt_cv_var_environ_declaration+:} false; then :
8757 $as_echo_n "(cached) " >&6
8758 else
8759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8760 /* end confdefs.h. */
8761 #if HAVE_UNISTD_H
8762 #include <unistd.h>
8763 #endif
8764 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
8765 #include <stdlib.h>
8766
8767 extern struct { int foo; } environ;
8768 int
8769 main ()
8770 {
8771 environ.foo = 1;
8772 ;
8773 return 0;
8774 }
8775 _ACEOF
8776 if ac_fn_c_try_compile "$LINENO"; then :
8777 gt_cv_var_environ_declaration=no
8778 else
8779 gt_cv_var_environ_declaration=yes
8780 fi
8781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8782 fi
8783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
8784 $as_echo "$gt_cv_var_environ_declaration" >&6; }
8785 if test $gt_cv_var_environ_declaration = yes; then
8786
8787 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
8788
8789 fi
8790
8791
8792 if test $gt_cv_var_environ_declaration != yes; then
8793 HAVE_DECL_ENVIRON=0
8794 fi
8795
8796
8797
8798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8799 $as_echo_n "checking for complete errno.h... " >&6; }
8800 if ${gl_cv_header_errno_h_complete+:} false; then :
8801 $as_echo_n "(cached) " >&6
8802 else
8803
8804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8805 /* end confdefs.h. */
8806
8807 #include <errno.h>
8808 #if !defined ETXTBSY
8809 booboo
8810 #endif
8811 #if !defined ENOMSG
8812 booboo
8813 #endif
8814 #if !defined EIDRM
8815 booboo
8816 #endif
8817 #if !defined ENOLINK
8818 booboo
8819 #endif
8820 #if !defined EPROTO
8821 booboo
8822 #endif
8823 #if !defined EMULTIHOP
8824 booboo
8825 #endif
8826 #if !defined EBADMSG
8827 booboo
8828 #endif
8829 #if !defined EOVERFLOW
8830 booboo
8831 #endif
8832 #if !defined ENOTSUP
8833 booboo
8834 #endif
8835 #if !defined ENETRESET
8836 booboo
8837 #endif
8838 #if !defined ECONNABORTED
8839 booboo
8840 #endif
8841 #if !defined ESTALE
8842 booboo
8843 #endif
8844 #if !defined EDQUOT
8845 booboo
8846 #endif
8847 #if !defined ECANCELED
8848 booboo
8849 #endif
8850 #if !defined EOWNERDEAD
8851 booboo
8852 #endif
8853 #if !defined ENOTRECOVERABLE
8854 booboo
8855 #endif
8856 #if !defined EILSEQ
8857 booboo
8858 #endif
8859
8860 _ACEOF
8861 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8862 $EGREP "booboo" >/dev/null 2>&1; then :
8863 gl_cv_header_errno_h_complete=no
8864 else
8865 gl_cv_header_errno_h_complete=yes
8866 fi
8867 rm -f conftest*
8868
8869
8870 fi
8871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8872 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
8873 if test $gl_cv_header_errno_h_complete = yes; then
8874 ERRNO_H=''
8875 else
8876
8877
8878
8879
8880
8881
8882
8883
8884 if test $gl_cv_have_include_next = yes; then
8885 gl_cv_next_errno_h='<'errno.h'>'
8886 else
8887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8888 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
8889 if ${gl_cv_next_errno_h+:} false; then :
8890 $as_echo_n "(cached) " >&6
8891 else
8892
8893
8894
8895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8896 /* end confdefs.h. */
8897 #include <errno.h>
8898 _ACEOF
8899 case "$host_os" in
8900 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8901 *) gl_absname_cpp="$ac_cpp" ;;
8902 esac
8903
8904 case "$host_os" in
8905 mingw*)
8906 gl_dirsep_regex='[/\\]'
8907 ;;
8908 *)
8909 gl_dirsep_regex='\/'
8910 ;;
8911 esac
8912 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8913 gl_header_literal_regex=`echo 'errno.h' \
8914 | sed -e "$gl_make_literal_regex_sed"`
8915 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8916 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8917 s|^/[^/]|//&|
8918 p
8919 q
8920 }'
8921
8922 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8923 sed -n "$gl_absolute_header_sed"`
8924
8925 gl_header=$gl_cv_absolute_errno_h
8926 gl_cv_next_errno_h='"'$gl_header'"'
8927
8928
8929 fi
8930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8931 $as_echo "$gl_cv_next_errno_h" >&6; }
8932 fi
8933 NEXT_ERRNO_H=$gl_cv_next_errno_h
8934
8935 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8936 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8937 gl_next_as_first_directive='<'errno.h'>'
8938 else
8939 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8940 gl_next_as_first_directive=$gl_cv_next_errno_h
8941 fi
8942 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
8943
8944
8945
8946
8947 ERRNO_H='errno.h'
8948 fi
8949
8950 if test -n "$ERRNO_H"; then
8951 GL_GENERATE_ERRNO_H_TRUE=
8952 GL_GENERATE_ERRNO_H_FALSE='#'
8953 else
8954 GL_GENERATE_ERRNO_H_TRUE='#'
8955 GL_GENERATE_ERRNO_H_FALSE=
8956 fi
8957
8958
8959 if test -n "$ERRNO_H"; then
8960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8961 $as_echo_n "checking for EMULTIHOP value... " >&6; }
8962 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
8963 $as_echo_n "(cached) " >&6
8964 else
8965
8966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8967 /* end confdefs.h. */
8968
8969 #include <errno.h>
8970 #ifdef EMULTIHOP
8971 yes
8972 #endif
8973
8974 _ACEOF
8975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8976 $EGREP "yes" >/dev/null 2>&1; then :
8977 gl_cv_header_errno_h_EMULTIHOP=yes
8978 else
8979 gl_cv_header_errno_h_EMULTIHOP=no
8980 fi
8981 rm -f conftest*
8982
8983 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
8984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8985 /* end confdefs.h. */
8986
8987 #define _XOPEN_SOURCE_EXTENDED 1
8988 #include <errno.h>
8989 #ifdef EMULTIHOP
8990 yes
8991 #endif
8992
8993 _ACEOF
8994 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8995 $EGREP "yes" >/dev/null 2>&1; then :
8996 gl_cv_header_errno_h_EMULTIHOP=hidden
8997 fi
8998 rm -f conftest*
8999
9000 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
9001 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
9002 #define _XOPEN_SOURCE_EXTENDED 1
9003 #include <errno.h>
9004 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9005 #include <stdio.h>
9006 #include <stdlib.h>
9007 "; then :
9008
9009 fi
9010
9011 fi
9012 fi
9013
9014 fi
9015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
9016 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
9017 case $gl_cv_header_errno_h_EMULTIHOP in
9018 yes | no)
9019 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
9020 ;;
9021 *)
9022 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
9023 ;;
9024 esac
9025
9026
9027 fi
9028
9029
9030 if test -n "$ERRNO_H"; then
9031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
9032 $as_echo_n "checking for ENOLINK value... " >&6; }
9033 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
9034 $as_echo_n "(cached) " >&6
9035 else
9036
9037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9038 /* end confdefs.h. */
9039
9040 #include <errno.h>
9041 #ifdef ENOLINK
9042 yes
9043 #endif
9044
9045 _ACEOF
9046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9047 $EGREP "yes" >/dev/null 2>&1; then :
9048 gl_cv_header_errno_h_ENOLINK=yes
9049 else
9050 gl_cv_header_errno_h_ENOLINK=no
9051 fi
9052 rm -f conftest*
9053
9054 if test $gl_cv_header_errno_h_ENOLINK = no; then
9055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9056 /* end confdefs.h. */
9057
9058 #define _XOPEN_SOURCE_EXTENDED 1
9059 #include <errno.h>
9060 #ifdef ENOLINK
9061 yes
9062 #endif
9063
9064 _ACEOF
9065 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9066 $EGREP "yes" >/dev/null 2>&1; then :
9067 gl_cv_header_errno_h_ENOLINK=hidden
9068 fi
9069 rm -f conftest*
9070
9071 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
9072 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
9073 #define _XOPEN_SOURCE_EXTENDED 1
9074 #include <errno.h>
9075 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9076 #include <stdio.h>
9077 #include <stdlib.h>
9078 "; then :
9079
9080 fi
9081
9082 fi
9083 fi
9084
9085 fi
9086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
9087 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
9088 case $gl_cv_header_errno_h_ENOLINK in
9089 yes | no)
9090 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
9091 ;;
9092 *)
9093 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
9094 ;;
9095 esac
9096
9097
9098 fi
9099
9100
9101 if test -n "$ERRNO_H"; then
9102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
9103 $as_echo_n "checking for EOVERFLOW value... " >&6; }
9104 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
9105 $as_echo_n "(cached) " >&6
9106 else
9107
9108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9109 /* end confdefs.h. */
9110
9111 #include <errno.h>
9112 #ifdef EOVERFLOW
9113 yes
9114 #endif
9115
9116 _ACEOF
9117 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9118 $EGREP "yes" >/dev/null 2>&1; then :
9119 gl_cv_header_errno_h_EOVERFLOW=yes
9120 else
9121 gl_cv_header_errno_h_EOVERFLOW=no
9122 fi
9123 rm -f conftest*
9124
9125 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
9126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9127 /* end confdefs.h. */
9128
9129 #define _XOPEN_SOURCE_EXTENDED 1
9130 #include <errno.h>
9131 #ifdef EOVERFLOW
9132 yes
9133 #endif
9134
9135 _ACEOF
9136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9137 $EGREP "yes" >/dev/null 2>&1; then :
9138 gl_cv_header_errno_h_EOVERFLOW=hidden
9139 fi
9140 rm -f conftest*
9141
9142 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
9143 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
9144 #define _XOPEN_SOURCE_EXTENDED 1
9145 #include <errno.h>
9146 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9147 #include <stdio.h>
9148 #include <stdlib.h>
9149 "; then :
9150
9151 fi
9152
9153 fi
9154 fi
9155
9156 fi
9157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
9158 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
9159 case $gl_cv_header_errno_h_EOVERFLOW in
9160 yes | no)
9161 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
9162 ;;
9163 *)
9164 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
9165 ;;
9166 esac
9167
9168
9169 fi
9170
9171
9172 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
9173 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
9174 ac_have_decl=1
9175 else
9176 ac_have_decl=0
9177 fi
9178
9179 cat >>confdefs.h <<_ACEOF
9180 #define HAVE_DECL_STRERROR_R $ac_have_decl
9181 _ACEOF
9182
9183 for ac_func in strerror_r
9184 do :
9185 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
9186 if test "x$ac_cv_func_strerror_r" = xyes; then :
9187 cat >>confdefs.h <<_ACEOF
9188 #define HAVE_STRERROR_R 1
9189 _ACEOF
9190
9191 fi
9192 done
9193
9194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
9195 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
9196 if ${ac_cv_func_strerror_r_char_p+:} false; then :
9197 $as_echo_n "(cached) " >&6
9198 else
9199
9200 ac_cv_func_strerror_r_char_p=no
9201 if test $ac_cv_have_decl_strerror_r = yes; then
9202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9203 /* end confdefs.h. */
9204 $ac_includes_default
9205 int
9206 main ()
9207 {
9208
9209 char buf[100];
9210 char x = *strerror_r (0, buf, sizeof buf);
9211 char *p = strerror_r (0, buf, sizeof buf);
9212 return !p || x;
9213
9214 ;
9215 return 0;
9216 }
9217 _ACEOF
9218 if ac_fn_c_try_compile "$LINENO"; then :
9219 ac_cv_func_strerror_r_char_p=yes
9220 fi
9221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9222 else
9223 # strerror_r is not declared. Choose between
9224 # systems that have relatively inaccessible declarations for the
9225 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
9226 # former has a strerror_r that returns char*, while the latter
9227 # has a strerror_r that returns `int'.
9228 # This test should segfault on the DEC system.
9229 if test "$cross_compiling" = yes; then :
9230 :
9231 else
9232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9233 /* end confdefs.h. */
9234 $ac_includes_default
9235 extern char *strerror_r ();
9236 int
9237 main ()
9238 {
9239 char buf[100];
9240 char x = *strerror_r (0, buf, sizeof buf);
9241 return ! isalpha (x);
9242 ;
9243 return 0;
9244 }
9245 _ACEOF
9246 if ac_fn_c_try_run "$LINENO"; then :
9247 ac_cv_func_strerror_r_char_p=yes
9248 fi
9249 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9250 conftest.$ac_objext conftest.beam conftest.$ac_ext
9251 fi
9252
9253 fi
9254
9255 fi
9256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
9257 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
9258 if test $ac_cv_func_strerror_r_char_p = yes; then
9259
9260 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
9261
9262 fi
9263
9264
9265
9266
9267 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
9268 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
9269 ac_have_decl=1
9270 else
9271 ac_have_decl=0
9272 fi
9273
9274 cat >>confdefs.h <<_ACEOF
9275 #define HAVE_DECL_FCHDIR $ac_have_decl
9276 _ACEOF
9277
9278
9279 GNULIB_CREAT=0;
9280 GNULIB_FCNTL=0;
9281 GNULIB_NONBLOCKING=0;
9282 GNULIB_OPEN=0;
9283 GNULIB_OPENAT=0;
9284 GNULIB_MDA_CREAT=1;
9285 GNULIB_MDA_OPEN=1;
9286 HAVE_FCNTL=1;
9287 HAVE_OPENAT=1;
9288 REPLACE_CREAT=0;
9289 REPLACE_FCNTL=0;
9290 REPLACE_OPEN=0;
9291 REPLACE_OPENAT=0;
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
9303 $as_echo_n "checking for working fcntl.h... " >&6; }
9304 if ${gl_cv_header_working_fcntl_h+:} false; then :
9305 $as_echo_n "(cached) " >&6
9306 else
9307 if test "$cross_compiling" = yes; then :
9308 case "$host_os" in
9309 # Guess 'no' on native Windows.
9310 mingw*) gl_cv_header_working_fcntl_h='no' ;;
9311 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
9312 esac
9313
9314 else
9315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9316 /* end confdefs.h. */
9317 #include <sys/types.h>
9318 #include <sys/stat.h>
9319 #if HAVE_UNISTD_H
9320 # include <unistd.h>
9321 #else /* on Windows with MSVC */
9322 # include <io.h>
9323 # include <stdlib.h>
9324 # defined sleep(n) _sleep ((n) * 1000)
9325 #endif
9326 #include <fcntl.h>
9327
9328
9329 $gl_mda_defines
9330
9331 #ifndef O_NOATIME
9332 #define O_NOATIME 0
9333 #endif
9334 #ifndef O_NOFOLLOW
9335 #define O_NOFOLLOW 0
9336 #endif
9337 static int const constants[] =
9338 {
9339 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
9340 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
9341 };
9342
9343 int
9344 main ()
9345 {
9346
9347 int result = !constants;
9348 #if HAVE_SYMLINK
9349 {
9350 static char const sym[] = "conftest.sym";
9351 if (symlink ("/dev/null", sym) != 0)
9352 result |= 2;
9353 else
9354 {
9355 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
9356 if (fd >= 0)
9357 {
9358 close (fd);
9359 result |= 4;
9360 }
9361 }
9362 if (unlink (sym) != 0 || symlink (".", sym) != 0)
9363 result |= 2;
9364 else
9365 {
9366 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
9367 if (fd >= 0)
9368 {
9369 close (fd);
9370 result |= 4;
9371 }
9372 }
9373 unlink (sym);
9374 }
9375 #endif
9376 {
9377 static char const file[] = "confdefs.h";
9378 int fd = open (file, O_RDONLY | O_NOATIME);
9379 if (fd < 0)
9380 result |= 8;
9381 else
9382 {
9383 struct stat st0;
9384 if (fstat (fd, &st0) != 0)
9385 result |= 16;
9386 else
9387 {
9388 char c;
9389 sleep (1);
9390 if (read (fd, &c, 1) != 1)
9391 result |= 24;
9392 else
9393 {
9394 if (close (fd) != 0)
9395 result |= 32;
9396 else
9397 {
9398 struct stat st1;
9399 if (stat (file, &st1) != 0)
9400 result |= 40;
9401 else
9402 if (st0.st_atime != st1.st_atime)
9403 result |= 64;
9404 }
9405 }
9406 }
9407 }
9408 }
9409 return result;
9410 ;
9411 return 0;
9412 }
9413 _ACEOF
9414 if ac_fn_c_try_run "$LINENO"; then :
9415 gl_cv_header_working_fcntl_h=yes
9416 else
9417 case $? in #(
9418 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
9419 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
9420 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
9421 *) gl_cv_header_working_fcntl_h='no';;
9422 esac
9423 fi
9424 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9425 conftest.$ac_objext conftest.beam conftest.$ac_ext
9426 fi
9427
9428
9429 fi
9430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
9431 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
9432
9433 case $gl_cv_header_working_fcntl_h in #(
9434 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
9435 *) ac_val=1;;
9436 esac
9437
9438 cat >>confdefs.h <<_ACEOF
9439 #define HAVE_WORKING_O_NOATIME $ac_val
9440 _ACEOF
9441
9442
9443 case $gl_cv_header_working_fcntl_h in #(
9444 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
9445 *) ac_val=1;;
9446 esac
9447
9448 cat >>confdefs.h <<_ACEOF
9449 #define HAVE_WORKING_O_NOFOLLOW $ac_val
9450 _ACEOF
9451
9452
9453
9454 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
9455 "
9456 if test "x$ac_cv_type_pid_t" = xyes; then :
9457
9458 else
9459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9460 /* end confdefs.h. */
9461
9462 #if defined _WIN64 && !defined __CYGWIN__
9463 LLP64
9464 #endif
9465
9466 int
9467 main ()
9468 {
9469
9470 ;
9471 return 0;
9472 }
9473
9474 _ACEOF
9475 if ac_fn_c_try_compile "$LINENO"; then :
9476 gl_pid_type='int'
9477 else
9478 gl_pid_type='__int64'
9479 fi
9480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9481
9482 cat >>confdefs.h <<_ACEOF
9483 #define pid_t $gl_pid_type
9484 _ACEOF
9485
9486
9487 fi
9488
9489
9490 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
9491 if test "x$ac_cv_type_mode_t" = xyes; then :
9492
9493 else
9494
9495 cat >>confdefs.h <<_ACEOF
9496 #define mode_t int
9497 _ACEOF
9498
9499 fi
9500
9501
9502
9503
9504 GNULIB_FFS=0;
9505 HAVE_FFS=1;
9506 HAVE_STRCASECMP=1;
9507 HAVE_DECL_STRNCASECMP=1;
9508
9509
9510
9511
9512 GNULIB_FNMATCH=0;
9513 HAVE_FNMATCH=1;
9514 REPLACE_FNMATCH=0;
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531 if test $gl_cv_have_include_next = yes; then
9532 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
9533 else
9534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
9535 $as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
9536 if ${gl_cv_next_fnmatch_h+:} false; then :
9537 $as_echo_n "(cached) " >&6
9538 else
9539
9540 if test $ac_cv_header_fnmatch_h = yes; then
9541
9542
9543
9544
9545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9546 /* end confdefs.h. */
9547 #include <fnmatch.h>
9548 _ACEOF
9549 case "$host_os" in
9550 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9551 *) gl_absname_cpp="$ac_cpp" ;;
9552 esac
9553
9554 case "$host_os" in
9555 mingw*)
9556 gl_dirsep_regex='[/\\]'
9557 ;;
9558 *)
9559 gl_dirsep_regex='\/'
9560 ;;
9561 esac
9562 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9563 gl_header_literal_regex=`echo 'fnmatch.h' \
9564 | sed -e "$gl_make_literal_regex_sed"`
9565 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9566 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9567 s|^/[^/]|//&|
9568 p
9569 q
9570 }'
9571
9572 gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9573 sed -n "$gl_absolute_header_sed"`
9574
9575 gl_header=$gl_cv_absolute_fnmatch_h
9576 gl_cv_next_fnmatch_h='"'$gl_header'"'
9577 else
9578 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
9579 fi
9580
9581
9582 fi
9583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
9584 $as_echo "$gl_cv_next_fnmatch_h" >&6; }
9585 fi
9586 NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
9587
9588 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9589 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9590 gl_next_as_first_directive='<'fnmatch.h'>'
9591 else
9592 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9593 gl_next_as_first_directive=$gl_cv_next_fnmatch_h
9594 fi
9595 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
9596
9597
9598
9599
9600
9601
9602
9603 if test $ac_cv_header_fnmatch_h = yes; then
9604 HAVE_FNMATCH_H=1
9605 else
9606 HAVE_FNMATCH_H=0
9607 fi
9608
9609
9610 FNMATCH_H=''
9611 if false; then
9612 FNMATCH_H=fnmatch.h
9613 else
9614 if test $ac_cv_header_fnmatch_h != yes; then
9615 FNMATCH_H=fnmatch.h
9616 fi
9617 fi
9618
9619
9620 if test -n "$FNMATCH_H"; then
9621 GL_GENERATE_FNMATCH_H_TRUE=
9622 GL_GENERATE_FNMATCH_H_FALSE='#'
9623 else
9624 GL_GENERATE_FNMATCH_H_TRUE='#'
9625 GL_GENERATE_FNMATCH_H_FALSE=
9626 fi
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
9638 $as_echo_n "checking for mbstate_t... " >&6; }
9639 if ${ac_cv_type_mbstate_t+:} false; then :
9640 $as_echo_n "(cached) " >&6
9641 else
9642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9643 /* end confdefs.h. */
9644 $ac_includes_default
9645 #include <wchar.h>
9646 int
9647 main ()
9648 {
9649 mbstate_t x; return sizeof x;
9650 ;
9651 return 0;
9652 }
9653 _ACEOF
9654 if ac_fn_c_try_compile "$LINENO"; then :
9655 ac_cv_type_mbstate_t=yes
9656 else
9657 ac_cv_type_mbstate_t=no
9658 fi
9659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9660 fi
9661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
9662 $as_echo "$ac_cv_type_mbstate_t" >&6; }
9663 if test $ac_cv_type_mbstate_t = yes; then
9664
9665 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
9666
9667 else
9668
9669 $as_echo "#define mbstate_t int" >>confdefs.h
9670
9671 fi
9672
9673
9674
9675
9676 GNULIB_ACOSF=0;
9677 GNULIB_ACOSL=0;
9678 GNULIB_ASINF=0;
9679 GNULIB_ASINL=0;
9680 GNULIB_ATANF=0;
9681 GNULIB_ATANL=0;
9682 GNULIB_ATAN2F=0;
9683 GNULIB_CBRT=0;
9684 GNULIB_CBRTF=0;
9685 GNULIB_CBRTL=0;
9686 GNULIB_CEIL=0;
9687 GNULIB_CEILF=0;
9688 GNULIB_CEILL=0;
9689 GNULIB_COPYSIGN=0;
9690 GNULIB_COPYSIGNF=0;
9691 GNULIB_COPYSIGNL=0;
9692 GNULIB_COSF=0;
9693 GNULIB_COSL=0;
9694 GNULIB_COSHF=0;
9695 GNULIB_EXPF=0;
9696 GNULIB_EXPL=0;
9697 GNULIB_EXP2=0;
9698 GNULIB_EXP2F=0;
9699 GNULIB_EXP2L=0;
9700 GNULIB_EXPM1=0;
9701 GNULIB_EXPM1F=0;
9702 GNULIB_EXPM1L=0;
9703 GNULIB_FABSF=0;
9704 GNULIB_FABSL=0;
9705 GNULIB_FLOOR=0;
9706 GNULIB_FLOORF=0;
9707 GNULIB_FLOORL=0;
9708 GNULIB_FMA=0;
9709 GNULIB_FMAF=0;
9710 GNULIB_FMAL=0;
9711 GNULIB_FMOD=0;
9712 GNULIB_FMODF=0;
9713 GNULIB_FMODL=0;
9714 GNULIB_FREXPF=0;
9715 GNULIB_FREXP=0;
9716 GNULIB_FREXPL=0;
9717 GNULIB_HYPOT=0;
9718 GNULIB_HYPOTF=0;
9719 GNULIB_HYPOTL=0;
9720 GNULIB_ILOGB=0;
9721 GNULIB_ILOGBF=0;
9722 GNULIB_ILOGBL=0;
9723 GNULIB_ISFINITE=0;
9724 GNULIB_ISINF=0;
9725 GNULIB_ISNAN=0;
9726 GNULIB_ISNANF=0;
9727 GNULIB_ISNAND=0;
9728 GNULIB_ISNANL=0;
9729 GNULIB_LDEXPF=0;
9730 GNULIB_LDEXPL=0;
9731 GNULIB_LOG=0;
9732 GNULIB_LOGF=0;
9733 GNULIB_LOGL=0;
9734 GNULIB_LOG10=0;
9735 GNULIB_LOG10F=0;
9736 GNULIB_LOG10L=0;
9737 GNULIB_LOG1P=0;
9738 GNULIB_LOG1PF=0;
9739 GNULIB_LOG1PL=0;
9740 GNULIB_LOG2=0;
9741 GNULIB_LOG2F=0;
9742 GNULIB_LOG2L=0;
9743 GNULIB_LOGB=0;
9744 GNULIB_LOGBF=0;
9745 GNULIB_LOGBL=0;
9746 GNULIB_MODF=0;
9747 GNULIB_MODFF=0;
9748 GNULIB_MODFL=0;
9749 GNULIB_POWF=0;
9750 GNULIB_REMAINDER=0;
9751 GNULIB_REMAINDERF=0;
9752 GNULIB_REMAINDERL=0;
9753 GNULIB_RINT=0;
9754 GNULIB_RINTF=0;
9755 GNULIB_RINTL=0;
9756 GNULIB_ROUND=0;
9757 GNULIB_ROUNDF=0;
9758 GNULIB_ROUNDL=0;
9759 GNULIB_SIGNBIT=0;
9760 GNULIB_SINF=0;
9761 GNULIB_SINL=0;
9762 GNULIB_SINHF=0;
9763 GNULIB_SQRTF=0;
9764 GNULIB_SQRTL=0;
9765 GNULIB_TANF=0;
9766 GNULIB_TANL=0;
9767 GNULIB_TANHF=0;
9768 GNULIB_TRUNC=0;
9769 GNULIB_TRUNCF=0;
9770 GNULIB_TRUNCL=0;
9771 GNULIB_MDA_J0=1;
9772 GNULIB_MDA_J1=1;
9773 GNULIB_MDA_JN=1;
9774 GNULIB_MDA_Y0=1;
9775 GNULIB_MDA_Y1=1;
9776 GNULIB_MDA_YN=1;
9777 HAVE_ACOSF=1;
9778 HAVE_ACOSL=1;
9779 HAVE_ASINF=1;
9780 HAVE_ASINL=1;
9781 HAVE_ATANF=1;
9782 HAVE_ATANL=1;
9783 HAVE_ATAN2F=1;
9784 HAVE_CBRT=1;
9785 HAVE_CBRTF=1;
9786 HAVE_CBRTL=1;
9787 HAVE_COPYSIGN=1;
9788 HAVE_COPYSIGNL=1;
9789 HAVE_COSF=1;
9790 HAVE_COSL=1;
9791 HAVE_COSHF=1;
9792 HAVE_EXPF=1;
9793 HAVE_EXPL=1;
9794 HAVE_EXPM1=1;
9795 HAVE_EXPM1F=1;
9796 HAVE_FABSF=1;
9797 HAVE_FABSL=1;
9798 HAVE_FMA=1;
9799 HAVE_FMAF=1;
9800 HAVE_FMAL=1;
9801 HAVE_FMODF=1;
9802 HAVE_FMODL=1;
9803 HAVE_FREXPF=1;
9804 HAVE_HYPOTF=1;
9805 HAVE_HYPOTL=1;
9806 HAVE_ILOGB=1;
9807 HAVE_ILOGBF=1;
9808 HAVE_ILOGBL=1;
9809 HAVE_ISNANF=1;
9810 HAVE_ISNAND=1;
9811 HAVE_ISNANL=1;
9812 HAVE_LDEXPF=1;
9813 HAVE_LOGF=1;
9814 HAVE_LOGL=1;
9815 HAVE_LOG10F=1;
9816 HAVE_LOG10L=1;
9817 HAVE_LOG1P=1;
9818 HAVE_LOG1PF=1;
9819 HAVE_LOG1PL=1;
9820 HAVE_LOGBF=1;
9821 HAVE_LOGBL=1;
9822 HAVE_MODFF=1;
9823 HAVE_MODFL=1;
9824 HAVE_POWF=1;
9825 HAVE_REMAINDER=1;
9826 HAVE_REMAINDERF=1;
9827 HAVE_RINT=1;
9828 HAVE_RINTL=1;
9829 HAVE_SINF=1;
9830 HAVE_SINL=1;
9831 HAVE_SINHF=1;
9832 HAVE_SQRTF=1;
9833 HAVE_SQRTL=1;
9834 HAVE_TANF=1;
9835 HAVE_TANL=1;
9836 HAVE_TANHF=1;
9837 HAVE_DECL_ACOSL=1;
9838 HAVE_DECL_ASINL=1;
9839 HAVE_DECL_ATANL=1;
9840 HAVE_DECL_CBRTF=1;
9841 HAVE_DECL_CBRTL=1;
9842 HAVE_DECL_CEILF=1;
9843 HAVE_DECL_CEILL=1;
9844 HAVE_DECL_COPYSIGNF=1;
9845 HAVE_DECL_COSL=1;
9846 HAVE_DECL_EXPL=1;
9847 HAVE_DECL_EXP2=1;
9848 HAVE_DECL_EXP2F=1;
9849 HAVE_DECL_EXP2L=1;
9850 HAVE_DECL_EXPM1L=1;
9851 HAVE_DECL_FLOORF=1;
9852 HAVE_DECL_FLOORL=1;
9853 HAVE_DECL_FREXPL=1;
9854 HAVE_DECL_LDEXPL=1;
9855 HAVE_DECL_LOGL=1;
9856 HAVE_DECL_LOG10L=1;
9857 HAVE_DECL_LOG2=1;
9858 HAVE_DECL_LOG2F=1;
9859 HAVE_DECL_LOG2L=1;
9860 HAVE_DECL_LOGB=1;
9861 HAVE_DECL_REMAINDER=1;
9862 HAVE_DECL_REMAINDERL=1;
9863 HAVE_DECL_RINTF=1;
9864 HAVE_DECL_ROUND=1;
9865 HAVE_DECL_ROUNDF=1;
9866 HAVE_DECL_ROUNDL=1;
9867 HAVE_DECL_SINL=1;
9868 HAVE_DECL_SQRTL=1;
9869 HAVE_DECL_TANL=1;
9870 HAVE_DECL_TRUNC=1;
9871 HAVE_DECL_TRUNCF=1;
9872 HAVE_DECL_TRUNCL=1;
9873 REPLACE_ACOSF=0;
9874 REPLACE_ASINF=0;
9875 REPLACE_ATANF=0;
9876 REPLACE_ATAN2F=0;
9877 REPLACE_CBRTF=0;
9878 REPLACE_CBRTL=0;
9879 REPLACE_CEIL=0;
9880 REPLACE_CEILF=0;
9881 REPLACE_CEILL=0;
9882 REPLACE_COSF=0;
9883 REPLACE_COSHF=0;
9884 REPLACE_EXPF=0;
9885 REPLACE_EXPL=0;
9886 REPLACE_EXPM1=0;
9887 REPLACE_EXPM1F=0;
9888 REPLACE_EXPM1L=0;
9889 REPLACE_EXP2=0;
9890 REPLACE_EXP2L=0;
9891 REPLACE_FABSL=0;
9892 REPLACE_FLOOR=0;
9893 REPLACE_FLOORF=0;
9894 REPLACE_FLOORL=0;
9895 REPLACE_FMA=0;
9896 REPLACE_FMAF=0;
9897 REPLACE_FMAL=0;
9898 REPLACE_FMOD=0;
9899 REPLACE_FMODF=0;
9900 REPLACE_FMODL=0;
9901 REPLACE_FREXPF=0;
9902 REPLACE_FREXP=0;
9903 REPLACE_FREXPL=0;
9904 REPLACE_HUGE_VAL=0;
9905 REPLACE_HYPOT=0;
9906 REPLACE_HYPOTF=0;
9907 REPLACE_HYPOTL=0;
9908 REPLACE_ILOGB=0;
9909 REPLACE_ILOGBF=0;
9910 REPLACE_ILOGBL=0;
9911 REPLACE_ISFINITE=0;
9912 REPLACE_ISINF=0;
9913 REPLACE_ISNAN=0;
9914 REPLACE_LDEXPL=0;
9915 REPLACE_LOG=0;
9916 REPLACE_LOGF=0;
9917 REPLACE_LOGL=0;
9918 REPLACE_LOG10=0;
9919 REPLACE_LOG10F=0;
9920 REPLACE_LOG10L=0;
9921 REPLACE_LOG1P=0;
9922 REPLACE_LOG1PF=0;
9923 REPLACE_LOG1PL=0;
9924 REPLACE_LOG2=0;
9925 REPLACE_LOG2F=0;
9926 REPLACE_LOG2L=0;
9927 REPLACE_LOGB=0;
9928 REPLACE_LOGBF=0;
9929 REPLACE_LOGBL=0;
9930 REPLACE_MODF=0;
9931 REPLACE_MODFF=0;
9932 REPLACE_MODFL=0;
9933 REPLACE_NAN=0;
9934 REPLACE_REMAINDER=0;
9935 REPLACE_REMAINDERF=0;
9936 REPLACE_REMAINDERL=0;
9937 REPLACE_RINTL=0;
9938 REPLACE_ROUND=0;
9939 REPLACE_ROUNDF=0;
9940 REPLACE_ROUNDL=0;
9941 REPLACE_SIGNBIT=0;
9942 REPLACE_SIGNBIT_USING_BUILTINS=0;
9943 REPLACE_SINF=0;
9944 REPLACE_SINHF=0;
9945 REPLACE_SQRTF=0;
9946 REPLACE_SQRTL=0;
9947 REPLACE_TANF=0;
9948 REPLACE_TANHF=0;
9949 REPLACE_TRUNC=0;
9950 REPLACE_TRUNCF=0;
9951 REPLACE_TRUNCL=0;
9952
9953
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
9955 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
9956 if ${gl_cv_func_frexp_no_libm+:} false; then :
9957 $as_echo_n "(cached) " >&6
9958 else
9959
9960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9961 /* end confdefs.h. */
9962 #include <math.h>
9963 double x;
9964 int
9965 main ()
9966 {
9967 int e; return frexp (x, &e) > 0;
9968 ;
9969 return 0;
9970 }
9971 _ACEOF
9972 if ac_fn_c_try_link "$LINENO"; then :
9973 gl_cv_func_frexp_no_libm=yes
9974 else
9975 gl_cv_func_frexp_no_libm=no
9976 fi
9977 rm -f core conftest.err conftest.$ac_objext \
9978 conftest$ac_exeext conftest.$ac_ext
9979
9980 fi
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
9982 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
9983
9984 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
9985 if test "x$ac_cv_have_decl_alarm" = xyes; then :
9986 ac_have_decl=1
9987 else
9988 ac_have_decl=0
9989 fi
9990
9991 cat >>confdefs.h <<_ACEOF
9992 #define HAVE_DECL_ALARM $ac_have_decl
9993 _ACEOF
9994
9995
9996
9997
9998 FREXP_LIBM=
9999 if test $gl_cv_func_frexp_no_libm = no; then
10000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
10001 $as_echo_n "checking whether frexp() can be used with libm... " >&6; }
10002 if ${gl_cv_func_frexp_in_libm+:} false; then :
10003 $as_echo_n "(cached) " >&6
10004 else
10005
10006 save_LIBS="$LIBS"
10007 LIBS="$LIBS -lm"
10008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10009 /* end confdefs.h. */
10010 #include <math.h>
10011 double x;
10012 int
10013 main ()
10014 {
10015 int e; return frexp (x, &e) > 0;
10016 ;
10017 return 0;
10018 }
10019 _ACEOF
10020 if ac_fn_c_try_link "$LINENO"; then :
10021 gl_cv_func_frexp_in_libm=yes
10022 else
10023 gl_cv_func_frexp_in_libm=no
10024 fi
10025 rm -f core conftest.err conftest.$ac_objext \
10026 conftest$ac_exeext conftest.$ac_ext
10027 LIBS="$save_LIBS"
10028
10029 fi
10030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
10031 $as_echo "$gl_cv_func_frexp_in_libm" >&6; }
10032 if test $gl_cv_func_frexp_in_libm = yes; then
10033 FREXP_LIBM=-lm
10034 fi
10035 fi
10036 if test $gl_cv_func_frexp_no_libm = yes \
10037 || test $gl_cv_func_frexp_in_libm = yes; then
10038 save_LIBS="$LIBS"
10039 LIBS="$LIBS $FREXP_LIBM"
10040
10041
10042
10043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
10044 $as_echo_n "checking whether frexp works... " >&6; }
10045 if ${gl_cv_func_frexp_works+:} false; then :
10046 $as_echo_n "(cached) " >&6
10047 else
10048
10049 if test "$cross_compiling" = yes; then :
10050 case "$host_os" in
10051 netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
10052 mingw*) # Guess yes with MSVC, no with mingw.
10053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10054 /* end confdefs.h. */
10055
10056 #ifdef _MSC_VER
10057 Good
10058 #endif
10059
10060 _ACEOF
10061 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10062 $EGREP "Good" >/dev/null 2>&1; then :
10063 gl_cv_func_frexp_works="guessing yes"
10064 else
10065 gl_cv_func_frexp_works="guessing no"
10066 fi
10067 rm -f conftest*
10068
10069 ;;
10070 *) gl_cv_func_frexp_works="guessing yes" ;;
10071 esac
10072
10073 else
10074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10075 /* end confdefs.h. */
10076
10077 #include <float.h>
10078 #include <math.h>
10079 #include <string.h>
10080 #if HAVE_DECL_ALARM
10081 # include <signal.h>
10082 # include <unistd.h>
10083 #endif
10084 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
10085 ICC 10.0 has a bug when optimizing the expression -zero.
10086 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
10087 to PowerPC on Mac OS X 10.5. */
10088 #if defined __hpux || defined __sgi || defined __ICC
10089 static double
10090 compute_minus_zero (void)
10091 {
10092 return -DBL_MIN * DBL_MIN;
10093 }
10094 # define minus_zero compute_minus_zero ()
10095 #else
10096 double minus_zero = -0.0;
10097 #endif
10098 int main()
10099 {
10100 int result = 0;
10101 int i;
10102 volatile double x;
10103 double zero = 0.0;
10104 #if HAVE_DECL_ALARM
10105 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
10106 number. Let the test fail in this case. */
10107 signal (SIGALRM, SIG_DFL);
10108 alarm (5);
10109 #endif
10110 /* Test on denormalized numbers. */
10111 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
10112 ;
10113 if (x > 0.0)
10114 {
10115 int exp;
10116 double y = frexp (x, &exp);
10117 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
10118 On NetBSD: y = 0.75. Correct: y = 0.5. */
10119 if (y != 0.5)
10120 result |= 1;
10121 }
10122 /* Test on infinite numbers. */
10123 x = 1.0 / zero;
10124 {
10125 int exp;
10126 double y = frexp (x, &exp);
10127 if (y != x)
10128 result |= 2;
10129 }
10130 /* Test on negative zero. */
10131 x = minus_zero;
10132 {
10133 int exp;
10134 double y = frexp (x, &exp);
10135 if (memcmp (&y, &x, sizeof x))
10136 result |= 4;
10137 }
10138 return result;
10139 }
10140 _ACEOF
10141 if ac_fn_c_try_run "$LINENO"; then :
10142 gl_cv_func_frexp_works=yes
10143 else
10144 gl_cv_func_frexp_works=no
10145 fi
10146 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10147 conftest.$ac_objext conftest.beam conftest.$ac_ext
10148 fi
10149
10150
10151 fi
10152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
10153 $as_echo "$gl_cv_func_frexp_works" >&6; }
10154
10155 LIBS="$save_LIBS"
10156 case "$gl_cv_func_frexp_works" in
10157 *yes) gl_func_frexp=yes ;;
10158 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
10159 esac
10160 else
10161 gl_func_frexp=no
10162 fi
10163 if test $gl_func_frexp = yes; then
10164
10165 $as_echo "#define HAVE_FREXP 1" >>confdefs.h
10166
10167 fi
10168
10169
10170
10171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
10172 $as_echo_n "checking whether long double and double are the same... " >&6; }
10173 if ${gl_cv_long_double_equals_double+:} false; then :
10174 $as_echo_n "(cached) " >&6
10175 else
10176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10177 /* end confdefs.h. */
10178 #include <float.h>
10179 int
10180 main ()
10181 {
10182 typedef int check[sizeof (long double) == sizeof (double)
10183 && LDBL_MANT_DIG == DBL_MANT_DIG
10184 && LDBL_MAX_EXP == DBL_MAX_EXP
10185 && LDBL_MIN_EXP == DBL_MIN_EXP
10186 ? 1 : -1];
10187
10188 ;
10189 return 0;
10190 }
10191 _ACEOF
10192 if ac_fn_c_try_compile "$LINENO"; then :
10193 gl_cv_long_double_equals_double=yes
10194 else
10195 gl_cv_long_double_equals_double=no
10196 fi
10197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10198
10199 fi
10200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
10201 $as_echo "$gl_cv_long_double_equals_double" >&6; }
10202 if test $gl_cv_long_double_equals_double = yes; then
10203
10204 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
10205
10206 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
10207 else
10208 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
10209 fi
10210
10211
10212
10213
10214
10215
10216
10217
10218 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
10219 "
10220 if test "x$ac_cv_have_decl_frexpl" = xyes; then :
10221
10222 else
10223 HAVE_DECL_FREXPL=0
10224 fi
10225
10226
10227 FREXPL_LIBM=
10228 if test $HAVE_DECL_FREXPL = 1; then
10229
10230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
10231 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
10232 if ${gl_cv_func_frexpl_no_libm+:} false; then :
10233 $as_echo_n "(cached) " >&6
10234 else
10235
10236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10237 /* end confdefs.h. */
10238 #include <math.h>
10239 long double x;
10240 int
10241 main ()
10242 {
10243 int e; return frexpl (x, &e) > 0;
10244 ;
10245 return 0;
10246 }
10247 _ACEOF
10248 if ac_fn_c_try_link "$LINENO"; then :
10249 gl_cv_func_frexpl_no_libm=yes
10250 else
10251 gl_cv_func_frexpl_no_libm=no
10252 fi
10253 rm -f core conftest.err conftest.$ac_objext \
10254 conftest$ac_exeext conftest.$ac_ext
10255
10256 fi
10257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
10258 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
10259
10260 if test $gl_cv_func_frexpl_no_libm = no; then
10261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
10262 $as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
10263 if ${gl_cv_func_frexpl_in_libm+:} false; then :
10264 $as_echo_n "(cached) " >&6
10265 else
10266
10267 save_LIBS="$LIBS"
10268 LIBS="$LIBS -lm"
10269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10270 /* end confdefs.h. */
10271 #include <math.h>
10272 long double x;
10273 int
10274 main ()
10275 {
10276 int e; return frexpl (x, &e) > 0;
10277 ;
10278 return 0;
10279 }
10280 _ACEOF
10281 if ac_fn_c_try_link "$LINENO"; then :
10282 gl_cv_func_frexpl_in_libm=yes
10283 else
10284 gl_cv_func_frexpl_in_libm=no
10285 fi
10286 rm -f core conftest.err conftest.$ac_objext \
10287 conftest$ac_exeext conftest.$ac_ext
10288 LIBS="$save_LIBS"
10289
10290 fi
10291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
10292 $as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
10293 if test $gl_cv_func_frexpl_in_libm = yes; then
10294 FREXPL_LIBM=-lm
10295 fi
10296 fi
10297 if test $gl_cv_func_frexpl_no_libm = yes \
10298 || test $gl_cv_func_frexpl_in_libm = yes; then
10299 save_LIBS="$LIBS"
10300 LIBS="$LIBS $FREXPL_LIBM"
10301
10302
10303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
10304 $as_echo_n "checking whether frexpl works... " >&6; }
10305 if ${gl_cv_func_frexpl_works+:} false; then :
10306 $as_echo_n "(cached) " >&6
10307 else
10308
10309 if test "$cross_compiling" = yes; then :
10310
10311 case "$host_os" in
10312 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
10313 gl_cv_func_frexpl_works="guessing no";;
10314 *) gl_cv_func_frexpl_works="guessing yes";;
10315 esac
10316
10317 else
10318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10319 /* end confdefs.h. */
10320
10321 #include <float.h>
10322 #include <math.h>
10323 /* Override the values of <float.h>, like done in float.in.h. */
10324 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
10325 # undef LDBL_MIN_EXP
10326 # define LDBL_MIN_EXP (-16381)
10327 #endif
10328 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
10329 # undef LDBL_MIN_EXP
10330 # define LDBL_MIN_EXP (-16381)
10331 #endif
10332 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
10333 # undef LDBL_MIN_EXP
10334 # define LDBL_MIN_EXP DBL_MIN_EXP
10335 #endif
10336 #if defined __sgi && (LDBL_MANT_DIG >= 106)
10337 # if defined __GNUC__
10338 # undef LDBL_MIN_EXP
10339 # define LDBL_MIN_EXP DBL_MIN_EXP
10340 # endif
10341 #endif
10342 extern
10343 #ifdef __cplusplus
10344 "C"
10345 #endif
10346 long double frexpl (long double, int *);
10347 long double zero = 0.0L;
10348 int main()
10349 {
10350 int result = 0;
10351 volatile long double x;
10352 /* Test on finite numbers that fails on AIX 5.1. */
10353 x = 16.0L;
10354 {
10355 int exp = -9999;
10356 frexpl (x, &exp);
10357 if (exp != 5)
10358 result |= 1;
10359 }
10360 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
10361 function returns an invalid (incorrectly normalized) value: it returns
10362 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
10363 but the correct result is
10364 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
10365 x = 1.01L;
10366 {
10367 int exp = -9999;
10368 long double y = frexpl (x, &exp);
10369 if (!(exp == 1 && y == 0.505L))
10370 result |= 2;
10371 }
10372 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
10373 LDBL_MAX_EXP = 16384.
10374 In the loop end test, we test x against Infinity, rather than comparing
10375 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
10376 {
10377 int i;
10378 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
10379 {
10380 int exp = -9999;
10381 frexpl (x, &exp);
10382 if (exp != i)
10383 {
10384 result |= 4;
10385 break;
10386 }
10387 }
10388 }
10389 /* Test on denormalized numbers. */
10390 {
10391 int i;
10392 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
10393 ;
10394 if (x > 0.0L)
10395 {
10396 int exp;
10397 long double y = frexpl (x, &exp);
10398 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
10399 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
10400 if (exp != LDBL_MIN_EXP - 1)
10401 result |= 8;
10402 }
10403 }
10404 /* Test on infinite numbers. */
10405 /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0. */
10406 x = 1.0L / zero;
10407 {
10408 int exp;
10409 long double y = frexpl (x, &exp);
10410 if (y != x)
10411 result |= 16;
10412 }
10413 return result;
10414 }
10415 _ACEOF
10416 if ac_fn_c_try_run "$LINENO"; then :
10417 gl_cv_func_frexpl_works=yes
10418 else
10419 gl_cv_func_frexpl_works=no
10420 fi
10421 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10422 conftest.$ac_objext conftest.beam conftest.$ac_ext
10423 fi
10424
10425
10426 fi
10427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
10428 $as_echo "$gl_cv_func_frexpl_works" >&6; }
10429
10430 LIBS="$save_LIBS"
10431 case "$gl_cv_func_frexpl_works" in
10432 *yes) gl_func_frexpl=yes ;;
10433 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
10434 esac
10435 else
10436 gl_func_frexpl=no
10437 fi
10438 if test $gl_func_frexpl = yes; then
10439
10440 $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
10441
10442 fi
10443 fi
10444 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
10445 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
10446
10447 FREXPL_LIBM="$FREXP_LIBM"
10448 else
10449 FREXPL_LIBM=
10450 fi
10451 fi
10452
10453
10454
10455 GNULIB_FCHMODAT=0;
10456 GNULIB_FSTAT=0;
10457 GNULIB_FSTATAT=0;
10458 GNULIB_FUTIMENS=0;
10459 GNULIB_GETUMASK=0;
10460 GNULIB_LCHMOD=0;
10461 GNULIB_LSTAT=0;
10462 GNULIB_MKDIR=0;
10463 GNULIB_MKDIRAT=0;
10464 GNULIB_MKFIFO=0;
10465 GNULIB_MKFIFOAT=0;
10466 GNULIB_MKNOD=0;
10467 GNULIB_MKNODAT=0;
10468 GNULIB_STAT=0;
10469 GNULIB_UTIMENSAT=0;
10470 GNULIB_OVERRIDES_STRUCT_STAT=0;
10471 GNULIB_MDA_CHMOD=1;
10472 GNULIB_MDA_MKDIR=1;
10473 GNULIB_MDA_UMASK=1;
10474 HAVE_FCHMODAT=1;
10475 HAVE_FSTATAT=1;
10476 HAVE_FUTIMENS=1;
10477 HAVE_GETUMASK=1;
10478 HAVE_LCHMOD=1;
10479 HAVE_LSTAT=1;
10480 HAVE_MKDIRAT=1;
10481 HAVE_MKFIFO=1;
10482 HAVE_MKFIFOAT=1;
10483 HAVE_MKNOD=1;
10484 HAVE_MKNODAT=1;
10485 HAVE_UTIMENSAT=1;
10486 REPLACE_FCHMODAT=0;
10487 REPLACE_FSTAT=0;
10488 REPLACE_FSTATAT=0;
10489 REPLACE_FUTIMENS=0;
10490 REPLACE_LSTAT=0;
10491 REPLACE_MKDIR=0;
10492 REPLACE_MKFIFO=0;
10493 REPLACE_MKFIFOAT=0;
10494 REPLACE_MKNOD=0;
10495 REPLACE_MKNODAT=0;
10496 REPLACE_STAT=0;
10497 REPLACE_UTIMENSAT=0;
10498
10499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
10500 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
10501 if ${ac_cv_header_stat_broken+:} false; then :
10502 $as_echo_n "(cached) " >&6
10503 else
10504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10505 /* end confdefs.h. */
10506 #include <sys/types.h>
10507 #include <sys/stat.h>
10508
10509 #if defined S_ISBLK && defined S_IFDIR
10510 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
10511 #endif
10512
10513 #if defined S_ISBLK && defined S_IFCHR
10514 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
10515 #endif
10516
10517 #if defined S_ISLNK && defined S_IFREG
10518 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
10519 #endif
10520
10521 #if defined S_ISSOCK && defined S_IFREG
10522 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
10523 #endif
10524
10525 _ACEOF
10526 if ac_fn_c_try_compile "$LINENO"; then :
10527 ac_cv_header_stat_broken=no
10528 else
10529 ac_cv_header_stat_broken=yes
10530 fi
10531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10532 fi
10533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
10534 $as_echo "$ac_cv_header_stat_broken" >&6; }
10535 if test $ac_cv_header_stat_broken = yes; then
10536
10537 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
10538
10539 fi
10540
10541
10542
10543
10544
10545 case "$host_os" in
10546 mingw*)
10547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10548 $as_echo_n "checking for 64-bit off_t... " >&6; }
10549 if ${gl_cv_type_off_t_64+:} false; then :
10550 $as_echo_n "(cached) " >&6
10551 else
10552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10553 /* end confdefs.h. */
10554 #include <sys/types.h>
10555 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10556
10557 int
10558 main ()
10559 {
10560
10561 ;
10562 return 0;
10563 }
10564 _ACEOF
10565 if ac_fn_c_try_compile "$LINENO"; then :
10566 gl_cv_type_off_t_64=yes
10567 else
10568 gl_cv_type_off_t_64=no
10569 fi
10570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10571
10572 fi
10573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10574 $as_echo "$gl_cv_type_off_t_64" >&6; }
10575 if test $gl_cv_type_off_t_64 = no; then
10576 WINDOWS_64_BIT_OFF_T=1
10577 else
10578 WINDOWS_64_BIT_OFF_T=0
10579 fi
10580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
10581 $as_echo_n "checking for 64-bit st_size... " >&6; }
10582 if ${gl_cv_member_st_size_64+:} false; then :
10583 $as_echo_n "(cached) " >&6
10584 else
10585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10586 /* end confdefs.h. */
10587 #include <sys/types.h>
10588 struct stat buf;
10589 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
10590
10591 int
10592 main ()
10593 {
10594
10595 ;
10596 return 0;
10597 }
10598 _ACEOF
10599 if ac_fn_c_try_compile "$LINENO"; then :
10600 gl_cv_member_st_size_64=yes
10601 else
10602 gl_cv_member_st_size_64=no
10603 fi
10604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10605
10606 fi
10607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
10608 $as_echo "$gl_cv_member_st_size_64" >&6; }
10609 if test $gl_cv_member_st_size_64 = no; then
10610 WINDOWS_64_BIT_ST_SIZE=1
10611 else
10612 WINDOWS_64_BIT_ST_SIZE=0
10613 fi
10614 ;;
10615 *)
10616 WINDOWS_64_BIT_OFF_T=0
10617 WINDOWS_64_BIT_ST_SIZE=0
10618 ;;
10619 esac
10620
10621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10622 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
10623 if ${ac_cv_c_restrict+:} false; then :
10624 $as_echo_n "(cached) " >&6
10625 else
10626 ac_cv_c_restrict=no
10627 # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
10628 # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
10629 # Put 'restrict' last, because C++ lacks it.
10630 for ac_kw in __restrict__ __restrict _Restrict restrict; do
10631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10632 /* end confdefs.h. */
10633 typedef int *int_ptr;
10634 int foo (int_ptr $ac_kw ip) { return ip[0]; }
10635 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
10636 int bar (int ip[$ac_kw]) { return ip[0]; }
10637
10638 int
10639 main ()
10640 {
10641 int s[1];
10642 int *$ac_kw t = s;
10643 t[0] = 0;
10644 return foo (t) + bar (t);
10645
10646 ;
10647 return 0;
10648 }
10649 _ACEOF
10650 if ac_fn_c_try_compile "$LINENO"; then :
10651 ac_cv_c_restrict=$ac_kw
10652 fi
10653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10654 test "$ac_cv_c_restrict" != no && break
10655 done
10656
10657 fi
10658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
10659 $as_echo "$ac_cv_c_restrict" >&6; }
10660
10661 case $ac_cv_c_restrict in
10662 restrict) ;;
10663 no) $as_echo "#define restrict /**/" >>confdefs.h
10664 ;;
10665 *) cat >>confdefs.h <<_ACEOF
10666 #define restrict $ac_cv_c_restrict
10667 _ACEOF
10668 ;;
10669 esac
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685 if test $gl_cv_have_include_next = yes; then
10686 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10687 else
10688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
10689 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
10690 if ${gl_cv_next_sys_stat_h+:} false; then :
10691 $as_echo_n "(cached) " >&6
10692 else
10693
10694 if test $ac_cv_header_sys_stat_h = yes; then
10695
10696
10697
10698
10699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10700 /* end confdefs.h. */
10701 #include <sys/stat.h>
10702 _ACEOF
10703 case "$host_os" in
10704 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10705 *) gl_absname_cpp="$ac_cpp" ;;
10706 esac
10707
10708 case "$host_os" in
10709 mingw*)
10710 gl_dirsep_regex='[/\\]'
10711 ;;
10712 *)
10713 gl_dirsep_regex='\/'
10714 ;;
10715 esac
10716 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10717 gl_header_literal_regex=`echo 'sys/stat.h' \
10718 | sed -e "$gl_make_literal_regex_sed"`
10719 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10720 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10721 s|^/[^/]|//&|
10722 p
10723 q
10724 }'
10725
10726 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10727 sed -n "$gl_absolute_header_sed"`
10728
10729 gl_header=$gl_cv_absolute_sys_stat_h
10730 gl_cv_next_sys_stat_h='"'$gl_header'"'
10731 else
10732 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10733 fi
10734
10735
10736 fi
10737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
10738 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
10739 fi
10740 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
10741
10742 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10743 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10744 gl_next_as_first_directive='<'sys/stat.h'>'
10745 else
10746 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10747 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
10748 fi
10749 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
10750
10751
10752
10753
10754
10755
10756
10757
10758 WINDOWS_STAT_TIMESPEC=0
10759
10760
10761
10762
10763
10764
10765
10766
10767 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
10768 #include <sys/stat.h>
10769 "
10770 if test "x$ac_cv_type_nlink_t" = xyes; then :
10771
10772 else
10773
10774 $as_echo "#define nlink_t int" >>confdefs.h
10775
10776 fi
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787 case "$host_os" in
10788 mingw*)
10789 for ac_header in sdkddkver.h
10790 do :
10791 ac_fn_c_check_header_mongrel "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
10792 if test "x$ac_cv_header_sdkddkver_h" = xyes; then :
10793 cat >>confdefs.h <<_ACEOF
10794 #define HAVE_SDKDDKVER_H 1
10795 _ACEOF
10796
10797 fi
10798
10799 done
10800
10801 ;;
10802 esac
10803
10804
10805
10806
10807
10808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
10809 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
10810 if ${gl_cv_func_getcwd_null+:} false; then :
10811 $as_echo_n "(cached) " >&6
10812 else
10813 if test "$cross_compiling" = yes; then :
10814 case "$host_os" in
10815 # Guess yes on glibc systems.
10816 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
10817 # Guess yes on musl systems.
10818 *-musl*) gl_cv_func_getcwd_null="guessing yes";;
10819 # Guess yes on Cygwin.
10820 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
10821 # If we don't know, obey --enable-cross-guesses.
10822 *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
10823 esac
10824
10825 else
10826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10827 /* end confdefs.h. */
10828
10829 # include <stdlib.h>
10830 # if HAVE_UNISTD_H
10831 # include <unistd.h>
10832 # else /* on Windows with MSVC */
10833 # include <direct.h>
10834 # endif
10835
10836
10837 $gl_mda_defines
10838
10839 # ifndef getcwd
10840 char *getcwd ();
10841 # endif
10842
10843 int
10844 main ()
10845 {
10846
10847 #if defined _WIN32 && ! defined __CYGWIN__
10848 /* mingw cwd does not start with '/', but _getcwd does allocate.
10849 However, mingw fails to honor non-zero size. */
10850 #else
10851 if (chdir ("/") != 0)
10852 return 1;
10853 else
10854 {
10855 char *f = getcwd (NULL, 0);
10856 if (! f)
10857 return 2;
10858 if (f[0] != '/')
10859 { free (f); return 3; }
10860 if (f[1] != '\0')
10861 { free (f); return 4; }
10862 free (f);
10863 return 0;
10864 }
10865 #endif
10866
10867 ;
10868 return 0;
10869 }
10870 _ACEOF
10871 if ac_fn_c_try_run "$LINENO"; then :
10872 gl_cv_func_getcwd_null=yes
10873 else
10874 gl_cv_func_getcwd_null=no
10875 fi
10876 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10877 conftest.$ac_objext conftest.beam conftest.$ac_ext
10878 fi
10879
10880 fi
10881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
10882 $as_echo "$gl_cv_func_getcwd_null" >&6; }
10883
10884
10885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
10886 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
10887 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
10888 $as_echo_n "(cached) " >&6
10889 else
10890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10891 /* end confdefs.h. */
10892 #include <unistd.h>
10893
10894
10895 $gl_mda_defines
10896
10897 int
10898 main ()
10899 {
10900 extern
10901 #ifdef __cplusplus
10902 "C"
10903 #endif
10904 char *getcwd (char *, size_t);
10905
10906 ;
10907 return 0;
10908 }
10909
10910 _ACEOF
10911 if ac_fn_c_try_compile "$LINENO"; then :
10912 gl_cv_func_getcwd_posix_signature=yes
10913 else
10914 gl_cv_func_getcwd_posix_signature=no
10915 fi
10916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10917
10918 fi
10919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
10920 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
10921
10922 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
10923 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
10924 ac_have_decl=1
10925 else
10926 ac_have_decl=0
10927 fi
10928
10929 cat >>confdefs.h <<_ACEOF
10930 #define HAVE_DECL_GETCWD $ac_have_decl
10931 _ACEOF
10932
10933
10934 GNULIB_DPRINTF=0;
10935 GNULIB_FCLOSE=0;
10936 GNULIB_FDOPEN=0;
10937 GNULIB_FFLUSH=0;
10938 GNULIB_FGETC=0;
10939 GNULIB_FGETS=0;
10940 GNULIB_FOPEN=0;
10941 GNULIB_FPRINTF=0;
10942 GNULIB_FPRINTF_POSIX=0;
10943 GNULIB_FPURGE=0;
10944 GNULIB_FPUTC=0;
10945 GNULIB_FPUTS=0;
10946 GNULIB_FREAD=0;
10947 GNULIB_FREOPEN=0;
10948 GNULIB_FSCANF=0;
10949 GNULIB_FSEEK=0;
10950 GNULIB_FSEEKO=0;
10951 GNULIB_FTELL=0;
10952 GNULIB_FTELLO=0;
10953 GNULIB_FWRITE=0;
10954 GNULIB_GETC=0;
10955 GNULIB_GETCHAR=0;
10956 GNULIB_GETDELIM=0;
10957 GNULIB_GETLINE=0;
10958 GNULIB_OBSTACK_PRINTF=0;
10959 GNULIB_OBSTACK_PRINTF_POSIX=0;
10960 GNULIB_PCLOSE=0;
10961 GNULIB_PERROR=0;
10962 GNULIB_POPEN=0;
10963 GNULIB_PRINTF=0;
10964 GNULIB_PRINTF_POSIX=0;
10965 GNULIB_PUTC=0;
10966 GNULIB_PUTCHAR=0;
10967 GNULIB_PUTS=0;
10968 GNULIB_REMOVE=0;
10969 GNULIB_RENAME=0;
10970 GNULIB_RENAMEAT=0;
10971 GNULIB_SCANF=0;
10972 GNULIB_SNPRINTF=0;
10973 GNULIB_SPRINTF_POSIX=0;
10974 GNULIB_STDIO_H_NONBLOCKING=0;
10975 GNULIB_STDIO_H_SIGPIPE=0;
10976 GNULIB_TMPFILE=0;
10977 GNULIB_VASPRINTF=0;
10978 GNULIB_VFSCANF=0;
10979 GNULIB_VSCANF=0;
10980 GNULIB_VDPRINTF=0;
10981 GNULIB_VFPRINTF=0;
10982 GNULIB_VFPRINTF_POSIX=0;
10983 GNULIB_VPRINTF=0;
10984 GNULIB_VPRINTF_POSIX=0;
10985 GNULIB_VSNPRINTF=0;
10986 GNULIB_VSPRINTF_POSIX=0;
10987 GNULIB_MDA_FCLOSEALL=1;
10988 GNULIB_MDA_FDOPEN=1;
10989 GNULIB_MDA_FILENO=1;
10990 GNULIB_MDA_GETW=1;
10991 GNULIB_MDA_PUTW=1;
10992 GNULIB_MDA_TEMPNAM=1;
10993 HAVE_DECL_FCLOSEALL=1;
10994 HAVE_DECL_FPURGE=1;
10995 HAVE_DECL_FSEEKO=1;
10996 HAVE_DECL_FTELLO=1;
10997 HAVE_DECL_GETDELIM=1;
10998 HAVE_DECL_GETLINE=1;
10999 HAVE_DECL_OBSTACK_PRINTF=1;
11000 HAVE_DECL_SNPRINTF=1;
11001 HAVE_DECL_VSNPRINTF=1;
11002 HAVE_DPRINTF=1;
11003 HAVE_FSEEKO=1;
11004 HAVE_FTELLO=1;
11005 HAVE_PCLOSE=1;
11006 HAVE_POPEN=1;
11007 HAVE_RENAMEAT=1;
11008 HAVE_VASPRINTF=1;
11009 HAVE_VDPRINTF=1;
11010 REPLACE_DPRINTF=0;
11011 REPLACE_FCLOSE=0;
11012 REPLACE_FDOPEN=0;
11013 REPLACE_FFLUSH=0;
11014 REPLACE_FOPEN=0;
11015 REPLACE_FPRINTF=0;
11016 REPLACE_FPURGE=0;
11017 REPLACE_FREOPEN=0;
11018 REPLACE_FSEEK=0;
11019 REPLACE_FSEEKO=0;
11020 REPLACE_FTELL=0;
11021 REPLACE_FTELLO=0;
11022 REPLACE_GETDELIM=0;
11023 REPLACE_GETLINE=0;
11024 REPLACE_OBSTACK_PRINTF=0;
11025 REPLACE_PERROR=0;
11026 REPLACE_POPEN=0;
11027 REPLACE_PRINTF=0;
11028 REPLACE_REMOVE=0;
11029 REPLACE_RENAME=0;
11030 REPLACE_RENAMEAT=0;
11031 REPLACE_SNPRINTF=0;
11032 REPLACE_SPRINTF=0;
11033 REPLACE_STDIO_READ_FUNCS=0;
11034 REPLACE_STDIO_WRITE_FUNCS=0;
11035 REPLACE_TMPFILE=0;
11036 REPLACE_VASPRINTF=0;
11037 REPLACE_VDPRINTF=0;
11038 REPLACE_VFPRINTF=0;
11039 REPLACE_VPRINTF=0;
11040 REPLACE_VSNPRINTF=0;
11041 REPLACE_VSPRINTF=0;
11042
11043 ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
11044 if test "x$ac_cv_have_decl_getdelim" = xyes; then :
11045 ac_have_decl=1
11046 else
11047 ac_have_decl=0
11048 fi
11049
11050 cat >>confdefs.h <<_ACEOF
11051 #define HAVE_DECL_GETDELIM $ac_have_decl
11052 _ACEOF
11053
11054
11055
11056
11057
11058 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
11059 if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
11060 ac_have_decl=1
11061 else
11062 ac_have_decl=0
11063 fi
11064
11065 cat >>confdefs.h <<_ACEOF
11066 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
11067 _ACEOF
11068
11069 ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
11070 if test "x$ac_cv_have_decl_getline" = xyes; then :
11071 ac_have_decl=1
11072 else
11073 ac_have_decl=0
11074 fi
11075
11076 cat >>confdefs.h <<_ACEOF
11077 #define HAVE_DECL_GETLINE $ac_have_decl
11078 _ACEOF
11079
11080 ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
11081 if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
11082 ac_have_decl=1
11083 else
11084 ac_have_decl=0
11085 fi
11086
11087 cat >>confdefs.h <<_ACEOF
11088 #define HAVE_DECL_GETLOGIN_R $ac_have_decl
11089 _ACEOF
11090
11091
11092
11093 ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
11094 if test "x$ac_cv_have_decl_getlogin" = xyes; then :
11095 ac_have_decl=1
11096 else
11097 ac_have_decl=0
11098 fi
11099
11100 cat >>confdefs.h <<_ACEOF
11101 #define HAVE_DECL_GETLOGIN $ac_have_decl
11102 _ACEOF
11103
11104
11105
11106 case $host_os in
11107 mingw*)
11108 LIB_GETLOGIN='-ladvapi32' ;;
11109 *)
11110 LIB_GETLOGIN= ;;
11111 esac
11112
11113
11114
11115
11116
11117
11118
11119 GNULIB_GETRANDOM=0;
11120 HAVE_GETRANDOM=1;
11121 REPLACE_GETRANDOM=0;
11122
11123
11124
11125
11126 GNULIB_GETTIMEOFDAY=0;
11127 HAVE_GETTIMEOFDAY=1;
11128 HAVE_STRUCT_TIMEVAL=1;
11129 HAVE_SYS_TIME_H=1;
11130 REPLACE_GETTIMEOFDAY=0;
11131 REPLACE_STRUCT_TIMEVAL=0;
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148 if test $gl_cv_have_include_next = yes; then
11149 gl_cv_next_sys_time_h='<'sys/time.h'>'
11150 else
11151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
11152 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
11153 if ${gl_cv_next_sys_time_h+:} false; then :
11154 $as_echo_n "(cached) " >&6
11155 else
11156
11157 if test $ac_cv_header_sys_time_h = yes; then
11158
11159
11160
11161
11162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11163 /* end confdefs.h. */
11164 #include <sys/time.h>
11165 _ACEOF
11166 case "$host_os" in
11167 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11168 *) gl_absname_cpp="$ac_cpp" ;;
11169 esac
11170
11171 case "$host_os" in
11172 mingw*)
11173 gl_dirsep_regex='[/\\]'
11174 ;;
11175 *)
11176 gl_dirsep_regex='\/'
11177 ;;
11178 esac
11179 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11180 gl_header_literal_regex=`echo 'sys/time.h' \
11181 | sed -e "$gl_make_literal_regex_sed"`
11182 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11183 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11184 s|^/[^/]|//&|
11185 p
11186 q
11187 }'
11188
11189 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11190 sed -n "$gl_absolute_header_sed"`
11191
11192 gl_header=$gl_cv_absolute_sys_time_h
11193 gl_cv_next_sys_time_h='"'$gl_header'"'
11194 else
11195 gl_cv_next_sys_time_h='<'sys/time.h'>'
11196 fi
11197
11198
11199 fi
11200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
11201 $as_echo "$gl_cv_next_sys_time_h" >&6; }
11202 fi
11203 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
11204
11205 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11206 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11207 gl_next_as_first_directive='<'sys/time.h'>'
11208 else
11209 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11210 gl_next_as_first_directive=$gl_cv_next_sys_time_h
11211 fi
11212 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
11213
11214
11215
11216
11217
11218 if test $ac_cv_header_sys_time_h != yes; then
11219 HAVE_SYS_TIME_H=0
11220 fi
11221
11222
11223
11224
11225
11226 if test $ac_cv_header_sys_socket_h != yes; then
11227 for ac_header in winsock2.h
11228 do :
11229 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
11230 if test "x$ac_cv_header_winsock2_h" = xyes; then :
11231 cat >>confdefs.h <<_ACEOF
11232 #define HAVE_WINSOCK2_H 1
11233 _ACEOF
11234
11235 fi
11236
11237 done
11238
11239 fi
11240 if test "$ac_cv_header_winsock2_h" = yes; then
11241 HAVE_WINSOCK2_H=1
11242 UNISTD_H_HAVE_WINSOCK2_H=1
11243 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
11244 else
11245 HAVE_WINSOCK2_H=0
11246 fi
11247
11248
11249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
11250 $as_echo_n "checking for struct timeval... " >&6; }
11251 if ${gl_cv_sys_struct_timeval+:} false; then :
11252 $as_echo_n "(cached) " >&6
11253 else
11254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11255 /* end confdefs.h. */
11256 #if HAVE_SYS_TIME_H
11257 #include <sys/time.h>
11258 #endif
11259 #include <time.h>
11260 #if HAVE_WINSOCK2_H
11261 # include <winsock2.h>
11262 #endif
11263
11264 int
11265 main ()
11266 {
11267 static struct timeval x; x.tv_sec = x.tv_usec;
11268 ;
11269 return 0;
11270 }
11271 _ACEOF
11272 if ac_fn_c_try_compile "$LINENO"; then :
11273 gl_cv_sys_struct_timeval=yes
11274 else
11275 gl_cv_sys_struct_timeval=no
11276 fi
11277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11278
11279 fi
11280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
11281 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
11282 if test $gl_cv_sys_struct_timeval != yes; then
11283 HAVE_STRUCT_TIMEVAL=0
11284 else
11285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
11286 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
11287 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
11288 $as_echo_n "(cached) " >&6
11289 else
11290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11291 /* end confdefs.h. */
11292 #if HAVE_SYS_TIME_H
11293 #include <sys/time.h>
11294 #endif
11295 #include <time.h>
11296 #if HAVE_WINSOCK2_H
11297 # include <winsock2.h>
11298 #endif
11299
11300 int
11301 main ()
11302 {
11303 static struct timeval x;
11304 typedef int verify_tv_sec_type[
11305 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
11306 ];
11307
11308 ;
11309 return 0;
11310 }
11311 _ACEOF
11312 if ac_fn_c_try_compile "$LINENO"; then :
11313 gl_cv_sys_struct_timeval_tv_sec=yes
11314 else
11315 gl_cv_sys_struct_timeval_tv_sec=no
11316 fi
11317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11318
11319 fi
11320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
11321 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
11322 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
11323 REPLACE_STRUCT_TIMEVAL=1
11324 fi
11325 fi
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337 GNULIB_GLOB=0;
11338 HAVE_GLOB=1;
11339 HAVE_GLOB_PATTERN_P=1;
11340 REPLACE_GLOB=0;
11341 REPLACE_GLOB_PATTERN_P=0;
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359 if test $gl_cv_have_include_next = yes; then
11360 gl_cv_next_glob_h='<'glob.h'>'
11361 else
11362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5
11363 $as_echo_n "checking absolute name of <glob.h>... " >&6; }
11364 if ${gl_cv_next_glob_h+:} false; then :
11365 $as_echo_n "(cached) " >&6
11366 else
11367
11368 if test $ac_cv_header_glob_h = yes; then
11369
11370
11371
11372
11373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11374 /* end confdefs.h. */
11375 #include <glob.h>
11376 _ACEOF
11377 case "$host_os" in
11378 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11379 *) gl_absname_cpp="$ac_cpp" ;;
11380 esac
11381
11382 case "$host_os" in
11383 mingw*)
11384 gl_dirsep_regex='[/\\]'
11385 ;;
11386 *)
11387 gl_dirsep_regex='\/'
11388 ;;
11389 esac
11390 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11391 gl_header_literal_regex=`echo 'glob.h' \
11392 | sed -e "$gl_make_literal_regex_sed"`
11393 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11394 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11395 s|^/[^/]|//&|
11396 p
11397 q
11398 }'
11399
11400 gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11401 sed -n "$gl_absolute_header_sed"`
11402
11403 gl_header=$gl_cv_absolute_glob_h
11404 gl_cv_next_glob_h='"'$gl_header'"'
11405 else
11406 gl_cv_next_glob_h='<'glob.h'>'
11407 fi
11408
11409
11410 fi
11411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5
11412 $as_echo "$gl_cv_next_glob_h" >&6; }
11413 fi
11414 NEXT_GLOB_H=$gl_cv_next_glob_h
11415
11416 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11417 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11418 gl_next_as_first_directive='<'glob.h'>'
11419 else
11420 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11421 gl_next_as_first_directive=$gl_cv_next_glob_h
11422 fi
11423 NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive
11424
11425
11426
11427
11428
11429 if test $ac_cv_header_glob_h = yes; then
11430 HAVE_GLOB_H=1
11431 else
11432 HAVE_GLOB_H=0
11433 fi
11434
11435
11436 GLOB_H=''
11437 if false; then
11438 GLOB_H=glob.h
11439 else
11440 if test $ac_cv_header_glob_h != yes; then
11441 GLOB_H=glob.h
11442 fi
11443 fi
11444
11445
11446 if test -n "$GLOB_H"; then
11447 GL_GENERATE_GLOB_H_TRUE=
11448 GL_GENERATE_GLOB_H_FALSE='#'
11449 else
11450 GL_GENERATE_GLOB_H_TRUE='#'
11451 GL_GENERATE_GLOB_H_FALSE=
11452 fi
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469 if test -z "$gl_pthreadlib_body_done"; then
11470 gl_pthread_api=no
11471 LIBPTHREAD=
11472 LIBPMULTITHREAD=
11473 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
11474 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
11475 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11476 if test "x$ac_cv_header_pthread_h" = xyes; then :
11477 gl_have_pthread_h=yes
11478 else
11479 gl_have_pthread_h=no
11480 fi
11481
11482
11483 if test "$gl_have_pthread_h" = yes; then
11484 # Other possible tests:
11485 # -lpthreads (FSU threads, PCthreads)
11486 # -lgthreads
11487 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
11488 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
11489 # the second one only in libpthread, and lock.c needs it.
11490 #
11491 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
11492 # needs -pthread for some reason. See:
11493 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
11494 save_LIBS=$LIBS
11495 for gl_pthread in '' '-pthread'; do
11496 LIBS="$LIBS $gl_pthread"
11497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11498 /* end confdefs.h. */
11499 #include <pthread.h>
11500 pthread_mutex_t m;
11501 pthread_mutexattr_t ma;
11502
11503 int
11504 main ()
11505 {
11506 pthread_mutex_lock (&m);
11507 pthread_mutexattr_init (&ma);
11508 ;
11509 return 0;
11510 }
11511 _ACEOF
11512 if ac_fn_c_try_link "$LINENO"; then :
11513 gl_pthread_api=yes
11514 LIBPTHREAD=$gl_pthread
11515 LIBPMULTITHREAD=$gl_pthread
11516 fi
11517 rm -f core conftest.err conftest.$ac_objext \
11518 conftest$ac_exeext conftest.$ac_ext
11519 LIBS=$save_LIBS
11520 test $gl_pthread_api = yes && break
11521 done
11522
11523 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
11524 # since it is defined as a macro on OSF/1.)
11525 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
11526 # The program links fine without libpthread. But it may actually
11527 # need to link with libpthread in order to create multiple threads.
11528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11529 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11530 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
11531 $as_echo_n "(cached) " >&6
11532 else
11533 ac_check_lib_save_LIBS=$LIBS
11534 LIBS="-lpthread $LIBS"
11535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11536 /* end confdefs.h. */
11537
11538 /* Override any GCC internal prototype to avoid an error.
11539 Use char because int might match the return type of a GCC
11540 builtin and then its argument prototype would still apply. */
11541 #ifdef __cplusplus
11542 extern "C"
11543 #endif
11544 char pthread_kill ();
11545 int
11546 main ()
11547 {
11548 return pthread_kill ();
11549 ;
11550 return 0;
11551 }
11552 _ACEOF
11553 if ac_fn_c_try_link "$LINENO"; then :
11554 ac_cv_lib_pthread_pthread_kill=yes
11555 else
11556 ac_cv_lib_pthread_pthread_kill=no
11557 fi
11558 rm -f core conftest.err conftest.$ac_objext \
11559 conftest$ac_exeext conftest.$ac_ext
11560 LIBS=$ac_check_lib_save_LIBS
11561 fi
11562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11563 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11564 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
11565 LIBPMULTITHREAD=-lpthread
11566 # On Solaris and HP-UX, most pthread functions exist also in libc.
11567 # Therefore pthread_in_use() needs to actually try to create a
11568 # thread: pthread_create from libc will fail, whereas
11569 # pthread_create will actually create a thread.
11570 # On Solaris 10 or newer, this test is no longer needed, because
11571 # libc contains the fully functional pthread functions.
11572 case "$host_os" in
11573 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
11574
11575 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
11576
11577 esac
11578
11579 fi
11580
11581 elif test $gl_pthread_api != yes; then
11582 # Some library is needed. Try libpthread and libc_r.
11583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11584 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11585 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
11586 $as_echo_n "(cached) " >&6
11587 else
11588 ac_check_lib_save_LIBS=$LIBS
11589 LIBS="-lpthread $LIBS"
11590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11591 /* end confdefs.h. */
11592
11593 /* Override any GCC internal prototype to avoid an error.
11594 Use char because int might match the return type of a GCC
11595 builtin and then its argument prototype would still apply. */
11596 #ifdef __cplusplus
11597 extern "C"
11598 #endif
11599 char pthread_kill ();
11600 int
11601 main ()
11602 {
11603 return pthread_kill ();
11604 ;
11605 return 0;
11606 }
11607 _ACEOF
11608 if ac_fn_c_try_link "$LINENO"; then :
11609 ac_cv_lib_pthread_pthread_kill=yes
11610 else
11611 ac_cv_lib_pthread_pthread_kill=no
11612 fi
11613 rm -f core conftest.err conftest.$ac_objext \
11614 conftest$ac_exeext conftest.$ac_ext
11615 LIBS=$ac_check_lib_save_LIBS
11616 fi
11617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11618 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11619 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
11620 gl_pthread_api=yes
11621 LIBPTHREAD=-lpthread
11622 LIBPMULTITHREAD=-lpthread
11623 fi
11624
11625 if test $gl_pthread_api != yes; then
11626 # For FreeBSD 4.
11627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
11628 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
11629 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
11630 $as_echo_n "(cached) " >&6
11631 else
11632 ac_check_lib_save_LIBS=$LIBS
11633 LIBS="-lc_r $LIBS"
11634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11635 /* end confdefs.h. */
11636
11637 /* Override any GCC internal prototype to avoid an error.
11638 Use char because int might match the return type of a GCC
11639 builtin and then its argument prototype would still apply. */
11640 #ifdef __cplusplus
11641 extern "C"
11642 #endif
11643 char pthread_kill ();
11644 int
11645 main ()
11646 {
11647 return pthread_kill ();
11648 ;
11649 return 0;
11650 }
11651 _ACEOF
11652 if ac_fn_c_try_link "$LINENO"; then :
11653 ac_cv_lib_c_r_pthread_kill=yes
11654 else
11655 ac_cv_lib_c_r_pthread_kill=no
11656 fi
11657 rm -f core conftest.err conftest.$ac_objext \
11658 conftest$ac_exeext conftest.$ac_ext
11659 LIBS=$ac_check_lib_save_LIBS
11660 fi
11661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
11662 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
11663 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
11664 gl_pthread_api=yes
11665 LIBPTHREAD=-lc_r
11666 LIBPMULTITHREAD=-lc_r
11667 fi
11668
11669 fi
11670 fi
11671 fi
11672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
11673 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
11674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
11675 $as_echo "$gl_pthread_api" >&6; }
11676
11677
11678 if test $gl_pthread_api = yes; then
11679
11680 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
11681
11682 fi
11683
11684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11685 /* end confdefs.h. */
11686 #include <sched.h>
11687 int
11688 main ()
11689 {
11690 sched_yield ();
11691 ;
11692 return 0;
11693 }
11694 _ACEOF
11695 if ac_fn_c_try_link "$LINENO"; then :
11696 LIB_SCHED_YIELD=
11697
11698 else
11699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
11700 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
11701 if ${ac_cv_lib_rt_sched_yield+:} false; then :
11702 $as_echo_n "(cached) " >&6
11703 else
11704 ac_check_lib_save_LIBS=$LIBS
11705 LIBS="-lrt $LIBS"
11706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11707 /* end confdefs.h. */
11708
11709 /* Override any GCC internal prototype to avoid an error.
11710 Use char because int might match the return type of a GCC
11711 builtin and then its argument prototype would still apply. */
11712 #ifdef __cplusplus
11713 extern "C"
11714 #endif
11715 char sched_yield ();
11716 int
11717 main ()
11718 {
11719 return sched_yield ();
11720 ;
11721 return 0;
11722 }
11723 _ACEOF
11724 if ac_fn_c_try_link "$LINENO"; then :
11725 ac_cv_lib_rt_sched_yield=yes
11726 else
11727 ac_cv_lib_rt_sched_yield=no
11728 fi
11729 rm -f core conftest.err conftest.$ac_objext \
11730 conftest$ac_exeext conftest.$ac_ext
11731 LIBS=$ac_check_lib_save_LIBS
11732 fi
11733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
11734 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
11735 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
11736 LIB_SCHED_YIELD=-lrt
11737 else
11738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
11739 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
11740 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
11741 $as_echo_n "(cached) " >&6
11742 else
11743 ac_check_lib_save_LIBS=$LIBS
11744 LIBS="-lposix4 $LIBS"
11745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11746 /* end confdefs.h. */
11747
11748 /* Override any GCC internal prototype to avoid an error.
11749 Use char because int might match the return type of a GCC
11750 builtin and then its argument prototype would still apply. */
11751 #ifdef __cplusplus
11752 extern "C"
11753 #endif
11754 char sched_yield ();
11755 int
11756 main ()
11757 {
11758 return sched_yield ();
11759 ;
11760 return 0;
11761 }
11762 _ACEOF
11763 if ac_fn_c_try_link "$LINENO"; then :
11764 ac_cv_lib_posix4_sched_yield=yes
11765 else
11766 ac_cv_lib_posix4_sched_yield=no
11767 fi
11768 rm -f core conftest.err conftest.$ac_objext \
11769 conftest$ac_exeext conftest.$ac_ext
11770 LIBS=$ac_check_lib_save_LIBS
11771 fi
11772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
11773 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
11774 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
11775 LIB_SCHED_YIELD=-lposix4
11776 fi
11777
11778 fi
11779
11780
11781 fi
11782 rm -f core conftest.err conftest.$ac_objext \
11783 conftest$ac_exeext conftest.$ac_ext
11784
11785
11786 gl_pthreadlib_body_done=done
11787 fi
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
11798 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
11799 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
11800 $as_echo_n "(cached) " >&6
11801 else
11802 case "$host_os" in
11803 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
11804 *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
11805 gl_cv_func_setlocale_null_all_mtsafe=no ;;
11806 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
11807 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
11808 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
11809 # If we don't know, obey --enable-cross-guesses.
11810 *)
11811 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
11812 esac
11813
11814 fi
11815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
11816 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
11817 case "$host_os" in
11818 mingw*) ;;
11819 *)
11820 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
11821 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
11822 fi
11823 ;;
11824 esac
11825 case "$gl_cv_func_setlocale_null_all_mtsafe" in
11826 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
11827 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
11828 esac
11829
11830 cat >>confdefs.h <<_ACEOF
11831 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
11832 _ACEOF
11833
11834
11835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
11836 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
11837 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
11838 $as_echo_n "(cached) " >&6
11839 else
11840 case "$host_os" in
11841 # Guess no on OpenBSD, AIX.
11842 openbsd* | aix*)
11843 gl_cv_func_setlocale_null_one_mtsafe=no ;;
11844 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
11845 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
11846 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
11847 # If we don't know, obey --enable-cross-guesses.
11848 *)
11849 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
11850 esac
11851
11852 fi
11853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
11854 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
11855 case "$host_os" in
11856 mingw*) ;;
11857 *)
11858 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
11859 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
11860 fi
11861 ;;
11862 esac
11863 case "$gl_cv_func_setlocale_null_one_mtsafe" in
11864 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
11865 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
11866 esac
11867
11868 cat >>confdefs.h <<_ACEOF
11869 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
11870 _ACEOF
11871
11872
11873 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
11874 case "$host_os" in
11875 mingw*) LIB_SETLOCALE_NULL= ;;
11876 *)
11877
11878
11879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
11880 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
11881 if ${gl_cv_have_weak+:} false; then :
11882 $as_echo_n "(cached) " >&6
11883 else
11884 gl_cv_have_weak=no
11885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11886 /* end confdefs.h. */
11887 extern void xyzzy ();
11888 #pragma weak xyzzy
11889 int
11890 main ()
11891 {
11892 xyzzy();
11893 ;
11894 return 0;
11895 }
11896 _ACEOF
11897 if ac_fn_c_try_link "$LINENO"; then :
11898 gl_cv_have_weak=maybe
11899 fi
11900 rm -f core conftest.err conftest.$ac_objext \
11901 conftest$ac_exeext conftest.$ac_ext
11902 if test $gl_cv_have_weak = maybe; then
11903 if test "$cross_compiling" = yes; then :
11904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11905 /* end confdefs.h. */
11906 #ifdef __ELF__
11907 Extensible Linking Format
11908 #endif
11909
11910 _ACEOF
11911 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11912 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
11913 gl_cv_have_weak="guessing yes"
11914 else
11915 gl_cv_have_weak="guessing no"
11916 fi
11917 rm -f conftest*
11918
11919
11920 else
11921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11922 /* end confdefs.h. */
11923
11924 #include <stdio.h>
11925 #pragma weak fputs
11926 int main ()
11927 {
11928 return (fputs == NULL);
11929 }
11930 _ACEOF
11931 if ac_fn_c_try_run "$LINENO"; then :
11932 gl_cv_have_weak=yes
11933 else
11934 gl_cv_have_weak=no
11935 fi
11936 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11937 conftest.$ac_objext conftest.beam conftest.$ac_ext
11938 fi
11939
11940 fi
11941 case " $LDFLAGS " in
11942 *" -static "*) gl_cv_have_weak=no ;;
11943 esac
11944 case "$gl_cv_have_weak" in
11945 *yes)
11946 case "$host_os" in
11947 freebsd* | dragonfly*)
11948 : > conftest1.c
11949 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
11950 cat <<EOF > conftest2.c
11951 #include <pthread.h>
11952 #pragma weak pthread_mutexattr_gettype
11953 int main ()
11954 {
11955 return (pthread_mutexattr_gettype != NULL);
11956 }
11957 EOF
11958 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
11959 || gl_cv_have_weak=no
11960 rm -f conftest1.c libempty.so conftest2.c conftest
11961 ;;
11962 esac
11963 ;;
11964 esac
11965
11966 fi
11967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
11968 $as_echo "$gl_cv_have_weak" >&6; }
11969 case "$gl_cv_have_weak" in
11970 *yes)
11971
11972 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
11973
11974 ;;
11975 esac
11976
11977 case "$gl_cv_have_weak" in
11978 *yes) LIB_SETLOCALE_NULL= ;;
11979 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
11980 esac
11981 ;;
11982 esac
11983 else
11984 LIB_SETLOCALE_NULL=
11985 fi
11986
11987
11988
11989
11990
11991 GNULIB_SOCKET=0;
11992 GNULIB_CONNECT=0;
11993 GNULIB_ACCEPT=0;
11994 GNULIB_BIND=0;
11995 GNULIB_GETPEERNAME=0;
11996 GNULIB_GETSOCKNAME=0;
11997 GNULIB_GETSOCKOPT=0;
11998 GNULIB_LISTEN=0;
11999 GNULIB_RECV=0;
12000 GNULIB_SEND=0;
12001 GNULIB_RECVFROM=0;
12002 GNULIB_SENDTO=0;
12003 GNULIB_SETSOCKOPT=0;
12004 GNULIB_SHUTDOWN=0;
12005 GNULIB_ACCEPT4=0;
12006 HAVE_STRUCT_SOCKADDR_STORAGE=1;
12007 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
12008
12009 HAVE_SA_FAMILY_T=1;
12010 HAVE_ACCEPT4=1;
12011
12012
12013
12014
12015
12016 case "$host_os" in
12017 osf*)
12018
12019 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
12020
12021 ;;
12022 esac
12023
12024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
12025 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
12026 if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
12027 $as_echo_n "(cached) " >&6
12028 else
12029
12030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12031 /* end confdefs.h. */
12032 #include <sys/socket.h>
12033 int
12034 main ()
12035 {
12036
12037 ;
12038 return 0;
12039 }
12040 _ACEOF
12041 if ac_fn_c_try_compile "$LINENO"; then :
12042 gl_cv_header_sys_socket_h_selfcontained=yes
12043 else
12044 gl_cv_header_sys_socket_h_selfcontained=no
12045 fi
12046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12047
12048 fi
12049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
12050 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
12051 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
12052 for ac_func in shutdown
12053 do :
12054 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
12055 if test "x$ac_cv_func_shutdown" = xyes; then :
12056 cat >>confdefs.h <<_ACEOF
12057 #define HAVE_SHUTDOWN 1
12058 _ACEOF
12059
12060 fi
12061 done
12062
12063 if test $ac_cv_func_shutdown = yes; then
12064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
12065 $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
12066 if ${gl_cv_header_sys_socket_h_shut+:} false; then :
12067 $as_echo_n "(cached) " >&6
12068 else
12069
12070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12071 /* end confdefs.h. */
12072 #include <sys/socket.h>
12073 int
12074 main ()
12075 {
12076 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
12077 ;
12078 return 0;
12079 }
12080 _ACEOF
12081 if ac_fn_c_try_compile "$LINENO"; then :
12082 gl_cv_header_sys_socket_h_shut=yes
12083 else
12084 gl_cv_header_sys_socket_h_shut=no
12085 fi
12086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12087
12088 fi
12089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
12090 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
12091 if test $gl_cv_header_sys_socket_h_shut = no; then
12092 SYS_SOCKET_H='sys/socket.h'
12093 fi
12094 fi
12095 fi
12096 # We need to check for ws2tcpip.h now.
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108 if test $gl_cv_have_include_next = yes; then
12109 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
12110 else
12111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
12112 $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
12113 if ${gl_cv_next_sys_socket_h+:} false; then :
12114 $as_echo_n "(cached) " >&6
12115 else
12116
12117 if test $ac_cv_header_sys_socket_h = yes; then
12118
12119
12120
12121
12122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12123 /* end confdefs.h. */
12124 #include <sys/socket.h>
12125 _ACEOF
12126 case "$host_os" in
12127 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12128 *) gl_absname_cpp="$ac_cpp" ;;
12129 esac
12130
12131 case "$host_os" in
12132 mingw*)
12133 gl_dirsep_regex='[/\\]'
12134 ;;
12135 *)
12136 gl_dirsep_regex='\/'
12137 ;;
12138 esac
12139 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12140 gl_header_literal_regex=`echo 'sys/socket.h' \
12141 | sed -e "$gl_make_literal_regex_sed"`
12142 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12143 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12144 s|^/[^/]|//&|
12145 p
12146 q
12147 }'
12148
12149 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12150 sed -n "$gl_absolute_header_sed"`
12151
12152 gl_header=$gl_cv_absolute_sys_socket_h
12153 gl_cv_next_sys_socket_h='"'$gl_header'"'
12154 else
12155 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
12156 fi
12157
12158
12159 fi
12160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
12161 $as_echo "$gl_cv_next_sys_socket_h" >&6; }
12162 fi
12163 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
12164
12165 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12166 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12167 gl_next_as_first_directive='<'sys/socket.h'>'
12168 else
12169 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12170 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
12171 fi
12172 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
12173
12174
12175
12176
12177 if test $ac_cv_header_sys_socket_h = yes; then
12178 HAVE_SYS_SOCKET_H=1
12179 else
12180 HAVE_SYS_SOCKET_H=0
12181 fi
12182
12183
12184
12185 if test $ac_cv_header_sys_socket_h = yes; then
12186 HAVE_WS2TCPIP_H=0
12187 else
12188 if test $ac_cv_header_ws2tcpip_h = yes; then
12189 HAVE_WS2TCPIP_H=1
12190 else
12191 HAVE_WS2TCPIP_H=0
12192 fi
12193 fi
12194
12195
12196
12197 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
12198 /* sys/types.h is not needed according to POSIX, but the
12199 sys/socket.h in i386-unknown-freebsd4.10 and
12200 powerpc-apple-darwin5.5 required it. */
12201 #include <sys/types.h>
12202 #ifdef HAVE_SYS_SOCKET_H
12203 #include <sys/socket.h>
12204 #endif
12205 #ifdef HAVE_WS2TCPIP_H
12206 #include <ws2tcpip.h>
12207 #endif
12208
12209 "
12210 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
12211
12212 cat >>confdefs.h <<_ACEOF
12213 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
12214 _ACEOF
12215
12216
12217 fi
12218 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
12219 /* sys/types.h is not needed according to POSIX, but the
12220 sys/socket.h in i386-unknown-freebsd4.10 and
12221 powerpc-apple-darwin5.5 required it. */
12222 #include <sys/types.h>
12223 #ifdef HAVE_SYS_SOCKET_H
12224 #include <sys/socket.h>
12225 #endif
12226 #ifdef HAVE_WS2TCPIP_H
12227 #include <ws2tcpip.h>
12228 #endif
12229
12230 "
12231 if test "x$ac_cv_type_sa_family_t" = xyes; then :
12232
12233 cat >>confdefs.h <<_ACEOF
12234 #define HAVE_SA_FAMILY_T 1
12235 _ACEOF
12236
12237
12238 fi
12239
12240 if test $ac_cv_type_struct_sockaddr_storage = no; then
12241 HAVE_STRUCT_SOCKADDR_STORAGE=0
12242 fi
12243 if test $ac_cv_type_sa_family_t = no; then
12244 HAVE_SA_FAMILY_T=0
12245 fi
12246 if test $ac_cv_type_struct_sockaddr_storage != no; then
12247 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
12248 #ifdef HAVE_SYS_SOCKET_H
12249 #include <sys/socket.h>
12250 #endif
12251 #ifdef HAVE_WS2TCPIP_H
12252 #include <ws2tcpip.h>
12253 #endif
12254
12255 "
12256 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
12257
12258 cat >>confdefs.h <<_ACEOF
12259 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
12260 _ACEOF
12261
12262
12263 else
12264 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
12265 fi
12266
12267 fi
12268 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
12269 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
12270 SYS_SOCKET_H='sys/socket.h'
12271 fi
12272
12273
12274
12275
12276 if test $ac_cv_header_sys_socket_h != yes; then
12277 for ac_header in winsock2.h
12278 do :
12279 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12280 if test "x$ac_cv_header_winsock2_h" = xyes; then :
12281 cat >>confdefs.h <<_ACEOF
12282 #define HAVE_WINSOCK2_H 1
12283 _ACEOF
12284
12285 fi
12286
12287 done
12288
12289 fi
12290 if test "$ac_cv_header_winsock2_h" = yes; then
12291 HAVE_WINSOCK2_H=1
12292 UNISTD_H_HAVE_WINSOCK2_H=1
12293 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
12294 else
12295 HAVE_WINSOCK2_H=0
12296 fi
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
12313 $as_echo_n "checking for IPv4 sockets... " >&6; }
12314 if ${gl_cv_socket_ipv4+:} false; then :
12315 $as_echo_n "(cached) " >&6
12316 else
12317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12318 /* end confdefs.h. */
12319 #include <sys/types.h>
12320 #ifdef HAVE_SYS_SOCKET_H
12321 #include <sys/socket.h>
12322 #endif
12323 #ifdef HAVE_NETINET_IN_H
12324 #include <netinet/in.h>
12325 #endif
12326 #ifdef HAVE_WINSOCK2_H
12327 #include <winsock2.h>
12328 #endif
12329 int
12330 main ()
12331 {
12332 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
12333 if (&x && &y && &z) return 0;
12334 ;
12335 return 0;
12336 }
12337 _ACEOF
12338 if ac_fn_c_try_compile "$LINENO"; then :
12339 gl_cv_socket_ipv4=yes
12340 else
12341 gl_cv_socket_ipv4=no
12342 fi
12343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12344 fi
12345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
12346 $as_echo "$gl_cv_socket_ipv4" >&6; }
12347 if test $gl_cv_socket_ipv4 = yes; then
12348
12349 $as_echo "#define HAVE_IPV4 1" >>confdefs.h
12350
12351 fi
12352
12353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
12354 $as_echo_n "checking for IPv6 sockets... " >&6; }
12355 if ${gl_cv_socket_ipv6+:} false; then :
12356 $as_echo_n "(cached) " >&6
12357 else
12358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12359 /* end confdefs.h. */
12360 #include <sys/types.h>
12361 #ifdef HAVE_SYS_SOCKET_H
12362 #include <sys/socket.h>
12363 #endif
12364 #ifdef HAVE_NETINET_IN_H
12365 #include <netinet/in.h>
12366 #endif
12367 #ifdef HAVE_WINSOCK2_H
12368 #include <winsock2.h>
12369 #endif
12370 #ifdef HAVE_WS2TCPIP_H
12371 #include <ws2tcpip.h>
12372 #endif
12373 int
12374 main ()
12375 {
12376 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
12377 if (&x && &y && &z) return 0;
12378 ;
12379 return 0;
12380 }
12381 _ACEOF
12382 if ac_fn_c_try_compile "$LINENO"; then :
12383 gl_cv_socket_ipv6=yes
12384 else
12385 gl_cv_socket_ipv6=no
12386 fi
12387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12388 fi
12389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
12390 $as_echo "$gl_cv_socket_ipv6" >&6; }
12391 if test $gl_cv_socket_ipv6 = yes; then
12392
12393 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
12394
12395 fi
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409 if test $gl_cv_have_include_next = yes; then
12410 gl_cv_next_limits_h='<'limits.h'>'
12411 else
12412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
12413 $as_echo_n "checking absolute name of <limits.h>... " >&6; }
12414 if ${gl_cv_next_limits_h+:} false; then :
12415 $as_echo_n "(cached) " >&6
12416 else
12417
12418 if test $ac_cv_header_limits_h = yes; then
12419
12420
12421
12422
12423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12424 /* end confdefs.h. */
12425 #include <limits.h>
12426 _ACEOF
12427 case "$host_os" in
12428 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12429 *) gl_absname_cpp="$ac_cpp" ;;
12430 esac
12431
12432 case "$host_os" in
12433 mingw*)
12434 gl_dirsep_regex='[/\\]'
12435 ;;
12436 *)
12437 gl_dirsep_regex='\/'
12438 ;;
12439 esac
12440 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12441 gl_header_literal_regex=`echo 'limits.h' \
12442 | sed -e "$gl_make_literal_regex_sed"`
12443 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12444 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12445 s|^/[^/]|//&|
12446 p
12447 q
12448 }'
12449
12450 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12451 sed -n "$gl_absolute_header_sed"`
12452
12453 gl_header=$gl_cv_absolute_limits_h
12454 gl_cv_next_limits_h='"'$gl_header'"'
12455 else
12456 gl_cv_next_limits_h='<'limits.h'>'
12457 fi
12458
12459
12460 fi
12461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
12462 $as_echo "$gl_cv_next_limits_h" >&6; }
12463 fi
12464 NEXT_LIMITS_H=$gl_cv_next_limits_h
12465
12466 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12467 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12468 gl_next_as_first_directive='<'limits.h'>'
12469 else
12470 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12471 gl_next_as_first_directive=$gl_cv_next_limits_h
12472 fi
12473 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
12474
12475
12476
12477
12478
12479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
12480 $as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
12481 if ${gl_cv_header_limits_width+:} false; then :
12482 $as_echo_n "(cached) " >&6
12483 else
12484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12485 /* end confdefs.h. */
12486 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
12487 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
12488 #endif
12489 #include <limits.h>
12490 long long llm = LLONG_MAX;
12491 int wb = WORD_BIT;
12492 int ullw = ULLONG_WIDTH;
12493
12494 int
12495 main ()
12496 {
12497
12498 ;
12499 return 0;
12500 }
12501 _ACEOF
12502 if ac_fn_c_try_compile "$LINENO"; then :
12503 gl_cv_header_limits_width=yes
12504 else
12505 gl_cv_header_limits_width=no
12506 fi
12507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12508 fi
12509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
12510 $as_echo "$gl_cv_header_limits_width" >&6; }
12511 if test "$gl_cv_header_limits_width" = yes; then
12512 LIMITS_H=
12513 else
12514 LIMITS_H=limits.h
12515 fi
12516
12517 if test -n "$LIMITS_H"; then
12518 GL_GENERATE_LIMITS_H_TRUE=
12519 GL_GENERATE_LIMITS_H_FALSE='#'
12520 else
12521 GL_GENERATE_LIMITS_H_TRUE='#'
12522 GL_GENERATE_LIMITS_H_FALSE=
12523 fi
12524
12525
12526
12527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
12528 $as_echo_n "checking for wint_t... " >&6; }
12529 if ${gt_cv_c_wint_t+:} false; then :
12530 $as_echo_n "(cached) " >&6
12531 else
12532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12533 /* end confdefs.h. */
12534 #include <wchar.h>
12535 wint_t foo = (wchar_t)'\0';
12536 int
12537 main ()
12538 {
12539
12540 ;
12541 return 0;
12542 }
12543 _ACEOF
12544 if ac_fn_c_try_compile "$LINENO"; then :
12545 gt_cv_c_wint_t=yes
12546 else
12547 gt_cv_c_wint_t=no
12548 fi
12549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12550 fi
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
12552 $as_echo "$gt_cv_c_wint_t" >&6; }
12553 if test $gt_cv_c_wint_t = yes; then
12554
12555 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
12556
12557
12558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
12559 $as_echo_n "checking whether wint_t is large enough... " >&6; }
12560 if ${gl_cv_type_wint_t_large_enough+:} false; then :
12561 $as_echo_n "(cached) " >&6
12562 else
12563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12564 /* end confdefs.h. */
12565 #include <wchar.h>
12566 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
12567
12568 int
12569 main ()
12570 {
12571
12572 ;
12573 return 0;
12574 }
12575 _ACEOF
12576 if ac_fn_c_try_compile "$LINENO"; then :
12577 gl_cv_type_wint_t_large_enough=yes
12578 else
12579 gl_cv_type_wint_t_large_enough=no
12580 fi
12581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12582 fi
12583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
12584 $as_echo "$gl_cv_type_wint_t_large_enough" >&6; }
12585 if test $gl_cv_type_wint_t_large_enough = no; then
12586 GNULIB_OVERRIDES_WINT_T=1
12587 else
12588 GNULIB_OVERRIDES_WINT_T=0
12589 fi
12590 else
12591 GNULIB_OVERRIDES_WINT_T=0
12592 fi
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
12603 $as_echo_n "checking whether the compiler produces multi-arch binaries... " >&6; }
12604 if ${gl_cv_c_multiarch+:} false; then :
12605 $as_echo_n "(cached) " >&6
12606 else
12607 gl_cv_c_multiarch=no
12608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12609 /* end confdefs.h. */
12610 #ifndef __APPLE_CC__
12611 not a universal capable compiler
12612 #endif
12613 typedef int dummy;
12614
12615 _ACEOF
12616 if ac_fn_c_try_compile "$LINENO"; then :
12617
12618 arch=
12619 prev=
12620 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12621 if test -n "$prev"; then
12622 case $word in
12623 i?86 | x86_64 | ppc | ppc64 | arm | arm64)
12624 if test -z "$arch" || test "$arch" = "$word"; then
12625 arch="$word"
12626 else
12627 gl_cv_c_multiarch=yes
12628 fi
12629 ;;
12630 esac
12631 prev=
12632 else
12633 if test "x$word" = "x-arch"; then
12634 prev=arch
12635 fi
12636 fi
12637 done
12638
12639 fi
12640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12641
12642 fi
12643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
12644 $as_echo "$gl_cv_c_multiarch" >&6; }
12645 if test $gl_cv_c_multiarch = yes; then
12646 APPLE_UNIVERSAL_BUILD=1
12647 else
12648 APPLE_UNIVERSAL_BUILD=0
12649 fi
12650
12651
12652
12653
12654
12655
12656
12657
12658 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12659
12660
12661 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12662
12663
12664
12665 if test $ac_cv_header_wchar_h = yes; then
12666 HAVE_WCHAR_H=1
12667 else
12668 HAVE_WCHAR_H=0
12669 fi
12670
12671
12672
12673 if test $ac_cv_header_inttypes_h = yes; then
12674 HAVE_INTTYPES_H=1
12675 else
12676 HAVE_INTTYPES_H=0
12677 fi
12678
12679
12680
12681 if test $ac_cv_header_sys_types_h = yes; then
12682 HAVE_SYS_TYPES_H=1
12683 else
12684 HAVE_SYS_TYPES_H=0
12685 fi
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697 if test $gl_cv_have_include_next = yes; then
12698 gl_cv_next_stdint_h='<'stdint.h'>'
12699 else
12700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12701 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12702 if ${gl_cv_next_stdint_h+:} false; then :
12703 $as_echo_n "(cached) " >&6
12704 else
12705
12706 if test $ac_cv_header_stdint_h = yes; then
12707
12708
12709
12710
12711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12712 /* end confdefs.h. */
12713 #include <stdint.h>
12714 _ACEOF
12715 case "$host_os" in
12716 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12717 *) gl_absname_cpp="$ac_cpp" ;;
12718 esac
12719
12720 case "$host_os" in
12721 mingw*)
12722 gl_dirsep_regex='[/\\]'
12723 ;;
12724 *)
12725 gl_dirsep_regex='\/'
12726 ;;
12727 esac
12728 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12729 gl_header_literal_regex=`echo 'stdint.h' \
12730 | sed -e "$gl_make_literal_regex_sed"`
12731 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12732 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12733 s|^/[^/]|//&|
12734 p
12735 q
12736 }'
12737
12738 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12739 sed -n "$gl_absolute_header_sed"`
12740
12741 gl_header=$gl_cv_absolute_stdint_h
12742 gl_cv_next_stdint_h='"'$gl_header'"'
12743 else
12744 gl_cv_next_stdint_h='<'stdint.h'>'
12745 fi
12746
12747
12748 fi
12749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12750 $as_echo "$gl_cv_next_stdint_h" >&6; }
12751 fi
12752 NEXT_STDINT_H=$gl_cv_next_stdint_h
12753
12754 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12755 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12756 gl_next_as_first_directive='<'stdint.h'>'
12757 else
12758 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12759 gl_next_as_first_directive=$gl_cv_next_stdint_h
12760 fi
12761 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12762
12763
12764
12765
12766 if test $ac_cv_header_stdint_h = yes; then
12767 HAVE_STDINT_H=1
12768 else
12769 HAVE_STDINT_H=0
12770 fi
12771
12772
12773 if test $ac_cv_header_stdint_h = yes; then
12774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12775 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12776 if ${gl_cv_header_working_stdint_h+:} false; then :
12777 $as_echo_n "(cached) " >&6
12778 else
12779 gl_cv_header_working_stdint_h=no
12780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12781 /* end confdefs.h. */
12782
12783
12784 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12785 #define __STDC_CONSTANT_MACROS 1
12786 #define __STDC_LIMIT_MACROS 1
12787 #include <stdint.h>
12788 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
12789 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
12790 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12791 #endif
12792
12793
12794 #include <stddef.h>
12795 #include <signal.h>
12796 #if HAVE_WCHAR_H
12797 # include <wchar.h>
12798 #endif
12799
12800
12801 #ifdef INT8_MAX
12802 int8_t a1 = INT8_MAX;
12803 int8_t a1min = INT8_MIN;
12804 #endif
12805 #ifdef INT16_MAX
12806 int16_t a2 = INT16_MAX;
12807 int16_t a2min = INT16_MIN;
12808 #endif
12809 #ifdef INT32_MAX
12810 int32_t a3 = INT32_MAX;
12811 int32_t a3min = INT32_MIN;
12812 #endif
12813 #ifdef INT64_MAX
12814 int64_t a4 = INT64_MAX;
12815 int64_t a4min = INT64_MIN;
12816 #endif
12817 #ifdef UINT8_MAX
12818 uint8_t b1 = UINT8_MAX;
12819 #else
12820 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12821 #endif
12822 #ifdef UINT16_MAX
12823 uint16_t b2 = UINT16_MAX;
12824 #endif
12825 #ifdef UINT32_MAX
12826 uint32_t b3 = UINT32_MAX;
12827 #endif
12828 #ifdef UINT64_MAX
12829 uint64_t b4 = UINT64_MAX;
12830 #endif
12831 int_least8_t c1 = INT8_C (0x7f);
12832 int_least8_t c1max = INT_LEAST8_MAX;
12833 int_least8_t c1min = INT_LEAST8_MIN;
12834 int_least16_t c2 = INT16_C (0x7fff);
12835 int_least16_t c2max = INT_LEAST16_MAX;
12836 int_least16_t c2min = INT_LEAST16_MIN;
12837 int_least32_t c3 = INT32_C (0x7fffffff);
12838 int_least32_t c3max = INT_LEAST32_MAX;
12839 int_least32_t c3min = INT_LEAST32_MIN;
12840 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12841 int_least64_t c4max = INT_LEAST64_MAX;
12842 int_least64_t c4min = INT_LEAST64_MIN;
12843 uint_least8_t d1 = UINT8_C (0xff);
12844 uint_least8_t d1max = UINT_LEAST8_MAX;
12845 uint_least16_t d2 = UINT16_C (0xffff);
12846 uint_least16_t d2max = UINT_LEAST16_MAX;
12847 uint_least32_t d3 = UINT32_C (0xffffffff);
12848 uint_least32_t d3max = UINT_LEAST32_MAX;
12849 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12850 uint_least64_t d4max = UINT_LEAST64_MAX;
12851 int_fast8_t e1 = INT_FAST8_MAX;
12852 int_fast8_t e1min = INT_FAST8_MIN;
12853 int_fast16_t e2 = INT_FAST16_MAX;
12854 int_fast16_t e2min = INT_FAST16_MIN;
12855 int_fast32_t e3 = INT_FAST32_MAX;
12856 int_fast32_t e3min = INT_FAST32_MIN;
12857 int_fast64_t e4 = INT_FAST64_MAX;
12858 int_fast64_t e4min = INT_FAST64_MIN;
12859 uint_fast8_t f1 = UINT_FAST8_MAX;
12860 uint_fast16_t f2 = UINT_FAST16_MAX;
12861 uint_fast32_t f3 = UINT_FAST32_MAX;
12862 uint_fast64_t f4 = UINT_FAST64_MAX;
12863 #ifdef INTPTR_MAX
12864 intptr_t g = INTPTR_MAX;
12865 intptr_t gmin = INTPTR_MIN;
12866 #endif
12867 #ifdef UINTPTR_MAX
12868 uintptr_t h = UINTPTR_MAX;
12869 #endif
12870 intmax_t i = INTMAX_MAX;
12871 uintmax_t j = UINTMAX_MAX;
12872
12873 /* Check that SIZE_MAX has the correct type, if possible. */
12874 #if 201112 <= __STDC_VERSION__
12875 int k = _Generic (SIZE_MAX, size_t: 0);
12876 #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
12877 || (0x5110 <= __SUNPRO_C && !__STDC__))
12878 extern size_t k;
12879 extern __typeof__ (SIZE_MAX) k;
12880 #endif
12881
12882 #include <limits.h> /* for CHAR_BIT */
12883 #define TYPE_MINIMUM(t) \
12884 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12885 #define TYPE_MAXIMUM(t) \
12886 ((t) ((t) 0 < (t) -1 \
12887 ? (t) -1 \
12888 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12889 struct s {
12890 int check_PTRDIFF:
12891 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12892 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12893 ? 1 : -1;
12894 /* Detect bug in FreeBSD 6.0 / ia64. */
12895 int check_SIG_ATOMIC:
12896 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12897 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12898 ? 1 : -1;
12899 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12900 int check_WCHAR:
12901 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12902 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12903 ? 1 : -1;
12904 /* Detect bug in mingw. */
12905 int check_WINT:
12906 WINT_MIN == TYPE_MINIMUM (wint_t)
12907 && WINT_MAX == TYPE_MAXIMUM (wint_t)
12908 ? 1 : -1;
12909
12910 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
12911 int check_UINT8_C:
12912 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12913 int check_UINT16_C:
12914 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12915
12916 /* Detect bugs in OpenBSD 3.9 stdint.h. */
12917 #ifdef UINT8_MAX
12918 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12919 #endif
12920 #ifdef UINT16_MAX
12921 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12922 #endif
12923 #ifdef UINT32_MAX
12924 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12925 #endif
12926 #ifdef UINT64_MAX
12927 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12928 #endif
12929 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12930 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12931 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12932 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12933 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12934 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12935 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12936 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12937 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12938 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12939 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12940 };
12941
12942 int
12943 main ()
12944 {
12945
12946 ;
12947 return 0;
12948 }
12949 _ACEOF
12950 if ac_fn_c_try_compile "$LINENO"; then :
12951 if test "$cross_compiling" = yes; then :
12952 case "$host_os" in
12953 # Guess yes on native Windows.
12954 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
12955 # In general, assume it works.
12956 *) gl_cv_header_working_stdint_h="guessing yes" ;;
12957 esac
12958
12959 else
12960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12961 /* end confdefs.h. */
12962
12963
12964 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12965 #define __STDC_CONSTANT_MACROS 1
12966 #define __STDC_LIMIT_MACROS 1
12967 #include <stdint.h>
12968
12969
12970 #include <stddef.h>
12971 #include <signal.h>
12972 #if HAVE_WCHAR_H
12973 # include <wchar.h>
12974 #endif
12975
12976
12977 #include <stdio.h>
12978 #include <string.h>
12979 #define MVAL(macro) MVAL1(macro)
12980 #define MVAL1(expression) #expression
12981 static const char *macro_values[] =
12982 {
12983 #ifdef INT8_MAX
12984 MVAL (INT8_MAX),
12985 #endif
12986 #ifdef INT16_MAX
12987 MVAL (INT16_MAX),
12988 #endif
12989 #ifdef INT32_MAX
12990 MVAL (INT32_MAX),
12991 #endif
12992 #ifdef INT64_MAX
12993 MVAL (INT64_MAX),
12994 #endif
12995 #ifdef UINT8_MAX
12996 MVAL (UINT8_MAX),
12997 #endif
12998 #ifdef UINT16_MAX
12999 MVAL (UINT16_MAX),
13000 #endif
13001 #ifdef UINT32_MAX
13002 MVAL (UINT32_MAX),
13003 #endif
13004 #ifdef UINT64_MAX
13005 MVAL (UINT64_MAX),
13006 #endif
13007 NULL
13008 };
13009
13010 int
13011 main ()
13012 {
13013
13014 const char **mv;
13015 for (mv = macro_values; *mv != NULL; mv++)
13016 {
13017 const char *value = *mv;
13018 /* Test whether it looks like a cast expression. */
13019 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
13020 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
13021 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
13022 || strncmp (value, "((int)"/*)*/, 6) == 0
13023 || strncmp (value, "((signed short)"/*)*/, 15) == 0
13024 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
13025 return mv - macro_values + 1;
13026 }
13027 return 0;
13028
13029 ;
13030 return 0;
13031 }
13032 _ACEOF
13033 if ac_fn_c_try_run "$LINENO"; then :
13034 gl_cv_header_working_stdint_h=yes
13035 fi
13036 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13037 conftest.$ac_objext conftest.beam conftest.$ac_ext
13038 fi
13039
13040
13041 fi
13042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13043
13044 fi
13045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
13046 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
13047 fi
13048
13049 HAVE_C99_STDINT_H=0
13050 HAVE_SYS_BITYPES_H=0
13051 HAVE_SYS_INTTYPES_H=0
13052 STDINT_H=stdint.h
13053 case "$gl_cv_header_working_stdint_h" in
13054 *yes)
13055 HAVE_C99_STDINT_H=1
13056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
13057 $as_echo_n "checking whether stdint.h works without ISO C predefines... " >&6; }
13058 if ${gl_cv_header_stdint_without_STDC_macros+:} false; then :
13059 $as_echo_n "(cached) " >&6
13060 else
13061 gl_cv_header_stdint_without_STDC_macros=no
13062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13063 /* end confdefs.h. */
13064
13065
13066 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
13067 #include <stdint.h>
13068
13069
13070 #include <stddef.h>
13071 #include <signal.h>
13072 #if HAVE_WCHAR_H
13073 # include <wchar.h>
13074 #endif
13075
13076
13077 intmax_t im = INTMAX_MAX;
13078 int32_t i32 = INT32_C (0x7fffffff);
13079
13080 int
13081 main ()
13082 {
13083
13084 ;
13085 return 0;
13086 }
13087 _ACEOF
13088 if ac_fn_c_try_compile "$LINENO"; then :
13089 gl_cv_header_stdint_without_STDC_macros=yes
13090 fi
13091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13092
13093 fi
13094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
13095 $as_echo "$gl_cv_header_stdint_without_STDC_macros" >&6; }
13096
13097 if test $gl_cv_header_stdint_without_STDC_macros = no; then
13098
13099 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
13100
13101
13102 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
13103
13104 fi
13105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
13106 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
13107 if ${gl_cv_header_stdint_width+:} false; then :
13108 $as_echo_n "(cached) " >&6
13109 else
13110 gl_cv_header_stdint_width=no
13111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13112 /* end confdefs.h. */
13113
13114 /* Work if build is not clean. */
13115 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
13116 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
13117 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
13118 #endif
13119 #include <stdint.h>
13120
13121 #include <stddef.h>
13122 #include <signal.h>
13123 #if HAVE_WCHAR_H
13124 # include <wchar.h>
13125 #endif
13126
13127 int iw = UINTMAX_WIDTH;
13128
13129 int
13130 main ()
13131 {
13132
13133 ;
13134 return 0;
13135 }
13136 _ACEOF
13137 if ac_fn_c_try_compile "$LINENO"; then :
13138 gl_cv_header_stdint_width=yes
13139 fi
13140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13141 fi
13142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
13143 $as_echo "$gl_cv_header_stdint_width" >&6; }
13144 if test "$gl_cv_header_stdint_width" = yes; then
13145 STDINT_H=
13146 fi
13147 ;;
13148 *)
13149 for ac_header in sys/inttypes.h sys/bitypes.h
13150 do :
13151 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13152 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13153 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13154 cat >>confdefs.h <<_ACEOF
13155 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13156 _ACEOF
13157
13158 fi
13159
13160 done
13161
13162 if test $ac_cv_header_sys_inttypes_h = yes; then
13163 HAVE_SYS_INTTYPES_H=1
13164 fi
13165 if test $ac_cv_header_sys_bitypes_h = yes; then
13166 HAVE_SYS_BITYPES_H=1
13167 fi
13168
13169
13170 if test $APPLE_UNIVERSAL_BUILD = 0; then
13171
13172
13173 for gltype in ptrdiff_t size_t ; do
13174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13175 $as_echo_n "checking for bit size of $gltype... " >&6; }
13176 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
13177 $as_echo_n "(cached) " >&6
13178 else
13179 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
13180 #include <stddef.h>
13181 #include <signal.h>
13182 #if HAVE_WCHAR_H
13183 # include <wchar.h>
13184 #endif
13185
13186 #include <limits.h>"; then :
13187
13188 else
13189 result=unknown
13190 fi
13191
13192 eval gl_cv_bitsizeof_${gltype}=\$result
13193
13194 fi
13195 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13197 $as_echo "$ac_res" >&6; }
13198 eval result=\$gl_cv_bitsizeof_${gltype}
13199 if test $result = unknown; then
13200 result=0
13201 fi
13202 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13203 cat >>confdefs.h <<_ACEOF
13204 #define BITSIZEOF_${GLTYPE} $result
13205 _ACEOF
13206
13207 eval BITSIZEOF_${GLTYPE}=\$result
13208 done
13209
13210
13211 fi
13212
13213
13214 for gltype in sig_atomic_t wchar_t wint_t ; do
13215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13216 $as_echo_n "checking for bit size of $gltype... " >&6; }
13217 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
13218 $as_echo_n "(cached) " >&6
13219 else
13220 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
13221 #include <stddef.h>
13222 #include <signal.h>
13223 #if HAVE_WCHAR_H
13224 # include <wchar.h>
13225 #endif
13226
13227 #include <limits.h>"; then :
13228
13229 else
13230 result=unknown
13231 fi
13232
13233 eval gl_cv_bitsizeof_${gltype}=\$result
13234
13235 fi
13236 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13238 $as_echo "$ac_res" >&6; }
13239 eval result=\$gl_cv_bitsizeof_${gltype}
13240 if test $result = unknown; then
13241 result=0
13242 fi
13243 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13244 cat >>confdefs.h <<_ACEOF
13245 #define BITSIZEOF_${GLTYPE} $result
13246 _ACEOF
13247
13248 eval BITSIZEOF_${GLTYPE}=\$result
13249 done
13250
13251
13252
13253
13254 for gltype in sig_atomic_t wchar_t wint_t ; do
13255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
13256 $as_echo_n "checking whether $gltype is signed... " >&6; }
13257 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
13258 $as_echo_n "(cached) " >&6
13259 else
13260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13261 /* end confdefs.h. */
13262
13263 #include <stddef.h>
13264 #include <signal.h>
13265 #if HAVE_WCHAR_H
13266 # include <wchar.h>
13267 #endif
13268
13269 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
13270 int
13271 main ()
13272 {
13273
13274 ;
13275 return 0;
13276 }
13277 _ACEOF
13278 if ac_fn_c_try_compile "$LINENO"; then :
13279 result=yes
13280 else
13281 result=no
13282 fi
13283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13284 eval gl_cv_type_${gltype}_signed=\$result
13285
13286 fi
13287 eval ac_res=\$gl_cv_type_${gltype}_signed
13288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13289 $as_echo "$ac_res" >&6; }
13290 eval result=\$gl_cv_type_${gltype}_signed
13291 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13292 if test "$result" = yes; then
13293 cat >>confdefs.h <<_ACEOF
13294 #define HAVE_SIGNED_${GLTYPE} 1
13295 _ACEOF
13296
13297 eval HAVE_SIGNED_${GLTYPE}=1
13298 else
13299 eval HAVE_SIGNED_${GLTYPE}=0
13300 fi
13301 done
13302
13303
13304 gl_cv_type_ptrdiff_t_signed=yes
13305 gl_cv_type_size_t_signed=no
13306 if test $APPLE_UNIVERSAL_BUILD = 0; then
13307
13308
13309 for gltype in ptrdiff_t size_t ; do
13310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13311 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13312 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13313 $as_echo_n "(cached) " >&6
13314 else
13315 eval gl_cv_type_${gltype}_suffix=no
13316 eval result=\$gl_cv_type_${gltype}_signed
13317 if test "$result" = yes; then
13318 glsufu=
13319 else
13320 glsufu=u
13321 fi
13322 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13323 case $glsuf in
13324 '') gltype1='int';;
13325 l) gltype1='long int';;
13326 ll) gltype1='long long int';;
13327 i64) gltype1='__int64';;
13328 u) gltype1='unsigned int';;
13329 ul) gltype1='unsigned long int';;
13330 ull) gltype1='unsigned long long int';;
13331 ui64)gltype1='unsigned __int64';;
13332 esac
13333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13334 /* end confdefs.h. */
13335
13336 #include <stddef.h>
13337 #include <signal.h>
13338 #if HAVE_WCHAR_H
13339 # include <wchar.h>
13340 #endif
13341
13342 extern $gltype foo;
13343 extern $gltype1 foo;
13344 int
13345 main ()
13346 {
13347
13348 ;
13349 return 0;
13350 }
13351 _ACEOF
13352 if ac_fn_c_try_compile "$LINENO"; then :
13353 eval gl_cv_type_${gltype}_suffix=\$glsuf
13354 fi
13355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13356 eval result=\$gl_cv_type_${gltype}_suffix
13357 test "$result" != no && break
13358 done
13359 fi
13360 eval ac_res=\$gl_cv_type_${gltype}_suffix
13361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13362 $as_echo "$ac_res" >&6; }
13363 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13364 eval result=\$gl_cv_type_${gltype}_suffix
13365 test "$result" = no && result=
13366 eval ${GLTYPE}_SUFFIX=\$result
13367 cat >>confdefs.h <<_ACEOF
13368 #define ${GLTYPE}_SUFFIX $result
13369 _ACEOF
13370
13371 done
13372
13373
13374 fi
13375
13376
13377 for gltype in sig_atomic_t wchar_t wint_t ; do
13378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13379 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13380 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13381 $as_echo_n "(cached) " >&6
13382 else
13383 eval gl_cv_type_${gltype}_suffix=no
13384 eval result=\$gl_cv_type_${gltype}_signed
13385 if test "$result" = yes; then
13386 glsufu=
13387 else
13388 glsufu=u
13389 fi
13390 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13391 case $glsuf in
13392 '') gltype1='int';;
13393 l) gltype1='long int';;
13394 ll) gltype1='long long int';;
13395 i64) gltype1='__int64';;
13396 u) gltype1='unsigned int';;
13397 ul) gltype1='unsigned long int';;
13398 ull) gltype1='unsigned long long int';;
13399 ui64)gltype1='unsigned __int64';;
13400 esac
13401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13402 /* end confdefs.h. */
13403
13404 #include <stddef.h>
13405 #include <signal.h>
13406 #if HAVE_WCHAR_H
13407 # include <wchar.h>
13408 #endif
13409
13410 extern $gltype foo;
13411 extern $gltype1 foo;
13412 int
13413 main ()
13414 {
13415
13416 ;
13417 return 0;
13418 }
13419 _ACEOF
13420 if ac_fn_c_try_compile "$LINENO"; then :
13421 eval gl_cv_type_${gltype}_suffix=\$glsuf
13422 fi
13423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13424 eval result=\$gl_cv_type_${gltype}_suffix
13425 test "$result" != no && break
13426 done
13427 fi
13428 eval ac_res=\$gl_cv_type_${gltype}_suffix
13429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13430 $as_echo "$ac_res" >&6; }
13431 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13432 eval result=\$gl_cv_type_${gltype}_suffix
13433 test "$result" = no && result=
13434 eval ${GLTYPE}_SUFFIX=\$result
13435 cat >>confdefs.h <<_ACEOF
13436 #define ${GLTYPE}_SUFFIX $result
13437 _ACEOF
13438
13439 done
13440
13441
13442
13443 if test $GNULIB_OVERRIDES_WINT_T = 1; then
13444 BITSIZEOF_WINT_T=32
13445 fi
13446
13447 ;;
13448 esac
13449
13450
13451
13452 LIMITS_H='limits.h'
13453 if test -n "$LIMITS_H"; then
13454 GL_GENERATE_LIMITS_H_TRUE=
13455 GL_GENERATE_LIMITS_H_FALSE='#'
13456 else
13457 GL_GENERATE_LIMITS_H_TRUE='#'
13458 GL_GENERATE_LIMITS_H_FALSE=
13459 fi
13460
13461
13462
13463
13464
13465
13466
13467 if test -n "$STDINT_H"; then
13468 GL_GENERATE_STDINT_H_TRUE=
13469 GL_GENERATE_STDINT_H_FALSE='#'
13470 else
13471 GL_GENERATE_STDINT_H_TRUE='#'
13472 GL_GENERATE_STDINT_H_FALSE=
13473 fi
13474
13475
13476
13477 GNULIB_IMAXABS=0;
13478 GNULIB_IMAXDIV=0;
13479 GNULIB_STRTOIMAX=0;
13480 GNULIB_STRTOUMAX=0;
13481 HAVE_DECL_IMAXABS=1;
13482 HAVE_DECL_IMAXDIV=1;
13483 HAVE_DECL_STRTOIMAX=1;
13484 HAVE_DECL_STRTOUMAX=1;
13485 HAVE_IMAXDIV_T=1;
13486 REPLACE_STRTOIMAX=0;
13487 REPLACE_STRTOUMAX=0;
13488 INT32_MAX_LT_INTMAX_MAX=1;
13489 INT64_MAX_EQ_LONG_MAX='defined _LP64';
13490 PRIPTR_PREFIX=__PRIPTR_PREFIX;
13491 UINT32_MAX_LT_UINTMAX_MAX=1;
13492 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508 if test $gl_cv_have_include_next = yes; then
13509 gl_cv_next_inttypes_h='<'inttypes.h'>'
13510 else
13511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
13512 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
13513 if ${gl_cv_next_inttypes_h+:} false; then :
13514 $as_echo_n "(cached) " >&6
13515 else
13516
13517 if test $ac_cv_header_inttypes_h = yes; then
13518
13519
13520
13521
13522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13523 /* end confdefs.h. */
13524 #include <inttypes.h>
13525 _ACEOF
13526 case "$host_os" in
13527 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13528 *) gl_absname_cpp="$ac_cpp" ;;
13529 esac
13530
13531 case "$host_os" in
13532 mingw*)
13533 gl_dirsep_regex='[/\\]'
13534 ;;
13535 *)
13536 gl_dirsep_regex='\/'
13537 ;;
13538 esac
13539 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13540 gl_header_literal_regex=`echo 'inttypes.h' \
13541 | sed -e "$gl_make_literal_regex_sed"`
13542 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13543 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13544 s|^/[^/]|//&|
13545 p
13546 q
13547 }'
13548
13549 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13550 sed -n "$gl_absolute_header_sed"`
13551
13552 gl_header=$gl_cv_absolute_inttypes_h
13553 gl_cv_next_inttypes_h='"'$gl_header'"'
13554 else
13555 gl_cv_next_inttypes_h='<'inttypes.h'>'
13556 fi
13557
13558
13559 fi
13560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13561 $as_echo "$gl_cv_next_inttypes_h" >&6; }
13562 fi
13563 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
13564
13565 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13566 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13567 gl_next_as_first_directive='<'inttypes.h'>'
13568 else
13569 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13570 gl_next_as_first_directive=$gl_cv_next_inttypes_h
13571 fi
13572 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
13590 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
13591 if ${gl_cv_cc_double_expbit0+:} false; then :
13592 $as_echo_n "(cached) " >&6
13593 else
13594
13595 if test "$cross_compiling" = yes; then :
13596
13597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13598 /* end confdefs.h. */
13599
13600 #if defined arm || defined __arm || defined __arm__
13601 mixed_endianness
13602 #endif
13603
13604 _ACEOF
13605 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13606 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
13607 gl_cv_cc_double_expbit0="unknown"
13608 else
13609
13610 :
13611 if ${ac_cv_c_bigendian+:} false; then :
13612 $as_echo_n "(cached) " >&6
13613 else
13614 ac_cv_c_bigendian=unknown
13615 # See if we're dealing with a universal compiler.
13616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13617 /* end confdefs.h. */
13618 #ifndef __APPLE_CC__
13619 not a universal capable compiler
13620 #endif
13621 typedef int dummy;
13622
13623 _ACEOF
13624 if ac_fn_c_try_compile "$LINENO"; then :
13625
13626 # Check for potential -arch flags. It is not universal unless
13627 # there are at least two -arch flags with different values.
13628 ac_arch=
13629 ac_prev=
13630 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13631 if test -n "$ac_prev"; then
13632 case $ac_word in
13633 i?86 | x86_64 | ppc | ppc64)
13634 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13635 ac_arch=$ac_word
13636 else
13637 ac_cv_c_bigendian=universal
13638 break
13639 fi
13640 ;;
13641 esac
13642 ac_prev=
13643 elif test "x$ac_word" = "x-arch"; then
13644 ac_prev=arch
13645 fi
13646 done
13647 fi
13648 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13649 if test $ac_cv_c_bigendian = unknown; then
13650 # See if sys/param.h defines the BYTE_ORDER macro.
13651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13652 /* end confdefs.h. */
13653 #include <sys/types.h>
13654 #include <sys/param.h>
13655
13656 int
13657 main ()
13658 {
13659 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13660 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13661 && LITTLE_ENDIAN)
13662 bogus endian macros
13663 #endif
13664
13665 ;
13666 return 0;
13667 }
13668 _ACEOF
13669 if ac_fn_c_try_compile "$LINENO"; then :
13670 # It does; now see whether it defined to BIG_ENDIAN or not.
13671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13672 /* end confdefs.h. */
13673 #include <sys/types.h>
13674 #include <sys/param.h>
13675
13676 int
13677 main ()
13678 {
13679 #if BYTE_ORDER != BIG_ENDIAN
13680 not big endian
13681 #endif
13682
13683 ;
13684 return 0;
13685 }
13686 _ACEOF
13687 if ac_fn_c_try_compile "$LINENO"; then :
13688 ac_cv_c_bigendian=yes
13689 else
13690 ac_cv_c_bigendian=no
13691 fi
13692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13693 fi
13694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13695 fi
13696 if test $ac_cv_c_bigendian = unknown; then
13697 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13699 /* end confdefs.h. */
13700 #include <limits.h>
13701
13702 int
13703 main ()
13704 {
13705 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13706 bogus endian macros
13707 #endif
13708
13709 ;
13710 return 0;
13711 }
13712 _ACEOF
13713 if ac_fn_c_try_compile "$LINENO"; then :
13714 # It does; now see whether it defined to _BIG_ENDIAN or not.
13715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13716 /* end confdefs.h. */
13717 #include <limits.h>
13718
13719 int
13720 main ()
13721 {
13722 #ifndef _BIG_ENDIAN
13723 not big endian
13724 #endif
13725
13726 ;
13727 return 0;
13728 }
13729 _ACEOF
13730 if ac_fn_c_try_compile "$LINENO"; then :
13731 ac_cv_c_bigendian=yes
13732 else
13733 ac_cv_c_bigendian=no
13734 fi
13735 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13736 fi
13737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13738 fi
13739 if test $ac_cv_c_bigendian = unknown; then
13740 # Compile a test program.
13741 if test "$cross_compiling" = yes; then :
13742 # Try to guess by grepping values from an object file.
13743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13744 /* end confdefs.h. */
13745 short int ascii_mm[] =
13746 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13747 short int ascii_ii[] =
13748 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13749 int use_ascii (int i) {
13750 return ascii_mm[i] + ascii_ii[i];
13751 }
13752 short int ebcdic_ii[] =
13753 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13754 short int ebcdic_mm[] =
13755 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13756 int use_ebcdic (int i) {
13757 return ebcdic_mm[i] + ebcdic_ii[i];
13758 }
13759 extern int foo;
13760
13761 int
13762 main ()
13763 {
13764 return use_ascii (foo) == use_ebcdic (foo);
13765 ;
13766 return 0;
13767 }
13768 _ACEOF
13769 if ac_fn_c_try_compile "$LINENO"; then :
13770 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13771 ac_cv_c_bigendian=yes
13772 fi
13773 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13774 if test "$ac_cv_c_bigendian" = unknown; then
13775 ac_cv_c_bigendian=no
13776 else
13777 # finding both strings is unlikely to happen, but who knows?
13778 ac_cv_c_bigendian=unknown
13779 fi
13780 fi
13781 fi
13782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13783 else
13784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13785 /* end confdefs.h. */
13786 $ac_includes_default
13787 int
13788 main ()
13789 {
13790
13791 /* Are we little or big endian? From Harbison&Steele. */
13792 union
13793 {
13794 long int l;
13795 char c[sizeof (long int)];
13796 } u;
13797 u.l = 1;
13798 return u.c[sizeof (long int) - 1] == 1;
13799
13800 ;
13801 return 0;
13802 }
13803 _ACEOF
13804 if ac_fn_c_try_run "$LINENO"; then :
13805 ac_cv_c_bigendian=no
13806 else
13807 ac_cv_c_bigendian=yes
13808 fi
13809 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13810 conftest.$ac_objext conftest.beam conftest.$ac_ext
13811 fi
13812
13813 fi
13814 fi
13815 :
13816 case $ac_cv_c_bigendian in #(
13817 yes)
13818 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
13819 no)
13820 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
13821 universal)
13822
13823 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13824
13825 ;; #(
13826 *)
13827 gl_cv_cc_double_expbit0="unknown" ;;
13828 esac
13829
13830
13831 fi
13832 rm -f conftest*
13833
13834
13835 else
13836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13837 /* end confdefs.h. */
13838
13839 #include <float.h>
13840 #include <stddef.h>
13841 #include <stdio.h>
13842 #include <string.h>
13843 #define NWORDS \
13844 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13845 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
13846 static unsigned int ored_words[NWORDS];
13847 static unsigned int anded_words[NWORDS];
13848 static void add_to_ored_words (double x)
13849 {
13850 memory_double m;
13851 size_t i;
13852 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
13853 memset (&m, 0, sizeof (memory_double));
13854 m.value = x;
13855 for (i = 0; i < NWORDS; i++)
13856 {
13857 ored_words[i] |= m.word[i];
13858 anded_words[i] &= m.word[i];
13859 }
13860 }
13861 int main ()
13862 {
13863 size_t j;
13864 FILE *fp = fopen ("conftest.out", "w");
13865 if (fp == NULL)
13866 return 1;
13867 for (j = 0; j < NWORDS; j++)
13868 anded_words[j] = ~ (unsigned int) 0;
13869 add_to_ored_words (0.25);
13870 add_to_ored_words (0.5);
13871 add_to_ored_words (1.0);
13872 add_to_ored_words (2.0);
13873 add_to_ored_words (4.0);
13874 /* Remove bits that are common (e.g. if representation of the first mantissa
13875 bit is explicit). */
13876 for (j = 0; j < NWORDS; j++)
13877 ored_words[j] &= ~anded_words[j];
13878 /* Now find the nonzero word. */
13879 for (j = 0; j < NWORDS; j++)
13880 if (ored_words[j] != 0)
13881 break;
13882 if (j < NWORDS)
13883 {
13884 size_t i;
13885 for (i = j + 1; i < NWORDS; i++)
13886 if (ored_words[i] != 0)
13887 {
13888 fprintf (fp, "unknown");
13889 return (fclose (fp) != 0);
13890 }
13891 for (i = 0; ; i++)
13892 if ((ored_words[j] >> i) & 1)
13893 {
13894 fprintf (fp, "word %d bit %d", (int) j, (int) i);
13895 return (fclose (fp) != 0);
13896 }
13897 }
13898 fprintf (fp, "unknown");
13899 return (fclose (fp) != 0);
13900 }
13901
13902 _ACEOF
13903 if ac_fn_c_try_run "$LINENO"; then :
13904 gl_cv_cc_double_expbit0=`cat conftest.out`
13905 else
13906 gl_cv_cc_double_expbit0="unknown"
13907 fi
13908 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13909 conftest.$ac_objext conftest.beam conftest.$ac_ext
13910 fi
13911
13912 rm -f conftest.out
13913
13914 fi
13915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
13916 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
13917 case "$gl_cv_cc_double_expbit0" in
13918 word*bit*)
13919 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13920 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
13921
13922 cat >>confdefs.h <<_ACEOF
13923 #define DBL_EXPBIT0_WORD $word
13924 _ACEOF
13925
13926
13927 cat >>confdefs.h <<_ACEOF
13928 #define DBL_EXPBIT0_BIT $bit
13929 _ACEOF
13930
13931 ;;
13932 esac
13933
13934
13935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13936 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13937 if ${ac_cv_c_bigendian+:} false; then :
13938 $as_echo_n "(cached) " >&6
13939 else
13940 ac_cv_c_bigendian=unknown
13941 # See if we're dealing with a universal compiler.
13942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13943 /* end confdefs.h. */
13944 #ifndef __APPLE_CC__
13945 not a universal capable compiler
13946 #endif
13947 typedef int dummy;
13948
13949 _ACEOF
13950 if ac_fn_c_try_compile "$LINENO"; then :
13951
13952 # Check for potential -arch flags. It is not universal unless
13953 # there are at least two -arch flags with different values.
13954 ac_arch=
13955 ac_prev=
13956 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13957 if test -n "$ac_prev"; then
13958 case $ac_word in
13959 i?86 | x86_64 | ppc | ppc64)
13960 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13961 ac_arch=$ac_word
13962 else
13963 ac_cv_c_bigendian=universal
13964 break
13965 fi
13966 ;;
13967 esac
13968 ac_prev=
13969 elif test "x$ac_word" = "x-arch"; then
13970 ac_prev=arch
13971 fi
13972 done
13973 fi
13974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13975 if test $ac_cv_c_bigendian = unknown; then
13976 # See if sys/param.h defines the BYTE_ORDER macro.
13977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13978 /* end confdefs.h. */
13979 #include <sys/types.h>
13980 #include <sys/param.h>
13981
13982 int
13983 main ()
13984 {
13985 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13986 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13987 && LITTLE_ENDIAN)
13988 bogus endian macros
13989 #endif
13990
13991 ;
13992 return 0;
13993 }
13994 _ACEOF
13995 if ac_fn_c_try_compile "$LINENO"; then :
13996 # It does; now see whether it defined to BIG_ENDIAN or not.
13997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13998 /* end confdefs.h. */
13999 #include <sys/types.h>
14000 #include <sys/param.h>
14001
14002 int
14003 main ()
14004 {
14005 #if BYTE_ORDER != BIG_ENDIAN
14006 not big endian
14007 #endif
14008
14009 ;
14010 return 0;
14011 }
14012 _ACEOF
14013 if ac_fn_c_try_compile "$LINENO"; then :
14014 ac_cv_c_bigendian=yes
14015 else
14016 ac_cv_c_bigendian=no
14017 fi
14018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14019 fi
14020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14021 fi
14022 if test $ac_cv_c_bigendian = unknown; then
14023 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14025 /* end confdefs.h. */
14026 #include <limits.h>
14027
14028 int
14029 main ()
14030 {
14031 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14032 bogus endian macros
14033 #endif
14034
14035 ;
14036 return 0;
14037 }
14038 _ACEOF
14039 if ac_fn_c_try_compile "$LINENO"; then :
14040 # It does; now see whether it defined to _BIG_ENDIAN or not.
14041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14042 /* end confdefs.h. */
14043 #include <limits.h>
14044
14045 int
14046 main ()
14047 {
14048 #ifndef _BIG_ENDIAN
14049 not big endian
14050 #endif
14051
14052 ;
14053 return 0;
14054 }
14055 _ACEOF
14056 if ac_fn_c_try_compile "$LINENO"; then :
14057 ac_cv_c_bigendian=yes
14058 else
14059 ac_cv_c_bigendian=no
14060 fi
14061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14062 fi
14063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14064 fi
14065 if test $ac_cv_c_bigendian = unknown; then
14066 # Compile a test program.
14067 if test "$cross_compiling" = yes; then :
14068 # Try to guess by grepping values from an object file.
14069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14070 /* end confdefs.h. */
14071 short int ascii_mm[] =
14072 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14073 short int ascii_ii[] =
14074 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14075 int use_ascii (int i) {
14076 return ascii_mm[i] + ascii_ii[i];
14077 }
14078 short int ebcdic_ii[] =
14079 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14080 short int ebcdic_mm[] =
14081 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14082 int use_ebcdic (int i) {
14083 return ebcdic_mm[i] + ebcdic_ii[i];
14084 }
14085 extern int foo;
14086
14087 int
14088 main ()
14089 {
14090 return use_ascii (foo) == use_ebcdic (foo);
14091 ;
14092 return 0;
14093 }
14094 _ACEOF
14095 if ac_fn_c_try_compile "$LINENO"; then :
14096 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14097 ac_cv_c_bigendian=yes
14098 fi
14099 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14100 if test "$ac_cv_c_bigendian" = unknown; then
14101 ac_cv_c_bigendian=no
14102 else
14103 # finding both strings is unlikely to happen, but who knows?
14104 ac_cv_c_bigendian=unknown
14105 fi
14106 fi
14107 fi
14108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14109 else
14110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14111 /* end confdefs.h. */
14112 $ac_includes_default
14113 int
14114 main ()
14115 {
14116
14117 /* Are we little or big endian? From Harbison&Steele. */
14118 union
14119 {
14120 long int l;
14121 char c[sizeof (long int)];
14122 } u;
14123 u.l = 1;
14124 return u.c[sizeof (long int) - 1] == 1;
14125
14126 ;
14127 return 0;
14128 }
14129 _ACEOF
14130 if ac_fn_c_try_run "$LINENO"; then :
14131 ac_cv_c_bigendian=no
14132 else
14133 ac_cv_c_bigendian=yes
14134 fi
14135 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14136 conftest.$ac_objext conftest.beam conftest.$ac_ext
14137 fi
14138
14139 fi
14140 fi
14141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14142 $as_echo "$ac_cv_c_bigendian" >&6; }
14143 case $ac_cv_c_bigendian in #(
14144 yes)
14145 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14146 ;; #(
14147 no)
14148 ;; #(
14149 universal)
14150
14151 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14152
14153 ;; #(
14154 *)
14155 as_fn_error $? "unknown endianness
14156 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14157 esac
14158
14159
14160
14161 GNULIB_LOCALECONV=0;
14162 GNULIB_SETLOCALE=0;
14163 GNULIB_SETLOCALE_NULL=0;
14164 GNULIB_DUPLOCALE=0;
14165 GNULIB_LOCALENAME=0;
14166 HAVE_NEWLOCALE=1;
14167 HAVE_DUPLOCALE=1;
14168 HAVE_FREELOCALE=1;
14169 REPLACE_LOCALECONV=0;
14170 REPLACE_SETLOCALE=0;
14171 REPLACE_NEWLOCALE=0;
14172 REPLACE_DUPLOCALE=0;
14173 REPLACE_FREELOCALE=0;
14174 REPLACE_STRUCT_LCONV=0;
14175
14176
14177 REPLACE_NULL=0;
14178 HAVE_MAX_ALIGN_T=1;
14179 HAVE_WCHAR_T=1;
14180
14181
14182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
14183 $as_echo_n "checking for wchar_t... " >&6; }
14184 if ${gt_cv_c_wchar_t+:} false; then :
14185 $as_echo_n "(cached) " >&6
14186 else
14187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14188 /* end confdefs.h. */
14189 #include <stddef.h>
14190 wchar_t foo = (wchar_t)'\0';
14191 int
14192 main ()
14193 {
14194
14195 ;
14196 return 0;
14197 }
14198 _ACEOF
14199 if ac_fn_c_try_compile "$LINENO"; then :
14200 gt_cv_c_wchar_t=yes
14201 else
14202 gt_cv_c_wchar_t=no
14203 fi
14204 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14205 fi
14206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
14207 $as_echo "$gt_cv_c_wchar_t" >&6; }
14208 if test $gt_cv_c_wchar_t = yes; then
14209
14210 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
14211
14212 fi
14213
14214
14215
14216
14217
14218
14219
14220 STDDEF_H=
14221
14222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
14223 $as_echo_n "checking for good max_align_t... " >&6; }
14224 if ${gl_cv_type_max_align_t+:} false; then :
14225 $as_echo_n "(cached) " >&6
14226 else
14227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14228 /* end confdefs.h. */
14229 #include <stddef.h>
14230 unsigned int s = sizeof (max_align_t);
14231 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
14232 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
14233 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
14234 #endif
14235 typedef struct { char a; max_align_t b; } max_helper;
14236 typedef struct { char a; long b; } long_helper;
14237 typedef struct { char a; double b; } double_helper;
14238 typedef struct { char a; long double b; } long_double_helper;
14239 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
14240 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
14241 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
14242
14243 int
14244 main ()
14245 {
14246
14247 ;
14248 return 0;
14249 }
14250 _ACEOF
14251 if ac_fn_c_try_compile "$LINENO"; then :
14252 gl_cv_type_max_align_t=yes
14253 else
14254 gl_cv_type_max_align_t=no
14255 fi
14256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14257
14258 fi
14259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
14260 $as_echo "$gl_cv_type_max_align_t" >&6; }
14261 if test $gl_cv_type_max_align_t = no; then
14262 HAVE_MAX_ALIGN_T=0
14263 STDDEF_H=stddef.h
14264 fi
14265
14266 if test $gt_cv_c_wchar_t = no; then
14267 HAVE_WCHAR_T=0
14268 STDDEF_H=stddef.h
14269 fi
14270
14271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
14272 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
14273 if ${gl_cv_decl_null_works+:} false; then :
14274 $as_echo_n "(cached) " >&6
14275 else
14276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14277 /* end confdefs.h. */
14278 #include <stddef.h>
14279 int test[2 * (sizeof NULL == sizeof (void *)) -1];
14280
14281 int
14282 main ()
14283 {
14284
14285 ;
14286 return 0;
14287 }
14288 _ACEOF
14289 if ac_fn_c_try_compile "$LINENO"; then :
14290 gl_cv_decl_null_works=yes
14291 else
14292 gl_cv_decl_null_works=no
14293 fi
14294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14295 fi
14296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
14297 $as_echo "$gl_cv_decl_null_works" >&6; }
14298 if test $gl_cv_decl_null_works = no; then
14299 REPLACE_NULL=1
14300 STDDEF_H=stddef.h
14301 fi
14302
14303
14304 if test -n "$STDDEF_H"; then
14305 GL_GENERATE_STDDEF_H_TRUE=
14306 GL_GENERATE_STDDEF_H_FALSE='#'
14307 else
14308 GL_GENERATE_STDDEF_H_TRUE='#'
14309 GL_GENERATE_STDDEF_H_FALSE=
14310 fi
14311
14312 if test -n "$STDDEF_H"; then
14313
14314
14315
14316
14317
14318
14319
14320
14321 if test $gl_cv_have_include_next = yes; then
14322 gl_cv_next_stddef_h='<'stddef.h'>'
14323 else
14324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
14325 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
14326 if ${gl_cv_next_stddef_h+:} false; then :
14327 $as_echo_n "(cached) " >&6
14328 else
14329
14330
14331
14332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14333 /* end confdefs.h. */
14334 #include <stddef.h>
14335 _ACEOF
14336 case "$host_os" in
14337 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14338 *) gl_absname_cpp="$ac_cpp" ;;
14339 esac
14340
14341 case "$host_os" in
14342 mingw*)
14343 gl_dirsep_regex='[/\\]'
14344 ;;
14345 *)
14346 gl_dirsep_regex='\/'
14347 ;;
14348 esac
14349 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14350 gl_header_literal_regex=`echo 'stddef.h' \
14351 | sed -e "$gl_make_literal_regex_sed"`
14352 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14353 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14354 s|^/[^/]|//&|
14355 p
14356 q
14357 }'
14358
14359 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14360 sed -n "$gl_absolute_header_sed"`
14361
14362 gl_header=$gl_cv_absolute_stddef_h
14363 gl_cv_next_stddef_h='"'$gl_header'"'
14364
14365
14366 fi
14367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
14368 $as_echo "$gl_cv_next_stddef_h" >&6; }
14369 fi
14370 NEXT_STDDEF_H=$gl_cv_next_stddef_h
14371
14372 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14373 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14374 gl_next_as_first_directive='<'stddef.h'>'
14375 else
14376 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14377 gl_next_as_first_directive=$gl_cv_next_stddef_h
14378 fi
14379 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
14380
14381
14382
14383
14384 fi
14385
14386
14387
14388
14389
14390
14391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
14392 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
14393 if ${gl_cv_header_locale_has_locale_t+:} false; then :
14394 $as_echo_n "(cached) " >&6
14395 else
14396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14397 /* end confdefs.h. */
14398 #include <locale.h>
14399 locale_t x;
14400 int
14401 main ()
14402 {
14403
14404 ;
14405 return 0;
14406 }
14407 _ACEOF
14408 if ac_fn_c_try_compile "$LINENO"; then :
14409 gl_cv_header_locale_has_locale_t=yes
14410 else
14411 gl_cv_header_locale_has_locale_t=no
14412 fi
14413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14414
14415 fi
14416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
14417 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
14418
14419
14420 if test $ac_cv_header_xlocale_h = yes; then
14421 HAVE_XLOCALE_H=1
14422 if test $gl_cv_header_locale_has_locale_t = yes; then
14423 gl_cv_header_locale_h_needs_xlocale_h=no
14424 else
14425 gl_cv_header_locale_h_needs_xlocale_h=yes
14426 fi
14427 HAVE_LOCALE_T=1
14428 else
14429 HAVE_XLOCALE_H=0
14430 gl_cv_header_locale_h_needs_xlocale_h=no
14431 if test $gl_cv_header_locale_has_locale_t = yes; then
14432 HAVE_LOCALE_T=1
14433 else
14434 HAVE_LOCALE_T=0
14435 fi
14436 fi
14437
14438
14439
14440
14441 gl_threads_api=none
14442 LIBTHREAD=
14443 LTLIBTHREAD=
14444 LIBMULTITHREAD=
14445 LTLIBMULTITHREAD=
14446 if test "$gl_use_threads" != no; then
14447
14448
14449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14450 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
14451 if ${gl_cv_have_weak+:} false; then :
14452 $as_echo_n "(cached) " >&6
14453 else
14454 gl_cv_have_weak=no
14455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14456 /* end confdefs.h. */
14457 extern void xyzzy ();
14458 #pragma weak xyzzy
14459 int
14460 main ()
14461 {
14462 xyzzy();
14463 ;
14464 return 0;
14465 }
14466 _ACEOF
14467 if ac_fn_c_try_link "$LINENO"; then :
14468 gl_cv_have_weak=maybe
14469 fi
14470 rm -f core conftest.err conftest.$ac_objext \
14471 conftest$ac_exeext conftest.$ac_ext
14472 if test $gl_cv_have_weak = maybe; then
14473 if test "$cross_compiling" = yes; then :
14474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14475 /* end confdefs.h. */
14476 #ifdef __ELF__
14477 Extensible Linking Format
14478 #endif
14479
14480 _ACEOF
14481 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14482 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
14483 gl_cv_have_weak="guessing yes"
14484 else
14485 gl_cv_have_weak="guessing no"
14486 fi
14487 rm -f conftest*
14488
14489
14490 else
14491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14492 /* end confdefs.h. */
14493
14494 #include <stdio.h>
14495 #pragma weak fputs
14496 int main ()
14497 {
14498 return (fputs == NULL);
14499 }
14500 _ACEOF
14501 if ac_fn_c_try_run "$LINENO"; then :
14502 gl_cv_have_weak=yes
14503 else
14504 gl_cv_have_weak=no
14505 fi
14506 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14507 conftest.$ac_objext conftest.beam conftest.$ac_ext
14508 fi
14509
14510 fi
14511 case " $LDFLAGS " in
14512 *" -static "*) gl_cv_have_weak=no ;;
14513 esac
14514 case "$gl_cv_have_weak" in
14515 *yes)
14516 case "$host_os" in
14517 freebsd* | dragonfly*)
14518 : > conftest1.c
14519 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
14520 cat <<EOF > conftest2.c
14521 #include <pthread.h>
14522 #pragma weak pthread_mutexattr_gettype
14523 int main ()
14524 {
14525 return (pthread_mutexattr_gettype != NULL);
14526 }
14527 EOF
14528 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
14529 || gl_cv_have_weak=no
14530 rm -f conftest1.c libempty.so conftest2.c conftest
14531 ;;
14532 esac
14533 ;;
14534 esac
14535
14536 fi
14537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14538 $as_echo "$gl_cv_have_weak" >&6; }
14539 case "$gl_cv_have_weak" in
14540 *yes)
14541
14542 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
14543
14544 ;;
14545 esac
14546
14547 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14548
14549 :
14550 fi
14551 if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
14552
14553 gl_have_isoc_threads="$ac_cv_header_threads_h"
14554 fi
14555 if test "$gl_use_threads" = yes \
14556 || test "$gl_use_threads" = posix \
14557 || test "$gl_use_threads" = isoc+posix; then
14558
14559
14560 if test -z "$gl_pthreadlib_body_done"; then
14561 gl_pthread_api=no
14562 LIBPTHREAD=
14563 LIBPMULTITHREAD=
14564 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14565 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14566 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14567 if test "x$ac_cv_header_pthread_h" = xyes; then :
14568 gl_have_pthread_h=yes
14569 else
14570 gl_have_pthread_h=no
14571 fi
14572
14573
14574 if test "$gl_have_pthread_h" = yes; then
14575 # Other possible tests:
14576 # -lpthreads (FSU threads, PCthreads)
14577 # -lgthreads
14578 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14579 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14580 # the second one only in libpthread, and lock.c needs it.
14581 #
14582 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14583 # needs -pthread for some reason. See:
14584 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14585 save_LIBS=$LIBS
14586 for gl_pthread in '' '-pthread'; do
14587 LIBS="$LIBS $gl_pthread"
14588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14589 /* end confdefs.h. */
14590 #include <pthread.h>
14591 pthread_mutex_t m;
14592 pthread_mutexattr_t ma;
14593
14594 int
14595 main ()
14596 {
14597 pthread_mutex_lock (&m);
14598 pthread_mutexattr_init (&ma);
14599 ;
14600 return 0;
14601 }
14602 _ACEOF
14603 if ac_fn_c_try_link "$LINENO"; then :
14604 gl_pthread_api=yes
14605 LIBPTHREAD=$gl_pthread
14606 LIBPMULTITHREAD=$gl_pthread
14607 fi
14608 rm -f core conftest.err conftest.$ac_objext \
14609 conftest$ac_exeext conftest.$ac_ext
14610 LIBS=$save_LIBS
14611 test $gl_pthread_api = yes && break
14612 done
14613
14614 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14615 # since it is defined as a macro on OSF/1.)
14616 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14617 # The program links fine without libpthread. But it may actually
14618 # need to link with libpthread in order to create multiple threads.
14619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14620 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14621 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14622 $as_echo_n "(cached) " >&6
14623 else
14624 ac_check_lib_save_LIBS=$LIBS
14625 LIBS="-lpthread $LIBS"
14626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14627 /* end confdefs.h. */
14628
14629 /* Override any GCC internal prototype to avoid an error.
14630 Use char because int might match the return type of a GCC
14631 builtin and then its argument prototype would still apply. */
14632 #ifdef __cplusplus
14633 extern "C"
14634 #endif
14635 char pthread_kill ();
14636 int
14637 main ()
14638 {
14639 return pthread_kill ();
14640 ;
14641 return 0;
14642 }
14643 _ACEOF
14644 if ac_fn_c_try_link "$LINENO"; then :
14645 ac_cv_lib_pthread_pthread_kill=yes
14646 else
14647 ac_cv_lib_pthread_pthread_kill=no
14648 fi
14649 rm -f core conftest.err conftest.$ac_objext \
14650 conftest$ac_exeext conftest.$ac_ext
14651 LIBS=$ac_check_lib_save_LIBS
14652 fi
14653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14654 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14655 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14656 LIBPMULTITHREAD=-lpthread
14657 # On Solaris and HP-UX, most pthread functions exist also in libc.
14658 # Therefore pthread_in_use() needs to actually try to create a
14659 # thread: pthread_create from libc will fail, whereas
14660 # pthread_create will actually create a thread.
14661 # On Solaris 10 or newer, this test is no longer needed, because
14662 # libc contains the fully functional pthread functions.
14663 case "$host_os" in
14664 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
14665
14666 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14667
14668 esac
14669
14670 fi
14671
14672 elif test $gl_pthread_api != yes; then
14673 # Some library is needed. Try libpthread and libc_r.
14674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14675 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14676 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14677 $as_echo_n "(cached) " >&6
14678 else
14679 ac_check_lib_save_LIBS=$LIBS
14680 LIBS="-lpthread $LIBS"
14681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14682 /* end confdefs.h. */
14683
14684 /* Override any GCC internal prototype to avoid an error.
14685 Use char because int might match the return type of a GCC
14686 builtin and then its argument prototype would still apply. */
14687 #ifdef __cplusplus
14688 extern "C"
14689 #endif
14690 char pthread_kill ();
14691 int
14692 main ()
14693 {
14694 return pthread_kill ();
14695 ;
14696 return 0;
14697 }
14698 _ACEOF
14699 if ac_fn_c_try_link "$LINENO"; then :
14700 ac_cv_lib_pthread_pthread_kill=yes
14701 else
14702 ac_cv_lib_pthread_pthread_kill=no
14703 fi
14704 rm -f core conftest.err conftest.$ac_objext \
14705 conftest$ac_exeext conftest.$ac_ext
14706 LIBS=$ac_check_lib_save_LIBS
14707 fi
14708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14709 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14710 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
14711 gl_pthread_api=yes
14712 LIBPTHREAD=-lpthread
14713 LIBPMULTITHREAD=-lpthread
14714 fi
14715
14716 if test $gl_pthread_api != yes; then
14717 # For FreeBSD 4.
14718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
14719 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
14720 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
14721 $as_echo_n "(cached) " >&6
14722 else
14723 ac_check_lib_save_LIBS=$LIBS
14724 LIBS="-lc_r $LIBS"
14725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14726 /* end confdefs.h. */
14727
14728 /* Override any GCC internal prototype to avoid an error.
14729 Use char because int might match the return type of a GCC
14730 builtin and then its argument prototype would still apply. */
14731 #ifdef __cplusplus
14732 extern "C"
14733 #endif
14734 char pthread_kill ();
14735 int
14736 main ()
14737 {
14738 return pthread_kill ();
14739 ;
14740 return 0;
14741 }
14742 _ACEOF
14743 if ac_fn_c_try_link "$LINENO"; then :
14744 ac_cv_lib_c_r_pthread_kill=yes
14745 else
14746 ac_cv_lib_c_r_pthread_kill=no
14747 fi
14748 rm -f core conftest.err conftest.$ac_objext \
14749 conftest$ac_exeext conftest.$ac_ext
14750 LIBS=$ac_check_lib_save_LIBS
14751 fi
14752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
14753 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
14754 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
14755 gl_pthread_api=yes
14756 LIBPTHREAD=-lc_r
14757 LIBPMULTITHREAD=-lc_r
14758 fi
14759
14760 fi
14761 fi
14762 fi
14763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
14764 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
14765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
14766 $as_echo "$gl_pthread_api" >&6; }
14767
14768
14769 if test $gl_pthread_api = yes; then
14770
14771 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
14772
14773 fi
14774
14775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14776 /* end confdefs.h. */
14777 #include <sched.h>
14778 int
14779 main ()
14780 {
14781 sched_yield ();
14782 ;
14783 return 0;
14784 }
14785 _ACEOF
14786 if ac_fn_c_try_link "$LINENO"; then :
14787 LIB_SCHED_YIELD=
14788
14789 else
14790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
14791 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
14792 if ${ac_cv_lib_rt_sched_yield+:} false; then :
14793 $as_echo_n "(cached) " >&6
14794 else
14795 ac_check_lib_save_LIBS=$LIBS
14796 LIBS="-lrt $LIBS"
14797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14798 /* end confdefs.h. */
14799
14800 /* Override any GCC internal prototype to avoid an error.
14801 Use char because int might match the return type of a GCC
14802 builtin and then its argument prototype would still apply. */
14803 #ifdef __cplusplus
14804 extern "C"
14805 #endif
14806 char sched_yield ();
14807 int
14808 main ()
14809 {
14810 return sched_yield ();
14811 ;
14812 return 0;
14813 }
14814 _ACEOF
14815 if ac_fn_c_try_link "$LINENO"; then :
14816 ac_cv_lib_rt_sched_yield=yes
14817 else
14818 ac_cv_lib_rt_sched_yield=no
14819 fi
14820 rm -f core conftest.err conftest.$ac_objext \
14821 conftest$ac_exeext conftest.$ac_ext
14822 LIBS=$ac_check_lib_save_LIBS
14823 fi
14824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
14825 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
14826 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
14827 LIB_SCHED_YIELD=-lrt
14828 else
14829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
14830 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
14831 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
14832 $as_echo_n "(cached) " >&6
14833 else
14834 ac_check_lib_save_LIBS=$LIBS
14835 LIBS="-lposix4 $LIBS"
14836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14837 /* end confdefs.h. */
14838
14839 /* Override any GCC internal prototype to avoid an error.
14840 Use char because int might match the return type of a GCC
14841 builtin and then its argument prototype would still apply. */
14842 #ifdef __cplusplus
14843 extern "C"
14844 #endif
14845 char sched_yield ();
14846 int
14847 main ()
14848 {
14849 return sched_yield ();
14850 ;
14851 return 0;
14852 }
14853 _ACEOF
14854 if ac_fn_c_try_link "$LINENO"; then :
14855 ac_cv_lib_posix4_sched_yield=yes
14856 else
14857 ac_cv_lib_posix4_sched_yield=no
14858 fi
14859 rm -f core conftest.err conftest.$ac_objext \
14860 conftest$ac_exeext conftest.$ac_ext
14861 LIBS=$ac_check_lib_save_LIBS
14862 fi
14863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
14864 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
14865 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
14866 LIB_SCHED_YIELD=-lposix4
14867 fi
14868
14869 fi
14870
14871
14872 fi
14873 rm -f core conftest.err conftest.$ac_objext \
14874 conftest$ac_exeext conftest.$ac_ext
14875
14876
14877 gl_pthreadlib_body_done=done
14878 fi
14879
14880 LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
14881 LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
14882 if test $gl_pthread_api = yes; then
14883 if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
14884 gl_threads_api='isoc+posix'
14885
14886 $as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
14887
14888 LIBTHREAD= LTLIBTHREAD=
14889 else
14890 gl_threads_api=posix
14891
14892 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
14893
14894 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
14895 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
14896
14897 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
14898
14899 LIBTHREAD= LTLIBTHREAD=
14900 else
14901 case "$host_os" in
14902 freebsd* | dragonfly*)
14903 if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
14904
14905 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14906
14907 fi
14908 ;;
14909 esac
14910 fi
14911 fi
14912 fi
14913 fi
14914 fi
14915 if test $gl_threads_api = none; then
14916 if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
14917
14918
14919
14920 if test -z "$gl_stdthreadlib_body_done"; then
14921
14922
14923 case "$host_os" in
14924 mingw*)
14925 LIBSTDTHREAD=
14926 ;;
14927 *)
14928
14929
14930 if test -z "$gl_pthreadlib_body_done"; then
14931 gl_pthread_api=no
14932 LIBPTHREAD=
14933 LIBPMULTITHREAD=
14934 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14935 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14936 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14937 if test "x$ac_cv_header_pthread_h" = xyes; then :
14938 gl_have_pthread_h=yes
14939 else
14940 gl_have_pthread_h=no
14941 fi
14942
14943
14944 if test "$gl_have_pthread_h" = yes; then
14945 # Other possible tests:
14946 # -lpthreads (FSU threads, PCthreads)
14947 # -lgthreads
14948 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14949 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14950 # the second one only in libpthread, and lock.c needs it.
14951 #
14952 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14953 # needs -pthread for some reason. See:
14954 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14955 save_LIBS=$LIBS
14956 for gl_pthread in '' '-pthread'; do
14957 LIBS="$LIBS $gl_pthread"
14958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14959 /* end confdefs.h. */
14960 #include <pthread.h>
14961 pthread_mutex_t m;
14962 pthread_mutexattr_t ma;
14963
14964 int
14965 main ()
14966 {
14967 pthread_mutex_lock (&m);
14968 pthread_mutexattr_init (&ma);
14969 ;
14970 return 0;
14971 }
14972 _ACEOF
14973 if ac_fn_c_try_link "$LINENO"; then :
14974 gl_pthread_api=yes
14975 LIBPTHREAD=$gl_pthread
14976 LIBPMULTITHREAD=$gl_pthread
14977 fi
14978 rm -f core conftest.err conftest.$ac_objext \
14979 conftest$ac_exeext conftest.$ac_ext
14980 LIBS=$save_LIBS
14981 test $gl_pthread_api = yes && break
14982 done
14983
14984 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14985 # since it is defined as a macro on OSF/1.)
14986 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14987 # The program links fine without libpthread. But it may actually
14988 # need to link with libpthread in order to create multiple threads.
14989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14990 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14991 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
14992 $as_echo_n "(cached) " >&6
14993 else
14994 ac_check_lib_save_LIBS=$LIBS
14995 LIBS="-lpthread $LIBS"
14996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14997 /* end confdefs.h. */
14998
14999 /* Override any GCC internal prototype to avoid an error.
15000 Use char because int might match the return type of a GCC
15001 builtin and then its argument prototype would still apply. */
15002 #ifdef __cplusplus
15003 extern "C"
15004 #endif
15005 char pthread_kill ();
15006 int
15007 main ()
15008 {
15009 return pthread_kill ();
15010 ;
15011 return 0;
15012 }
15013 _ACEOF
15014 if ac_fn_c_try_link "$LINENO"; then :
15015 ac_cv_lib_pthread_pthread_kill=yes
15016 else
15017 ac_cv_lib_pthread_pthread_kill=no
15018 fi
15019 rm -f core conftest.err conftest.$ac_objext \
15020 conftest$ac_exeext conftest.$ac_ext
15021 LIBS=$ac_check_lib_save_LIBS
15022 fi
15023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15024 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
15025 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
15026 LIBPMULTITHREAD=-lpthread
15027 # On Solaris and HP-UX, most pthread functions exist also in libc.
15028 # Therefore pthread_in_use() needs to actually try to create a
15029 # thread: pthread_create from libc will fail, whereas
15030 # pthread_create will actually create a thread.
15031 # On Solaris 10 or newer, this test is no longer needed, because
15032 # libc contains the fully functional pthread functions.
15033 case "$host_os" in
15034 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
15035
15036 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15037
15038 esac
15039
15040 fi
15041
15042 elif test $gl_pthread_api != yes; then
15043 # Some library is needed. Try libpthread and libc_r.
15044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15045 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
15046 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
15047 $as_echo_n "(cached) " >&6
15048 else
15049 ac_check_lib_save_LIBS=$LIBS
15050 LIBS="-lpthread $LIBS"
15051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15052 /* end confdefs.h. */
15053
15054 /* Override any GCC internal prototype to avoid an error.
15055 Use char because int might match the return type of a GCC
15056 builtin and then its argument prototype would still apply. */
15057 #ifdef __cplusplus
15058 extern "C"
15059 #endif
15060 char pthread_kill ();
15061 int
15062 main ()
15063 {
15064 return pthread_kill ();
15065 ;
15066 return 0;
15067 }
15068 _ACEOF
15069 if ac_fn_c_try_link "$LINENO"; then :
15070 ac_cv_lib_pthread_pthread_kill=yes
15071 else
15072 ac_cv_lib_pthread_pthread_kill=no
15073 fi
15074 rm -f core conftest.err conftest.$ac_objext \
15075 conftest$ac_exeext conftest.$ac_ext
15076 LIBS=$ac_check_lib_save_LIBS
15077 fi
15078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15079 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
15080 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
15081 gl_pthread_api=yes
15082 LIBPTHREAD=-lpthread
15083 LIBPMULTITHREAD=-lpthread
15084 fi
15085
15086 if test $gl_pthread_api != yes; then
15087 # For FreeBSD 4.
15088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15089 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
15090 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
15091 $as_echo_n "(cached) " >&6
15092 else
15093 ac_check_lib_save_LIBS=$LIBS
15094 LIBS="-lc_r $LIBS"
15095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15096 /* end confdefs.h. */
15097
15098 /* Override any GCC internal prototype to avoid an error.
15099 Use char because int might match the return type of a GCC
15100 builtin and then its argument prototype would still apply. */
15101 #ifdef __cplusplus
15102 extern "C"
15103 #endif
15104 char pthread_kill ();
15105 int
15106 main ()
15107 {
15108 return pthread_kill ();
15109 ;
15110 return 0;
15111 }
15112 _ACEOF
15113 if ac_fn_c_try_link "$LINENO"; then :
15114 ac_cv_lib_c_r_pthread_kill=yes
15115 else
15116 ac_cv_lib_c_r_pthread_kill=no
15117 fi
15118 rm -f core conftest.err conftest.$ac_objext \
15119 conftest$ac_exeext conftest.$ac_ext
15120 LIBS=$ac_check_lib_save_LIBS
15121 fi
15122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15123 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
15124 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
15125 gl_pthread_api=yes
15126 LIBPTHREAD=-lc_r
15127 LIBPMULTITHREAD=-lc_r
15128 fi
15129
15130 fi
15131 fi
15132 fi
15133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
15134 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
15135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
15136 $as_echo "$gl_pthread_api" >&6; }
15137
15138
15139 if test $gl_pthread_api = yes; then
15140
15141 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
15142
15143 fi
15144
15145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15146 /* end confdefs.h. */
15147 #include <sched.h>
15148 int
15149 main ()
15150 {
15151 sched_yield ();
15152 ;
15153 return 0;
15154 }
15155 _ACEOF
15156 if ac_fn_c_try_link "$LINENO"; then :
15157 LIB_SCHED_YIELD=
15158
15159 else
15160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
15161 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
15162 if ${ac_cv_lib_rt_sched_yield+:} false; then :
15163 $as_echo_n "(cached) " >&6
15164 else
15165 ac_check_lib_save_LIBS=$LIBS
15166 LIBS="-lrt $LIBS"
15167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15168 /* end confdefs.h. */
15169
15170 /* Override any GCC internal prototype to avoid an error.
15171 Use char because int might match the return type of a GCC
15172 builtin and then its argument prototype would still apply. */
15173 #ifdef __cplusplus
15174 extern "C"
15175 #endif
15176 char sched_yield ();
15177 int
15178 main ()
15179 {
15180 return sched_yield ();
15181 ;
15182 return 0;
15183 }
15184 _ACEOF
15185 if ac_fn_c_try_link "$LINENO"; then :
15186 ac_cv_lib_rt_sched_yield=yes
15187 else
15188 ac_cv_lib_rt_sched_yield=no
15189 fi
15190 rm -f core conftest.err conftest.$ac_objext \
15191 conftest$ac_exeext conftest.$ac_ext
15192 LIBS=$ac_check_lib_save_LIBS
15193 fi
15194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
15195 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
15196 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
15197 LIB_SCHED_YIELD=-lrt
15198 else
15199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
15200 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
15201 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
15202 $as_echo_n "(cached) " >&6
15203 else
15204 ac_check_lib_save_LIBS=$LIBS
15205 LIBS="-lposix4 $LIBS"
15206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15207 /* end confdefs.h. */
15208
15209 /* Override any GCC internal prototype to avoid an error.
15210 Use char because int might match the return type of a GCC
15211 builtin and then its argument prototype would still apply. */
15212 #ifdef __cplusplus
15213 extern "C"
15214 #endif
15215 char sched_yield ();
15216 int
15217 main ()
15218 {
15219 return sched_yield ();
15220 ;
15221 return 0;
15222 }
15223 _ACEOF
15224 if ac_fn_c_try_link "$LINENO"; then :
15225 ac_cv_lib_posix4_sched_yield=yes
15226 else
15227 ac_cv_lib_posix4_sched_yield=no
15228 fi
15229 rm -f core conftest.err conftest.$ac_objext \
15230 conftest$ac_exeext conftest.$ac_ext
15231 LIBS=$ac_check_lib_save_LIBS
15232 fi
15233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
15234 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
15235 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
15236 LIB_SCHED_YIELD=-lposix4
15237 fi
15238
15239 fi
15240
15241
15242 fi
15243 rm -f core conftest.err conftest.$ac_objext \
15244 conftest$ac_exeext conftest.$ac_ext
15245
15246
15247 gl_pthreadlib_body_done=done
15248 fi
15249
15250 if test $ac_cv_header_threads_h = yes; then
15251 for ac_func in thrd_create
15252 do :
15253 ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
15254 if test "x$ac_cv_func_thrd_create" = xyes; then :
15255 cat >>confdefs.h <<_ACEOF
15256 #define HAVE_THRD_CREATE 1
15257 _ACEOF
15258
15259 fi
15260 done
15261
15262 if test $ac_cv_func_thrd_create = yes; then
15263 LIBSTDTHREAD=
15264 else
15265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
15266 $as_echo_n "checking for thrd_create in -lstdthreads... " >&6; }
15267 if ${ac_cv_lib_stdthreads_thrd_create+:} false; then :
15268 $as_echo_n "(cached) " >&6
15269 else
15270 ac_check_lib_save_LIBS=$LIBS
15271 LIBS="-lstdthreads $LIBS"
15272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15273 /* end confdefs.h. */
15274
15275 /* Override any GCC internal prototype to avoid an error.
15276 Use char because int might match the return type of a GCC
15277 builtin and then its argument prototype would still apply. */
15278 #ifdef __cplusplus
15279 extern "C"
15280 #endif
15281 char thrd_create ();
15282 int
15283 main ()
15284 {
15285 return thrd_create ();
15286 ;
15287 return 0;
15288 }
15289 _ACEOF
15290 if ac_fn_c_try_link "$LINENO"; then :
15291 ac_cv_lib_stdthreads_thrd_create=yes
15292 else
15293 ac_cv_lib_stdthreads_thrd_create=no
15294 fi
15295 rm -f core conftest.err conftest.$ac_objext \
15296 conftest$ac_exeext conftest.$ac_ext
15297 LIBS=$ac_check_lib_save_LIBS
15298 fi
15299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
15300 $as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; }
15301 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes; then :
15302
15303 LIBSTDTHREAD='-lstdthreads -lpthread'
15304
15305 else
15306
15307 LIBSTDTHREAD="$LIBPMULTITHREAD"
15308
15309 fi
15310
15311 fi
15312 else
15313 LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
15314 fi
15315 ;;
15316 esac
15317
15318
15319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
15320 $as_echo_n "checking whether ISO C threads API is available... " >&6; }
15321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
15322 $as_echo "$ac_cv_header_threads_h" >&6; }
15323 gl_stdthreadlib_body_done=done
15324 fi
15325
15326 LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
15327 LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
15328 gl_threads_api=isoc
15329
15330 $as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h
15331
15332 fi
15333 fi
15334 if test $gl_threads_api = none; then
15335 case "$gl_use_threads" in
15336 yes | windows | win32) # The 'win32' is for backward compatibility.
15337 if { case "$host_os" in
15338 mingw*) true;;
15339 *) false;;
15340 esac
15341 }; then
15342 gl_threads_api=windows
15343
15344 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
15345
15346 fi
15347 ;;
15348 esac
15349 fi
15350 fi
15351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
15352 $as_echo_n "checking for multithread API to use... " >&6; }
15353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
15354 $as_echo "$gl_threads_api" >&6; }
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
15368 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
15369 if ${gl_cv_func_malloc_posix+:} false; then :
15370 $as_echo_n "(cached) " >&6
15371 else
15372
15373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15374 /* end confdefs.h. */
15375
15376 int
15377 main ()
15378 {
15379 #if defined _WIN32 && ! defined __CYGWIN__
15380 choke me
15381 #endif
15382
15383 ;
15384 return 0;
15385 }
15386 _ACEOF
15387 if ac_fn_c_try_compile "$LINENO"; then :
15388 gl_cv_func_malloc_posix=yes
15389 else
15390 gl_cv_func_malloc_posix=no
15391 fi
15392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15393
15394 fi
15395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
15396 $as_echo "$gl_cv_func_malloc_posix" >&6; }
15397
15398
15399
15400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15401 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15402 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
15403 $as_echo_n "(cached) " >&6
15404 else
15405 if test "$cross_compiling" = yes; then :
15406 case "$host_os" in
15407 # Guess yes on platforms where we know the result.
15408 *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
15409 | hpux* | solaris* | cygwin* | mingw*)
15410 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
15411 # If we don't know, obey --enable-cross-guesses.
15412 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
15413 esac
15414
15415 else
15416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15417 /* end confdefs.h. */
15418 #include <stdlib.h>
15419
15420 int
15421 main ()
15422 {
15423 char *p = malloc (0);
15424 int result = !p;
15425 free (p);
15426 return result;
15427 ;
15428 return 0;
15429 }
15430
15431 _ACEOF
15432 if ac_fn_c_try_run "$LINENO"; then :
15433 ac_cv_func_malloc_0_nonnull=yes
15434 else
15435 ac_cv_func_malloc_0_nonnull=no
15436 fi
15437 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15438 conftest.$ac_objext conftest.beam conftest.$ac_ext
15439 fi
15440
15441
15442 fi
15443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
15444 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
15445 case "$ac_cv_func_malloc_0_nonnull" in
15446 *yes)
15447 gl_cv_func_malloc_0_nonnull=1
15448 ;;
15449 *)
15450 gl_cv_func_malloc_0_nonnull=0
15451 ;;
15452 esac
15453
15454
15455 cat >>confdefs.h <<_ACEOF
15456 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
15457 _ACEOF
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
15470 $as_echo_n "checking for a traditional japanese locale... " >&6; }
15471 if ${gt_cv_locale_ja+:} false; then :
15472 $as_echo_n "(cached) " >&6
15473 else
15474
15475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15476 /* end confdefs.h. */
15477
15478 #include <locale.h>
15479 #include <time.h>
15480 #if HAVE_LANGINFO_CODESET
15481 # include <langinfo.h>
15482 #endif
15483 #include <stdlib.h>
15484 #include <string.h>
15485 struct tm t;
15486 char buf[16];
15487 int main ()
15488 {
15489 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15490 imitates locale dependent behaviour by looking at the environment
15491 variables, and all locales use the UTF-8 encoding. */
15492 #if defined __BEOS__ || defined __HAIKU__
15493 return 1;
15494 #else
15495 /* Check whether the given locale name is recognized by the system. */
15496 # if defined _WIN32 && !defined __CYGWIN__
15497 /* On native Windows, setlocale(category, "") looks at the system settings,
15498 not at the environment variables. Also, when an encoding suffix such
15499 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15500 category of the locale to "C". */
15501 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15502 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15503 return 1;
15504 # else
15505 if (setlocale (LC_ALL, "") == NULL) return 1;
15506 # endif
15507 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15508 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15509 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15510 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15511 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15512 some unit tests fail.
15513 On MirBSD 10, when an unsupported locale is specified, setlocale()
15514 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15515 # if HAVE_LANGINFO_CODESET
15516 {
15517 const char *cs = nl_langinfo (CODESET);
15518 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15519 || strcmp (cs, "UTF-8") == 0)
15520 return 1;
15521 }
15522 # endif
15523 # ifdef __CYGWIN__
15524 /* On Cygwin, avoid locale names without encoding suffix, because the
15525 locale_charset() function relies on the encoding suffix. Note that
15526 LC_ALL is set on the command line. */
15527 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15528 # endif
15529 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
15530 on Cygwin 1.5.x. */
15531 if (MB_CUR_MAX == 1)
15532 return 1;
15533 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15534 This excludes the UTF-8 encoding (except on MirBSD). */
15535 {
15536 const char *p;
15537 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15538 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15539 for (p = buf; *p != '\0'; p++)
15540 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15541 return 1;
15542 }
15543 return 0;
15544 #endif
15545 }
15546
15547 _ACEOF
15548 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15549 (eval $ac_link) 2>&5
15550 ac_status=$?
15551 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15552 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15553 case "$host_os" in
15554 # Handle native Windows specially, because there setlocale() interprets
15555 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15556 # "fr" or "fra" as "French" or "French_France.1252",
15557 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15558 # "ja" as "Japanese" or "Japanese_Japan.932",
15559 # and similar.
15560 mingw*)
15561 # Note that on native Windows, the Japanese locale is
15562 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
15563 # cannot use it here.
15564 gt_cv_locale_ja=none
15565 ;;
15566 *)
15567 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15568 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15569 # configure script would override the LC_ALL setting. Likewise for
15570 # LC_CTYPE, which is also set at the beginning of the configure script.
15571 # Test for the AIX locale name.
15572 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15573 gt_cv_locale_ja=ja_JP
15574 else
15575 # Test for the locale name with explicit encoding suffix.
15576 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15577 gt_cv_locale_ja=ja_JP.EUC-JP
15578 else
15579 # Test for the HP-UX, OSF/1, NetBSD locale name.
15580 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15581 gt_cv_locale_ja=ja_JP.eucJP
15582 else
15583 # Test for the IRIX, FreeBSD locale name.
15584 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15585 gt_cv_locale_ja=ja_JP.EUC
15586 else
15587 # Test for the Solaris 7 locale name.
15588 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15589 gt_cv_locale_ja=ja
15590 else
15591 # Special test for NetBSD 1.6.
15592 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
15593 gt_cv_locale_ja=ja_JP.eucJP
15594 else
15595 # None found.
15596 gt_cv_locale_ja=none
15597 fi
15598 fi
15599 fi
15600 fi
15601 fi
15602 fi
15603 ;;
15604 esac
15605 fi
15606 rm -fr conftest*
15607
15608 fi
15609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
15610 $as_echo "$gt_cv_locale_ja" >&6; }
15611 LOCALE_JA=$gt_cv_locale_ja
15612
15613
15614
15615
15616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
15617 $as_echo_n "checking for a french Unicode locale... " >&6; }
15618 if ${gt_cv_locale_fr_utf8+:} false; then :
15619 $as_echo_n "(cached) " >&6
15620 else
15621
15622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15623 /* end confdefs.h. */
15624
15625 #include <locale.h>
15626 #include <time.h>
15627 #if HAVE_LANGINFO_CODESET
15628 # include <langinfo.h>
15629 #endif
15630 #include <stdlib.h>
15631 #include <string.h>
15632 struct tm t;
15633 char buf[16];
15634 int main () {
15635 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15636 imitates locale dependent behaviour by looking at the environment
15637 variables, and all locales use the UTF-8 encoding. */
15638 #if !(defined __BEOS__ || defined __HAIKU__)
15639 /* Check whether the given locale name is recognized by the system. */
15640 # if defined _WIN32 && !defined __CYGWIN__
15641 /* On native Windows, setlocale(category, "") looks at the system settings,
15642 not at the environment variables. Also, when an encoding suffix such
15643 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15644 category of the locale to "C". */
15645 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15646 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15647 return 1;
15648 # else
15649 if (setlocale (LC_ALL, "") == NULL) return 1;
15650 # endif
15651 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15652 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15653 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15654 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15655 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15656 some unit tests fail. */
15657 # if HAVE_LANGINFO_CODESET
15658 {
15659 const char *cs = nl_langinfo (CODESET);
15660 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
15661 return 1;
15662 }
15663 # endif
15664 # ifdef __CYGWIN__
15665 /* On Cygwin, avoid locale names without encoding suffix, because the
15666 locale_charset() function relies on the encoding suffix. Note that
15667 LC_ALL is set on the command line. */
15668 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15669 # endif
15670 /* Check whether in the abbreviation of the second month, the second
15671 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
15672 two bytes long, with UTF-8 encoding. */
15673 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15674 if (strftime (buf, sizeof (buf), "%b", &t) < 4
15675 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
15676 return 1;
15677 #endif
15678 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
15679 /* Check whether the decimal separator is a comma.
15680 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15681 are nl_langinfo(RADIXCHAR) are both ".". */
15682 if (localeconv () ->decimal_point[0] != ',') return 1;
15683 #endif
15684 return 0;
15685 }
15686
15687 _ACEOF
15688 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15689 (eval $ac_link) 2>&5
15690 ac_status=$?
15691 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15692 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15693 case "$host_os" in
15694 # Handle native Windows specially, because there setlocale() interprets
15695 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15696 # "fr" or "fra" as "French" or "French_France.1252",
15697 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15698 # "ja" as "Japanese" or "Japanese_Japan.932",
15699 # and similar.
15700 mingw*)
15701 # Test for the hypothetical native Windows locale name.
15702 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15703 gt_cv_locale_fr_utf8=French_France.65001
15704 else
15705 # None found.
15706 gt_cv_locale_fr_utf8=none
15707 fi
15708 ;;
15709 *)
15710 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15711 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15712 # configure script would override the LC_ALL setting. Likewise for
15713 # LC_CTYPE, which is also set at the beginning of the configure script.
15714 # Test for the usual locale name.
15715 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15716 gt_cv_locale_fr_utf8=fr_FR
15717 else
15718 # Test for the locale name with explicit encoding suffix.
15719 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15720 gt_cv_locale_fr_utf8=fr_FR.UTF-8
15721 else
15722 # Test for the Solaris 7 locale name.
15723 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15724 gt_cv_locale_fr_utf8=fr.UTF-8
15725 else
15726 # None found.
15727 gt_cv_locale_fr_utf8=none
15728 fi
15729 fi
15730 fi
15731 ;;
15732 esac
15733 fi
15734 rm -fr conftest*
15735
15736 fi
15737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15738 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
15739 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15740
15741
15742
15743
15744
15745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
15746 $as_echo_n "checking for a transitional chinese locale... " >&6; }
15747 if ${gt_cv_locale_zh_CN+:} false; then :
15748 $as_echo_n "(cached) " >&6
15749 else
15750
15751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15752 /* end confdefs.h. */
15753
15754 #include <locale.h>
15755 #include <stdlib.h>
15756 #include <time.h>
15757 #if HAVE_LANGINFO_CODESET
15758 # include <langinfo.h>
15759 #endif
15760 #include <stdlib.h>
15761 #include <string.h>
15762 struct tm t;
15763 char buf[16];
15764 int main ()
15765 {
15766 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15767 imitates locale dependent behaviour by looking at the environment
15768 variables, and all locales use the UTF-8 encoding. */
15769 #if defined __BEOS__ || defined __HAIKU__
15770 return 1;
15771 #else
15772 /* Check whether the given locale name is recognized by the system. */
15773 # if defined _WIN32 && !defined __CYGWIN__
15774 /* On native Windows, setlocale(category, "") looks at the system settings,
15775 not at the environment variables. Also, when an encoding suffix such
15776 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15777 category of the locale to "C". */
15778 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15779 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15780 return 1;
15781 # else
15782 if (setlocale (LC_ALL, "") == NULL) return 1;
15783 # endif
15784 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15785 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15786 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15787 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15788 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15789 some unit tests fail.
15790 On MirBSD 10, when an unsupported locale is specified, setlocale()
15791 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15792 # if HAVE_LANGINFO_CODESET
15793 {
15794 const char *cs = nl_langinfo (CODESET);
15795 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15796 || strcmp (cs, "UTF-8") == 0)
15797 return 1;
15798 }
15799 # endif
15800 # ifdef __CYGWIN__
15801 /* On Cygwin, avoid locale names without encoding suffix, because the
15802 locale_charset() function relies on the encoding suffix. Note that
15803 LC_ALL is set on the command line. */
15804 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15805 # endif
15806 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15807 This excludes the UTF-8 encoding (except on MirBSD). */
15808 {
15809 const char *p;
15810 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15811 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15812 for (p = buf; *p != '\0'; p++)
15813 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15814 return 1;
15815 }
15816 /* Check whether a typical GB18030 multibyte sequence is recognized as a
15817 single wide character. This excludes the GB2312 and GBK encodings. */
15818 if (mblen ("\203\062\332\066", 5) != 4)
15819 return 1;
15820 return 0;
15821 #endif
15822 }
15823
15824 _ACEOF
15825 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15826 (eval $ac_link) 2>&5
15827 ac_status=$?
15828 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15829 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15830 case "$host_os" in
15831 # Handle native Windows specially, because there setlocale() interprets
15832 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15833 # "fr" or "fra" as "French" or "French_France.1252",
15834 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15835 # "ja" as "Japanese" or "Japanese_Japan.932",
15836 # and similar.
15837 mingw*)
15838 # Test for the hypothetical native Windows locale name.
15839 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15840 gt_cv_locale_zh_CN=Chinese_China.54936
15841 else
15842 # None found.
15843 gt_cv_locale_zh_CN=none
15844 fi
15845 ;;
15846 solaris2.8)
15847 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
15848 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
15849 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
15850 gt_cv_locale_zh_CN=none
15851 ;;
15852 *)
15853 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15854 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15855 # configure script would override the LC_ALL setting. Likewise for
15856 # LC_CTYPE, which is also set at the beginning of the configure script.
15857 # Test for the locale name without encoding suffix.
15858 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15859 gt_cv_locale_zh_CN=zh_CN
15860 else
15861 # Test for the locale name with explicit encoding suffix.
15862 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15863 gt_cv_locale_zh_CN=zh_CN.GB18030
15864 else
15865 # None found.
15866 gt_cv_locale_zh_CN=none
15867 fi
15868 fi
15869 ;;
15870 esac
15871 else
15872 # If there was a link error, due to mblen(), the system is so old that
15873 # it certainly doesn't have a chinese locale.
15874 gt_cv_locale_zh_CN=none
15875 fi
15876 rm -fr conftest*
15877
15878 fi
15879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
15880 $as_echo "$gt_cv_locale_zh_CN" >&6; }
15881 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
15882
15883
15884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
15885 $as_echo_n "checking for inline... " >&6; }
15886 if ${ac_cv_c_inline+:} false; then :
15887 $as_echo_n "(cached) " >&6
15888 else
15889 ac_cv_c_inline=no
15890 for ac_kw in inline __inline__ __inline; do
15891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15892 /* end confdefs.h. */
15893 #ifndef __cplusplus
15894 typedef int foo_t;
15895 static $ac_kw foo_t static_foo () {return 0; }
15896 $ac_kw foo_t foo () {return 0; }
15897 #endif
15898
15899 _ACEOF
15900 if ac_fn_c_try_compile "$LINENO"; then :
15901 ac_cv_c_inline=$ac_kw
15902 fi
15903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15904 test "$ac_cv_c_inline" != no && break
15905 done
15906
15907 fi
15908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
15909 $as_echo "$ac_cv_c_inline" >&6; }
15910
15911 case $ac_cv_c_inline in
15912 inline | yes) ;;
15913 *)
15914 case $ac_cv_c_inline in
15915 no) ac_val=;;
15916 *) ac_val=$ac_cv_c_inline;;
15917 esac
15918 cat >>confdefs.h <<_ACEOF
15919 #ifndef __cplusplus
15920 #define inline $ac_val
15921 #endif
15922 _ACEOF
15923 ;;
15924 esac
15925
15926
15927
15928
15929
15930
15931 GNULIB_EXPLICIT_BZERO=0;
15932 GNULIB_FFSL=0;
15933 GNULIB_FFSLL=0;
15934 GNULIB_MEMCHR=0;
15935 GNULIB_MEMMEM=0;
15936 GNULIB_MEMPCPY=0;
15937 GNULIB_MEMRCHR=0;
15938 GNULIB_RAWMEMCHR=0;
15939 GNULIB_STPCPY=0;
15940 GNULIB_STPNCPY=0;
15941 GNULIB_STRCHRNUL=0;
15942 GNULIB_STRDUP=0;
15943 GNULIB_STRNCAT=0;
15944 GNULIB_STRNDUP=0;
15945 GNULIB_STRNLEN=0;
15946 GNULIB_STRPBRK=0;
15947 GNULIB_STRSEP=0;
15948 GNULIB_STRSTR=0;
15949 GNULIB_STRCASESTR=0;
15950 GNULIB_STRTOK_R=0;
15951 GNULIB_MBSLEN=0;
15952 GNULIB_MBSNLEN=0;
15953 GNULIB_MBSCHR=0;
15954 GNULIB_MBSRCHR=0;
15955 GNULIB_MBSSTR=0;
15956 GNULIB_MBSCASECMP=0;
15957 GNULIB_MBSNCASECMP=0;
15958 GNULIB_MBSPCASECMP=0;
15959 GNULIB_MBSCASESTR=0;
15960 GNULIB_MBSCSPN=0;
15961 GNULIB_MBSPBRK=0;
15962 GNULIB_MBSSPN=0;
15963 GNULIB_MBSSEP=0;
15964 GNULIB_MBSTOK_R=0;
15965 GNULIB_STRERROR=0;
15966 GNULIB_STRERROR_R=0;
15967 GNULIB_STRERRORNAME_NP=0;
15968 GNULIB_SIGABBREV_NP=0;
15969 GNULIB_SIGDESCR_NP=0;
15970 GNULIB_STRSIGNAL=0;
15971 GNULIB_STRVERSCMP=0;
15972 HAVE_MBSLEN=0;
15973 GNULIB_MDA_MEMCCPY=1;
15974 GNULIB_MDA_STRDUP=1;
15975 HAVE_EXPLICIT_BZERO=1;
15976 HAVE_FFSL=1;
15977 HAVE_FFSLL=1;
15978 HAVE_DECL_MEMMEM=1;
15979 HAVE_MEMPCPY=1;
15980 HAVE_DECL_MEMRCHR=1;
15981 HAVE_RAWMEMCHR=1;
15982 HAVE_STPCPY=1;
15983 HAVE_STPNCPY=1;
15984 HAVE_STRCHRNUL=1;
15985 HAVE_DECL_STRDUP=1;
15986 HAVE_DECL_STRNDUP=1;
15987 HAVE_DECL_STRNLEN=1;
15988 HAVE_STRPBRK=1;
15989 HAVE_STRSEP=1;
15990 HAVE_STRCASESTR=1;
15991 HAVE_DECL_STRTOK_R=1;
15992 HAVE_DECL_STRERROR_R=1;
15993 HAVE_STRERRORNAME_NP=1;
15994 HAVE_SIGABBREV_NP=1;
15995 HAVE_SIGDESCR_NP=1;
15996 HAVE_DECL_STRSIGNAL=1;
15997 HAVE_STRVERSCMP=1;
15998 REPLACE_FFSLL=0;
15999 REPLACE_MEMCHR=0;
16000 REPLACE_MEMMEM=0;
16001 REPLACE_STPNCPY=0;
16002 REPLACE_STRCHRNUL=0;
16003 REPLACE_STRDUP=0;
16004 REPLACE_STRNCAT=0;
16005 REPLACE_STRNDUP=0;
16006 REPLACE_STRNLEN=0;
16007 REPLACE_STRSTR=0;
16008 REPLACE_STRCASESTR=0;
16009 REPLACE_STRTOK_R=0;
16010 REPLACE_STRERROR=0;
16011 REPLACE_STRERROR_R=0;
16012 REPLACE_STRERRORNAME_NP=0;
16013 REPLACE_STRSIGNAL=0;
16014 UNDEFINE_STRTOK_R=0;
16015
16016
16017
16018
16019
16020
16021 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
16022 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
16023 # irrelevant for anonymous mappings.
16024 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
16025 if test "x$ac_cv_func_mmap" = xyes; then :
16026 gl_have_mmap=yes
16027 else
16028 gl_have_mmap=no
16029 fi
16030
16031
16032 # Try to allow MAP_ANONYMOUS.
16033 gl_have_mmap_anonymous=no
16034 if test $gl_have_mmap = yes; then
16035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
16036 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
16037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16038 /* end confdefs.h. */
16039
16040 #include <sys/mman.h>
16041 #ifdef MAP_ANONYMOUS
16042 I cannot identify this map
16043 #endif
16044
16045 _ACEOF
16046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16047 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
16048 gl_have_mmap_anonymous=yes
16049 fi
16050 rm -f conftest*
16051
16052 if test $gl_have_mmap_anonymous != yes; then
16053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16054 /* end confdefs.h. */
16055
16056 #include <sys/mman.h>
16057 #ifdef MAP_ANON
16058 I cannot identify this map
16059 #endif
16060
16061 _ACEOF
16062 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16063 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
16064
16065 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
16066
16067 gl_have_mmap_anonymous=yes
16068 fi
16069 rm -f conftest*
16070
16071 fi
16072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
16073 $as_echo "$gl_have_mmap_anonymous" >&6; }
16074 if test $gl_have_mmap_anonymous = yes; then
16075
16076 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
16077
16078 fi
16079 fi
16080
16081
16082
16083
16084
16085 # Detect platform-specific bugs in some versions of glibc:
16086 # memchr should not dereference anything with length 0
16087 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
16088 # memchr should not dereference overestimated length after a match
16089 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
16090 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
16091 # memchr should cast the second argument to 'unsigned char'.
16092 # This bug exists in Android 4.3.
16093 # Assume that memchr works on platforms that lack mprotect.
16094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
16095 $as_echo_n "checking whether memchr works... " >&6; }
16096 if ${gl_cv_func_memchr_works+:} false; then :
16097 $as_echo_n "(cached) " >&6
16098 else
16099 if test "$cross_compiling" = yes; then :
16100 case "$host_os" in
16101 # Guess no on Android.
16102 linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
16103 # Guess yes on native Windows.
16104 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
16105 # If we don't know, obey --enable-cross-guesses.
16106 *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
16107 esac
16108
16109 else
16110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16111 /* end confdefs.h. */
16112
16113 #include <string.h>
16114 #if HAVE_SYS_MMAN_H
16115 # include <fcntl.h>
16116 # include <unistd.h>
16117 # include <sys/types.h>
16118 # include <sys/mman.h>
16119 # ifndef MAP_FILE
16120 # define MAP_FILE 0
16121 # endif
16122 #endif
16123
16124 int
16125 main ()
16126 {
16127
16128 int result = 0;
16129 char *fence = NULL;
16130 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
16131 # if HAVE_MAP_ANONYMOUS
16132 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
16133 const int fd = -1;
16134 # else /* !HAVE_MAP_ANONYMOUS */
16135 const int flags = MAP_FILE | MAP_PRIVATE;
16136 int fd = open ("/dev/zero", O_RDONLY, 0666);
16137 if (fd >= 0)
16138 # endif
16139 {
16140 int pagesize = getpagesize ();
16141 char *two_pages =
16142 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
16143 flags, fd, 0);
16144 if (two_pages != (char *)(-1)
16145 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
16146 fence = two_pages + pagesize;
16147 }
16148 #endif
16149 if (fence)
16150 {
16151 /* Test against bugs on glibc systems. */
16152 if (memchr (fence, 0, 0))
16153 result |= 1;
16154 strcpy (fence - 9, "12345678");
16155 if (memchr (fence - 9, 0, 79) != fence - 1)
16156 result |= 2;
16157 if (memchr (fence - 1, 0, 3) != fence - 1)
16158 result |= 4;
16159 /* Test against bug on AIX 7.2. */
16160 if (memchr (fence - 4, '6', 16) != fence - 4)
16161 result |= 8;
16162 }
16163 /* Test against bug on Android 4.3. */
16164 {
16165 char input[3];
16166 input[0] = 'a';
16167 input[1] = 'b';
16168 input[2] = 'c';
16169 if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
16170 result |= 16;
16171 }
16172 return result;
16173
16174 ;
16175 return 0;
16176 }
16177 _ACEOF
16178 if ac_fn_c_try_run "$LINENO"; then :
16179 gl_cv_func_memchr_works=yes
16180 else
16181 gl_cv_func_memchr_works=no
16182 fi
16183 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16184 conftest.$ac_objext conftest.beam conftest.$ac_ext
16185 fi
16186
16187
16188 fi
16189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
16190 $as_echo "$gl_cv_func_memchr_works" >&6; }
16191 case "$gl_cv_func_memchr_works" in
16192 *yes) ;;
16193 *) REPLACE_MEMCHR=1 ;;
16194 esac
16195
16196 ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
16197 if test "x$ac_cv_have_decl_memmem" = xyes; then :
16198 ac_have_decl=1
16199 else
16200 ac_have_decl=0
16201 fi
16202
16203 cat >>confdefs.h <<_ACEOF
16204 #define HAVE_DECL_MEMMEM $ac_have_decl
16205 _ACEOF
16206
16207
16208
16209
16210
16211 for ac_func in memmem
16212 do :
16213 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
16214 if test "x$ac_cv_func_memmem" = xyes; then :
16215 cat >>confdefs.h <<_ACEOF
16216 #define HAVE_MEMMEM 1
16217 _ACEOF
16218
16219 fi
16220 done
16221
16222 if test $ac_cv_func_memmem = yes; then
16223 HAVE_MEMMEM=1
16224 else
16225 HAVE_MEMMEM=0
16226 fi
16227
16228 if test $ac_cv_have_decl_memmem = no; then
16229 HAVE_DECL_MEMMEM=0
16230 else
16231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
16232 $as_echo_n "checking whether memmem works... " >&6; }
16233 if ${gl_cv_func_memmem_works_always+:} false; then :
16234 $as_echo_n "(cached) " >&6
16235 else
16236 if test "$cross_compiling" = yes; then :
16237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16238 /* end confdefs.h. */
16239
16240 #ifdef __GNU_LIBRARY__
16241 #include <features.h>
16242 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
16243 || __GLIBC_MINOR__ > 12)) \
16244 || (__GLIBC__ > 2)) \
16245 || defined __UCLIBC__
16246 Lucky user
16247 #endif
16248 #elif defined __CYGWIN__
16249 #include <cygwin/version.h>
16250 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
16251 Lucky user
16252 #endif
16253 #else
16254 Lucky user
16255 #endif
16256
16257 _ACEOF
16258 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16259 $EGREP "Lucky user" >/dev/null 2>&1; then :
16260 gl_cv_func_memmem_works_always="guessing yes"
16261 else
16262 gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
16263 fi
16264 rm -f conftest*
16265
16266
16267 else
16268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16269 /* end confdefs.h. */
16270
16271 #include <string.h> /* for memmem */
16272 #define P "_EF_BF_BD"
16273 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
16274 #define NEEDLE P P P P P
16275
16276 int
16277 main ()
16278 {
16279
16280 int result = 0;
16281 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
16282 result |= 1;
16283 /* Check for empty needle behavior. */
16284 {
16285 const char *haystack = "AAA";
16286 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
16287 result |= 2;
16288 }
16289 return result;
16290
16291 ;
16292 return 0;
16293 }
16294 _ACEOF
16295 if ac_fn_c_try_run "$LINENO"; then :
16296 gl_cv_func_memmem_works_always=yes
16297 else
16298 gl_cv_func_memmem_works_always=no
16299 fi
16300 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16301 conftest.$ac_objext conftest.beam conftest.$ac_ext
16302 fi
16303
16304
16305 fi
16306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
16307 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
16308 case "$gl_cv_func_memmem_works_always" in
16309 *yes) ;;
16310 *)
16311 REPLACE_MEMMEM=1
16312 ;;
16313 esac
16314 fi
16315 :
16316
16317 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
16318 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
16319 ac_have_decl=1
16320 else
16321 ac_have_decl=0
16322 fi
16323
16324 cat >>confdefs.h <<_ACEOF
16325 #define HAVE_DECL_MEMRCHR $ac_have_decl
16326 _ACEOF
16327
16328
16329
16330
16331
16332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
16333 $as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
16334 if ${gl_cv_minmax_in_limits_h+:} false; then :
16335 $as_echo_n "(cached) " >&6
16336 else
16337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16338 /* end confdefs.h. */
16339 #include <limits.h>
16340 int x = MIN (42, 17);
16341 int
16342 main ()
16343 {
16344
16345 ;
16346 return 0;
16347 }
16348 _ACEOF
16349 if ac_fn_c_try_compile "$LINENO"; then :
16350 gl_cv_minmax_in_limits_h=yes
16351 else
16352 gl_cv_minmax_in_limits_h=no
16353 fi
16354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16355 fi
16356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
16357 $as_echo "$gl_cv_minmax_in_limits_h" >&6; }
16358 if test $gl_cv_minmax_in_limits_h = yes; then
16359
16360 $as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
16361
16362 fi
16363
16364
16365
16366
16367
16368
16369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
16370 $as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
16371 if ${gl_cv_minmax_in_sys_param_h+:} false; then :
16372 $as_echo_n "(cached) " >&6
16373 else
16374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16375 /* end confdefs.h. */
16376 #include <sys/param.h>
16377 int x = MIN (42, 17);
16378 int
16379 main ()
16380 {
16381
16382 ;
16383 return 0;
16384 }
16385 _ACEOF
16386 if ac_fn_c_try_compile "$LINENO"; then :
16387 gl_cv_minmax_in_sys_param_h=yes
16388 else
16389 gl_cv_minmax_in_sys_param_h=no
16390 fi
16391 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16392 fi
16393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
16394 $as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
16395 if test $gl_cv_minmax_in_sys_param_h = yes; then
16396
16397 $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
16398
16399 fi
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410 GNULIB_GETADDRINFO=0;
16411 HAVE_STRUCT_ADDRINFO=1;
16412 HAVE_DECL_FREEADDRINFO=1;
16413 HAVE_DECL_GAI_STRERROR=1;
16414 HAVE_DECL_GETADDRINFO=1;
16415 HAVE_DECL_GETNAMEINFO=1;
16416 REPLACE_GAI_STRERROR=0;
16417 REPLACE_GETADDRINFO=0;
16418
16419
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
16421 $as_echo_n "checking for O_CLOEXEC... " >&6; }
16422 if ${gl_cv_macro_O_CLOEXEC+:} false; then :
16423 $as_echo_n "(cached) " >&6
16424 else
16425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16426 /* end confdefs.h. */
16427 #include <fcntl.h>
16428 #ifndef O_CLOEXEC
16429 choke me;
16430 #endif
16431
16432 int
16433 main ()
16434 {
16435 return O_CLOEXEC;
16436 ;
16437 return 0;
16438 }
16439 _ACEOF
16440 if ac_fn_c_try_compile "$LINENO"; then :
16441 gl_cv_macro_O_CLOEXEC=yes
16442 else
16443 gl_cv_macro_O_CLOEXEC=no
16444 fi
16445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16446 fi
16447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
16448 $as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
16449
16450
16451
16452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
16453 $as_echo_n "checking for promoted mode_t type... " >&6; }
16454 if ${gl_cv_promoted_mode_t+:} false; then :
16455 $as_echo_n "(cached) " >&6
16456 else
16457
16458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16459 /* end confdefs.h. */
16460 #include <sys/types.h>
16461 int
16462 main ()
16463 {
16464 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
16465 ;
16466 return 0;
16467 }
16468 _ACEOF
16469 if ac_fn_c_try_compile "$LINENO"; then :
16470 gl_cv_promoted_mode_t='int'
16471 else
16472 gl_cv_promoted_mode_t='mode_t'
16473 fi
16474 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16475
16476 fi
16477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
16478 $as_echo "$gl_cv_promoted_mode_t" >&6; }
16479
16480 cat >>confdefs.h <<_ACEOF
16481 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
16482 _ACEOF
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494 GNULIB_PSELECT=0;
16495 GNULIB_SELECT=0;
16496 HAVE_PSELECT=1;
16497 REPLACE_PSELECT=0;
16498 REPLACE_SELECT=0;
16499
16500
16501
16502
16503
16504
16505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
16506 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
16507 if ${gl_cv_header_sys_select_h_selfcontained+:} false; then :
16508 $as_echo_n "(cached) " >&6
16509 else
16510
16511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16512 /* end confdefs.h. */
16513 #include <sys/select.h>
16514 int
16515 main ()
16516 {
16517 struct timeval b;
16518 ;
16519 return 0;
16520 }
16521 _ACEOF
16522 if ac_fn_c_try_compile "$LINENO"; then :
16523 gl_cv_header_sys_select_h_selfcontained=yes
16524 else
16525 gl_cv_header_sys_select_h_selfcontained=no
16526 fi
16527 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16528 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
16529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16530 /* end confdefs.h. */
16531 #include <sys/select.h>
16532 int
16533 main ()
16534 {
16535 int memset; int bzero;
16536 ;
16537 return 0;
16538 }
16539
16540 _ACEOF
16541 if ac_fn_c_try_compile "$LINENO"; then :
16542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16543 /* end confdefs.h. */
16544 #include <sys/select.h>
16545 int
16546 main ()
16547 {
16548
16549 #undef memset
16550 #define memset nonexistent_memset
16551 extern
16552 #ifdef __cplusplus
16553 "C"
16554 #endif
16555 void *memset (void *, int, unsigned long);
16556 #undef bzero
16557 #define bzero nonexistent_bzero
16558 extern
16559 #ifdef __cplusplus
16560 "C"
16561 #endif
16562 void bzero (void *, unsigned long);
16563 fd_set fds;
16564 FD_ZERO (&fds);
16565
16566 ;
16567 return 0;
16568 }
16569
16570 _ACEOF
16571 if ac_fn_c_try_link "$LINENO"; then :
16572
16573 else
16574 gl_cv_header_sys_select_h_selfcontained=no
16575 fi
16576 rm -f core conftest.err conftest.$ac_objext \
16577 conftest$ac_exeext conftest.$ac_ext
16578
16579 fi
16580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16581 fi
16582
16583 fi
16584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
16585 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595 if test $gl_cv_have_include_next = yes; then
16596 gl_cv_next_sys_select_h='<'sys/select.h'>'
16597 else
16598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
16599 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
16600 if ${gl_cv_next_sys_select_h+:} false; then :
16601 $as_echo_n "(cached) " >&6
16602 else
16603
16604 if test $ac_cv_header_sys_select_h = yes; then
16605
16606
16607
16608
16609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16610 /* end confdefs.h. */
16611 #include <sys/select.h>
16612 _ACEOF
16613 case "$host_os" in
16614 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16615 *) gl_absname_cpp="$ac_cpp" ;;
16616 esac
16617
16618 case "$host_os" in
16619 mingw*)
16620 gl_dirsep_regex='[/\\]'
16621 ;;
16622 *)
16623 gl_dirsep_regex='\/'
16624 ;;
16625 esac
16626 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16627 gl_header_literal_regex=`echo 'sys/select.h' \
16628 | sed -e "$gl_make_literal_regex_sed"`
16629 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16630 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16631 s|^/[^/]|//&|
16632 p
16633 q
16634 }'
16635
16636 gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16637 sed -n "$gl_absolute_header_sed"`
16638
16639 gl_header=$gl_cv_absolute_sys_select_h
16640 gl_cv_next_sys_select_h='"'$gl_header'"'
16641 else
16642 gl_cv_next_sys_select_h='<'sys/select.h'>'
16643 fi
16644
16645
16646 fi
16647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
16648 $as_echo "$gl_cv_next_sys_select_h" >&6; }
16649 fi
16650 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
16651
16652 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16653 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16654 gl_next_as_first_directive='<'sys/select.h'>'
16655 else
16656 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16657 gl_next_as_first_directive=$gl_cv_next_sys_select_h
16658 fi
16659 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
16660
16661
16662
16663
16664 if test $ac_cv_header_sys_select_h = yes; then
16665 HAVE_SYS_SELECT_H=1
16666 else
16667 HAVE_SYS_SELECT_H=0
16668 fi
16669
16670
16671
16672
16673
16674 if test $ac_cv_header_sys_socket_h != yes; then
16675 for ac_header in winsock2.h
16676 do :
16677 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
16678 if test "x$ac_cv_header_winsock2_h" = xyes; then :
16679 cat >>confdefs.h <<_ACEOF
16680 #define HAVE_WINSOCK2_H 1
16681 _ACEOF
16682
16683 fi
16684
16685 done
16686
16687 fi
16688 if test "$ac_cv_header_winsock2_h" = yes; then
16689 HAVE_WINSOCK2_H=1
16690 UNISTD_H_HAVE_WINSOCK2_H=1
16691 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
16692 else
16693 HAVE_WINSOCK2_H=0
16694 fi
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707 if test $ac_cv_header_sys_socket_h != yes; then
16708 for ac_header in winsock2.h
16709 do :
16710 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
16711 if test "x$ac_cv_header_winsock2_h" = xyes; then :
16712 cat >>confdefs.h <<_ACEOF
16713 #define HAVE_WINSOCK2_H 1
16714 _ACEOF
16715
16716 fi
16717
16718 done
16719
16720 fi
16721 if test "$ac_cv_header_winsock2_h" = yes; then
16722 HAVE_WINSOCK2_H=1
16723 UNISTD_H_HAVE_WINSOCK2_H=1
16724 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
16725 else
16726 HAVE_WINSOCK2_H=0
16727 fi
16728
16729 LIBSOCKET=
16730 if test $HAVE_WINSOCK2_H = 1; then
16731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
16732 $as_echo_n "checking for WSAStartup... " >&6; }
16733 if ${gl_cv_func_wsastartup+:} false; then :
16734 $as_echo_n "(cached) " >&6
16735 else
16736
16737 gl_save_LIBS="$LIBS"
16738 LIBS="$LIBS -lws2_32"
16739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16740 /* end confdefs.h. */
16741
16742 #ifdef HAVE_WINSOCK2_H
16743 # include <winsock2.h>
16744 #endif
16745 int
16746 main ()
16747 {
16748
16749 WORD wVersionRequested = MAKEWORD(1, 1);
16750 WSADATA wsaData;
16751 int err = WSAStartup(wVersionRequested, &wsaData);
16752 WSACleanup ();
16753
16754 ;
16755 return 0;
16756 }
16757
16758 _ACEOF
16759 if ac_fn_c_try_link "$LINENO"; then :
16760 gl_cv_func_wsastartup=yes
16761 else
16762 gl_cv_func_wsastartup=no
16763 fi
16764 rm -f core conftest.err conftest.$ac_objext \
16765 conftest$ac_exeext conftest.$ac_ext
16766 LIBS="$gl_save_LIBS"
16767
16768 fi
16769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
16770 $as_echo "$gl_cv_func_wsastartup" >&6; }
16771 if test "$gl_cv_func_wsastartup" = "yes"; then
16772
16773 $as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
16774
16775 LIBSOCKET='-lws2_32'
16776 fi
16777 else
16778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
16779 $as_echo_n "checking for library containing setsockopt... " >&6; }
16780 if ${gl_cv_lib_socket+:} false; then :
16781 $as_echo_n "(cached) " >&6
16782 else
16783
16784 gl_cv_lib_socket=
16785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16786 /* end confdefs.h. */
16787 extern
16788 #ifdef __cplusplus
16789 "C"
16790 #endif
16791 char setsockopt();
16792 int
16793 main ()
16794 {
16795 setsockopt();
16796 ;
16797 return 0;
16798 }
16799 _ACEOF
16800 if ac_fn_c_try_link "$LINENO"; then :
16801
16802 else
16803 gl_save_LIBS="$LIBS"
16804 LIBS="$gl_save_LIBS -lsocket"
16805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16806 /* end confdefs.h. */
16807 extern
16808 #ifdef __cplusplus
16809 "C"
16810 #endif
16811 char setsockopt();
16812 int
16813 main ()
16814 {
16815 setsockopt();
16816 ;
16817 return 0;
16818 }
16819 _ACEOF
16820 if ac_fn_c_try_link "$LINENO"; then :
16821 gl_cv_lib_socket="-lsocket"
16822 fi
16823 rm -f core conftest.err conftest.$ac_objext \
16824 conftest$ac_exeext conftest.$ac_ext
16825 if test -z "$gl_cv_lib_socket"; then
16826 LIBS="$gl_save_LIBS -lnetwork"
16827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16828 /* end confdefs.h. */
16829 extern
16830 #ifdef __cplusplus
16831 "C"
16832 #endif
16833 char setsockopt();
16834 int
16835 main ()
16836 {
16837 setsockopt();
16838 ;
16839 return 0;
16840 }
16841 _ACEOF
16842 if ac_fn_c_try_link "$LINENO"; then :
16843 gl_cv_lib_socket="-lnetwork"
16844 fi
16845 rm -f core conftest.err conftest.$ac_objext \
16846 conftest$ac_exeext conftest.$ac_ext
16847 if test -z "$gl_cv_lib_socket"; then
16848 LIBS="$gl_save_LIBS -lnet"
16849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16850 /* end confdefs.h. */
16851 extern
16852 #ifdef __cplusplus
16853 "C"
16854 #endif
16855 char setsockopt();
16856 int
16857 main ()
16858 {
16859 setsockopt();
16860 ;
16861 return 0;
16862 }
16863 _ACEOF
16864 if ac_fn_c_try_link "$LINENO"; then :
16865 gl_cv_lib_socket="-lnet"
16866 fi
16867 rm -f core conftest.err conftest.$ac_objext \
16868 conftest$ac_exeext conftest.$ac_ext
16869 fi
16870 fi
16871 LIBS="$gl_save_LIBS"
16872
16873 fi
16874 rm -f core conftest.err conftest.$ac_objext \
16875 conftest$ac_exeext conftest.$ac_ext
16876 if test -z "$gl_cv_lib_socket"; then
16877 gl_cv_lib_socket="none needed"
16878 fi
16879
16880 fi
16881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
16882 $as_echo "$gl_cv_lib_socket" >&6; }
16883 if test "$gl_cv_lib_socket" != "none needed"; then
16884 LIBSOCKET="$gl_cv_lib_socket"
16885 fi
16886 fi
16887
16888
16889
16890
16891
16892
16893 :
16894
16895
16896 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
16897 if test "x$ac_cv_have_decl_setenv" = xyes; then :
16898 ac_have_decl=1
16899 else
16900 ac_have_decl=0
16901 fi
16902
16903 cat >>confdefs.h <<_ACEOF
16904 #define HAVE_DECL_SETENV $ac_have_decl
16905 _ACEOF
16906
16907
16908
16909
16910
16911
16912 if test $ac_cv_have_decl_setenv = no; then
16913 HAVE_DECL_SETENV=0
16914 fi
16915
16916
16917
16918
16919
16920 for ac_header in search.h
16921 do :
16922 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
16923 if test "x$ac_cv_header_search_h" = xyes; then :
16924 cat >>confdefs.h <<_ACEOF
16925 #define HAVE_SEARCH_H 1
16926 _ACEOF
16927
16928 fi
16929
16930 done
16931
16932 for ac_func in tsearch
16933 do :
16934 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
16935 if test "x$ac_cv_func_tsearch" = xyes; then :
16936 cat >>confdefs.h <<_ACEOF
16937 #define HAVE_TSEARCH 1
16938 _ACEOF
16939
16940 fi
16941 done
16942
16943
16944
16945
16946 GNULIB_PTHREAD_SIGMASK=0;
16947 GNULIB_RAISE=0;
16948 GNULIB_SIGNAL_H_SIGPIPE=0;
16949 GNULIB_SIGPROCMASK=0;
16950 GNULIB_SIGACTION=0;
16951 HAVE_POSIX_SIGNALBLOCKING=1;
16952 HAVE_PTHREAD_SIGMASK=1;
16953 HAVE_RAISE=1;
16954 HAVE_SIGSET_T=1;
16955 HAVE_SIGINFO_T=1;
16956 HAVE_SIGACTION=1;
16957 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
16958
16959 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
16960
16961 HAVE_SIGHANDLER_T=1;
16962 REPLACE_PTHREAD_SIGMASK=0;
16963 REPLACE_RAISE=0;
16964
16965
16966 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
16967 #include <signal.h>
16968 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
16969 #include <sys/types.h>
16970
16971 "
16972 if test "x$ac_cv_type_sigset_t" = xyes; then :
16973
16974 cat >>confdefs.h <<_ACEOF
16975 #define HAVE_SIGSET_T 1
16976 _ACEOF
16977
16978 gl_cv_type_sigset_t=yes
16979 else
16980 gl_cv_type_sigset_t=no
16981 fi
16982
16983 if test $gl_cv_type_sigset_t != yes; then
16984 HAVE_SIGSET_T=0
16985 fi
16986
16987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16988 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
16989 if ${ac_cv_header_stdbool_h+:} false; then :
16990 $as_echo_n "(cached) " >&6
16991 else
16992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16993 /* end confdefs.h. */
16994
16995 #include <stdbool.h>
16996
16997 #ifdef __cplusplus
16998 typedef bool Bool;
16999 #else
17000 typedef _Bool Bool;
17001 #ifndef bool
17002 "error: bool is not defined"
17003 #endif
17004 #ifndef false
17005 "error: false is not defined"
17006 #endif
17007 #if false
17008 "error: false is not 0"
17009 #endif
17010 #ifndef true
17011 "error: true is not defined"
17012 #endif
17013 #if true != 1
17014 "error: true is not 1"
17015 #endif
17016 #endif
17017
17018 #ifndef __bool_true_false_are_defined
17019 "error: __bool_true_false_are_defined is not defined"
17020 #endif
17021
17022 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
17023
17024 char a[true == 1 ? 1 : -1];
17025 char b[false == 0 ? 1 : -1];
17026 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
17027 char d[(bool) 0.5 == true ? 1 : -1];
17028 /* See body of main program for 'e'. */
17029 char f[(Bool) 0.0 == false ? 1 : -1];
17030 char g[true];
17031 char h[sizeof (Bool)];
17032 char i[sizeof s.t];
17033 enum { j = false, k = true, l = false * true, m = true * 256 };
17034 /* The following fails for
17035 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
17036 Bool n[m];
17037 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
17038 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
17039 /* Catch a bug in an HP-UX C compiler. See
17040 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
17041 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
17042 */
17043 Bool q = true;
17044 Bool *pq = &q;
17045 bool *qq = &q;
17046
17047 int
17048 main ()
17049 {
17050
17051 bool e = &s;
17052 *pq |= q; *pq |= ! q;
17053 *qq |= q; *qq |= ! q;
17054 /* Refer to every declared value, to avoid compiler optimizations. */
17055 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
17056 + !m + !n + !o + !p + !q + !pq + !qq);
17057
17058 ;
17059 return 0;
17060 }
17061 _ACEOF
17062 if ac_fn_c_try_compile "$LINENO"; then :
17063 ac_cv_header_stdbool_h=yes
17064 else
17065 ac_cv_header_stdbool_h=no
17066 fi
17067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17068 fi
17069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
17070 $as_echo "$ac_cv_header_stdbool_h" >&6; }
17071 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
17072 if test "x$ac_cv_type__Bool" = xyes; then :
17073
17074 cat >>confdefs.h <<_ACEOF
17075 #define HAVE__BOOL 1
17076 _ACEOF
17077
17078
17079 fi
17080
17081
17082 ac_fn_c_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default"
17083 if test "x$ac_cv_have_decl_fcloseall" = xyes; then :
17084 ac_have_decl=1
17085 else
17086 ac_have_decl=0
17087 fi
17088
17089 cat >>confdefs.h <<_ACEOF
17090 #define HAVE_DECL_FCLOSEALL $ac_have_decl
17091 _ACEOF
17092
17093 ac_fn_c_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default"
17094 if test "x$ac_cv_have_decl_ecvt" = xyes; then :
17095 ac_have_decl=1
17096 else
17097 ac_have_decl=0
17098 fi
17099
17100 cat >>confdefs.h <<_ACEOF
17101 #define HAVE_DECL_ECVT $ac_have_decl
17102 _ACEOF
17103
17104 ac_fn_c_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default"
17105 if test "x$ac_cv_have_decl_fcvt" = xyes; then :
17106 ac_have_decl=1
17107 else
17108 ac_have_decl=0
17109 fi
17110
17111 cat >>confdefs.h <<_ACEOF
17112 #define HAVE_DECL_FCVT $ac_have_decl
17113 _ACEOF
17114
17115 ac_fn_c_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default"
17116 if test "x$ac_cv_have_decl_gcvt" = xyes; then :
17117 ac_have_decl=1
17118 else
17119 ac_have_decl=0
17120 fi
17121
17122 cat >>confdefs.h <<_ACEOF
17123 #define HAVE_DECL_GCVT $ac_have_decl
17124 _ACEOF
17125
17126 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
17127 if test "x$ac_cv_have_decl_strdup" = xyes; then :
17128 ac_have_decl=1
17129 else
17130 ac_have_decl=0
17131 fi
17132
17133 cat >>confdefs.h <<_ACEOF
17134 #define HAVE_DECL_STRDUP $ac_have_decl
17135 _ACEOF
17136
17137
17138 REPLACE_STRERROR_0=0
17139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
17140 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
17141 if ${gl_cv_func_strerror_0_works+:} false; then :
17142 $as_echo_n "(cached) " >&6
17143 else
17144 if test "$cross_compiling" = yes; then :
17145 case "$host_os" in
17146 # Guess yes on glibc systems.
17147 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
17148 # Guess yes on musl systems.
17149 *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;;
17150 # Guess yes on native Windows.
17151 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
17152 # If we don't know, obey --enable-cross-guesses.
17153 *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
17154 esac
17155
17156 else
17157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17158 /* end confdefs.h. */
17159 #include <string.h>
17160 #include <errno.h>
17161
17162 int
17163 main ()
17164 {
17165 int result = 0;
17166 char *str;
17167 errno = 0;
17168 str = strerror (0);
17169 if (!*str) result |= 1;
17170 if (errno) result |= 2;
17171 if (strstr (str, "nknown") || strstr (str, "ndefined"))
17172 result |= 4;
17173 return result;
17174 ;
17175 return 0;
17176 }
17177 _ACEOF
17178 if ac_fn_c_try_run "$LINENO"; then :
17179 gl_cv_func_strerror_0_works=yes
17180 else
17181 gl_cv_func_strerror_0_works=no
17182 fi
17183 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17184 conftest.$ac_objext conftest.beam conftest.$ac_ext
17185 fi
17186
17187
17188 fi
17189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
17190 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
17191 case "$gl_cv_func_strerror_0_works" in
17192 *yes) ;;
17193 *)
17194 REPLACE_STRERROR_0=1
17195
17196 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
17197
17198 ;;
17199 esac
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210 if test $ac_cv_func_strerror_r = yes; then
17211 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
17212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
17213 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
17214 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
17215 $as_echo_n "(cached) " >&6
17216 else
17217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17218 /* end confdefs.h. */
17219 #include <string.h>
17220 int strerror_r (int, char *, size_t);
17221
17222 int
17223 main ()
17224 {
17225
17226 ;
17227 return 0;
17228 }
17229 _ACEOF
17230 if ac_fn_c_try_compile "$LINENO"; then :
17231 gl_cv_func_strerror_r_posix_signature=yes
17232 else
17233 gl_cv_func_strerror_r_posix_signature=no
17234 fi
17235 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17236
17237 fi
17238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
17239 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
17240 if test $gl_cv_func_strerror_r_posix_signature = yes; then
17241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
17242 $as_echo_n "checking whether strerror_r works... " >&6; }
17243 if ${gl_cv_func_strerror_r_works+:} false; then :
17244 $as_echo_n "(cached) " >&6
17245 else
17246 if test "$cross_compiling" = yes; then :
17247
17248 case "$host_os" in
17249 # Guess no on AIX.
17250 aix*) gl_cv_func_strerror_r_works="guessing no";;
17251 # Guess no on HP-UX.
17252 hpux*) gl_cv_func_strerror_r_works="guessing no";;
17253 # Guess no on BSD variants.
17254 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
17255 # Guess yes otherwise.
17256 *) gl_cv_func_strerror_r_works="guessing yes";;
17257 esac
17258
17259 else
17260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17261 /* end confdefs.h. */
17262 #include <errno.h>
17263 #include <string.h>
17264
17265 int
17266 main ()
17267 {
17268 int result = 0;
17269 char buf[79];
17270 if (strerror_r (EACCES, buf, 0) < 0)
17271 result |= 1;
17272 errno = 0;
17273 if (strerror_r (EACCES, buf, sizeof buf) != 0)
17274 result |= 2;
17275 strcpy (buf, "Unknown");
17276 if (strerror_r (0, buf, sizeof buf) != 0)
17277 result |= 4;
17278 if (errno)
17279 result |= 8;
17280 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
17281 result |= 0x10;
17282 errno = 0;
17283 *buf = 0;
17284 if (strerror_r (-3, buf, sizeof buf) < 0)
17285 result |= 0x20;
17286 if (errno)
17287 result |= 0x40;
17288 if (!*buf)
17289 result |= 0x80;
17290 return result;
17291
17292 ;
17293 return 0;
17294 }
17295 _ACEOF
17296 if ac_fn_c_try_run "$LINENO"; then :
17297 gl_cv_func_strerror_r_works=yes
17298 else
17299 gl_cv_func_strerror_r_works=no
17300 fi
17301 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17302 conftest.$ac_objext conftest.beam conftest.$ac_ext
17303 fi
17304
17305
17306 fi
17307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
17308 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
17309 else
17310
17311 if test $ac_cv_func___xpg_strerror_r = yes; then
17312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
17313 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
17314 if ${gl_cv_func_strerror_r_works+:} false; then :
17315 $as_echo_n "(cached) " >&6
17316 else
17317 if test "$cross_compiling" = yes; then :
17318 gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
17319
17320 else
17321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17322 /* end confdefs.h. */
17323 #include <errno.h>
17324 #include <string.h>
17325 extern
17326 #ifdef __cplusplus
17327 "C"
17328 #endif
17329 int __xpg_strerror_r(int, char *, size_t);
17330
17331 int
17332 main ()
17333 {
17334 int result = 0;
17335 char buf[256] = "^";
17336 char copy[256];
17337 char *str = strerror (-1);
17338 strcpy (copy, str);
17339 if (__xpg_strerror_r (-2, buf, 1) == 0)
17340 result |= 1;
17341 if (*buf)
17342 result |= 2;
17343 __xpg_strerror_r (-2, buf, 256);
17344 if (strcmp (str, copy))
17345 result |= 4;
17346 return result;
17347
17348 ;
17349 return 0;
17350 }
17351 _ACEOF
17352 if ac_fn_c_try_run "$LINENO"; then :
17353 gl_cv_func_strerror_r_works=yes
17354 else
17355 gl_cv_func_strerror_r_works=no
17356 fi
17357 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17358 conftest.$ac_objext conftest.beam conftest.$ac_ext
17359 fi
17360
17361
17362 fi
17363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
17364 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
17365 fi
17366 fi
17367 fi
17368 fi
17369
17370 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
17371 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
17372 ac_have_decl=1
17373 else
17374 ac_have_decl=0
17375 fi
17376
17377 cat >>confdefs.h <<_ACEOF
17378 #define HAVE_DECL_STRERROR_R $ac_have_decl
17379 _ACEOF
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395 if test $gl_cv_have_include_next = yes; then
17396 gl_cv_next_string_h='<'string.h'>'
17397 else
17398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
17399 $as_echo_n "checking absolute name of <string.h>... " >&6; }
17400 if ${gl_cv_next_string_h+:} false; then :
17401 $as_echo_n "(cached) " >&6
17402 else
17403
17404
17405
17406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17407 /* end confdefs.h. */
17408 #include <string.h>
17409 _ACEOF
17410 case "$host_os" in
17411 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17412 *) gl_absname_cpp="$ac_cpp" ;;
17413 esac
17414
17415 case "$host_os" in
17416 mingw*)
17417 gl_dirsep_regex='[/\\]'
17418 ;;
17419 *)
17420 gl_dirsep_regex='\/'
17421 ;;
17422 esac
17423 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17424 gl_header_literal_regex=`echo 'string.h' \
17425 | sed -e "$gl_make_literal_regex_sed"`
17426 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17427 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17428 s|^/[^/]|//&|
17429 p
17430 q
17431 }'
17432
17433 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17434 sed -n "$gl_absolute_header_sed"`
17435
17436 gl_header=$gl_cv_absolute_string_h
17437 gl_cv_next_string_h='"'$gl_header'"'
17438
17439
17440 fi
17441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
17442 $as_echo "$gl_cv_next_string_h" >&6; }
17443 fi
17444 NEXT_STRING_H=$gl_cv_next_string_h
17445
17446 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17447 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17448 gl_next_as_first_directive='<'string.h'>'
17449 else
17450 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17451 gl_next_as_first_directive=$gl_cv_next_string_h
17452 fi
17453 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479 if test $gl_cv_have_include_next = yes; then
17480 gl_cv_next_strings_h='<'strings.h'>'
17481 else
17482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
17483 $as_echo_n "checking absolute name of <strings.h>... " >&6; }
17484 if ${gl_cv_next_strings_h+:} false; then :
17485 $as_echo_n "(cached) " >&6
17486 else
17487
17488 if test $ac_cv_header_strings_h = yes; then
17489
17490
17491
17492
17493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17494 /* end confdefs.h. */
17495 #include <strings.h>
17496 _ACEOF
17497 case "$host_os" in
17498 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17499 *) gl_absname_cpp="$ac_cpp" ;;
17500 esac
17501
17502 case "$host_os" in
17503 mingw*)
17504 gl_dirsep_regex='[/\\]'
17505 ;;
17506 *)
17507 gl_dirsep_regex='\/'
17508 ;;
17509 esac
17510 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17511 gl_header_literal_regex=`echo 'strings.h' \
17512 | sed -e "$gl_make_literal_regex_sed"`
17513 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17514 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17515 s|^/[^/]|//&|
17516 p
17517 q
17518 }'
17519
17520 gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17521 sed -n "$gl_absolute_header_sed"`
17522
17523 gl_header=$gl_cv_absolute_strings_h
17524 gl_cv_next_strings_h='"'$gl_header'"'
17525 else
17526 gl_cv_next_strings_h='<'strings.h'>'
17527 fi
17528
17529
17530 fi
17531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
17532 $as_echo "$gl_cv_next_strings_h" >&6; }
17533 fi
17534 NEXT_STRINGS_H=$gl_cv_next_strings_h
17535
17536 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17537 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17538 gl_next_as_first_directive='<'strings.h'>'
17539 else
17540 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17541 gl_next_as_first_directive=$gl_cv_next_strings_h
17542 fi
17543 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
17544
17545
17546
17547
17548 if test $ac_cv_header_strings_h = yes; then
17549 HAVE_STRINGS_H=1
17550 else
17551 HAVE_STRINGS_H=0
17552 fi
17553
17554
17555
17556
17557
17558
17559 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
17560 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
17561 ac_have_decl=1
17562 else
17563 ac_have_decl=0
17564 fi
17565
17566 cat >>confdefs.h <<_ACEOF
17567 #define HAVE_DECL_STRNLEN $ac_have_decl
17568 _ACEOF
17569
17570
17571
17572
17573 if test $REPLACE_MEMCHR = 1; then
17574 REPLACE_STRSTR=1
17575 else
17576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
17577 $as_echo_n "checking whether strstr works... " >&6; }
17578 if ${gl_cv_func_strstr_works_always+:} false; then :
17579 $as_echo_n "(cached) " >&6
17580 else
17581 if test "$cross_compiling" = yes; then :
17582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17583 /* end confdefs.h. */
17584
17585 #ifdef __GNU_LIBRARY__
17586 #include <features.h>
17587 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
17588 || defined __UCLIBC__
17589 Lucky user
17590 #endif
17591 #elif defined __CYGWIN__
17592 #include <cygwin/version.h>
17593 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
17594 Lucky user
17595 #endif
17596 #else
17597 Lucky user
17598 #endif
17599
17600 _ACEOF
17601 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17602 $EGREP "Lucky user" >/dev/null 2>&1; then :
17603 gl_cv_func_strstr_works_always="guessing yes"
17604 else
17605 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
17606 fi
17607 rm -f conftest*
17608
17609
17610 else
17611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17612 /* end confdefs.h. */
17613
17614 #include <string.h> /* for strstr */
17615 #ifdef __GNU_LIBRARY__
17616 #include <features.h>
17617 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
17618 Unlucky user
17619 #endif
17620 #endif
17621 #define P "_EF_BF_BD"
17622 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
17623 #define NEEDLE P P P P P
17624
17625 int
17626 main ()
17627 {
17628 return !!strstr (HAYSTACK, NEEDLE);
17629
17630 ;
17631 return 0;
17632 }
17633 _ACEOF
17634 if ac_fn_c_try_run "$LINENO"; then :
17635 gl_cv_func_strstr_works_always=yes
17636 else
17637 gl_cv_func_strstr_works_always=no
17638 fi
17639 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17640 conftest.$ac_objext conftest.beam conftest.$ac_ext
17641 fi
17642
17643
17644 fi
17645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
17646 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
17647 case "$gl_cv_func_strstr_works_always" in
17648 *yes) ;;
17649 *)
17650 REPLACE_STRSTR=1
17651 ;;
17652 esac
17653 fi
17654
17655 ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
17656 if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
17657 ac_have_decl=1
17658 else
17659 ac_have_decl=0
17660 fi
17661
17662 cat >>confdefs.h <<_ACEOF
17663 #define HAVE_DECL_STRTOK_R $ac_have_decl
17664 _ACEOF
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678 $as_echo "#define _USE_STD_STAT 1" >>confdefs.h
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690 if test $gl_cv_have_include_next = yes; then
17691 gl_cv_next_sys_types_h='<'sys/types.h'>'
17692 else
17693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
17694 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
17695 if ${gl_cv_next_sys_types_h+:} false; then :
17696 $as_echo_n "(cached) " >&6
17697 else
17698
17699
17700
17701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17702 /* end confdefs.h. */
17703 #include <sys/types.h>
17704 _ACEOF
17705 case "$host_os" in
17706 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17707 *) gl_absname_cpp="$ac_cpp" ;;
17708 esac
17709
17710 case "$host_os" in
17711 mingw*)
17712 gl_dirsep_regex='[/\\]'
17713 ;;
17714 *)
17715 gl_dirsep_regex='\/'
17716 ;;
17717 esac
17718 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17719 gl_header_literal_regex=`echo 'sys/types.h' \
17720 | sed -e "$gl_make_literal_regex_sed"`
17721 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17722 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17723 s|^/[^/]|//&|
17724 p
17725 q
17726 }'
17727
17728 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17729 sed -n "$gl_absolute_header_sed"`
17730
17731 gl_header=$gl_cv_absolute_sys_types_h
17732 gl_cv_next_sys_types_h='"'$gl_header'"'
17733
17734
17735 fi
17736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
17737 $as_echo "$gl_cv_next_sys_types_h" >&6; }
17738 fi
17739 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
17740
17741 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17742 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17743 gl_next_as_first_directive='<'sys/types.h'>'
17744 else
17745 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17746 gl_next_as_first_directive=$gl_cv_next_sys_types_h
17747 fi
17748 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761 WINDOWS_STAT_INODES=0
17762
17763
17764
17765
17766
17767
17768
17769
17770 GNULIB_CTIME=0;
17771 GNULIB_MKTIME=0;
17772 GNULIB_LOCALTIME=0;
17773 GNULIB_NANOSLEEP=0;
17774 GNULIB_STRFTIME=0;
17775 GNULIB_STRPTIME=0;
17776 GNULIB_TIMEGM=0;
17777 GNULIB_TIMESPEC_GET=0;
17778 GNULIB_TIME_R=0;
17779 GNULIB_TIME_RZ=0;
17780 GNULIB_TZSET=0;
17781 GNULIB_MDA_TZSET=1;
17782 HAVE_DECL_LOCALTIME_R=1;
17783 HAVE_NANOSLEEP=1;
17784 HAVE_STRPTIME=1;
17785 HAVE_TIMEGM=1;
17786 HAVE_TIMESPEC_GET=1;
17787 HAVE_TIMEZONE_T=0;
17788 REPLACE_CTIME=GNULIB_PORTCHECK;
17789 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
17790 REPLACE_MKTIME=GNULIB_PORTCHECK;
17791 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
17792 REPLACE_STRFTIME=GNULIB_PORTCHECK;
17793 REPLACE_TIMEGM=GNULIB_PORTCHECK;
17794 REPLACE_TZSET=GNULIB_PORTCHECK;
17795
17796 : ${GNULIB_GETTIMEOFDAY=0};
17797 REPLACE_GMTIME=0;
17798 REPLACE_LOCALTIME=0;
17799
17800
17801
17802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17803 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
17804 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
17805 $as_echo_n "(cached) " >&6
17806 else
17807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17808 /* end confdefs.h. */
17809 #include <time.h>
17810
17811 int
17812 main ()
17813 {
17814 static struct timespec x; x.tv_sec = x.tv_nsec;
17815 ;
17816 return 0;
17817 }
17818 _ACEOF
17819 if ac_fn_c_try_compile "$LINENO"; then :
17820 gl_cv_sys_struct_timespec_in_time_h=yes
17821 else
17822 gl_cv_sys_struct_timespec_in_time_h=no
17823 fi
17824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17825 fi
17826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
17827 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
17828
17829 TIME_H_DEFINES_STRUCT_TIMESPEC=0
17830 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
17831 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
17832 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
17833 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
17834 TIME_H_DEFINES_STRUCT_TIMESPEC=1
17835 else
17836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
17837 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
17838 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
17839 $as_echo_n "(cached) " >&6
17840 else
17841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17842 /* end confdefs.h. */
17843 #include <sys/time.h>
17844
17845 int
17846 main ()
17847 {
17848 static struct timespec x; x.tv_sec = x.tv_nsec;
17849 ;
17850 return 0;
17851 }
17852 _ACEOF
17853 if ac_fn_c_try_compile "$LINENO"; then :
17854 gl_cv_sys_struct_timespec_in_sys_time_h=yes
17855 else
17856 gl_cv_sys_struct_timespec_in_sys_time_h=no
17857 fi
17858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17859 fi
17860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
17861 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
17862 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
17863 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
17864 else
17865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
17866 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
17867 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
17868 $as_echo_n "(cached) " >&6
17869 else
17870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17871 /* end confdefs.h. */
17872 #include <pthread.h>
17873
17874 int
17875 main ()
17876 {
17877 static struct timespec x; x.tv_sec = x.tv_nsec;
17878 ;
17879 return 0;
17880 }
17881 _ACEOF
17882 if ac_fn_c_try_compile "$LINENO"; then :
17883 gl_cv_sys_struct_timespec_in_pthread_h=yes
17884 else
17885 gl_cv_sys_struct_timespec_in_pthread_h=no
17886 fi
17887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17888 fi
17889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17890 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17891 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17892 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17893 else
17894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
17895 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
17896 if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
17897 $as_echo_n "(cached) " >&6
17898 else
17899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17900 /* end confdefs.h. */
17901 #include <unistd.h>
17902
17903 int
17904 main ()
17905 {
17906 static struct timespec x; x.tv_sec = x.tv_nsec;
17907 ;
17908 return 0;
17909 }
17910 _ACEOF
17911 if ac_fn_c_try_compile "$LINENO"; then :
17912 gl_cv_sys_struct_timespec_in_unistd_h=yes
17913 else
17914 gl_cv_sys_struct_timespec_in_unistd_h=no
17915 fi
17916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17917 fi
17918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
17919 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
17920 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
17921 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
17922 fi
17923 fi
17924 fi
17925 fi
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942 if test $gl_cv_have_include_next = yes; then
17943 gl_cv_next_time_h='<'time.h'>'
17944 else
17945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17946 $as_echo_n "checking absolute name of <time.h>... " >&6; }
17947 if ${gl_cv_next_time_h+:} false; then :
17948 $as_echo_n "(cached) " >&6
17949 else
17950
17951
17952
17953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17954 /* end confdefs.h. */
17955 #include <time.h>
17956 _ACEOF
17957 case "$host_os" in
17958 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17959 *) gl_absname_cpp="$ac_cpp" ;;
17960 esac
17961
17962 case "$host_os" in
17963 mingw*)
17964 gl_dirsep_regex='[/\\]'
17965 ;;
17966 *)
17967 gl_dirsep_regex='\/'
17968 ;;
17969 esac
17970 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17971 gl_header_literal_regex=`echo 'time.h' \
17972 | sed -e "$gl_make_literal_regex_sed"`
17973 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17974 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17975 s|^/[^/]|//&|
17976 p
17977 q
17978 }'
17979
17980 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17981 sed -n "$gl_absolute_header_sed"`
17982
17983 gl_header=$gl_cv_absolute_time_h
17984 gl_cv_next_time_h='"'$gl_header'"'
17985
17986
17987 fi
17988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17989 $as_echo "$gl_cv_next_time_h" >&6; }
17990 fi
17991 NEXT_TIME_H=$gl_cv_next_time_h
17992
17993 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17994 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17995 gl_next_as_first_directive='<'time.h'>'
17996 else
17997 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17998 gl_next_as_first_directive=$gl_cv_next_time_h
17999 fi
18000 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
18001
18002
18003
18004
18005
18006
18007
18008
18009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
18010 $as_echo_n "checking for TIME_UTC in <time.h>... " >&6; }
18011 if ${gl_cv_time_h_has_TIME_UTC+:} false; then :
18012 $as_echo_n "(cached) " >&6
18013 else
18014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18015 /* end confdefs.h. */
18016 #include <time.h>
18017
18018 int
18019 main ()
18020 {
18021 static int x = TIME_UTC; x++;
18022 ;
18023 return 0;
18024 }
18025 _ACEOF
18026 if ac_fn_c_try_compile "$LINENO"; then :
18027 gl_cv_time_h_has_TIME_UTC=yes
18028 else
18029 gl_cv_time_h_has_TIME_UTC=no
18030 fi
18031 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18032 fi
18033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
18034 $as_echo "$gl_cv_time_h_has_TIME_UTC" >&6; }
18035 if test $gl_cv_time_h_has_TIME_UTC = yes; then
18036 TIME_H_DEFINES_TIME_UTC=1
18037 else
18038 TIME_H_DEFINES_TIME_UTC=0
18039 fi
18040
18041
18042
18043
18044 ac_fn_c_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default"
18045 if test "x$ac_cv_have_decl_execvpe" = xyes; then :
18046 ac_have_decl=1
18047 else
18048 ac_have_decl=0
18049 fi
18050
18051 cat >>confdefs.h <<_ACEOF
18052 #define HAVE_DECL_EXECVPE $ac_have_decl
18053 _ACEOF
18054
18055 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
18056 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
18057 ac_have_decl=1
18058 else
18059 ac_have_decl=0
18060 fi
18061
18062 cat >>confdefs.h <<_ACEOF
18063 #define HAVE_DECL_UNSETENV $ac_have_decl
18064 _ACEOF
18065
18066
18067
18068
18069
18070 if test $ac_cv_header_crtdefs_h = yes; then
18071 HAVE_CRTDEFS_H=1
18072 else
18073 HAVE_CRTDEFS_H=0
18074 fi
18075
18076
18077
18078 GNULIB_ISWBLANK=0;
18079 GNULIB_ISWDIGIT=0;
18080 GNULIB_ISWXDIGIT=0;
18081 GNULIB_WCTYPE=0;
18082 GNULIB_ISWCTYPE=0;
18083 GNULIB_WCTRANS=0;
18084 GNULIB_TOWCTRANS=0;
18085 HAVE_ISWBLANK=1;
18086 HAVE_WCTYPE_T=1;
18087 HAVE_WCTRANS_T=1;
18088 REPLACE_ISWBLANK=0;
18089 REPLACE_ISWDIGIT=0;
18090 REPLACE_ISWXDIGIT=0;
18091
18092
18093
18094
18095
18096
18097
18098
18099 if false; then
18100 GL_COND_LIBTOOL_TRUE=
18101 GL_COND_LIBTOOL_FALSE='#'
18102 else
18103 GL_COND_LIBTOOL_TRUE='#'
18104 GL_COND_LIBTOOL_FALSE=
18105 fi
18106
18107 gl_cond_libtool=false
18108 gl_libdeps=
18109 gl_ltlibdeps=
18110 gl_m4_base='import/m4'
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121 gl_source_base='import'
18122
18123
18124 if test $ac_cv_func_alloca_works = no; then
18125 :
18126 fi
18127
18128 # Define an additional variable used in the Makefile substitution.
18129 if test $ac_cv_working_alloca_h = yes; then
18130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
18131 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
18132 if ${gl_cv_rpl_alloca+:} false; then :
18133 $as_echo_n "(cached) " >&6
18134 else
18135
18136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18137 /* end confdefs.h. */
18138
18139 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
18140 Need own alloca
18141 #endif
18142
18143 _ACEOF
18144 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18145 $EGREP "Need own alloca" >/dev/null 2>&1; then :
18146 gl_cv_rpl_alloca=yes
18147 else
18148 gl_cv_rpl_alloca=no
18149 fi
18150 rm -f conftest*
18151
18152
18153 fi
18154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
18155 $as_echo "$gl_cv_rpl_alloca" >&6; }
18156 if test $gl_cv_rpl_alloca = yes; then
18157
18158 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
18159
18160 ALLOCA_H=alloca.h
18161 else
18162 ALLOCA_H=
18163 fi
18164 else
18165 ALLOCA_H=alloca.h
18166 fi
18167
18168 if test -n "$ALLOCA_H"; then
18169 GL_GENERATE_ALLOCA_H_TRUE=
18170 GL_GENERATE_ALLOCA_H_FALSE='#'
18171 else
18172 GL_GENERATE_ALLOCA_H_TRUE='#'
18173 GL_GENERATE_ALLOCA_H_FALSE=
18174 fi
18175
18176
18177 if test $ac_cv_working_alloca_h = yes; then
18178 HAVE_ALLOCA_H=1
18179 else
18180 HAVE_ALLOCA_H=0
18181 fi
18182
18183
18184
18185
18186
18187
18188 if test $ac_cv_header_arpa_inet_h = yes; then
18189 HAVE_ARPA_INET_H=1
18190 else
18191 HAVE_ARPA_INET_H=0
18192 fi
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203 if test $gl_cv_have_include_next = yes; then
18204 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
18205 else
18206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
18207 $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
18208 if ${gl_cv_next_arpa_inet_h+:} false; then :
18209 $as_echo_n "(cached) " >&6
18210 else
18211
18212 if test $ac_cv_header_arpa_inet_h = yes; then
18213
18214
18215
18216
18217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18218 /* end confdefs.h. */
18219 #include <arpa/inet.h>
18220 _ACEOF
18221 case "$host_os" in
18222 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18223 *) gl_absname_cpp="$ac_cpp" ;;
18224 esac
18225
18226 case "$host_os" in
18227 mingw*)
18228 gl_dirsep_regex='[/\\]'
18229 ;;
18230 *)
18231 gl_dirsep_regex='\/'
18232 ;;
18233 esac
18234 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18235 gl_header_literal_regex=`echo 'arpa/inet.h' \
18236 | sed -e "$gl_make_literal_regex_sed"`
18237 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18238 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18239 s|^/[^/]|//&|
18240 p
18241 q
18242 }'
18243
18244 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18245 sed -n "$gl_absolute_header_sed"`
18246
18247 gl_header=$gl_cv_absolute_arpa_inet_h
18248 gl_cv_next_arpa_inet_h='"'$gl_header'"'
18249 else
18250 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
18251 fi
18252
18253
18254 fi
18255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
18256 $as_echo "$gl_cv_next_arpa_inet_h" >&6; }
18257 fi
18258 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
18259
18260 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18261 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18262 gl_next_as_first_directive='<'arpa/inet.h'>'
18263 else
18264 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18265 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
18266 fi
18267 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277 if test $ac_cv_header_sys_socket_h = yes; then
18278 HAVE_WS2TCPIP_H=0
18279 else
18280 if test $ac_cv_header_ws2tcpip_h = yes; then
18281 HAVE_WS2TCPIP_H=1
18282 else
18283 HAVE_WS2TCPIP_H=0
18284 fi
18285 fi
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301 if test $ac_cv_func_btowc = no; then
18302 HAVE_BTOWC=0
18303 else
18304
18305
18306
18307
18308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
18309 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
18310 if ${gl_cv_func_btowc_nul+:} false; then :
18311 $as_echo_n "(cached) " >&6
18312 else
18313
18314 if test "$cross_compiling" = yes; then :
18315
18316 case "$host_os" in
18317 # Guess no on Cygwin.
18318 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
18319 # Guess yes on native Windows.
18320 mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
18321 # Guess yes otherwise.
18322 *) gl_cv_func_btowc_nul="guessing yes" ;;
18323 esac
18324
18325 else
18326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18327 /* end confdefs.h. */
18328
18329 #include <wchar.h>
18330 int main ()
18331 {
18332 if (btowc ('\0') != 0)
18333 return 1;
18334 return 0;
18335 }
18336 _ACEOF
18337 if ac_fn_c_try_run "$LINENO"; then :
18338 gl_cv_func_btowc_nul=yes
18339 else
18340 gl_cv_func_btowc_nul=no
18341 fi
18342 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18343 conftest.$ac_objext conftest.beam conftest.$ac_ext
18344 fi
18345
18346
18347 fi
18348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
18349 $as_echo "$gl_cv_func_btowc_nul" >&6; }
18350
18351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
18352 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
18353 if ${gl_cv_func_btowc_eof+:} false; then :
18354 $as_echo_n "(cached) " >&6
18355 else
18356
18357 case "$host_os" in
18358 # Guess no on IRIX.
18359 irix*) gl_cv_func_btowc_eof="guessing no" ;;
18360 # Guess yes on native Windows.
18361 mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
18362 # Guess yes otherwise.
18363 *) gl_cv_func_btowc_eof="guessing yes" ;;
18364 esac
18365 if test $LOCALE_FR != none; then
18366 if test "$cross_compiling" = yes; then :
18367 :
18368 else
18369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18370 /* end confdefs.h. */
18371
18372 #include <locale.h>
18373 #include <stdio.h>
18374 #include <wchar.h>
18375 int main ()
18376 {
18377 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
18378 {
18379 if (btowc (EOF) != WEOF)
18380 return 1;
18381 }
18382 return 0;
18383 }
18384 _ACEOF
18385 if ac_fn_c_try_run "$LINENO"; then :
18386 gl_cv_func_btowc_eof=yes
18387 else
18388 gl_cv_func_btowc_eof=no
18389 fi
18390 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18391 conftest.$ac_objext conftest.beam conftest.$ac_ext
18392 fi
18393
18394 fi
18395
18396 fi
18397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
18398 $as_echo "$gl_cv_func_btowc_eof" >&6; }
18399
18400 case "$gl_cv_func_btowc_nul" in
18401 *yes) ;;
18402 *) REPLACE_BTOWC=1 ;;
18403 esac
18404 case "$gl_cv_func_btowc_eof" in
18405 *yes) ;;
18406 *) REPLACE_BTOWC=1 ;;
18407 esac
18408 fi
18409
18410 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
18411
18412
18413
18414
18415
18416
18417
18418
18419 gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
18420
18421
18422 :
18423
18424 fi
18425
18426
18427
18428
18429
18430 GNULIB_BTOWC=1
18431
18432
18433
18434
18435
18436 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
18437
18438
18439
18440
18441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
18442 $as_echo_n "checking for __builtin_expect... " >&6; }
18443 if ${gl_cv___builtin_expect+:} false; then :
18444 $as_echo_n "(cached) " >&6
18445 else
18446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18447 /* end confdefs.h. */
18448
18449 int
18450 main (int argc, char **argv)
18451 {
18452 argc = __builtin_expect (argc, 100);
18453 return argv[argc != 100][0];
18454 }
18455 _ACEOF
18456 if ac_fn_c_try_link "$LINENO"; then :
18457 gl_cv___builtin_expect=yes
18458 else
18459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18460 /* end confdefs.h. */
18461
18462 #include <builtins.h>
18463 int
18464 main (int argc, char **argv)
18465 {
18466 argc = __builtin_expect (argc, 100);
18467 return argv[argc != 100][0];
18468 }
18469 _ACEOF
18470 if ac_fn_c_try_link "$LINENO"; then :
18471 gl_cv___builtin_expect="in <builtins.h>"
18472 else
18473 gl_cv___builtin_expect=no
18474 fi
18475 rm -f core conftest.err conftest.$ac_objext \
18476 conftest$ac_exeext conftest.$ac_ext
18477 fi
18478 rm -f core conftest.err conftest.$ac_objext \
18479 conftest$ac_exeext conftest.$ac_ext
18480 fi
18481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
18482 $as_echo "$gl_cv___builtin_expect" >&6; }
18483 if test "$gl_cv___builtin_expect" = yes; then
18484 $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
18485
18486 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
18487 $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
18488
18489 fi
18490
18491
18492
18493
18494
18495 if test $ac_cv_func_canonicalize_file_name = no; then
18496 HAVE_CANONICALIZE_FILE_NAME=0
18497 if test $ac_cv_func_realpath = no; then
18498 HAVE_REALPATH=0
18499 else
18500 case "$gl_cv_func_realpath_works" in
18501 *yes) ;;
18502 *) REPLACE_REALPATH=1 ;;
18503 esac
18504 fi
18505 else
18506 case "$gl_cv_func_realpath_works" in
18507 *yes)
18508 ;;
18509 *)
18510 REPLACE_CANONICALIZE_FILE_NAME=1
18511 REPLACE_REALPATH=1
18512 ;;
18513 esac
18514 fi
18515
18516 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
18517
18518
18519
18520
18521
18522
18523
18524
18525 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
18526
18527 fi
18528
18529
18530 cat >>confdefs.h <<_ACEOF
18531 #define GNULIB_CANONICALIZE_LGPL 1
18532 _ACEOF
18533
18534
18535
18536
18537
18538
18539
18540 GNULIB_CANONICALIZE_FILE_NAME=1
18541
18542
18543
18544
18545
18546 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
18547
18548
18549
18550
18551
18552
18553
18554
18555 GNULIB_REALPATH=1
18556
18557
18558
18559
18560
18561 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
18562
18563
18564
18565
18566
18567
18568
18569
18570 GNULIB_CHDIR=1
18571
18572
18573
18574
18575
18576 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
18577
18578
18579
18580
18581
18582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
18583 $as_echo_n "checking whether this system supports file names of any length... " >&6; }
18584 if ${gl_cv_have_unlimited_file_name_length+:} false; then :
18585 $as_echo_n "(cached) " >&6
18586 else
18587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18588 /* end confdefs.h. */
18589
18590 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
18591 #if HAVE_UNISTD_H
18592 # include <unistd.h>
18593 #endif
18594 #include <limits.h>
18595 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
18596 # include <sys/param.h>
18597 #endif
18598 #if !defined PATH_MAX && defined MAXPATHLEN
18599 # define PATH_MAX MAXPATHLEN
18600 #endif
18601 #ifdef __hpux
18602 # undef PATH_MAX
18603 # define PATH_MAX 1024
18604 #endif
18605 #if defined _WIN32 && ! defined __CYGWIN__
18606 # undef PATH_MAX
18607 # define PATH_MAX 260
18608 #endif
18609
18610 #ifdef PATH_MAX
18611 have_arbitrary_file_name_length_limit
18612 #endif
18613 _ACEOF
18614 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18615 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
18616 gl_cv_have_unlimited_file_name_length=no
18617 else
18618 gl_cv_have_unlimited_file_name_length=yes
18619 fi
18620 rm -f conftest*
18621
18622 fi
18623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
18624 $as_echo "$gl_cv_have_unlimited_file_name_length" >&6; }
18625
18626 if test $gl_cv_have_unlimited_file_name_length = no; then
18627
18628
18629
18630
18631
18632
18633
18634
18635 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
18636
18637 :
18638 fi
18639
18640 if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
18641
18642
18643
18644
18645
18646
18647
18648
18649 gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
18650
18651 fi
18652 if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
18653
18654
18655
18656
18657
18658
18659
18660
18661 gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
18662
18663 fi
18664
18665
18666
18667
18668
18669 GNULIB_CHOWN=1
18670
18671
18672
18673
18674
18675 $as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
18676
18677
18678
18679
18680
18681
18682 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
18683 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
18684
18685 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
18686 # programs in the package would end up linked with that potentially-shared
18687 # library, inducing unnecessary run-time overhead.
18688 LIB_CLOCK_GETTIME=
18689
18690 gl_saved_libs=$LIBS
18691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18692 $as_echo_n "checking for library containing clock_gettime... " >&6; }
18693 if ${ac_cv_search_clock_gettime+:} false; then :
18694 $as_echo_n "(cached) " >&6
18695 else
18696 ac_func_search_save_LIBS=$LIBS
18697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18698 /* end confdefs.h. */
18699
18700 /* Override any GCC internal prototype to avoid an error.
18701 Use char because int might match the return type of a GCC
18702 builtin and then its argument prototype would still apply. */
18703 #ifdef __cplusplus
18704 extern "C"
18705 #endif
18706 char clock_gettime ();
18707 int
18708 main ()
18709 {
18710 return clock_gettime ();
18711 ;
18712 return 0;
18713 }
18714 _ACEOF
18715 for ac_lib in '' rt posix4; do
18716 if test -z "$ac_lib"; then
18717 ac_res="none required"
18718 else
18719 ac_res=-l$ac_lib
18720 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18721 fi
18722 if ac_fn_c_try_link "$LINENO"; then :
18723 ac_cv_search_clock_gettime=$ac_res
18724 fi
18725 rm -f core conftest.err conftest.$ac_objext \
18726 conftest$ac_exeext
18727 if ${ac_cv_search_clock_gettime+:} false; then :
18728 break
18729 fi
18730 done
18731 if ${ac_cv_search_clock_gettime+:} false; then :
18732
18733 else
18734 ac_cv_search_clock_gettime=no
18735 fi
18736 rm conftest.$ac_ext
18737 LIBS=$ac_func_search_save_LIBS
18738 fi
18739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18740 $as_echo "$ac_cv_search_clock_gettime" >&6; }
18741 ac_res=$ac_cv_search_clock_gettime
18742 if test "$ac_res" != no; then :
18743 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18744 test "$ac_cv_search_clock_gettime" = "none required" ||
18745 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
18746 fi
18747
18748 for ac_func in clock_gettime clock_settime
18749 do :
18750 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18751 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18752 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18753 cat >>confdefs.h <<_ACEOF
18754 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18755 _ACEOF
18756
18757 fi
18758 done
18759
18760 LIBS=$gl_saved_libs
18761
18762
18763
18764 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
18765
18766
18767
18768
18769
18770
18771 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18772 REPLACE_CLOSE=1
18773 fi
18774
18775
18776
18777
18778
18779
18780 if test $ac_cv_header_sys_socket_h != yes; then
18781 for ac_header in winsock2.h
18782 do :
18783 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18784 if test "x$ac_cv_header_winsock2_h" = xyes; then :
18785 cat >>confdefs.h <<_ACEOF
18786 #define HAVE_WINSOCK2_H 1
18787 _ACEOF
18788
18789 fi
18790
18791 done
18792
18793 fi
18794 if test "$ac_cv_header_winsock2_h" = yes; then
18795 HAVE_WINSOCK2_H=1
18796 UNISTD_H_HAVE_WINSOCK2_H=1
18797 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18798 else
18799 HAVE_WINSOCK2_H=0
18800 fi
18801
18802
18803 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
18804 REPLACE_CLOSE=1
18805 fi
18806
18807
18808 if test $REPLACE_CLOSE = 0; then
18809
18810
18811
18812 if test $ac_cv_func_fchdir = no; then
18813 HAVE_FCHDIR=0
18814 fi
18815
18816 if test $HAVE_FCHDIR = 0; then
18817 REPLACE_CLOSE=1
18818 fi
18819 fi
18820
18821
18822 if test $REPLACE_CLOSE = 1; then
18823
18824
18825
18826
18827
18828
18829
18830
18831 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
18832
18833 fi
18834
18835
18836
18837
18838
18839 GNULIB_CLOSE=1
18840
18841
18842
18843
18844
18845 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
18846
18847
18848
18849
18850
18851
18852 for ac_func in closedir
18853 do :
18854 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
18855 if test "x$ac_cv_func_closedir" = xyes; then :
18856 cat >>confdefs.h <<_ACEOF
18857 #define HAVE_CLOSEDIR 1
18858 _ACEOF
18859
18860 fi
18861 done
18862
18863 if test $ac_cv_func_closedir = no; then
18864 HAVE_CLOSEDIR=0
18865 fi
18866
18867
18868
18869
18870 if test $ac_cv_func_fchdir = no; then
18871 HAVE_FCHDIR=0
18872 fi
18873
18874 if test $HAVE_FCHDIR = 0; then
18875 if test $HAVE_CLOSEDIR = 1; then
18876 REPLACE_CLOSEDIR=1
18877 fi
18878 fi
18879
18880 case $host_os,$HAVE_CLOSEDIR in
18881 os2*,1)
18882 REPLACE_CLOSEDIR=1;;
18883 esac
18884
18885 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
18886
18887
18888
18889
18890
18891
18892
18893
18894 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
18895
18896 fi
18897
18898
18899
18900
18901
18902 GNULIB_CLOSEDIR=1
18903
18904
18905
18906
18907
18908 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923 if test $gl_cv_have_include_next = yes; then
18924 gl_cv_next_ctype_h='<'ctype.h'>'
18925 else
18926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
18927 $as_echo_n "checking absolute name of <ctype.h>... " >&6; }
18928 if ${gl_cv_next_ctype_h+:} false; then :
18929 $as_echo_n "(cached) " >&6
18930 else
18931
18932
18933
18934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18935 /* end confdefs.h. */
18936 #include <ctype.h>
18937 _ACEOF
18938 case "$host_os" in
18939 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18940 *) gl_absname_cpp="$ac_cpp" ;;
18941 esac
18942
18943 case "$host_os" in
18944 mingw*)
18945 gl_dirsep_regex='[/\\]'
18946 ;;
18947 *)
18948 gl_dirsep_regex='\/'
18949 ;;
18950 esac
18951 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18952 gl_header_literal_regex=`echo 'ctype.h' \
18953 | sed -e "$gl_make_literal_regex_sed"`
18954 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18955 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18956 s|^/[^/]|//&|
18957 p
18958 q
18959 }'
18960
18961 gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18962 sed -n "$gl_absolute_header_sed"`
18963
18964 gl_header=$gl_cv_absolute_ctype_h
18965 gl_cv_next_ctype_h='"'$gl_header'"'
18966
18967
18968 fi
18969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
18970 $as_echo "$gl_cv_next_ctype_h" >&6; }
18971 fi
18972 NEXT_CTYPE_H=$gl_cv_next_ctype_h
18973
18974 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18975 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18976 gl_next_as_first_directive='<'ctype.h'>'
18977 else
18978 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18979 gl_next_as_first_directive=$gl_cv_next_ctype_h
18980 fi
18981 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
18992 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
18993 if ${gl_cv_struct_dirent_d_ino+:} false; then :
18994 $as_echo_n "(cached) " >&6
18995 else
18996 if test "$cross_compiling" = yes; then :
18997 case "$host_os" in
18998 # Guess yes on glibc systems with Linux kernel.
18999 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
19000 # Guess yes on musl systems with Linux kernel.
19001 linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
19002 # Guess no on native Windows.
19003 mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
19004 # If we don't know, obey --enable-cross-guesses.
19005 *) gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
19006 esac
19007
19008 else
19009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19010 /* end confdefs.h. */
19011 #include <sys/types.h>
19012 #include <sys/stat.h>
19013 #include <dirent.h>
19014
19015 int
19016 main ()
19017 {
19018 DIR *dp = opendir (".");
19019 struct dirent *e;
19020 struct stat st;
19021 if (! dp)
19022 return 1;
19023 e = readdir (dp);
19024 if (! e)
19025 { closedir (dp); return 2; }
19026 if (lstat (e->d_name, &st) != 0)
19027 { closedir (dp); return 3; }
19028 if (e->d_ino != st.st_ino)
19029 { closedir (dp); return 4; }
19030 closedir (dp);
19031 return 0;
19032
19033 ;
19034 return 0;
19035 }
19036 _ACEOF
19037 if ac_fn_c_try_run "$LINENO"; then :
19038 gl_cv_struct_dirent_d_ino=yes
19039 else
19040 gl_cv_struct_dirent_d_ino=no
19041 fi
19042 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19043 conftest.$ac_objext conftest.beam conftest.$ac_ext
19044 fi
19045
19046 fi
19047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
19048 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
19049 case "$gl_cv_struct_dirent_d_ino" in
19050 *yes)
19051
19052 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
19053
19054 ;;
19055 esac
19056
19057
19058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
19059 $as_echo_n "checking for d_type member in directory struct... " >&6; }
19060 if ${gl_cv_struct_dirent_d_type+:} false; then :
19061 $as_echo_n "(cached) " >&6
19062 else
19063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19064 /* end confdefs.h. */
19065
19066 #include <sys/types.h>
19067 #include <dirent.h>
19068
19069 int
19070 main ()
19071 {
19072 struct dirent dp; dp.d_type = 0;
19073 ;
19074 return 0;
19075 }
19076 _ACEOF
19077 if ac_fn_c_try_link "$LINENO"; then :
19078 gl_cv_struct_dirent_d_type=yes
19079 else
19080 gl_cv_struct_dirent_d_type=no
19081 fi
19082 rm -f core conftest.err conftest.$ac_objext \
19083 conftest$ac_exeext conftest.$ac_ext
19084
19085
19086 fi
19087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
19088 $as_echo "$gl_cv_struct_dirent_d_type" >&6; }
19089 if test $gl_cv_struct_dirent_d_type = yes; then
19090
19091 $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
19092
19093 fi
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108 if test $gl_cv_have_include_next = yes; then
19109 gl_cv_next_dirent_h='<'dirent.h'>'
19110 else
19111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
19112 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
19113 if ${gl_cv_next_dirent_h+:} false; then :
19114 $as_echo_n "(cached) " >&6
19115 else
19116
19117 if test $ac_cv_header_dirent_h = yes; then
19118
19119
19120
19121
19122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19123 /* end confdefs.h. */
19124 #include <dirent.h>
19125 _ACEOF
19126 case "$host_os" in
19127 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19128 *) gl_absname_cpp="$ac_cpp" ;;
19129 esac
19130
19131 case "$host_os" in
19132 mingw*)
19133 gl_dirsep_regex='[/\\]'
19134 ;;
19135 *)
19136 gl_dirsep_regex='\/'
19137 ;;
19138 esac
19139 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19140 gl_header_literal_regex=`echo 'dirent.h' \
19141 | sed -e "$gl_make_literal_regex_sed"`
19142 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19143 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19144 s|^/[^/]|//&|
19145 p
19146 q
19147 }'
19148
19149 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19150 sed -n "$gl_absolute_header_sed"`
19151
19152 gl_header=$gl_cv_absolute_dirent_h
19153 gl_cv_next_dirent_h='"'$gl_header'"'
19154 else
19155 gl_cv_next_dirent_h='<'dirent.h'>'
19156 fi
19157
19158
19159 fi
19160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
19161 $as_echo "$gl_cv_next_dirent_h" >&6; }
19162 fi
19163 NEXT_DIRENT_H=$gl_cv_next_dirent_h
19164
19165 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19166 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19167 gl_next_as_first_directive='<'dirent.h'>'
19168 else
19169 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19170 gl_next_as_first_directive=$gl_cv_next_dirent_h
19171 fi
19172 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
19173
19174
19175
19176
19177 if test $ac_cv_header_dirent_h = yes; then
19178 HAVE_DIRENT_H=1
19179 else
19180 HAVE_DIRENT_H=0
19181 fi
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193 for ac_func in dirfd
19194 do :
19195 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
19196 if test "x$ac_cv_func_dirfd" = xyes; then :
19197 cat >>confdefs.h <<_ACEOF
19198 #define HAVE_DIRFD 1
19199 _ACEOF
19200
19201 fi
19202 done
19203
19204 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
19205 #include <dirent.h>
19206 "
19207 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
19208 ac_have_decl=1
19209 else
19210 ac_have_decl=0
19211 fi
19212
19213 cat >>confdefs.h <<_ACEOF
19214 #define HAVE_DECL_DIRFD $ac_have_decl
19215 _ACEOF
19216
19217 if test $ac_cv_have_decl_dirfd = no; then
19218 HAVE_DECL_DIRFD=0
19219 fi
19220
19221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
19222 $as_echo_n "checking whether dirfd is a macro... " >&6; }
19223 if ${gl_cv_func_dirfd_macro+:} false; then :
19224 $as_echo_n "(cached) " >&6
19225 else
19226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19227 /* end confdefs.h. */
19228
19229 #include <sys/types.h>
19230 #include <dirent.h>
19231 #ifdef dirfd
19232 dirent_header_defines_dirfd
19233 #endif
19234 _ACEOF
19235 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19236 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
19237 gl_cv_func_dirfd_macro=yes
19238 else
19239 gl_cv_func_dirfd_macro=no
19240 fi
19241 rm -f conftest*
19242
19243 fi
19244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
19245 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
19246
19247 # Use the replacement if we have no function or macro with that name,
19248 # or if OS/2 kLIBC whose dirfd() does not work.
19249 # Replace only if the system declares dirfd already.
19250 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
19251 no,no,*,yes | *,*,os2*,yes)
19252 REPLACE_DIRFD=1
19253
19254 $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
19255 ;;
19256 esac
19257
19258 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
19259 || test $REPLACE_DIRFD = 1; then
19260
19261
19262
19263
19264
19265
19266
19267
19268 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
19269
19270
19271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
19272 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
19273 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
19274 $as_echo_n "(cached) " >&6
19275 else
19276
19277 dirfd_save_CFLAGS=$CFLAGS
19278 for ac_expr in d_fd dd_fd; do
19279
19280 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
19281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19282 /* end confdefs.h. */
19283
19284 #include <sys/types.h>
19285 #include <dirent.h>
19286 int
19287 main ()
19288 {
19289 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
19290 ;
19291 return 0;
19292 }
19293 _ACEOF
19294 if ac_fn_c_try_compile "$LINENO"; then :
19295 dir_fd_found=yes
19296
19297 fi
19298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19299 CFLAGS=$dirfd_save_CFLAGS
19300 test "$dir_fd_found" = yes && break
19301 done
19302 test "$dir_fd_found" = yes || ac_expr=no_such_member
19303
19304 gl_cv_sys_dir_fd_member_name=$ac_expr
19305
19306
19307 fi
19308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
19309 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
19310 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
19311
19312 cat >>confdefs.h <<_ACEOF
19313 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
19314 _ACEOF
19315
19316 fi
19317
19318
19319 fi
19320
19321
19322
19323
19324
19325 GNULIB_DIRFD=1
19326
19327
19328
19329
19330
19331 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
19332
19333
19334
19335
19336
19337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
19338 $as_echo_n "checking whether // is distinct from /... " >&6; }
19339 if ${gl_cv_double_slash_root+:} false; then :
19340 $as_echo_n "(cached) " >&6
19341 else
19342 if test x"$cross_compiling" = xyes ; then
19343 # When cross-compiling, there is no way to tell whether // is special
19344 # short of a list of hosts. However, the only known hosts to date
19345 # that have a distinct // are Apollo DomainOS (too old to port to),
19346 # Cygwin, and z/OS. If anyone knows of another system for which // has
19347 # special semantics and is distinct from /, please report it to
19348 # <bug-gnulib@gnu.org>.
19349 case $host in
19350 *-cygwin | i370-ibm-openedition)
19351 gl_cv_double_slash_root=yes ;;
19352 *)
19353 # Be optimistic and assume that / and // are the same when we
19354 # don't know.
19355 gl_cv_double_slash_root='unknown, assuming no' ;;
19356 esac
19357 else
19358 set x `ls -di / // 2>/dev/null`
19359 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
19360 gl_cv_double_slash_root=no
19361 else
19362 gl_cv_double_slash_root=yes
19363 fi
19364 fi
19365 fi
19366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
19367 $as_echo "$gl_cv_double_slash_root" >&6; }
19368 if test "$gl_cv_double_slash_root" = yes; then
19369
19370 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
19371
19372 fi
19373
19374
19375
19376
19377
19378 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19379 REPLACE_DUP=1
19380 fi
19381
19382
19383
19384
19385
19386 if test $ac_cv_func_fchdir = no; then
19387 HAVE_FCHDIR=0
19388 fi
19389
19390 if test $HAVE_FCHDIR = 0; then
19391 REPLACE_DUP=1
19392 fi
19393
19394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
19395 $as_echo_n "checking whether dup works... " >&6; }
19396 if ${gl_cv_func_dup_works+:} false; then :
19397 $as_echo_n "(cached) " >&6
19398 else
19399 if test "$cross_compiling" = yes; then :
19400 case "$host_os" in
19401 # Guess no on native Windows.
19402 mingw*) gl_cv_func_dup_works="guessing no" ;;
19403 *) gl_cv_func_dup_works="guessing yes" ;;
19404 esac
19405
19406 else
19407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19408 /* end confdefs.h. */
19409 #include <unistd.h>
19410 #include <fcntl.h>
19411 #include <errno.h>
19412
19413
19414 $gl_mda_defines
19415
19416 int
19417 main ()
19418 {
19419 /* On OS/2 kLIBC, dup does not work on a directory fd. */
19420 int fd = open (".", O_RDONLY);
19421 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
19422
19423 ;
19424 return 0;
19425 }
19426
19427 _ACEOF
19428 if ac_fn_c_try_run "$LINENO"; then :
19429 gl_cv_func_dup_works=yes
19430 else
19431 gl_cv_func_dup_works=no
19432 fi
19433 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19434 conftest.$ac_objext conftest.beam conftest.$ac_ext
19435 fi
19436
19437
19438 fi
19439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
19440 $as_echo "$gl_cv_func_dup_works" >&6; }
19441 case "$gl_cv_func_dup_works" in
19442 *yes) ;;
19443 *)
19444 REPLACE_DUP=1
19445 ;;
19446 esac
19447
19448 if test $REPLACE_DUP = 1; then
19449
19450
19451
19452
19453
19454
19455
19456
19457 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
19458
19459 :
19460 fi
19461
19462
19463
19464
19465
19466 GNULIB_DUP=1
19467
19468
19469
19470
19471
19472 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
19473
19474
19475
19476
19477
19478
19479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
19480 $as_echo_n "checking whether dup2 works... " >&6; }
19481 if ${gl_cv_func_dup2_works+:} false; then :
19482 $as_echo_n "(cached) " >&6
19483 else
19484 if test "$cross_compiling" = yes; then :
19485 case "$host_os" in
19486 mingw*) # on this platform, dup2 always returns 0 for success
19487 gl_cv_func_dup2_works="guessing no" ;;
19488 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
19489 gl_cv_func_dup2_works="guessing no" ;;
19490 aix* | freebsd*)
19491 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
19492 # not EBADF.
19493 gl_cv_func_dup2_works="guessing no" ;;
19494 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
19495 gl_cv_func_dup2_works="guessing no" ;;
19496 *-android*) # implemented using dup3(), which fails if oldfd == newfd
19497 gl_cv_func_dup2_works="guessing no" ;;
19498 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
19499 gl_cv_func_dup2_works="guessing no" ;;
19500 *) gl_cv_func_dup2_works="guessing yes" ;;
19501 esac
19502 else
19503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19504 /* end confdefs.h. */
19505
19506 #include <errno.h>
19507 #include <fcntl.h>
19508 #include <limits.h>
19509 #include <sys/resource.h>
19510 #include <unistd.h>
19511
19512
19513 $gl_mda_defines
19514
19515 #ifndef RLIM_SAVED_CUR
19516 # define RLIM_SAVED_CUR RLIM_INFINITY
19517 #endif
19518 #ifndef RLIM_SAVED_MAX
19519 # define RLIM_SAVED_MAX RLIM_INFINITY
19520 #endif
19521
19522 int
19523 main ()
19524 {
19525 int result = 0;
19526 int bad_fd = INT_MAX;
19527 struct rlimit rlim;
19528 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19529 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19530 && rlim.rlim_cur != RLIM_INFINITY
19531 && rlim.rlim_cur != RLIM_SAVED_MAX
19532 && rlim.rlim_cur != RLIM_SAVED_CUR)
19533 bad_fd = rlim.rlim_cur;
19534 #ifdef FD_CLOEXEC
19535 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
19536 result |= 1;
19537 #endif
19538 if (dup2 (1, 1) != 1)
19539 result |= 2;
19540 #ifdef FD_CLOEXEC
19541 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
19542 result |= 4;
19543 #endif
19544 close (0);
19545 if (dup2 (0, 0) != -1)
19546 result |= 8;
19547 /* Many gnulib modules require POSIX conformance of EBADF. */
19548 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
19549 result |= 16;
19550 /* Flush out some cygwin core dumps. */
19551 if (dup2 (2, -1) != -1 || errno != EBADF)
19552 result |= 32;
19553 dup2 (2, 255);
19554 dup2 (2, 256);
19555 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
19556 {
19557 int fd = open (".", O_RDONLY);
19558 if (fd == -1)
19559 result |= 64;
19560 else if (dup2 (fd, fd + 1) == -1)
19561 result |= 128;
19562 close (fd);
19563 }
19564 return result;
19565 ;
19566 return 0;
19567 }
19568
19569 _ACEOF
19570 if ac_fn_c_try_run "$LINENO"; then :
19571 gl_cv_func_dup2_works=yes
19572 else
19573 gl_cv_func_dup2_works=no
19574 fi
19575 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19576 conftest.$ac_objext conftest.beam conftest.$ac_ext
19577 fi
19578
19579
19580 fi
19581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
19582 $as_echo "$gl_cv_func_dup2_works" >&6; }
19583 case "$gl_cv_func_dup2_works" in
19584 *yes) ;;
19585 *)
19586 REPLACE_DUP2=1
19587 for ac_func in setdtablesize
19588 do :
19589 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
19590 if test "x$ac_cv_func_setdtablesize" = xyes; then :
19591 cat >>confdefs.h <<_ACEOF
19592 #define HAVE_SETDTABLESIZE 1
19593 _ACEOF
19594
19595 fi
19596 done
19597
19598 ;;
19599 esac
19600
19601
19602
19603
19604 if test $ac_cv_func_fchdir = no; then
19605 HAVE_FCHDIR=0
19606 fi
19607
19608 if test $HAVE_FCHDIR = 0; then
19609 REPLACE_DUP2=1
19610 fi
19611
19612
19613 if test $REPLACE_DUP2 = 1; then
19614
19615
19616
19617
19618
19619
19620
19621
19622 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
19623
19624
19625 fi
19626
19627
19628
19629
19630
19631 GNULIB_DUP2=1
19632
19633
19634
19635
19636
19637 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647 GNULIB_ENVIRON=1
19648
19649
19650
19651
19652
19653 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
19654
19655
19656
19657
19658
19659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
19660 $as_echo_n "checking for error_at_line... " >&6; }
19661 if ${ac_cv_lib_error_at_line+:} false; then :
19662 $as_echo_n "(cached) " >&6
19663 else
19664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19665 /* end confdefs.h. */
19666 #include <error.h>
19667 int
19668 main ()
19669 {
19670 error_at_line (0, 0, "", 0, "an error occurred");
19671 ;
19672 return 0;
19673 }
19674 _ACEOF
19675 if ac_fn_c_try_link "$LINENO"; then :
19676 ac_cv_lib_error_at_line=yes
19677 else
19678 ac_cv_lib_error_at_line=no
19679 fi
19680 rm -f core conftest.err conftest.$ac_objext \
19681 conftest$ac_exeext conftest.$ac_ext
19682 fi
19683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
19684 $as_echo "$ac_cv_lib_error_at_line" >&6; }
19685
19686 if test $ac_cv_lib_error_at_line = no; then
19687
19688
19689
19690
19691
19692
19693
19694
19695 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
19696
19697
19698
19699 :
19700
19701 fi
19702
19703
19704
19705
19706
19707
19708
19709 if test $ac_cv_have_decl_fchdir = no; then
19710 HAVE_DECL_FCHDIR=0
19711 fi
19712
19713
19714 if test $HAVE_FCHDIR = 0; then
19715
19716
19717
19718
19719
19720
19721
19722
19723 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
19724
19725 :
19726
19727 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
19728
19729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
19730 $as_echo_n "checking whether open can visit directories... " >&6; }
19731 if ${gl_cv_func_open_directory_works+:} false; then :
19732 $as_echo_n "(cached) " >&6
19733 else
19734 if test "$cross_compiling" = yes; then :
19735 case "$host_os" in
19736 # Guess yes on Linux systems.
19737 linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
19738 # Guess yes on glibc systems.
19739 *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
19740 # Guess no on native Windows.
19741 mingw*) gl_cv_func_open_directory_works="guessing no" ;;
19742 # If we don't know, obey --enable-cross-guesses.
19743 *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
19744 esac
19745
19746 else
19747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19748 /* end confdefs.h. */
19749 #include <fcntl.h>
19750
19751
19752 $gl_mda_defines
19753
19754 int
19755 main ()
19756 {
19757 return open(".", O_RDONLY) < 0;
19758 ;
19759 return 0;
19760 }
19761 _ACEOF
19762 if ac_fn_c_try_run "$LINENO"; then :
19763 gl_cv_func_open_directory_works=yes
19764 else
19765 gl_cv_func_open_directory_works=no
19766 fi
19767 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19768 conftest.$ac_objext conftest.beam conftest.$ac_ext
19769 fi
19770
19771 fi
19772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
19773 $as_echo "$gl_cv_func_open_directory_works" >&6; }
19774 case "$gl_cv_func_open_directory_works" in
19775 *yes) ;;
19776 *)
19777
19778 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
19779
19780 ;;
19781 esac
19782 fi
19783
19784
19785
19786
19787
19788
19789 GNULIB_FCHDIR=1
19790
19791
19792
19793
19794
19795 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
19796
19797
19798
19799
19800
19801
19802
19803
19804 if test $ac_cv_func_fcntl = no; then
19805
19806
19807
19808 if test $ac_cv_func_fcntl = no; then
19809 HAVE_FCNTL=0
19810 else
19811 REPLACE_FCNTL=1
19812 fi
19813
19814 else
19815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
19816 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
19817 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
19818 $as_echo_n "(cached) " >&6
19819 else
19820 if test "$cross_compiling" = yes; then :
19821 case $host_os in
19822 aix* | cygwin* | haiku*)
19823 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
19824 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
19825 esac
19826 else
19827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19828 /* end confdefs.h. */
19829 #include <errno.h>
19830 #include <fcntl.h>
19831 #include <limits.h>
19832 #include <sys/resource.h>
19833 #include <unistd.h>
19834
19835
19836 $gl_mda_defines
19837
19838 #ifndef RLIM_SAVED_CUR
19839 # define RLIM_SAVED_CUR RLIM_INFINITY
19840 #endif
19841 #ifndef RLIM_SAVED_MAX
19842 # define RLIM_SAVED_MAX RLIM_INFINITY
19843 #endif
19844
19845 int
19846 main ()
19847 {
19848 int result = 0;
19849 int bad_fd = INT_MAX;
19850 struct rlimit rlim;
19851 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19852 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19853 && rlim.rlim_cur != RLIM_INFINITY
19854 && rlim.rlim_cur != RLIM_SAVED_MAX
19855 && rlim.rlim_cur != RLIM_SAVED_CUR)
19856 bad_fd = rlim.rlim_cur;
19857 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
19858 if (errno != EINVAL) result |= 2;
19859 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
19860 if (errno != EINVAL) result |= 8;
19861 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
19862 {
19863 int fd;
19864 fd = open (".", O_RDONLY);
19865 if (fd == -1)
19866 result |= 16;
19867 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
19868 result |= 32;
19869
19870 close (fd);
19871 }
19872 return result;
19873 ;
19874 return 0;
19875 }
19876 _ACEOF
19877 if ac_fn_c_try_run "$LINENO"; then :
19878 gl_cv_func_fcntl_f_dupfd_works=yes
19879 else
19880 gl_cv_func_fcntl_f_dupfd_works=no
19881 fi
19882 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19883 conftest.$ac_objext conftest.beam conftest.$ac_ext
19884 fi
19885
19886 fi
19887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
19888 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
19889 case $gl_cv_func_fcntl_f_dupfd_works in
19890 *yes) ;;
19891 *)
19892
19893
19894 if test $ac_cv_func_fcntl = no; then
19895 HAVE_FCNTL=0
19896 else
19897 REPLACE_FCNTL=1
19898 fi
19899
19900
19901 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
19902 ;;
19903 esac
19904
19905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
19906 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
19907 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
19908 $as_echo_n "(cached) " >&6
19909 else
19910 if test "$cross_compiling" = yes; then :
19911 case "$host_os" in
19912 # Guess no on NetBSD.
19913 netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
19914 *) gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
19915 esac
19916
19917 else
19918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19919 /* end confdefs.h. */
19920 #include <fcntl.h>
19921 #include <unistd.h>
19922 int main (int argc, char *argv[])
19923 {
19924 if (argc == 1)
19925 /* parent process */
19926 {
19927 if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
19928 return 1;
19929 return execl ("./conftest", "./conftest", "child", NULL);
19930 }
19931 else
19932 /* child process */
19933 return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
19934 }
19935
19936
19937 _ACEOF
19938 if ac_fn_c_try_run "$LINENO"; then :
19939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19940 /* end confdefs.h. */
19941
19942 #ifdef __linux__
19943 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
19944 it to support the semantics on older kernels that failed with EINVAL. */
19945 choke me
19946 #endif
19947
19948 int
19949 main ()
19950 {
19951
19952 ;
19953 return 0;
19954 }
19955 _ACEOF
19956 if ac_fn_c_try_compile "$LINENO"; then :
19957 gl_cv_func_fcntl_f_dupfd_cloexec=yes
19958 else
19959 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
19960 fi
19961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19962
19963 else
19964 gl_cv_func_fcntl_f_dupfd_cloexec=no
19965 fi
19966 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19967 conftest.$ac_objext conftest.beam conftest.$ac_ext
19968 fi
19969
19970
19971 fi
19972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
19973 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
19974 case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
19975 *yes) ;;
19976 *)
19977
19978
19979 if test $ac_cv_func_fcntl = no; then
19980 HAVE_FCNTL=0
19981 else
19982 REPLACE_FCNTL=1
19983 fi
19984
19985 ;;
19986 esac
19987 fi
19988
19989
19990
19991
19992 if test $ac_cv_func_fchdir = no; then
19993 HAVE_FCHDIR=0
19994 fi
19995
19996 if test $HAVE_FCHDIR = 0; then
19997
19998
19999
20000 if test $ac_cv_func_fcntl = no; then
20001 HAVE_FCNTL=0
20002 else
20003 REPLACE_FCNTL=1
20004 fi
20005
20006 fi
20007
20008
20009 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
20010
20011
20012
20013
20014
20015
20016
20017
20018 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
20019
20020 fi
20021
20022
20023
20024
20025
20026 GNULIB_FCNTL=1
20027
20028
20029
20030
20031
20032 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047 if test $gl_cv_have_include_next = yes; then
20048 gl_cv_next_fcntl_h='<'fcntl.h'>'
20049 else
20050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
20051 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
20052 if ${gl_cv_next_fcntl_h+:} false; then :
20053 $as_echo_n "(cached) " >&6
20054 else
20055
20056
20057
20058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20059 /* end confdefs.h. */
20060 #include <fcntl.h>
20061 _ACEOF
20062 case "$host_os" in
20063 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20064 *) gl_absname_cpp="$ac_cpp" ;;
20065 esac
20066
20067 case "$host_os" in
20068 mingw*)
20069 gl_dirsep_regex='[/\\]'
20070 ;;
20071 *)
20072 gl_dirsep_regex='\/'
20073 ;;
20074 esac
20075 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20076 gl_header_literal_regex=`echo 'fcntl.h' \
20077 | sed -e "$gl_make_literal_regex_sed"`
20078 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20079 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20080 s|^/[^/]|//&|
20081 p
20082 q
20083 }'
20084
20085 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20086 sed -n "$gl_absolute_header_sed"`
20087
20088 gl_header=$gl_cv_absolute_fcntl_h
20089 gl_cv_next_fcntl_h='"'$gl_header'"'
20090
20091
20092 fi
20093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
20094 $as_echo "$gl_cv_next_fcntl_h" >&6; }
20095 fi
20096 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
20097
20098 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20099 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20100 gl_next_as_first_directive='<'fcntl.h'>'
20101 else
20102 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20103 gl_next_as_first_directive=$gl_cv_next_fcntl_h
20104 fi
20105 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121 cat >>confdefs.h <<_ACEOF
20122 #define GNULIB_FD_SAFER_FLAG 1
20123 _ACEOF
20124
20125
20126
20127
20128
20129
20130
20131 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
20132 #include <dirent.h>
20133
20134 "
20135 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
20136 ac_have_decl=1
20137 else
20138 ac_have_decl=0
20139 fi
20140
20141 cat >>confdefs.h <<_ACEOF
20142 #define HAVE_DECL_FDOPENDIR $ac_have_decl
20143 _ACEOF
20144 if test $ac_have_decl = 1; then :
20145
20146 else
20147 HAVE_DECL_FDOPENDIR=0
20148 fi
20149
20150
20151 if test $ac_cv_func_fdopendir = no; then
20152 HAVE_FDOPENDIR=0
20153 else
20154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
20155 $as_echo_n "checking whether fdopendir works... " >&6; }
20156 if ${gl_cv_func_fdopendir_works+:} false; then :
20157 $as_echo_n "(cached) " >&6
20158 else
20159 if test "$cross_compiling" = yes; then :
20160 case "$host_os" in
20161 # Guess yes on glibc systems.
20162 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
20163 # Guess yes on musl systems.
20164 *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
20165 # If we don't know, obey --enable-cross-guesses.
20166 *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
20167 esac
20168
20169 else
20170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20171 /* end confdefs.h. */
20172
20173 #include <dirent.h>
20174 #include <fcntl.h>
20175 #include <unistd.h>
20176
20177
20178 $gl_mda_defines
20179
20180 #if !HAVE_DECL_FDOPENDIR
20181 extern
20182 # ifdef __cplusplus
20183 "C"
20184 # endif
20185 DIR *fdopendir (int);
20186 #endif
20187
20188 int
20189 main ()
20190 {
20191 int result = 0;
20192 int fd = open ("conftest.c", O_RDONLY);
20193 if (fd < 0) result |= 1;
20194 if (fdopendir (fd)) result |= 2;
20195 if (close (fd)) result |= 4;
20196 return result;
20197
20198 ;
20199 return 0;
20200 }
20201 _ACEOF
20202 if ac_fn_c_try_run "$LINENO"; then :
20203 gl_cv_func_fdopendir_works=yes
20204 else
20205 gl_cv_func_fdopendir_works=no
20206 fi
20207 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20208 conftest.$ac_objext conftest.beam conftest.$ac_ext
20209 fi
20210
20211 fi
20212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
20213 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
20214 case "$gl_cv_func_fdopendir_works" in
20215 *yes) ;;
20216 *)
20217 REPLACE_FDOPENDIR=1
20218 ;;
20219 esac
20220 fi
20221
20222 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
20223
20224
20225
20226
20227
20228
20229
20230
20231 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
20232
20233 fi
20234
20235
20236
20237
20238
20239 GNULIB_FDOPENDIR=1
20240
20241
20242
20243
20244
20245 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
20246
20247
20248
20249
20250
20251 cat >>confdefs.h <<_ACEOF
20252 #define GNULIB_FDOPENDIR 1
20253 _ACEOF
20254
20255
20256
20257
20258
20259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffs" >&5
20260 $as_echo_n "checking for ffs... " >&6; }
20261 if ${gl_cv_func_ffs+:} false; then :
20262 $as_echo_n "(cached) " >&6
20263 else
20264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20265 /* end confdefs.h. */
20266 #include <strings.h>
20267 int x;
20268
20269 int
20270 main ()
20271 {
20272 int (*func) (int) = ffs;
20273 return func (x);
20274
20275 ;
20276 return 0;
20277 }
20278
20279 _ACEOF
20280 if ac_fn_c_try_link "$LINENO"; then :
20281 gl_cv_func_ffs=yes
20282 else
20283 gl_cv_func_ffs=no
20284 fi
20285 rm -f core conftest.err conftest.$ac_objext \
20286 conftest$ac_exeext conftest.$ac_ext
20287
20288 fi
20289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ffs" >&5
20290 $as_echo "$gl_cv_func_ffs" >&6; }
20291 if test $gl_cv_func_ffs = no; then
20292 HAVE_FFS=0
20293 fi
20294
20295 if test $HAVE_FFS = 0; then
20296
20297
20298
20299
20300
20301
20302
20303
20304 gl_LIBOBJS="$gl_LIBOBJS ffs.$ac_objext"
20305
20306 fi
20307
20308
20309
20310
20311
20312 GNULIB_FFS=1
20313
20314
20315
20316
20317
20318
20319
20320
20321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
20322 $as_echo_n "checking for flexible array member... " >&6; }
20323 if ${ac_cv_c_flexmember+:} false; then :
20324 $as_echo_n "(cached) " >&6
20325 else
20326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20327 /* end confdefs.h. */
20328 #include <stdlib.h>
20329 #include <stdio.h>
20330 #include <stddef.h>
20331 struct m { struct m *next, **list; char name[]; };
20332 struct s { struct s *p; struct m *m; int n; double d[]; };
20333 int
20334 main ()
20335 {
20336 int m = getchar ();
20337 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
20338 nbytes += sizeof (struct s) - 1;
20339 nbytes -= nbytes % sizeof (struct s);
20340 struct s *p = malloc (nbytes);
20341 p->p = p;
20342 p->m = NULL;
20343 p->d[0] = 0.0;
20344 return p->d != (double *) NULL;
20345 ;
20346 return 0;
20347 }
20348 _ACEOF
20349 if ac_fn_c_try_compile "$LINENO"; then :
20350 ac_cv_c_flexmember=yes
20351 else
20352 ac_cv_c_flexmember=no
20353 fi
20354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20355 fi
20356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
20357 $as_echo "$ac_cv_c_flexmember" >&6; }
20358 if test $ac_cv_c_flexmember = yes; then
20359
20360 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
20361
20362 else
20363 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
20364
20365 fi
20366
20367
20368
20369
20370 FLOAT_H=
20371 REPLACE_FLOAT_LDBL=0
20372 case "$host_os" in
20373 aix* | beos* | openbsd* | mirbsd* | irix*)
20374 FLOAT_H=float.h
20375 ;;
20376 freebsd* | dragonfly*)
20377 case "$host_cpu" in
20378 i[34567]86 )
20379 FLOAT_H=float.h
20380 ;;
20381 x86_64 )
20382 # On x86_64 systems, the C compiler may still be generating
20383 # 32-bit code.
20384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20385 /* end confdefs.h. */
20386 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
20387 int ok;
20388 #else
20389 error fail
20390 #endif
20391
20392 _ACEOF
20393 if ac_fn_c_try_compile "$LINENO"; then :
20394
20395 else
20396 FLOAT_H=float.h
20397 fi
20398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20399 ;;
20400 esac
20401 ;;
20402 linux*)
20403 case "$host_cpu" in
20404 powerpc*)
20405 FLOAT_H=float.h
20406 ;;
20407 esac
20408 ;;
20409 esac
20410 case "$host_os" in
20411 aix* | freebsd* | dragonfly* | linux*)
20412 if test -n "$FLOAT_H"; then
20413 REPLACE_FLOAT_LDBL=1
20414 fi
20415 ;;
20416 esac
20417
20418 REPLACE_ITOLD=0
20419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
20420 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
20421 if ${gl_cv_func_itold_works+:} false; then :
20422 $as_echo_n "(cached) " >&6
20423 else
20424
20425 if test "$cross_compiling" = yes; then :
20426 case "$host" in
20427 sparc*-*-linux*)
20428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20429 /* end confdefs.h. */
20430 #if defined __LP64__ || defined __arch64__
20431 int ok;
20432 #else
20433 error fail
20434 #endif
20435
20436 _ACEOF
20437 if ac_fn_c_try_compile "$LINENO"; then :
20438 gl_cv_func_itold_works="guessing no"
20439 else
20440 gl_cv_func_itold_works="guessing yes"
20441 fi
20442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20443 ;;
20444 # Guess yes on native Windows.
20445 mingw*) gl_cv_func_itold_works="guessing yes" ;;
20446 *) gl_cv_func_itold_works="guessing yes" ;;
20447 esac
20448
20449 else
20450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20451 /* end confdefs.h. */
20452
20453 int i = -1;
20454 volatile long double ld;
20455 int main ()
20456 {
20457 ld += i * 1.0L;
20458 if (ld > 0)
20459 return 1;
20460 return 0;
20461 }
20462 _ACEOF
20463 if ac_fn_c_try_run "$LINENO"; then :
20464 gl_cv_func_itold_works=yes
20465 else
20466 gl_cv_func_itold_works=no
20467 fi
20468 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20469 conftest.$ac_objext conftest.beam conftest.$ac_ext
20470 fi
20471
20472
20473 fi
20474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
20475 $as_echo "$gl_cv_func_itold_works" >&6; }
20476 case "$gl_cv_func_itold_works" in
20477 *no)
20478 REPLACE_ITOLD=1
20479 FLOAT_H=float.h
20480 ;;
20481 esac
20482
20483 if test -n "$FLOAT_H"; then
20484
20485
20486
20487
20488
20489
20490
20491
20492 if test $gl_cv_have_include_next = yes; then
20493 gl_cv_next_float_h='<'float.h'>'
20494 else
20495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
20496 $as_echo_n "checking absolute name of <float.h>... " >&6; }
20497 if ${gl_cv_next_float_h+:} false; then :
20498 $as_echo_n "(cached) " >&6
20499 else
20500
20501
20502
20503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20504 /* end confdefs.h. */
20505 #include <float.h>
20506 _ACEOF
20507 case "$host_os" in
20508 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20509 *) gl_absname_cpp="$ac_cpp" ;;
20510 esac
20511
20512 case "$host_os" in
20513 mingw*)
20514 gl_dirsep_regex='[/\\]'
20515 ;;
20516 *)
20517 gl_dirsep_regex='\/'
20518 ;;
20519 esac
20520 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20521 gl_header_literal_regex=`echo 'float.h' \
20522 | sed -e "$gl_make_literal_regex_sed"`
20523 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20524 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20525 s|^/[^/]|//&|
20526 p
20527 q
20528 }'
20529
20530 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20531 sed -n "$gl_absolute_header_sed"`
20532
20533 gl_header=$gl_cv_absolute_float_h
20534 gl_cv_next_float_h='"'$gl_header'"'
20535
20536
20537 fi
20538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
20539 $as_echo "$gl_cv_next_float_h" >&6; }
20540 fi
20541 NEXT_FLOAT_H=$gl_cv_next_float_h
20542
20543 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20544 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20545 gl_next_as_first_directive='<'float.h'>'
20546 else
20547 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20548 gl_next_as_first_directive=$gl_cv_next_float_h
20549 fi
20550 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
20551
20552
20553
20554
20555 fi
20556
20557 if test -n "$FLOAT_H"; then
20558 GL_GENERATE_FLOAT_H_TRUE=
20559 GL_GENERATE_FLOAT_H_FALSE='#'
20560 else
20561 GL_GENERATE_FLOAT_H_TRUE='#'
20562 GL_GENERATE_FLOAT_H_FALSE=
20563 fi
20564
20565
20566
20567 if test $REPLACE_FLOAT_LDBL = 1; then
20568
20569
20570
20571
20572
20573
20574
20575
20576 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
20577
20578 fi
20579 if test $REPLACE_ITOLD = 1; then
20580
20581
20582
20583
20584
20585
20586
20587
20588 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
20589
20590 fi
20591
20592
20593
20594
20595 gl_fnmatch_required_lowercase=`
20596 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
20597 `
20598
20599 if test $ac_cv_func_fnmatch = no; then
20600 HAVE_FNMATCH=0
20601 else
20602 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
20603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
20604 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
20605 if eval \${$gl_fnmatch_cache_var+:} false; then :
20606 $as_echo_n "(cached) " >&6
20607 else
20608 if test $gl_fnmatch_required = GNU; then
20609 gl_fnmatch_gnu_start=
20610 gl_fnmatch_gnu_end=
20611 else
20612 gl_fnmatch_gnu_start='#if 0'
20613 gl_fnmatch_gnu_end='#endif'
20614 fi
20615 if test "$cross_compiling" = yes; then :
20616 case "$host_os" in
20617 # Guess yes on musl systems.
20618 *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
20619 # Guess no otherwise, even on glibc systems.
20620 *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
20621 esac
20622
20623 else
20624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20625 /* end confdefs.h. */
20626 #include <fnmatch.h>
20627 static int
20628 y (char const *pattern, char const *string, int flags)
20629 {
20630 return fnmatch (pattern, string, flags) == 0;
20631 }
20632 static int
20633 n (char const *pattern, char const *string, int flags)
20634 {
20635 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
20636 }
20637
20638 int
20639 main ()
20640 {
20641 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
20642 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
20643 static char const A_1[] = { 'A' - 1, 0 };
20644 static char const A01[] = { 'A' + 1, 0 };
20645 static char const a_1[] = { 'a' - 1, 0 };
20646 static char const a01[] = { 'a' + 1, 0 };
20647 static char const bs_1[] = { '\\\\' - 1, 0 };
20648 static char const bs01[] = { '\\\\' + 1, 0 };
20649 int result = 0;
20650 if (!n ("a*", "", 0))
20651 return 1;
20652 if (!y ("a*", "abc", 0))
20653 return 1;
20654 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
20655 return 1;
20656 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
20657 return 2;
20658 if (!y ("a\\\\bc", "abc", 0))
20659 return 3;
20660 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
20661 return 3;
20662 if (!y ("*x", ".x", 0))
20663 return 4;
20664 if (!n ("*x", ".x", FNM_PERIOD))
20665 return 4;
20666 if (!y (Apat, "\\\\", 0))
20667 return 5;
20668 if (!y (Apat, "A", 0))
20669 return 5;
20670 if (!y (apat, "\\\\", 0))
20671 return 5;
20672 if (!y (apat, "a", 0))
20673 return 5;
20674 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
20675 return 5;
20676 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
20677 return 5;
20678 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
20679 return 5;
20680 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
20681 return 5;
20682 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
20683 return 5;
20684 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
20685 return 5;
20686 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
20687 return 5;
20688 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
20689 return 5;
20690 $gl_fnmatch_gnu_start
20691 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
20692 result |= 8;
20693 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
20694 result |= 16;
20695 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
20696 result |= 32;
20697 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
20698 result |= 64;
20699 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
20700 result |= 64;
20701 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
20702 result |= 64;
20703 $gl_fnmatch_gnu_end
20704 return result;
20705
20706 ;
20707 return 0;
20708 }
20709 _ACEOF
20710 if ac_fn_c_try_run "$LINENO"; then :
20711 eval "$gl_fnmatch_cache_var=yes"
20712 else
20713 eval "$gl_fnmatch_cache_var=no"
20714 fi
20715 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20716 conftest.$ac_objext conftest.beam conftest.$ac_ext
20717 fi
20718
20719
20720 fi
20721 eval ac_res=\$$gl_fnmatch_cache_var
20722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20723 $as_echo "$ac_res" >&6; }
20724 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
20725 case "$gl_fnmatch_result" in
20726 *yes) ;;
20727 *) REPLACE_FNMATCH=1 ;;
20728 esac
20729 fi
20730 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
20731
20732
20733 FNMATCH_H='fnmatch.h'
20734 if test -n "$FNMATCH_H"; then
20735 GL_GENERATE_FNMATCH_H_TRUE=
20736 GL_GENERATE_FNMATCH_H_FALSE='#'
20737 else
20738 GL_GENERATE_FNMATCH_H_TRUE='#'
20739 GL_GENERATE_FNMATCH_H_FALSE=
20740 fi
20741
20742
20743 fi
20744
20745 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
20746
20747
20748
20749
20750
20751
20752
20753
20754 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
20755
20756
20757
20758
20759
20760 fi
20761
20762
20763
20764
20765
20766 GNULIB_FNMATCH=1
20767
20768
20769
20770
20771
20772 $as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
20773
20774
20775
20776
20777
20778
20779
20780
20781 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
20782
20783
20784
20785
20786
20787
20788
20789
20790 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
20791
20792
20793
20794
20795
20796 fi
20797
20798
20799 cat >>confdefs.h <<_ACEOF
20800 #define GNULIB_FNMATCH_GNU 1
20801 _ACEOF
20802
20803
20804
20805
20806
20807
20808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
20809 $as_echo_n "checking whether free is known to preserve errno... " >&6; }
20810 if ${gl_cv_func_free_preserves_errno+:} false; then :
20811 $as_echo_n "(cached) " >&6
20812 else
20813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20814 /* end confdefs.h. */
20815 #include <stdlib.h>
20816
20817 int
20818 main ()
20819 {
20820 #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
20821 #elif defined __OpenBSD__
20822 #elif defined __sun
20823 #else
20824 #error "'free' is not known to preserve errno"
20825 #endif
20826
20827 ;
20828 return 0;
20829 }
20830 _ACEOF
20831 if ac_fn_c_try_compile "$LINENO"; then :
20832 gl_cv_func_free_preserves_errno=yes
20833 else
20834 gl_cv_func_free_preserves_errno=no
20835 fi
20836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20837
20838 fi
20839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
20840 $as_echo "$gl_cv_func_free_preserves_errno" >&6; }
20841
20842 case $gl_cv_func_free_preserves_errno in
20843 *yes) ;;
20844 *) REPLACE_FREE=1 ;;
20845 esac
20846
20847 if test $REPLACE_FREE = 1; then
20848
20849
20850
20851
20852
20853
20854
20855
20856 gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
20857
20858 :
20859 fi
20860
20861
20862
20863
20864
20865 GNULIB_FREE_POSIX=1
20866
20867
20868
20869
20870
20871 $as_echo "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
20872
20873
20874
20875
20876 if test $gl_func_frexp != yes; then
20877
20878
20879
20880
20881
20882
20883
20884
20885 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext"
20886
20887 fi
20888
20889
20890
20891
20892
20893 GNULIB_FREXP=1
20894
20895
20896
20897
20898
20899 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
20900
20901
20902
20903
20904 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
20905
20906
20907
20908
20909
20910
20911
20912
20913 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext"
20914
20915 fi
20916
20917
20918
20919
20920
20921 GNULIB_FREXPL=1
20922
20923
20924
20925
20926
20927 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
20928
20929
20930
20931
20932
20933
20934
20935 case "$host_os" in
20936 mingw* | solaris*)
20937 REPLACE_FSTAT=1
20938 ;;
20939 esac
20940
20941
20942
20943
20944
20945 if test $ac_cv_func_fchdir = no; then
20946 HAVE_FCHDIR=0
20947 fi
20948
20949 if test $HAVE_FCHDIR = 0; then
20950 case "$gl_cv_func_open_directory_works" in
20951 *yes) ;;
20952 *)
20953 REPLACE_FSTAT=1
20954 ;;
20955 esac
20956 fi
20957
20958
20959 if test $REPLACE_FSTAT = 1; then
20960
20961
20962
20963
20964
20965
20966
20967
20968 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
20969
20970 case "$host_os" in
20971 mingw*)
20972
20973
20974
20975
20976
20977
20978
20979
20980 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
20981
20982 ;;
20983 esac
20984
20985
20986
20987 :
20988
20989 fi
20990
20991
20992
20993
20994
20995 GNULIB_FSTAT=1
20996
20997
20998
20999
21000
21001 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012 if test $ac_cv_func_fstatat = no; then
21013 HAVE_FSTATAT=0
21014 else
21015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
21016 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
21017 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
21018 $as_echo_n "(cached) " >&6
21019 else
21020 if test "$cross_compiling" = yes; then :
21021 case "$host_os" in
21022 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
21023 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
21024 esac
21025
21026 else
21027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21028 /* end confdefs.h. */
21029
21030 #include <fcntl.h>
21031 #include <sys/stat.h>
21032 int
21033 main (void)
21034 {
21035 struct stat a;
21036 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
21037 }
21038
21039 _ACEOF
21040 if ac_fn_c_try_run "$LINENO"; then :
21041 gl_cv_func_fstatat_zero_flag=yes
21042 else
21043 gl_cv_func_fstatat_zero_flag=no
21044 fi
21045 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21046 conftest.$ac_objext conftest.beam conftest.$ac_ext
21047 fi
21048
21049
21050 fi
21051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
21052 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
21053
21054 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
21055 *yes+*yes) ;;
21056 *) REPLACE_FSTATAT=1 ;;
21057 esac
21058
21059 case $host_os in
21060 solaris*)
21061 REPLACE_FSTATAT=1 ;;
21062 esac
21063
21064 case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
21065 1,*yes)
21066
21067 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
21068
21069 ;;
21070 esac
21071 fi
21072
21073 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
21074
21075
21076
21077
21078
21079
21080
21081
21082 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
21083
21084 fi
21085
21086
21087
21088
21089
21090 GNULIB_FSTATAT=1
21091
21092
21093
21094
21095
21096 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
21097
21098
21099
21100
21101
21102
21103
21104
21105 gl_abort_bug=no
21106 case "$host_os" in
21107 mingw*)
21108 gl_cv_func_getcwd_path_max=yes
21109 ;;
21110 *)
21111
21112
21113
21114
21115
21116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
21117 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
21118 if ${gl_cv_func_getcwd_path_max+:} false; then :
21119 $as_echo_n "(cached) " >&6
21120 else
21121 # Arrange for deletion of the temporary directory this test creates.
21122 ac_clean_files="$ac_clean_files confdir3"
21123 if test "$cross_compiling" = yes; then :
21124 # Cross-compilation guesses:
21125 case "$host_os" in
21126 aix*) # On AIX, it has the AIX bug.
21127 gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;;
21128 gnu*) # On Hurd, it is 'yes'.
21129 gl_cv_func_getcwd_path_max='guessing yes' ;;
21130 linux* | kfreebsd*)
21131 # On older Linux+glibc it's 'no, but it is partly working',
21132 # on newer Linux+glibc it's 'yes'.
21133 # On Linux+musl libc, it's 'no, but it is partly working'.
21134 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
21135 gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;;
21136 *) # If we don't know, obey --enable-cross-guesses.
21137 gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;;
21138 esac
21139
21140 else
21141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21142 /* end confdefs.h. */
21143
21144 #include <errno.h>
21145 #include <stdlib.h>
21146 #if HAVE_UNISTD_H
21147 # include <unistd.h>
21148 #else
21149 # include <direct.h>
21150 #endif
21151 #include <string.h>
21152 #include <limits.h>
21153 #include <sys/stat.h>
21154 #include <sys/types.h>
21155 #include <fcntl.h>
21156
21157
21158 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
21159 #if HAVE_UNISTD_H
21160 # include <unistd.h>
21161 #endif
21162 #include <limits.h>
21163 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
21164 # include <sys/param.h>
21165 #endif
21166 #if !defined PATH_MAX && defined MAXPATHLEN
21167 # define PATH_MAX MAXPATHLEN
21168 #endif
21169 #ifdef __hpux
21170 # undef PATH_MAX
21171 # define PATH_MAX 1024
21172 #endif
21173 #if defined _WIN32 && ! defined __CYGWIN__
21174 # undef PATH_MAX
21175 # define PATH_MAX 260
21176 #endif
21177
21178
21179 #ifndef AT_FDCWD
21180 # define AT_FDCWD 0
21181 #endif
21182 #ifdef ENAMETOOLONG
21183 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
21184 #else
21185 # define is_ENAMETOOLONG(x) 0
21186 #endif
21187
21188 /* Use the getcwd function, not any macro. */
21189 #undef getcwd
21190
21191
21192
21193 $gl_mda_defines
21194
21195
21196 #ifndef S_IRWXU
21197 # define S_IRWXU 0700
21198 #endif
21199
21200 /* The length of this name must be 8. */
21201 #define DIR_NAME "confdir3"
21202 #define DIR_NAME_LEN 8
21203 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
21204
21205 /* The length of "../". */
21206 #define DOTDOTSLASH_LEN 3
21207
21208 /* Leftover bytes in the buffer, to work around library or OS bugs. */
21209 #define BUF_SLOP 20
21210
21211 int
21212 main ()
21213 {
21214 #ifndef PATH_MAX
21215 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
21216 at least not on a local file system. And if we were to start worrying
21217 about remote file systems, we'd have to enable the wrapper function
21218 all of the time, just to be safe. That's not worth the cost. */
21219 exit (0);
21220 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
21221 - DIR_NAME_SIZE - BUF_SLOP) \
21222 <= PATH_MAX)
21223 /* FIXME: Assuming there's a system for which this is true,
21224 this should be done in a compile test. */
21225 exit (0);
21226 #else
21227 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
21228 + DIR_NAME_SIZE + BUF_SLOP];
21229 char *cwd = getcwd (buf, PATH_MAX);
21230 size_t initial_cwd_len;
21231 size_t cwd_len;
21232 int fail = 0;
21233 size_t n_chdirs = 0;
21234
21235 if (cwd == NULL)
21236 exit (10);
21237
21238 cwd_len = initial_cwd_len = strlen (cwd);
21239
21240 while (1)
21241 {
21242 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
21243 char *c = NULL;
21244
21245 cwd_len += DIR_NAME_SIZE;
21246 /* If mkdir or chdir fails, it could be that this system cannot create
21247 any file with an absolute name longer than PATH_MAX, such as cygwin.
21248 If so, leave fail as 0, because the current working directory can't
21249 be too long for getcwd if it can't even be created. On Linux with
21250 the 9p file system, mkdir fails with error EINVAL when cwd_len gets
21251 too long; ignore this failure because the getcwd() system call
21252 produces good results whereas the gnulib substitute calls getdents64
21253 which fails with error EPROTO.
21254 For other errors, be pessimistic and consider that as a failure,
21255 too. */
21256 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
21257 {
21258 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
21259 #ifdef __linux__
21260 if (! (errno == EINVAL))
21261 #endif
21262 fail = 20;
21263 break;
21264 }
21265
21266 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
21267 {
21268 struct stat sb;
21269
21270 c = getcwd (buf, PATH_MAX);
21271 if (!c && errno == ENOENT)
21272 {
21273 fail = 11;
21274 break;
21275 }
21276 if (c)
21277 {
21278 fail = 31;
21279 break;
21280 }
21281 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
21282 {
21283 fail = 21;
21284 break;
21285 }
21286
21287 /* Our replacement needs to be able to stat() long ../../paths,
21288 so generate a path larger than PATH_MAX to check,
21289 avoiding the replacement if we can't stat(). */
21290 c = getcwd (buf, cwd_len + 1);
21291 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
21292 {
21293 fail = 32;
21294 break;
21295 }
21296 }
21297
21298 if (dotdot_max <= cwd_len - initial_cwd_len)
21299 {
21300 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
21301 break;
21302 c = getcwd (buf, cwd_len + 1);
21303 if (!c)
21304 {
21305 if (! (errno == ERANGE || errno == ENOENT
21306 || is_ENAMETOOLONG (errno)))
21307 {
21308 fail = 22;
21309 break;
21310 }
21311 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
21312 {
21313 fail = 12;
21314 break;
21315 }
21316 }
21317 }
21318
21319 if (c && strlen (c) != cwd_len)
21320 {
21321 fail = 23;
21322 break;
21323 }
21324 ++n_chdirs;
21325 }
21326
21327 /* Leaving behind such a deep directory is not polite.
21328 So clean up here, right away, even though the driving
21329 shell script would also clean up. */
21330 {
21331 size_t i;
21332
21333 /* Try rmdir first, in case the chdir failed. */
21334 rmdir (DIR_NAME);
21335 for (i = 0; i <= n_chdirs; i++)
21336 {
21337 if (chdir ("..") < 0)
21338 break;
21339 if (rmdir (DIR_NAME) != 0)
21340 break;
21341 }
21342 }
21343
21344 exit (fail);
21345 #endif
21346 }
21347
21348 _ACEOF
21349 if ac_fn_c_try_run "$LINENO"; then :
21350 gl_cv_func_getcwd_path_max=yes
21351 else
21352 case $? in
21353 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
21354 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
21355 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';;
21356 *) gl_cv_func_getcwd_path_max=no;;
21357 esac
21358 fi
21359 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21360 conftest.$ac_objext conftest.beam conftest.$ac_ext
21361 fi
21362
21363
21364 fi
21365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
21366 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
21367
21368 case "$gl_cv_func_getcwd_null" in
21369 *yes)
21370
21371
21372
21373
21374
21375
21376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
21377 $as_echo_n "checking for getpagesize... " >&6; }
21378 if ${gl_cv_func_getpagesize+:} false; then :
21379 $as_echo_n "(cached) " >&6
21380 else
21381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21382 /* end confdefs.h. */
21383 #include <unistd.h>
21384 int
21385 main ()
21386 {
21387 return getpagesize();
21388 ;
21389 return 0;
21390 }
21391
21392 _ACEOF
21393 if ac_fn_c_try_link "$LINENO"; then :
21394 gl_cv_func_getpagesize=yes
21395 else
21396 gl_cv_func_getpagesize=no
21397 fi
21398 rm -f core conftest.err conftest.$ac_objext \
21399 conftest$ac_exeext conftest.$ac_ext
21400
21401 fi
21402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
21403 $as_echo "$gl_cv_func_getpagesize" >&6; }
21404
21405 if test $gl_cv_func_getpagesize = yes; then
21406
21407 cat >>confdefs.h <<_ACEOF
21408 #define HAVE_GETPAGESIZE 1
21409 _ACEOF
21410
21411 fi
21412
21413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5
21414 $as_echo_n "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; }
21415 if ${gl_cv_func_getcwd_succeeds_beyond_4k+:} false; then :
21416 $as_echo_n "(cached) " >&6
21417 else
21418 # Remove any remnants of a previous test.
21419 rm -rf confdir-14B---
21420 # Arrange for deletion of the temporary directory this test creates.
21421 ac_clean_files="$ac_clean_files confdir-14B---"
21422 if test "$cross_compiling" = yes; then :
21423 case "$host_os" in
21424 # Guess yes on musl systems.
21425 *-musl*) gl_cv_func_getcwd_succeeds_beyond_4k="guessing yes" ;;
21426 # Guess no otherwise, even on glibc systems.
21427 *) gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
21428 esac
21429
21430 else
21431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21432 /* end confdefs.h. */
21433
21434 #include <errno.h>
21435 #include <stdlib.h>
21436 #if HAVE_UNISTD_H
21437 # include <unistd.h>
21438 #else /* on Windows with MSVC */
21439 # include <direct.h>
21440 #endif
21441 #include <string.h>
21442 #include <sys/stat.h>
21443
21444
21445 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
21446 #if HAVE_UNISTD_H
21447 # include <unistd.h>
21448 #endif
21449 #include <limits.h>
21450 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
21451 # include <sys/param.h>
21452 #endif
21453 #if !defined PATH_MAX && defined MAXPATHLEN
21454 # define PATH_MAX MAXPATHLEN
21455 #endif
21456 #ifdef __hpux
21457 # undef PATH_MAX
21458 # define PATH_MAX 1024
21459 #endif
21460 #if defined _WIN32 && ! defined __CYGWIN__
21461 # undef PATH_MAX
21462 # define PATH_MAX 260
21463 #endif
21464
21465
21466
21467 $gl_mda_defines
21468
21469
21470 #ifndef S_IRWXU
21471 # define S_IRWXU 0700
21472 #endif
21473
21474 /* FIXME: skip the run-test altogether on systems without getpagesize. */
21475 #if ! HAVE_GETPAGESIZE
21476 # define getpagesize() 0
21477 #endif
21478
21479 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
21480 the 16kB pagesize on ia64 linux. Those conditions make the code below
21481 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
21482 #define TARGET_LEN (5 * 1024)
21483
21484 int
21485 main ()
21486 {
21487 char *cwd;
21488 size_t initial_cwd_len;
21489 int fail = 0;
21490
21491 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
21492 this relatively expensive and invasive test if that's not true. */
21493 #ifdef PATH_MAX
21494 int bug_possible = PATH_MAX < getpagesize ();
21495 #else
21496 int bug_possible = 0;
21497 #endif
21498 if (! bug_possible)
21499 return 0;
21500
21501 cwd = getcwd (NULL, 0);
21502 if (cwd == NULL)
21503 return 2;
21504
21505 initial_cwd_len = strlen (cwd);
21506 free (cwd);
21507
21508 if (1)
21509 {
21510 static char const dir_name[] = "confdir-14B---";
21511 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
21512 / sizeof dir_name);
21513 size_t d;
21514 for (d = 0; d < desired_depth; d++)
21515 {
21516 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
21517 {
21518 if (! (errno == ERANGE || errno == ENAMETOOLONG
21519 || errno == ENOENT))
21520 fail = 3; /* Unable to construct deep hierarchy. */
21521 break;
21522 }
21523 }
21524
21525 /* If libc has the bug in question, this invocation of getcwd
21526 results in a failed assertion. */
21527 cwd = getcwd (NULL, 0);
21528 if (cwd == NULL)
21529 fail = 4; /* getcwd didn't assert, but it failed for a long name
21530 where the answer could have been learned. */
21531 free (cwd);
21532
21533 /* Call rmdir first, in case the above chdir failed. */
21534 rmdir (dir_name);
21535 while (0 < d--)
21536 {
21537 if (chdir ("..") < 0)
21538 {
21539 fail = 5;
21540 break;
21541 }
21542 rmdir (dir_name);
21543 }
21544 }
21545
21546 return fail;
21547 }
21548
21549 _ACEOF
21550 if ac_fn_c_try_run "$LINENO"; then :
21551 gl_cv_func_getcwd_succeeds_beyond_4k=yes
21552 else
21553 ret=$?
21554 if test $ret -ge 128 || test $ret = 4; then
21555 gl_cv_func_getcwd_succeeds_beyond_4k=no
21556 else
21557 gl_cv_func_getcwd_succeeds_beyond_4k=yes
21558 fi
21559
21560 fi
21561 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21562 conftest.$ac_objext conftest.beam conftest.$ac_ext
21563 fi
21564
21565
21566 fi
21567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5
21568 $as_echo "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; }
21569 case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
21570 *no)
21571 gl_abort_bug=yes
21572 ;;
21573 *)
21574
21575 ;;
21576 esac
21577
21578 ;;
21579 esac
21580 ;;
21581 esac
21582 case "$gl_cv_func_getcwd_path_max" in
21583 *"no" | *"no, it has the AIX bug") ;;
21584 *)
21585
21586 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
21587
21588 ;;
21589 esac
21590 case "$gl_cv_func_getcwd_path_max" in
21591 *"no, but it is partly working")
21592
21593 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
21594
21595 ;;
21596 *"yes, but with shorter paths")
21597
21598 $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
21599
21600 ;;
21601 esac
21602
21603 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
21604 || test $gl_cv_func_getcwd_posix_signature != yes \
21605 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \
21606 || test $gl_abort_bug = yes; then
21607 REPLACE_GETCWD=1
21608 fi
21609
21610 if test $REPLACE_GETCWD = 1; then
21611
21612
21613
21614
21615
21616
21617
21618
21619 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
21620
21621
21622
21623
21624 :
21625
21626 fi
21627
21628
21629 cat >>confdefs.h <<_ACEOF
21630 #define GNULIB_GETCWD 1
21631 _ACEOF
21632
21633
21634
21635
21636
21637
21638
21639 GNULIB_GETCWD=1
21640
21641
21642
21643
21644
21645 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
21646
21647
21648
21649
21650
21651
21652
21653
21654 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
21655 *yes,yes) ;;
21656 *)
21657 REPLACE_GETCWD=1
21658 ;;
21659 esac
21660
21661 if test $REPLACE_GETCWD = 1; then
21662
21663
21664
21665
21666
21667
21668
21669
21670 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
21671
21672 fi
21673
21674
21675
21676
21677
21678 GNULIB_GETCWD=1
21679
21680
21681
21682
21683
21684 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696 if test $ac_cv_func_getdelim = yes; then
21697 HAVE_GETDELIM=1
21698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
21699 $as_echo_n "checking for working getdelim function... " >&6; }
21700 if ${gl_cv_func_working_getdelim+:} false; then :
21701 $as_echo_n "(cached) " >&6
21702 else
21703 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
21704 if test "$cross_compiling" = yes; then :
21705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21706 /* end confdefs.h. */
21707
21708 #include <features.h>
21709 #ifdef __GNU_LIBRARY__
21710 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
21711 Lucky GNU user
21712 #endif
21713 #endif
21714
21715 _ACEOF
21716 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21717 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
21718 gl_cv_func_working_getdelim="guessing yes"
21719 else
21720 case "$host_os" in
21721 *-musl*) gl_cv_func_working_getdelim="guessing yes" ;;
21722 *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
21723 esac
21724
21725 fi
21726 rm -f conftest*
21727
21728
21729 else
21730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21731 /* end confdefs.h. */
21732
21733 # include <stdio.h>
21734 # include <stdlib.h>
21735 # include <string.h>
21736 int main ()
21737 {
21738 FILE *in = fopen ("./conftest.data", "r");
21739 if (!in)
21740 return 1;
21741 {
21742 /* Test result for a NULL buffer and a zero size.
21743 Based on a test program from Karl Heuer. */
21744 char *line = NULL;
21745 size_t siz = 0;
21746 int len = getdelim (&line, &siz, '\n', in);
21747 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
21748 { free (line); fclose (in); return 2; }
21749 free (line);
21750 }
21751 {
21752 /* Test result for a NULL buffer and a non-zero size.
21753 This crashes on FreeBSD 8.0. */
21754 char *line = NULL;
21755 size_t siz = (size_t)(~0) / 4;
21756 if (getdelim (&line, &siz, '\n', in) == -1)
21757 { fclose (in); return 3; }
21758 free (line);
21759 }
21760 fclose (in);
21761 return 0;
21762 }
21763
21764 _ACEOF
21765 if ac_fn_c_try_run "$LINENO"; then :
21766 gl_cv_func_working_getdelim=yes
21767 else
21768 gl_cv_func_working_getdelim=no
21769 fi
21770 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21771 conftest.$ac_objext conftest.beam conftest.$ac_ext
21772 fi
21773
21774
21775 fi
21776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
21777 $as_echo "$gl_cv_func_working_getdelim" >&6; }
21778 case "$gl_cv_func_working_getdelim" in
21779 *yes) ;;
21780 *) REPLACE_GETDELIM=1 ;;
21781 esac
21782 else
21783 HAVE_GETDELIM=0
21784 fi
21785
21786 if test $ac_cv_have_decl_getdelim = no; then
21787 HAVE_DECL_GETDELIM=0
21788 fi
21789
21790 if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
21791
21792
21793
21794
21795
21796
21797
21798
21799 gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
21800
21801
21802 for ac_func in flockfile funlockfile
21803 do :
21804 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21805 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
21806 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
21807 cat >>confdefs.h <<_ACEOF
21808 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21809 _ACEOF
21810
21811 fi
21812 done
21813
21814 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
21815 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
21816 ac_have_decl=1
21817 else
21818 ac_have_decl=0
21819 fi
21820
21821 cat >>confdefs.h <<_ACEOF
21822 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
21823 _ACEOF
21824
21825
21826 fi
21827
21828
21829
21830
21831
21832 GNULIB_GETDELIM=1
21833
21834
21835
21836
21837
21838 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
21839
21840
21841
21842
21843
21844
21845
21846
21847 if test $ac_cv_func_getdtablesize = yes &&
21848 test $ac_cv_have_decl_getdtablesize = yes; then
21849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
21850 $as_echo_n "checking whether getdtablesize works... " >&6; }
21851 if ${gl_cv_func_getdtablesize_works+:} false; then :
21852 $as_echo_n "(cached) " >&6
21853 else
21854 case "$host_os" in
21855 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
21856 *)
21857 if test "$cross_compiling" = yes; then :
21858 case "$host_os" in
21859 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
21860 gl_cv_func_getdtablesize_works="guessing no" ;;
21861 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
21862 esac
21863
21864 else
21865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21866 /* end confdefs.h. */
21867
21868 #include <unistd.h>
21869
21870
21871 $gl_mda_defines
21872
21873
21874 int
21875 main ()
21876 {
21877 int size = getdtablesize();
21878 if (dup2 (0, getdtablesize()) != -1)
21879 return 1;
21880 if (size != getdtablesize())
21881 return 2;
21882
21883 ;
21884 return 0;
21885 }
21886 _ACEOF
21887 if ac_fn_c_try_run "$LINENO"; then :
21888 gl_cv_func_getdtablesize_works=yes
21889 else
21890 gl_cv_func_getdtablesize_works=no
21891 fi
21892 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21893 conftest.$ac_objext conftest.beam conftest.$ac_ext
21894 fi
21895
21896 ;;
21897 esac
21898
21899 fi
21900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
21901 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
21902 case "$gl_cv_func_getdtablesize_works" in
21903 *yes | "no (limitation)") ;;
21904 *) REPLACE_GETDTABLESIZE=1 ;;
21905 esac
21906 else
21907 HAVE_GETDTABLESIZE=0
21908 fi
21909
21910 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
21911
21912
21913
21914
21915
21916
21917
21918
21919 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
21920
21921 :
21922 fi
21923
21924
21925
21926
21927
21928 GNULIB_GETDTABLESIZE=1
21929
21930
21931
21932
21933
21934 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945 gl_getline_needs_run_time_check=no
21946 ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
21947 if test "x$ac_cv_func_getline" = xyes; then :
21948 gl_getline_needs_run_time_check=yes
21949 else
21950 am_cv_func_working_getline=no
21951 fi
21952
21953 if test $gl_getline_needs_run_time_check = yes; then
21954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
21955 $as_echo_n "checking for working getline function... " >&6; }
21956 if ${am_cv_func_working_getline+:} false; then :
21957 $as_echo_n "(cached) " >&6
21958 else
21959 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
21960 if test "$cross_compiling" = yes; then :
21961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21962 /* end confdefs.h. */
21963
21964 #include <features.h>
21965 #ifdef __GNU_LIBRARY__
21966 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
21967 Lucky GNU user
21968 #endif
21969 #endif
21970
21971 _ACEOF
21972 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21973 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
21974 am_cv_func_working_getline="guessing yes"
21975 else
21976 case "$host_os" in
21977 *-musl*) am_cv_func_working_getline="guessing yes" ;;
21978 *) am_cv_func_working_getline="$gl_cross_guess_normal" ;;
21979 esac
21980
21981 fi
21982 rm -f conftest*
21983
21984
21985 else
21986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21987 /* end confdefs.h. */
21988
21989 # include <stdio.h>
21990 # include <stdlib.h>
21991 # include <string.h>
21992 int main ()
21993 {
21994 FILE *in = fopen ("./conftest.data", "r");
21995 if (!in)
21996 return 1;
21997 {
21998 /* Test result for a NULL buffer and a zero size.
21999 Based on a test program from Karl Heuer. */
22000 char *line = NULL;
22001 size_t siz = 0;
22002 int len = getline (&line, &siz, in);
22003 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
22004 { free (line); fclose (in); return 2; }
22005 free (line);
22006 }
22007 {
22008 /* Test result for a NULL buffer and a non-zero size.
22009 This crashes on FreeBSD 8.0. */
22010 char *line = NULL;
22011 size_t siz = (size_t)(~0) / 4;
22012 if (getline (&line, &siz, in) == -1)
22013 { fclose (in); return 3; }
22014 free (line);
22015 }
22016 fclose (in);
22017 return 0;
22018 }
22019
22020 _ACEOF
22021 if ac_fn_c_try_run "$LINENO"; then :
22022 am_cv_func_working_getline=yes
22023 else
22024 am_cv_func_working_getline=no
22025 fi
22026 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22027 conftest.$ac_objext conftest.beam conftest.$ac_ext
22028 fi
22029
22030
22031 fi
22032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
22033 $as_echo "$am_cv_func_working_getline" >&6; }
22034 fi
22035
22036 if test $ac_cv_have_decl_getline = no; then
22037 HAVE_DECL_GETLINE=0
22038 fi
22039
22040 case "$am_cv_func_working_getline" in
22041 *yes) ;;
22042 *)
22043 REPLACE_GETLINE=1
22044 ;;
22045 esac
22046
22047 if test $REPLACE_GETLINE = 1; then
22048
22049
22050
22051
22052
22053
22054
22055
22056 gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
22057
22058
22059 :
22060
22061 fi
22062
22063
22064
22065
22066
22067 GNULIB_GETLINE=1
22068
22069
22070
22071
22072
22073 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083 if test $ac_cv_have_decl_getlogin_r = no; then
22084 HAVE_DECL_GETLOGIN_R=0
22085 fi
22086
22087
22088 if test $ac_cv_func_getlogin_r = no; then
22089 HAVE_GETLOGIN_R=0
22090 else
22091 HAVE_GETLOGIN_R=1
22092
22093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
22094 $as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
22095 if ${gl_cv_func_getlogin_r_works+:} false; then :
22096 $as_echo_n "(cached) " >&6
22097 else
22098
22099 case "$host_os" in
22100 # Guess no on Mac OS X, OSF/1.
22101 darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;;
22102 # Guess yes otherwise.
22103 *) gl_cv_func_getlogin_r_works="guessing yes" ;;
22104 esac
22105 if test "$cross_compiling" = yes; then :
22106 :
22107 else
22108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22109 /* end confdefs.h. */
22110
22111 #include <stddef.h>
22112 #include <string.h>
22113 #include <unistd.h>
22114 #if !HAVE_DECL_GETLOGIN_R
22115 extern
22116 # ifdef __cplusplus
22117 "C"
22118 # endif
22119 int getlogin_r (char *, size_t);
22120 #endif
22121 int
22122 main (void)
22123 {
22124 int result = 0;
22125 char buf[100];
22126
22127 if (getlogin_r (buf, 0) == 0)
22128 result |= 1;
22129 if (getlogin_r (buf, 1) == 0)
22130 result |= 2;
22131 if (getlogin_r (buf, 100) == 0)
22132 {
22133 size_t n = strlen (buf);
22134 if (getlogin_r (buf, n) == 0)
22135 result |= 4;
22136 }
22137 return result;
22138 }
22139 _ACEOF
22140 if ac_fn_c_try_run "$LINENO"; then :
22141 gl_cv_func_getlogin_r_works=yes
22142 else
22143 gl_cv_func_getlogin_r_works=no
22144 fi
22145 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22146 conftest.$ac_objext conftest.beam conftest.$ac_ext
22147 fi
22148
22149
22150 fi
22151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
22152 $as_echo "$gl_cv_func_getlogin_r_works" >&6; }
22153 case "$gl_cv_func_getlogin_r_works" in
22154 *yes) ;;
22155 *) REPLACE_GETLOGIN_R=1 ;;
22156 esac
22157 fi
22158
22159 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
22160
22161
22162
22163
22164
22165
22166
22167
22168 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
22169
22170
22171
22172
22173 fi
22174
22175
22176
22177
22178
22179 GNULIB_GETLOGIN_R=1
22180
22181
22182
22183
22184
22185 $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
22186
22187
22188
22189
22190
22191
22192
22193 ac_found=0
22194 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
22195 "
22196 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
22197 ac_have_decl=1
22198 else
22199 ac_have_decl=0
22200 fi
22201
22202 cat >>confdefs.h <<_ACEOF
22203 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
22204 _ACEOF
22205 if test $ac_have_decl = 1; then :
22206 ac_found=1
22207 fi
22208
22209 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
22210 "
22211 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
22212 ac_have_decl=1
22213 else
22214 ac_have_decl=0
22215 fi
22216
22217 cat >>confdefs.h <<_ACEOF
22218 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
22219 _ACEOF
22220 if test $ac_have_decl = 1; then :
22221 ac_found=1
22222 fi
22223
22224 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
22225 "
22226 if test "x$ac_cv_have_decl___argv" = xyes; then :
22227 ac_have_decl=1
22228 else
22229 ac_have_decl=0
22230 fi
22231
22232 cat >>confdefs.h <<_ACEOF
22233 #define HAVE_DECL___ARGV $ac_have_decl
22234 _ACEOF
22235 if test $ac_have_decl = 1; then :
22236 ac_found=1
22237 fi
22238
22239
22240 # Incur the cost of this test only if none of the above worked.
22241 if test $ac_found = 0; then
22242 # On OpenBSD 5.1, using the global __progname variable appears to be
22243 # the only way to implement getprogname.
22244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
22245 $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
22246 if ${gl_cv_var___progname+:} false; then :
22247 $as_echo_n "(cached) " >&6
22248 else
22249
22250 gl_cv_var___progname=
22251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22252 /* end confdefs.h. */
22253 extern char *__progname;
22254 int
22255 main ()
22256 {
22257 return *__progname;
22258
22259 ;
22260 return 0;
22261 }
22262 _ACEOF
22263 if ac_fn_c_try_link "$LINENO"; then :
22264 gl_cv_var___progname=yes
22265
22266 fi
22267 rm -f core conftest.err conftest.$ac_objext \
22268 conftest$ac_exeext conftest.$ac_ext
22269
22270
22271 fi
22272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
22273 $as_echo "$gl_cv_var___progname" >&6; }
22274 if test "$gl_cv_var___progname" = yes; then
22275
22276 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
22277
22278 fi
22279 fi
22280
22281
22282
22283
22284
22285 if test "$ac_cv_func_getrandom" != yes; then
22286 HAVE_GETRANDOM=0
22287 else
22288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
22289 $as_echo_n "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
22290 if ${gl_cv_func_getrandom_ok+:} false; then :
22291 $as_echo_n "(cached) " >&6
22292 else
22293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22294 /* end confdefs.h. */
22295 /* Additional includes are needed before <sys/random.h> on uClibc
22296 and Mac OS X. */
22297 #include <sys/types.h>
22298 #include <stdlib.h>
22299 #include <sys/random.h>
22300 ssize_t getrandom (void *, size_t, unsigned int);
22301
22302 int
22303 main ()
22304 {
22305
22306 ;
22307 return 0;
22308 }
22309
22310 _ACEOF
22311 if ac_fn_c_try_compile "$LINENO"; then :
22312 gl_cv_func_getrandom_ok=yes
22313 else
22314 gl_cv_func_getrandom_ok=no
22315 fi
22316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22317
22318 fi
22319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
22320 $as_echo "$gl_cv_func_getrandom_ok" >&6; }
22321 if test $gl_cv_func_getrandom_ok = no; then
22322 REPLACE_GETRANDOM=1
22323 fi
22324 fi
22325
22326 case "$host_os" in
22327 mingw*)
22328 for ac_header in bcrypt.h
22329 do :
22330 ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
22331
22332 "
22333 if test "x$ac_cv_header_bcrypt_h" = xyes; then :
22334 cat >>confdefs.h <<_ACEOF
22335 #define HAVE_BCRYPT_H 1
22336 _ACEOF
22337
22338 fi
22339
22340 done
22341
22342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
22343 $as_echo_n "checking whether the bcrypt library is guaranteed to be present... " >&6; }
22344 if ${gl_cv_lib_assume_bcrypt+:} false; then :
22345 $as_echo_n "(cached) " >&6
22346 else
22347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22348 /* end confdefs.h. */
22349 #include <windows.h>
22350 int
22351 main ()
22352 {
22353 #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
22354 cannot assume it
22355 #endif
22356
22357 ;
22358 return 0;
22359 }
22360
22361 _ACEOF
22362 if ac_fn_c_try_compile "$LINENO"; then :
22363 gl_cv_lib_assume_bcrypt=yes
22364 else
22365 gl_cv_lib_assume_bcrypt=no
22366 fi
22367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22368
22369 fi
22370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
22371 $as_echo "$gl_cv_lib_assume_bcrypt" >&6; }
22372 if test $gl_cv_lib_assume_bcrypt = yes; then
22373
22374 $as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
22375
22376 LIB_GETRANDOM='-lbcrypt'
22377 else
22378 LIB_GETRANDOM='-ladvapi32'
22379 fi
22380 ;;
22381 *)
22382 LIB_GETRANDOM= ;;
22383 esac
22384
22385
22386 if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
22387
22388
22389
22390
22391
22392
22393
22394
22395 gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext"
22396
22397 fi
22398
22399
22400
22401
22402
22403 GNULIB_GETRANDOM=1
22404
22405
22406
22407
22408
22409 $as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422 gl_gettimeofday_timezone=void
22423 if test $ac_cv_func_gettimeofday != yes; then
22424 HAVE_GETTIMEOFDAY=0
22425 else
22426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
22427 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
22428 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
22429 $as_echo_n "(cached) " >&6
22430 else
22431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22432 /* end confdefs.h. */
22433 #include <sys/time.h>
22434 struct timeval c;
22435 int gettimeofday (struct timeval *restrict, void *restrict);
22436
22437 int
22438 main ()
22439 {
22440 /* glibc uses struct timezone * rather than the POSIX void *
22441 if _GNU_SOURCE is defined. However, since the only portable
22442 use of gettimeofday uses NULL as the second parameter, and
22443 since the glibc definition is actually more typesafe, it is
22444 not worth wrapping this to get a compliant signature. */
22445 int (*f) (struct timeval *restrict, void *restrict)
22446 = gettimeofday;
22447 int x = f (&c, 0);
22448 return !(x | c.tv_sec | c.tv_usec);
22449
22450 ;
22451 return 0;
22452 }
22453 _ACEOF
22454 if ac_fn_c_try_compile "$LINENO"; then :
22455 gl_cv_func_gettimeofday_posix_signature=yes
22456 else
22457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22458 /* end confdefs.h. */
22459 #include <sys/time.h>
22460 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
22461
22462 int
22463 main ()
22464 {
22465
22466 ;
22467 return 0;
22468 }
22469 _ACEOF
22470 if ac_fn_c_try_compile "$LINENO"; then :
22471 gl_cv_func_gettimeofday_posix_signature=almost
22472 else
22473 gl_cv_func_gettimeofday_posix_signature=no
22474 fi
22475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22476 fi
22477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22478 fi
22479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
22480 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
22481 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
22482 gl_gettimeofday_timezone='struct timezone'
22483 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
22484 REPLACE_GETTIMEOFDAY=1
22485 fi
22486 if test $REPLACE_STRUCT_TIMEVAL = 1; then
22487 REPLACE_GETTIMEOFDAY=1
22488 fi
22489 case "$host_os" in
22490 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
22491 esac
22492 fi
22493
22494 cat >>confdefs.h <<_ACEOF
22495 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
22496 _ACEOF
22497
22498
22499 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
22500
22501
22502
22503
22504
22505
22506
22507
22508 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
22509
22510 :
22511 fi
22512
22513
22514
22515
22516
22517 GNULIB_GETTIMEOFDAY=1
22518
22519
22520
22521
22522
22523 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
22524
22525
22526
22527
22528
22529
22530
22531 if test $ac_cv_func_glob = no; then
22532 HAVE_GLOB=0
22533 else
22534
22535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5
22536 $as_echo_n "checking for GNU glob interface version 1 or 2... " >&6; }
22537 if ${gl_cv_gnu_glob_interface_version_1_2+:} false; then :
22538 $as_echo_n "(cached) " >&6
22539 else
22540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22541 /* end confdefs.h. */
22542 #include <gnu-versions.h>
22543 char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1];
22544 _ACEOF
22545 if ac_fn_c_try_compile "$LINENO"; then :
22546 gl_cv_gnu_glob_interface_version_1_2=yes
22547 else
22548 gl_cv_gnu_glob_interface_version_1_2=no
22549 fi
22550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22551 fi
22552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5
22553 $as_echo "$gl_cv_gnu_glob_interface_version_1_2" >&6; }
22554 if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then
22555 REPLACE_GLOB=1
22556 fi
22557
22558 if test $REPLACE_GLOB = 0; then
22559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
22560 $as_echo_n "checking whether glob lists broken symlinks... " >&6; }
22561 if ${gl_cv_glob_lists_symlinks+:} false; then :
22562 $as_echo_n "(cached) " >&6
22563 else
22564 if test $cross_compiling != yes; then
22565 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
22566 gl_cv_glob_lists_symlinks=maybe
22567 else
22568 # If we can't make a symlink, then we cannot test this issue. Be
22569 # pessimistic about this.
22570 gl_cv_glob_lists_symlinks=no
22571 fi
22572 if test $gl_cv_glob_lists_symlinks = maybe; then
22573 if test "$cross_compiling" = yes; then :
22574 :
22575
22576 else
22577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22578 /* end confdefs.h. */
22579 #include <stddef.h>
22580 #include <glob.h>
22581 int
22582 main ()
22583 {
22584 glob_t found;
22585 if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH)
22586 return 1;
22587 globfree (&found);
22588
22589 ;
22590 return 0;
22591 }
22592 _ACEOF
22593 if ac_fn_c_try_run "$LINENO"; then :
22594 gl_cv_glob_lists_symlinks=yes
22595 else
22596 gl_cv_glob_lists_symlinks=no
22597 fi
22598 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22599 conftest.$ac_objext conftest.beam conftest.$ac_ext
22600 fi
22601
22602 fi
22603 rm -f conf$$-globtest
22604 else
22605 gl_cv_glob_lists_symlinks="$gl_cross_guess_normal"
22606 fi
22607
22608 fi
22609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
22610 $as_echo "$gl_cv_glob_lists_symlinks" >&6; }
22611 case "$gl_cv_glob_lists_symlinks" in
22612 *yes) ;;
22613 *) REPLACE_GLOB=1 ;;
22614 esac
22615 fi
22616
22617 fi
22618
22619 if test $ac_cv_func_glob_pattern_p = no; then
22620 HAVE_GLOB_PATTERN_P=0
22621 else
22622 if test $REPLACE_GLOB = 1; then
22623 REPLACE_GLOB_PATTERN_P=1
22624 fi
22625 fi
22626
22627 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
22628
22629
22630 GLOB_H='glob.h'
22631 if test -n "$GLOB_H"; then
22632 GL_GENERATE_GLOB_H_TRUE=
22633 GL_GENERATE_GLOB_H_FALSE='#'
22634 else
22635 GL_GENERATE_GLOB_H_TRUE='#'
22636 GL_GENERATE_GLOB_H_FALSE=
22637 fi
22638
22639
22640 fi
22641
22642 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
22643
22644
22645
22646
22647
22648
22649
22650
22651 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661 gl_LIBOBJS="$gl_LIBOBJS globfree.$ac_objext"
22662
22663
22664
22665
22666
22667
22668 fi
22669 if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then
22670
22671
22672
22673
22674
22675
22676
22677
22678 gl_LIBOBJS="$gl_LIBOBJS glob_pattern_p.$ac_objext"
22679
22680 fi
22681
22682
22683
22684
22685
22686 GNULIB_GLOB=1
22687
22688
22689
22690
22691
22692 $as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h
22693
22694
22695
22696
22697
22698 LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
22699
22700
22701
22702
22703
22704
22705
22706
22707 HAVE_INET_NTOP=1
22708 INET_NTOP_LIB=
22709
22710
22711
22712
22713 if test $ac_cv_header_sys_socket_h != yes; then
22714 for ac_header in winsock2.h
22715 do :
22716 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
22717 if test "x$ac_cv_header_winsock2_h" = xyes; then :
22718 cat >>confdefs.h <<_ACEOF
22719 #define HAVE_WINSOCK2_H 1
22720 _ACEOF
22721
22722 fi
22723
22724 done
22725
22726 fi
22727 if test "$ac_cv_header_winsock2_h" = yes; then
22728 HAVE_WINSOCK2_H=1
22729 UNISTD_H_HAVE_WINSOCK2_H=1
22730 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
22731 else
22732 HAVE_WINSOCK2_H=0
22733 fi
22734
22735
22736 if test $HAVE_WINSOCK2_H = 1; then
22737 REPLACE_INET_NTOP=1
22738 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
22739 "
22740 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
22741 ac_have_decl=1
22742 else
22743 ac_have_decl=0
22744 fi
22745
22746 cat >>confdefs.h <<_ACEOF
22747 #define HAVE_DECL_INET_NTOP $ac_have_decl
22748 _ACEOF
22749
22750 if test $ac_cv_have_decl_inet_ntop = yes; then
22751 INET_NTOP_LIB="-lws2_32"
22752 else
22753 HAVE_DECL_INET_NTOP=0
22754 fi
22755 else
22756 gl_save_LIBS=$LIBS
22757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
22758 $as_echo_n "checking for library containing inet_ntop... " >&6; }
22759 if ${ac_cv_search_inet_ntop+:} false; then :
22760 $as_echo_n "(cached) " >&6
22761 else
22762 ac_func_search_save_LIBS=$LIBS
22763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22764 /* end confdefs.h. */
22765
22766 /* Override any GCC internal prototype to avoid an error.
22767 Use char because int might match the return type of a GCC
22768 builtin and then its argument prototype would still apply. */
22769 #ifdef __cplusplus
22770 extern "C"
22771 #endif
22772 char inet_ntop ();
22773 int
22774 main ()
22775 {
22776 return inet_ntop ();
22777 ;
22778 return 0;
22779 }
22780 _ACEOF
22781 for ac_lib in '' nsl resolv network; do
22782 if test -z "$ac_lib"; then
22783 ac_res="none required"
22784 else
22785 ac_res=-l$ac_lib
22786 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22787 fi
22788 if ac_fn_c_try_link "$LINENO"; then :
22789 ac_cv_search_inet_ntop=$ac_res
22790 fi
22791 rm -f core conftest.err conftest.$ac_objext \
22792 conftest$ac_exeext
22793 if ${ac_cv_search_inet_ntop+:} false; then :
22794 break
22795 fi
22796 done
22797 if ${ac_cv_search_inet_ntop+:} false; then :
22798
22799 else
22800 ac_cv_search_inet_ntop=no
22801 fi
22802 rm conftest.$ac_ext
22803 LIBS=$ac_func_search_save_LIBS
22804 fi
22805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
22806 $as_echo "$ac_cv_search_inet_ntop" >&6; }
22807 ac_res=$ac_cv_search_inet_ntop
22808 if test "$ac_res" != no; then :
22809 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22810
22811 else
22812 for ac_func in inet_ntop
22813 do :
22814 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
22815 if test "x$ac_cv_func_inet_ntop" = xyes; then :
22816 cat >>confdefs.h <<_ACEOF
22817 #define HAVE_INET_NTOP 1
22818 _ACEOF
22819
22820 fi
22821 done
22822
22823 if test $ac_cv_func_inet_ntop = no; then
22824 HAVE_INET_NTOP=0
22825 fi
22826
22827 fi
22828
22829 LIBS=$gl_save_LIBS
22830
22831 if test "$ac_cv_search_inet_ntop" != "no" \
22832 && test "$ac_cv_search_inet_ntop" != "none required"; then
22833 INET_NTOP_LIB="$ac_cv_search_inet_ntop"
22834 fi
22835
22836
22837 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
22838 #if HAVE_NETDB_H
22839 # include <netdb.h>
22840 #endif
22841
22842 "
22843 if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
22844 ac_have_decl=1
22845 else
22846 ac_have_decl=0
22847 fi
22848
22849 cat >>confdefs.h <<_ACEOF
22850 #define HAVE_DECL_INET_NTOP $ac_have_decl
22851 _ACEOF
22852
22853 if test $ac_cv_have_decl_inet_ntop = no; then
22854 HAVE_DECL_INET_NTOP=0
22855 fi
22856 fi
22857
22858
22859 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
22860
22861
22862
22863
22864
22865
22866
22867
22868 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
22869
22870
22871
22872
22873 fi
22874
22875
22876
22877
22878
22879 GNULIB_INET_NTOP=1
22880
22881
22882
22883
22884
22885
22886
22887 PRIPTR_PREFIX=
22888 if test -n "$STDINT_H"; then
22889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22890 /* end confdefs.h. */
22891
22892 #ifdef _WIN64
22893 LLP64
22894 #endif
22895
22896 int
22897 main ()
22898 {
22899
22900 ;
22901 return 0;
22902 }
22903
22904 _ACEOF
22905 if ac_fn_c_try_compile "$LINENO"; then :
22906 PRIPTR_PREFIX='"l"'
22907 else
22908 PRIPTR_PREFIX='"ll"'
22909 fi
22910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22911 else
22912 for glpfx in '' l ll I64; do
22913 case $glpfx in
22914 '') gltype1='int';;
22915 l) gltype1='long int';;
22916 ll) gltype1='long long int';;
22917 I64) gltype1='__int64';;
22918 esac
22919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22920 /* end confdefs.h. */
22921 #include <stdint.h>
22922 extern intptr_t foo;
22923 extern $gltype1 foo;
22924 int
22925 main ()
22926 {
22927
22928 ;
22929 return 0;
22930 }
22931 _ACEOF
22932 if ac_fn_c_try_compile "$LINENO"; then :
22933 PRIPTR_PREFIX='"'$glpfx'"'
22934 fi
22935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22936 test -n "$PRIPTR_PREFIX" && break
22937 done
22938 fi
22939
22940
22941
22942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
22943 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
22944 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
22945 $as_echo_n "(cached) " >&6
22946 else
22947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22948 /* end confdefs.h. */
22949 /* Work also in C++ mode. */
22950 #define __STDC_LIMIT_MACROS 1
22951
22952 /* Work if build is not clean. */
22953 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22954
22955 #include <limits.h>
22956 #if HAVE_STDINT_H
22957 #include <stdint.h>
22958 #endif
22959
22960 #if defined INT32_MAX && defined INTMAX_MAX
22961 #define CONDITION (INT32_MAX < INTMAX_MAX)
22962 #else
22963 #define CONDITION (sizeof (int) < sizeof (long long int))
22964 #endif
22965 int test[CONDITION ? 1 : -1];
22966 int
22967 main ()
22968 {
22969
22970 ;
22971 return 0;
22972 }
22973 _ACEOF
22974 if ac_fn_c_try_compile "$LINENO"; then :
22975 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
22976 else
22977 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
22978 fi
22979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22980 fi
22981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
22982 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
22983 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
22984 INT32_MAX_LT_INTMAX_MAX=1;
22985 else
22986 INT32_MAX_LT_INTMAX_MAX=0;
22987 fi
22988
22989
22990 if test $APPLE_UNIVERSAL_BUILD = 0; then
22991
22992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
22993 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
22994 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
22995 $as_echo_n "(cached) " >&6
22996 else
22997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22998 /* end confdefs.h. */
22999 /* Work also in C++ mode. */
23000 #define __STDC_LIMIT_MACROS 1
23001
23002 /* Work if build is not clean. */
23003 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23004
23005 #include <limits.h>
23006 #if HAVE_STDINT_H
23007 #include <stdint.h>
23008 #endif
23009
23010 #if defined INT64_MAX
23011 #define CONDITION (INT64_MAX == LONG_MAX)
23012 #else
23013 #define CONDITION (sizeof (long long int) == sizeof (long int))
23014 #endif
23015 int test[CONDITION ? 1 : -1];
23016 int
23017 main ()
23018 {
23019
23020 ;
23021 return 0;
23022 }
23023 _ACEOF
23024 if ac_fn_c_try_compile "$LINENO"; then :
23025 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
23026 else
23027 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
23028 fi
23029 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23030 fi
23031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
23032 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
23033 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
23034 INT64_MAX_EQ_LONG_MAX=1;
23035 else
23036 INT64_MAX_EQ_LONG_MAX=0;
23037 fi
23038
23039
23040 else
23041 INT64_MAX_EQ_LONG_MAX=-1
23042 fi
23043
23044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
23045 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
23046 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
23047 $as_echo_n "(cached) " >&6
23048 else
23049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23050 /* end confdefs.h. */
23051 /* Work also in C++ mode. */
23052 #define __STDC_LIMIT_MACROS 1
23053
23054 /* Work if build is not clean. */
23055 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23056
23057 #include <limits.h>
23058 #if HAVE_STDINT_H
23059 #include <stdint.h>
23060 #endif
23061
23062 #if defined UINT32_MAX && defined UINTMAX_MAX
23063 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
23064 #else
23065 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
23066 #endif
23067 int test[CONDITION ? 1 : -1];
23068 int
23069 main ()
23070 {
23071
23072 ;
23073 return 0;
23074 }
23075 _ACEOF
23076 if ac_fn_c_try_compile "$LINENO"; then :
23077 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
23078 else
23079 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
23080 fi
23081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23082 fi
23083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
23084 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
23085 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
23086 UINT32_MAX_LT_UINTMAX_MAX=1;
23087 else
23088 UINT32_MAX_LT_UINTMAX_MAX=0;
23089 fi
23090
23091
23092 if test $APPLE_UNIVERSAL_BUILD = 0; then
23093
23094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
23095 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
23096 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
23097 $as_echo_n "(cached) " >&6
23098 else
23099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23100 /* end confdefs.h. */
23101 /* Work also in C++ mode. */
23102 #define __STDC_LIMIT_MACROS 1
23103
23104 /* Work if build is not clean. */
23105 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
23106
23107 #include <limits.h>
23108 #if HAVE_STDINT_H
23109 #include <stdint.h>
23110 #endif
23111
23112 #if defined UINT64_MAX
23113 #define CONDITION (UINT64_MAX == ULONG_MAX)
23114 #else
23115 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
23116 #endif
23117 int test[CONDITION ? 1 : -1];
23118 int
23119 main ()
23120 {
23121
23122 ;
23123 return 0;
23124 }
23125 _ACEOF
23126 if ac_fn_c_try_compile "$LINENO"; then :
23127 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
23128 else
23129 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
23130 fi
23131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23132 fi
23133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
23134 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
23135 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
23136 UINT64_MAX_EQ_ULONG_MAX=1;
23137 else
23138 UINT64_MAX_EQ_ULONG_MAX=0;
23139 fi
23140
23141
23142 else
23143 UINT64_MAX_EQ_ULONG_MAX=-1
23144 fi
23145
23146
23147
23148
23149
23150
23151
23152
23153 if test $ac_cv_func_isblank = no; then
23154 HAVE_ISBLANK=0
23155 fi
23156
23157 if test $HAVE_ISBLANK = 0; then
23158
23159
23160
23161
23162
23163
23164
23165
23166 gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
23167
23168 fi
23169
23170
23171 cat >>confdefs.h <<_ACEOF
23172 #define GNULIB_ISBLANK 1
23173 _ACEOF
23174
23175
23176
23177
23178
23179
23180
23181 GNULIB_ISBLANK=1
23182
23183
23184
23185
23186
23187
23188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
23189 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
23190 if ${gl_cv_func_isnand_no_libm+:} false; then :
23191 $as_echo_n "(cached) " >&6
23192 else
23193
23194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23195 /* end confdefs.h. */
23196 #include <math.h>
23197 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
23198 # undef isnand
23199 # define isnand(x) __builtin_isnan ((double)(x))
23200 #else
23201 # undef isnand
23202 # define isnand(x) isnan ((double)(x))
23203 #endif
23204 double x;
23205 int
23206 main ()
23207 {
23208 return isnand (x);
23209 ;
23210 return 0;
23211 }
23212 _ACEOF
23213 if ac_fn_c_try_link "$LINENO"; then :
23214 gl_cv_func_isnand_no_libm=yes
23215 else
23216 gl_cv_func_isnand_no_libm=no
23217 fi
23218 rm -f core conftest.err conftest.$ac_objext \
23219 conftest$ac_exeext conftest.$ac_ext
23220
23221 fi
23222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
23223 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
23224
23225 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
23226 if test $gl_cv_func_isnand_no_libm = yes; then
23227
23228 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
23229
23230 fi
23231
23232 if test $gl_func_isnand_no_libm != yes; then
23233
23234
23235
23236
23237
23238
23239
23240
23241 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
23242
23243
23244
23245
23246 fi
23247
23248
23249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
23250 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
23251 if ${gl_cv_func_isnanl_no_libm+:} false; then :
23252 $as_echo_n "(cached) " >&6
23253 else
23254
23255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23256 /* end confdefs.h. */
23257 #include <math.h>
23258 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
23259 # undef isnanl
23260 # define isnanl(x) __builtin_isnan ((long double)(x))
23261 #elif defined isnan
23262 # undef isnanl
23263 # define isnanl(x) isnan ((long double)(x))
23264 #endif
23265 long double x;
23266 int
23267 main ()
23268 {
23269 return isnanl (x);
23270 ;
23271 return 0;
23272 }
23273 _ACEOF
23274 if ac_fn_c_try_link "$LINENO"; then :
23275 gl_cv_func_isnanl_no_libm=yes
23276 else
23277 gl_cv_func_isnanl_no_libm=no
23278 fi
23279 rm -f core conftest.err conftest.$ac_objext \
23280 conftest$ac_exeext conftest.$ac_ext
23281
23282 fi
23283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
23284 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
23285
23286 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
23287 if test $gl_func_isnanl_no_libm = yes; then
23288
23289
23290
23291
23292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
23293 $as_echo_n "checking whether isnanl works... " >&6; }
23294 if ${gl_cv_func_isnanl_works+:} false; then :
23295 $as_echo_n "(cached) " >&6
23296 else
23297
23298 if test "$cross_compiling" = yes; then :
23299 case "$host_os" in
23300 mingw*) # Guess yes on mingw, no on MSVC.
23301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23302 /* end confdefs.h. */
23303
23304 #ifdef __MINGW32__
23305 Known
23306 #endif
23307
23308 _ACEOF
23309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23310 $EGREP "Known" >/dev/null 2>&1; then :
23311 gl_cv_func_isnanl_works="guessing yes"
23312 else
23313 gl_cv_func_isnanl_works="guessing no"
23314 fi
23315 rm -f conftest*
23316
23317 ;;
23318 *) gl_cv_func_isnanl_works="guessing yes" ;;
23319 esac
23320
23321 else
23322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23323 /* end confdefs.h. */
23324
23325 #include <float.h>
23326 #include <limits.h>
23327 #include <math.h>
23328 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
23329 # undef isnanl
23330 # define isnanl(x) __builtin_isnan ((long double)(x))
23331 #elif defined isnan
23332 # undef isnanl
23333 # define isnanl(x) isnan ((long double)(x))
23334 #endif
23335 #define NWORDS \
23336 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23337 typedef union { unsigned int word[NWORDS]; long double value; }
23338 memory_long_double;
23339 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
23340 runtime type conversion. */
23341 #ifdef __sgi
23342 static long double NaNl ()
23343 {
23344 double zero = 0.0;
23345 return zero / zero;
23346 }
23347 #else
23348 # define NaNl() (0.0L / 0.0L)
23349 #endif
23350 int main ()
23351 {
23352 int result = 0;
23353
23354 if (!isnanl (NaNl ()))
23355 result |= 1;
23356
23357 {
23358 memory_long_double m;
23359 unsigned int i;
23360
23361 /* The isnanl function should be immune against changes in the sign bit and
23362 in the mantissa bits. The xor operation twiddles a bit that can only be
23363 a sign bit or a mantissa bit (since the exponent never extends to
23364 bit 31). */
23365 m.value = NaNl ();
23366 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
23367 for (i = 0; i < NWORDS; i++)
23368 m.word[i] |= 1;
23369 if (!isnanl (m.value))
23370 result |= 1;
23371 }
23372
23373 #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
23374 /* Representation of an 80-bit 'long double' as an initializer for a sequence
23375 of 'unsigned int' words. */
23376 # ifdef WORDS_BIGENDIAN
23377 # define LDBL80_WORDS(exponent,manthi,mantlo) \
23378 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
23379 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
23380 (unsigned int) (mantlo) << 16 \
23381 }
23382 # else
23383 # define LDBL80_WORDS(exponent,manthi,mantlo) \
23384 { mantlo, manthi, exponent }
23385 # endif
23386 { /* Quiet NaN. */
23387 static memory_long_double x =
23388 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
23389 if (!isnanl (x.value))
23390 result |= 2;
23391 }
23392 {
23393 /* Signalling NaN. */
23394 static memory_long_double x =
23395 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
23396 if (!isnanl (x.value))
23397 result |= 2;
23398 }
23399 /* isnanl should return something even for noncanonical values. */
23400 { /* Pseudo-NaN. */
23401 static memory_long_double x =
23402 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
23403 if (isnanl (x.value) && !isnanl (x.value))
23404 result |= 4;
23405 }
23406 { /* Pseudo-Infinity. */
23407 static memory_long_double x =
23408 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
23409 if (isnanl (x.value) && !isnanl (x.value))
23410 result |= 8;
23411 }
23412 { /* Pseudo-Zero. */
23413 static memory_long_double x =
23414 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
23415 if (isnanl (x.value) && !isnanl (x.value))
23416 result |= 16;
23417 }
23418 { /* Unnormalized number. */
23419 static memory_long_double x =
23420 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
23421 if (isnanl (x.value) && !isnanl (x.value))
23422 result |= 32;
23423 }
23424 { /* Pseudo-Denormal. */
23425 static memory_long_double x =
23426 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
23427 if (isnanl (x.value) && !isnanl (x.value))
23428 result |= 64;
23429 }
23430 #endif
23431
23432 return result;
23433 }
23434 _ACEOF
23435 if ac_fn_c_try_run "$LINENO"; then :
23436 gl_cv_func_isnanl_works=yes
23437 else
23438 gl_cv_func_isnanl_works=no
23439 fi
23440 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23441 conftest.$ac_objext conftest.beam conftest.$ac_ext
23442 fi
23443
23444
23445 fi
23446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
23447 $as_echo "$gl_cv_func_isnanl_works" >&6; }
23448
23449 case "$gl_cv_func_isnanl_works" in
23450 *yes) ;;
23451 *) gl_func_isnanl_no_libm=no ;;
23452 esac
23453 fi
23454 if test $gl_func_isnanl_no_libm = yes; then
23455
23456 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
23457
23458 fi
23459
23460 if test $gl_func_isnanl_no_libm != yes; then
23461
23462
23463
23464
23465
23466
23467
23468
23469 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
23470
23471
23472
23473
23474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
23475 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
23476 if ${gl_cv_cc_long_double_expbit0+:} false; then :
23477 $as_echo_n "(cached) " >&6
23478 else
23479
23480 if test "$cross_compiling" = yes; then :
23481
23482 gl_cv_cc_long_double_expbit0="unknown"
23483 case "$host_os" in
23484 mingw*) # On native Windows (little-endian), we know the result
23485 # in two cases: mingw, MSVC.
23486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23487 /* end confdefs.h. */
23488
23489 #ifdef __MINGW32__
23490 Known
23491 #endif
23492
23493 _ACEOF
23494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23495 $EGREP "Known" >/dev/null 2>&1; then :
23496 gl_cv_cc_long_double_expbit0="word 2 bit 0"
23497 fi
23498 rm -f conftest*
23499
23500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23501 /* end confdefs.h. */
23502
23503 #ifdef _MSC_VER
23504 Known
23505 #endif
23506
23507 _ACEOF
23508 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23509 $EGREP "Known" >/dev/null 2>&1; then :
23510 gl_cv_cc_long_double_expbit0="word 1 bit 20"
23511 fi
23512 rm -f conftest*
23513
23514 ;;
23515 esac
23516
23517 else
23518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23519 /* end confdefs.h. */
23520
23521 #include <float.h>
23522 #include <stddef.h>
23523 #include <stdio.h>
23524 #include <string.h>
23525 #define NWORDS \
23526 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23527 typedef union { long double value; unsigned int word[NWORDS]; }
23528 memory_long_double;
23529 static unsigned int ored_words[NWORDS];
23530 static unsigned int anded_words[NWORDS];
23531 static void add_to_ored_words (long double *x)
23532 {
23533 memory_long_double m;
23534 size_t i;
23535 /* Clear it first, in case
23536 sizeof (long double) < sizeof (memory_long_double). */
23537 memset (&m, 0, sizeof (memory_long_double));
23538 m.value = *x;
23539 for (i = 0; i < NWORDS; i++)
23540 {
23541 ored_words[i] |= m.word[i];
23542 anded_words[i] &= m.word[i];
23543 }
23544 }
23545 int main ()
23546 {
23547 static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
23548 size_t j;
23549 FILE *fp = fopen ("conftest.out", "w");
23550 if (fp == NULL)
23551 return 1;
23552 for (j = 0; j < NWORDS; j++)
23553 anded_words[j] = ~ (unsigned int) 0;
23554 for (j = 0; j < 5; j++)
23555 add_to_ored_words (&samples[j]);
23556 /* Remove bits that are common (e.g. if representation of the first mantissa
23557 bit is explicit). */
23558 for (j = 0; j < NWORDS; j++)
23559 ored_words[j] &= ~anded_words[j];
23560 /* Now find the nonzero word. */
23561 for (j = 0; j < NWORDS; j++)
23562 if (ored_words[j] != 0)
23563 break;
23564 if (j < NWORDS)
23565 {
23566 size_t i;
23567 for (i = j + 1; i < NWORDS; i++)
23568 if (ored_words[i] != 0)
23569 {
23570 fprintf (fp, "unknown");
23571 return (fclose (fp) != 0);
23572 }
23573 for (i = 0; ; i++)
23574 if ((ored_words[j] >> i) & 1)
23575 {
23576 fprintf (fp, "word %d bit %d", (int) j, (int) i);
23577 return (fclose (fp) != 0);
23578 }
23579 }
23580 fprintf (fp, "unknown");
23581 return (fclose (fp) != 0);
23582 }
23583
23584 _ACEOF
23585 if ac_fn_c_try_run "$LINENO"; then :
23586 gl_cv_cc_long_double_expbit0=`cat conftest.out`
23587 else
23588 gl_cv_cc_long_double_expbit0="unknown"
23589 fi
23590 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23591 conftest.$ac_objext conftest.beam conftest.$ac_ext
23592 fi
23593
23594 rm -f conftest.out
23595
23596 fi
23597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
23598 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
23599 case "$gl_cv_cc_long_double_expbit0" in
23600 word*bit*)
23601 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23602 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
23603
23604 cat >>confdefs.h <<_ACEOF
23605 #define LDBL_EXPBIT0_WORD $word
23606 _ACEOF
23607
23608
23609 cat >>confdefs.h <<_ACEOF
23610 #define LDBL_EXPBIT0_BIT $bit
23611 _ACEOF
23612
23613 ;;
23614 esac
23615
23616
23617
23618 fi
23619
23620
23621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
23622 $as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
23623 if ${gl_cv_c___inline+:} false; then :
23624 $as_echo_n "(cached) " >&6
23625 else
23626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23627 /* end confdefs.h. */
23628 typedef int foo_t;
23629 static __inline foo_t foo (void) { return 0; }
23630 int
23631 main ()
23632 {
23633 return foo ();
23634 ;
23635 return 0;
23636 }
23637 _ACEOF
23638 if ac_fn_c_try_compile "$LINENO"; then :
23639 gl_cv_c___inline=yes
23640 else
23641 gl_cv_c___inline=no
23642 fi
23643 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23644 fi
23645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
23646 $as_echo "$gl_cv_c___inline" >&6; }
23647 if test $gl_cv_c___inline = yes; then
23648
23649 $as_echo "#define HAVE___INLINE 1" >>confdefs.h
23650
23651 fi
23652
23653
23654
23655
23656
23657 LOCALCHARSET_TESTS_ENVIRONMENT=
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669 case "$host_os" in
23670 solaris*)
23671
23672 $as_echo "#define _LCONV_C99 1" >>confdefs.h
23673
23674 ;;
23675 esac
23676
23677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
23678 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
23679 if ${gl_cv_header_locale_h_posix2001+:} false; then :
23680 $as_echo_n "(cached) " >&6
23681 else
23682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23683 /* end confdefs.h. */
23684 #include <locale.h>
23685 int x = LC_MESSAGES;
23686 int y = sizeof (((struct lconv *) 0)->decimal_point);
23687 int
23688 main ()
23689 {
23690
23691 ;
23692 return 0;
23693 }
23694 _ACEOF
23695 if ac_fn_c_try_compile "$LINENO"; then :
23696 gl_cv_header_locale_h_posix2001=yes
23697 else
23698 gl_cv_header_locale_h_posix2001=no
23699 fi
23700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23701 fi
23702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
23703 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
23704
23705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
23706 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
23707 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
23708 $as_echo_n "(cached) " >&6
23709 else
23710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23711 /* end confdefs.h. */
23712 #include <locale.h>
23713 struct lconv l;
23714 int x = sizeof (l.decimal_point);
23715 int y = sizeof (l.int_p_cs_precedes);
23716 int
23717 main ()
23718 {
23719
23720 ;
23721 return 0;
23722 }
23723 _ACEOF
23724 if ac_fn_c_try_compile "$LINENO"; then :
23725 gl_cv_sys_struct_lconv_ok=yes
23726 else
23727 gl_cv_sys_struct_lconv_ok=no
23728 fi
23729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23730
23731 fi
23732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
23733 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
23734 if test $gl_cv_sys_struct_lconv_ok = no; then
23735 case "$host_os" in
23736 mingw*)
23737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23738 /* end confdefs.h. */
23739
23740 #ifdef _MSC_VER
23741 Special
23742 #endif
23743
23744 _ACEOF
23745 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23746 $EGREP "Special" >/dev/null 2>&1; then :
23747
23748 else
23749 REPLACE_STRUCT_LCONV=1
23750 fi
23751 rm -f conftest*
23752
23753 ;;
23754 *) REPLACE_STRUCT_LCONV=1 ;;
23755 esac
23756 fi
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766 if test $gl_cv_have_include_next = yes; then
23767 gl_cv_next_locale_h='<'locale.h'>'
23768 else
23769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
23770 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
23771 if ${gl_cv_next_locale_h+:} false; then :
23772 $as_echo_n "(cached) " >&6
23773 else
23774
23775
23776
23777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23778 /* end confdefs.h. */
23779 #include <locale.h>
23780 _ACEOF
23781 case "$host_os" in
23782 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23783 *) gl_absname_cpp="$ac_cpp" ;;
23784 esac
23785
23786 case "$host_os" in
23787 mingw*)
23788 gl_dirsep_regex='[/\\]'
23789 ;;
23790 *)
23791 gl_dirsep_regex='\/'
23792 ;;
23793 esac
23794 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23795 gl_header_literal_regex=`echo 'locale.h' \
23796 | sed -e "$gl_make_literal_regex_sed"`
23797 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23798 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23799 s|^/[^/]|//&|
23800 p
23801 q
23802 }'
23803
23804 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23805 sed -n "$gl_absolute_header_sed"`
23806
23807 gl_header=$gl_cv_absolute_locale_h
23808 gl_cv_next_locale_h='"'$gl_header'"'
23809
23810
23811 fi
23812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
23813 $as_echo "$gl_cv_next_locale_h" >&6; }
23814 fi
23815 NEXT_LOCALE_H=$gl_cv_next_locale_h
23816
23817 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23818 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23819 gl_next_as_first_directive='<'locale.h'>'
23820 else
23821 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23822 gl_next_as_first_directive=$gl_cv_next_locale_h
23823 fi
23824 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836 if test "$gl_threads_api" = posix; then
23837 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
23838 # pthread_rwlock_* functions.
23839 has_rwlock=false
23840 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
23841 "
23842 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
23843 has_rwlock=true
23844
23845 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
23846
23847 fi
23848
23849 if $has_rwlock; then
23850
23851
23852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
23853 $as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
23854 if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then :
23855 $as_echo_n "(cached) " >&6
23856 else
23857 save_LIBS="$LIBS"
23858 LIBS="$LIBS $LIBMULTITHREAD"
23859 if test "$cross_compiling" = yes; then :
23860 case "$host_os" in
23861 # Guess no on glibc systems.
23862 *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
23863 # Guess no on musl systems.
23864 *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
23865 # Guess no on bionic systems.
23866 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
23867 # Guess yes on native Windows with the mingw-w64 winpthreads library.
23868 # Guess no on native Windows with the gnulib windows-rwlock module.
23869 mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
23870 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
23871 else
23872 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
23873 fi
23874 ;;
23875 # If we don't know, obey --enable-cross-guesses.
23876 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
23877 esac
23878
23879 else
23880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23881 /* end confdefs.h. */
23882
23883 #include <errno.h>
23884 #include <pthread.h>
23885 #include <stdlib.h>
23886 #include <unistd.h>
23887
23888 #define SUCCEED() exit (0)
23889 #define FAILURE() exit (1)
23890 #define UNEXPECTED(n) (exit (10 + (n)))
23891
23892 /* The main thread creates the waiting writer and the requesting reader threads
23893 in the default way; this guarantees that they have the same priority.
23894 We can reuse the main thread as first reader thread. */
23895
23896 static pthread_rwlock_t lock;
23897 static pthread_t reader1;
23898 static pthread_t writer;
23899 static pthread_t reader2;
23900 static pthread_t timer;
23901 /* Used to pass control from writer to reader2 and from reader2 to timer,
23902 as in a relay race.
23903 Passing control from one running thread to another running thread
23904 is most likely faster than to create the second thread. */
23905 static pthread_mutex_t baton;
23906
23907 static void *
23908 timer_func (void *ignored)
23909 {
23910 /* Step 13 (can be before or after step 12):
23911 The timer thread takes the baton, then waits a moment to make sure
23912 it can tell whether the second reader thread is blocked at step 12. */
23913 if (pthread_mutex_lock (&baton))
23914 UNEXPECTED (13);
23915 usleep (100000);
23916 /* By the time we get here, it's clear that the second reader thread is
23917 blocked at step 12. This is the desired behaviour. */
23918 SUCCEED ();
23919 }
23920
23921 static void *
23922 reader2_func (void *ignored)
23923 {
23924 int err;
23925
23926 /* Step 8 (can be before or after step 7):
23927 The second reader thread takes the baton, then waits a moment to make sure
23928 the writer thread has reached step 7. */
23929 if (pthread_mutex_lock (&baton))
23930 UNEXPECTED (8);
23931 usleep (100000);
23932 /* Step 9: The second reader thread requests the lock. */
23933 err = pthread_rwlock_tryrdlock (&lock);
23934 if (err == 0)
23935 FAILURE ();
23936 else if (err != EBUSY)
23937 UNEXPECTED (9);
23938 /* Step 10: Launch a timer, to test whether the next call blocks. */
23939 if (pthread_create (&timer, NULL, timer_func, NULL))
23940 UNEXPECTED (10);
23941 /* Step 11: Release the baton. */
23942 if (pthread_mutex_unlock (&baton))
23943 UNEXPECTED (11);
23944 /* Step 12: The second reader thread requests the lock. */
23945 err = pthread_rwlock_rdlock (&lock);
23946 if (err == 0)
23947 FAILURE ();
23948 else
23949 UNEXPECTED (12);
23950 }
23951
23952 static void *
23953 writer_func (void *ignored)
23954 {
23955 /* Step 4: Take the baton, so that the second reader thread does not go ahead
23956 too early. */
23957 if (pthread_mutex_lock (&baton))
23958 UNEXPECTED (4);
23959 /* Step 5: Create the second reader thread. */
23960 if (pthread_create (&reader2, NULL, reader2_func, NULL))
23961 UNEXPECTED (5);
23962 /* Step 6: Release the baton. */
23963 if (pthread_mutex_unlock (&baton))
23964 UNEXPECTED (6);
23965 /* Step 7: The writer thread requests the lock. */
23966 if (pthread_rwlock_wrlock (&lock))
23967 UNEXPECTED (7);
23968 return NULL;
23969 }
23970
23971 int
23972 main ()
23973 {
23974 reader1 = pthread_self ();
23975
23976 /* Step 1: The main thread initializes the lock and the baton. */
23977 if (pthread_rwlock_init (&lock, NULL))
23978 UNEXPECTED (1);
23979 if (pthread_mutex_init (&baton, NULL))
23980 UNEXPECTED (1);
23981 /* Step 2: The main thread acquires the lock as a reader. */
23982 if (pthread_rwlock_rdlock (&lock))
23983 UNEXPECTED (2);
23984 /* Step 3: Create the writer thread. */
23985 if (pthread_create (&writer, NULL, writer_func, NULL))
23986 UNEXPECTED (3);
23987 /* Job done. Go to sleep. */
23988 for (;;)
23989 {
23990 sleep (1);
23991 }
23992 }
23993
23994 _ACEOF
23995 if ac_fn_c_try_run "$LINENO"; then :
23996 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
23997 else
23998 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
23999 fi
24000 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24001 conftest.$ac_objext conftest.beam conftest.$ac_ext
24002 fi
24003
24004 LIBS="$save_LIBS"
24005
24006 fi
24007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
24008 $as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
24009 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
24010 *yes)
24011
24012 $as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
24013
24014 ;;
24015 esac
24016
24017 fi
24018 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
24019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24020 /* end confdefs.h. */
24021
24022 #include <pthread.h>
24023 int
24024 main ()
24025 {
24026
24027 #if __FreeBSD__ == 4
24028 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
24029 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
24030 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
24031 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
24032 #else
24033 int x = (int)PTHREAD_MUTEX_RECURSIVE;
24034 return !x;
24035 #endif
24036
24037 ;
24038 return 0;
24039 }
24040 _ACEOF
24041 if ac_fn_c_try_compile "$LINENO"; then :
24042
24043 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
24044
24045 fi
24046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24047 fi
24048 :
24049
24050
24051
24052 cat >>confdefs.h <<_ACEOF
24053 #define GNULIB_LOCK 1
24054 _ACEOF
24055
24056
24057
24058
24059
24060
24061 if test $ac_cv_func_lstat = yes; then
24062
24063 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
24064 solaris* | *no)
24065 REPLACE_LSTAT=1
24066 ;;
24067 esac
24068 else
24069 HAVE_LSTAT=0
24070 fi
24071
24072 if test $REPLACE_LSTAT = 1; then
24073
24074
24075
24076
24077
24078
24079
24080
24081 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
24082
24083 :
24084 fi
24085
24086
24087
24088
24089
24090 GNULIB_LSTAT=1
24091
24092
24093
24094
24095
24096 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
24097
24098
24099
24100
24101
24102
24103 if test $gl_cv_func_malloc_posix = yes; then
24104
24105 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
24106
24107 else
24108 REPLACE_MALLOC=1
24109 fi
24110
24111 if test $REPLACE_MALLOC = 1; then
24112
24113
24114
24115
24116
24117
24118
24119
24120 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
24121
24122 fi
24123
24124
24125
24126
24127
24128 GNULIB_MALLOC_POSIX=1
24129
24130
24131
24132
24133
24134 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152 if test $gl_cv_have_include_next = yes; then
24153 gl_cv_next_math_h='<'math.h'>'
24154 else
24155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
24156 $as_echo_n "checking absolute name of <math.h>... " >&6; }
24157 if ${gl_cv_next_math_h+:} false; then :
24158 $as_echo_n "(cached) " >&6
24159 else
24160
24161 if test $ac_cv_header_math_h = yes; then
24162
24163
24164
24165
24166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24167 /* end confdefs.h. */
24168 #include <math.h>
24169 _ACEOF
24170 case "$host_os" in
24171 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24172 *) gl_absname_cpp="$ac_cpp" ;;
24173 esac
24174
24175 case "$host_os" in
24176 mingw*)
24177 gl_dirsep_regex='[/\\]'
24178 ;;
24179 *)
24180 gl_dirsep_regex='\/'
24181 ;;
24182 esac
24183 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24184 gl_header_literal_regex=`echo 'math.h' \
24185 | sed -e "$gl_make_literal_regex_sed"`
24186 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24187 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24188 s|^/[^/]|//&|
24189 p
24190 q
24191 }'
24192
24193 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24194 sed -n "$gl_absolute_header_sed"`
24195
24196 gl_header=$gl_cv_absolute_math_h
24197 gl_cv_next_math_h='"'$gl_header'"'
24198 else
24199 gl_cv_next_math_h='<'math.h'>'
24200 fi
24201
24202
24203 fi
24204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
24205 $as_echo "$gl_cv_next_math_h" >&6; }
24206 fi
24207 NEXT_MATH_H=$gl_cv_next_math_h
24208
24209 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24210 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24211 gl_next_as_first_directive='<'math.h'>'
24212 else
24213 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24214 gl_next_as_first_directive=$gl_cv_next_math_h
24215 fi
24216 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
24217
24218
24219
24220
24221
24222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
24223 $as_echo_n "checking whether NAN macro works... " >&6; }
24224 if ${gl_cv_header_math_nan_works+:} false; then :
24225 $as_echo_n "(cached) " >&6
24226 else
24227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24228 /* end confdefs.h. */
24229 #include <math.h>
24230 int
24231 main ()
24232 {
24233 /* Solaris 10 has a broken definition of NAN. Other platforms
24234 fail to provide NAN, or provide it only in C99 mode; this
24235 test only needs to fail when NAN is provided but wrong. */
24236 float f = 1.0f;
24237 #ifdef NAN
24238 f = NAN;
24239 #endif
24240 return f == 0;
24241 ;
24242 return 0;
24243 }
24244 _ACEOF
24245 if ac_fn_c_try_compile "$LINENO"; then :
24246 gl_cv_header_math_nan_works=yes
24247 else
24248 gl_cv_header_math_nan_works=no
24249 fi
24250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24251 fi
24252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
24253 $as_echo "$gl_cv_header_math_nan_works" >&6; }
24254 if test $gl_cv_header_math_nan_works = no; then
24255 REPLACE_NAN=1
24256 fi
24257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
24258 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
24259 if ${gl_cv_header_math_huge_val_works+:} false; then :
24260 $as_echo_n "(cached) " >&6
24261 else
24262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24263 /* end confdefs.h. */
24264 #include <math.h>
24265 int
24266 main ()
24267 {
24268 /* Solaris 10 has a broken definition of HUGE_VAL. */
24269 double d = HUGE_VAL;
24270 return d == 0;
24271 ;
24272 return 0;
24273 }
24274 _ACEOF
24275 if ac_fn_c_try_compile "$LINENO"; then :
24276 gl_cv_header_math_huge_val_works=yes
24277 else
24278 gl_cv_header_math_huge_val_works=no
24279 fi
24280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24281 fi
24282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
24283 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
24284 if test $gl_cv_header_math_huge_val_works = no; then
24285 REPLACE_HUGE_VAL=1
24286 fi
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305 if case "$host_os" in
24306 mingw*) true ;;
24307 *) test $ac_cv_func_mbsinit = yes ;;
24308 esac \
24309 && test $ac_cv_func_mbrtowc = yes; then
24310
24311
24312
24313
24314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24315 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24316 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24317 $as_echo_n "(cached) " >&6
24318 else
24319
24320 case "$host_os" in
24321 # Guess no on AIX and OSF/1.
24322 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24323 # Guess yes otherwise.
24324 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24325 esac
24326 if test $LOCALE_JA != none; then
24327 if test "$cross_compiling" = yes; then :
24328 :
24329 else
24330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24331 /* end confdefs.h. */
24332
24333 #include <locale.h>
24334 #include <string.h>
24335 #include <wchar.h>
24336 int main ()
24337 {
24338 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24339 {
24340 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24341 mbstate_t state;
24342 wchar_t wc;
24343
24344 memset (&state, '\0', sizeof (mbstate_t));
24345 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24346 if (mbsinit (&state))
24347 return 2;
24348 }
24349 return 0;
24350 }
24351 _ACEOF
24352 if ac_fn_c_try_run "$LINENO"; then :
24353 gl_cv_func_mbrtowc_incomplete_state=yes
24354 else
24355 gl_cv_func_mbrtowc_incomplete_state=no
24356 fi
24357 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24358 conftest.$ac_objext conftest.beam conftest.$ac_ext
24359 fi
24360
24361 else
24362 if test $LOCALE_FR_UTF8 != none; then
24363 if test "$cross_compiling" = yes; then :
24364 :
24365 else
24366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24367 /* end confdefs.h. */
24368
24369 #include <locale.h>
24370 #include <string.h>
24371 #include <wchar.h>
24372 int main ()
24373 {
24374 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24375 {
24376 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
24377 mbstate_t state;
24378 wchar_t wc;
24379
24380 memset (&state, '\0', sizeof (mbstate_t));
24381 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24382 if (mbsinit (&state))
24383 return 2;
24384 }
24385 return 0;
24386 }
24387 _ACEOF
24388 if ac_fn_c_try_run "$LINENO"; then :
24389 gl_cv_func_mbrtowc_incomplete_state=yes
24390 else
24391 gl_cv_func_mbrtowc_incomplete_state=no
24392 fi
24393 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24394 conftest.$ac_objext conftest.beam conftest.$ac_ext
24395 fi
24396
24397 fi
24398 fi
24399
24400 fi
24401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24402 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24403
24404
24405
24406
24407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24408 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
24409 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
24410 $as_echo_n "(cached) " >&6
24411 else
24412
24413 case "$host_os" in
24414 # Guess no on Solaris 8.
24415 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24416 # Guess yes otherwise.
24417 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24418 esac
24419 if test $LOCALE_ZH_CN != none; then
24420 if test "$cross_compiling" = yes; then :
24421 :
24422 else
24423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24424 /* end confdefs.h. */
24425
24426 #include <locale.h>
24427 #include <stdlib.h>
24428 #include <string.h>
24429 #include <wchar.h>
24430 int main ()
24431 {
24432 /* This fails on Solaris 8:
24433 mbrtowc returns 2, and sets wc to 0x00F0.
24434 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
24435 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24436 {
24437 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24438 mbstate_t state;
24439 wchar_t wc;
24440
24441 memset (&state, '\0', sizeof (mbstate_t));
24442 if (mbrtowc (&wc, input + 3, 6, &state) != 4
24443 && mbtowc (&wc, input + 3, 6) == 4)
24444 return 2;
24445 }
24446 return 0;
24447 }
24448 _ACEOF
24449 if ac_fn_c_try_run "$LINENO"; then :
24450 gl_cv_func_mbrtowc_sanitycheck=yes
24451 else
24452 gl_cv_func_mbrtowc_sanitycheck=no
24453 fi
24454 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24455 conftest.$ac_objext conftest.beam conftest.$ac_ext
24456 fi
24457
24458 fi
24459
24460 fi
24461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24462 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24463
24464 REPLACE_MBSTATE_T=0
24465 case "$gl_cv_func_mbrtowc_incomplete_state" in
24466 *yes) ;;
24467 *) REPLACE_MBSTATE_T=1 ;;
24468 esac
24469 case "$gl_cv_func_mbrtowc_sanitycheck" in
24470 *yes) ;;
24471 *) REPLACE_MBSTATE_T=1 ;;
24472 esac
24473 else
24474 REPLACE_MBSTATE_T=1
24475 fi
24476
24477
24478
24479 if test $ac_cv_func_mbrtowc = no; then
24480 HAVE_MBRTOWC=0
24481 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
24482 #include <wchar.h>
24483
24484 "
24485 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
24486 ac_have_decl=1
24487 else
24488 ac_have_decl=0
24489 fi
24490
24491 cat >>confdefs.h <<_ACEOF
24492 #define HAVE_DECL_MBRTOWC $ac_have_decl
24493 _ACEOF
24494
24495 if test $ac_cv_have_decl_mbrtowc = yes; then
24496 REPLACE_MBRTOWC=1
24497 fi
24498 else
24499 if test $REPLACE_MBSTATE_T = 1; then
24500 REPLACE_MBRTOWC=1
24501 else
24502
24503
24504
24505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
24506 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
24507 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
24508 $as_echo_n "(cached) " >&6
24509 else
24510
24511 case "$host_os" in
24512 # Guess no on Solaris.
24513 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
24514 # Guess yes otherwise.
24515 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
24516 esac
24517 if test $LOCALE_FR_UTF8 != none; then
24518 if test "$cross_compiling" = yes; then :
24519 :
24520 else
24521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24522 /* end confdefs.h. */
24523
24524 #include <locale.h>
24525 #include <stdlib.h>
24526 #include <string.h>
24527 #include <wchar.h>
24528 int main ()
24529 {
24530 int result = 0;
24531
24532 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24533 {
24534 char input[] = "\303\237er";
24535 mbstate_t state;
24536 wchar_t wc;
24537 size_t ret;
24538
24539 memset (&state, '\0', sizeof (mbstate_t));
24540 wc = (wchar_t) 0xBADFACE;
24541 ret = mbrtowc (&wc, input, 5, &state);
24542 if (ret != 2)
24543 result |= 1;
24544 if (!mbsinit (&state))
24545 result |= 2;
24546
24547 memset (&state, '\0', sizeof (mbstate_t));
24548 ret = mbrtowc (NULL, input, 5, &state);
24549 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
24550 result |= 4;
24551 if (!mbsinit (&state))
24552 result |= 8;
24553 }
24554 return result;
24555 }
24556 _ACEOF
24557 if ac_fn_c_try_run "$LINENO"; then :
24558 gl_cv_func_mbrtowc_null_arg1=yes
24559 else
24560 gl_cv_func_mbrtowc_null_arg1=no
24561 fi
24562 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24563 conftest.$ac_objext conftest.beam conftest.$ac_ext
24564 fi
24565
24566 fi
24567
24568 fi
24569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
24570 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
24571
24572
24573
24574
24575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
24576 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
24577 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
24578 $as_echo_n "(cached) " >&6
24579 else
24580
24581 case "$host_os" in
24582 # Guess no on OSF/1.
24583 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
24584 # Guess yes otherwise.
24585 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
24586 esac
24587 if test $LOCALE_FR_UTF8 != none; then
24588 if test "$cross_compiling" = yes; then :
24589 :
24590 else
24591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24592 /* end confdefs.h. */
24593
24594 #include <locale.h>
24595 #include <string.h>
24596 #include <wchar.h>
24597 int main ()
24598 {
24599 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24600 {
24601 mbstate_t state;
24602 wchar_t wc;
24603 int ret;
24604
24605 memset (&state, '\0', sizeof (mbstate_t));
24606 wc = (wchar_t) 0xBADFACE;
24607 mbrtowc (&wc, NULL, 5, &state);
24608 /* Check that wc was not modified. */
24609 if (wc != (wchar_t) 0xBADFACE)
24610 return 2;
24611 }
24612 return 0;
24613 }
24614 _ACEOF
24615 if ac_fn_c_try_run "$LINENO"; then :
24616 gl_cv_func_mbrtowc_null_arg2=yes
24617 else
24618 gl_cv_func_mbrtowc_null_arg2=no
24619 fi
24620 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24621 conftest.$ac_objext conftest.beam conftest.$ac_ext
24622 fi
24623
24624 fi
24625
24626 fi
24627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
24628 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
24629
24630
24631
24632
24633
24634
24635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
24636 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
24637 if ${gl_cv_func_mbrtowc_retval+:} false; then :
24638 $as_echo_n "(cached) " >&6
24639 else
24640
24641 case "$host_os" in
24642 # Guess no on HP-UX, Solaris, native Windows.
24643 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
24644 # Guess yes otherwise.
24645 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
24646 esac
24647 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
24648 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
24649 if test "$cross_compiling" = yes; then :
24650 :
24651 else
24652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24653 /* end confdefs.h. */
24654
24655 #include <locale.h>
24656 #include <string.h>
24657 #include <wchar.h>
24658 int main ()
24659 {
24660 int result = 0;
24661 int found_some_locale = 0;
24662 /* This fails on Solaris. */
24663 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24664 {
24665 char input[] = "B\303\274\303\237er"; /* "Büßer" */
24666 mbstate_t state;
24667 wchar_t wc;
24668
24669 memset (&state, '\0', sizeof (mbstate_t));
24670 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24671 {
24672 input[1] = '\0';
24673 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
24674 result |= 1;
24675 }
24676 found_some_locale = 1;
24677 }
24678 /* This fails on HP-UX 11.11. */
24679 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24680 {
24681 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24682 mbstate_t state;
24683 wchar_t wc;
24684
24685 memset (&state, '\0', sizeof (mbstate_t));
24686 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24687 {
24688 input[1] = '\0';
24689 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
24690 result |= 2;
24691 }
24692 found_some_locale = 1;
24693 }
24694 /* This fails on native Windows. */
24695 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
24696 {
24697 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
24698 mbstate_t state;
24699 wchar_t wc;
24700
24701 memset (&state, '\0', sizeof (mbstate_t));
24702 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24703 {
24704 input[3] = '\0';
24705 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24706 result |= 4;
24707 }
24708 found_some_locale = 1;
24709 }
24710 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
24711 {
24712 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
24713 mbstate_t state;
24714 wchar_t wc;
24715
24716 memset (&state, '\0', sizeof (mbstate_t));
24717 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24718 {
24719 input[3] = '\0';
24720 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24721 result |= 8;
24722 }
24723 found_some_locale = 1;
24724 }
24725 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
24726 {
24727 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
24728 mbstate_t state;
24729 wchar_t wc;
24730
24731 memset (&state, '\0', sizeof (mbstate_t));
24732 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24733 {
24734 input[3] = '\0';
24735 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24736 result |= 16;
24737 }
24738 found_some_locale = 1;
24739 }
24740 return (found_some_locale ? result : 77);
24741 }
24742 _ACEOF
24743 if ac_fn_c_try_run "$LINENO"; then :
24744 gl_cv_func_mbrtowc_retval=yes
24745 else
24746 if test $? != 77; then
24747 gl_cv_func_mbrtowc_retval=no
24748 fi
24749
24750 fi
24751 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24752 conftest.$ac_objext conftest.beam conftest.$ac_ext
24753 fi
24754
24755 fi
24756
24757 fi
24758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
24759 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
24760
24761
24762
24763
24764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
24765 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
24766 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
24767 $as_echo_n "(cached) " >&6
24768 else
24769
24770 case "$host_os" in
24771 # Guess no on Solaris 8 and 9.
24772 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
24773 # Guess yes otherwise.
24774 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
24775 esac
24776 if test $LOCALE_ZH_CN != none; then
24777 if test "$cross_compiling" = yes; then :
24778 :
24779 else
24780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24781 /* end confdefs.h. */
24782
24783 #include <locale.h>
24784 #include <string.h>
24785 #include <wchar.h>
24786 int main ()
24787 {
24788 /* This fails on Solaris 8 and 9. */
24789 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24790 {
24791 mbstate_t state;
24792 wchar_t wc;
24793
24794 memset (&state, '\0', sizeof (mbstate_t));
24795 if (mbrtowc (&wc, "", 1, &state) != 0)
24796 return 2;
24797 }
24798 return 0;
24799 }
24800 _ACEOF
24801 if ac_fn_c_try_run "$LINENO"; then :
24802 gl_cv_func_mbrtowc_nul_retval=yes
24803 else
24804 gl_cv_func_mbrtowc_nul_retval=no
24805 fi
24806 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24807 conftest.$ac_objext conftest.beam conftest.$ac_ext
24808 fi
24809
24810 fi
24811
24812 fi
24813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
24814 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
24815
24816
24817
24818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
24819 $as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; }
24820 if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then :
24821 $as_echo_n "(cached) " >&6
24822 else
24823
24824 case "$host_os" in
24825 # Guess yes on native Windows.
24826 mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
24827 *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
24828 esac
24829 case "$host_os" in
24830 mingw*)
24831 if test "$cross_compiling" = yes; then :
24832 :
24833 else
24834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24835 /* end confdefs.h. */
24836
24837 #include <locale.h>
24838 #include <string.h>
24839 #include <wchar.h>
24840 int main ()
24841 {
24842 int result = 0;
24843 if (setlocale (LC_ALL, "French_France.65001") != NULL)
24844 {
24845 wchar_t wc = (wchar_t) 0xBADFACE;
24846 mbstate_t state;
24847
24848 memset (&state, '\0', sizeof (mbstate_t));
24849 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
24850 && wc != (wchar_t) 0xBADFACE)
24851 result |= 1;
24852 }
24853 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
24854 {
24855 wchar_t wc = (wchar_t) 0xBADFACE;
24856 mbstate_t state;
24857
24858 memset (&state, '\0', sizeof (mbstate_t));
24859 if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
24860 && wc != (wchar_t) 0xBADFACE)
24861 result |= 2;
24862 }
24863 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
24864 {
24865 wchar_t wc = (wchar_t) 0xBADFACE;
24866 mbstate_t state;
24867
24868 memset (&state, '\0', sizeof (mbstate_t));
24869 if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
24870 && wc != (wchar_t) 0xBADFACE)
24871 result |= 4;
24872 }
24873 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
24874 {
24875 wchar_t wc = (wchar_t) 0xBADFACE;
24876 mbstate_t state;
24877
24878 memset (&state, '\0', sizeof (mbstate_t));
24879 if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
24880 && wc != (wchar_t) 0xBADFACE)
24881 result |= 8;
24882 }
24883 return result;
24884 }
24885 _ACEOF
24886 if ac_fn_c_try_run "$LINENO"; then :
24887 gl_cv_func_mbrtowc_stores_incomplete=no
24888 else
24889 gl_cv_func_mbrtowc_stores_incomplete=yes
24890 fi
24891 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24892 conftest.$ac_objext conftest.beam conftest.$ac_ext
24893 fi
24894
24895 ;;
24896 *)
24897
24898 if test $LOCALE_FR_UTF8 != none; then
24899 if test "$cross_compiling" = yes; then :
24900 :
24901 else
24902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24903 /* end confdefs.h. */
24904
24905 #include <locale.h>
24906 #include <string.h>
24907 #include <wchar.h>
24908 int main ()
24909 {
24910 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24911 {
24912 wchar_t wc = (wchar_t) 0xBADFACE;
24913 mbstate_t state;
24914
24915 memset (&state, '\0', sizeof (mbstate_t));
24916 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
24917 && wc != (wchar_t) 0xBADFACE)
24918 return 1;
24919 }
24920 return 0;
24921 }
24922 _ACEOF
24923 if ac_fn_c_try_run "$LINENO"; then :
24924 gl_cv_func_mbrtowc_stores_incomplete=no
24925 else
24926 gl_cv_func_mbrtowc_stores_incomplete=yes
24927 fi
24928 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24929 conftest.$ac_objext conftest.beam conftest.$ac_ext
24930 fi
24931
24932 fi
24933 ;;
24934 esac
24935
24936 fi
24937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
24938 $as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
24939
24940
24941
24942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
24943 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
24944 if ${gl_cv_func_mbrtowc_empty_input+:} false; then :
24945 $as_echo_n "(cached) " >&6
24946 else
24947
24948 case "$host_os" in
24949 # Guess no on AIX and glibc systems.
24950 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
24951 # Guess yes on native Windows.
24952 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
24953 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
24954 esac
24955 if test "$cross_compiling" = yes; then :
24956 :
24957 else
24958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24959 /* end confdefs.h. */
24960
24961 #include <wchar.h>
24962 static wchar_t wc;
24963 static mbstate_t mbs;
24964 int
24965 main (void)
24966 {
24967 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
24968 }
24969 _ACEOF
24970 if ac_fn_c_try_run "$LINENO"; then :
24971 gl_cv_func_mbrtowc_empty_input=yes
24972 else
24973 gl_cv_func_mbrtowc_empty_input=no
24974 fi
24975 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24976 conftest.$ac_objext conftest.beam conftest.$ac_ext
24977 fi
24978
24979
24980 fi
24981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
24982 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
24983
24984
24985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
24986 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
24987 if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then :
24988 $as_echo_n "(cached) " >&6
24989 else
24990
24991 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
24992
24993 if test "$cross_compiling" = yes; then :
24994 case "$host_os" in
24995 # Guess yes on native Windows.
24996 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
24997 esac
24998
24999 else
25000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25001 /* end confdefs.h. */
25002 #include <limits.h>
25003 #include <locale.h>
25004 #include <wchar.h>
25005
25006 int
25007 main ()
25008 {
25009
25010 int i;
25011 char *locale = setlocale (LC_ALL, "C");
25012 if (! locale)
25013 return 2;
25014 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
25015 {
25016 char c = i;
25017 wchar_t wc;
25018 mbstate_t mbs = { 0, };
25019 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
25020 if (1 < ss)
25021 return 3;
25022 }
25023 return 0;
25024
25025 ;
25026 return 0;
25027 }
25028 _ACEOF
25029 if ac_fn_c_try_run "$LINENO"; then :
25030 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
25031 else
25032 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
25033 fi
25034 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25035 conftest.$ac_objext conftest.beam conftest.$ac_ext
25036 fi
25037
25038
25039 fi
25040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
25041 $as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
25042
25043 case "$gl_cv_func_mbrtowc_null_arg1" in
25044 *yes) ;;
25045 *)
25046 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
25047
25048 REPLACE_MBRTOWC=1
25049 ;;
25050 esac
25051 case "$gl_cv_func_mbrtowc_null_arg2" in
25052 *yes) ;;
25053 *)
25054 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
25055
25056 REPLACE_MBRTOWC=1
25057 ;;
25058 esac
25059 case "$gl_cv_func_mbrtowc_retval" in
25060 *yes) ;;
25061 *)
25062 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
25063
25064 REPLACE_MBRTOWC=1
25065 ;;
25066 esac
25067 case "$gl_cv_func_mbrtowc_nul_retval" in
25068 *yes) ;;
25069 *)
25070 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
25071
25072 REPLACE_MBRTOWC=1
25073 ;;
25074 esac
25075 case "$gl_cv_func_mbrtowc_stores_incomplete" in
25076 *no) ;;
25077 *)
25078 $as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
25079
25080 REPLACE_MBRTOWC=1
25081 ;;
25082 esac
25083 case "$gl_cv_func_mbrtowc_empty_input" in
25084 *yes) ;;
25085 *)
25086 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
25087
25088 REPLACE_MBRTOWC=1
25089 ;;
25090 esac
25091 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
25092 *yes) ;;
25093 *)
25094 $as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
25095
25096 REPLACE_MBRTOWC=1
25097 ;;
25098 esac
25099 fi
25100 fi
25101 if test $REPLACE_MBSTATE_T = 1; then
25102 case "$host_os" in
25103 mingw*) LIB_MBRTOWC= ;;
25104 *)
25105
25106
25107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
25108 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
25109 if ${gl_cv_have_weak+:} false; then :
25110 $as_echo_n "(cached) " >&6
25111 else
25112 gl_cv_have_weak=no
25113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25114 /* end confdefs.h. */
25115 extern void xyzzy ();
25116 #pragma weak xyzzy
25117 int
25118 main ()
25119 {
25120 xyzzy();
25121 ;
25122 return 0;
25123 }
25124 _ACEOF
25125 if ac_fn_c_try_link "$LINENO"; then :
25126 gl_cv_have_weak=maybe
25127 fi
25128 rm -f core conftest.err conftest.$ac_objext \
25129 conftest$ac_exeext conftest.$ac_ext
25130 if test $gl_cv_have_weak = maybe; then
25131 if test "$cross_compiling" = yes; then :
25132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25133 /* end confdefs.h. */
25134 #ifdef __ELF__
25135 Extensible Linking Format
25136 #endif
25137
25138 _ACEOF
25139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25140 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
25141 gl_cv_have_weak="guessing yes"
25142 else
25143 gl_cv_have_weak="guessing no"
25144 fi
25145 rm -f conftest*
25146
25147
25148 else
25149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25150 /* end confdefs.h. */
25151
25152 #include <stdio.h>
25153 #pragma weak fputs
25154 int main ()
25155 {
25156 return (fputs == NULL);
25157 }
25158 _ACEOF
25159 if ac_fn_c_try_run "$LINENO"; then :
25160 gl_cv_have_weak=yes
25161 else
25162 gl_cv_have_weak=no
25163 fi
25164 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25165 conftest.$ac_objext conftest.beam conftest.$ac_ext
25166 fi
25167
25168 fi
25169 case " $LDFLAGS " in
25170 *" -static "*) gl_cv_have_weak=no ;;
25171 esac
25172 case "$gl_cv_have_weak" in
25173 *yes)
25174 case "$host_os" in
25175 freebsd* | dragonfly*)
25176 : > conftest1.c
25177 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
25178 cat <<EOF > conftest2.c
25179 #include <pthread.h>
25180 #pragma weak pthread_mutexattr_gettype
25181 int main ()
25182 {
25183 return (pthread_mutexattr_gettype != NULL);
25184 }
25185 EOF
25186 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
25187 || gl_cv_have_weak=no
25188 rm -f conftest1.c libempty.so conftest2.c conftest
25189 ;;
25190 esac
25191 ;;
25192 esac
25193
25194 fi
25195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
25196 $as_echo "$gl_cv_have_weak" >&6; }
25197 case "$gl_cv_have_weak" in
25198 *yes)
25199
25200 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
25201
25202 ;;
25203 esac
25204
25205 case "$gl_cv_have_weak" in
25206 *yes) LIB_MBRTOWC= ;;
25207 *) LIB_MBRTOWC="$LIBPTHREAD" ;;
25208 esac
25209 ;;
25210 esac
25211 else
25212 LIB_MBRTOWC=
25213 fi
25214
25215
25216 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
25217
25218
25219
25220
25221
25222
25223
25224
25225 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
25226
25227 if test $REPLACE_MBSTATE_T = 1; then
25228
25229
25230
25231
25232
25233
25234
25235
25236 gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246 gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
25247
25248
25249
25250
25251 CFLAG_VISIBILITY=
25252 HAVE_VISIBILITY=0
25253 if test -n "$GCC"; then
25254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
25255 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
25256 if ${gl_cv_cc_vis_werror+:} false; then :
25257 $as_echo_n "(cached) " >&6
25258 else
25259 gl_save_CFLAGS="$CFLAGS"
25260 CFLAGS="$CFLAGS -Werror"
25261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25262 /* end confdefs.h. */
25263
25264 int
25265 main ()
25266 {
25267
25268 ;
25269 return 0;
25270 }
25271 _ACEOF
25272 if ac_fn_c_try_compile "$LINENO"; then :
25273 gl_cv_cc_vis_werror=yes
25274 else
25275 gl_cv_cc_vis_werror=no
25276 fi
25277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25278 CFLAGS="$gl_save_CFLAGS"
25279
25280 fi
25281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
25282 $as_echo "$gl_cv_cc_vis_werror" >&6; }
25283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
25284 $as_echo_n "checking for simple visibility declarations... " >&6; }
25285 if ${gl_cv_cc_visibility+:} false; then :
25286 $as_echo_n "(cached) " >&6
25287 else
25288 gl_save_CFLAGS="$CFLAGS"
25289 CFLAGS="$CFLAGS -fvisibility=hidden"
25290 if test $gl_cv_cc_vis_werror = yes; then
25291 CFLAGS="$CFLAGS -Werror"
25292 fi
25293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25294 /* end confdefs.h. */
25295 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
25296 extern __attribute__((__visibility__("default"))) int exportedvar;
25297 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
25298 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
25299 void dummyfunc (void) {}
25300
25301 int
25302 main ()
25303 {
25304
25305 ;
25306 return 0;
25307 }
25308 _ACEOF
25309 if ac_fn_c_try_compile "$LINENO"; then :
25310 gl_cv_cc_visibility=yes
25311 else
25312 gl_cv_cc_visibility=no
25313 fi
25314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25315 CFLAGS="$gl_save_CFLAGS"
25316
25317 fi
25318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
25319 $as_echo "$gl_cv_cc_visibility" >&6; }
25320 if test $gl_cv_cc_visibility = yes; then
25321 CFLAG_VISIBILITY="-fvisibility=hidden"
25322 HAVE_VISIBILITY=1
25323 fi
25324 fi
25325
25326
25327
25328 cat >>confdefs.h <<_ACEOF
25329 #define HAVE_VISIBILITY $HAVE_VISIBILITY
25330 _ACEOF
25331
25332
25333
25334 fi
25335
25336
25337 :
25338
25339 fi
25340
25341
25342
25343
25344
25345 GNULIB_MBRTOWC=1
25346
25347
25348
25349
25350
25351 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367 if case "$host_os" in
25368 mingw*) true ;;
25369 *) test $ac_cv_func_mbsinit = yes ;;
25370 esac \
25371 && test $ac_cv_func_mbrtowc = yes; then
25372
25373
25374
25375
25376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
25377 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
25378 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
25379 $as_echo_n "(cached) " >&6
25380 else
25381
25382 case "$host_os" in
25383 # Guess no on AIX and OSF/1.
25384 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
25385 # Guess yes otherwise.
25386 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
25387 esac
25388 if test $LOCALE_JA != none; then
25389 if test "$cross_compiling" = yes; then :
25390 :
25391 else
25392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25393 /* end confdefs.h. */
25394
25395 #include <locale.h>
25396 #include <string.h>
25397 #include <wchar.h>
25398 int main ()
25399 {
25400 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25401 {
25402 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25403 mbstate_t state;
25404 wchar_t wc;
25405
25406 memset (&state, '\0', sizeof (mbstate_t));
25407 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25408 if (mbsinit (&state))
25409 return 2;
25410 }
25411 return 0;
25412 }
25413 _ACEOF
25414 if ac_fn_c_try_run "$LINENO"; then :
25415 gl_cv_func_mbrtowc_incomplete_state=yes
25416 else
25417 gl_cv_func_mbrtowc_incomplete_state=no
25418 fi
25419 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25420 conftest.$ac_objext conftest.beam conftest.$ac_ext
25421 fi
25422
25423 else
25424 if test $LOCALE_FR_UTF8 != none; then
25425 if test "$cross_compiling" = yes; then :
25426 :
25427 else
25428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25429 /* end confdefs.h. */
25430
25431 #include <locale.h>
25432 #include <string.h>
25433 #include <wchar.h>
25434 int main ()
25435 {
25436 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25437 {
25438 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
25439 mbstate_t state;
25440 wchar_t wc;
25441
25442 memset (&state, '\0', sizeof (mbstate_t));
25443 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25444 if (mbsinit (&state))
25445 return 2;
25446 }
25447 return 0;
25448 }
25449 _ACEOF
25450 if ac_fn_c_try_run "$LINENO"; then :
25451 gl_cv_func_mbrtowc_incomplete_state=yes
25452 else
25453 gl_cv_func_mbrtowc_incomplete_state=no
25454 fi
25455 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25456 conftest.$ac_objext conftest.beam conftest.$ac_ext
25457 fi
25458
25459 fi
25460 fi
25461
25462 fi
25463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25464 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25465
25466
25467
25468
25469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25470 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25471 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25472 $as_echo_n "(cached) " >&6
25473 else
25474
25475 case "$host_os" in
25476 # Guess no on Solaris 8.
25477 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
25478 # Guess yes otherwise.
25479 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
25480 esac
25481 if test $LOCALE_ZH_CN != none; then
25482 if test "$cross_compiling" = yes; then :
25483 :
25484 else
25485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25486 /* end confdefs.h. */
25487
25488 #include <locale.h>
25489 #include <stdlib.h>
25490 #include <string.h>
25491 #include <wchar.h>
25492 int main ()
25493 {
25494 /* This fails on Solaris 8:
25495 mbrtowc returns 2, and sets wc to 0x00F0.
25496 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
25497 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25498 {
25499 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25500 mbstate_t state;
25501 wchar_t wc;
25502
25503 memset (&state, '\0', sizeof (mbstate_t));
25504 if (mbrtowc (&wc, input + 3, 6, &state) != 4
25505 && mbtowc (&wc, input + 3, 6) == 4)
25506 return 2;
25507 }
25508 return 0;
25509 }
25510 _ACEOF
25511 if ac_fn_c_try_run "$LINENO"; then :
25512 gl_cv_func_mbrtowc_sanitycheck=yes
25513 else
25514 gl_cv_func_mbrtowc_sanitycheck=no
25515 fi
25516 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25517 conftest.$ac_objext conftest.beam conftest.$ac_ext
25518 fi
25519
25520 fi
25521
25522 fi
25523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25524 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25525
25526 REPLACE_MBSTATE_T=0
25527 case "$gl_cv_func_mbrtowc_incomplete_state" in
25528 *yes) ;;
25529 *) REPLACE_MBSTATE_T=1 ;;
25530 esac
25531 case "$gl_cv_func_mbrtowc_sanitycheck" in
25532 *yes) ;;
25533 *) REPLACE_MBSTATE_T=1 ;;
25534 esac
25535 else
25536 REPLACE_MBSTATE_T=1
25537 fi
25538
25539
25540
25541 if test $ac_cv_func_mbsinit = no; then
25542 HAVE_MBSINIT=0
25543 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
25544 #include <wchar.h>
25545
25546 "
25547 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
25548 ac_have_decl=1
25549 else
25550 ac_have_decl=0
25551 fi
25552
25553 cat >>confdefs.h <<_ACEOF
25554 #define HAVE_DECL_MBSINIT $ac_have_decl
25555 _ACEOF
25556
25557 if test $ac_cv_have_decl_mbsinit = yes; then
25558 REPLACE_MBSINIT=1
25559 fi
25560 else
25561 if test $REPLACE_MBSTATE_T = 1; then
25562 REPLACE_MBSINIT=1
25563 else
25564 case "$host_os" in
25565 mingw*) REPLACE_MBSINIT=1 ;;
25566 esac
25567 fi
25568 fi
25569
25570 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
25571
25572
25573
25574
25575
25576
25577
25578
25579 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
25580
25581
25582 :
25583
25584 fi
25585
25586
25587
25588
25589
25590 GNULIB_MBSINIT=1
25591
25592
25593
25594
25595
25596 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611 if case "$host_os" in
25612 mingw*) true ;;
25613 *) test $ac_cv_func_mbsinit = yes ;;
25614 esac \
25615 && test $ac_cv_func_mbrtowc = yes; then
25616
25617
25618
25619
25620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
25621 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
25622 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
25623 $as_echo_n "(cached) " >&6
25624 else
25625
25626 case "$host_os" in
25627 # Guess no on AIX and OSF/1.
25628 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
25629 # Guess yes otherwise.
25630 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
25631 esac
25632 if test $LOCALE_JA != none; then
25633 if test "$cross_compiling" = yes; then :
25634 :
25635 else
25636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25637 /* end confdefs.h. */
25638
25639 #include <locale.h>
25640 #include <string.h>
25641 #include <wchar.h>
25642 int main ()
25643 {
25644 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25645 {
25646 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25647 mbstate_t state;
25648 wchar_t wc;
25649
25650 memset (&state, '\0', sizeof (mbstate_t));
25651 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25652 if (mbsinit (&state))
25653 return 2;
25654 }
25655 return 0;
25656 }
25657 _ACEOF
25658 if ac_fn_c_try_run "$LINENO"; then :
25659 gl_cv_func_mbrtowc_incomplete_state=yes
25660 else
25661 gl_cv_func_mbrtowc_incomplete_state=no
25662 fi
25663 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25664 conftest.$ac_objext conftest.beam conftest.$ac_ext
25665 fi
25666
25667 else
25668 if test $LOCALE_FR_UTF8 != none; then
25669 if test "$cross_compiling" = yes; then :
25670 :
25671 else
25672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25673 /* end confdefs.h. */
25674
25675 #include <locale.h>
25676 #include <string.h>
25677 #include <wchar.h>
25678 int main ()
25679 {
25680 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25681 {
25682 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
25683 mbstate_t state;
25684 wchar_t wc;
25685
25686 memset (&state, '\0', sizeof (mbstate_t));
25687 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25688 if (mbsinit (&state))
25689 return 2;
25690 }
25691 return 0;
25692 }
25693 _ACEOF
25694 if ac_fn_c_try_run "$LINENO"; then :
25695 gl_cv_func_mbrtowc_incomplete_state=yes
25696 else
25697 gl_cv_func_mbrtowc_incomplete_state=no
25698 fi
25699 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25700 conftest.$ac_objext conftest.beam conftest.$ac_ext
25701 fi
25702
25703 fi
25704 fi
25705
25706 fi
25707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25708 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25709
25710
25711
25712
25713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25714 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25715 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
25716 $as_echo_n "(cached) " >&6
25717 else
25718
25719 case "$host_os" in
25720 # Guess no on Solaris 8.
25721 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
25722 # Guess yes otherwise.
25723 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
25724 esac
25725 if test $LOCALE_ZH_CN != none; then
25726 if test "$cross_compiling" = yes; then :
25727 :
25728 else
25729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25730 /* end confdefs.h. */
25731
25732 #include <locale.h>
25733 #include <stdlib.h>
25734 #include <string.h>
25735 #include <wchar.h>
25736 int main ()
25737 {
25738 /* This fails on Solaris 8:
25739 mbrtowc returns 2, and sets wc to 0x00F0.
25740 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
25741 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25742 {
25743 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25744 mbstate_t state;
25745 wchar_t wc;
25746
25747 memset (&state, '\0', sizeof (mbstate_t));
25748 if (mbrtowc (&wc, input + 3, 6, &state) != 4
25749 && mbtowc (&wc, input + 3, 6) == 4)
25750 return 2;
25751 }
25752 return 0;
25753 }
25754 _ACEOF
25755 if ac_fn_c_try_run "$LINENO"; then :
25756 gl_cv_func_mbrtowc_sanitycheck=yes
25757 else
25758 gl_cv_func_mbrtowc_sanitycheck=no
25759 fi
25760 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25761 conftest.$ac_objext conftest.beam conftest.$ac_ext
25762 fi
25763
25764 fi
25765
25766 fi
25767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25768 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25769
25770 REPLACE_MBSTATE_T=0
25771 case "$gl_cv_func_mbrtowc_incomplete_state" in
25772 *yes) ;;
25773 *) REPLACE_MBSTATE_T=1 ;;
25774 esac
25775 case "$gl_cv_func_mbrtowc_sanitycheck" in
25776 *yes) ;;
25777 *) REPLACE_MBSTATE_T=1 ;;
25778 esac
25779 else
25780 REPLACE_MBSTATE_T=1
25781 fi
25782
25783
25784
25785 if test $ac_cv_func_mbsrtowcs = no; then
25786 HAVE_MBSRTOWCS=0
25787 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
25788 #include <wchar.h>
25789
25790 "
25791 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
25792 ac_have_decl=1
25793 else
25794 ac_have_decl=0
25795 fi
25796
25797 cat >>confdefs.h <<_ACEOF
25798 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
25799 _ACEOF
25800
25801 if test $ac_cv_have_decl_mbsrtowcs = yes; then
25802 REPLACE_MBSRTOWCS=1
25803 fi
25804 else
25805 if test $REPLACE_MBSTATE_T = 1; then
25806 REPLACE_MBSRTOWCS=1
25807 else
25808
25809
25810
25811
25812
25813
25814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
25815 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
25816 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
25817 $as_echo_n "(cached) " >&6
25818 else
25819
25820 case "$host_os" in
25821 # Guess no on HP-UX, Solaris, mingw.
25822 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
25823 # Guess yes otherwise.
25824 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
25825 esac
25826 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
25827 if test "$cross_compiling" = yes; then :
25828 :
25829 else
25830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25831 /* end confdefs.h. */
25832
25833 #include <locale.h>
25834 #include <string.h>
25835 #include <wchar.h>
25836 int main ()
25837 {
25838 int result = 0;
25839 /* Test whether the function supports a NULL destination argument.
25840 This fails on native Windows. */
25841 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
25842 {
25843 const char input[] = "\337er";
25844 const char *src = input;
25845 mbstate_t state;
25846
25847 memset (&state, '\0', sizeof (mbstate_t));
25848 if (mbsrtowcs (NULL, &src, 1, &state) != 3
25849 || src != input)
25850 result |= 1;
25851 }
25852 /* Test whether the function works when started with a conversion state
25853 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
25854 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25855 {
25856 const char input[] = "B\303\274\303\237er";
25857 mbstate_t state;
25858
25859 memset (&state, '\0', sizeof (mbstate_t));
25860 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
25861 if (!mbsinit (&state))
25862 {
25863 const char *src = input + 2;
25864 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
25865 result |= 2;
25866 }
25867 }
25868 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25869 {
25870 const char input[] = "<\306\374\313\334\270\354>";
25871 mbstate_t state;
25872
25873 memset (&state, '\0', sizeof (mbstate_t));
25874 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
25875 if (!mbsinit (&state))
25876 {
25877 const char *src = input + 4;
25878 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
25879 result |= 4;
25880 }
25881 }
25882 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25883 {
25884 const char input[] = "B\250\271\201\060\211\070er";
25885 mbstate_t state;
25886
25887 memset (&state, '\0', sizeof (mbstate_t));
25888 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
25889 if (!mbsinit (&state))
25890 {
25891 const char *src = input + 2;
25892 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
25893 result |= 8;
25894 }
25895 }
25896 return result;
25897 }
25898 _ACEOF
25899 if ac_fn_c_try_run "$LINENO"; then :
25900 gl_cv_func_mbsrtowcs_works=yes
25901 else
25902 gl_cv_func_mbsrtowcs_works=no
25903 fi
25904 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25905 conftest.$ac_objext conftest.beam conftest.$ac_ext
25906 fi
25907
25908 fi
25909
25910 fi
25911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
25912 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
25913
25914 case "$gl_cv_func_mbsrtowcs_works" in
25915 *yes) ;;
25916 *) REPLACE_MBSRTOWCS=1 ;;
25917 esac
25918 fi
25919 fi
25920
25921 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
25922
25923
25924
25925
25926
25927
25928
25929
25930 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
25931
25932
25933
25934
25935
25936
25937
25938
25939
25940 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
25941
25942
25943 :
25944
25945 fi
25946
25947
25948
25949
25950
25951 GNULIB_MBSRTOWCS=1
25952
25953
25954
25955
25956
25957 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
25958
25959
25960
25961
25962
25963
25964 for ac_func in mbtowc
25965 do :
25966 ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
25967 if test "x$ac_cv_func_mbtowc" = xyes; then :
25968 cat >>confdefs.h <<_ACEOF
25969 #define HAVE_MBTOWC 1
25970 _ACEOF
25971
25972 fi
25973 done
25974
25975 if test $ac_cv_func_mbtowc = no; then
25976 HAVE_MBTOWC=0
25977 else
25978 if false; then
25979 REPLACE_MBTOWC=1
25980 fi
25981 fi
25982
25983 if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
25984
25985
25986
25987
25988
25989
25990
25991
25992 gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
25993
25994
25995 :
25996
25997 fi
25998
25999
26000
26001
26002
26003 GNULIB_MBTOWC=1
26004
26005
26006
26007
26008
26009 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
26010
26011
26012
26013
26014 if test $REPLACE_MEMCHR = 1; then
26015
26016
26017
26018
26019
26020
26021
26022
26023 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
26024
26025
26026 for ac_header in bp-sym.h
26027 do :
26028 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
26029 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
26030 cat >>confdefs.h <<_ACEOF
26031 #define HAVE_BP_SYM_H 1
26032 _ACEOF
26033
26034 fi
26035
26036 done
26037
26038
26039 fi
26040
26041
26042
26043
26044
26045 GNULIB_MEMCHR=1
26046
26047
26048
26049
26050
26051 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
26052
26053
26054
26055
26056
26057 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
26058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
26059 $as_echo_n "checking whether memmem works in linear time... " >&6; }
26060 if ${gl_cv_func_memmem_works_fast+:} false; then :
26061 $as_echo_n "(cached) " >&6
26062 else
26063 if test "$cross_compiling" = yes; then :
26064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26065 /* end confdefs.h. */
26066
26067 #include <features.h>
26068 #ifdef __GNU_LIBRARY__
26069 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
26070 && !defined __UCLIBC__
26071 Lucky user
26072 #endif
26073 #endif
26074 #ifdef __CYGWIN__
26075 #include <cygwin/version.h>
26076 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
26077 Lucky user
26078 #endif
26079 #endif
26080
26081 _ACEOF
26082 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26083 $EGREP "Lucky user" >/dev/null 2>&1; then :
26084 gl_cv_func_memmem_works_fast="guessing yes"
26085 else
26086 gl_cv_func_memmem_works_fast="$gl_cross_guess_normal"
26087 fi
26088 rm -f conftest*
26089
26090
26091 else
26092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26093 /* end confdefs.h. */
26094
26095 #include <signal.h> /* for signal */
26096 #include <string.h> /* for memmem */
26097 #include <stdlib.h> /* for malloc */
26098 #include <unistd.h> /* for alarm */
26099 static void quit (int sig) { _exit (sig + 128); }
26100
26101 int
26102 main ()
26103 {
26104
26105 int result = 0;
26106 size_t m = 1000000;
26107 char *haystack = (char *) malloc (2 * m + 1);
26108 char *needle = (char *) malloc (m + 1);
26109 /* Failure to compile this test due to missing alarm is okay,
26110 since all such platforms (mingw) also lack memmem. */
26111 signal (SIGALRM, quit);
26112 alarm (5);
26113 /* Check for quadratic performance. */
26114 if (haystack && needle)
26115 {
26116 memset (haystack, 'A', 2 * m);
26117 haystack[2 * m] = 'B';
26118 memset (needle, 'A', m);
26119 needle[m] = 'B';
26120 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
26121 result |= 1;
26122 }
26123 /* Free allocated memory, in case some sanitizer is watching. */
26124 free (haystack);
26125 free (needle);
26126 return result;
26127
26128 ;
26129 return 0;
26130 }
26131 _ACEOF
26132 if ac_fn_c_try_run "$LINENO"; then :
26133 gl_cv_func_memmem_works_fast=yes
26134 else
26135 gl_cv_func_memmem_works_fast=no
26136 fi
26137 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26138 conftest.$ac_objext conftest.beam conftest.$ac_ext
26139 fi
26140
26141
26142 fi
26143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
26144 $as_echo "$gl_cv_func_memmem_works_fast" >&6; }
26145 case "$gl_cv_func_memmem_works_fast" in
26146 *yes) ;;
26147 *)
26148 REPLACE_MEMMEM=1
26149 ;;
26150 esac
26151 fi
26152
26153 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
26154
26155
26156
26157
26158
26159
26160
26161
26162 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
26163
26164 fi
26165
26166
26167
26168
26169 for ac_func in memmem
26170 do :
26171 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
26172 if test "x$ac_cv_func_memmem" = xyes; then :
26173 cat >>confdefs.h <<_ACEOF
26174 #define HAVE_MEMMEM 1
26175 _ACEOF
26176
26177 fi
26178 done
26179
26180 if test $ac_cv_func_memmem = yes; then
26181 HAVE_MEMMEM=1
26182 else
26183 HAVE_MEMMEM=0
26184 fi
26185
26186 if test $ac_cv_have_decl_memmem = no; then
26187 HAVE_DECL_MEMMEM=0
26188 else
26189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
26190 $as_echo_n "checking whether memmem works... " >&6; }
26191 if ${gl_cv_func_memmem_works_always+:} false; then :
26192 $as_echo_n "(cached) " >&6
26193 else
26194 if test "$cross_compiling" = yes; then :
26195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26196 /* end confdefs.h. */
26197
26198 #ifdef __GNU_LIBRARY__
26199 #include <features.h>
26200 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
26201 || __GLIBC_MINOR__ > 12)) \
26202 || (__GLIBC__ > 2)) \
26203 || defined __UCLIBC__
26204 Lucky user
26205 #endif
26206 #elif defined __CYGWIN__
26207 #include <cygwin/version.h>
26208 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
26209 Lucky user
26210 #endif
26211 #else
26212 Lucky user
26213 #endif
26214
26215 _ACEOF
26216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26217 $EGREP "Lucky user" >/dev/null 2>&1; then :
26218 gl_cv_func_memmem_works_always="guessing yes"
26219 else
26220 gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
26221 fi
26222 rm -f conftest*
26223
26224
26225 else
26226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26227 /* end confdefs.h. */
26228
26229 #include <string.h> /* for memmem */
26230 #define P "_EF_BF_BD"
26231 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
26232 #define NEEDLE P P P P P
26233
26234 int
26235 main ()
26236 {
26237
26238 int result = 0;
26239 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
26240 result |= 1;
26241 /* Check for empty needle behavior. */
26242 {
26243 const char *haystack = "AAA";
26244 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
26245 result |= 2;
26246 }
26247 return result;
26248
26249 ;
26250 return 0;
26251 }
26252 _ACEOF
26253 if ac_fn_c_try_run "$LINENO"; then :
26254 gl_cv_func_memmem_works_always=yes
26255 else
26256 gl_cv_func_memmem_works_always=no
26257 fi
26258 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26259 conftest.$ac_objext conftest.beam conftest.$ac_ext
26260 fi
26261
26262
26263 fi
26264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
26265 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
26266 case "$gl_cv_func_memmem_works_always" in
26267 *yes) ;;
26268 *)
26269 REPLACE_MEMMEM=1
26270 ;;
26271 esac
26272 fi
26273 :
26274
26275 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
26276
26277
26278
26279
26280
26281
26282
26283
26284 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
26285
26286 fi
26287
26288
26289
26290
26291
26292 GNULIB_MEMMEM=1
26293
26294
26295
26296
26297
26298 $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
26299
26300
26301
26302
26303
26304
26305
26306
26307
26308 for ac_func in mempcpy
26309 do :
26310 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
26311 if test "x$ac_cv_func_mempcpy" = xyes; then :
26312 cat >>confdefs.h <<_ACEOF
26313 #define HAVE_MEMPCPY 1
26314 _ACEOF
26315
26316 fi
26317 done
26318
26319 if test $ac_cv_func_mempcpy = no; then
26320 HAVE_MEMPCPY=0
26321 fi
26322
26323 if test $HAVE_MEMPCPY = 0; then
26324
26325
26326
26327
26328
26329
26330
26331
26332 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
26333
26334
26335 :
26336
26337 fi
26338
26339
26340
26341
26342
26343 GNULIB_MEMPCPY=1
26344
26345
26346
26347
26348
26349 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
26350
26351
26352
26353
26354
26355
26356
26357
26358 if test $ac_cv_have_decl_memrchr = no; then
26359 HAVE_DECL_MEMRCHR=0
26360 fi
26361
26362 for ac_func in memrchr
26363 do :
26364 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
26365 if test "x$ac_cv_func_memrchr" = xyes; then :
26366 cat >>confdefs.h <<_ACEOF
26367 #define HAVE_MEMRCHR 1
26368 _ACEOF
26369
26370 fi
26371 done
26372
26373
26374 if test $ac_cv_func_memrchr = no; then
26375
26376
26377
26378
26379
26380
26381
26382
26383 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
26384
26385 :
26386 fi
26387
26388
26389
26390
26391
26392 GNULIB_MEMRCHR=1
26393
26394
26395
26396
26397
26398 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
26399
26400
26401
26402
26403
26404
26405
26406
26407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
26408 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
26409 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
26410 $as_echo_n "(cached) " >&6
26411 else
26412 rm -rf conftest.dir
26413 if test "$cross_compiling" = yes; then :
26414 case "$host_os" in
26415 # Guess yes on Linux systems.
26416 linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
26417 # Guess yes on glibc systems.
26418 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
26419 # Guess yes on MSVC, no on mingw.
26420 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26421 /* end confdefs.h. */
26422
26423 #ifdef _MSC_VER
26424 Known
26425 #endif
26426
26427 _ACEOF
26428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26429 $EGREP "Known" >/dev/null 2>&1; then :
26430 gl_cv_func_mkdir_trailing_slash_works="guessing yes"
26431 else
26432 gl_cv_func_mkdir_trailing_slash_works="guessing no"
26433 fi
26434 rm -f conftest*
26435
26436 ;;
26437 # If we don't know, obey --enable-cross-guesses.
26438 *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
26439 esac
26440
26441 else
26442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26443 /* end confdefs.h. */
26444
26445 #include <sys/types.h>
26446 #include <sys/stat.h>
26447
26448
26449 $gl_mda_defines
26450
26451 int
26452 main ()
26453 {
26454 return mkdir ("conftest.dir/", 0700);
26455 ;
26456 return 0;
26457 }
26458 _ACEOF
26459 if ac_fn_c_try_run "$LINENO"; then :
26460 gl_cv_func_mkdir_trailing_slash_works=yes
26461 else
26462 gl_cv_func_mkdir_trailing_slash_works=no
26463 fi
26464 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26465 conftest.$ac_objext conftest.beam conftest.$ac_ext
26466 fi
26467
26468 rm -rf conftest.dir
26469
26470 fi
26471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
26472 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
26473 case "$gl_cv_func_mkdir_trailing_slash_works" in
26474 *yes) ;;
26475 *)
26476 REPLACE_MKDIR=1
26477 ;;
26478 esac
26479
26480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
26481 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
26482 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
26483 $as_echo_n "(cached) " >&6
26484 else
26485 rm -rf conftest.dir
26486 if test "$cross_compiling" = yes; then :
26487 case "$host_os" in
26488 # Guess yes on glibc systems.
26489 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
26490 # Guess yes on musl systems.
26491 *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
26492 # Guess no on native Windows.
26493 mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
26494 # If we don't know, obey --enable-cross-guesses.
26495 *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
26496 esac
26497
26498 else
26499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26500 /* end confdefs.h. */
26501
26502 #include <sys/types.h>
26503 #include <sys/stat.h>
26504
26505
26506 $gl_mda_defines
26507
26508 int
26509 main ()
26510 {
26511 return !mkdir ("conftest.dir/./", 0700);
26512 ;
26513 return 0;
26514 }
26515 _ACEOF
26516 if ac_fn_c_try_run "$LINENO"; then :
26517 gl_cv_func_mkdir_trailing_dot_works=yes
26518 else
26519 gl_cv_func_mkdir_trailing_dot_works=no
26520 fi
26521 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26522 conftest.$ac_objext conftest.beam conftest.$ac_ext
26523 fi
26524
26525 rm -rf conftest.dir
26526
26527
26528 fi
26529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
26530 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
26531 case "$gl_cv_func_mkdir_trailing_dot_works" in
26532 *yes) ;;
26533 *)
26534 REPLACE_MKDIR=1
26535
26536 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
26537
26538 ;;
26539 esac
26540
26541 if test $REPLACE_MKDIR = 1; then
26542
26543
26544
26545
26546
26547
26548
26549
26550 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
26551
26552 fi
26553
26554
26555
26556
26557
26558 GNULIB_MKDIR=1
26559
26560
26561
26562
26563
26564 $as_echo "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
26565
26566
26567
26568
26569
26570 for ac_func in mkdtemp
26571 do :
26572 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
26573 if test "x$ac_cv_func_mkdtemp" = xyes; then :
26574 cat >>confdefs.h <<_ACEOF
26575 #define HAVE_MKDTEMP 1
26576 _ACEOF
26577
26578 fi
26579 done
26580
26581 if test $ac_cv_func_mkdtemp = no; then
26582 HAVE_MKDTEMP=0
26583 fi
26584
26585 if test $HAVE_MKDTEMP = 0; then
26586
26587
26588
26589
26590
26591
26592
26593
26594 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
26595
26596 :
26597
26598 fi
26599
26600
26601
26602
26603
26604 GNULIB_MKDTEMP=1
26605
26606
26607
26608
26609
26610 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620 if test $ac_cv_func_mkostemp != yes; then
26621 HAVE_MKOSTEMP=0
26622 fi
26623
26624 if test $HAVE_MKOSTEMP = 0; then
26625
26626
26627
26628
26629
26630
26631
26632
26633 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
26634
26635
26636
26637 fi
26638
26639
26640 cat >>confdefs.h <<_ACEOF
26641 #define GNULIB_MKOSTEMP 1
26642 _ACEOF
26643
26644
26645
26646
26647
26648
26649
26650 GNULIB_MKOSTEMP=1
26651
26652
26653
26654
26655
26656 $as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
26657
26658
26659
26660
26661 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26662
26663
26664
26665
26666
26667
26668
26669
26670 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
26671
26672 fi
26673
26674 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26675
26676
26677
26678
26679
26680
26681
26682
26683 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
26684
26685 fi
26686
26687
26688 cat >>confdefs.h <<_ACEOF
26689 #define GNULIB_MSVC_NOTHROW 1
26690 _ACEOF
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704
26705 if test $gl_cv_have_include_next = yes; then
26706 gl_cv_next_netdb_h='<'netdb.h'>'
26707 else
26708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
26709 $as_echo_n "checking absolute name of <netdb.h>... " >&6; }
26710 if ${gl_cv_next_netdb_h+:} false; then :
26711 $as_echo_n "(cached) " >&6
26712 else
26713
26714 if test $ac_cv_header_netdb_h = yes; then
26715
26716
26717
26718
26719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26720 /* end confdefs.h. */
26721 #include <netdb.h>
26722 _ACEOF
26723 case "$host_os" in
26724 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26725 *) gl_absname_cpp="$ac_cpp" ;;
26726 esac
26727
26728 case "$host_os" in
26729 mingw*)
26730 gl_dirsep_regex='[/\\]'
26731 ;;
26732 *)
26733 gl_dirsep_regex='\/'
26734 ;;
26735 esac
26736 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26737 gl_header_literal_regex=`echo 'netdb.h' \
26738 | sed -e "$gl_make_literal_regex_sed"`
26739 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26740 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26741 s|^/[^/]|//&|
26742 p
26743 q
26744 }'
26745
26746 gl_cv_absolute_netdb_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26747 sed -n "$gl_absolute_header_sed"`
26748
26749 gl_header=$gl_cv_absolute_netdb_h
26750 gl_cv_next_netdb_h='"'$gl_header'"'
26751 else
26752 gl_cv_next_netdb_h='<'netdb.h'>'
26753 fi
26754
26755
26756 fi
26757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
26758 $as_echo "$gl_cv_next_netdb_h" >&6; }
26759 fi
26760 NEXT_NETDB_H=$gl_cv_next_netdb_h
26761
26762 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26763 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26764 gl_next_as_first_directive='<'netdb.h'>'
26765 else
26766 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26767 gl_next_as_first_directive=$gl_cv_next_netdb_h
26768 fi
26769 NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
26770
26771
26772
26773
26774 if test $ac_cv_header_netdb_h = yes; then
26775 HAVE_NETDB_H=1
26776 else
26777 HAVE_NETDB_H=0
26778 fi
26779
26780
26781
26782
26783
26784
26785
26786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
26787 $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
26788 if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
26789 $as_echo_n "(cached) " >&6
26790 else
26791
26792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26793 /* end confdefs.h. */
26794 #include <netinet/in.h>
26795 int
26796 main ()
26797 {
26798
26799 ;
26800 return 0;
26801 }
26802 _ACEOF
26803 if ac_fn_c_try_compile "$LINENO"; then :
26804 gl_cv_header_netinet_in_h_selfcontained=yes
26805 else
26806 gl_cv_header_netinet_in_h_selfcontained=no
26807 fi
26808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26809
26810 fi
26811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
26812 $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
26813 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
26814 NETINET_IN_H=''
26815 else
26816 NETINET_IN_H='netinet/in.h'
26817 for ac_header in netinet/in.h
26818 do :
26819 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
26820 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
26821 cat >>confdefs.h <<_ACEOF
26822 #define HAVE_NETINET_IN_H 1
26823 _ACEOF
26824
26825 fi
26826
26827 done
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838 if test $gl_cv_have_include_next = yes; then
26839 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
26840 else
26841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
26842 $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
26843 if ${gl_cv_next_netinet_in_h+:} false; then :
26844 $as_echo_n "(cached) " >&6
26845 else
26846
26847 if test $ac_cv_header_netinet_in_h = yes; then
26848
26849
26850
26851
26852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26853 /* end confdefs.h. */
26854 #include <netinet/in.h>
26855 _ACEOF
26856 case "$host_os" in
26857 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26858 *) gl_absname_cpp="$ac_cpp" ;;
26859 esac
26860
26861 case "$host_os" in
26862 mingw*)
26863 gl_dirsep_regex='[/\\]'
26864 ;;
26865 *)
26866 gl_dirsep_regex='\/'
26867 ;;
26868 esac
26869 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26870 gl_header_literal_regex=`echo 'netinet/in.h' \
26871 | sed -e "$gl_make_literal_regex_sed"`
26872 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26873 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26874 s|^/[^/]|//&|
26875 p
26876 q
26877 }'
26878
26879 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26880 sed -n "$gl_absolute_header_sed"`
26881
26882 gl_header=$gl_cv_absolute_netinet_in_h
26883 gl_cv_next_netinet_in_h='"'$gl_header'"'
26884 else
26885 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
26886 fi
26887
26888
26889 fi
26890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
26891 $as_echo "$gl_cv_next_netinet_in_h" >&6; }
26892 fi
26893 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
26894
26895 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26896 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26897 gl_next_as_first_directive='<'netinet/in.h'>'
26898 else
26899 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26900 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
26901 fi
26902 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
26903
26904
26905
26906
26907 if test $ac_cv_header_netinet_in_h = yes; then
26908 HAVE_NETINET_IN_H=1
26909 else
26910 HAVE_NETINET_IN_H=0
26911 fi
26912
26913 fi
26914
26915 if test -n "$NETINET_IN_H"; then
26916 GL_GENERATE_NETINET_IN_H_TRUE=
26917 GL_GENERATE_NETINET_IN_H_FALSE='#'
26918 else
26919 GL_GENERATE_NETINET_IN_H_TRUE='#'
26920 GL_GENERATE_NETINET_IN_H_FALSE=
26921 fi
26922
26923
26924
26925
26926
26927
26928 case "$host_os" in
26929 mingw* | pw*)
26930 REPLACE_OPEN=1
26931 ;;
26932 *)
26933
26934 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
26935 REPLACE_OPEN=1
26936 fi
26937
26938
26939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
26940 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
26941 if ${gl_cv_func_open_slash+:} false; then :
26942 $as_echo_n "(cached) " >&6
26943 else
26944 # Assume that if we have lstat, we can also check symlinks.
26945 if test $ac_cv_func_lstat = yes; then
26946 touch conftest.tmp
26947 ln -s conftest.tmp conftest.lnk
26948 fi
26949 if test "$cross_compiling" = yes; then :
26950
26951 case "$host_os" in
26952 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
26953 gl_cv_func_open_slash="guessing no" ;;
26954 *)
26955 gl_cv_func_open_slash="guessing yes" ;;
26956 esac
26957
26958 else
26959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26960 /* end confdefs.h. */
26961
26962 #include <fcntl.h>
26963 #if HAVE_UNISTD_H
26964 # include <unistd.h>
26965 #endif
26966
26967
26968 $gl_mda_defines
26969
26970 int main ()
26971 {
26972 int result = 0;
26973 #if HAVE_LSTAT
26974 if (open ("conftest.lnk/", O_RDONLY) != -1)
26975 result |= 1;
26976 #endif
26977 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
26978 result |= 2;
26979 return result;
26980 }
26981 _ACEOF
26982 if ac_fn_c_try_run "$LINENO"; then :
26983 gl_cv_func_open_slash=yes
26984 else
26985 gl_cv_func_open_slash=no
26986 fi
26987 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26988 conftest.$ac_objext conftest.beam conftest.$ac_ext
26989 fi
26990
26991 rm -f conftest.sl conftest.tmp conftest.lnk
26992
26993 fi
26994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
26995 $as_echo "$gl_cv_func_open_slash" >&6; }
26996 case "$gl_cv_func_open_slash" in
26997 *no)
26998
26999 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
27000
27001 ;;
27002 esac
27003
27004 case "$gl_cv_func_open_slash" in
27005 *no)
27006 REPLACE_OPEN=1
27007 ;;
27008 esac
27009 ;;
27010 esac
27011
27012 if test $REPLACE_OPEN = 0; then
27013
27014
27015
27016 if test $ac_cv_func_fchdir = no; then
27017 HAVE_FCHDIR=0
27018 fi
27019
27020 if test $HAVE_FCHDIR = 0; then
27021 REPLACE_OPEN=1
27022 fi
27023 fi
27024
27025
27026
27027 if test $REPLACE_OPEN = 1; then
27028
27029
27030
27031
27032
27033
27034
27035
27036 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
27037
27038
27039
27040 :
27041
27042 fi
27043
27044
27045
27046
27047
27048 GNULIB_OPEN=1
27049
27050
27051
27052
27053
27054 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
27065 yes+*yes+yes)
27066 ;;
27067 yes+*)
27068 # Solaris 10 lacks O_CLOEXEC.
27069 # Solaris 9 has *at functions, but uniformly mishandles trailing
27070 # slash in all of them.
27071 REPLACE_OPENAT=1
27072 ;;
27073 *)
27074 HAVE_OPENAT=0
27075 ;;
27076 esac
27077
27078 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
27079
27080
27081
27082
27083
27084
27085
27086
27087 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
27088
27089
27090
27091 :
27092
27093 fi
27094
27095
27096 cat >>confdefs.h <<_ACEOF
27097 #define GNULIB_OPENAT 1
27098 _ACEOF
27099
27100
27101
27102
27103
27104
27105 GNULIB_OPENAT=1
27106
27107
27108
27109
27110
27111 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
27112
27113
27114
27115
27116
27117
27118 for ac_func in opendir
27119 do :
27120 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
27121 if test "x$ac_cv_func_opendir" = xyes; then :
27122 cat >>confdefs.h <<_ACEOF
27123 #define HAVE_OPENDIR 1
27124 _ACEOF
27125
27126 fi
27127 done
27128
27129 if test $ac_cv_func_opendir = no; then
27130 HAVE_OPENDIR=0
27131 fi
27132
27133
27134
27135
27136 if test $ac_cv_func_fchdir = no; then
27137 HAVE_FCHDIR=0
27138 fi
27139
27140 if test $HAVE_FCHDIR = 0; then
27141 if test $HAVE_OPENDIR = 1; then
27142 REPLACE_OPENDIR=1
27143 fi
27144 fi
27145
27146 case $host_os,$HAVE_OPENDIR in
27147 os2*,1)
27148 REPLACE_OPENDIR=1;;
27149 esac
27150
27151 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
27152
27153
27154
27155
27156
27157
27158
27159
27160 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
27161
27162 fi
27163
27164
27165
27166
27167
27168 GNULIB_OPENDIR=1
27169
27170
27171
27172
27173
27174 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185 if test $ac_cv_func_pipe != yes; then
27186 HAVE_PIPE=0
27187 fi
27188
27189 if test $HAVE_PIPE = 0; then
27190
27191
27192
27193
27194
27195
27196
27197
27198 gl_LIBOBJS="$gl_LIBOBJS pipe.$ac_objext"
27199
27200 fi
27201
27202
27203
27204
27205
27206 GNULIB_PIPE=1
27207
27208
27209
27210
27211
27212 $as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h
27213
27214
27215
27216
27217
27218
27219
27220 for ac_func in rawmemchr
27221 do :
27222 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
27223 if test "x$ac_cv_func_rawmemchr" = xyes; then :
27224 cat >>confdefs.h <<_ACEOF
27225 #define HAVE_RAWMEMCHR 1
27226 _ACEOF
27227
27228 fi
27229 done
27230
27231 if test $ac_cv_func_rawmemchr = no; then
27232 HAVE_RAWMEMCHR=0
27233 fi
27234
27235 if test $HAVE_RAWMEMCHR = 0; then
27236
27237
27238
27239
27240
27241
27242
27243
27244 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
27245
27246 :
27247 fi
27248
27249
27250
27251
27252
27253 GNULIB_RAWMEMCHR=1
27254
27255
27256
27257
27258
27259 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
27260
27261
27262
27263
27264
27265
27266 for ac_func in readdir
27267 do :
27268 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
27269 if test "x$ac_cv_func_readdir" = xyes; then :
27270 cat >>confdefs.h <<_ACEOF
27271 #define HAVE_READDIR 1
27272 _ACEOF
27273
27274 fi
27275 done
27276
27277 if test $ac_cv_func_readdir = no; then
27278 HAVE_READDIR=0
27279 fi
27280
27281 if test $HAVE_READDIR = 0; then
27282
27283
27284
27285
27286
27287
27288
27289
27290 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
27291
27292 fi
27293
27294
27295
27296
27297
27298 GNULIB_READDIR=1
27299
27300
27301
27302
27303
27304 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
27305
27306
27307
27308
27309
27310
27311 if test $ac_cv_func_readlink = no; then
27312 HAVE_READLINK=0
27313 else
27314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
27315 $as_echo_n "checking whether readlink signature is correct... " >&6; }
27316 if ${gl_cv_decl_readlink_works+:} false; then :
27317 $as_echo_n "(cached) " >&6
27318 else
27319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27320 /* end confdefs.h. */
27321 #include <unistd.h>
27322 /* Cause compilation failure if original declaration has wrong type. */
27323 ssize_t readlink (const char *, char *, size_t);
27324 int
27325 main ()
27326 {
27327
27328 ;
27329 return 0;
27330 }
27331 _ACEOF
27332 if ac_fn_c_try_compile "$LINENO"; then :
27333 gl_cv_decl_readlink_works=yes
27334 else
27335 gl_cv_decl_readlink_works=no
27336 fi
27337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27338 fi
27339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
27340 $as_echo "$gl_cv_decl_readlink_works" >&6; }
27341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
27342 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
27343 if ${gl_cv_func_readlink_trailing_slash+:} false; then :
27344 $as_echo_n "(cached) " >&6
27345 else
27346 # We have readlink, so assume ln -s works.
27347 ln -s conftest.no-such conftest.link
27348 ln -s conftest.link conftest.lnk2
27349 if test "$cross_compiling" = yes; then :
27350 case "$host_os" in
27351 # Guess yes on Linux or glibc systems.
27352 linux-* | linux | *-gnu* | gnu*)
27353 gl_cv_func_readlink_trailing_slash="guessing yes" ;;
27354 # Guess no on AIX or HP-UX.
27355 aix* | hpux*)
27356 gl_cv_func_readlink_trailing_slash="guessing no" ;;
27357 # If we don't know, obey --enable-cross-guesses.
27358 *)
27359 gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
27360 esac
27361
27362 else
27363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27364 /* end confdefs.h. */
27365 #include <unistd.h>
27366
27367 int
27368 main ()
27369 {
27370 char buf[20];
27371 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
27372 ;
27373 return 0;
27374 }
27375 _ACEOF
27376 if ac_fn_c_try_run "$LINENO"; then :
27377 gl_cv_func_readlink_trailing_slash=yes
27378 else
27379 gl_cv_func_readlink_trailing_slash=no
27380 fi
27381 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27382 conftest.$ac_objext conftest.beam conftest.$ac_ext
27383 fi
27384
27385 rm -f conftest.link conftest.lnk2
27386 fi
27387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
27388 $as_echo "$gl_cv_func_readlink_trailing_slash" >&6; }
27389 case "$gl_cv_func_readlink_trailing_slash" in
27390 *yes)
27391 if test "$gl_cv_decl_readlink_works" != yes; then
27392 REPLACE_READLINK=1
27393 fi
27394 ;;
27395 *)
27396
27397 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
27398
27399 REPLACE_READLINK=1
27400 ;;
27401 esac
27402
27403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
27404 $as_echo_n "checking whether readlink truncates results correctly... " >&6; }
27405 if ${gl_cv_func_readlink_truncate+:} false; then :
27406 $as_echo_n "(cached) " >&6
27407 else
27408 # We have readlink, so assume ln -s works.
27409 ln -s ab conftest.link
27410 if test "$cross_compiling" = yes; then :
27411 case "$host_os" in
27412 # Guess yes on Linux or glibc systems.
27413 linux-* | linux | *-gnu* | gnu*)
27414 gl_cv_func_readlink_truncate="guessing yes" ;;
27415 # Guess no on AIX or HP-UX.
27416 aix* | hpux*)
27417 gl_cv_func_readlink_truncate="guessing no" ;;
27418 # If we don't know, obey --enable-cross-guesses.
27419 *)
27420 gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
27421 esac
27422
27423 else
27424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27425 /* end confdefs.h. */
27426 #include <unistd.h>
27427
27428 int
27429 main ()
27430 {
27431 char c;
27432 return readlink ("conftest.link", &c, 1) != 1;
27433 ;
27434 return 0;
27435 }
27436 _ACEOF
27437 if ac_fn_c_try_run "$LINENO"; then :
27438 gl_cv_func_readlink_truncate=yes
27439 else
27440 gl_cv_func_readlink_truncate=no
27441 fi
27442 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27443 conftest.$ac_objext conftest.beam conftest.$ac_ext
27444 fi
27445
27446 rm -f conftest.link conftest.lnk2
27447 fi
27448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
27449 $as_echo "$gl_cv_func_readlink_truncate" >&6; }
27450 case $gl_cv_func_readlink_truncate in
27451 *yes)
27452 if test "$gl_cv_decl_readlink_works" != yes; then
27453 REPLACE_READLINK=1
27454 fi
27455 ;;
27456 *)
27457
27458 $as_echo "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
27459
27460 REPLACE_READLINK=1
27461 ;;
27462 esac
27463 fi
27464
27465 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
27466
27467
27468
27469
27470
27471
27472
27473
27474 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
27475
27476
27477 :
27478
27479 fi
27480
27481
27482
27483
27484
27485 GNULIB_READLINK=1
27486
27487
27488
27489
27490
27491 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
27492
27493
27494
27495
27496
27497
27498 if test $gl_cv_func_malloc_posix = yes; then
27499
27500 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
27501
27502 else
27503 REPLACE_REALLOC=1
27504 fi
27505
27506 if test $REPLACE_REALLOC = 1; then
27507
27508
27509
27510
27511
27512
27513
27514
27515 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
27516
27517 fi
27518
27519
27520
27521
27522
27523 GNULIB_REALLOC_POSIX=1
27524
27525
27526
27527
27528
27529 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
27530
27531
27532
27533
27534
27535
27536
27537
27538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
27539 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
27540 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
27541 $as_echo_n "(cached) " >&6
27542 else
27543 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27544 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
27545 as_fn_error $? "cannot create temporary files" "$LINENO" 5
27546 # Assume that if we have lstat, we can also check symlinks.
27547 if test $ac_cv_func_lstat = yes; then
27548 ln -s conftest.f conftest.lnk
27549 fi
27550 if test "$cross_compiling" = yes; then :
27551 case "$host_os" in
27552 # Guess yes on Linux systems.
27553 linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
27554 # Guess yes on glibc systems.
27555 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
27556 # Guess no on native Windows.
27557 mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
27558 # If we don't know, obey --enable-cross-guesses.
27559 *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
27560 esac
27561
27562 else
27563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27564 /* end confdefs.h. */
27565
27566 # include <stdio.h>
27567 # include <stdlib.h>
27568
27569 int
27570 main ()
27571 {
27572 int result = 0;
27573 if (rename ("conftest.f1", "conftest.f2/") == 0)
27574 result |= 1;
27575 if (rename ("conftest.d1", "conftest.d2/") != 0)
27576 result |= 2;
27577 #if HAVE_LSTAT
27578 if (rename ("conftest.f", "conftest.lnk/") == 0)
27579 result |= 4;
27580 #endif
27581 return result;
27582
27583 ;
27584 return 0;
27585 }
27586 _ACEOF
27587 if ac_fn_c_try_run "$LINENO"; then :
27588 gl_cv_func_rename_slash_dst_works=yes
27589 else
27590 gl_cv_func_rename_slash_dst_works=no
27591 fi
27592 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27593 conftest.$ac_objext conftest.beam conftest.$ac_ext
27594 fi
27595
27596 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27597
27598 fi
27599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
27600 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
27601 case "$gl_cv_func_rename_slash_dst_works" in
27602 *yes) ;;
27603 *)
27604 REPLACE_RENAME=1
27605
27606 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
27607
27608 ;;
27609 esac
27610
27611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
27612 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
27613 if ${gl_cv_func_rename_slash_src_works+:} false; then :
27614 $as_echo_n "(cached) " >&6
27615 else
27616 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27617 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
27618 as_fn_error $? "cannot create temporary files" "$LINENO" 5
27619 # Assume that if we have lstat, we can also check symlinks.
27620 if test $ac_cv_func_lstat = yes; then
27621 ln -s conftest.f conftest.lnk
27622 fi
27623 if test "$cross_compiling" = yes; then :
27624 case "$host_os" in
27625 # Guess yes on Linux systems.
27626 linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
27627 # Guess yes on glibc systems.
27628 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
27629 # Guess yes on native Windows.
27630 mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
27631 # If we don't know, obey --enable-cross-guesses.
27632 *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
27633 esac
27634
27635 else
27636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27637 /* end confdefs.h. */
27638
27639 # include <stdio.h>
27640 # include <stdlib.h>
27641
27642 int
27643 main ()
27644 {
27645 int result = 0;
27646 if (rename ("conftest.f1/", "conftest.d3") == 0)
27647 result |= 1;
27648 if (rename ("conftest.d1/", "conftest.d2") != 0)
27649 result |= 2;
27650 #if HAVE_LSTAT
27651 if (rename ("conftest.lnk/", "conftest.f") == 0)
27652 result |= 4;
27653 #endif
27654 return result;
27655
27656 ;
27657 return 0;
27658 }
27659 _ACEOF
27660 if ac_fn_c_try_run "$LINENO"; then :
27661 gl_cv_func_rename_slash_src_works=yes
27662 else
27663 gl_cv_func_rename_slash_src_works=no
27664 fi
27665 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27666 conftest.$ac_objext conftest.beam conftest.$ac_ext
27667 fi
27668
27669 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27670
27671 fi
27672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
27673 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
27674 case "$gl_cv_func_rename_slash_src_works" in
27675 *yes) ;;
27676 *)
27677 REPLACE_RENAME=1
27678
27679 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
27680
27681 ;;
27682 esac
27683
27684
27685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
27686 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
27687 if ${gl_cv_func_rename_link_works+:} false; then :
27688 $as_echo_n "(cached) " >&6
27689 else
27690 if test $ac_cv_func_link = yes; then
27691 if test $cross_compiling != yes; then
27692 rm -rf conftest.f conftest.f1 conftest.f2
27693 if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 &&
27694 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
27695 if test "$cross_compiling" = yes; then :
27696 :
27697
27698 else
27699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27700 /* end confdefs.h. */
27701
27702 # include <errno.h>
27703 # include <stdio.h>
27704 # include <stdlib.h>
27705 # include <unistd.h>
27706
27707
27708 $gl_mda_defines
27709
27710 int
27711 main ()
27712 {
27713 int result = 0;
27714 if (rename ("conftest.f", "conftest.f1"))
27715 result |= 1;
27716 if (unlink ("conftest.f1"))
27717 result |= 2;
27718
27719 /* Allow either the POSIX-required behavior, where the
27720 previous rename kept conftest.f, or the (better) NetBSD
27721 behavior, where it removed conftest.f. */
27722 if (rename ("conftest.f", "conftest.f") != 0
27723 && errno != ENOENT)
27724 result |= 4;
27725
27726 if (rename ("conftest.f1", "conftest.f1") == 0)
27727 result |= 8;
27728 if (rename ("conftest.f2", "conftest.f2") != 0)
27729 result |= 16;
27730 return result;
27731
27732 ;
27733 return 0;
27734 }
27735 _ACEOF
27736 if ac_fn_c_try_run "$LINENO"; then :
27737 gl_cv_func_rename_link_works=yes
27738 else
27739 gl_cv_func_rename_link_works=no
27740 fi
27741 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27742 conftest.$ac_objext conftest.beam conftest.$ac_ext
27743 fi
27744
27745 else
27746 gl_cv_func_rename_link_works="guessing no"
27747 fi
27748 rm -rf conftest.f conftest.f1 conftest.f2
27749 else
27750 case "$host_os" in
27751 # Guess yes on Linux systems.
27752 linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
27753 # Guess yes on glibc systems.
27754 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
27755 # Guess yes on native Windows.
27756 mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
27757 # If we don't know, obey --enable-cross-guesses.
27758 *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
27759 esac
27760 fi
27761 else
27762 gl_cv_func_rename_link_works=yes
27763 fi
27764
27765 fi
27766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
27767 $as_echo "$gl_cv_func_rename_link_works" >&6; }
27768 case "$gl_cv_func_rename_link_works" in
27769 *yes) ;;
27770 *)
27771 REPLACE_RENAME=1
27772
27773 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
27774
27775 ;;
27776 esac
27777
27778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
27779 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
27780 if ${gl_cv_func_rename_dest_works+:} false; then :
27781 $as_echo_n "(cached) " >&6
27782 else
27783 rm -rf conftest.f conftest.d1 conftest.d2
27784 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
27785 as_fn_error $? "cannot create temporary files" "$LINENO" 5
27786 if test "$cross_compiling" = yes; then :
27787 case "$host_os" in
27788 # Guess yes on Linux systems.
27789 linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
27790 # Guess yes on glibc systems.
27791 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
27792 # Guess no on native Windows.
27793 mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
27794 # If we don't know, obey --enable-cross-guesses.
27795 *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
27796 esac
27797
27798 else
27799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27800 /* end confdefs.h. */
27801
27802 # include <stdio.h>
27803 # include <stdlib.h>
27804
27805 int
27806 main ()
27807 {
27808 int result = 0;
27809 if (rename ("conftest.d1", "conftest.d2") != 0)
27810 result |= 1;
27811 if (rename ("conftest.d2", "conftest.f") == 0)
27812 result |= 2;
27813 return result;
27814
27815 ;
27816 return 0;
27817 }
27818 _ACEOF
27819 if ac_fn_c_try_run "$LINENO"; then :
27820 gl_cv_func_rename_dest_works=yes
27821 else
27822 gl_cv_func_rename_dest_works=no
27823 fi
27824 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27825 conftest.$ac_objext conftest.beam conftest.$ac_ext
27826 fi
27827
27828 rm -rf conftest.f conftest.d1 conftest.d2
27829
27830 fi
27831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
27832 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
27833 case "$gl_cv_func_rename_dest_works" in
27834 *yes) ;;
27835 *)
27836 REPLACE_RENAME=1
27837
27838 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
27839
27840 ;;
27841 esac
27842
27843 if test $REPLACE_RENAME = 1; then
27844
27845
27846
27847
27848
27849
27850
27851
27852 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
27853
27854 fi
27855
27856
27857
27858
27859
27860 GNULIB_RENAME=1
27861
27862
27863
27864
27865
27866 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
27867
27868
27869
27870
27871
27872
27873 for ac_func in rewinddir
27874 do :
27875 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
27876 if test "x$ac_cv_func_rewinddir" = xyes; then :
27877 cat >>confdefs.h <<_ACEOF
27878 #define HAVE_REWINDDIR 1
27879 _ACEOF
27880
27881 fi
27882 done
27883
27884 if test $ac_cv_func_rewinddir = no; then
27885 HAVE_REWINDDIR=0
27886 fi
27887
27888 if test $HAVE_REWINDDIR = 0; then
27889
27890
27891
27892
27893
27894
27895
27896
27897 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
27898
27899 fi
27900
27901
27902
27903
27904
27905 GNULIB_REWINDDIR=1
27906
27907
27908
27909
27910
27911 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
27912
27913
27914
27915
27916
27917
27918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
27919 $as_echo_n "checking whether rmdir works... " >&6; }
27920 if ${gl_cv_func_rmdir_works+:} false; then :
27921 $as_echo_n "(cached) " >&6
27922 else
27923 mkdir conftest.dir
27924 touch conftest.file
27925 if test "$cross_compiling" = yes; then :
27926 case "$host_os" in
27927 # Guess yes on Linux systems.
27928 linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
27929 # Guess yes on glibc systems.
27930 *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
27931 # Guess no on native Windows.
27932 mingw*) gl_cv_func_rmdir_works="guessing no" ;;
27933 # If we don't know, obey --enable-cross-guesses.
27934 *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
27935 esac
27936
27937 else
27938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27939 /* end confdefs.h. */
27940 #include <stdio.h>
27941 #include <errno.h>
27942 #if HAVE_UNISTD_H
27943 # include <unistd.h>
27944 #else /* on Windows with MSVC */
27945 # include <direct.h>
27946 #endif
27947
27948
27949 $gl_mda_defines
27950
27951 int
27952 main ()
27953 {
27954 int result = 0;
27955 if (!rmdir ("conftest.file/"))
27956 result |= 1;
27957 else if (errno != ENOTDIR)
27958 result |= 2;
27959 if (!rmdir ("conftest.dir/./"))
27960 result |= 4;
27961 return result;
27962
27963 ;
27964 return 0;
27965 }
27966 _ACEOF
27967 if ac_fn_c_try_run "$LINENO"; then :
27968 gl_cv_func_rmdir_works=yes
27969 else
27970 gl_cv_func_rmdir_works=no
27971 fi
27972 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27973 conftest.$ac_objext conftest.beam conftest.$ac_ext
27974 fi
27975
27976 rm -rf conftest.dir conftest.file
27977 fi
27978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
27979 $as_echo "$gl_cv_func_rmdir_works" >&6; }
27980 case "$gl_cv_func_rmdir_works" in
27981 *yes) ;;
27982 *)
27983 REPLACE_RMDIR=1
27984 ;;
27985 esac
27986
27987 if test $REPLACE_RMDIR = 1; then
27988
27989
27990
27991
27992
27993
27994
27995
27996 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
27997
27998 fi
27999
28000
28001
28002
28003
28004 GNULIB_RMDIR=1
28005
28006
28007
28008
28009
28010 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
28011
28012
28013
28014
28015
28016
28017
28018
28019
28020
28021 if test "$ac_cv_header_winsock2_h" = yes; then
28022 REPLACE_SELECT=1
28023 else
28024
28025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
28026 $as_echo_n "checking whether select supports a 0 argument... " >&6; }
28027 if ${gl_cv_func_select_supports0+:} false; then :
28028 $as_echo_n "(cached) " >&6
28029 else
28030
28031 if test "$cross_compiling" = yes; then :
28032
28033 case "$host_os" in
28034 # Guess no on Interix.
28035 interix*) gl_cv_func_select_supports0="guessing no";;
28036 # Guess yes otherwise.
28037 *) gl_cv_func_select_supports0="guessing yes";;
28038 esac
28039
28040 else
28041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28042 /* end confdefs.h. */
28043
28044 #include <sys/types.h>
28045 #include <sys/time.h>
28046 #if HAVE_SYS_SELECT_H
28047 #include <sys/select.h>
28048 #endif
28049 int main ()
28050 {
28051 struct timeval timeout;
28052 timeout.tv_sec = 0;
28053 timeout.tv_usec = 5;
28054 return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
28055 }
28056 _ACEOF
28057 if ac_fn_c_try_run "$LINENO"; then :
28058 gl_cv_func_select_supports0=yes
28059 else
28060 gl_cv_func_select_supports0=no
28061 fi
28062 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28063 conftest.$ac_objext conftest.beam conftest.$ac_ext
28064 fi
28065
28066
28067 fi
28068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
28069 $as_echo "$gl_cv_func_select_supports0" >&6; }
28070 case "$gl_cv_func_select_supports0" in
28071 *yes) ;;
28072 *) REPLACE_SELECT=1 ;;
28073 esac
28074
28075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
28076 $as_echo_n "checking whether select detects invalid fds... " >&6; }
28077 if ${gl_cv_func_select_detects_ebadf+:} false; then :
28078 $as_echo_n "(cached) " >&6
28079 else
28080
28081 if test "$cross_compiling" = yes; then :
28082
28083 case "$host_os" in
28084 # Guess yes on Linux systems.
28085 linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
28086 # Guess yes on glibc systems.
28087 *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
28088 # If we don't know, obey --enable-cross-guesses.
28089 *) gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
28090 esac
28091
28092 else
28093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28094 /* end confdefs.h. */
28095
28096 #include <sys/types.h>
28097 #include <sys/time.h>
28098 #if HAVE_SYS_SELECT_H
28099 # include <sys/select.h>
28100 #endif
28101 #include <unistd.h>
28102 #include <errno.h>
28103
28104
28105 $gl_mda_defines
28106
28107 int
28108 main ()
28109 {
28110
28111 fd_set set;
28112 dup2(0, 16);
28113 FD_ZERO(&set);
28114 FD_SET(16, &set);
28115 close(16);
28116 struct timeval timeout;
28117 timeout.tv_sec = 0;
28118 timeout.tv_usec = 5;
28119 return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
28120
28121 ;
28122 return 0;
28123 }
28124 _ACEOF
28125 if ac_fn_c_try_run "$LINENO"; then :
28126 gl_cv_func_select_detects_ebadf=yes
28127 else
28128 gl_cv_func_select_detects_ebadf=no
28129 fi
28130 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28131 conftest.$ac_objext conftest.beam conftest.$ac_ext
28132 fi
28133
28134
28135 fi
28136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
28137 $as_echo "$gl_cv_func_select_detects_ebadf" >&6; }
28138 case $gl_cv_func_select_detects_ebadf in
28139 *yes) ;;
28140 *) REPLACE_SELECT=1 ;;
28141 esac
28142 fi
28143
28144 LIB_SELECT="$LIBSOCKET"
28145 if test $REPLACE_SELECT = 1; then
28146 case "$host_os" in
28147 mingw*)
28148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28149 /* end confdefs.h. */
28150
28151 #define WIN32_LEAN_AND_MEAN
28152 #include <windows.h>
28153 int
28154 main ()
28155 {
28156 MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
28157 return 0;
28158 }
28159 _ACEOF
28160 if ac_fn_c_try_link "$LINENO"; then :
28161
28162 else
28163 LIB_SELECT="$LIB_SELECT -luser32"
28164 fi
28165 rm -f core conftest.err conftest.$ac_objext \
28166 conftest$ac_exeext conftest.$ac_ext
28167 ;;
28168 esac
28169 fi
28170
28171
28172 if test $REPLACE_SELECT = 1; then
28173
28174
28175
28176
28177
28178
28179
28180
28181 gl_LIBOBJS="$gl_LIBOBJS select.$ac_objext"
28182
28183 fi
28184
28185
28186
28187
28188
28189 GNULIB_SELECT=1
28190
28191
28192
28193
28194
28195 $as_echo "#define GNULIB_TEST_SELECT 1" >>confdefs.h
28196
28197
28198
28199
28200
28201 if test $ac_cv_func_setenv = no; then
28202 HAVE_SETENV=0
28203 else
28204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
28205 $as_echo_n "checking whether setenv validates arguments... " >&6; }
28206 if ${gl_cv_func_setenv_works+:} false; then :
28207 $as_echo_n "(cached) " >&6
28208 else
28209 if test "$cross_compiling" = yes; then :
28210 case "$host_os" in
28211 # Guess yes on glibc systems.
28212 *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
28213 # Guess yes on musl systems.
28214 *-musl*) gl_cv_func_setenv_works="guessing yes" ;;
28215 # If we don't know, obey --enable-cross-guesses.
28216 *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
28217 esac
28218
28219 else
28220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28221 /* end confdefs.h. */
28222
28223 #include <stdlib.h>
28224 #include <errno.h>
28225 #include <string.h>
28226
28227 int
28228 main ()
28229 {
28230
28231 int result = 0;
28232 {
28233 if (setenv ("", "", 0) != -1)
28234 result |= 1;
28235 else if (errno != EINVAL)
28236 result |= 2;
28237 }
28238 {
28239 if (setenv ("a", "=", 1) != 0)
28240 result |= 4;
28241 else if (strcmp (getenv ("a"), "=") != 0)
28242 result |= 8;
28243 }
28244 return result;
28245
28246 ;
28247 return 0;
28248 }
28249 _ACEOF
28250 if ac_fn_c_try_run "$LINENO"; then :
28251 gl_cv_func_setenv_works=yes
28252 else
28253 gl_cv_func_setenv_works=no
28254 fi
28255 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28256 conftest.$ac_objext conftest.beam conftest.$ac_ext
28257 fi
28258
28259 fi
28260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
28261 $as_echo "$gl_cv_func_setenv_works" >&6; }
28262 case "$gl_cv_func_setenv_works" in
28263 *yes) ;;
28264 *)
28265 REPLACE_SETENV=1
28266 ;;
28267 esac
28268 fi
28269
28270 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
28271
28272
28273
28274
28275
28276
28277
28278
28279 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
28280
28281 fi
28282
28283
28284
28285
28286
28287 GNULIB_SETENV=1
28288
28289
28290
28291
28292
28293 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
28294
28295
28296
28297
28298
28299
28300
28301
28302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
28303 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
28304 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
28305 $as_echo_n "(cached) " >&6
28306 else
28307 case "$host_os" in
28308 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
28309 *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
28310 gl_cv_func_setlocale_null_all_mtsafe=no ;;
28311 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
28312 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
28313 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
28314 # If we don't know, obey --enable-cross-guesses.
28315 *)
28316 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
28317 esac
28318
28319 fi
28320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
28321 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
28322 case "$host_os" in
28323 mingw*) ;;
28324 *)
28325 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
28326 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
28327 fi
28328 ;;
28329 esac
28330 case "$gl_cv_func_setlocale_null_all_mtsafe" in
28331 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
28332 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
28333 esac
28334
28335 cat >>confdefs.h <<_ACEOF
28336 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
28337 _ACEOF
28338
28339
28340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
28341 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
28342 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
28343 $as_echo_n "(cached) " >&6
28344 else
28345 case "$host_os" in
28346 # Guess no on OpenBSD, AIX.
28347 openbsd* | aix*)
28348 gl_cv_func_setlocale_null_one_mtsafe=no ;;
28349 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
28350 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
28351 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
28352 # If we don't know, obey --enable-cross-guesses.
28353 *)
28354 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
28355 esac
28356
28357 fi
28358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
28359 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
28360 case "$host_os" in
28361 mingw*) ;;
28362 *)
28363 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
28364 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
28365 fi
28366 ;;
28367 esac
28368 case "$gl_cv_func_setlocale_null_one_mtsafe" in
28369 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
28370 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
28371 esac
28372
28373 cat >>confdefs.h <<_ACEOF
28374 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
28375 _ACEOF
28376
28377
28378 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
28379 case "$host_os" in
28380 mingw*) LIB_SETLOCALE_NULL= ;;
28381 *)
28382
28383
28384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
28385 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
28386 if ${gl_cv_have_weak+:} false; then :
28387 $as_echo_n "(cached) " >&6
28388 else
28389 gl_cv_have_weak=no
28390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28391 /* end confdefs.h. */
28392 extern void xyzzy ();
28393 #pragma weak xyzzy
28394 int
28395 main ()
28396 {
28397 xyzzy();
28398 ;
28399 return 0;
28400 }
28401 _ACEOF
28402 if ac_fn_c_try_link "$LINENO"; then :
28403 gl_cv_have_weak=maybe
28404 fi
28405 rm -f core conftest.err conftest.$ac_objext \
28406 conftest$ac_exeext conftest.$ac_ext
28407 if test $gl_cv_have_weak = maybe; then
28408 if test "$cross_compiling" = yes; then :
28409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28410 /* end confdefs.h. */
28411 #ifdef __ELF__
28412 Extensible Linking Format
28413 #endif
28414
28415 _ACEOF
28416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28417 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
28418 gl_cv_have_weak="guessing yes"
28419 else
28420 gl_cv_have_weak="guessing no"
28421 fi
28422 rm -f conftest*
28423
28424
28425 else
28426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28427 /* end confdefs.h. */
28428
28429 #include <stdio.h>
28430 #pragma weak fputs
28431 int main ()
28432 {
28433 return (fputs == NULL);
28434 }
28435 _ACEOF
28436 if ac_fn_c_try_run "$LINENO"; then :
28437 gl_cv_have_weak=yes
28438 else
28439 gl_cv_have_weak=no
28440 fi
28441 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28442 conftest.$ac_objext conftest.beam conftest.$ac_ext
28443 fi
28444
28445 fi
28446 case " $LDFLAGS " in
28447 *" -static "*) gl_cv_have_weak=no ;;
28448 esac
28449 case "$gl_cv_have_weak" in
28450 *yes)
28451 case "$host_os" in
28452 freebsd* | dragonfly*)
28453 : > conftest1.c
28454 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
28455 cat <<EOF > conftest2.c
28456 #include <pthread.h>
28457 #pragma weak pthread_mutexattr_gettype
28458 int main ()
28459 {
28460 return (pthread_mutexattr_gettype != NULL);
28461 }
28462 EOF
28463 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
28464 || gl_cv_have_weak=no
28465 rm -f conftest1.c libempty.so conftest2.c conftest
28466 ;;
28467 esac
28468 ;;
28469 esac
28470
28471 fi
28472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
28473 $as_echo "$gl_cv_have_weak" >&6; }
28474 case "$gl_cv_have_weak" in
28475 *yes)
28476
28477 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
28478
28479 ;;
28480 esac
28481
28482 case "$gl_cv_have_weak" in
28483 *yes) LIB_SETLOCALE_NULL= ;;
28484 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
28485 esac
28486 ;;
28487 esac
28488 else
28489 LIB_SETLOCALE_NULL=
28490 fi
28491
28492
28493 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
28494
28495
28496
28497
28498
28499
28500
28501
28502 gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
28503
28504
28505
28506
28507 CFLAG_VISIBILITY=
28508 HAVE_VISIBILITY=0
28509 if test -n "$GCC"; then
28510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
28511 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
28512 if ${gl_cv_cc_vis_werror+:} false; then :
28513 $as_echo_n "(cached) " >&6
28514 else
28515 gl_save_CFLAGS="$CFLAGS"
28516 CFLAGS="$CFLAGS -Werror"
28517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28518 /* end confdefs.h. */
28519
28520 int
28521 main ()
28522 {
28523
28524 ;
28525 return 0;
28526 }
28527 _ACEOF
28528 if ac_fn_c_try_compile "$LINENO"; then :
28529 gl_cv_cc_vis_werror=yes
28530 else
28531 gl_cv_cc_vis_werror=no
28532 fi
28533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28534 CFLAGS="$gl_save_CFLAGS"
28535
28536 fi
28537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
28538 $as_echo "$gl_cv_cc_vis_werror" >&6; }
28539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
28540 $as_echo_n "checking for simple visibility declarations... " >&6; }
28541 if ${gl_cv_cc_visibility+:} false; then :
28542 $as_echo_n "(cached) " >&6
28543 else
28544 gl_save_CFLAGS="$CFLAGS"
28545 CFLAGS="$CFLAGS -fvisibility=hidden"
28546 if test $gl_cv_cc_vis_werror = yes; then
28547 CFLAGS="$CFLAGS -Werror"
28548 fi
28549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28550 /* end confdefs.h. */
28551 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
28552 extern __attribute__((__visibility__("default"))) int exportedvar;
28553 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
28554 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
28555 void dummyfunc (void) {}
28556
28557 int
28558 main ()
28559 {
28560
28561 ;
28562 return 0;
28563 }
28564 _ACEOF
28565 if ac_fn_c_try_compile "$LINENO"; then :
28566 gl_cv_cc_visibility=yes
28567 else
28568 gl_cv_cc_visibility=no
28569 fi
28570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28571 CFLAGS="$gl_save_CFLAGS"
28572
28573 fi
28574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
28575 $as_echo "$gl_cv_cc_visibility" >&6; }
28576 if test $gl_cv_cc_visibility = yes; then
28577 CFLAG_VISIBILITY="-fvisibility=hidden"
28578 HAVE_VISIBILITY=1
28579 fi
28580 fi
28581
28582
28583
28584 cat >>confdefs.h <<_ACEOF
28585 #define HAVE_VISIBILITY $HAVE_VISIBILITY
28586 _ACEOF
28587
28588
28589
28590 fi
28591
28592
28593
28594
28595
28596 GNULIB_SETLOCALE_NULL=1
28597
28598
28599
28600
28601
28602 $as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
28603
28604
28605
28606
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617 if test $gl_cv_have_include_next = yes; then
28618 gl_cv_next_signal_h='<'signal.h'>'
28619 else
28620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
28621 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
28622 if ${gl_cv_next_signal_h+:} false; then :
28623 $as_echo_n "(cached) " >&6
28624 else
28625
28626
28627
28628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28629 /* end confdefs.h. */
28630 #include <signal.h>
28631 _ACEOF
28632 case "$host_os" in
28633 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28634 *) gl_absname_cpp="$ac_cpp" ;;
28635 esac
28636
28637 case "$host_os" in
28638 mingw*)
28639 gl_dirsep_regex='[/\\]'
28640 ;;
28641 *)
28642 gl_dirsep_regex='\/'
28643 ;;
28644 esac
28645 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28646 gl_header_literal_regex=`echo 'signal.h' \
28647 | sed -e "$gl_make_literal_regex_sed"`
28648 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28649 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28650 s|^/[^/]|//&|
28651 p
28652 q
28653 }'
28654
28655 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28656 sed -n "$gl_absolute_header_sed"`
28657
28658 gl_header=$gl_cv_absolute_signal_h
28659 gl_cv_next_signal_h='"'$gl_header'"'
28660
28661
28662 fi
28663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
28664 $as_echo "$gl_cv_next_signal_h" >&6; }
28665 fi
28666 NEXT_SIGNAL_H=$gl_cv_next_signal_h
28667
28668 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28669 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28670 gl_next_as_first_directive='<'signal.h'>'
28671 else
28672 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28673 gl_next_as_first_directive=$gl_cv_next_signal_h
28674 fi
28675 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
28676
28677
28678
28679
28680
28681 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
28682 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
28683 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
28684 #include <signal.h>
28685
28686 "
28687 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
28688
28689 else
28690 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
28691 fi
28692
28693
28694
28695
28696
28697
28698
28699 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
28700 #include <signal.h>
28701
28702 "
28703 if test "x$ac_cv_type_sighandler_t" = xyes; then :
28704
28705 else
28706 HAVE_SIGHANDLER_T=0
28707 fi
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
28719 /* <sys/types.h> is not needed according to POSIX, but the
28720 <sys/socket.h> in i386-unknown-freebsd4.10 and
28721 powerpc-apple-darwin5.5 required it. */
28722 #include <sys/types.h>
28723 #if HAVE_SYS_SOCKET_H
28724 # include <sys/socket.h>
28725 #elif HAVE_WS2TCPIP_H
28726 # include <ws2tcpip.h>
28727 #endif
28728
28729 "
28730 if test "x$ac_cv_type_socklen_t" = xyes; then :
28731
28732 else
28733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
28734 $as_echo_n "checking for socklen_t equivalent... " >&6; }
28735 if ${gl_cv_socklen_t_equiv+:} false; then :
28736 $as_echo_n "(cached) " >&6
28737 else
28738 # Systems have either "struct sockaddr *" or
28739 # "void *" as the second argument to getpeername
28740 gl_cv_socklen_t_equiv=
28741 for arg2 in "struct sockaddr" void; do
28742 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
28743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28744 /* end confdefs.h. */
28745 #include <sys/types.h>
28746 #include <sys/socket.h>
28747
28748 int getpeername (int, $arg2 *, $t *);
28749 int
28750 main ()
28751 {
28752 $t len;
28753 getpeername (0, 0, &len);
28754 ;
28755 return 0;
28756 }
28757 _ACEOF
28758 if ac_fn_c_try_compile "$LINENO"; then :
28759 gl_cv_socklen_t_equiv="$t"
28760 fi
28761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28762 test "$gl_cv_socklen_t_equiv" != "" && break
28763 done
28764 test "$gl_cv_socklen_t_equiv" != "" && break
28765 done
28766 if test "$gl_cv_socklen_t_equiv" = ""; then
28767 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
28768 fi
28769
28770 fi
28771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
28772 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
28773
28774 cat >>confdefs.h <<_ACEOF
28775 #define socklen_t $gl_cv_socklen_t_equiv
28776 _ACEOF
28777
28778 fi
28779
28780
28781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
28782 $as_echo_n "checking for ssize_t... " >&6; }
28783 if ${gt_cv_ssize_t+:} false; then :
28784 $as_echo_n "(cached) " >&6
28785 else
28786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28787 /* end confdefs.h. */
28788 #include <sys/types.h>
28789 int
28790 main ()
28791 {
28792 int x = sizeof (ssize_t *) + sizeof (ssize_t);
28793 return !x;
28794 ;
28795 return 0;
28796 }
28797 _ACEOF
28798 if ac_fn_c_try_compile "$LINENO"; then :
28799 gt_cv_ssize_t=yes
28800 else
28801 gt_cv_ssize_t=no
28802 fi
28803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28804 fi
28805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
28806 $as_echo "$gt_cv_ssize_t" >&6; }
28807 if test $gt_cv_ssize_t = no; then
28808
28809 $as_echo "#define ssize_t int" >>confdefs.h
28810
28811 fi
28812
28813
28814
28815
28816
28817 case "$host_os" in
28818 mingw*)
28819 ;;
28820 *)
28821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28822 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28823 if ${gl_cv_func_stat_file_slash+:} false; then :
28824 $as_echo_n "(cached) " >&6
28825 else
28826 touch conftest.tmp
28827 # Assume that if we have lstat, we can also check symlinks.
28828 if test $ac_cv_func_lstat = yes; then
28829 ln -s conftest.tmp conftest.lnk
28830 fi
28831 if test "$cross_compiling" = yes; then :
28832 case "$host_os" in
28833 # Guess yes on Linux systems.
28834 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
28835 # Guess yes on glibc systems.
28836 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28837 # If we don't know, obey --enable-cross-guesses.
28838 *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
28839 esac
28840
28841 else
28842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28843 /* end confdefs.h. */
28844 #include <sys/stat.h>
28845
28846 int
28847 main ()
28848 {
28849 int result = 0;
28850 struct stat st;
28851 if (!stat ("conftest.tmp/", &st))
28852 result |= 1;
28853 #if HAVE_LSTAT
28854 if (!stat ("conftest.lnk/", &st))
28855 result |= 2;
28856 #endif
28857 return result;
28858
28859 ;
28860 return 0;
28861 }
28862 _ACEOF
28863 if ac_fn_c_try_run "$LINENO"; then :
28864 gl_cv_func_stat_file_slash=yes
28865 else
28866 gl_cv_func_stat_file_slash=no
28867 fi
28868 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28869 conftest.$ac_objext conftest.beam conftest.$ac_ext
28870 fi
28871
28872 rm -f conftest.tmp conftest.lnk
28873 fi
28874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28875 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
28876 case $gl_cv_func_stat_file_slash in
28877 *no)
28878 REPLACE_STAT=1
28879
28880 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28881 ;;
28882 esac
28883 case $host_os in
28884 solaris*)
28885 REPLACE_FSTAT=1 ;;
28886 esac
28887 ;;
28888 esac
28889
28890 if test $REPLACE_STAT = 1; then
28891
28892
28893
28894
28895
28896
28897
28898
28899 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
28900
28901 case "$host_os" in
28902 mingw*)
28903
28904
28905
28906
28907
28908
28909
28910
28911 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
28912
28913 ;;
28914 esac
28915
28916
28917
28918 :
28919
28920 fi
28921
28922
28923
28924
28925
28926 GNULIB_STAT=1
28927
28928
28929
28930
28931
28932 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
28933
28934
28935
28936
28937
28938
28939
28940 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>
28941 #include <sys/stat.h>
28942 "
28943 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
28944
28945 cat >>confdefs.h <<_ACEOF
28946 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
28947 _ACEOF
28948
28949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
28950 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
28951 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
28952 $as_echo_n "(cached) " >&6
28953 else
28954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28955 /* end confdefs.h. */
28956
28957 #include <sys/types.h>
28958 #include <sys/stat.h>
28959 #if HAVE_SYS_TIME_H
28960 # include <sys/time.h>
28961 #endif
28962 #include <time.h>
28963 struct timespec ts;
28964 struct stat st;
28965
28966 int
28967 main ()
28968 {
28969
28970 st.st_atim = ts;
28971
28972 ;
28973 return 0;
28974 }
28975 _ACEOF
28976 if ac_fn_c_try_compile "$LINENO"; then :
28977 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
28978 else
28979 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
28980 fi
28981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28982 fi
28983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
28984 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
28985 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
28986
28987 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
28988
28989 fi
28990 else
28991 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>
28992 #include <sys/stat.h>
28993 "
28994 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
28995
28996 cat >>confdefs.h <<_ACEOF
28997 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
28998 _ACEOF
28999
29000
29001 else
29002 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
29003 #include <sys/stat.h>
29004 "
29005 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
29006
29007 cat >>confdefs.h <<_ACEOF
29008 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
29009 _ACEOF
29010
29011
29012 else
29013 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>
29014 #include <sys/stat.h>
29015 "
29016 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
29017
29018 cat >>confdefs.h <<_ACEOF
29019 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
29020 _ACEOF
29021
29022
29023 fi
29024
29025 fi
29026
29027 fi
29028
29029 fi
29030
29031
29032
29033
29034
29035 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>
29036 #include <sys/stat.h>
29037 "
29038 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
29039
29040 cat >>confdefs.h <<_ACEOF
29041 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
29042 _ACEOF
29043
29044
29045 else
29046 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
29047 #include <sys/stat.h>
29048 "
29049 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
29050
29051 cat >>confdefs.h <<_ACEOF
29052 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
29053 _ACEOF
29054
29055
29056 else
29057 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>
29058 #include <sys/stat.h>
29059 "
29060 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
29061
29062 cat >>confdefs.h <<_ACEOF
29063 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
29064 _ACEOF
29065
29066
29067 fi
29068
29069 fi
29070
29071 fi
29072
29073
29074
29075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
29076 $as_echo_n "checking for working stdalign.h... " >&6; }
29077 if ${gl_cv_header_working_stdalign_h+:} false; then :
29078 $as_echo_n "(cached) " >&6
29079 else
29080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29081 /* end confdefs.h. */
29082 #include <stdalign.h>
29083 #include <stddef.h>
29084
29085 /* Test that alignof yields a result consistent with offsetof.
29086 This catches GCC bug 52023
29087 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
29088 #ifdef __cplusplus
29089 template <class t> struct alignof_helper { char a; t b; };
29090 # define ao(type) offsetof (alignof_helper<type>, b)
29091 #else
29092 # define ao(type) offsetof (struct { char a; type b; }, b)
29093 #endif
29094 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
29095 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
29096 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
29097
29098 /* Test _Alignas only on platforms where gnulib can help. */
29099 #if \
29100 ((defined __cplusplus && 201103 <= __cplusplus) \
29101 || (defined __APPLE__ && defined __MACH__ \
29102 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
29103 : __GNUC__) \
29104 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
29105 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
29106 || 1300 <= _MSC_VER)
29107 struct alignas_test { char c; char alignas (8) alignas_8; };
29108 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
29109 ? 1 : -1];
29110 #endif
29111
29112 int
29113 main ()
29114 {
29115
29116 ;
29117 return 0;
29118 }
29119 _ACEOF
29120 if ac_fn_c_try_compile "$LINENO"; then :
29121 gl_cv_header_working_stdalign_h=yes
29122 else
29123 gl_cv_header_working_stdalign_h=no
29124 fi
29125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29126 fi
29127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
29128 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
29129
29130 if test $gl_cv_header_working_stdalign_h = yes; then
29131 STDALIGN_H=''
29132 else
29133 STDALIGN_H='stdalign.h'
29134 fi
29135
29136
29137 if test -n "$STDALIGN_H"; then
29138 GL_GENERATE_STDALIGN_H_TRUE=
29139 GL_GENERATE_STDALIGN_H_FALSE='#'
29140 else
29141 GL_GENERATE_STDALIGN_H_TRUE='#'
29142 GL_GENERATE_STDALIGN_H_FALSE=
29143 fi
29144
29145
29146
29147
29148
29149
29150 if test "$ac_cv_header_stdbool_h" = yes; then
29151 case "$host_os" in
29152 solaris*)
29153 if test -z "$GCC"; then
29154 STDBOOL_H='stdbool.h'
29155 else
29156 STDBOOL_H=''
29157 fi
29158 ;;
29159 *)
29160 STDBOOL_H=''
29161 ;;
29162 esac
29163 else
29164 STDBOOL_H='stdbool.h'
29165 fi
29166
29167 if test -n "$STDBOOL_H"; then
29168 GL_GENERATE_STDBOOL_H_TRUE=
29169 GL_GENERATE_STDBOOL_H_FALSE='#'
29170 else
29171 GL_GENERATE_STDBOOL_H_TRUE='#'
29172 GL_GENERATE_STDBOOL_H_FALSE=
29173 fi
29174
29175
29176 if test "$ac_cv_type__Bool" = yes; then
29177 HAVE__BOOL=1
29178 else
29179 HAVE__BOOL=0
29180 fi
29181
29182
29183
29184
29185
29186
29187
29188
29189 STDDEF_H=
29190
29191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
29192 $as_echo_n "checking for good max_align_t... " >&6; }
29193 if ${gl_cv_type_max_align_t+:} false; then :
29194 $as_echo_n "(cached) " >&6
29195 else
29196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29197 /* end confdefs.h. */
29198 #include <stddef.h>
29199 unsigned int s = sizeof (max_align_t);
29200 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
29201 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
29202 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
29203 #endif
29204 typedef struct { char a; max_align_t b; } max_helper;
29205 typedef struct { char a; long b; } long_helper;
29206 typedef struct { char a; double b; } double_helper;
29207 typedef struct { char a; long double b; } long_double_helper;
29208 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
29209 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
29210 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
29211
29212 int
29213 main ()
29214 {
29215
29216 ;
29217 return 0;
29218 }
29219 _ACEOF
29220 if ac_fn_c_try_compile "$LINENO"; then :
29221 gl_cv_type_max_align_t=yes
29222 else
29223 gl_cv_type_max_align_t=no
29224 fi
29225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29226
29227 fi
29228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
29229 $as_echo "$gl_cv_type_max_align_t" >&6; }
29230 if test $gl_cv_type_max_align_t = no; then
29231 HAVE_MAX_ALIGN_T=0
29232 STDDEF_H=stddef.h
29233 fi
29234
29235 if test $gt_cv_c_wchar_t = no; then
29236 HAVE_WCHAR_T=0
29237 STDDEF_H=stddef.h
29238 fi
29239
29240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
29241 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
29242 if ${gl_cv_decl_null_works+:} false; then :
29243 $as_echo_n "(cached) " >&6
29244 else
29245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29246 /* end confdefs.h. */
29247 #include <stddef.h>
29248 int test[2 * (sizeof NULL == sizeof (void *)) -1];
29249
29250 int
29251 main ()
29252 {
29253
29254 ;
29255 return 0;
29256 }
29257 _ACEOF
29258 if ac_fn_c_try_compile "$LINENO"; then :
29259 gl_cv_decl_null_works=yes
29260 else
29261 gl_cv_decl_null_works=no
29262 fi
29263 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29264 fi
29265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
29266 $as_echo "$gl_cv_decl_null_works" >&6; }
29267 if test $gl_cv_decl_null_works = no; then
29268 REPLACE_NULL=1
29269 STDDEF_H=stddef.h
29270 fi
29271
29272
29273 if test -n "$STDDEF_H"; then
29274 GL_GENERATE_STDDEF_H_TRUE=
29275 GL_GENERATE_STDDEF_H_FALSE='#'
29276 else
29277 GL_GENERATE_STDDEF_H_TRUE='#'
29278 GL_GENERATE_STDDEF_H_FALSE=
29279 fi
29280
29281 if test -n "$STDDEF_H"; then
29282
29283
29284
29285
29286
29287
29288
29289
29290 if test $gl_cv_have_include_next = yes; then
29291 gl_cv_next_stddef_h='<'stddef.h'>'
29292 else
29293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
29294 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
29295 if ${gl_cv_next_stddef_h+:} false; then :
29296 $as_echo_n "(cached) " >&6
29297 else
29298
29299
29300
29301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29302 /* end confdefs.h. */
29303 #include <stddef.h>
29304 _ACEOF
29305 case "$host_os" in
29306 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29307 *) gl_absname_cpp="$ac_cpp" ;;
29308 esac
29309
29310 case "$host_os" in
29311 mingw*)
29312 gl_dirsep_regex='[/\\]'
29313 ;;
29314 *)
29315 gl_dirsep_regex='\/'
29316 ;;
29317 esac
29318 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29319 gl_header_literal_regex=`echo 'stddef.h' \
29320 | sed -e "$gl_make_literal_regex_sed"`
29321 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29322 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29323 s|^/[^/]|//&|
29324 p
29325 q
29326 }'
29327
29328 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29329 sed -n "$gl_absolute_header_sed"`
29330
29331 gl_header=$gl_cv_absolute_stddef_h
29332 gl_cv_next_stddef_h='"'$gl_header'"'
29333
29334
29335 fi
29336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
29337 $as_echo "$gl_cv_next_stddef_h" >&6; }
29338 fi
29339 NEXT_STDDEF_H=$gl_cv_next_stddef_h
29340
29341 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29342 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29343 gl_next_as_first_directive='<'stddef.h'>'
29344 else
29345 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29346 gl_next_as_first_directive=$gl_cv_next_stddef_h
29347 fi
29348 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
29349
29350
29351
29352
29353 fi
29354
29355
29356
29357
29358 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369 if test $gl_cv_have_include_next = yes; then
29370 gl_cv_next_stdio_h='<'stdio.h'>'
29371 else
29372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
29373 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
29374 if ${gl_cv_next_stdio_h+:} false; then :
29375 $as_echo_n "(cached) " >&6
29376 else
29377
29378
29379
29380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29381 /* end confdefs.h. */
29382 #include <stdio.h>
29383 _ACEOF
29384 case "$host_os" in
29385 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29386 *) gl_absname_cpp="$ac_cpp" ;;
29387 esac
29388
29389 case "$host_os" in
29390 mingw*)
29391 gl_dirsep_regex='[/\\]'
29392 ;;
29393 *)
29394 gl_dirsep_regex='\/'
29395 ;;
29396 esac
29397 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29398 gl_header_literal_regex=`echo 'stdio.h' \
29399 | sed -e "$gl_make_literal_regex_sed"`
29400 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29401 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29402 s|^/[^/]|//&|
29403 p
29404 q
29405 }'
29406
29407 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29408 sed -n "$gl_absolute_header_sed"`
29409
29410 gl_header=$gl_cv_absolute_stdio_h
29411 gl_cv_next_stdio_h='"'$gl_header'"'
29412
29413
29414 fi
29415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
29416 $as_echo "$gl_cv_next_stdio_h" >&6; }
29417 fi
29418 NEXT_STDIO_H=$gl_cv_next_stdio_h
29419
29420 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29421 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29422 gl_next_as_first_directive='<'stdio.h'>'
29423 else
29424 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29425 gl_next_as_first_directive=$gl_cv_next_stdio_h
29426 fi
29427 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
29428
29429
29430
29431
29432
29433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
29434 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
29435 if ${gl_cv_func_printf_attribute_flavor+:} false; then :
29436 $as_echo_n "(cached) " >&6
29437 else
29438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29439 /* end confdefs.h. */
29440
29441 #define __STDC_FORMAT_MACROS 1
29442 #include <stdio.h>
29443 #include <inttypes.h>
29444 /* For non-mingw systems, compilation will trivially succeed.
29445 For mingw, compilation will succeed for older mingw (system
29446 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
29447 #if (defined _WIN32 && ! defined __CYGWIN__) && \
29448 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
29449 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
29450 #endif
29451
29452 int
29453 main ()
29454 {
29455
29456 ;
29457 return 0;
29458 }
29459 _ACEOF
29460 if ac_fn_c_try_compile "$LINENO"; then :
29461 gl_cv_func_printf_attribute_flavor=system
29462 else
29463 gl_cv_func_printf_attribute_flavor=gnu
29464 fi
29465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29466 fi
29467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
29468 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
29469 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
29470
29471 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
29472
29473 fi
29474
29475 GNULIB_FSCANF=1
29476
29477
29478 cat >>confdefs.h <<_ACEOF
29479 #define GNULIB_FSCANF 1
29480 _ACEOF
29481
29482
29483 GNULIB_SCANF=1
29484
29485
29486 cat >>confdefs.h <<_ACEOF
29487 #define GNULIB_SCANF 1
29488 _ACEOF
29489
29490
29491 GNULIB_FGETC=1
29492 GNULIB_GETC=1
29493 GNULIB_GETCHAR=1
29494 GNULIB_FGETS=1
29495 GNULIB_FREAD=1
29496
29497
29498 GNULIB_FPRINTF=1
29499 GNULIB_PRINTF=1
29500 GNULIB_VFPRINTF=1
29501 GNULIB_VPRINTF=1
29502 GNULIB_FPUTC=1
29503 GNULIB_PUTC=1
29504 GNULIB_PUTCHAR=1
29505 GNULIB_FPUTS=1
29506 GNULIB_PUTS=1
29507 GNULIB_FWRITE=1
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518 if test $ac_cv_have_decl_fcloseall = no; then
29519 HAVE_DECL_FCLOSEALL=0
29520 fi
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532 if test $gl_cv_have_include_next = yes; then
29533 gl_cv_next_stdlib_h='<'stdlib.h'>'
29534 else
29535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
29536 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
29537 if ${gl_cv_next_stdlib_h+:} false; then :
29538 $as_echo_n "(cached) " >&6
29539 else
29540
29541
29542
29543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29544 /* end confdefs.h. */
29545 #include <stdlib.h>
29546 _ACEOF
29547 case "$host_os" in
29548 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29549 *) gl_absname_cpp="$ac_cpp" ;;
29550 esac
29551
29552 case "$host_os" in
29553 mingw*)
29554 gl_dirsep_regex='[/\\]'
29555 ;;
29556 *)
29557 gl_dirsep_regex='\/'
29558 ;;
29559 esac
29560 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29561 gl_header_literal_regex=`echo 'stdlib.h' \
29562 | sed -e "$gl_make_literal_regex_sed"`
29563 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29564 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29565 s|^/[^/]|//&|
29566 p
29567 q
29568 }'
29569
29570 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29571 sed -n "$gl_absolute_header_sed"`
29572
29573 gl_header=$gl_cv_absolute_stdlib_h
29574 gl_cv_next_stdlib_h='"'$gl_header'"'
29575
29576
29577 fi
29578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
29579 $as_echo "$gl_cv_next_stdlib_h" >&6; }
29580 fi
29581 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
29582
29583 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29584 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29585 gl_next_as_first_directive='<'stdlib.h'>'
29586 else
29587 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29588 gl_next_as_first_directive=$gl_cv_next_stdlib_h
29589 fi
29590 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603 if test $ac_cv_have_decl_ecvt = no; then
29604 HAVE_DECL_ECVT=0
29605 fi
29606
29607 if test $ac_cv_have_decl_fcvt = no; then
29608 HAVE_DECL_FCVT=0
29609 fi
29610
29611 if test $ac_cv_have_decl_gcvt = no; then
29612 HAVE_DECL_GCVT=0
29613 fi
29614
29615
29616
29617
29618
29619 for ac_func in strchrnul
29620 do :
29621 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
29622 if test "x$ac_cv_func_strchrnul" = xyes; then :
29623 cat >>confdefs.h <<_ACEOF
29624 #define HAVE_STRCHRNUL 1
29625 _ACEOF
29626
29627 fi
29628 done
29629
29630 if test $ac_cv_func_strchrnul = no; then
29631 HAVE_STRCHRNUL=0
29632 else
29633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
29634 $as_echo_n "checking whether strchrnul works... " >&6; }
29635 if ${gl_cv_func_strchrnul_works+:} false; then :
29636 $as_echo_n "(cached) " >&6
29637 else
29638 if test "$cross_compiling" = yes; then :
29639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29640 /* end confdefs.h. */
29641
29642 #if defined __CYGWIN__
29643 #include <cygwin/version.h>
29644 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
29645 Lucky user
29646 #endif
29647 #else
29648 Lucky user
29649 #endif
29650
29651 _ACEOF
29652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29653 $EGREP "Lucky user" >/dev/null 2>&1; then :
29654 gl_cv_func_strchrnul_works="guessing yes"
29655 else
29656 gl_cv_func_strchrnul_works="guessing no"
29657 fi
29658 rm -f conftest*
29659
29660
29661 else
29662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29663 /* end confdefs.h. */
29664
29665 #include <string.h> /* for strchrnul */
29666
29667 int
29668 main ()
29669 {
29670 const char *buf = "a";
29671 return strchrnul (buf, 'b') != buf + 1;
29672
29673 ;
29674 return 0;
29675 }
29676 _ACEOF
29677 if ac_fn_c_try_run "$LINENO"; then :
29678 gl_cv_func_strchrnul_works=yes
29679 else
29680 gl_cv_func_strchrnul_works=no
29681 fi
29682 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29683 conftest.$ac_objext conftest.beam conftest.$ac_ext
29684 fi
29685
29686
29687 fi
29688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
29689 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
29690 case "$gl_cv_func_strchrnul_works" in
29691 *yes) ;;
29692 *) REPLACE_STRCHRNUL=1 ;;
29693 esac
29694 fi
29695
29696 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
29697
29698
29699
29700
29701
29702
29703
29704
29705 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
29706
29707 :
29708 fi
29709
29710
29711
29712
29713
29714 GNULIB_STRCHRNUL=1
29715
29716
29717
29718
29719
29720 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
29721
29722
29723
29724
29725
29726
29727 if test $gl_cv_func_malloc_posix != yes; then
29728 REPLACE_STRDUP=1
29729 fi
29730
29731 if test $ac_cv_have_decl_strdup = no; then
29732 HAVE_DECL_STRDUP=0
29733 fi
29734
29735 if test $REPLACE_STRDUP = 1; then
29736
29737
29738
29739
29740
29741
29742
29743
29744 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
29745
29746 :
29747 fi
29748
29749
29750
29751
29752
29753 GNULIB_STRDUP=1
29754
29755
29756
29757
29758
29759 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
29771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
29772 $as_echo_n "checking for working strerror function... " >&6; }
29773 if ${gl_cv_func_working_strerror+:} false; then :
29774 $as_echo_n "(cached) " >&6
29775 else
29776 if test "$cross_compiling" = yes; then :
29777 case "$host_os" in
29778 # Guess yes on glibc systems.
29779 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
29780 # Guess yes on musl systems.
29781 *-musl*) gl_cv_func_working_strerror="guessing yes" ;;
29782 # If we don't know, obey --enable-cross-guesses.
29783 *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
29784 esac
29785
29786 else
29787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29788 /* end confdefs.h. */
29789 #include <string.h>
29790
29791 int
29792 main ()
29793 {
29794 if (!*strerror (-2)) return 1;
29795 ;
29796 return 0;
29797 }
29798 _ACEOF
29799 if ac_fn_c_try_run "$LINENO"; then :
29800 gl_cv_func_working_strerror=yes
29801 else
29802 gl_cv_func_working_strerror=no
29803 fi
29804 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29805 conftest.$ac_objext conftest.beam conftest.$ac_ext
29806 fi
29807
29808
29809 fi
29810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
29811 $as_echo "$gl_cv_func_working_strerror" >&6; }
29812 case "$gl_cv_func_working_strerror" in
29813 *yes) ;;
29814 *)
29815 REPLACE_STRERROR=1
29816 ;;
29817 esac
29818
29819 case "$gl_cv_func_strerror_r_works" in
29820 *no) REPLACE_STRERROR=1 ;;
29821 esac
29822
29823 else
29824 REPLACE_STRERROR=1
29825 fi
29826
29827 if test $REPLACE_STRERROR = 1; then
29828
29829
29830
29831
29832
29833
29834
29835
29836 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
29837
29838 fi
29839
29840
29841 cat >>confdefs.h <<_ACEOF
29842 #define GNULIB_STRERROR 1
29843 _ACEOF
29844
29845
29846
29847
29848
29849
29850
29851 GNULIB_STRERROR=1
29852
29853
29854
29855
29856
29857 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
29858
29859
29860
29861
29862
29863 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
29864
29865
29866
29867
29868
29869
29870
29871
29872 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
29873
29874
29875
29876
29877
29878 if test $ac_cv_header_sys_socket_h != yes; then
29879 for ac_header in winsock2.h
29880 do :
29881 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
29882 if test "x$ac_cv_header_winsock2_h" = xyes; then :
29883 cat >>confdefs.h <<_ACEOF
29884 #define HAVE_WINSOCK2_H 1
29885 _ACEOF
29886
29887 fi
29888
29889 done
29890
29891 fi
29892 if test "$ac_cv_header_winsock2_h" = yes; then
29893 HAVE_WINSOCK2_H=1
29894 UNISTD_H_HAVE_WINSOCK2_H=1
29895 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
29896 else
29897 HAVE_WINSOCK2_H=0
29898 fi
29899
29900
29901 fi
29902
29903
29904
29905
29906
29907
29908
29909 if test $ac_cv_have_decl_strerror_r = no; then
29910 HAVE_DECL_STRERROR_R=0
29911 fi
29912
29913 if test $ac_cv_func_strerror_r = yes; then
29914 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
29915 if test $gl_cv_func_strerror_r_posix_signature = yes; then
29916 case "$gl_cv_func_strerror_r_works" in
29917 *no) REPLACE_STRERROR_R=1 ;;
29918 esac
29919 else
29920 REPLACE_STRERROR_R=1
29921 fi
29922 else
29923 REPLACE_STRERROR_R=1
29924 fi
29925 fi
29926
29927 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
29928
29929
29930
29931
29932
29933
29934
29935
29936 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
29937
29938
29939
29940
29941
29942
29943 fi
29944
29945
29946
29947
29948
29949 GNULIB_STRERROR_R=1
29950
29951
29952
29953
29954
29955 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
29956
29957
29958
29959
29960
29961 cat >>confdefs.h <<_ACEOF
29962 #define GNULIB_STRERROR_R_POSIX 1
29963 _ACEOF
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978 if test $ac_cv_have_decl_strnlen = no; then
29979 HAVE_DECL_STRNLEN=0
29980 else
29981
29982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
29983 $as_echo_n "checking for working strnlen... " >&6; }
29984 if ${ac_cv_func_strnlen_working+:} false; then :
29985 $as_echo_n "(cached) " >&6
29986 else
29987 if test "$cross_compiling" = yes; then :
29988 # Guess no on AIX systems, yes otherwise.
29989 case "$host_os" in
29990 aix*) ac_cv_func_strnlen_working=no;;
29991 *) ac_cv_func_strnlen_working=yes;;
29992 esac
29993 else
29994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29995 /* end confdefs.h. */
29996 $ac_includes_default
29997 int
29998 main ()
29999 {
30000
30001 #define S "foobar"
30002 #define S_LEN (sizeof S - 1)
30003
30004 /* At least one implementation is buggy: that of AIX 4.3 would
30005 give strnlen (S, 1) == 3. */
30006
30007 int i;
30008 for (i = 0; i < S_LEN + 1; ++i)
30009 {
30010 int expected = i <= S_LEN ? i : S_LEN;
30011 if (strnlen (S, i) != expected)
30012 return 1;
30013 }
30014 return 0;
30015
30016 ;
30017 return 0;
30018 }
30019 _ACEOF
30020 if ac_fn_c_try_run "$LINENO"; then :
30021 ac_cv_func_strnlen_working=yes
30022 else
30023 ac_cv_func_strnlen_working=no
30024 fi
30025 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30026 conftest.$ac_objext conftest.beam conftest.$ac_ext
30027 fi
30028
30029 fi
30030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
30031 $as_echo "$ac_cv_func_strnlen_working" >&6; }
30032 test $ac_cv_func_strnlen_working = no && :
30033
30034
30035 if test $ac_cv_func_strnlen_working = no; then
30036 REPLACE_STRNLEN=1
30037 fi
30038 fi
30039
30040 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
30041
30042
30043
30044
30045
30046
30047
30048
30049 gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
30050
30051 :
30052 fi
30053
30054
30055
30056
30057
30058 GNULIB_STRNLEN=1
30059
30060
30061
30062
30063
30064 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
30065
30066
30067
30068
30069
30070 if test $REPLACE_STRSTR = 0; then
30071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
30072 $as_echo_n "checking whether strstr works in linear time... " >&6; }
30073 if ${gl_cv_func_strstr_linear+:} false; then :
30074 $as_echo_n "(cached) " >&6
30075 else
30076 if test "$cross_compiling" = yes; then :
30077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30078 /* end confdefs.h. */
30079
30080 #include <features.h>
30081 #ifdef __GNU_LIBRARY__
30082 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
30083 && !(defined __i386__ || defined __x86_64__) \
30084 && !defined __UCLIBC__
30085 Lucky user
30086 #endif
30087 #endif
30088 #ifdef __CYGWIN__
30089 #include <cygwin/version.h>
30090 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
30091 Lucky user
30092 #endif
30093 #endif
30094
30095 _ACEOF
30096 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30097 $EGREP "Lucky user" >/dev/null 2>&1; then :
30098 gl_cv_func_strstr_linear="guessing yes"
30099 else
30100 gl_cv_func_strstr_linear="$gl_cross_guess_normal"
30101 fi
30102 rm -f conftest*
30103
30104
30105 else
30106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30107 /* end confdefs.h. */
30108
30109 #ifdef __MVS__
30110 /* z/OS does not deliver signals while strstr() is running (thanks to
30111 restrictions on its LE runtime), which prevents us from limiting the
30112 running time of this test. */
30113 # error "This test does not work properly on z/OS"
30114 #endif
30115 #include <signal.h> /* for signal */
30116 #include <string.h> /* for strstr */
30117 #include <stdlib.h> /* for malloc */
30118 #include <unistd.h> /* for alarm */
30119 static void quit (int sig) { _exit (sig + 128); }
30120
30121 int
30122 main ()
30123 {
30124
30125 int result = 0;
30126 size_t m = 1000000;
30127 char *haystack = (char *) malloc (2 * m + 2);
30128 char *needle = (char *) malloc (m + 2);
30129 /* Failure to compile this test due to missing alarm is okay,
30130 since all such platforms (mingw) also have quadratic strstr. */
30131 signal (SIGALRM, quit);
30132 alarm (5);
30133 /* Check for quadratic performance. */
30134 if (haystack && needle)
30135 {
30136 memset (haystack, 'A', 2 * m);
30137 haystack[2 * m] = 'B';
30138 haystack[2 * m + 1] = 0;
30139 memset (needle, 'A', m);
30140 needle[m] = 'B';
30141 needle[m + 1] = 0;
30142 if (!strstr (haystack, needle))
30143 result |= 1;
30144 }
30145 /* Free allocated memory, in case some sanitizer is watching. */
30146 free (haystack);
30147 free (needle);
30148 return result;
30149
30150 ;
30151 return 0;
30152 }
30153 _ACEOF
30154 if ac_fn_c_try_run "$LINENO"; then :
30155 gl_cv_func_strstr_linear=yes
30156 else
30157 gl_cv_func_strstr_linear=no
30158 fi
30159 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30160 conftest.$ac_objext conftest.beam conftest.$ac_ext
30161 fi
30162
30163
30164 fi
30165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
30166 $as_echo "$gl_cv_func_strstr_linear" >&6; }
30167 case "$gl_cv_func_strstr_linear" in
30168 *yes) ;;
30169 *)
30170 REPLACE_STRSTR=1
30171 ;;
30172 esac
30173 fi
30174
30175 if test $REPLACE_STRSTR = 1; then
30176
30177
30178
30179
30180
30181
30182
30183
30184 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
30185
30186 fi
30187
30188
30189
30190 if test $REPLACE_MEMCHR = 1; then
30191 REPLACE_STRSTR=1
30192 else
30193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
30194 $as_echo_n "checking whether strstr works... " >&6; }
30195 if ${gl_cv_func_strstr_works_always+:} false; then :
30196 $as_echo_n "(cached) " >&6
30197 else
30198 if test "$cross_compiling" = yes; then :
30199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30200 /* end confdefs.h. */
30201
30202 #ifdef __GNU_LIBRARY__
30203 #include <features.h>
30204 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
30205 || defined __UCLIBC__
30206 Lucky user
30207 #endif
30208 #elif defined __CYGWIN__
30209 #include <cygwin/version.h>
30210 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
30211 Lucky user
30212 #endif
30213 #else
30214 Lucky user
30215 #endif
30216
30217 _ACEOF
30218 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30219 $EGREP "Lucky user" >/dev/null 2>&1; then :
30220 gl_cv_func_strstr_works_always="guessing yes"
30221 else
30222 gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
30223 fi
30224 rm -f conftest*
30225
30226
30227 else
30228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30229 /* end confdefs.h. */
30230
30231 #include <string.h> /* for strstr */
30232 #ifdef __GNU_LIBRARY__
30233 #include <features.h>
30234 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
30235 Unlucky user
30236 #endif
30237 #endif
30238 #define P "_EF_BF_BD"
30239 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
30240 #define NEEDLE P P P P P
30241
30242 int
30243 main ()
30244 {
30245 return !!strstr (HAYSTACK, NEEDLE);
30246
30247 ;
30248 return 0;
30249 }
30250 _ACEOF
30251 if ac_fn_c_try_run "$LINENO"; then :
30252 gl_cv_func_strstr_works_always=yes
30253 else
30254 gl_cv_func_strstr_works_always=no
30255 fi
30256 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30257 conftest.$ac_objext conftest.beam conftest.$ac_ext
30258 fi
30259
30260
30261 fi
30262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
30263 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
30264 case "$gl_cv_func_strstr_works_always" in
30265 *yes) ;;
30266 *)
30267 REPLACE_STRSTR=1
30268 ;;
30269 esac
30270 fi
30271
30272 if test $REPLACE_STRSTR = 1; then
30273
30274
30275
30276
30277
30278
30279
30280
30281 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
30282
30283 fi
30284
30285
30286
30287
30288
30289 GNULIB_STRSTR=1
30290
30291
30292
30293
30294
30295 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
30296
30297
30298
30299
30300
30301
30302
30303 for ac_func in strtok_r
30304 do :
30305 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
30306 if test "x$ac_cv_func_strtok_r" = xyes; then :
30307 cat >>confdefs.h <<_ACEOF
30308 #define HAVE_STRTOK_R 1
30309 _ACEOF
30310
30311 fi
30312 done
30313
30314 if test $ac_cv_func_strtok_r = yes; then
30315 HAVE_STRTOK_R=1
30316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
30317 $as_echo_n "checking whether strtok_r works... " >&6; }
30318 if ${gl_cv_func_strtok_r_works+:} false; then :
30319 $as_echo_n "(cached) " >&6
30320 else
30321 if test "$cross_compiling" = yes; then :
30322 case "$host_os" in
30323 # Guess no on glibc systems.
30324 *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;;
30325 # Guess yes on native Windows.
30326 mingw*) gl_cv_func_strtok_r_works="guessing yes" ;;
30327 *) gl_cv_func_strtok_r_works="guessing yes" ;;
30328 esac
30329
30330 else
30331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30332 /* end confdefs.h. */
30333
30334 #ifndef __OPTIMIZE__
30335 # define __OPTIMIZE__ 1
30336 #endif
30337 #undef __OPTIMIZE_SIZE__
30338 #undef __NO_INLINE__
30339 #include <stdlib.h>
30340 #include <string.h>
30341
30342 int
30343 main ()
30344 {
30345 static const char dummy[] = "\177\01a";
30346 char delimiters[] = "xxxxxxxx";
30347 char *save_ptr = (char *) dummy;
30348 strtok_r (delimiters, "x", &save_ptr);
30349 strtok_r (NULL, "x", &save_ptr);
30350 return 0;
30351
30352 ;
30353 return 0;
30354 }
30355
30356 _ACEOF
30357 if ac_fn_c_try_run "$LINENO"; then :
30358 gl_cv_func_strtok_r_works=yes
30359 else
30360 gl_cv_func_strtok_r_works=no
30361 fi
30362 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30363 conftest.$ac_objext conftest.beam conftest.$ac_ext
30364 fi
30365
30366
30367 fi
30368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
30369 $as_echo "$gl_cv_func_strtok_r_works" >&6; }
30370 case "$gl_cv_func_strtok_r_works" in
30371 *no)
30372 UNDEFINE_STRTOK_R=1
30373 ;;
30374 esac
30375 else
30376 HAVE_STRTOK_R=0
30377 fi
30378
30379 if test $ac_cv_have_decl_strtok_r = no; then
30380 HAVE_DECL_STRTOK_R=0
30381 fi
30382
30383 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
30384
30385
30386
30387
30388
30389
30390
30391
30392 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
30393
30394
30395 :
30396
30397 fi
30398
30399
30400
30401
30402
30403 GNULIB_STRTOK_R=1
30404
30405
30406
30407
30408
30409 $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
30410
30411
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422
30423
30424 if test $gl_cv_have_include_next = yes; then
30425 gl_cv_next_sys_random_h='<'sys/random.h'>'
30426 else
30427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
30428 $as_echo_n "checking absolute name of <sys/random.h>... " >&6; }
30429 if ${gl_cv_next_sys_random_h+:} false; then :
30430 $as_echo_n "(cached) " >&6
30431 else
30432
30433 if test $ac_cv_header_sys_random_h = yes; then
30434
30435
30436
30437
30438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30439 /* end confdefs.h. */
30440 #include <sys/random.h>
30441 _ACEOF
30442 case "$host_os" in
30443 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30444 *) gl_absname_cpp="$ac_cpp" ;;
30445 esac
30446
30447 case "$host_os" in
30448 mingw*)
30449 gl_dirsep_regex='[/\\]'
30450 ;;
30451 *)
30452 gl_dirsep_regex='\/'
30453 ;;
30454 esac
30455 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30456 gl_header_literal_regex=`echo 'sys/random.h' \
30457 | sed -e "$gl_make_literal_regex_sed"`
30458 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30459 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30460 s|^/[^/]|//&|
30461 p
30462 q
30463 }'
30464
30465 gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30466 sed -n "$gl_absolute_header_sed"`
30467
30468 gl_header=$gl_cv_absolute_sys_random_h
30469 gl_cv_next_sys_random_h='"'$gl_header'"'
30470 else
30471 gl_cv_next_sys_random_h='<'sys/random.h'>'
30472 fi
30473
30474
30475 fi
30476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
30477 $as_echo "$gl_cv_next_sys_random_h" >&6; }
30478 fi
30479 NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
30480
30481 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30482 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30483 gl_next_as_first_directive='<'sys/random.h'>'
30484 else
30485 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30486 gl_next_as_first_directive=$gl_cv_next_sys_random_h
30487 fi
30488 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
30489
30490
30491
30492
30493 if test $ac_cv_header_sys_random_h = yes; then
30494 HAVE_SYS_RANDOM_H=1
30495 else
30496 HAVE_SYS_RANDOM_H=0
30497 fi
30498
30499
30500
30501 if test $ac_cv_header_sys_random_h = yes; then
30502 UNISTD_H_HAVE_SYS_RANDOM_H=1
30503 fi
30504
30505
30506
30507
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520
30521
30522
30523
30524
30525
30526
30527
30528 if test $gl_cv_have_include_next = yes; then
30529 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
30530 else
30531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
30532 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
30533 if ${gl_cv_next_sys_stat_h+:} false; then :
30534 $as_echo_n "(cached) " >&6
30535 else
30536
30537 if test $ac_cv_header_sys_stat_h = yes; then
30538
30539
30540
30541
30542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30543 /* end confdefs.h. */
30544 #include <sys/stat.h>
30545 _ACEOF
30546 case "$host_os" in
30547 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30548 *) gl_absname_cpp="$ac_cpp" ;;
30549 esac
30550
30551 case "$host_os" in
30552 mingw*)
30553 gl_dirsep_regex='[/\\]'
30554 ;;
30555 *)
30556 gl_dirsep_regex='\/'
30557 ;;
30558 esac
30559 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30560 gl_header_literal_regex=`echo 'sys/stat.h' \
30561 | sed -e "$gl_make_literal_regex_sed"`
30562 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30563 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30564 s|^/[^/]|//&|
30565 p
30566 q
30567 }'
30568
30569 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30570 sed -n "$gl_absolute_header_sed"`
30571
30572 gl_header=$gl_cv_absolute_sys_stat_h
30573 gl_cv_next_sys_stat_h='"'$gl_header'"'
30574 else
30575 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
30576 fi
30577
30578
30579 fi
30580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
30581 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
30582 fi
30583 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
30584
30585 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30586 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30587 gl_next_as_first_directive='<'sys/stat.h'>'
30588 else
30589 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30590 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
30591 fi
30592 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
30593
30594
30595
30596
30597
30598
30599
30600
30601 WINDOWS_STAT_TIMESPEC=0
30602
30603
30604
30605
30606
30607
30608
30609
30610 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
30611 #include <sys/stat.h>
30612 "
30613 if test "x$ac_cv_type_nlink_t" = xyes; then :
30614
30615 else
30616
30617 $as_echo "#define nlink_t int" >>confdefs.h
30618
30619 fi
30620
30621
30622
30623
30624
30625
30626
30627
30628
30629
30630
30631
30632
30633
30634
30635
30636
30637
30638
30639
30640
30641
30642
30643
30644
30645
30646 if test $gl_cv_have_include_next = yes; then
30647 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
30648 else
30649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
30650 $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
30651 if ${gl_cv_next_sys_uio_h+:} false; then :
30652 $as_echo_n "(cached) " >&6
30653 else
30654
30655 if test $ac_cv_header_sys_uio_h = yes; then
30656
30657
30658
30659
30660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30661 /* end confdefs.h. */
30662 #include <sys/uio.h>
30663 _ACEOF
30664 case "$host_os" in
30665 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30666 *) gl_absname_cpp="$ac_cpp" ;;
30667 esac
30668
30669 case "$host_os" in
30670 mingw*)
30671 gl_dirsep_regex='[/\\]'
30672 ;;
30673 *)
30674 gl_dirsep_regex='\/'
30675 ;;
30676 esac
30677 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30678 gl_header_literal_regex=`echo 'sys/uio.h' \
30679 | sed -e "$gl_make_literal_regex_sed"`
30680 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30681 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30682 s|^/[^/]|//&|
30683 p
30684 q
30685 }'
30686
30687 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30688 sed -n "$gl_absolute_header_sed"`
30689
30690 gl_header=$gl_cv_absolute_sys_uio_h
30691 gl_cv_next_sys_uio_h='"'$gl_header'"'
30692 else
30693 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
30694 fi
30695
30696
30697 fi
30698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
30699 $as_echo "$gl_cv_next_sys_uio_h" >&6; }
30700 fi
30701 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
30702
30703 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30704 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30705 gl_next_as_first_directive='<'sys/uio.h'>'
30706 else
30707 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30708 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
30709 fi
30710 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
30711
30712
30713
30714
30715 if test $ac_cv_header_sys_uio_h = yes; then
30716 HAVE_SYS_UIO_H=1
30717 else
30718 HAVE_SYS_UIO_H=0
30719 fi
30720
30721
30722
30723
30724
30725 :
30726
30727
30728
30729
30730 cat >>confdefs.h <<_ACEOF
30731 #define GNULIB_TEMPNAME 1
30732 _ACEOF
30733
30734
30735
30736
30737
30738
30739
30740
30741
30742
30743
30744
30745 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,
30746 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
30747 been included before. */
30748 #if defined __MINGW32__
30749 # include <unistd.h>
30750 #endif
30751 #include <time.h>
30752
30753 "
30754 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
30755 ac_have_decl=1
30756 else
30757 ac_have_decl=0
30758 fi
30759
30760 cat >>confdefs.h <<_ACEOF
30761 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
30762 _ACEOF
30763
30764 if test $ac_cv_have_decl_localtime_r = no; then
30765 HAVE_DECL_LOCALTIME_R=0
30766 fi
30767
30768
30769 if test $ac_cv_func_localtime_r = yes; then
30770 HAVE_LOCALTIME_R=1
30771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
30772 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
30773 if ${gl_cv_time_r_posix+:} false; then :
30774 $as_echo_n "(cached) " >&6
30775 else
30776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30777 /* end confdefs.h. */
30778 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
30779 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
30780 been included before. */
30781 #if defined __MINGW32__
30782 # include <unistd.h>
30783 #endif
30784 #include <time.h>
30785
30786 int
30787 main ()
30788 {
30789 /* We don't need to append 'restrict's to the argument types,
30790 even though the POSIX signature has the 'restrict's,
30791 since C99 says they can't affect type compatibility. */
30792 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
30793 if (ptr) return 0;
30794 /* Check the return type is a pointer.
30795 On HP-UX 10 it is 'int'. */
30796 *localtime_r (0, 0);
30797 ;
30798 return 0;
30799 }
30800
30801 _ACEOF
30802 if ac_fn_c_try_compile "$LINENO"; then :
30803 gl_cv_time_r_posix=yes
30804 else
30805 gl_cv_time_r_posix=no
30806 fi
30807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30808
30809 fi
30810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
30811 $as_echo "$gl_cv_time_r_posix" >&6; }
30812 if test $gl_cv_time_r_posix = yes; then
30813 REPLACE_LOCALTIME_R=0
30814 else
30815 REPLACE_LOCALTIME_R=1
30816 fi
30817 else
30818 HAVE_LOCALTIME_R=0
30819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
30820 $as_echo_n "checking whether localtime_r exists as an inline function... " >&6; }
30821 if ${gl_cv_func_localtime_r_inline+:} false; then :
30822 $as_echo_n "(cached) " >&6
30823 else
30824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30825 /* end confdefs.h. */
30826 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
30827 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
30828 been included before. */
30829 #if defined __MINGW32__
30830 # include <unistd.h>
30831 #endif
30832 #include <time.h>
30833
30834 int
30835 main ()
30836 {
30837 time_t a;
30838 struct tm r;
30839 localtime_r (&a, &r);
30840
30841 ;
30842 return 0;
30843 }
30844
30845 _ACEOF
30846 if ac_fn_c_try_link "$LINENO"; then :
30847 gl_cv_func_localtime_r_inline=yes
30848 else
30849 gl_cv_func_localtime_r_inline=no
30850 fi
30851 rm -f core conftest.err conftest.$ac_objext \
30852 conftest$ac_exeext conftest.$ac_ext
30853
30854 fi
30855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
30856 $as_echo "$gl_cv_func_localtime_r_inline" >&6; }
30857 if test $gl_cv_func_localtime_r_inline = yes; then
30858 REPLACE_LOCALTIME_R=1
30859 fi
30860 fi
30861
30862 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
30863
30864
30865
30866
30867
30868
30869
30870
30871 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
30872
30873
30874 :
30875
30876 fi
30877
30878
30879
30880
30881
30882 GNULIB_TIME_R=1
30883
30884
30885
30886
30887
30888 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
30889
30890
30891
30892
30893
30894
30895
30896
30897
30898
30899
30900
30901
30902
30903
30904 if test $gl_cv_have_include_next = yes; then
30905 gl_cv_next_unistd_h='<'unistd.h'>'
30906 else
30907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
30908 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
30909 if ${gl_cv_next_unistd_h+:} false; then :
30910 $as_echo_n "(cached) " >&6
30911 else
30912
30913 if test $ac_cv_header_unistd_h = yes; then
30914
30915
30916
30917
30918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30919 /* end confdefs.h. */
30920 #include <unistd.h>
30921 _ACEOF
30922 case "$host_os" in
30923 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30924 *) gl_absname_cpp="$ac_cpp" ;;
30925 esac
30926
30927 case "$host_os" in
30928 mingw*)
30929 gl_dirsep_regex='[/\\]'
30930 ;;
30931 *)
30932 gl_dirsep_regex='\/'
30933 ;;
30934 esac
30935 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30936 gl_header_literal_regex=`echo 'unistd.h' \
30937 | sed -e "$gl_make_literal_regex_sed"`
30938 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30939 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30940 s|^/[^/]|//&|
30941 p
30942 q
30943 }'
30944
30945 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30946 sed -n "$gl_absolute_header_sed"`
30947
30948 gl_header=$gl_cv_absolute_unistd_h
30949 gl_cv_next_unistd_h='"'$gl_header'"'
30950 else
30951 gl_cv_next_unistd_h='<'unistd.h'>'
30952 fi
30953
30954
30955 fi
30956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
30957 $as_echo "$gl_cv_next_unistd_h" >&6; }
30958 fi
30959 NEXT_UNISTD_H=$gl_cv_next_unistd_h
30960
30961 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30962 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30963 gl_next_as_first_directive='<'unistd.h'>'
30964 else
30965 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30966 gl_next_as_first_directive=$gl_cv_next_unistd_h
30967 fi
30968 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
30969
30970
30971
30972
30973 if test $ac_cv_header_unistd_h = yes; then
30974 HAVE_UNISTD_H=1
30975 else
30976 HAVE_UNISTD_H=0
30977 fi
30978
30979
30980
30981
30982
30983
30984
30985
30986
30987
30988
30989
30990
30991 if test $ac_cv_have_decl_execvpe = no; then
30992 HAVE_DECL_EXECVPE=0
30993 fi
30994
30995
30996
30997
30998
30999
31000
31001 if test $ac_cv_have_decl_unsetenv = no; then
31002 HAVE_DECL_UNSETENV=0
31003 fi
31004 for ac_func in unsetenv
31005 do :
31006 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
31007 if test "x$ac_cv_func_unsetenv" = xyes; then :
31008 cat >>confdefs.h <<_ACEOF
31009 #define HAVE_UNSETENV 1
31010 _ACEOF
31011
31012 fi
31013 done
31014
31015 if test $ac_cv_func_unsetenv = no; then
31016 HAVE_UNSETENV=0
31017 else
31018 HAVE_UNSETENV=1
31019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
31020 $as_echo_n "checking for unsetenv() return type... " >&6; }
31021 if ${gt_cv_func_unsetenv_ret+:} false; then :
31022 $as_echo_n "(cached) " >&6
31023 else
31024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31025 /* end confdefs.h. */
31026
31027 #undef _BSD
31028 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
31029 #include <stdlib.h>
31030 extern
31031 #ifdef __cplusplus
31032 "C"
31033 #endif
31034 int unsetenv (const char *name);
31035
31036 int
31037 main ()
31038 {
31039
31040 ;
31041 return 0;
31042 }
31043 _ACEOF
31044 if ac_fn_c_try_compile "$LINENO"; then :
31045 gt_cv_func_unsetenv_ret='int'
31046 else
31047 gt_cv_func_unsetenv_ret='void'
31048 fi
31049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31050 fi
31051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
31052 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
31053 if test $gt_cv_func_unsetenv_ret = 'void'; then
31054
31055 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
31056
31057 REPLACE_UNSETENV=1
31058 fi
31059
31060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
31061 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
31062 if ${gl_cv_func_unsetenv_works+:} false; then :
31063 $as_echo_n "(cached) " >&6
31064 else
31065 if test "$cross_compiling" = yes; then :
31066 case "$host_os" in
31067 # Guess yes on glibc systems.
31068 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
31069 # If we don't know, obey --enable-cross-guesses.
31070 *) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
31071 esac
31072
31073 else
31074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31075 /* end confdefs.h. */
31076
31077 #include <stdlib.h>
31078 #include <errno.h>
31079 extern char **environ;
31080
31081
31082 $gl_mda_defines
31083
31084 int
31085 main ()
31086 {
31087
31088 char entry1[] = "a=1";
31089 char entry2[] = "b=2";
31090 char *env[] = { entry1, entry2, NULL };
31091 if (putenv ((char *) "a=1")) return 1;
31092 if (putenv (entry2)) return 2;
31093 entry2[0] = 'a';
31094 unsetenv ("a");
31095 if (getenv ("a")) return 3;
31096 if (!unsetenv ("") || errno != EINVAL) return 4;
31097 entry2[0] = 'b';
31098 environ = env;
31099 if (!getenv ("a")) return 5;
31100 entry2[0] = 'a';
31101 unsetenv ("a");
31102 if (getenv ("a")) return 6;
31103
31104 ;
31105 return 0;
31106 }
31107 _ACEOF
31108 if ac_fn_c_try_run "$LINENO"; then :
31109 gl_cv_func_unsetenv_works=yes
31110 else
31111 gl_cv_func_unsetenv_works=no
31112 fi
31113 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31114 conftest.$ac_objext conftest.beam conftest.$ac_ext
31115 fi
31116
31117
31118 fi
31119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
31120 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
31121 case "$gl_cv_func_unsetenv_works" in
31122 *yes) ;;
31123 *)
31124 REPLACE_UNSETENV=1
31125 ;;
31126 esac
31127 fi
31128
31129 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
31130
31131
31132
31133
31134
31135
31136
31137
31138 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
31139
31140
31141
31142
31143
31144 fi
31145
31146
31147
31148
31149
31150 GNULIB_UNSETENV=1
31151
31152
31153
31154
31155
31156 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
31157
31158
31159
31160
31161
31162
31163
31164
31165
31166
31167
31168
31169
31170
31171
31172 if test $gl_cv_have_include_next = yes; then
31173 gl_cv_next_wchar_h='<'wchar.h'>'
31174 else
31175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
31176 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
31177 if ${gl_cv_next_wchar_h+:} false; then :
31178 $as_echo_n "(cached) " >&6
31179 else
31180
31181 if test $ac_cv_header_wchar_h = yes; then
31182
31183
31184
31185
31186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31187 /* end confdefs.h. */
31188 #include <wchar.h>
31189 _ACEOF
31190 case "$host_os" in
31191 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31192 *) gl_absname_cpp="$ac_cpp" ;;
31193 esac
31194
31195 case "$host_os" in
31196 mingw*)
31197 gl_dirsep_regex='[/\\]'
31198 ;;
31199 *)
31200 gl_dirsep_regex='\/'
31201 ;;
31202 esac
31203 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31204 gl_header_literal_regex=`echo 'wchar.h' \
31205 | sed -e "$gl_make_literal_regex_sed"`
31206 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31207 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31208 s|^/[^/]|//&|
31209 p
31210 q
31211 }'
31212
31213 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31214 sed -n "$gl_absolute_header_sed"`
31215
31216 gl_header=$gl_cv_absolute_wchar_h
31217 gl_cv_next_wchar_h='"'$gl_header'"'
31218 else
31219 gl_cv_next_wchar_h='<'wchar.h'>'
31220 fi
31221
31222
31223 fi
31224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
31225 $as_echo "$gl_cv_next_wchar_h" >&6; }
31226 fi
31227 NEXT_WCHAR_H=$gl_cv_next_wchar_h
31228
31229 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31230 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31231 gl_next_as_first_directive='<'wchar.h'>'
31232 else
31233 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31234 gl_next_as_first_directive=$gl_cv_next_wchar_h
31235 fi
31236 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
31237
31238
31239
31240
31241 if test $ac_cv_header_wchar_h = yes; then
31242 HAVE_WCHAR_H=1
31243 else
31244 HAVE_WCHAR_H=0
31245 fi
31246
31247
31248
31249
31250
31251 if test $gt_cv_c_wint_t = yes; then
31252 HAVE_WINT_T=1
31253 else
31254 HAVE_WINT_T=0
31255 fi
31256
31257
31258
31259
31260
31261
31262
31263
31264
31265
31266 ac_fn_c_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
31267 #include <wchar.h>
31268
31269 "
31270 if test "x$ac_cv_have_decl_wcsdup" = xyes; then :
31271 ac_have_decl=1
31272 else
31273 ac_have_decl=0
31274 fi
31275
31276 cat >>confdefs.h <<_ACEOF
31277 #define HAVE_DECL_WCSDUP $ac_have_decl
31278 _ACEOF
31279
31280 if test $ac_cv_have_decl_wcsdup = no; then
31281 HAVE_DECL_WCSDUP=0
31282 fi
31283
31284
31285
31286
31287
31288
31289 if test $ac_cv_func_iswcntrl = yes; then
31290 HAVE_ISWCNTRL=1
31291 else
31292 HAVE_ISWCNTRL=0
31293 fi
31294
31295
31296
31297 if test $gt_cv_c_wint_t = yes; then
31298 HAVE_WINT_T=1
31299 else
31300 HAVE_WINT_T=0
31301 fi
31302
31303
31304
31305
31306
31307
31308
31309
31310
31311
31312
31313
31314
31315 if test $gl_cv_have_include_next = yes; then
31316 gl_cv_next_wctype_h='<'wctype.h'>'
31317 else
31318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
31319 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
31320 if ${gl_cv_next_wctype_h+:} false; then :
31321 $as_echo_n "(cached) " >&6
31322 else
31323
31324 if test $ac_cv_header_wctype_h = yes; then
31325
31326
31327
31328
31329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31330 /* end confdefs.h. */
31331 #include <wctype.h>
31332 _ACEOF
31333 case "$host_os" in
31334 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31335 *) gl_absname_cpp="$ac_cpp" ;;
31336 esac
31337
31338 case "$host_os" in
31339 mingw*)
31340 gl_dirsep_regex='[/\\]'
31341 ;;
31342 *)
31343 gl_dirsep_regex='\/'
31344 ;;
31345 esac
31346 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31347 gl_header_literal_regex=`echo 'wctype.h' \
31348 | sed -e "$gl_make_literal_regex_sed"`
31349 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31350 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31351 s|^/[^/]|//&|
31352 p
31353 q
31354 }'
31355
31356 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31357 sed -n "$gl_absolute_header_sed"`
31358
31359 gl_header=$gl_cv_absolute_wctype_h
31360 gl_cv_next_wctype_h='"'$gl_header'"'
31361 else
31362 gl_cv_next_wctype_h='<'wctype.h'>'
31363 fi
31364
31365
31366 fi
31367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
31368 $as_echo "$gl_cv_next_wctype_h" >&6; }
31369 fi
31370 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
31371
31372 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31373 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31374 gl_next_as_first_directive='<'wctype.h'>'
31375 else
31376 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31377 gl_next_as_first_directive=$gl_cv_next_wctype_h
31378 fi
31379 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
31380
31381
31382
31383
31384 if test $ac_cv_header_wctype_h = yes; then
31385 if test $ac_cv_func_iswcntrl = yes; then
31386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
31387 $as_echo_n "checking whether iswcntrl works... " >&6; }
31388 if ${gl_cv_func_iswcntrl_works+:} false; then :
31389 $as_echo_n "(cached) " >&6
31390 else
31391
31392 if test "$cross_compiling" = yes; then :
31393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31394 /* end confdefs.h. */
31395 #include <stdlib.h>
31396 #if __GNU_LIBRARY__ == 1
31397 Linux libc5 i18n is broken.
31398 #endif
31399 int
31400 main ()
31401 {
31402
31403 ;
31404 return 0;
31405 }
31406 _ACEOF
31407 if ac_fn_c_try_compile "$LINENO"; then :
31408 gl_cv_func_iswcntrl_works="guessing yes"
31409 else
31410 gl_cv_func_iswcntrl_works="guessing no"
31411 fi
31412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31413
31414 else
31415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31416 /* end confdefs.h. */
31417
31418 #include <wchar.h>
31419 #include <wctype.h>
31420 int main () { return iswprint ('x') == 0; }
31421
31422 _ACEOF
31423 if ac_fn_c_try_run "$LINENO"; then :
31424 gl_cv_func_iswcntrl_works=yes
31425 else
31426 gl_cv_func_iswcntrl_works=no
31427 fi
31428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31429 conftest.$ac_objext conftest.beam conftest.$ac_ext
31430 fi
31431
31432
31433 fi
31434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
31435 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
31436 fi
31437 HAVE_WCTYPE_H=1
31438 else
31439 HAVE_WCTYPE_H=0
31440 fi
31441
31442
31443 if test $GNULIB_OVERRIDES_WINT_T = 1; then
31444 REPLACE_ISWCNTRL=1
31445 else
31446 case "$gl_cv_func_iswcntrl_works" in
31447 *yes) REPLACE_ISWCNTRL=0 ;;
31448 *) REPLACE_ISWCNTRL=1 ;;
31449 esac
31450 fi
31451
31452
31453 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
31454 :
31455 fi
31456
31457 if test $REPLACE_ISWCNTRL = 1; then
31458 REPLACE_TOWLOWER=1
31459 else
31460 for ac_func in towlower
31461 do :
31462 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
31463 if test "x$ac_cv_func_towlower" = xyes; then :
31464 cat >>confdefs.h <<_ACEOF
31465 #define HAVE_TOWLOWER 1
31466 _ACEOF
31467
31468 fi
31469 done
31470
31471 if test $ac_cv_func_towlower = yes; then
31472 REPLACE_TOWLOWER=0
31473 else
31474 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
31475 #if HAVE_WCTYPE_H
31476 # include <wctype.h>
31477 #endif
31478
31479 "
31480 if test "x$ac_cv_have_decl_towlower" = xyes; then :
31481 ac_have_decl=1
31482 else
31483 ac_have_decl=0
31484 fi
31485
31486 cat >>confdefs.h <<_ACEOF
31487 #define HAVE_DECL_TOWLOWER $ac_have_decl
31488 _ACEOF
31489
31490 if test $ac_cv_have_decl_towlower = yes; then
31491 REPLACE_TOWLOWER=1
31492 else
31493 REPLACE_TOWLOWER=0
31494 fi
31495 fi
31496 fi
31497
31498
31499 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
31500 :
31501 fi
31502
31503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
31504 $as_echo_n "checking for wctype_t... " >&6; }
31505 if ${gl_cv_type_wctype_t+:} false; then :
31506 $as_echo_n "(cached) " >&6
31507 else
31508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31509 /* end confdefs.h. */
31510 #include <wchar.h>
31511 #if HAVE_WCTYPE_H
31512 # include <wctype.h>
31513 #endif
31514 wctype_t a;
31515
31516 int
31517 main ()
31518 {
31519
31520 ;
31521 return 0;
31522 }
31523 _ACEOF
31524 if ac_fn_c_try_compile "$LINENO"; then :
31525 gl_cv_type_wctype_t=yes
31526 else
31527 gl_cv_type_wctype_t=no
31528 fi
31529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31530
31531 fi
31532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
31533 $as_echo "$gl_cv_type_wctype_t" >&6; }
31534 if test $gl_cv_type_wctype_t = no; then
31535 HAVE_WCTYPE_T=0
31536 fi
31537
31538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
31539 $as_echo_n "checking for wctrans_t... " >&6; }
31540 if ${gl_cv_type_wctrans_t+:} false; then :
31541 $as_echo_n "(cached) " >&6
31542 else
31543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31544 /* end confdefs.h. */
31545 #include <wchar.h>
31546 #include <wctype.h>
31547 wctrans_t a;
31548
31549 int
31550 main ()
31551 {
31552
31553 ;
31554 return 0;
31555 }
31556 _ACEOF
31557 if ac_fn_c_try_compile "$LINENO"; then :
31558 gl_cv_type_wctrans_t=yes
31559 else
31560 gl_cv_type_wctrans_t=no
31561 fi
31562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31563
31564 fi
31565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
31566 $as_echo "$gl_cv_type_wctrans_t" >&6; }
31567 if test $gl_cv_type_wctrans_t = no; then
31568 HAVE_WCTRANS_T=0
31569 fi
31570
31571
31572
31573
31574
31575
31576 case "$host_os" in
31577 mingw*)
31578
31579
31580
31581
31582
31583
31584
31585
31586 gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext"
31587
31588 ;;
31589 esac
31590
31591 case "$host_os" in
31592 mingw*)
31593
31594
31595
31596
31597
31598
31599
31600
31601 gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext"
31602
31603 ;;
31604 esac
31605
31606 case "$host_os" in
31607 mingw*)
31608
31609
31610
31611
31612
31613
31614
31615
31616 gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext"
31617
31618 ;;
31619 esac
31620
31621 case "$host_os" in
31622 mingw*)
31623
31624
31625
31626
31627
31628
31629
31630
31631 gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext"
31632
31633 ;;
31634 esac
31635
31636
31637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
31638 $as_echo_n "checking for wmemchr... " >&6; }
31639 if ${gl_cv_func_wmemchr+:} false; then :
31640 $as_echo_n "(cached) " >&6
31641 else
31642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31643 /* end confdefs.h. */
31644 #include <wchar.h>
31645
31646 int
31647 main ()
31648 {
31649 return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
31650 ;
31651 return 0;
31652 }
31653
31654 _ACEOF
31655 if ac_fn_c_try_link "$LINENO"; then :
31656 gl_cv_func_wmemchr=yes
31657 else
31658 gl_cv_func_wmemchr=no
31659 fi
31660 rm -f core conftest.err conftest.$ac_objext \
31661 conftest$ac_exeext conftest.$ac_ext
31662
31663 fi
31664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
31665 $as_echo "$gl_cv_func_wmemchr" >&6; }
31666 if test $gl_cv_func_wmemchr = no; then
31667 HAVE_WMEMCHR=0
31668 fi
31669
31670 if test $HAVE_WMEMCHR = 0; then
31671
31672
31673
31674
31675
31676
31677
31678
31679 gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext"
31680
31681 fi
31682
31683
31684
31685
31686
31687 GNULIB_WMEMCHR=1
31688
31689
31690
31691
31692
31693 $as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
31694
31695
31696
31697
31698
31699
31700
31701
31702
31703
31704
31705 if test $ac_cv_func_wmempcpy = no; then
31706 HAVE_WMEMPCPY=0
31707 fi
31708
31709 if test $HAVE_WMEMPCPY = 0; then
31710
31711
31712
31713
31714
31715
31716
31717
31718 gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext"
31719
31720 fi
31721
31722
31723
31724
31725
31726 GNULIB_WMEMPCPY=1
31727
31728
31729
31730
31731
31732 $as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
31733
31734
31735
31736 # End of code from modules
31737
31738
31739
31740
31741
31742
31743
31744
31745
31746 gltests_libdeps=
31747 gltests_ltlibdeps=
31748
31749
31750
31751
31752
31753
31754
31755
31756
31757
31758 gl_source_base='tests'
31759 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
31760
31761 gl_module_indicator_condition=$gltests_WITNESS
31762
31763
31764
31765
31766
31767
31768
31769
31770
31771 LIBGNU_LIBDEPS="$gl_libdeps"
31772
31773 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
31774
31775
31776
31777 am__api_version='1.15'
31778
31779 # Find a good install program. We prefer a C program (faster),
31780 # so one script is as good as another. But avoid the broken or
31781 # incompatible versions:
31782 # SysV /etc/install, /usr/sbin/install
31783 # SunOS /usr/etc/install
31784 # IRIX /sbin/install
31785 # AIX /bin/install
31786 # AmigaOS /C/install, which installs bootblocks on floppy discs
31787 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
31788 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
31789 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
31790 # OS/2's system install, which has a completely different semantic
31791 # ./install, which can be erroneously created by make from ./install.sh.
31792 # Reject install programs that cannot install multiple files.
31793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
31794 $as_echo_n "checking for a BSD-compatible install... " >&6; }
31795 if test -z "$INSTALL"; then
31796 if ${ac_cv_path_install+:} false; then :
31797 $as_echo_n "(cached) " >&6
31798 else
31799 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31800 for as_dir in $PATH
31801 do
31802 IFS=$as_save_IFS
31803 test -z "$as_dir" && as_dir=.
31804 # Account for people who put trailing slashes in PATH elements.
31805 case $as_dir/ in #((
31806 ./ | .// | /[cC]/* | \
31807 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
31808 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
31809 /usr/ucb/* ) ;;
31810 *)
31811 # OSF1 and SCO ODT 3.0 have their own names for install.
31812 # Don't use installbsd from OSF since it installs stuff as root
31813 # by default.
31814 for ac_prog in ginstall scoinst install; do
31815 for ac_exec_ext in '' $ac_executable_extensions; do
31816 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
31817 if test $ac_prog = install &&
31818 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
31819 # AIX install. It has an incompatible calling convention.
31820 :
31821 elif test $ac_prog = install &&
31822 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
31823 # program-specific install script used by HP pwplus--don't use.
31824 :
31825 else
31826 rm -rf conftest.one conftest.two conftest.dir
31827 echo one > conftest.one
31828 echo two > conftest.two
31829 mkdir conftest.dir
31830 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
31831 test -s conftest.one && test -s conftest.two &&
31832 test -s conftest.dir/conftest.one &&
31833 test -s conftest.dir/conftest.two
31834 then
31835 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
31836 break 3
31837 fi
31838 fi
31839 fi
31840 done
31841 done
31842 ;;
31843 esac
31844
31845 done
31846 IFS=$as_save_IFS
31847
31848 rm -rf conftest.one conftest.two conftest.dir
31849
31850 fi
31851 if test "${ac_cv_path_install+set}" = set; then
31852 INSTALL=$ac_cv_path_install
31853 else
31854 # As a last resort, use the slow shell script. Don't cache a
31855 # value for INSTALL within a source directory, because that will
31856 # break other packages using the cache if that directory is
31857 # removed, or if the value is a relative name.
31858 INSTALL=$ac_install_sh
31859 fi
31860 fi
31861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
31862 $as_echo "$INSTALL" >&6; }
31863
31864 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
31865 # It thinks the first close brace ends the variable substitution.
31866 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
31867
31868 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
31869
31870 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
31871
31872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
31873 $as_echo_n "checking whether build environment is sane... " >&6; }
31874 # Reject unsafe characters in $srcdir or the absolute working directory
31875 # name. Accept space and tab only in the latter.
31876 am_lf='
31877 '
31878 case `pwd` in
31879 *[\\\"\#\$\&\'\`$am_lf]*)
31880 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
31881 esac
31882 case $srcdir in
31883 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
31884 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
31885 esac
31886
31887 # Do 'set' in a subshell so we don't clobber the current shell's
31888 # arguments. Must try -L first in case configure is actually a
31889 # symlink; some systems play weird games with the mod time of symlinks
31890 # (eg FreeBSD returns the mod time of the symlink's containing
31891 # directory).
31892 if (
31893 am_has_slept=no
31894 for am_try in 1 2; do
31895 echo "timestamp, slept: $am_has_slept" > conftest.file
31896 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
31897 if test "$*" = "X"; then
31898 # -L didn't work.
31899 set X `ls -t "$srcdir/configure" conftest.file`
31900 fi
31901 if test "$*" != "X $srcdir/configure conftest.file" \
31902 && test "$*" != "X conftest.file $srcdir/configure"; then
31903
31904 # If neither matched, then we have a broken ls. This can happen
31905 # if, for instance, CONFIG_SHELL is bash and it inherits a
31906 # broken ls alias from the environment. This has actually
31907 # happened. Such a system could not be considered "sane".
31908 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
31909 alias in your environment" "$LINENO" 5
31910 fi
31911 if test "$2" = conftest.file || test $am_try -eq 2; then
31912 break
31913 fi
31914 # Just in case.
31915 sleep 1
31916 am_has_slept=yes
31917 done
31918 test "$2" = conftest.file
31919 )
31920 then
31921 # Ok.
31922 :
31923 else
31924 as_fn_error $? "newly created file is older than distributed files!
31925 Check your system clock" "$LINENO" 5
31926 fi
31927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31928 $as_echo "yes" >&6; }
31929 # If we didn't sleep, we still need to ensure time stamps of config.status and
31930 # generated files are strictly newer.
31931 am_sleep_pid=
31932 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
31933 ( sleep 1 ) &
31934 am_sleep_pid=$!
31935 fi
31936
31937 rm -f conftest.file
31938
31939 test "$program_prefix" != NONE &&
31940 program_transform_name="s&^&$program_prefix&;$program_transform_name"
31941 # Use a double $ so make ignores it.
31942 test "$program_suffix" != NONE &&
31943 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
31944 # Double any \ or $.
31945 # By default was `s,x,x', remove it if useless.
31946 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
31947 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
31948
31949 # Expand $ac_aux_dir to an absolute path.
31950 am_aux_dir=`cd "$ac_aux_dir" && pwd`
31951
31952 if test x"${MISSING+set}" != xset; then
31953 case $am_aux_dir in
31954 *\ * | *\ *)
31955 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
31956 *)
31957 MISSING="\${SHELL} $am_aux_dir/missing" ;;
31958 esac
31959 fi
31960 # Use eval to expand $SHELL
31961 if eval "$MISSING --is-lightweight"; then
31962 am_missing_run="$MISSING "
31963 else
31964 am_missing_run=
31965 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
31966 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
31967 fi
31968
31969 if test x"${install_sh+set}" != xset; then
31970 case $am_aux_dir in
31971 *\ * | *\ *)
31972 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
31973 *)
31974 install_sh="\${SHELL} $am_aux_dir/install-sh"
31975 esac
31976 fi
31977
31978 # Installed binaries are usually stripped using 'strip' when the user
31979 # run "make install-strip". However 'strip' might not be the right
31980 # tool to use in cross-compilation environments, therefore Automake
31981 # will honor the 'STRIP' environment variable to overrule this program.
31982 if test "$cross_compiling" != no; then
31983 if test -n "$ac_tool_prefix"; then
31984 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
31985 set dummy ${ac_tool_prefix}strip; ac_word=$2
31986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31987 $as_echo_n "checking for $ac_word... " >&6; }
31988 if ${ac_cv_prog_STRIP+:} false; then :
31989 $as_echo_n "(cached) " >&6
31990 else
31991 if test -n "$STRIP"; then
31992 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
31993 else
31994 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31995 for as_dir in $PATH
31996 do
31997 IFS=$as_save_IFS
31998 test -z "$as_dir" && as_dir=.
31999 for ac_exec_ext in '' $ac_executable_extensions; do
32000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32001 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
32002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32003 break 2
32004 fi
32005 done
32006 done
32007 IFS=$as_save_IFS
32008
32009 fi
32010 fi
32011 STRIP=$ac_cv_prog_STRIP
32012 if test -n "$STRIP"; then
32013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
32014 $as_echo "$STRIP" >&6; }
32015 else
32016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32017 $as_echo "no" >&6; }
32018 fi
32019
32020
32021 fi
32022 if test -z "$ac_cv_prog_STRIP"; then
32023 ac_ct_STRIP=$STRIP
32024 # Extract the first word of "strip", so it can be a program name with args.
32025 set dummy strip; ac_word=$2
32026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32027 $as_echo_n "checking for $ac_word... " >&6; }
32028 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
32029 $as_echo_n "(cached) " >&6
32030 else
32031 if test -n "$ac_ct_STRIP"; then
32032 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
32033 else
32034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32035 for as_dir in $PATH
32036 do
32037 IFS=$as_save_IFS
32038 test -z "$as_dir" && as_dir=.
32039 for ac_exec_ext in '' $ac_executable_extensions; do
32040 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32041 ac_cv_prog_ac_ct_STRIP="strip"
32042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32043 break 2
32044 fi
32045 done
32046 done
32047 IFS=$as_save_IFS
32048
32049 fi
32050 fi
32051 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
32052 if test -n "$ac_ct_STRIP"; then
32053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
32054 $as_echo "$ac_ct_STRIP" >&6; }
32055 else
32056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32057 $as_echo "no" >&6; }
32058 fi
32059
32060 if test "x$ac_ct_STRIP" = x; then
32061 STRIP=":"
32062 else
32063 case $cross_compiling:$ac_tool_warned in
32064 yes:)
32065 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32066 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32067 ac_tool_warned=yes ;;
32068 esac
32069 STRIP=$ac_ct_STRIP
32070 fi
32071 else
32072 STRIP="$ac_cv_prog_STRIP"
32073 fi
32074
32075 fi
32076 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
32077
32078 for ac_prog in gawk mawk nawk awk
32079 do
32080 # Extract the first word of "$ac_prog", so it can be a program name with args.
32081 set dummy $ac_prog; ac_word=$2
32082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32083 $as_echo_n "checking for $ac_word... " >&6; }
32084 if ${ac_cv_prog_AWK+:} false; then :
32085 $as_echo_n "(cached) " >&6
32086 else
32087 if test -n "$AWK"; then
32088 ac_cv_prog_AWK="$AWK" # Let the user override the test.
32089 else
32090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32091 for as_dir in $PATH
32092 do
32093 IFS=$as_save_IFS
32094 test -z "$as_dir" && as_dir=.
32095 for ac_exec_ext in '' $ac_executable_extensions; do
32096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32097 ac_cv_prog_AWK="$ac_prog"
32098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32099 break 2
32100 fi
32101 done
32102 done
32103 IFS=$as_save_IFS
32104
32105 fi
32106 fi
32107 AWK=$ac_cv_prog_AWK
32108 if test -n "$AWK"; then
32109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
32110 $as_echo "$AWK" >&6; }
32111 else
32112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32113 $as_echo "no" >&6; }
32114 fi
32115
32116
32117 test -n "$AWK" && break
32118 done
32119
32120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
32121 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
32122 set x ${MAKE-make}
32123 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
32124 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
32125 $as_echo_n "(cached) " >&6
32126 else
32127 cat >conftest.make <<\_ACEOF
32128 SHELL = /bin/sh
32129 all:
32130 @echo '@@@%%%=$(MAKE)=@@@%%%'
32131 _ACEOF
32132 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
32133 case `${MAKE-make} -f conftest.make 2>/dev/null` in
32134 *@@@%%%=?*=@@@%%%*)
32135 eval ac_cv_prog_make_${ac_make}_set=yes;;
32136 *)
32137 eval ac_cv_prog_make_${ac_make}_set=no;;
32138 esac
32139 rm -f conftest.make
32140 fi
32141 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
32142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32143 $as_echo "yes" >&6; }
32144 SET_MAKE=
32145 else
32146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32147 $as_echo "no" >&6; }
32148 SET_MAKE="MAKE=${MAKE-make}"
32149 fi
32150
32151 rm -rf .tst 2>/dev/null
32152 mkdir .tst 2>/dev/null
32153 if test -d .tst; then
32154 am__leading_dot=.
32155 else
32156 am__leading_dot=_
32157 fi
32158 rmdir .tst 2>/dev/null
32159
32160 DEPDIR="${am__leading_dot}deps"
32161
32162 ac_config_commands="$ac_config_commands depfiles"
32163
32164
32165 am_make=${MAKE-make}
32166 cat > confinc << 'END'
32167 am__doit:
32168 @echo this is the am__doit target
32169 .PHONY: am__doit
32170 END
32171 # If we don't find an include directive, just comment out the code.
32172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
32173 $as_echo_n "checking for style of include used by $am_make... " >&6; }
32174 am__include="#"
32175 am__quote=
32176 _am_result=none
32177 # First try GNU make style include.
32178 echo "include confinc" > confmf
32179 # Ignore all kinds of additional output from 'make'.
32180 case `$am_make -s -f confmf 2> /dev/null` in #(
32181 *the\ am__doit\ target*)
32182 am__include=include
32183 am__quote=
32184 _am_result=GNU
32185 ;;
32186 esac
32187 # Now try BSD make style include.
32188 if test "$am__include" = "#"; then
32189 echo '.include "confinc"' > confmf
32190 case `$am_make -s -f confmf 2> /dev/null` in #(
32191 *the\ am__doit\ target*)
32192 am__include=.include
32193 am__quote="\""
32194 _am_result=BSD
32195 ;;
32196 esac
32197 fi
32198
32199
32200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
32201 $as_echo "$_am_result" >&6; }
32202 rm -f confinc confmf
32203
32204 # Check whether --enable-dependency-tracking was given.
32205 if test "${enable_dependency_tracking+set}" = set; then :
32206 enableval=$enable_dependency_tracking;
32207 fi
32208
32209 if test "x$enable_dependency_tracking" != xno; then
32210 am_depcomp="$ac_aux_dir/depcomp"
32211 AMDEPBACKSLASH='\'
32212 am__nodep='_no'
32213 fi
32214 if test "x$enable_dependency_tracking" != xno; then
32215 AMDEP_TRUE=
32216 AMDEP_FALSE='#'
32217 else
32218 AMDEP_TRUE='#'
32219 AMDEP_FALSE=
32220 fi
32221
32222
32223 # Check whether --enable-silent-rules was given.
32224 if test "${enable_silent_rules+set}" = set; then :
32225 enableval=$enable_silent_rules;
32226 fi
32227
32228 case $enable_silent_rules in # (((
32229 yes) AM_DEFAULT_VERBOSITY=0;;
32230 no) AM_DEFAULT_VERBOSITY=1;;
32231 *) AM_DEFAULT_VERBOSITY=1;;
32232 esac
32233 am_make=${MAKE-make}
32234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
32235 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
32236 if ${am_cv_make_support_nested_variables+:} false; then :
32237 $as_echo_n "(cached) " >&6
32238 else
32239 if $as_echo 'TRUE=$(BAR$(V))
32240 BAR0=false
32241 BAR1=true
32242 V=1
32243 am__doit:
32244 @$(TRUE)
32245 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
32246 am_cv_make_support_nested_variables=yes
32247 else
32248 am_cv_make_support_nested_variables=no
32249 fi
32250 fi
32251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
32252 $as_echo "$am_cv_make_support_nested_variables" >&6; }
32253 if test $am_cv_make_support_nested_variables = yes; then
32254 AM_V='$(V)'
32255 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
32256 else
32257 AM_V=$AM_DEFAULT_VERBOSITY
32258 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
32259 fi
32260 AM_BACKSLASH='\'
32261
32262 if test "`cd $srcdir && pwd`" != "`pwd`"; then
32263 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
32264 # is not polluted with repeated "-I."
32265 am__isrc=' -I$(srcdir)'
32266 # test to see if srcdir already configured
32267 if test -f $srcdir/config.status; then
32268 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
32269 fi
32270 fi
32271
32272 # test whether we have cygpath
32273 if test -z "$CYGPATH_W"; then
32274 if (cygpath --version) >/dev/null 2>/dev/null; then
32275 CYGPATH_W='cygpath -w'
32276 else
32277 CYGPATH_W=echo
32278 fi
32279 fi
32280
32281
32282 # Define the identity of the package.
32283 PACKAGE='libgnu'
32284 VERSION='UNUSED-VERSION'
32285
32286
32287 # Some tools Automake needs.
32288
32289 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
32290
32291
32292 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
32293
32294
32295 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
32296
32297
32298 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
32299
32300
32301 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
32302
32303 # For better backward compatibility. To be removed once Automake 1.9.x
32304 # dies out for good. For more background, see:
32305 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
32306 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
32307 mkdir_p='$(MKDIR_P)'
32308
32309 # We need awk for the "check" target (and possibly the TAP driver). The
32310 # system "awk" is bad on some platforms.
32311 # Always define AMTAR for backward compatibility. Yes, it's still used
32312 # in the wild :-( We should find a proper way to deprecate it ...
32313 AMTAR='$${TAR-tar}'
32314
32315
32316 # We'll loop over all known methods to create a tar archive until one works.
32317 _am_tools='gnutar pax cpio none'
32318
32319 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
32320
32321
32322
32323
32324
32325 depcc="$CC" am_compiler_list=
32326
32327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
32328 $as_echo_n "checking dependency style of $depcc... " >&6; }
32329 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
32330 $as_echo_n "(cached) " >&6
32331 else
32332 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
32333 # We make a subdir and do the tests there. Otherwise we can end up
32334 # making bogus files that we don't know about and never remove. For
32335 # instance it was reported that on HP-UX the gcc test will end up
32336 # making a dummy file named 'D' -- because '-MD' means "put the output
32337 # in D".
32338 rm -rf conftest.dir
32339 mkdir conftest.dir
32340 # Copy depcomp to subdir because otherwise we won't find it if we're
32341 # using a relative directory.
32342 cp "$am_depcomp" conftest.dir
32343 cd conftest.dir
32344 # We will build objects and dependencies in a subdirectory because
32345 # it helps to detect inapplicable dependency modes. For instance
32346 # both Tru64's cc and ICC support -MD to output dependencies as a
32347 # side effect of compilation, but ICC will put the dependencies in
32348 # the current directory while Tru64 will put them in the object
32349 # directory.
32350 mkdir sub
32351
32352 am_cv_CC_dependencies_compiler_type=none
32353 if test "$am_compiler_list" = ""; then
32354 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
32355 fi
32356 am__universal=false
32357 case " $depcc " in #(
32358 *\ -arch\ *\ -arch\ *) am__universal=true ;;
32359 esac
32360
32361 for depmode in $am_compiler_list; do
32362 # Setup a source with many dependencies, because some compilers
32363 # like to wrap large dependency lists on column 80 (with \), and
32364 # we should not choose a depcomp mode which is confused by this.
32365 #
32366 # We need to recreate these files for each test, as the compiler may
32367 # overwrite some of them when testing with obscure command lines.
32368 # This happens at least with the AIX C compiler.
32369 : > sub/conftest.c
32370 for i in 1 2 3 4 5 6; do
32371 echo '#include "conftst'$i'.h"' >> sub/conftest.c
32372 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
32373 # Solaris 10 /bin/sh.
32374 echo '/* dummy */' > sub/conftst$i.h
32375 done
32376 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
32377
32378 # We check with '-c' and '-o' for the sake of the "dashmstdout"
32379 # mode. It turns out that the SunPro C++ compiler does not properly
32380 # handle '-M -o', and we need to detect this. Also, some Intel
32381 # versions had trouble with output in subdirs.
32382 am__obj=sub/conftest.${OBJEXT-o}
32383 am__minus_obj="-o $am__obj"
32384 case $depmode in
32385 gcc)
32386 # This depmode causes a compiler race in universal mode.
32387 test "$am__universal" = false || continue
32388 ;;
32389 nosideeffect)
32390 # After this tag, mechanisms are not by side-effect, so they'll
32391 # only be used when explicitly requested.
32392 if test "x$enable_dependency_tracking" = xyes; then
32393 continue
32394 else
32395 break
32396 fi
32397 ;;
32398 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
32399 # This compiler won't grok '-c -o', but also, the minuso test has
32400 # not run yet. These depmodes are late enough in the game, and
32401 # so weak that their functioning should not be impacted.
32402 am__obj=conftest.${OBJEXT-o}
32403 am__minus_obj=
32404 ;;
32405 none) break ;;
32406 esac
32407 if depmode=$depmode \
32408 source=sub/conftest.c object=$am__obj \
32409 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
32410 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
32411 >/dev/null 2>conftest.err &&
32412 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
32413 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
32414 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
32415 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
32416 # icc doesn't choke on unknown options, it will just issue warnings
32417 # or remarks (even with -Werror). So we grep stderr for any message
32418 # that says an option was ignored or not supported.
32419 # When given -MP, icc 7.0 and 7.1 complain thusly:
32420 # icc: Command line warning: ignoring option '-M'; no argument required
32421 # The diagnosis changed in icc 8.0:
32422 # icc: Command line remark: option '-MP' not supported
32423 if (grep 'ignoring option' conftest.err ||
32424 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
32425 am_cv_CC_dependencies_compiler_type=$depmode
32426 break
32427 fi
32428 fi
32429 done
32430
32431 cd ..
32432 rm -rf conftest.dir
32433 else
32434 am_cv_CC_dependencies_compiler_type=none
32435 fi
32436
32437 fi
32438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
32439 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
32440 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
32441
32442 if
32443 test "x$enable_dependency_tracking" != xno \
32444 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
32445 am__fastdepCC_TRUE=
32446 am__fastdepCC_FALSE='#'
32447 else
32448 am__fastdepCC_TRUE='#'
32449 am__fastdepCC_FALSE=
32450 fi
32451
32452
32453
32454 # POSIX will say in a future version that running "rm -f" with no argument
32455 # is OK; and we want to be able to make that assumption in our Makefile
32456 # recipes. So use an aggressive probe to check that the usage we want is
32457 # actually supported "in the wild" to an acceptable degree.
32458 # See automake bug#10828.
32459 # To make any issue more visible, cause the running configure to be aborted
32460 # by default if the 'rm' program in use doesn't match our expectations; the
32461 # user can still override this though.
32462 if rm -f && rm -fr && rm -rf; then : OK; else
32463 cat >&2 <<'END'
32464 Oops!
32465
32466 Your 'rm' program seems unable to run without file operands specified
32467 on the command line, even when the '-f' option is present. This is contrary
32468 to the behaviour of most rm programs out there, and not conforming with
32469 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
32470
32471 Please tell bug-automake@gnu.org about your system, including the value
32472 of your $PATH and any error possibly output before this message. This
32473 can help us improve future automake versions.
32474
32475 END
32476 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
32477 echo 'Configuration will proceed anyway, since you have set the' >&2
32478 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
32479 echo >&2
32480 else
32481 cat >&2 <<'END'
32482 Aborting the configuration process, to ensure you take notice of the issue.
32483
32484 You can download and install GNU coreutils to get an 'rm' implementation
32485 that behaves properly: <http://www.gnu.org/software/coreutils/>.
32486
32487 If you want to complete the configuration process using your problematic
32488 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
32489 to "yes", and re-run configure.
32490
32491 END
32492 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
32493 fi
32494 fi
32495
32496
32497 # Check whether --enable-silent-rules was given.
32498 if test "${enable_silent_rules+set}" = set; then :
32499 enableval=$enable_silent_rules;
32500 fi
32501
32502 case $enable_silent_rules in # (((
32503 yes) AM_DEFAULT_VERBOSITY=0;;
32504 no) AM_DEFAULT_VERBOSITY=1;;
32505 *) AM_DEFAULT_VERBOSITY=0;;
32506 esac
32507 am_make=${MAKE-make}
32508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
32509 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
32510 if ${am_cv_make_support_nested_variables+:} false; then :
32511 $as_echo_n "(cached) " >&6
32512 else
32513 if $as_echo 'TRUE=$(BAR$(V))
32514 BAR0=false
32515 BAR1=true
32516 V=1
32517 am__doit:
32518 @$(TRUE)
32519 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
32520 am_cv_make_support_nested_variables=yes
32521 else
32522 am_cv_make_support_nested_variables=no
32523 fi
32524 fi
32525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
32526 $as_echo "$am_cv_make_support_nested_variables" >&6; }
32527 if test $am_cv_make_support_nested_variables = yes; then
32528 AM_V='$(V)'
32529 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
32530 else
32531 AM_V=$AM_DEFAULT_VERBOSITY
32532 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
32533 fi
32534 AM_BACKSLASH='\'
32535
32536
32537 # --------------------- #
32538 # Checks for programs. #
32539 # --------------------- #
32540
32541
32542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
32543 $as_echo_n "checking whether ln -s works... " >&6; }
32544 LN_S=$as_ln_s
32545 if test "$LN_S" = "ln -s"; then
32546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32547 $as_echo "yes" >&6; }
32548 else
32549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
32550 $as_echo "no, using $LN_S" >&6; }
32551 fi
32552
32553 if test -n "$ac_tool_prefix"; then
32554 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
32555 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
32556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32557 $as_echo_n "checking for $ac_word... " >&6; }
32558 if ${ac_cv_prog_RANLIB+:} false; then :
32559 $as_echo_n "(cached) " >&6
32560 else
32561 if test -n "$RANLIB"; then
32562 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
32563 else
32564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32565 for as_dir in $PATH
32566 do
32567 IFS=$as_save_IFS
32568 test -z "$as_dir" && as_dir=.
32569 for ac_exec_ext in '' $ac_executable_extensions; do
32570 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32571 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
32572 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32573 break 2
32574 fi
32575 done
32576 done
32577 IFS=$as_save_IFS
32578
32579 fi
32580 fi
32581 RANLIB=$ac_cv_prog_RANLIB
32582 if test -n "$RANLIB"; then
32583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
32584 $as_echo "$RANLIB" >&6; }
32585 else
32586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32587 $as_echo "no" >&6; }
32588 fi
32589
32590
32591 fi
32592 if test -z "$ac_cv_prog_RANLIB"; then
32593 ac_ct_RANLIB=$RANLIB
32594 # Extract the first word of "ranlib", so it can be a program name with args.
32595 set dummy ranlib; ac_word=$2
32596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32597 $as_echo_n "checking for $ac_word... " >&6; }
32598 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
32599 $as_echo_n "(cached) " >&6
32600 else
32601 if test -n "$ac_ct_RANLIB"; then
32602 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
32603 else
32604 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32605 for as_dir in $PATH
32606 do
32607 IFS=$as_save_IFS
32608 test -z "$as_dir" && as_dir=.
32609 for ac_exec_ext in '' $ac_executable_extensions; do
32610 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32611 ac_cv_prog_ac_ct_RANLIB="ranlib"
32612 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32613 break 2
32614 fi
32615 done
32616 done
32617 IFS=$as_save_IFS
32618
32619 fi
32620 fi
32621 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
32622 if test -n "$ac_ct_RANLIB"; then
32623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
32624 $as_echo "$ac_ct_RANLIB" >&6; }
32625 else
32626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32627 $as_echo "no" >&6; }
32628 fi
32629
32630 if test "x$ac_ct_RANLIB" = x; then
32631 RANLIB=":"
32632 else
32633 case $cross_compiling:$ac_tool_warned in
32634 yes:)
32635 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32636 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32637 ac_tool_warned=yes ;;
32638 esac
32639 RANLIB=$ac_ct_RANLIB
32640 fi
32641 else
32642 RANLIB="$ac_cv_prog_RANLIB"
32643 fi
32644
32645
32646 if test -n "$ac_tool_prefix"; then
32647 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
32648 set dummy ${ac_tool_prefix}ar; ac_word=$2
32649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32650 $as_echo_n "checking for $ac_word... " >&6; }
32651 if ${ac_cv_prog_AR+:} false; then :
32652 $as_echo_n "(cached) " >&6
32653 else
32654 if test -n "$AR"; then
32655 ac_cv_prog_AR="$AR" # Let the user override the test.
32656 else
32657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32658 for as_dir in $PATH
32659 do
32660 IFS=$as_save_IFS
32661 test -z "$as_dir" && as_dir=.
32662 for ac_exec_ext in '' $ac_executable_extensions; do
32663 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32664 ac_cv_prog_AR="${ac_tool_prefix}ar"
32665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32666 break 2
32667 fi
32668 done
32669 done
32670 IFS=$as_save_IFS
32671
32672 fi
32673 fi
32674 AR=$ac_cv_prog_AR
32675 if test -n "$AR"; then
32676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32677 $as_echo "$AR" >&6; }
32678 else
32679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32680 $as_echo "no" >&6; }
32681 fi
32682
32683
32684 fi
32685 if test -z "$ac_cv_prog_AR"; then
32686 ac_ct_AR=$AR
32687 # Extract the first word of "ar", so it can be a program name with args.
32688 set dummy ar; ac_word=$2
32689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32690 $as_echo_n "checking for $ac_word... " >&6; }
32691 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32692 $as_echo_n "(cached) " >&6
32693 else
32694 if test -n "$ac_ct_AR"; then
32695 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32696 else
32697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32698 for as_dir in $PATH
32699 do
32700 IFS=$as_save_IFS
32701 test -z "$as_dir" && as_dir=.
32702 for ac_exec_ext in '' $ac_executable_extensions; do
32703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32704 ac_cv_prog_ac_ct_AR="ar"
32705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32706 break 2
32707 fi
32708 done
32709 done
32710 IFS=$as_save_IFS
32711
32712 fi
32713 fi
32714 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32715 if test -n "$ac_ct_AR"; then
32716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32717 $as_echo "$ac_ct_AR" >&6; }
32718 else
32719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32720 $as_echo "no" >&6; }
32721 fi
32722
32723 if test "x$ac_ct_AR" = x; then
32724 AR=""
32725 else
32726 case $cross_compiling:$ac_tool_warned in
32727 yes:)
32728 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32729 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32730 ac_tool_warned=yes ;;
32731 esac
32732 AR=$ac_ct_AR
32733 fi
32734 else
32735 AR="$ac_cv_prog_AR"
32736 fi
32737
32738
32739 # ---------------------- #
32740 # Checks for libraries. #
32741 # ---------------------- #
32742
32743 ac_config_files="$ac_config_files Makefile.gnulib.inc"
32744
32745
32746 ac_config_files="$ac_config_files Makefile import/Makefile"
32747
32748 ac_config_commands="$ac_config_commands default"
32749
32750 cat >confcache <<\_ACEOF
32751 # This file is a shell script that caches the results of configure
32752 # tests run on this system so they can be shared between configure
32753 # scripts and configure runs, see configure's option --config-cache.
32754 # It is not useful on other systems. If it contains results you don't
32755 # want to keep, you may remove or edit it.
32756 #
32757 # config.status only pays attention to the cache file if you give it
32758 # the --recheck option to rerun configure.
32759 #
32760 # `ac_cv_env_foo' variables (set or unset) will be overridden when
32761 # loading this file, other *unset* `ac_cv_foo' will be assigned the
32762 # following values.
32763
32764 _ACEOF
32765
32766 # The following way of writing the cache mishandles newlines in values,
32767 # but we know of no workaround that is simple, portable, and efficient.
32768 # So, we kill variables containing newlines.
32769 # Ultrix sh set writes to stderr and can't be redirected directly,
32770 # and sets the high bit in the cache file unless we assign to the vars.
32771 (
32772 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
32773 eval ac_val=\$$ac_var
32774 case $ac_val in #(
32775 *${as_nl}*)
32776 case $ac_var in #(
32777 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
32778 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
32779 esac
32780 case $ac_var in #(
32781 _ | IFS | as_nl) ;; #(
32782 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
32783 *) { eval $ac_var=; unset $ac_var;} ;;
32784 esac ;;
32785 esac
32786 done
32787
32788 (set) 2>&1 |
32789 case $as_nl`(ac_space=' '; set) 2>&1` in #(
32790 *${as_nl}ac_space=\ *)
32791 # `set' does not quote correctly, so add quotes: double-quote
32792 # substitution turns \\\\ into \\, and sed turns \\ into \.
32793 sed -n \
32794 "s/'/'\\\\''/g;
32795 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
32796 ;; #(
32797 *)
32798 # `set' quotes correctly as required by POSIX, so do not add quotes.
32799 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
32800 ;;
32801 esac |
32802 sort
32803 ) |
32804 sed '
32805 /^ac_cv_env_/b end
32806 t clear
32807 :clear
32808 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
32809 t end
32810 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
32811 :end' >>confcache
32812 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
32813 if test -w "$cache_file"; then
32814 if test "x$cache_file" != "x/dev/null"; then
32815 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
32816 $as_echo "$as_me: updating cache $cache_file" >&6;}
32817 if test ! -f "$cache_file" || test -h "$cache_file"; then
32818 cat confcache >"$cache_file"
32819 else
32820 case $cache_file in #(
32821 */* | ?:*)
32822 mv -f confcache "$cache_file"$$ &&
32823 mv -f "$cache_file"$$ "$cache_file" ;; #(
32824 *)
32825 mv -f confcache "$cache_file" ;;
32826 esac
32827 fi
32828 fi
32829 else
32830 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
32831 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
32832 fi
32833 fi
32834 rm -f confcache
32835
32836 test "x$prefix" = xNONE && prefix=$ac_default_prefix
32837 # Let make expand exec_prefix.
32838 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
32839
32840 DEFS=-DHAVE_CONFIG_H
32841
32842 ac_libobjs=
32843 ac_ltlibobjs=
32844 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
32845 # 1. Remove the extension, and $U if already installed.
32846 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
32847 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
32848 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
32849 # will be set to the directory where LIBOBJS objects are built.
32850 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
32851 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
32852 done
32853 LIBOBJS=$ac_libobjs
32854
32855 LTLIBOBJS=$ac_ltlibobjs
32856
32857
32858 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
32859 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
32860 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32861 fi
32862 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
32863 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
32864 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32865 fi
32866 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
32867 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
32868 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32869 fi
32870 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
32871 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
32872 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32873 fi
32874 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
32875 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
32876 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32877 fi
32878 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
32879 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
32880 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32881 fi
32882 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
32883 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
32884 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32885 fi
32886 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
32887 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
32888 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32889 fi
32890 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
32891 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
32892 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32893 fi
32894 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
32895 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
32896 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32897 fi
32898 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
32899 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
32900 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32901 fi
32902 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
32903 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
32904 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32905 fi
32906
32907
32908 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
32909 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
32910 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32911 fi
32912 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
32913 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
32914 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32915 fi
32916 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
32917 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
32918 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32919 fi
32920 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
32921 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
32922 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32923 fi
32924 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
32925 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
32926 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32927 fi
32928
32929 gl_libobjs=
32930 gl_ltlibobjs=
32931 if test -n "$gl_LIBOBJS"; then
32932 # Remove the extension.
32933 sed_drop_objext='s/\.o$//;s/\.obj$//'
32934 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
32935 gl_libobjs="$gl_libobjs $i.$ac_objext"
32936 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
32937 done
32938 fi
32939 gl_LIBOBJS=$gl_libobjs
32940
32941 gl_LTLIBOBJS=$gl_ltlibobjs
32942
32943
32944
32945 gltests_libobjs=
32946 gltests_ltlibobjs=
32947 if test -n "$gltests_LIBOBJS"; then
32948 # Remove the extension.
32949 sed_drop_objext='s/\.o$//;s/\.obj$//'
32950 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
32951 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
32952 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
32953 done
32954 fi
32955 gltests_LIBOBJS=$gltests_libobjs
32956
32957 gltests_LTLIBOBJS=$gltests_ltlibobjs
32958
32959
32960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
32961 $as_echo_n "checking that generated files are newer than configure... " >&6; }
32962 if test -n "$am_sleep_pid"; then
32963 # Hide warnings about reused PIDs.
32964 wait $am_sleep_pid 2>/dev/null
32965 fi
32966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
32967 $as_echo "done" >&6; }
32968 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
32969 as_fn_error $? "conditional \"AMDEP\" was never defined.
32970 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32971 fi
32972 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
32973 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
32974 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32975 fi
32976 if test -n "$EXEEXT"; then
32977 am__EXEEXT_TRUE=
32978 am__EXEEXT_FALSE='#'
32979 else
32980 am__EXEEXT_TRUE='#'
32981 am__EXEEXT_FALSE=
32982 fi
32983
32984
32985 : "${CONFIG_STATUS=./config.status}"
32986 ac_write_fail=0
32987 ac_clean_files_save=$ac_clean_files
32988 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
32989 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
32990 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
32991 as_write_fail=0
32992 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
32993 #! $SHELL
32994 # Generated by $as_me.
32995 # Run this file to recreate the current configuration.
32996 # Compiler output produced by configure, useful for debugging
32997 # configure, is in config.log if it exists.
32998
32999 debug=false
33000 ac_cs_recheck=false
33001 ac_cs_silent=false
33002
33003 SHELL=\${CONFIG_SHELL-$SHELL}
33004 export SHELL
33005 _ASEOF
33006 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33007 ## -------------------- ##
33008 ## M4sh Initialization. ##
33009 ## -------------------- ##
33010
33011 # Be more Bourne compatible
33012 DUALCASE=1; export DUALCASE # for MKS sh
33013 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33014 emulate sh
33015 NULLCMD=:
33016 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33017 # is contrary to our usage. Disable this feature.
33018 alias -g '${1+"$@"}'='"$@"'
33019 setopt NO_GLOB_SUBST
33020 else
33021 case `(set -o) 2>/dev/null` in #(
33022 *posix*) :
33023 set -o posix ;; #(
33024 *) :
33025 ;;
33026 esac
33027 fi
33028
33029
33030 as_nl='
33031 '
33032 export as_nl
33033 # Printing a long string crashes Solaris 7 /usr/bin/printf.
33034 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33035 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33036 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33037 # Prefer a ksh shell builtin over an external printf program on Solaris,
33038 # but without wasting forks for bash or zsh.
33039 if test -z "$BASH_VERSION$ZSH_VERSION" \
33040 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33041 as_echo='print -r --'
33042 as_echo_n='print -rn --'
33043 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33044 as_echo='printf %s\n'
33045 as_echo_n='printf %s'
33046 else
33047 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33048 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33049 as_echo_n='/usr/ucb/echo -n'
33050 else
33051 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33052 as_echo_n_body='eval
33053 arg=$1;
33054 case $arg in #(
33055 *"$as_nl"*)
33056 expr "X$arg" : "X\\(.*\\)$as_nl";
33057 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33058 esac;
33059 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33060 '
33061 export as_echo_n_body
33062 as_echo_n='sh -c $as_echo_n_body as_echo'
33063 fi
33064 export as_echo_body
33065 as_echo='sh -c $as_echo_body as_echo'
33066 fi
33067
33068 # The user is always right.
33069 if test "${PATH_SEPARATOR+set}" != set; then
33070 PATH_SEPARATOR=:
33071 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33072 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33073 PATH_SEPARATOR=';'
33074 }
33075 fi
33076
33077
33078 # IFS
33079 # We need space, tab and new line, in precisely that order. Quoting is
33080 # there to prevent editors from complaining about space-tab.
33081 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
33082 # splitting by setting IFS to empty value.)
33083 IFS=" "" $as_nl"
33084
33085 # Find who we are. Look in the path if we contain no directory separator.
33086 as_myself=
33087 case $0 in #((
33088 *[\\/]* ) as_myself=$0 ;;
33089 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33090 for as_dir in $PATH
33091 do
33092 IFS=$as_save_IFS
33093 test -z "$as_dir" && as_dir=.
33094 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33095 done
33096 IFS=$as_save_IFS
33097
33098 ;;
33099 esac
33100 # We did not find ourselves, most probably we were run as `sh COMMAND'
33101 # in which case we are not to be found in the path.
33102 if test "x$as_myself" = x; then
33103 as_myself=$0
33104 fi
33105 if test ! -f "$as_myself"; then
33106 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33107 exit 1
33108 fi
33109
33110 # Unset variables that we do not need and which cause bugs (e.g. in
33111 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
33112 # suppresses any "Segmentation fault" message there. '((' could
33113 # trigger a bug in pdksh 5.2.14.
33114 for as_var in BASH_ENV ENV MAIL MAILPATH
33115 do eval test x\${$as_var+set} = xset \
33116 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33117 done
33118 PS1='$ '
33119 PS2='> '
33120 PS4='+ '
33121
33122 # NLS nuisances.
33123 LC_ALL=C
33124 export LC_ALL
33125 LANGUAGE=C
33126 export LANGUAGE
33127
33128 # CDPATH.
33129 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33130
33131
33132 # as_fn_error STATUS ERROR [LINENO LOG_FD]
33133 # ----------------------------------------
33134 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33135 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33136 # script with STATUS, using 1 if that was 0.
33137 as_fn_error ()
33138 {
33139 as_status=$1; test $as_status -eq 0 && as_status=1
33140 if test "$4"; then
33141 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33142 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33143 fi
33144 $as_echo "$as_me: error: $2" >&2
33145 as_fn_exit $as_status
33146 } # as_fn_error
33147
33148
33149 # as_fn_set_status STATUS
33150 # -----------------------
33151 # Set $? to STATUS, without forking.
33152 as_fn_set_status ()
33153 {
33154 return $1
33155 } # as_fn_set_status
33156
33157 # as_fn_exit STATUS
33158 # -----------------
33159 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33160 as_fn_exit ()
33161 {
33162 set +e
33163 as_fn_set_status $1
33164 exit $1
33165 } # as_fn_exit
33166
33167 # as_fn_unset VAR
33168 # ---------------
33169 # Portably unset VAR.
33170 as_fn_unset ()
33171 {
33172 { eval $1=; unset $1;}
33173 }
33174 as_unset=as_fn_unset
33175 # as_fn_append VAR VALUE
33176 # ----------------------
33177 # Append the text in VALUE to the end of the definition contained in VAR. Take
33178 # advantage of any shell optimizations that allow amortized linear growth over
33179 # repeated appends, instead of the typical quadratic growth present in naive
33180 # implementations.
33181 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33182 eval 'as_fn_append ()
33183 {
33184 eval $1+=\$2
33185 }'
33186 else
33187 as_fn_append ()
33188 {
33189 eval $1=\$$1\$2
33190 }
33191 fi # as_fn_append
33192
33193 # as_fn_arith ARG...
33194 # ------------------
33195 # Perform arithmetic evaluation on the ARGs, and store the result in the
33196 # global $as_val. Take advantage of shells that can avoid forks. The arguments
33197 # must be portable across $(()) and expr.
33198 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33199 eval 'as_fn_arith ()
33200 {
33201 as_val=$(( $* ))
33202 }'
33203 else
33204 as_fn_arith ()
33205 {
33206 as_val=`expr "$@" || test $? -eq 1`
33207 }
33208 fi # as_fn_arith
33209
33210
33211 if expr a : '\(a\)' >/dev/null 2>&1 &&
33212 test "X`expr 00001 : '.*\(...\)'`" = X001; then
33213 as_expr=expr
33214 else
33215 as_expr=false
33216 fi
33217
33218 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33219 as_basename=basename
33220 else
33221 as_basename=false
33222 fi
33223
33224 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33225 as_dirname=dirname
33226 else
33227 as_dirname=false
33228 fi
33229
33230 as_me=`$as_basename -- "$0" ||
33231 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33232 X"$0" : 'X\(//\)$' \| \
33233 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33234 $as_echo X/"$0" |
33235 sed '/^.*\/\([^/][^/]*\)\/*$/{
33236 s//\1/
33237 q
33238 }
33239 /^X\/\(\/\/\)$/{
33240 s//\1/
33241 q
33242 }
33243 /^X\/\(\/\).*/{
33244 s//\1/
33245 q
33246 }
33247 s/.*/./; q'`
33248
33249 # Avoid depending upon Character Ranges.
33250 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33251 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33252 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33253 as_cr_digits='0123456789'
33254 as_cr_alnum=$as_cr_Letters$as_cr_digits
33255
33256 ECHO_C= ECHO_N= ECHO_T=
33257 case `echo -n x` in #(((((
33258 -n*)
33259 case `echo 'xy\c'` in
33260 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
33261 xy) ECHO_C='\c';;
33262 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
33263 ECHO_T=' ';;
33264 esac;;
33265 *)
33266 ECHO_N='-n';;
33267 esac
33268
33269 rm -f conf$$ conf$$.exe conf$$.file
33270 if test -d conf$$.dir; then
33271 rm -f conf$$.dir/conf$$.file
33272 else
33273 rm -f conf$$.dir
33274 mkdir conf$$.dir 2>/dev/null
33275 fi
33276 if (echo >conf$$.file) 2>/dev/null; then
33277 if ln -s conf$$.file conf$$ 2>/dev/null; then
33278 as_ln_s='ln -s'
33279 # ... but there are two gotchas:
33280 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33281 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33282 # In both cases, we have to default to `cp -pR'.
33283 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33284 as_ln_s='cp -pR'
33285 elif ln conf$$.file conf$$ 2>/dev/null; then
33286 as_ln_s=ln
33287 else
33288 as_ln_s='cp -pR'
33289 fi
33290 else
33291 as_ln_s='cp -pR'
33292 fi
33293 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33294 rmdir conf$$.dir 2>/dev/null
33295
33296
33297 # as_fn_mkdir_p
33298 # -------------
33299 # Create "$as_dir" as a directory, including parents if necessary.
33300 as_fn_mkdir_p ()
33301 {
33302
33303 case $as_dir in #(
33304 -*) as_dir=./$as_dir;;
33305 esac
33306 test -d "$as_dir" || eval $as_mkdir_p || {
33307 as_dirs=
33308 while :; do
33309 case $as_dir in #(
33310 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33311 *) as_qdir=$as_dir;;
33312 esac
33313 as_dirs="'$as_qdir' $as_dirs"
33314 as_dir=`$as_dirname -- "$as_dir" ||
33315 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33316 X"$as_dir" : 'X\(//\)[^/]' \| \
33317 X"$as_dir" : 'X\(//\)$' \| \
33318 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33319 $as_echo X"$as_dir" |
33320 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33321 s//\1/
33322 q
33323 }
33324 /^X\(\/\/\)[^/].*/{
33325 s//\1/
33326 q
33327 }
33328 /^X\(\/\/\)$/{
33329 s//\1/
33330 q
33331 }
33332 /^X\(\/\).*/{
33333 s//\1/
33334 q
33335 }
33336 s/.*/./; q'`
33337 test -d "$as_dir" && break
33338 done
33339 test -z "$as_dirs" || eval "mkdir $as_dirs"
33340 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33341
33342
33343 } # as_fn_mkdir_p
33344 if mkdir -p . 2>/dev/null; then
33345 as_mkdir_p='mkdir -p "$as_dir"'
33346 else
33347 test -d ./-p && rmdir ./-p
33348 as_mkdir_p=false
33349 fi
33350
33351
33352 # as_fn_executable_p FILE
33353 # -----------------------
33354 # Test if FILE is an executable regular file.
33355 as_fn_executable_p ()
33356 {
33357 test -f "$1" && test -x "$1"
33358 } # as_fn_executable_p
33359 as_test_x='test -x'
33360 as_executable_p=as_fn_executable_p
33361
33362 # Sed expression to map a string onto a valid CPP name.
33363 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33364
33365 # Sed expression to map a string onto a valid variable name.
33366 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33367
33368
33369 exec 6>&1
33370 ## ----------------------------------- ##
33371 ## Main body of $CONFIG_STATUS script. ##
33372 ## ----------------------------------- ##
33373 _ASEOF
33374 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33375
33376 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33377 # Save the log message, to keep $0 and so on meaningful, and to
33378 # report actual input values of CONFIG_FILES etc. instead of their
33379 # values after options handling.
33380 ac_log="
33381 This file was extended by libgnu $as_me UNUSED-VERSION, which was
33382 generated by GNU Autoconf 2.69. Invocation command line was
33383
33384 CONFIG_FILES = $CONFIG_FILES
33385 CONFIG_HEADERS = $CONFIG_HEADERS
33386 CONFIG_LINKS = $CONFIG_LINKS
33387 CONFIG_COMMANDS = $CONFIG_COMMANDS
33388 $ $0 $@
33389
33390 on `(hostname || uname -n) 2>/dev/null | sed 1q`
33391 "
33392
33393 _ACEOF
33394
33395 case $ac_config_files in *"
33396 "*) set x $ac_config_files; shift; ac_config_files=$*;;
33397 esac
33398
33399 case $ac_config_headers in *"
33400 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33401 esac
33402
33403
33404 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33405 # Files that config.status was made for.
33406 config_files="$ac_config_files"
33407 config_headers="$ac_config_headers"
33408 config_commands="$ac_config_commands"
33409
33410 _ACEOF
33411
33412 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33413 ac_cs_usage="\
33414 \`$as_me' instantiates files and other configuration actions
33415 from templates according to the current configuration. Unless the files
33416 and actions are specified as TAGs, all are instantiated by default.
33417
33418 Usage: $0 [OPTION]... [TAG]...
33419
33420 -h, --help print this help, then exit
33421 -V, --version print version number and configuration settings, then exit
33422 --config print configuration, then exit
33423 -q, --quiet, --silent
33424 do not print progress messages
33425 -d, --debug don't remove temporary files
33426 --recheck update $as_me by reconfiguring in the same conditions
33427 --file=FILE[:TEMPLATE]
33428 instantiate the configuration file FILE
33429 --header=FILE[:TEMPLATE]
33430 instantiate the configuration header FILE
33431
33432 Configuration files:
33433 $config_files
33434
33435 Configuration headers:
33436 $config_headers
33437
33438 Configuration commands:
33439 $config_commands
33440
33441 Report bugs to the package provider."
33442
33443 _ACEOF
33444 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33445 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33446 ac_cs_version="\\
33447 libgnu config.status UNUSED-VERSION
33448 configured by $0, generated by GNU Autoconf 2.69,
33449 with options \\"\$ac_cs_config\\"
33450
33451 Copyright (C) 2012 Free Software Foundation, Inc.
33452 This config.status script is free software; the Free Software Foundation
33453 gives unlimited permission to copy, distribute and modify it."
33454
33455 ac_pwd='$ac_pwd'
33456 srcdir='$srcdir'
33457 INSTALL='$INSTALL'
33458 MKDIR_P='$MKDIR_P'
33459 AWK='$AWK'
33460 test -n "\$AWK" || AWK=awk
33461 _ACEOF
33462
33463 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33464 # The default lists apply if the user does not specify any file.
33465 ac_need_defaults=:
33466 while test $# != 0
33467 do
33468 case $1 in
33469 --*=?*)
33470 ac_option=`expr "X$1" : 'X\([^=]*\)='`
33471 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33472 ac_shift=:
33473 ;;
33474 --*=)
33475 ac_option=`expr "X$1" : 'X\([^=]*\)='`
33476 ac_optarg=
33477 ac_shift=:
33478 ;;
33479 *)
33480 ac_option=$1
33481 ac_optarg=$2
33482 ac_shift=shift
33483 ;;
33484 esac
33485
33486 case $ac_option in
33487 # Handling of the options.
33488 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33489 ac_cs_recheck=: ;;
33490 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33491 $as_echo "$ac_cs_version"; exit ;;
33492 --config | --confi | --conf | --con | --co | --c )
33493 $as_echo "$ac_cs_config"; exit ;;
33494 --debug | --debu | --deb | --de | --d | -d )
33495 debug=: ;;
33496 --file | --fil | --fi | --f )
33497 $ac_shift
33498 case $ac_optarg in
33499 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33500 '') as_fn_error $? "missing file argument" ;;
33501 esac
33502 as_fn_append CONFIG_FILES " '$ac_optarg'"
33503 ac_need_defaults=false;;
33504 --header | --heade | --head | --hea )
33505 $ac_shift
33506 case $ac_optarg in
33507 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33508 esac
33509 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33510 ac_need_defaults=false;;
33511 --he | --h)
33512 # Conflict between --help and --header
33513 as_fn_error $? "ambiguous option: \`$1'
33514 Try \`$0 --help' for more information.";;
33515 --help | --hel | -h )
33516 $as_echo "$ac_cs_usage"; exit ;;
33517 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33518 | -silent | --silent | --silen | --sile | --sil | --si | --s)
33519 ac_cs_silent=: ;;
33520
33521 # This is an error.
33522 -*) as_fn_error $? "unrecognized option: \`$1'
33523 Try \`$0 --help' for more information." ;;
33524
33525 *) as_fn_append ac_config_targets " $1"
33526 ac_need_defaults=false ;;
33527
33528 esac
33529 shift
33530 done
33531
33532 ac_configure_extra_args=
33533
33534 if $ac_cs_silent; then
33535 exec 6>/dev/null
33536 ac_configure_extra_args="$ac_configure_extra_args --silent"
33537 fi
33538
33539 _ACEOF
33540 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33541 if \$ac_cs_recheck; then
33542 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33543 shift
33544 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33545 CONFIG_SHELL='$SHELL'
33546 export CONFIG_SHELL
33547 exec "\$@"
33548 fi
33549
33550 _ACEOF
33551 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33552 exec 5>>config.log
33553 {
33554 echo
33555 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33556 ## Running $as_me. ##
33557 _ASBOX
33558 $as_echo "$ac_log"
33559 } >&5
33560
33561 _ACEOF
33562 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33563 #
33564 # INIT-COMMANDS
33565 #
33566 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
33567
33568 _ACEOF
33569
33570 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33571
33572 # Handling of arguments.
33573 for ac_config_target in $ac_config_targets
33574 do
33575 case $ac_config_target in
33576 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
33577 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
33578 "Makefile.gnulib.inc") CONFIG_FILES="$CONFIG_FILES Makefile.gnulib.inc" ;;
33579 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
33580 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;;
33581 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
33582
33583 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33584 esac
33585 done
33586
33587
33588 # If the user did not use the arguments to specify the items to instantiate,
33589 # then the envvar interface is used. Set only those that are not.
33590 # We use the long form for the default assignment because of an extremely
33591 # bizarre bug on SunOS 4.1.3.
33592 if $ac_need_defaults; then
33593 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33594 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33595 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
33596 fi
33597
33598 # Have a temporary directory for convenience. Make it in the build tree
33599 # simply because there is no reason against having it here, and in addition,
33600 # creating and moving files from /tmp can sometimes cause problems.
33601 # Hook for its removal unless debugging.
33602 # Note that there is a small window in which the directory will not be cleaned:
33603 # after its creation but before its name has been assigned to `$tmp'.
33604 $debug ||
33605 {
33606 tmp= ac_tmp=
33607 trap 'exit_status=$?
33608 : "${ac_tmp:=$tmp}"
33609 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33610 ' 0
33611 trap 'as_fn_exit 1' 1 2 13 15
33612 }
33613 # Create a (secure) tmp directory for tmp files.
33614
33615 {
33616 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33617 test -d "$tmp"
33618 } ||
33619 {
33620 tmp=./conf$$-$RANDOM
33621 (umask 077 && mkdir "$tmp")
33622 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33623 ac_tmp=$tmp
33624
33625 # Set up the scripts for CONFIG_FILES section.
33626 # No need to generate them if there are no CONFIG_FILES.
33627 # This happens for instance with `./config.status config.h'.
33628 if test -n "$CONFIG_FILES"; then
33629
33630
33631 ac_cr=`echo X | tr X '\015'`
33632 # On cygwin, bash can eat \r inside `` if the user requested igncr.
33633 # But we know of no other shell where ac_cr would be empty at this
33634 # point, so we can use a bashism as a fallback.
33635 if test "x$ac_cr" = x; then
33636 eval ac_cr=\$\'\\r\'
33637 fi
33638 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33639 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33640 ac_cs_awk_cr='\\r'
33641 else
33642 ac_cs_awk_cr=$ac_cr
33643 fi
33644
33645 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33646 _ACEOF
33647
33648
33649 {
33650 echo "cat >conf$$subs.awk <<_ACEOF" &&
33651 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33652 echo "_ACEOF"
33653 } >conf$$subs.sh ||
33654 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33655 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33656 ac_delim='%!_!# '
33657 for ac_last_try in false false false false false :; do
33658 . ./conf$$subs.sh ||
33659 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33660
33661 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33662 if test $ac_delim_n = $ac_delim_num; then
33663 break
33664 elif $ac_last_try; then
33665 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33666 else
33667 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33668 fi
33669 done
33670 rm -f conf$$subs.sh
33671
33672 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33673 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
33674 _ACEOF
33675 sed -n '
33676 h
33677 s/^/S["/; s/!.*/"]=/
33678 p
33679 g
33680 s/^[^!]*!//
33681 :repl
33682 t repl
33683 s/'"$ac_delim"'$//
33684 t delim
33685 :nl
33686 h
33687 s/\(.\{148\}\)..*/\1/
33688 t more1
33689 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33690 p
33691 n
33692 b repl
33693 :more1
33694 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33695 p
33696 g
33697 s/.\{148\}//
33698 t nl
33699 :delim
33700 h
33701 s/\(.\{148\}\)..*/\1/
33702 t more2
33703 s/["\\]/\\&/g; s/^/"/; s/$/"/
33704 p
33705 b
33706 :more2
33707 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33708 p
33709 g
33710 s/.\{148\}//
33711 t delim
33712 ' <conf$$subs.awk | sed '
33713 /^[^""]/{
33714 N
33715 s/\n//
33716 }
33717 ' >>$CONFIG_STATUS || ac_write_fail=1
33718 rm -f conf$$subs.awk
33719 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33720 _ACAWK
33721 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
33722 for (key in S) S_is_set[key] = 1
33723 FS = "\a"
33724
33725 }
33726 {
33727 line = $ 0
33728 nfields = split(line, field, "@")
33729 substed = 0
33730 len = length(field[1])
33731 for (i = 2; i < nfields; i++) {
33732 key = field[i]
33733 keylen = length(key)
33734 if (S_is_set[key]) {
33735 value = S[key]
33736 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
33737 len += length(value) + length(field[++i])
33738 substed = 1
33739 } else
33740 len += 1 + keylen
33741 }
33742
33743 print line
33744 }
33745
33746 _ACAWK
33747 _ACEOF
33748 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33749 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
33750 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
33751 else
33752 cat
33753 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
33754 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
33755 _ACEOF
33756
33757 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
33758 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
33759 # trailing colons and then remove the whole line if VPATH becomes empty
33760 # (actually we leave an empty line to preserve line numbers).
33761 if test "x$srcdir" = x.; then
33762 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
33763 h
33764 s///
33765 s/^/:/
33766 s/[ ]*$/:/
33767 s/:\$(srcdir):/:/g
33768 s/:\${srcdir}:/:/g
33769 s/:@srcdir@:/:/g
33770 s/^:*//
33771 s/:*$//
33772 x
33773 s/\(=[ ]*\).*/\1/
33774 G
33775 s/\n//
33776 s/^[^=]*=[ ]*$//
33777 }'
33778 fi
33779
33780 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33781 fi # test -n "$CONFIG_FILES"
33782
33783 # Set up the scripts for CONFIG_HEADERS section.
33784 # No need to generate them if there are no CONFIG_HEADERS.
33785 # This happens for instance with `./config.status Makefile'.
33786 if test -n "$CONFIG_HEADERS"; then
33787 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
33788 BEGIN {
33789 _ACEOF
33790
33791 # Transform confdefs.h into an awk script `defines.awk', embedded as
33792 # here-document in config.status, that substitutes the proper values into
33793 # config.h.in to produce config.h.
33794
33795 # Create a delimiter string that does not exist in confdefs.h, to ease
33796 # handling of long lines.
33797 ac_delim='%!_!# '
33798 for ac_last_try in false false :; do
33799 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
33800 if test -z "$ac_tt"; then
33801 break
33802 elif $ac_last_try; then
33803 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
33804 else
33805 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33806 fi
33807 done
33808
33809 # For the awk script, D is an array of macro values keyed by name,
33810 # likewise P contains macro parameters if any. Preserve backslash
33811 # newline sequences.
33812
33813 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
33814 sed -n '
33815 s/.\{148\}/&'"$ac_delim"'/g
33816 t rset
33817 :rset
33818 s/^[ ]*#[ ]*define[ ][ ]*/ /
33819 t def
33820 d
33821 :def
33822 s/\\$//
33823 t bsnl
33824 s/["\\]/\\&/g
33825 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
33826 D["\1"]=" \3"/p
33827 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
33828 d
33829 :bsnl
33830 s/["\\]/\\&/g
33831 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
33832 D["\1"]=" \3\\\\\\n"\\/p
33833 t cont
33834 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
33835 t cont
33836 d
33837 :cont
33838 n
33839 s/.\{148\}/&'"$ac_delim"'/g
33840 t clear
33841 :clear
33842 s/\\$//
33843 t bsnlc
33844 s/["\\]/\\&/g; s/^/"/; s/$/"/p
33845 d
33846 :bsnlc
33847 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
33848 b cont
33849 ' <confdefs.h | sed '
33850 s/'"$ac_delim"'/"\\\
33851 "/g' >>$CONFIG_STATUS || ac_write_fail=1
33852
33853 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33854 for (key in D) D_is_set[key] = 1
33855 FS = "\a"
33856 }
33857 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
33858 line = \$ 0
33859 split(line, arg, " ")
33860 if (arg[1] == "#") {
33861 defundef = arg[2]
33862 mac1 = arg[3]
33863 } else {
33864 defundef = substr(arg[1], 2)
33865 mac1 = arg[2]
33866 }
33867 split(mac1, mac2, "(") #)
33868 macro = mac2[1]
33869 prefix = substr(line, 1, index(line, defundef) - 1)
33870 if (D_is_set[macro]) {
33871 # Preserve the white space surrounding the "#".
33872 print prefix "define", macro P[macro] D[macro]
33873 next
33874 } else {
33875 # Replace #undef with comments. This is necessary, for example,
33876 # in the case of _POSIX_SOURCE, which is predefined and required
33877 # on some systems where configure will not decide to define it.
33878 if (defundef == "undef") {
33879 print "/*", prefix defundef, macro, "*/"
33880 next
33881 }
33882 }
33883 }
33884 { print }
33885 _ACAWK
33886 _ACEOF
33887 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33888 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
33889 fi # test -n "$CONFIG_HEADERS"
33890
33891
33892 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
33893 shift
33894 for ac_tag
33895 do
33896 case $ac_tag in
33897 :[FHLC]) ac_mode=$ac_tag; continue;;
33898 esac
33899 case $ac_mode$ac_tag in
33900 :[FHL]*:*);;
33901 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
33902 :[FH]-) ac_tag=-:-;;
33903 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
33904 esac
33905 ac_save_IFS=$IFS
33906 IFS=:
33907 set x $ac_tag
33908 IFS=$ac_save_IFS
33909 shift
33910 ac_file=$1
33911 shift
33912
33913 case $ac_mode in
33914 :L) ac_source=$1;;
33915 :[FH])
33916 ac_file_inputs=
33917 for ac_f
33918 do
33919 case $ac_f in
33920 -) ac_f="$ac_tmp/stdin";;
33921 *) # Look for the file first in the build tree, then in the source tree
33922 # (if the path is not absolute). The absolute path cannot be DOS-style,
33923 # because $ac_f cannot contain `:'.
33924 test -f "$ac_f" ||
33925 case $ac_f in
33926 [\\/$]*) false;;
33927 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
33928 esac ||
33929 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
33930 esac
33931 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
33932 as_fn_append ac_file_inputs " '$ac_f'"
33933 done
33934
33935 # Let's still pretend it is `configure' which instantiates (i.e., don't
33936 # use $as_me), people would be surprised to read:
33937 # /* config.h. Generated by config.status. */
33938 configure_input='Generated from '`
33939 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
33940 `' by configure.'
33941 if test x"$ac_file" != x-; then
33942 configure_input="$ac_file. $configure_input"
33943 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
33944 $as_echo "$as_me: creating $ac_file" >&6;}
33945 fi
33946 # Neutralize special characters interpreted by sed in replacement strings.
33947 case $configure_input in #(
33948 *\&* | *\|* | *\\* )
33949 ac_sed_conf_input=`$as_echo "$configure_input" |
33950 sed 's/[\\\\&|]/\\\\&/g'`;; #(
33951 *) ac_sed_conf_input=$configure_input;;
33952 esac
33953
33954 case $ac_tag in
33955 *:-:* | *:-) cat >"$ac_tmp/stdin" \
33956 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
33957 esac
33958 ;;
33959 esac
33960
33961 ac_dir=`$as_dirname -- "$ac_file" ||
33962 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33963 X"$ac_file" : 'X\(//\)[^/]' \| \
33964 X"$ac_file" : 'X\(//\)$' \| \
33965 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
33966 $as_echo X"$ac_file" |
33967 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33968 s//\1/
33969 q
33970 }
33971 /^X\(\/\/\)[^/].*/{
33972 s//\1/
33973 q
33974 }
33975 /^X\(\/\/\)$/{
33976 s//\1/
33977 q
33978 }
33979 /^X\(\/\).*/{
33980 s//\1/
33981 q
33982 }
33983 s/.*/./; q'`
33984 as_dir="$ac_dir"; as_fn_mkdir_p
33985 ac_builddir=.
33986
33987 case "$ac_dir" in
33988 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33989 *)
33990 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33991 # A ".." for each directory in $ac_dir_suffix.
33992 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33993 case $ac_top_builddir_sub in
33994 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33995 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33996 esac ;;
33997 esac
33998 ac_abs_top_builddir=$ac_pwd
33999 ac_abs_builddir=$ac_pwd$ac_dir_suffix
34000 # for backward compatibility:
34001 ac_top_builddir=$ac_top_build_prefix
34002
34003 case $srcdir in
34004 .) # We are building in place.
34005 ac_srcdir=.
34006 ac_top_srcdir=$ac_top_builddir_sub
34007 ac_abs_top_srcdir=$ac_pwd ;;
34008 [\\/]* | ?:[\\/]* ) # Absolute name.
34009 ac_srcdir=$srcdir$ac_dir_suffix;
34010 ac_top_srcdir=$srcdir
34011 ac_abs_top_srcdir=$srcdir ;;
34012 *) # Relative name.
34013 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34014 ac_top_srcdir=$ac_top_build_prefix$srcdir
34015 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34016 esac
34017 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34018
34019
34020 case $ac_mode in
34021 :F)
34022 #
34023 # CONFIG_FILE
34024 #
34025
34026 case $INSTALL in
34027 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
34028 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
34029 esac
34030 ac_MKDIR_P=$MKDIR_P
34031 case $MKDIR_P in
34032 [\\/$]* | ?:[\\/]* ) ;;
34033 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
34034 esac
34035 _ACEOF
34036
34037 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34038 # If the template does not know about datarootdir, expand it.
34039 # FIXME: This hack should be removed a few years after 2.60.
34040 ac_datarootdir_hack=; ac_datarootdir_seen=
34041 ac_sed_dataroot='
34042 /datarootdir/ {
34043 p
34044 q
34045 }
34046 /@datadir@/p
34047 /@docdir@/p
34048 /@infodir@/p
34049 /@localedir@/p
34050 /@mandir@/p'
34051 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34052 *datarootdir*) ac_datarootdir_seen=yes;;
34053 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34054 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34055 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34056 _ACEOF
34057 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34058 ac_datarootdir_hack='
34059 s&@datadir@&$datadir&g
34060 s&@docdir@&$docdir&g
34061 s&@infodir@&$infodir&g
34062 s&@localedir@&$localedir&g
34063 s&@mandir@&$mandir&g
34064 s&\\\${datarootdir}&$datarootdir&g' ;;
34065 esac
34066 _ACEOF
34067
34068 # Neutralize VPATH when `$srcdir' = `.'.
34069 # Shell code in configure.ac might set extrasub.
34070 # FIXME: do we really want to maintain this feature?
34071 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34072 ac_sed_extra="$ac_vpsub
34073 $extrasub
34074 _ACEOF
34075 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34076 :t
34077 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34078 s|@configure_input@|$ac_sed_conf_input|;t t
34079 s&@top_builddir@&$ac_top_builddir_sub&;t t
34080 s&@top_build_prefix@&$ac_top_build_prefix&;t t
34081 s&@srcdir@&$ac_srcdir&;t t
34082 s&@abs_srcdir@&$ac_abs_srcdir&;t t
34083 s&@top_srcdir@&$ac_top_srcdir&;t t
34084 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34085 s&@builddir@&$ac_builddir&;t t
34086 s&@abs_builddir@&$ac_abs_builddir&;t t
34087 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34088 s&@INSTALL@&$ac_INSTALL&;t t
34089 s&@MKDIR_P@&$ac_MKDIR_P&;t t
34090 $ac_datarootdir_hack
34091 "
34092 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34093 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34094
34095 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34096 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34097 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
34098 "$ac_tmp/out"`; test -z "$ac_out"; } &&
34099 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34100 which seems to be undefined. Please make sure it is defined" >&5
34101 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34102 which seems to be undefined. Please make sure it is defined" >&2;}
34103
34104 rm -f "$ac_tmp/stdin"
34105 case $ac_file in
34106 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34107 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34108 esac \
34109 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34110 ;;
34111 :H)
34112 #
34113 # CONFIG_HEADER
34114 #
34115 if test x"$ac_file" != x-; then
34116 {
34117 $as_echo "/* $configure_input */" \
34118 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34119 } >"$ac_tmp/config.h" \
34120 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34121 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34122 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34123 $as_echo "$as_me: $ac_file is unchanged" >&6;}
34124 else
34125 rm -f "$ac_file"
34126 mv "$ac_tmp/config.h" "$ac_file" \
34127 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34128 fi
34129 else
34130 $as_echo "/* $configure_input */" \
34131 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34132 || as_fn_error $? "could not create -" "$LINENO" 5
34133 fi
34134 # Compute "$ac_file"'s index in $config_headers.
34135 _am_arg="$ac_file"
34136 _am_stamp_count=1
34137 for _am_header in $config_headers :; do
34138 case $_am_header in
34139 $_am_arg | $_am_arg:* )
34140 break ;;
34141 * )
34142 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
34143 esac
34144 done
34145 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
34146 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34147 X"$_am_arg" : 'X\(//\)[^/]' \| \
34148 X"$_am_arg" : 'X\(//\)$' \| \
34149 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
34150 $as_echo X"$_am_arg" |
34151 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34152 s//\1/
34153 q
34154 }
34155 /^X\(\/\/\)[^/].*/{
34156 s//\1/
34157 q
34158 }
34159 /^X\(\/\/\)$/{
34160 s//\1/
34161 q
34162 }
34163 /^X\(\/\).*/{
34164 s//\1/
34165 q
34166 }
34167 s/.*/./; q'`/stamp-h$_am_stamp_count
34168 ;;
34169
34170 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
34171 $as_echo "$as_me: executing $ac_file commands" >&6;}
34172 ;;
34173 esac
34174
34175
34176 case $ac_file$ac_mode in
34177 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
34178 # Older Autoconf quotes --file arguments for eval, but not when files
34179 # are listed without --file. Let's play safe and only enable the eval
34180 # if we detect the quoting.
34181 case $CONFIG_FILES in
34182 *\'*) eval set x "$CONFIG_FILES" ;;
34183 *) set x $CONFIG_FILES ;;
34184 esac
34185 shift
34186 for mf
34187 do
34188 # Strip MF so we end up with the name of the file.
34189 mf=`echo "$mf" | sed -e 's/:.*$//'`
34190 # Check whether this is an Automake generated Makefile or not.
34191 # We used to match only the files named 'Makefile.in', but
34192 # some people rename them; so instead we look at the file content.
34193 # Grep'ing the first line is not enough: some people post-process
34194 # each Makefile.in and add a new line on top of each file to say so.
34195 # Grep'ing the whole file is not good either: AIX grep has a line
34196 # limit of 2048, but all sed's we know have understand at least 4000.
34197 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
34198 dirpart=`$as_dirname -- "$mf" ||
34199 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34200 X"$mf" : 'X\(//\)[^/]' \| \
34201 X"$mf" : 'X\(//\)$' \| \
34202 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
34203 $as_echo X"$mf" |
34204 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34205 s//\1/
34206 q
34207 }
34208 /^X\(\/\/\)[^/].*/{
34209 s//\1/
34210 q
34211 }
34212 /^X\(\/\/\)$/{
34213 s//\1/
34214 q
34215 }
34216 /^X\(\/\).*/{
34217 s//\1/
34218 q
34219 }
34220 s/.*/./; q'`
34221 else
34222 continue
34223 fi
34224 # Extract the definition of DEPDIR, am__include, and am__quote
34225 # from the Makefile without running 'make'.
34226 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
34227 test -z "$DEPDIR" && continue
34228 am__include=`sed -n 's/^am__include = //p' < "$mf"`
34229 test -z "$am__include" && continue
34230 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
34231 # Find all dependency output files, they are included files with
34232 # $(DEPDIR) in their names. We invoke sed twice because it is the
34233 # simplest approach to changing $(DEPDIR) to its actual value in the
34234 # expansion.
34235 for file in `sed -n "
34236 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
34237 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
34238 # Make sure the directory exists.
34239 test -f "$dirpart/$file" && continue
34240 fdir=`$as_dirname -- "$file" ||
34241 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34242 X"$file" : 'X\(//\)[^/]' \| \
34243 X"$file" : 'X\(//\)$' \| \
34244 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
34245 $as_echo X"$file" |
34246 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34247 s//\1/
34248 q
34249 }
34250 /^X\(\/\/\)[^/].*/{
34251 s//\1/
34252 q
34253 }
34254 /^X\(\/\/\)$/{
34255 s//\1/
34256 q
34257 }
34258 /^X\(\/\).*/{
34259 s//\1/
34260 q
34261 }
34262 s/.*/./; q'`
34263 as_dir=$dirpart/$fdir; as_fn_mkdir_p
34264 # echo "creating $dirpart/$file"
34265 echo '# dummy' > "$dirpart/$file"
34266 done
34267 done
34268 }
34269 ;;
34270 "default":C)
34271 case x$CONFIG_HEADERS in
34272 xconfig.h:config.in)
34273 echo > stamp-h ;;
34274 esac
34275 ;;
34276
34277 esac
34278 done # for ac_tag
34279
34280
34281 as_fn_exit 0
34282 _ACEOF
34283 ac_clean_files=$ac_clean_files_save
34284
34285 test $ac_write_fail = 0 ||
34286 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34287
34288
34289 # configure is writing to config.log, and then calls config.status.
34290 # config.status does its own redirection, appending to config.log.
34291 # Unfortunately, on DOS this fails, as config.log is still kept open
34292 # by configure, so config.status won't be able to write to it; its
34293 # output is simply discarded. So we exec the FD to /dev/null,
34294 # effectively closing config.log, so it can be properly (re)opened and
34295 # appended to by config.status. When coming back to configure, we
34296 # need to make the FD available again.
34297 if test "$no_create" != yes; then
34298 ac_cs_success=:
34299 ac_config_status_args=
34300 test "$silent" = yes &&
34301 ac_config_status_args="$ac_config_status_args --quiet"
34302 exec 5>/dev/null
34303 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34304 exec 5>>config.log
34305 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34306 # would make configure fail if this is the last instruction.
34307 $ac_cs_success || as_fn_exit 1
34308 fi
34309 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34310 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34311 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34312 fi
34313
34314
34315 exit 0
This page took 0.765859 seconds and 4 git commands to generate.